This is an archive of the discontinued LLVM Phabricator instance.

[MachineCSE] Improve MachineCSE profitability heuristics for better compile time.
AbandonedPublic

Authored by huihuiz on Feb 19 2019, 11:55 AM.

Details

Summary

This patch introduces ProfitableSet to cache the results of profitability checks.
If a common subexpression machine instruction (CSMI) has been identified as
profitable before, then this CSMI tend to be profitable later on, unless a machine
instruction (MI) is not profitable for common subexpression elimination.

This fixes pr37277
Compile time went down from 32s to 13s.

Diff Detail

Repository
rL LLVM

Event Timeline

huihuiz created this revision.Feb 19 2019, 11:55 AM
huihuiz abandoned this revision.Sep 25 2019, 1:19 PM

Not a good solution