This is an archive of the discontinued LLVM Phabricator instance.

[GISel]: Change how CSE is enabled by default for each pass
ClosedPublic

Authored by aditya_nandakumar on Jan 24 2019, 11:57 AM.

Details

Summary

Now add a hook in TargetPassConfig to query if CSE needs to be enabled. By default this hook returns false only for O0 opt level but this can be overridden by the target.
As a consequence of the default of enabled for non O0, a few tests needed to be updated to not use CSE (by passing in -O0) to the run line.

Diff Detail

Repository
rL LLVM

Event Timeline

arsenm added a subscriber: arsenm.Jan 24 2019, 1:29 PM
arsenm added inline comments.
lib/CodeGen/GlobalISel/IRTranslator.cpp
1712–1716

Ternary operator?

lib/CodeGen/GlobalISel/Legalizer.cpp
164–168

Ditto

aditya_nandakumar added a reviewer: arsenm.

Updated based on feedback.

aditya_nandakumar marked 2 inline comments as done.Jan 24 2019, 1:37 PM
arsenm accepted this revision.Jan 24 2019, 2:03 PM

LGTM

This revision is now accepted and ready to land.Jan 24 2019, 2:03 PM

Thanks. Submitted in r352126.