summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-04-03 00:02:49 +0000
committerDan Gohman <gohman@apple.com>2008-04-03 00:02:49 +0000
commitfc4ad7de66088ae23397198a777976f18e3ddec4 (patch)
tree869534dd4327590e18ab16c290eb746b29ec2d84 /llvm/utils/TableGen/CodeGenTarget.cpp
parentbd72cea737bbb1b3de5d869db007d46dd82d59d6 (diff)
downloadbcm5719-llvm-fc4ad7de66088ae23397198a777976f18e3ddec4.tar.gz
bcm5719-llvm-fc4ad7de66088ae23397198a777976f18e3ddec4.zip
Move instruction flag inference out of InstrInfoEmitter and into
CodeGenDAGPatterns, where it can be used in other tablegen backends. This allows the inference to be done for DAGISelEmitter so that it gets accurate mayLoad/mayStore/isSimpleLoad flags. This brings MemOperand functionality back to where it was before 48329. However, it doesn't solve the problem of anonymous patterns which expand to code that does loads or stores. llvm-svn: 49123
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenTarget.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp
index da34ebf38e5..78d39ee06fc 100644
--- a/llvm/utils/TableGen/CodeGenTarget.cpp
+++ b/llvm/utils/TableGen/CodeGenTarget.cpp
@@ -394,20 +394,12 @@ std::vector<CodeGenIntrinsic> llvm::LoadIntrinsics(const RecordKeeper &RC) {
std::vector<CodeGenIntrinsic> Result;
- // If we are in the context of a target .td file, get the target info so that
- // we can decode the current intptr_t.
- CodeGenTarget *CGT = 0;
- if (Records.getClass("Target") &&
- Records.getAllDerivedDefinitions("Target").size() == 1)
- CGT = new CodeGenTarget();
-
for (unsigned i = 0, e = I.size(); i != e; ++i)
- Result.push_back(CodeGenIntrinsic(I[i], CGT));
- delete CGT;
+ Result.push_back(CodeGenIntrinsic(I[i]));
return Result;
}
-CodeGenIntrinsic::CodeGenIntrinsic(Record *R, CodeGenTarget *CGT) {
+CodeGenIntrinsic::CodeGenIntrinsic(Record *R) {
TheDef = R;
std::string DefName = R->getName();
ModRef = WriteMem;
OpenPOWER on IntegriCloud