This is an archive of the discontinued LLVM Phabricator instance.

[DependenceAnalysis] Refactor uses of getConstantPart. NFC.
ClosedPublic

Authored by bcahoon on Apr 18 2016, 3:11 PM.

Details

Summary

Rather than checking for the SCEV type prior to calling getContantPart, perform the checks in the function. This reduces the number of places where the checks have been added.

This was a suggestion made during the review for http://reviews.llvm.org/D18718

Diff Detail

Repository
rL LLVM

Event Timeline

bcahoon updated this revision to Diff 54122.Apr 18 2016, 3:11 PM
bcahoon retitled this revision from to [DependenceAnalysis] Refactor uses of getConstantPart. NFC..
bcahoon updated this object.
bcahoon added reviewers: sanjoy, llvm-commits.
sanjoy accepted this revision.Apr 18 2016, 3:36 PM
sanjoy edited edge metadata.

lgtm with comments inline

lib/Analysis/DependenceAnalysis.cpp
2260 ↗(On Diff #54122)

Use auto * here and below.

2263 ↗(On Diff #54122)

Can you just check the first operand? Operands should be ordered by complexity, so if there is a SCEVConstant operand it should come first.

This revision is now accepted and ready to land.Apr 18 2016, 3:36 PM
This revision was automatically updated to reflect the committed changes.