Page MenuHomePhabricator

Refactor: Simplify boolean conditional return statements in lib/Target/NVPTX
ClosedPublic

Authored by LegalizeAdulthood on May 25 2015, 1:30 AM.

Diff Detail

Event Timeline

LegalizeAdulthood retitled this revision from to Refactor: Simplify boolean conditional return statements in lib/Target/NVPTX.
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.May 25 2015, 2:44 AM
lib/Target/NVPTX/NVPTXAsmPrinter.cpp
638

Use !=

1919–1920

Fix indentation to line up with previous line.

lib/Target/NVPTX/NVPTXISelLowering.cpp
3740

Push negate through

4105–4106

Drop the else and the curly braces

lib/Target/NVPTX/NVPTXUtilities.cpp
338–339

Indent to line up with previous line. Same below

lib/Target/NVPTX/NVPTXAsmPrinter.cpp
638

Fixed.

1919–1920

Fixed.

lib/Target/NVPTX/NVPTXISelLowering.cpp
3740

Fixed.

4105–4106

While I know this is an LLVM/clang style rule, it's beyond the scope of this change. There is a check for this in clang-tidy to detect it.

lib/Target/NVPTX/NVPTXUtilities.cpp
338–339

Fixed.

Update from comments, clang-format

jingyue accepted this revision.Jun 1 2015, 2:26 PM
jingyue edited edge metadata.

other than that LGTM. Pretty useful tool! Thanks.

lib/Target/NVPTX/NVPTXUtilities.cpp
348
return (id == Intrinsics::xxx) ||
       (id == Intrinsics::yyy) ||

makes the code more aligned.

This revision is now accepted and ready to land.Jun 1 2015, 2:26 PM
jholewinski accepted this revision.Jun 8 2015, 3:45 PM
jholewinski edited edge metadata.

LGTM

jingyue closed this revision.Jul 30 2015, 10:10 PM