[PATCH] D32108: [APInt] Rename getSignBit to getSignMask
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 14 23:35:30 PDT 2017
craig.topper created this revision.
Herald added a subscriber: mzolotukhin.
getSignBit is a static function that creates an APInt with only the sign bit set. getSignMask seems like a better name to convey its functionality. In fact several places use it and then store in an APInt named SignMask.
I would like to use the getSignBit name as a method that returns the sign bit of an APInt providing the same information as isNegative(). This would be used in places in ValueTracking that currently use KnownZero.isNegative(). KnownZero and negative in the same statement is somewhat confusing as KnownZero.isNegative() mean that the sign bit is known to be 0 meaning the value being tracked is non-negative.
So rather than having two very different getSignBit methods/functions, I'd like to rename the static one first.
https://reviews.llvm.org/D32108
Files:
include/llvm/ADT/APInt.h
include/llvm/IR/PatternMatch.h
lib/Analysis/InstructionSimplify.cpp
lib/Analysis/ScalarEvolution.cpp
lib/Analysis/ValueTracking.cpp
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Transforms/InstCombine/InstCombineAddSub.cpp
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
lib/Transforms/InstCombine/InstCombineCompares.cpp
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
lib/Transforms/InstCombine/InstCombineSelect.cpp
lib/Transforms/InstCombine/InstCombineShifts.cpp
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
lib/Transforms/Utils/CmpInstAnalysis.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32108.95373.patch
Type: text/x-patch
Size: 32906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170415/c5fc86c7/attachment.bin>
More information about the llvm-commits
mailing list