[LLVMdev] Missed devirtualization opportunities
kennethuil at gmail.com
Tue Oct 12 07:36:03 CDT 2010
> The design of invariant.start/end is slightly wrong in that the first
> parameter of the end is the start. As you point out, this forces invariants
> to be local. I think we could simply remove that argument from invariant.end
> and the return from invariant.start, and rely on alias analysis to determine
> whether the two must/may/couldn't refer to the same memory.
> In general, the memory use markers were added specifically to address
> difficulties with devirtualization in the middle end or at LTO time. Feel
> free to adjust their semantics as needed; their implementation at this point
> is pretty minimal and they should be easy to work with.
If they end up being local-only, we could always have a pass that
walks the callgraph and propagates invariant regions into callers.
More information about the LLVMdev