[llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Jun 17 10:26:01 PDT 2003
Changes in directory llvm/lib/Analysis:
BasicAliasAnalysis.cpp updated: 1.10 -> 1.11
---
Log message:
Implement handling of constantexprs for disambiguation. This implements
BasicAA/featuretest.ll:constexpr_test
---
Diffs of the changes:
Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.10 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.11
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.10 Mon Jun 2 00:42:39 2003
+++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Tue Jun 17 10:25:37 2003
@@ -69,6 +69,12 @@
if (const Instruction *I = dyn_cast<Instruction>(V)) {
if (isa<CastInst>(I) || isa<GetElementPtrInst>(I))
return getUnderlyingObject(I->getOperand(0));
+ } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
+ if (CE->getOpcode() == Instruction::Cast ||
+ CE->getOpcode() == Instruction::GetElementPtr)
+ return getUnderlyingObject(CE->getOperand(0));
+ } else if (const ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(V)) {
+ return CPR->getValue();
}
return 0;
}
More information about the llvm-commits
mailing list