This is an archive of the discontinued LLVM Phabricator instance.

[TTI][NFC] Introduce option to set predictable branch threshold
ClosedPublic

Authored by aleksandr.popov on Feb 1 2023, 3:35 AM.

Details

Summary

Currently TargetTransformInfo::getPredictableBranchThreshold() method
returns hardcoded value 99. This value affects the decision whether to
convert select instruction to branch or not in several passes:
SelectOptimize, CodeGenPrepare, SimplifyCFG.

It would be useful to make possible to play with that threshold in order
to test select-optimize heuristics.

Option was originally introduced in the TargetLoweringBase, but was
removed in the revision 664d0c052c315 and not restored in the TTI

Diff Detail