[llvm-commits] [llvm] r90045 - in /llvm/trunk: lib/Analysis/MemoryDependenceAnalysis.cpp test/Transforms/DeadStoreElimination/lifetime.ll

Duncan Sands baldrick at free.fr
Wed Dec 2 00:36:28 PST 2009


Hi Chris,

> mustalias queries don't care about the size of the operands, so  
> getting it is pointless.  Either the pointers themselves mustalias or  
> not.  As such, this won't catch the case where you have a lifetime  
> marker saying that a 20 byte object is live/dead but where you're  
> accessing 4 bytes into the 20 byte object.  I don't know if you care  
> about this case, if so, please fix it somehow, otherwise remove the  
> dead code and add a FIXME describing the issue.

I don't know if the following use case is relevant to this, but since it's
important to me I mention it here: the dragonegg trampoline code creates a
struct alloca for which one field (holding the trampoline pointer)] is constant
after being initialized.  For technical reasons (i.e. this was the best I could
come up with given that I can't modify gcc itself) this field is in the middle
of the alloca, and other fields are not constant.  I mark this field with an 
llvm.invariant call.  It is important that loads from this field simplify to the
original stored value whenever possible, since this can result in eliminating
uses of the trampoline (a big win).  [Such loads may be in other functions and
as such only exposed after inlining].  Currently such loads are not always
simplified :(  This is an example where the whole object is not invariant, and
it is important to be precise about what is being accessed.

Ciao,

Duncan.



More information about the llvm-commits mailing list