Page MenuHomePhabricator

Fix a bug in SROA savings estimation.

Authored by eraman on Mar 18 2015, 3:46 PM.



While estimating SROA savings, we want to see if an address is derived off an alloca in the caller. For store instructions, operand 1 is the address operand, but the current code checks against operand 0. For clarity, I have used getPointerOperand for store and load instructions.

Diff Detail


Event Timeline

eraman updated this revision to Diff 22217.Mar 18 2015, 3:46 PM
eraman retitled this revision from to Fix a bug in SROA savings estimation..
eraman updated this object.
eraman edited the test plan for this revision. (Show Details)
eraman added a reviewer: chandlerc.
eraman set the repository for this revision to rL LLVM.
eraman added a subscriber: Unknown Object (MLST).
eraman updated this revision to Diff 22236.Mar 18 2015, 6:05 PM

Added a test case where callee's inlining depends on the store and load instructions being considered SROA candidates.

chandlerc accepted this revision.Mar 19 2015, 2:15 PM
chandlerc edited edge metadata.

This looks good, thanks!

This revision is now accepted and ready to land.Mar 19 2015, 2:15 PM
eraman closed this revision.Dec 11 2015, 4:36 PM

This has been submitted long time back.