[LLVMdev] Flow-Sensitive AA

David Greene dag at cray.com
Mon Aug 18 15:19:10 PDT 2008

I'm not quite understanding how one would use the existing alias analysis
framework to represent a flow-sensitive analysis.

Let's say I have a load and a store and I want to determine whether the load
loads from the same place the store stores to.  Today we'd do something like

AA.alias(load->getPointerOperand(), /* get the size */
        store->getPointerOperand()), /* size *);

There is nothing here that tells AliasAnalyses which program point we're at.

It doesn't seem to be enough to say:

AA.alias(load, /* size */, store, /* size */);

because AliasAnalysis wouldn't know which operands we're interested in.

So does AliasAnalysis need an updated interface, something like:

  virtual AliasResult alias(const Value *V1, unsigned V1Size, 
                            const Instruction *V1Inst,
                            const Value *V2, unsigned V2Size,
                            const Instruction *V2Inst);

?  Or am I missing something?


More information about the llvm-dev mailing list