|
LLVM
7.0.0
|
#include "llvm/Analysis/MemorySSA.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/DenseMapInfo.h"#include "llvm/ADT/DenseSet.h"#include "llvm/ADT/DepthFirstIterator.h"#include "llvm/ADT/Hashing.h"#include "llvm/ADT/None.h"#include "llvm/ADT/Optional.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/iterator.h"#include "llvm/ADT/iterator_range.h"#include "llvm/Analysis/AliasAnalysis.h"#include "llvm/Analysis/IteratedDominanceFrontier.h"#include "llvm/Analysis/MemoryLocation.h"#include "llvm/Config/llvm-config.h"#include "llvm/IR/AssemblyAnnotationWriter.h"#include "llvm/IR/BasicBlock.h"#include "llvm/IR/CallSite.h"#include "llvm/IR/Dominators.h"#include "llvm/IR/Function.h"#include "llvm/IR/Instruction.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/Intrinsics.h"#include "llvm/IR/LLVMContext.h"#include "llvm/IR/PassManager.h"#include "llvm/IR/Use.h"#include "llvm/Pass.h"#include "llvm/Support/AtomicOrdering.h"#include "llvm/Support/Casting.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/FormattedStream.h"#include "llvm/Support/raw_ostream.h"#include <algorithm>#include <cassert>#include <iterator>#include <memory>#include <utility>Go to the source code of this file.
Classes | |
| class | llvm::MemorySSAAnnotatedWriter |
| An assembly annotator class to print Memory SSA information in comments. More... | |
| struct | llvm::DenseMapInfo< MemoryLocOrCall > |
| class | llvm::MemorySSA::CachingWalker |
| A MemorySSAWalker that does AA walks to disambiguate accesses. More... | |
| class | llvm::MemorySSA::OptimizeUses |
| This class is a batch walker of all MemoryUse's in the program, and points their defining access at the thing that actually clobbers them. More... | |
Namespaces | |
| llvm | |
| Compute iterated dominance frontiers using a linear time algorithm. | |
Macros | |
| #define | DEBUG_TYPE "memoryssa" |
Variables | |
| memoryssa | |
| Memory | SSA |
| Memory | false |
| Memory true print Memory SSA | Printer |
| static cl::opt< bool > | VerifyMemorySSA ("verify-memoryssa", cl::init(false), cl::Hidden, cl::desc("Verify MemorySSA in legacy printer pass.")) |
| static const char | LiveOnEntryStr [] = "liveOnEntry" |
| #define DEBUG_TYPE "memoryssa" |
Definition at line 60 of file MemorySSA.cpp.
This does one-way checks to see if Use could theoretically be hoisted above MayClobber.
This will not check the other way around.
This assumes that, for the purposes of MemorySSA, Use comes directly after MayClobber, with no potentially clobbering operations in between them. (Where potentially clobbering ops are memory barriers, aliased stores, etc.)
Definition at line 215 of file MemorySSA.cpp.
References llvm::Acquire, llvm::LoadInst::getOrdering(), llvm::isAtLeastOrStrongerThan(), llvm::LoadInst::isVolatile(), and llvm::SequentiallyConsistent.
Referenced by instructionClobbersQuery().
|
static |
Verifies that Start is clobbered by ClobberAt, and that nothing inbetween Start and ClobberAt can clobbers Start.
This is meant to be as simple and self-contained as possible. Because it uses no cache, etc., it can be relatively expensive.
| Start | The MemoryAccess that we want to walk from. |
| ClobberAt | A clobber for Start. |
| StartLoc | The MemoryLocation for Start. |
| MSSA | The MemorySSA isntance that Start and ClobberAt belong to. |
| Query | The UpwardsMemoryQuery we used for our search. |
| AA | The AliasAnalysis we used for our search. |
Definition at line 378 of file MemorySSA.cpp.
| INITIALIZE_PASS_BEGIN | ( | MemorySSAWrapperPass | , |
| "memoryssa" | , | ||
| "Memory SSA" | , | ||
| false | , | ||
| true | |||
| ) |
| Memory true INITIALIZE_PASS_BEGIN | ( | MemorySSAPrinterLegacyPass | , |
| "print-memoryssa" | , | ||
| "Memory SSA Printer" | , | ||
| false | , | ||
| false | |||
| ) |
|
static |
Definition at line 250 of file MemorySSA.cpp.
References llvm::AAResults::alias(), areLoadsReorderable(), assert(), llvm::MemoryUseOrDef::getMemoryInst(), llvm::AAResults::getModRefInfo(), I, llvm::isModOrRefSet(), llvm::isModSet(), llvm::isMustSet(), llvm::MayAlias, llvm::MustAlias, and llvm::NoAlias.
Referenced by llvm::MemorySSAUtil::defClobbersUseOrDef(), instructionClobbersQuery(), and llvm::MemorySSA::OptimizeUses::OptimizeUses().
|
static |
Definition at line 298 of file MemorySSA.cpp.
References llvm::MemoryUseOrDef::getMemoryInst(), and instructionClobbersQuery().
|
inlinestatic |
Definition at line 1521 of file MemorySSA.cpp.
References Arg, llvm::tgtok::Def, llvm::MemoryAccess::getBlock(), llvm::Value::getContext(), llvm::Instruction::getParent(), I, llvm::isModSet(), llvm::isRefSet(), llvm::ModRef, llvm::None, and SI.
Referenced by llvm::MemoryDependenceResults::getNonLocalPointerDependency(), and llvm::CmpInst::isFalseWhenEqual().
|
static |
Definition at line 356 of file MemorySSA.cpp.
References llvm::Instruction::getMetadata(), llvm::getPointerOperand(), I, LLVM_ATTRIBUTE_UNUSED, llvm::LLVMContext::MD_invariant_load, and llvm::AAResults::pointsToConstantMemory().
Referenced by llvm::MemorySSA::CachingWalker::getClobberingMemoryAccess(), and llvm::MemorySSA::OptimizeUses::OptimizeUses().
|
static |
Definition at line 342 of file MemorySSA.cpp.
References llvm::MemoryUseOrDef::getMemoryInst(), and llvm::AAResults::isMustAlias().
Referenced by llvm::MemorySSA::OptimizeUses::OptimizeUses().
|
static |
Referenced by llvm::MemorySSA::OptimizeUses::OptimizeUses().
Definition at line 1906 of file MemorySSA.cpp.
Referenced by llvm::MemoryUse::print(), llvm::MemoryDef::print(), and llvm::MemoryPhi::print().
Definition at line 66 of file MemorySSA.cpp.
| Memory SSA |
Definition at line 66 of file MemorySSA.cpp.
Referenced by getSignature(), isSafeToExecuteUnconditionally(), llvm::promoteLoopAccessesToScalars(), and RewriteUsesOfClonedInstructions().
1.8.13