[llvm-commits] CVS: llvm/utils/TableGen/CodeGenTarget.cpp InstrInfoEmitter.cpp
Evan Cheng
evan.cheng at apple.com
Sat Nov 4 01:40:38 PST 2006
Changes in directory llvm/utils/TableGen:
CodeGenTarget.cpp updated: 1.72 -> 1.73
InstrInfoEmitter.cpp updated: 1.46 -> 1.47
---
Log message:
Clean up some code.
---
Diffs of the changes: (+5 -2)
CodeGenTarget.cpp | 4 +++-
InstrInfoEmitter.cpp | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
Index: llvm/utils/TableGen/CodeGenTarget.cpp
diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.72 llvm/utils/TableGen/CodeGenTarget.cpp:1.73
--- llvm/utils/TableGen/CodeGenTarget.cpp:1.72 Fri Nov 3 17:45:17 2006
+++ llvm/utils/TableGen/CodeGenTarget.cpp Sat Nov 4 03:40:23 2006
@@ -19,6 +19,7 @@
#include "Record.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Target/TargetInstrInfo.h"
#include <set>
#include <algorithm>
using namespace llvm;
@@ -294,7 +295,8 @@
unsigned TIdx = I->getOperandNamed(Name);
if (TIdx >= FIdx)
throw "Illegal tied-to operand constraint '" + CStr + "'";
- return std::make_pair(FIdx, (TIdx << 16) | 1);
+ return std::make_pair(FIdx, (TIdx << 16) |
+ (1 << (unsigned)TargetInstrInfo::TIED_TO));
}
static std::vector<unsigned> parseConstraints(const std::string &CStr,
Index: llvm/utils/TableGen/InstrInfoEmitter.cpp
diff -u llvm/utils/TableGen/InstrInfoEmitter.cpp:1.46 llvm/utils/TableGen/InstrInfoEmitter.cpp:1.47
--- llvm/utils/TableGen/InstrInfoEmitter.cpp:1.46 Tue Oct 31 18:27:05 2006
+++ llvm/utils/TableGen/InstrInfoEmitter.cpp Sat Nov 4 03:40:23 2006
@@ -14,6 +14,7 @@
#include "InstrInfoEmitter.h"
#include "CodeGenTarget.h"
+#include "llvm/Target/TargetInstrInfo.h"
#include "Record.h"
#include <algorithm>
using namespace llvm;
@@ -89,7 +90,7 @@
// For backward compatibility: isTwoAddress means operand 1 is tied to
// operand 0.
if (Inst.isTwoAddress)
- Result[1].second |= 1;
+ Result[1].second |= (0 << 16) | (1 << (unsigned)TargetInstrInfo::TIED_TO);
return Result;
}
More information about the llvm-commits
mailing list