This is an archive of the discontinued LLVM Phabricator instance.

[MachineCSE] Add a threshold to avoid spending too much time in isProfitableToCSE
ClosedPublic

Authored by pzheng on Sep 15 2022, 6:02 PM.

Details

Summary

Currently, it can become extremely costly to compute MayIncreasePressure if the
size of CSUses turns out to be very large. In that case, it's no longer cost
effective to keep computing MayIncreasePressure. Therefore, to limit the amount
of time spent in isProfitableToCSE, we simply conservatively assume
MayIncreasePressure if the size of CSUses is too large. This can reduce overall
compile time by 30% for some benchmarks.

Diff Detail

Event Timeline

pzheng created this revision.Sep 15 2022, 6:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2022, 6:02 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
pzheng requested review of this revision.Sep 15 2022, 6:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2022, 6:02 PM
arsenm accepted this revision.Sep 16 2022, 12:44 PM
This revision is now accepted and ready to land.Sep 16 2022, 12:44 PM