- void add(LoadInst *LI);
- void add(StoreInst *SI);
- void add(CallSite CS); // Call/Invoke instructions
- void add(CallInst *CI) { add(CallSite(CI)); }
- void add(InvokeInst *II) { add(CallSite(II)); }
- void add(Instruction *I); // Dispatch to one of the other add methods...
+ /// These methods return true if inserting the instruction resulted in the
+ /// addition of a new alias set (i.e., the pointer did not alias anything).
+ ///
+ bool add(Value *Ptr, unsigned Size); // Add a location
+ bool add(LoadInst *LI);
+ bool add(StoreInst *SI);
+ bool add(FreeInst *FI);
+ bool add(VAArgInst *VAAI);
+ bool add(CallSite CS); // Call/Invoke instructions
+ bool add(CallInst *CI) { return add(CallSite(CI)); }
+ bool add(InvokeInst *II) { return add(CallSite(II)); }
+ bool add(Instruction *I); // Dispatch to one of the other add methods...
+ void add(BasicBlock &BB); // Add all instructions in basic block
+ void add(const AliasSetTracker &AST); // Add alias relations from another AST
+
+ /// remove methods - These methods are used to remove all entries that might
+ /// be aliased by the specified instruction. These methods return true if any
+ /// alias sets were eliminated.
+ bool remove(Value *Ptr, unsigned Size); // Remove a location
+ bool remove(LoadInst *LI);
+ bool remove(StoreInst *SI);
+ bool remove(FreeInst *FI);
+ bool remove(VAArgInst *VAAI);
+ bool remove(CallSite CS);
+ bool remove(CallInst *CI) { return remove(CallSite(CI)); }
+ bool remove(InvokeInst *II) { return remove(CallSite(II)); }
+ bool remove(Instruction *I);
+ void remove(AliasSet &AS);
+
+ void clear() {
+ PointerMap.clear();
+ AliasSets.clear();
+ }