[llvm-commits] [llvm] r37900 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
Evan Cheng
evan.cheng at apple.com
Thu Jul 5 00:19:46 PDT 2007
Author: evancheng
Date: Thu Jul 5 02:19:45 2007
New Revision: 37900
URL: http://llvm.org/viewvc/llvm-project?rev=37900&view=rev
Log:
Teach DAGISelEmitter about zero_reg.
Modified:
llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=37900&r1=37899&r2=37900&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Thu Jul 5 02:19:45 2007
@@ -622,7 +622,8 @@
} else if (R->getName() == "ptr_rc") {
Other[0] = MVT::iPTR;
return Other;
- } else if (R->getName() == "node" || R->getName() == "srcvalue") {
+ } else if (R->getName() == "node" || R->getName() == "srcvalue" ||
+ R->getName() == "zero_reg") {
// Placeholder.
return Unknown;
}
@@ -2711,6 +2712,12 @@
getEnumName(N->getTypeNum(0)) + ");");
NodeOps.push_back("Tmp" + utostr(ResNo));
return NodeOps;
+ } else if (DI->getDef()->getName() == "zero_reg") {
+ emitCode("SDOperand Tmp" + utostr(ResNo) +
+ " = CurDAG->getRegister(0, " +
+ getEnumName(N->getTypeNum(0)) + ");");
+ NodeOps.push_back("Tmp" + utostr(ResNo));
+ return NodeOps;
}
} else if (IntInit *II = dynamic_cast<IntInit*>(N->getLeafValue())) {
unsigned ResNo = TmpNo++;
More information about the llvm-commits
mailing list