summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-01 05:14:45 +0000
committerChris Lattner <sabre@nondot.org>2010-04-01 05:14:45 +0000
commit8eff0157b24c4557adbfe1e584539ea78ab04035 (patch)
treeaa9495ab24add7eb23915939772a038a971b89b5 /llvm/lib/AsmParser/LLParser.h
parent615924989147ea082c9a74537b34cf5dc89249df (diff)
downloadbcm5719-llvm-8eff0157b24c4557adbfe1e584539ea78ab04035.tar.gz
bcm5719-llvm-8eff0157b24c4557adbfe1e584539ea78ab04035.zip
rewrite handling of forward ref'd instruction metadata
to used deferred resolution instead of creating a temporary node + rauw. There is no reason to create the temporary mdnode, then do rauw, then destroy it. llvm-svn: 100086
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.h')
-rw-r--r--llvm/lib/AsmParser/LLParser.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h
index 85cd0866066..0610fc8bbd5 100644
--- a/llvm/lib/AsmParser/LLParser.h
+++ b/llvm/lib/AsmParser/LLParser.h
@@ -76,6 +76,14 @@ namespace llvm {
LLVMContext& Context;
LLLexer Lex;
Module *M;
+
+ // Instruction metadata resolution. Each instruction can have a list of
+ // MDRef info associated with them.
+ struct MDRef {
+ SMLoc Loc;
+ unsigned MDKind, MDSlot;
+ };
+ DenseMap<Instruction*, std::vector<MDRef> > ForwardRefInstMetadata;
// Type resolution handling data structures.
std::map<std::string, std::pair<PATypeHolder, LocTy> > ForwardRefTypes;
@@ -203,6 +211,7 @@ namespace llvm {
bool ParseNamedMetadata();
bool ParseMDString(MDString *&Result);
bool ParseMDNodeID(MDNode *&Result);
+ bool ParseMDNodeID(MDNode *&Result, unsigned &SlotNo);
// Type Parsing.
bool ParseType(PATypeHolder &Result, bool AllowVoid = false);
OpenPOWER on IntegriCloud