[llvm] r259625 - LowerBitSets: Don't bother to do any work if the llvm.bitset.test intrinsic is unused.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 19:48:47 PST 2016
Author: pcc
Date: Tue Feb 2 21:48:46 2016
New Revision: 259625
URL: http://llvm.org/viewvc/llvm-project?rev=259625&view=rev
Log:
LowerBitSets: Don't bother to do any work if the llvm.bitset.test intrinsic is unused.
Modified:
llvm/trunk/lib/Transforms/IPO/LowerBitSets.cpp
Modified: llvm/trunk/lib/Transforms/IPO/LowerBitSets.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/LowerBitSets.cpp?rev=259625&r1=259624&r2=259625&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/LowerBitSets.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/LowerBitSets.cpp Tue Feb 2 21:48:46 2016
@@ -920,7 +920,7 @@ void LowerBitSets::buildBitSetsFromDisjo
bool LowerBitSets::buildBitSets() {
Function *BitSetTestFunc =
M->getFunction(Intrinsic::getName(Intrinsic::bitset_test));
- if (!BitSetTestFunc)
+ if (!BitSetTestFunc || BitSetTestFunc->use_empty())
return false;
// Equivalence class set containing bitsets and the globals they reference.
More information about the llvm-commits
mailing list