unsigned OpNo = 0;
bool NodeHasChain = N->NodeHasProperty(SDNPHasChain, CGP);
bool HasChain = N->TreeHasProperty(SDNPHasChain, CGP);
- bool EmittedUseCheck = false;
if (HasChain) {
if (NodeHasChain)
OpNo = 1;
std::string ParentName(RootName.begin(), RootName.end()-1);
emitCheck("IsProfitableToFold(" + getValueName(RootName) +
", " + getNodeName(ParentName) + ", N)");
- EmittedUseCheck = true;
if (NodeHasChain) {
// If the immediate use can somehow reach this node through another
// path, then can't fold it either or it will create a cycle.
}
}
- // FIXME: Handle EmittedUseCheck & Flags & .hasOneUse()
-
for (unsigned i = 0, e = N->getNumChildren(); i != e; ++i, ++OpNo) {
// Get the code suitable for matching this child. Move to the child, check
// it then move back to the parent.