mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 00:14:20 +00:00
Let each target specific isel provide routine to check if a chain producing node is foldable by another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29335 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
55b5053b8e
commit
b2c121ac14
@ -63,6 +63,10 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
/// IsFoldableBy - Returns true if the specific operand node N of U can be
|
||||
/// folded during instruction selection?
|
||||
virtual bool IsFoldableBy(SDNode *N, SDNode *U) { return true; }
|
||||
|
||||
/// CreateTargetHazardRecognizer - Return a newly allocated hazard recognizer
|
||||
/// to use for this target when scheduling the DAG.
|
||||
virtual HazardRecognizer *CreateTargetHazardRecognizer();
|
||||
|
@ -2280,14 +2280,8 @@ public:
|
||||
PInfo.hasProperty(SDNodeInfo::SDNPHasChain) ||
|
||||
PInfo.hasProperty(SDNodeInfo::SDNPInFlag) ||
|
||||
PInfo.hasProperty(SDNodeInfo::SDNPOptInFlag))
|
||||
if (PInfo.getNumOperands() > 1) {
|
||||
emitCheck("!isNonImmUse(" + ParentName + ".Val, " + RootName +
|
||||
".Val)");
|
||||
} else {
|
||||
emitCheck("(" + ParentName + ".getNumOperands() == 1 || !" +
|
||||
"isNonImmUse(" + ParentName + ".Val, " + RootName +
|
||||
".Val))");
|
||||
}
|
||||
emitCheck("IsFoldableBy(" + RootName + ".Val, " + ParentName +
|
||||
".Val)");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user