diff options
author | Chris Lattner <sabre@nondot.org> | 2003-06-29 00:53:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-06-29 00:53:34 +0000 |
commit | aed2c6d2cb4e496a78d4bdf5c4d8266a84b6f4bf (patch) | |
tree | fa9dcef3a2dac59b370956dc087b5c83a9d2dc00 /lib/Analysis | |
parent | 62b5c167de0ca5883a7ad5eb0900eb0c15ad3707 (diff) | |
download | external_llvm-aed2c6d2cb4e496a78d4bdf5c4d8266a84b6f4bf.zip external_llvm-aed2c6d2cb4e496a78d4bdf5c4d8266a84b6f4bf.tar.gz external_llvm-aed2c6d2cb4e496a78d4bdf5c4d8266a84b6f4bf.tar.bz2 |
If the alias analysis algorithm we are using can provide MUST alias information,
expose it directly as value numbering information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6972 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/LoadValueNumbering.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Analysis/LoadValueNumbering.cpp b/lib/Analysis/LoadValueNumbering.cpp index edacffd..a850f81 100644 --- a/lib/Analysis/LoadValueNumbering.cpp +++ b/lib/Analysis/LoadValueNumbering.cpp @@ -17,6 +17,7 @@ #include "llvm/Analysis/Dominators.h" #include "llvm/Target/TargetData.h" #include "llvm/Pass.h" +#include "llvm/Type.h" #include "llvm/iMemory.h" #include "llvm/BasicBlock.h" #include "llvm/Support/CFG.h" @@ -83,6 +84,10 @@ void LoadVN::getAnalysisUsage(AnalysisUsage &AU) const { // void LoadVN::getEqualNumberNodes(Value *V, std::vector<Value*> &RetVals) const { + // If the alias analysis has any must alias information to share with us, we + // can definately use it. + if (isa<PointerType>(V->getType())) + getAnalysis<AliasAnalysis>().getMustAliases(V, RetVals); if (LoadInst *LI = dyn_cast<LoadInst>(V)) { // If we have a load instruction, find all of the load and store |