[PATCH] D22830: IR: Remove Value::intersectOptionalDataWith, replace all calls with calls to Instruction::andIRFlags. NFCI.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 7 16:47:38 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL280884: IR: Remove Value::intersectOptionalDataWith, replace all calls with calls to… (authored by pcc).
Changed prior to commit:
https://reviews.llvm.org/D22830?vs=65577&id=70623#toc
Repository:
rL LLVM
https://reviews.llvm.org/D22830
Files:
llvm/trunk/include/llvm/IR/Value.h
llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp
llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
Index: llvm/trunk/include/llvm/IR/Value.h
===================================================================
--- llvm/trunk/include/llvm/IR/Value.h
+++ llvm/trunk/include/llvm/IR/Value.h
@@ -442,11 +442,6 @@
return SubclassOptionalData == V->SubclassOptionalData;
}
- /// \brief Clear any optional flags not set in the given Value.
- void intersectOptionalDataWith(const Value *V) {
- SubclassOptionalData &= V->SubclassOptionalData;
- }
-
/// \brief Return true if there is a value handle associated with this value.
bool hasValueHandle() const { return HasValueHandle; }
Index: llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
+++ llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
@@ -260,7 +260,7 @@
assert(HoistCand->getParent() != BB);
// Intersect optional metadata.
- HoistCand->intersectOptionalDataWith(ElseInst);
+ HoistCand->andIRFlags(ElseInst);
HoistCand->dropUnknownNonDebugMetadata();
// Prepend point for instruction insert
@@ -434,7 +434,7 @@
// Hoist the instruction.
BasicBlock::iterator InsertPt = BB->getFirstInsertionPt();
// Intersect optional metadata.
- S0->intersectOptionalDataWith(S1);
+ S0->andIRFlags(S1);
S0->dropUnknownNonDebugMetadata();
// Create the new store to be inserted at the join point.
Index: llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp
+++ llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp
@@ -696,7 +696,7 @@
else
OtherGep = cast<GetElementPtrInst>(
cast<StoreInst>(OtherInst)->getPointerOperand());
- ClonedGep->intersectOptionalDataWith(OtherGep);
+ ClonedGep->andIRFlags(OtherGep);
}
// Replace uses of Gep with ClonedGep in Repl.
@@ -843,7 +843,7 @@
MSSA->removeMemoryAccess(OldMA);
}
- Repl->intersectOptionalDataWith(I);
+ Repl->andIRFlags(I);
combineKnownMetadata(Repl, I);
I->replaceAllUsesWith(Repl);
// Also invalidate the Alias Analysis cache.
Index: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1230,7 +1230,7 @@
BIParent->getInstList().splice(BI->getIterator(), BB1->getInstList(), I1);
if (!I2->use_empty())
I2->replaceAllUsesWith(I1);
- I1->intersectOptionalDataWith(I2);
+ I1->andIRFlags(I2);
unsigned KnownIDs[] = {LLVMContext::MD_tbaa,
LLVMContext::MD_range,
LLVMContext::MD_fpmath,
Index: llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
+++ llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
@@ -3148,7 +3148,7 @@
LLVMContext::MD_noalias, LLVMContext::MD_fpmath,
LLVMContext::MD_invariant_group};
combineMetadata(K, H, KnownIDs);
- K->intersectOptionalDataWith(H);
+ K->andIRFlags(H);
for (unsigned o = 0; o < NumOperands; ++o)
K->setOperand(o, ReplacedOperands[o]);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22830.70623.patch
Type: text/x-patch
Size: 3488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160907/dd267246/attachment.bin>
More information about the llvm-commits
mailing list