[llvm-commits] [PATCH] Clear unknown mem ops when merging stack slots (pr14090)

Duncan Sands baldrick at free.fr
Wed Oct 17 12:46:49 PDT 2012


Hi Matthew,

 >> If this map only contains AllocaInst's as the name suggests, then it would be
>> cheaper to first check if UO is an AllocaInst or not, and only do the map lookup
>> if it is one.
> I'm not sure about whether Allocas only contains AllocaInsts. Keys are the
> returned by MachineFrameInfo::getObjectAllocation();

it sounds from the documentation like getObjectAllocation is supposed to only
return allocas.  How about the following: change getObjectAllocation to return
an AllocaInst* rather than a Value* (plus knock-on changes), and see if the
world falls to pieces or not.  If not, commit it!

>> Likewise for the null check: no point in doing a lookup if UO is
>> none.
>>
> Done.

Thanks, Duncan.




More information about the llvm-commits mailing list