forked from OSchip/llvm-project
parent
11a4d8c2f4
commit
e2a3f7014d
|
@ -63,9 +63,9 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// IsFoldableBy - Returns true if the specific operand node N of U can be
|
/// CanBeFoldedBy - Returns true if the specific operand node N of U can be
|
||||||
/// folded during instruction selection?
|
/// folded during instruction selection?
|
||||||
virtual bool IsFoldableBy(SDNode *N, SDNode *U) { return true; }
|
virtual bool CanBeFoldedBy(SDNode *N, SDNode *U) { return true; }
|
||||||
|
|
||||||
/// CreateTargetHazardRecognizer - Return a newly allocated hazard recognizer
|
/// CreateTargetHazardRecognizer - Return a newly allocated hazard recognizer
|
||||||
/// to use for this target when scheduling the DAG.
|
/// to use for this target when scheduling the DAG.
|
||||||
|
|
|
@ -118,7 +118,7 @@ namespace {
|
||||||
|
|
||||||
virtual void EmitFunctionEntryCode(Function &Fn, MachineFunction &MF);
|
virtual void EmitFunctionEntryCode(Function &Fn, MachineFunction &MF);
|
||||||
|
|
||||||
virtual bool IsFoldableBy(SDNode *N, SDNode *U);
|
virtual bool CanBeFoldedBy(SDNode *N, SDNode *U);
|
||||||
|
|
||||||
// Include the pieces autogenerated from the target description.
|
// Include the pieces autogenerated from the target description.
|
||||||
#include "X86GenDAGISel.inc"
|
#include "X86GenDAGISel.inc"
|
||||||
|
@ -232,7 +232,7 @@ namespace {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
bool X86DAGToDAGISel::IsFoldableBy(SDNode *N, SDNode *U) {
|
bool X86DAGToDAGISel::CanBeFoldedBy(SDNode *N, SDNode *U) {
|
||||||
// Is it already folded by SelectAddr / SelectLEAAddr?
|
// Is it already folded by SelectAddr / SelectLEAAddr?
|
||||||
if (isUnfoldable(N))
|
if (isUnfoldable(N))
|
||||||
return false;
|
return false;
|
||||||
|
@ -711,7 +711,7 @@ bool X86DAGToDAGISel::TryFoldLoad(SDOperand P, SDOperand N,
|
||||||
if (N.getOpcode() == ISD::LOAD &&
|
if (N.getOpcode() == ISD::LOAD &&
|
||||||
N.hasOneUse() &&
|
N.hasOneUse() &&
|
||||||
!CodeGenMap.count(N.getValue(0)) &&
|
!CodeGenMap.count(N.getValue(0)) &&
|
||||||
!IsFoldableBy(N.Val, P.Val))
|
!CanBeFoldedBy(N.Val, P.Val))
|
||||||
return SelectAddr(N.getOperand(1), Base, Scale, Index, Disp);
|
return SelectAddr(N.getOperand(1), Base, Scale, Index, Disp);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2276,7 +2276,7 @@ public:
|
||||||
PInfo.hasProperty(SDNodeInfo::SDNPHasChain) ||
|
PInfo.hasProperty(SDNodeInfo::SDNPHasChain) ||
|
||||||
PInfo.hasProperty(SDNodeInfo::SDNPInFlag) ||
|
PInfo.hasProperty(SDNodeInfo::SDNPInFlag) ||
|
||||||
PInfo.hasProperty(SDNodeInfo::SDNPOptInFlag))
|
PInfo.hasProperty(SDNodeInfo::SDNPOptInFlag))
|
||||||
emitCheck("IsFoldableBy(" + RootName + ".Val, " + ParentName +
|
emitCheck("CanBeFoldedBy(" + RootName + ".Val, " + ParentName +
|
||||||
".Val)");
|
".Val)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue