[llvm-commits] CVS: llvm/lib/Analysis/AliasAnalysis.cpp
Vikram Adve
vadve at cs.uiuc.edu
Wed Nov 6 11:18:01 PST 2002
Changes in directory llvm/lib/Analysis:
AliasAnalysis.cpp updated: 1.5 -> 1.6
---
Log message:
Make query operations non-const to allow demand-driven analyses.
---
Diffs of the changes:
Index: llvm/lib/Analysis/AliasAnalysis.cpp
diff -u llvm/lib/Analysis/AliasAnalysis.cpp:1.5 llvm/lib/Analysis/AliasAnalysis.cpp:1.6
--- llvm/lib/Analysis/AliasAnalysis.cpp:1.5 Sun Sep 8 13:45:18 2002
+++ llvm/lib/Analysis/AliasAnalysis.cpp Wed Nov 6 11:17:29 2002
@@ -34,10 +34,10 @@
//
namespace {
struct CanModify : public InstVisitor<CanModify, bool> {
- const AliasAnalysis &AA;
+ AliasAnalysis &AA;
const Value *Ptr;
- CanModify(const AliasAnalysis *aa, const Value *ptr)
+ CanModify(AliasAnalysis *aa, const Value *ptr)
: AA(*aa), Ptr(ptr) {}
bool visitInvokeInst(InvokeInst &II) {
@@ -66,7 +66,7 @@
/// specified basic block to modify the value pointed to by Ptr.
///
bool AliasAnalysis::canBasicBlockModify(const BasicBlock &bb,
- const Value *Ptr) const {
+ const Value *Ptr) {
CanModify CM(this, Ptr);
BasicBlock &BB = const_cast<BasicBlock&>(bb);
@@ -84,7 +84,7 @@
///
bool AliasAnalysis::canInstructionRangeModify(const Instruction &I1,
const Instruction &I2,
- const Value *Ptr) const {
+ const Value *Ptr) {
assert(I1.getParent() == I2.getParent() &&
"Instructions not in same basic block!");
CanModify CM(this, Ptr);
@@ -144,7 +144,7 @@
// Hopefully we have a smart C++ compiler. :)
//
AliasAnalysis::Result BasicAliasAnalysis::alias(const Value *V1,
- const Value *V2) const {
+ const Value *V2) {
// Strip off constant pointer refs if they exist
if (const ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(V1))
V1 = CPR->getValue();
More information about the llvm-commits
mailing list