aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index 85c6eca..6a08304 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -57,28 +57,6 @@ static bool isUsedOutsideOfDefiningBlock(const Instruction *I) {
return false;
}
-static ISD::NodeType getPreferredExtendForValue(const Value *V) {
- // For the users of the source value being used for compare instruction, if
- // the number of signed predicate is greater than unsigned predicate, we
- // prefer to use SIGN_EXTEND.
- //
- // With this optimization, we would be able to reduce some redundant sign or
- // zero extension instruction, and eventually more machine CSE opportunities
- // can be exposed.
- ISD::NodeType ExtendKind = ISD::ANY_EXTEND;
- unsigned NumOfSigned = 0, NumOfUnsigned = 0;
- for (const User *U : V->users()) {
- if (const auto *CI = dyn_cast<CmpInst>(U)) {
- NumOfSigned += CI->isSigned();
- NumOfUnsigned += CI->isUnsigned();
- }
- }
- if (NumOfSigned > NumOfUnsigned)
- ExtendKind = ISD::SIGN_EXTEND;
-
- return ExtendKind;
-}
-
void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
SelectionDAG *DAG) {
Fn = &fn;
@@ -233,9 +211,6 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
if (isUsedOutsideOfDefiningBlock(&I))
if (!isa<AllocaInst>(I) || !StaticAllocaMap.count(cast<AllocaInst>(&I)))
InitializeRegForValue(&I);
-
- // Decide the preferred extend type for a value.
- PreferredExtendType[&I] = getPreferredExtendForValue(&I);
}
}