[PATCH] D12947: [SCEV] Introduce ScalarEvolution::getOne and getZero.

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 16:00:25 PDT 2015


sanjoy created this revision.
sanjoy added reviewers: reames, hfinkel, majnemer.
sanjoy added a subscriber: llvm-commits.
Herald added a subscriber: sanjoy.

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.

http://reviews.llvm.org/D12947

Files:
  include/llvm/Analysis/ScalarEvolution.h
  lib/Analysis/DependenceAnalysis.cpp
  lib/Analysis/ScalarEvolution.cpp
  lib/Target/PowerPC/PPCCTRLoops.cpp
  lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
  lib/Transforms/Scalar/IndVarSimplify.cpp
  lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  lib/Transforms/Scalar/LoopRerollPass.cpp
  lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  lib/Transforms/Utils/SimplifyIndVar.cpp
  lib/Transforms/Vectorize/LoopVectorize.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12947.35044.patch
Type: text/x-patch
Size: 19532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150917/1a784973/attachment.bin>


More information about the llvm-commits mailing list