This is an archive of the discontinued LLVM Phabricator instance.

Be more conservative in canonicalizing loads that only store
Needs ReviewPublic

Authored by stewartd on May 1 2015, 11:03 AM.

Details

Reviewers
pete
Summary

Only canonicalize loads that only store if the store's pointer operand is not reloaded elsewhere. It is common that the demotion of phis to loads/stores will create a number of loads that only store. However, the same location is loaded from in multiple locations. In this case, canonicalizing the loads to integers may not be the best thing to do, as eventually the loaded value will be used as it's original type, forcing bitcasts to be spread throughout the code.

Diff Detail

Event Timeline

stewartd updated this revision to Diff 24820.May 1 2015, 11:03 AM
stewartd retitled this revision from to Be more conservative in canonicalizing loads that only store.
stewartd updated this object.
stewartd edited the test plan for this revision. (Show Details)
stewartd added reviewers: chandlerc, pete.
stewartd added a subscriber: Unknown Object (MLST).