This is an archive of the discontinued LLVM Phabricator instance.

Refactor: Simplify boolean conditional return statements in llvm/lib/Analysis
ClosedPublic

Authored by LegalizeAdulthood on May 24 2015, 10:53 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

LegalizeAdulthood retitled this revision from to Refactor: Simplify boolean conditional return statements in llvm/lib/Analysis.
LegalizeAdulthood updated this object.
LegalizeAdulthood edited the test plan for this revision. (Show Details)
LegalizeAdulthood added a subscriber: Unknown Object (MLST).
craig.topper added inline comments.
lib/Analysis/CostModel.cpp
155 ↗(On Diff #26393)

Just use == here

lib/Analysis/LoopAccessAnalysis.cpp
149 ↗(On Diff #26393)

Maybe push the negate through and use ORs

lib/Analysis/TargetLibraryInfo.cpp
45 ↗(On Diff #26393)

Push the ! through and use an OR

craig.topper added inline comments.May 25 2015, 2:52 AM
lib/Analysis/CaptureTracking.cpp
80 ↗(On Diff #26393)

Push negate through and indent second line to start after 'return' so it aligns better with the expression part of the first line.

lib/Analysis/InstructionSimplify.cpp
127 ↗(On Diff #26393)

Fix indentation to align with where the expression starts on previous line.

Update from latest.
Update from comments.
I do not have commit access.

sanjoy accepted this revision.Oct 24 2015, 3:06 PM
sanjoy added a reviewer: sanjoy.
sanjoy added a subscriber: sanjoy.

LGTM, should I check this in for you?

How would you like to be credited? I was going to go with "Patch by Richard!", but please let me know if you'd prefer something else.

This revision is now accepted and ready to land.Oct 24 2015, 3:06 PM
alexfh removed a reviewer: alexfh.Nov 5 2015, 11:31 AM
This revision was automatically updated to reflect the committed changes.