[llvm-commits] CVS: llvm/lib/Analysis/LoadValueNumbering.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Jun 28 19:54:01 PDT 2003
Changes in directory llvm/lib/Analysis:
LoadValueNumbering.cpp updated: 1.3 -> 1.4
---
Log message:
If the alias analysis algorithm we are using can provide MUST alias information,
expose it directly as value numbering information
---
Diffs of the changes:
Index: llvm/lib/Analysis/LoadValueNumbering.cpp
diff -u llvm/lib/Analysis/LoadValueNumbering.cpp:1.3 llvm/lib/Analysis/LoadValueNumbering.cpp:1.4
--- llvm/lib/Analysis/LoadValueNumbering.cpp:1.3 Mon Jun 16 07:06:41 2003
+++ llvm/lib/Analysis/LoadValueNumbering.cpp Sat Jun 28 19:53:34 2003
@@ -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::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
More information about the llvm-commits
mailing list