forked from OSchip/llvm-project
Move Function Specialization to its correct location. NFC.
As a follow up of rGc4a0969b9c14, and as part of D104102, move it to the IPO transformations directory.
This commit is contained in:
parent
150f7cedfb
commit
9907746f5d
|
@ -15,6 +15,7 @@ add_llvm_component_library(LLVMipo
|
|||
ForceFunctionAttrs.cpp
|
||||
FunctionAttrs.cpp
|
||||
FunctionImport.cpp
|
||||
FunctionSpecialization.cpp
|
||||
GlobalDCE.cpp
|
||||
GlobalOpt.cpp
|
||||
GlobalSplit.cpp
|
||||
|
|
|
@ -247,7 +247,7 @@ private:
|
|||
|
||||
// Otherwise, set the specialization cost to be the cost of all the
|
||||
// instructions in the function and penalty for specializing more functions.
|
||||
unsigned Penalty = (NumFuncSpecialized + 1);
|
||||
unsigned Penalty = NumFuncSpecialized + 1;
|
||||
return Metrics.NumInsts * InlineConstants::InstrCost * Penalty;
|
||||
}
|
||||
|
||||
|
@ -506,7 +506,6 @@ private:
|
|||
CallSitesToRewrite.push_back(&CS);
|
||||
}
|
||||
for (auto *CS : CallSitesToRewrite) {
|
||||
|
||||
if ((CS->getFunction() == Clone && CS->getArgOperand(ArgNo) == &Arg) ||
|
||||
CS->getArgOperand(ArgNo) == C) {
|
||||
CS->setCalledFunction(Clone);
|
|
@ -13,7 +13,6 @@ add_llvm_component_library(LLVMScalarOpts
|
|||
EarlyCSE.cpp
|
||||
FlattenCFGPass.cpp
|
||||
Float2Int.cpp
|
||||
FunctionSpecialization.cpp
|
||||
GuardWidening.cpp
|
||||
GVN.cpp
|
||||
GVNHoist.cpp
|
||||
|
|
Loading…
Reference in New Issue