Page MenuHomePhabricator

[NewPM] Run non-trivial loop unswitching under -O2/3/s/z

Authored by aeubanks on Mon, Jan 11, 1:52 PM.

Diff Detail

Event Timeline

aeubanks created this revision.Mon, Jan 11, 1:52 PM
aeubanks requested review of this revision.Mon, Jan 11, 1:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptMon, Jan 11, 1:52 PM
aeubanks updated this revision to Diff 315929.Mon, Jan 11, 1:53 PM

parameter comment

davide removed a reviewer: davide.Mon, Jan 11, 1:59 PM
asbirlea accepted this revision.Mon, Jan 11, 2:28 PM


This revision is now accepted and ready to land.Mon, Jan 11, 2:28 PM
This revision was automatically updated to reflect the committed changes.

I took a closer look at what the legacy unswitch pass does in regards to -O2/3/s/z, and it skips non-trivial unswitching for anything other than -O3. So in the -O3 case I think the increased compile time and code size is expected. But the other cases should be fixed, I'll do that.
(weird that sqlite3 is an outlier and compiles 11% faster with this change though)

(also it would be nice to have -O1/2/s/z runs on llvm-compile-time-tracker, but of course you can only test so many configurations)

I'm curious if the compile time impact is complemented by impact in run time. Looking into that for O3.