[LLVMdev] alias analysis in backend

Hal Finkel hfinkel at anl.gov
Tue Apr 16 10:34:37 PDT 2013


----- Original Message -----
> From: "Jonas Paulsson" <jonas.paulsson at ericsson.com>
> To: llvmdev at cs.uiuc.edu
> Sent: Tuesday, April 16, 2013 11:24:36 AM
> Subject: [LLVMdev] alias analysis in backend
> 
> 
> 
> 
> 
> 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?

I think that they should have pseudo-source values, see: include/llvm/CodeGen/PseudoSourceValue.h

I was under the impression that different pseudo source values from different frame indices already have this no-alias property. If they don't, then this seems like a nice general improvement that would benefit all backends.

 -Hal

> 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
> 
> 
> 
> 
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 




More information about the llvm-dev mailing list