This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Introduce ScalarEvolution::getOne and getZero.
ClosedPublic

Authored by sanjoy on Sep 17 2015, 4:00 PM.

Details

Summary

It is fairly common to call SE->getConstant(Ty, 0) or
SE->getConstant(Ty, 1); this change makes such uses a little bit
briefer.

I've refactored the call sites I could find easily to use getZero /
getOne.

If this were smaller I'd check it in for post commit review, but given
that it's is fairly large, it'd be nice to have some extra eyes look
this over.

I can bootstrap clang with this change.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy updated this revision to Diff 35044.Sep 17 2015, 4:00 PM
sanjoy retitled this revision from to [SCEV] Introduce ScalarEvolution::getOne and getZero..
sanjoy updated this object.
sanjoy added reviewers: reames, hfinkel, majnemer.
sanjoy added a subscriber: llvm-commits.
reames accepted this revision.Sep 22 2015, 4:12 PM
reames edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 22 2015, 4:12 PM
This revision was automatically updated to reflect the committed changes.