This is an archive of the discontinued LLVM Phabricator instance.

add a cl::opt override for TargetLowering's JumpIsExpensive
ClosedPublic

Authored by spatel on Jun 30 2015, 11:37 AM.

Details

Summary

This patch is not intended to change existing codegen behavior for any target. It just exposes the JumpIsExpensive setting on the command-line to allow for easier testing and emergency overrides.

Also, change the existing regression test to use FileCheck, explicitly specify the jump-is-expensive option, and use more precise checks.

Diff Detail

Repository
rL LLVM

Event Timeline

spatel updated this revision to Diff 28801.Jun 30 2015, 11:37 AM
spatel retitled this revision from to add a cl::opt override for TargetLowering's JumpIsExpensive.
spatel updated this object.
spatel edited the test plan for this revision. (Show Details)
spatel added reviewers: hfinkel, chandlerc.
spatel added a subscriber: Unknown Object (MLST).

Seems like for the unit test that it would be better to not be quite so specific. For the JUMPY case, maybe
CHECK-DAG: jl
CHECK-DAG: je
would be better, and a little less fragile because it seems like the ordering of the jumps could be arbitrary.
For the NOJMP case, maybe just check for one set, the or, and then a je or jne?

spatel updated this revision to Diff 28811.Jun 30 2015, 1:44 PM

Thanks, Kevin.
Updated test case to be more flexible.

LGTM on unit test.

Sorry - is that 'LGTM' for the whole patch or just on the test case?

I reviewed both the code and the test. Both are LGTM to me at this point. I simply don't know whether Hal or Chandler would consider me as a qualified code reviewer at this point.

This revision was automatically updated to reflect the committed changes.

Thanks, Kevin. I made the judgement call that you are, in fact, a qualified reviewer. :)
Committed at r241179.