diff options
author | Dan Gohman <gohman@apple.com> | 2008-04-03 00:02:49 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-04-03 00:02:49 +0000 |
commit | fc4ad7de66088ae23397198a777976f18e3ddec4 (patch) | |
tree | 869534dd4327590e18ab16c290eb746b29ec2d84 /llvm/utils/TableGen/CodeGenTarget.cpp | |
parent | bd72cea737bbb1b3de5d869db007d46dd82d59d6 (diff) | |
download | bcm5719-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.cpp | 12 |
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; |