This is an archive of the discontinued LLVM Phabricator instance.

[IRCE] consolidate profitability check
ClosedPublic

Authored by skatkov on Oct 20 2020, 2:05 AM.

Details

Summary

Use BFI if it is available and BPI otherwise.
This is a promised follow-up after D89541.

Diff Detail

Event Timeline

skatkov created this revision.Oct 20 2020, 2:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 20 2020, 2:05 AM
skatkov requested review of this revision.Oct 20 2020, 2:05 AM
ebrevnov accepted this revision.Oct 20 2020, 2:40 AM

LGTM with a nit.

llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
1929

IMHO, it would be a bit cleaner API if we pass 'LS' and retrieve required info from it inside checkProfitability.

This revision is now accepted and ready to land.Oct 20 2020, 2:40 AM
lebedev.ri added inline comments.
llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
246–248

Passing-by nit: the comment suggests the method should be called isProfitableToTransform() or something

skatkov updated this revision to Diff 299323.Oct 20 2020, 3:31 AM
skatkov edited the summary of this revision. (Show Details)

Please take a look.

jonpa added a subscriber: jonpa.Oct 21 2020, 4:37 AM

This is a promised follow-up after D89451.

Is this a typo?

lebedev.ri added inline comments.Oct 21 2020, 4:42 AM
llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
246–248

(please don't wait for me here)

skatkov edited the summary of this revision. (Show Details)Oct 21 2020, 7:53 PM

This is a promised follow-up after D89451.

Is this a typo?

Thank you, it is.

This revision was automatically updated to reflect the committed changes.