[LLVMdev] alias analysis in backend

Jonas Paulsson jonas.paulsson at ericsson.com
Tue Apr 16 09:24:36 PDT 2013


Hi,

I would like to implement alias analysis in my backend. I would like to for example get the result that two stack-accesses with different offsets (indexes), would return noAlias. However, I'm somewhat confused as there is no notion of offset for the Location object.

I would also like to call ScheduleDAGInstr::buildSchedGraph() with this AliasAnalysis and have MIsNeedsChainEdge() return false in this case.

What should I do? Adding a MemoryOperand to such an instruction seems right, but it doesn't seem to fit quite. What Value would be referenced? BasicAliasAnalysis returns MustAlias for the same Value, e g 'Stack'.

Should I implement a target AliasAnalysis, perhaps derived from BasicAliasAnalysis, and make it required for my pass that will be using it?

If not, could I make this work with BasicAliasAnalysis by adding the right memory operands?

Thanks,

Jonas Paulsson



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130416/dce678c6/attachment.html>


More information about the llvm-dev mailing list