This is an archive of the discontinued LLVM Phabricator instance.

[ConstHoisting] choose to hoist when frequency is the same
ClosedPublic

Authored by wmi on Jul 6 2017, 1:47 PM.

Details

Summary

The patch is to adjust the strategy of frequency based consthoisting: Previously when the candidate block has the same frequency with the existing blocks containing a const, it will not hoist the const to the candidate block. For that case, now we change the strategy to hoist the const if only existing blocks have more than one block member. This is helpful for reducing code size.

Diff Detail

Repository
rL LLVM

Event Timeline

wmi created this revision.Jul 6 2017, 1:47 PM
davidxl accepted this revision.Jul 6 2017, 1:58 PM

lgtm

test/CodeGen/X86/constant-hoisting-bfi.ll
128 ↗(On Diff #105523)

add CHECK-NOT

131 ↗(On Diff #105523)

add a CHECK-NOT

This revision is now accepted and ready to land.Jul 6 2017, 1:58 PM
wmi marked 2 inline comments as done.Jul 6 2017, 3:32 PM
This revision was automatically updated to reflect the committed changes.