summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-06-01 23:27:20 +0000
committerDale Johannesen <dalej@apple.com>2009-06-01 23:27:20 +0000
commit0b8ca7925332a54c5353ea9313d8c3bd8e0ed420 (patch)
tree948695f62fd56210be84a6451a56c898c660674d /llvm/utils/TableGen/CodeGenDAGPatterns.cpp
parentff10450680222a2178385cc8d3e2593bfdeb7b7c (diff)
downloadbcm5719-llvm-0b8ca7925332a54c5353ea9313d8c3bd8e0ed420.tar.gz
bcm5719-llvm-0b8ca7925332a54c5353ea9313d8c3bd8e0ed420.zip
Make the implicit inputs and outputs of target-independent
ADDC/ADDE use MVT::i1 (later, whatever it gets legalized to) instead of MVT::Flag. Remove CARRY_FALSE in favor of 0; adjust all target-independent code to use this format. Most targets will still produce a Flag-setting target-dependent version when selection is done. X86 is converted to use i32 instead, which means TableGen needs to produce different code in xxxGenDAGISel.inc. This keys off the new supportsHasI1 bit in xxxInstrInfo, currently set only for X86; in principle this is temporary and should go away when all other targets have been converted. All relevant X86 instruction patterns are modified to represent setting and using EFLAGS explicitly. The same can be done on other targets. The immediate behavior change is that an ADC/ADD pair are no longer tightly coupled in the X86 scheduler; they can be separated by instructions that don't clobber the flags (MOV). I will soon add some peephole optimizations based on using other instructions that set the flags to feed into ADC. llvm-svn: 72707
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
index db76dabb537..a03224cdd5a 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -399,9 +399,13 @@ SDNodeInfo::SDNodeInfo(Record *R) : Def(R) {
} else if (PropList[i]->getName() == "SDNPHasChain") {
Properties |= 1 << SDNPHasChain;
} else if (PropList[i]->getName() == "SDNPOutFlag") {
- Properties |= 1 << SDNPOutFlag;
+ Properties |= 1 << SDNPOutFlag;
+ assert(!(Properties & (1<<SDNPOutI1)) &&
+ "Can't handle OutFlag and OutI1");
} else if (PropList[i]->getName() == "SDNPInFlag") {
Properties |= 1 << SDNPInFlag;
+ assert(!(Properties & (1<<SDNPInI1)) &&
+ "Can't handle InFlag and InI1");
} else if (PropList[i]->getName() == "SDNPOptInFlag") {
Properties |= 1 << SDNPOptInFlag;
} else if (PropList[i]->getName() == "SDNPMayStore") {
@@ -412,6 +416,14 @@ SDNodeInfo::SDNodeInfo(Record *R) : Def(R) {
Properties |= 1 << SDNPSideEffect;
} else if (PropList[i]->getName() == "SDNPMemOperand") {
Properties |= 1 << SDNPMemOperand;
+ } else if (PropList[i]->getName() == "SDNPInI1") {
+ Properties |= 1 << SDNPInI1;
+ assert(!(Properties & (1<<SDNPInFlag)) &&
+ "Can't handle InFlag and InI1");
+ } else if (PropList[i]->getName() == "SDNPOutI1") {
+ Properties |= 1 << SDNPOutI1;
+ assert(!(Properties & (1<<SDNPOutFlag)) &&
+ "Can't handle OutFlag and OutI1");
} else {
cerr << "Unknown SD Node property '" << PropList[i]->getName()
<< "' on node '" << R->getName() << "'!\n";
OpenPOWER on IntegriCloud