From fc4ad7de66088ae23397198a777976f18e3ddec4 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 3 Apr 2008 00:02:49 +0000 Subject: 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 --- llvm/utils/TableGen/CodeGenTarget.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp') 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 llvm::LoadIntrinsics(const RecordKeeper &RC) { std::vector 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; -- cgit v1.2.3