[LLVMdev] mem2reg for non entry blocks?
Vinod Grover
vgrover528 at gmail.com
Fri Feb 22 17:20:10 PST 2013
Sorry if this has been discussed before, but I would appreciate any
pointers.
I am trying to understand why mem2reg only looks at allocas in entry
blocks, and not for any allocas in a function. One case where allocas could
be used to build local data structures like linked list (and so on make it
unsafe), and for that the existing conditions in IsAllocaPromotable (i.e.
the alloca pointer cannot escape or be stored or cast etc) should guard
against that, regardless of the position of the alloca. right? Is there a
reason for this?
Thanks
Vinod
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130222/b1b2fbad/attachment.html>
More information about the llvm-dev
mailing list