summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorIvan Krasin <krasin@chromium.org>2016-09-27 00:29:53 +0000
committerIvan Krasin <krasin@chromium.org>2016-09-27 00:29:53 +0000
commit4ff4f21e15023cbf59f63464d93cdd4ef6fa5478 (patch)
tree21b5bcf7ed942af43009b48fedda2e579cb25c4a /llvm/lib/Transforms
parent53543af0366190c5aabb4404869705795e043621 (diff)
downloadbcm5719-llvm-4ff4f21e15023cbf59f63464d93cdd4ef6fa5478.tar.gz
bcm5719-llvm-4ff4f21e15023cbf59f63464d93cdd4ef6fa5478.zip
Revert r277556. Add -lowertypetests-bitsets-level to control bitsets generation
Summary: We don't currently need this facility for CFI. Disabling individual hot methods proved to be a better strategy in Chrome. Also, the design of the feature is suboptimal, as pointed out by Peter Collingbourne. Reviewers: pcc Subscribers: kcc Differential Revision: https://reviews.llvm.org/D24948 llvm-svn: 282461
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/LowerTypeTests.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
index 374333d33fc..8f9d665ef05 100644
--- a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+++ b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
@@ -48,11 +48,6 @@ static cl::opt<bool> AvoidReuse(
cl::desc("Try to avoid reuse of byte array addresses using aliases"),
cl::Hidden, cl::init(true));
-static cl::opt<unsigned> BitsetsLevel(
- "lowertypetests-bitsets-level",
- cl::desc("Whether to generate bitsets: 0 - never, 1 - only if no loads, 2 - always."),
- cl::Hidden, cl::init(2));
-
bool BitSetInfo::containsGlobalOffset(uint64_t Offset) const {
if (Offset < ByteOffset)
return false;
@@ -490,10 +485,8 @@ Value *LowerTypeTestsModule::lowerBitSetCall(
Constant *BitSizeConst = ConstantInt::get(IntPtrTy, BSI.BitSize);
Value *OffsetInRange = B.CreateICmpULT(BitOffset, BitSizeConst);
- // If the bit set is all ones (or we treat it as such), testing against it
- // is unnecessary.
- if (BSI.isAllOnes() || BitsetsLevel == 0 ||
- (BitsetsLevel == 1 && BSI.BitSize > 64))
+ // If the bit set is all ones, testing against it is unnecessary.
+ if (BSI.isAllOnes())
return OffsetInRange;
TerminatorInst *Term = SplitBlockAndInsertIfThen(OffsetInRange, CI, false);
OpenPOWER on IntegriCloud