[LLVMdev] Unused malloc/free don't get optimized
nicholas at mxc.ca
Mon Feb 26 20:20:17 PST 2007
Vikram S. Adve wrote:
> On Feb 22, 2007, at 1:54 PM, Nick Lewycky wrote:
>>I think you could use "getModRefInfo(CallSite, Value *, unsigned)".
> I may be missing your point, but that doesn't tell you if an object
> allocated *within* a function escapes the function.
No, I missed your point. I thought you could look at the allocations
within a function then use that method on all calls involving that
alloca as an argument, but that doesn't do what I wanted.
I have some hope for getModRefBehavior which returns a container of
PointerAccessInfo, but I haven't yet decided if that actually does what
I mean either.
Worst case, the optz'n just falls back to degraded behaviour without DSA.
More information about the llvm-dev