[llvm] r289987 - Inline stripInvariantGroupMetadata out of existence
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 16 12:29:40 PST 2016
Author: sanjoy
Date: Fri Dec 16 14:29:39 2016
New Revision: 289987
URL: http://llvm.org/viewvc/llvm-project?rev=289987&view=rev
Log:
Inline stripInvariantGroupMetadata out of existence
As a one liner function, I don't think it is pulling its weight in terms
of helping readability.
Modified:
llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp?rev=289987&r1=289986&r2=289987&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp Fri Dec 16 14:29:39 2016
@@ -206,7 +206,6 @@ class TypePromotionTransaction;
unsigned CreatedInstCost);
bool splitBranchCondition(Function &F);
bool simplifyOffsetableRelocate(Instruction &I);
- void stripInvariantGroupMetadata(Instruction &I);
};
}
@@ -5316,7 +5315,7 @@ bool CodeGenPrepare::optimizeInst(Instru
return OptimizeCmpExpression(CI, TLI);
if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
- stripInvariantGroupMetadata(*LI);
+ LI->setMetadata(LLVMContext::MD_invariant_group, nullptr);
if (TLI) {
bool Modified = optimizeLoadExt(LI);
unsigned AS = LI->getPointerAddressSpace();
@@ -5327,7 +5326,7 @@ bool CodeGenPrepare::optimizeInst(Instru
}
if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
- stripInvariantGroupMetadata(*SI);
+ SI->setMetadata(LLVMContext::MD_invariant_group, nullptr);
if (TLI) {
unsigned AS = SI->getPointerAddressSpace();
return optimizeMemoryInst(I, SI->getOperand(1),
@@ -5733,7 +5732,3 @@ bool CodeGenPrepare::splitBranchConditio
}
return MadeChange;
}
-
-void CodeGenPrepare::stripInvariantGroupMetadata(Instruction &I) {
- I.setMetadata(LLVMContext::MD_invariant_group, nullptr);
-}
More information about the llvm-commits
mailing list