Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 1 | //===-- LLParser.h - Parser Class -------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file defines the parser class for .ll files. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_ASMPARSER_LLPARSER_H |
| 15 | #define LLVM_ASMPARSER_LLPARSER_H |
| 16 | |
| 17 | #include "LLLexer.h" |
Owen Anderson | fba933c | 2009-07-01 23:57:11 +0000 | [diff] [blame] | 18 | #include "llvm/Module.h" |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 19 | #include "llvm/Type.h" |
| 20 | #include <map> |
| 21 | |
| 22 | namespace llvm { |
| 23 | class Module; |
| 24 | class OpaqueType; |
| 25 | class Function; |
| 26 | class Value; |
| 27 | class BasicBlock; |
| 28 | class Instruction; |
| 29 | class Constant; |
| 30 | class GlobalValue; |
Devang Patel | e54abc9 | 2009-07-22 17:43:22 +0000 | [diff] [blame] | 31 | class MetadataBase; |
Nick Lewycky | 21cc446 | 2009-04-04 07:22:01 +0000 | [diff] [blame] | 32 | class MDString; |
| 33 | class MDNode; |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 34 | struct ValID; |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 35 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 36 | class LLParser { |
| 37 | public: |
| 38 | typedef LLLexer::LocTy LocTy; |
| 39 | private: |
Owen Anderson | fba933c | 2009-07-01 23:57:11 +0000 | [diff] [blame] | 40 | LLVMContext& Context; |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 41 | LLLexer Lex; |
| 42 | Module *M; |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 43 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 44 | // Type resolution handling data structures. |
| 45 | std::map<std::string, std::pair<PATypeHolder, LocTy> > ForwardRefTypes; |
| 46 | std::map<unsigned, std::pair<PATypeHolder, LocTy> > ForwardRefTypeIDs; |
| 47 | std::vector<PATypeHolder> NumberedTypes; |
Devang Patel | 923078c | 2009-07-01 19:21:12 +0000 | [diff] [blame] | 48 | /// MetadataCache - This map keeps track of parsed metadata constants. |
Devang Patel | 104cf9e | 2009-07-23 01:07:34 +0000 | [diff] [blame] | 49 | std::map<unsigned, MetadataBase *> MetadataCache; |
| 50 | std::map<unsigned, std::pair<MetadataBase *, LocTy> > ForwardRefMDNodes; |
Devang Patel | 1c7eea6 | 2009-07-08 19:23:54 +0000 | [diff] [blame] | 51 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 52 | struct UpRefRecord { |
| 53 | /// Loc - This is the location of the upref. |
| 54 | LocTy Loc; |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 55 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 56 | /// NestingLevel - The number of nesting levels that need to be popped |
| 57 | /// before this type is resolved. |
| 58 | unsigned NestingLevel; |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 59 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 60 | /// LastContainedTy - This is the type at the current binding level for |
| 61 | /// the type. Every time we reduce the nesting level, this gets updated. |
| 62 | const Type *LastContainedTy; |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 63 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 64 | /// UpRefTy - This is the actual opaque type that the upreference is |
| 65 | /// represented with. |
| 66 | OpaqueType *UpRefTy; |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 67 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 68 | UpRefRecord(LocTy L, unsigned NL, OpaqueType *URTy) |
| 69 | : Loc(L), NestingLevel(NL), LastContainedTy((Type*)URTy), |
| 70 | UpRefTy(URTy) {} |
| 71 | }; |
| 72 | std::vector<UpRefRecord> UpRefs; |
| 73 | |
| 74 | // Global Value reference information. |
| 75 | std::map<std::string, std::pair<GlobalValue*, LocTy> > ForwardRefVals; |
| 76 | std::map<unsigned, std::pair<GlobalValue*, LocTy> > ForwardRefValIDs; |
| 77 | std::vector<GlobalValue*> NumberedVals; |
| 78 | public: |
Chris Lattner | eeb4a84 | 2009-07-02 23:08:13 +0000 | [diff] [blame] | 79 | LLParser(MemoryBuffer *F, SourceMgr &SM, SMDiagnostic &Err, Module *m) : |
Owen Anderson | ff6c91e | 2009-07-07 18:44:11 +0000 | [diff] [blame] | 80 | Context(m->getContext()), Lex(F, SM, Err, m->getContext()), M(m) {} |
Chris Lattner | ad7d1e2 | 2009-01-04 20:44:11 +0000 | [diff] [blame] | 81 | bool Run(); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 82 | |
Owen Anderson | b43eae7 | 2009-07-02 17:04:01 +0000 | [diff] [blame] | 83 | LLVMContext& getContext() { return Context; } |
| 84 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 85 | private: |
| 86 | |
| 87 | bool Error(LocTy L, const std::string &Msg) const { |
| 88 | return Lex.Error(L, Msg); |
| 89 | } |
| 90 | bool TokError(const std::string &Msg) const { |
| 91 | return Error(Lex.getLoc(), Msg); |
| 92 | } |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 93 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 94 | /// GetGlobalVal - Get a value with the specified name or ID, creating a |
| 95 | /// forward reference record if needed. This can return null if the value |
| 96 | /// exists but does not have the right type. |
| 97 | GlobalValue *GetGlobalVal(const std::string &N, const Type *Ty, LocTy Loc); |
| 98 | GlobalValue *GetGlobalVal(unsigned ID, const Type *Ty, LocTy Loc); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 99 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 100 | // Helper Routines. |
| 101 | bool ParseToken(lltok::Kind T, const char *ErrMsg); |
Chris Lattner | 3ed88ef | 2009-01-02 08:05:26 +0000 | [diff] [blame] | 102 | bool EatIfPresent(lltok::Kind T) { |
| 103 | if (Lex.getKind() != T) return false; |
| 104 | Lex.Lex(); |
| 105 | return true; |
| 106 | } |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 107 | bool ParseOptionalToken(lltok::Kind T, bool &Present) { |
| 108 | if (Lex.getKind() != T) { |
| 109 | Present = false; |
| 110 | } else { |
| 111 | Lex.Lex(); |
| 112 | Present = true; |
| 113 | } |
| 114 | return false; |
| 115 | } |
Chris Lattner | 3ed88ef | 2009-01-02 08:05:26 +0000 | [diff] [blame] | 116 | bool ParseStringConstant(std::string &Result); |
| 117 | bool ParseUInt32(unsigned &Val); |
| 118 | bool ParseUInt32(unsigned &Val, LocTy &Loc) { |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 119 | Loc = Lex.getLoc(); |
Chris Lattner | 3ed88ef | 2009-01-02 08:05:26 +0000 | [diff] [blame] | 120 | return ParseUInt32(Val); |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 121 | } |
| 122 | bool ParseOptionalAddrSpace(unsigned &AddrSpace); |
| 123 | bool ParseOptionalAttrs(unsigned &Attrs, unsigned AttrKind); |
| 124 | bool ParseOptionalLinkage(unsigned &Linkage, bool &HasLinkage); |
| 125 | bool ParseOptionalLinkage(unsigned &Linkage) { |
| 126 | bool HasLinkage; return ParseOptionalLinkage(Linkage, HasLinkage); |
| 127 | } |
| 128 | bool ParseOptionalVisibility(unsigned &Visibility); |
Sandeep Patel | 65c3c8f | 2009-09-02 08:44:58 +0000 | [diff] [blame] | 129 | bool ParseOptionalCallingConv(CallingConv::ID &CC); |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 130 | bool ParseOptionalAlignment(unsigned &Alignment); |
| 131 | bool ParseOptionalCommaAlignment(unsigned &Alignment); |
| 132 | bool ParseIndexList(SmallVectorImpl<unsigned> &Indices); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 133 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 134 | // Top-Level Entities |
| 135 | bool ParseTopLevelEntities(); |
| 136 | bool ValidateEndOfModule(); |
| 137 | bool ParseTargetDefinition(); |
| 138 | bool ParseDepLibs(); |
| 139 | bool ParseModuleAsm(); |
| 140 | bool ParseUnnamedType(); |
| 141 | bool ParseNamedType(); |
| 142 | bool ParseDeclare(); |
| 143 | bool ParseDefine(); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 144 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 145 | bool ParseGlobalType(bool &IsConstant); |
Dan Gohman | 3845e50 | 2009-08-12 23:32:33 +0000 | [diff] [blame] | 146 | bool ParseUnnamedGlobal(); |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 147 | bool ParseNamedGlobal(); |
| 148 | bool ParseGlobal(const std::string &Name, LocTy Loc, unsigned Linkage, |
| 149 | bool HasLinkage, unsigned Visibility); |
| 150 | bool ParseAlias(const std::string &Name, LocTy Loc, unsigned Visibility); |
Devang Patel | 923078c | 2009-07-01 19:21:12 +0000 | [diff] [blame] | 151 | bool ParseStandaloneMetadata(); |
Devang Patel | eff2ab6 | 2009-07-29 00:34:02 +0000 | [diff] [blame] | 152 | bool ParseNamedMetadata(); |
Devang Patel | e54abc9 | 2009-07-22 17:43:22 +0000 | [diff] [blame] | 153 | bool ParseMDString(MetadataBase *&S); |
Devang Patel | 104cf9e | 2009-07-23 01:07:34 +0000 | [diff] [blame] | 154 | bool ParseMDNode(MetadataBase *&N); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 155 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 156 | // Type Parsing. |
Chris Lattner | a9a9e07 | 2009-03-09 04:49:14 +0000 | [diff] [blame] | 157 | bool ParseType(PATypeHolder &Result, bool AllowVoid = false); |
| 158 | bool ParseType(PATypeHolder &Result, LocTy &Loc, bool AllowVoid = false) { |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 159 | Loc = Lex.getLoc(); |
Chris Lattner | a9a9e07 | 2009-03-09 04:49:14 +0000 | [diff] [blame] | 160 | return ParseType(Result, AllowVoid); |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 161 | } |
| 162 | bool ParseTypeRec(PATypeHolder &H); |
| 163 | bool ParseStructType(PATypeHolder &H, bool Packed); |
| 164 | bool ParseArrayVectorType(PATypeHolder &H, bool isVector); |
| 165 | bool ParseFunctionType(PATypeHolder &Result); |
| 166 | PATypeHolder HandleUpRefs(const Type *Ty); |
| 167 | |
| 168 | // Constants. |
| 169 | bool ParseValID(ValID &ID); |
| 170 | bool ConvertGlobalValIDToValue(const Type *Ty, ValID &ID, Constant *&V); |
| 171 | bool ParseGlobalValue(const Type *Ty, Constant *&V); |
| 172 | bool ParseGlobalTypeAndValue(Constant *&V); |
| 173 | bool ParseGlobalValueVector(SmallVectorImpl<Constant*> &Elts); |
Nick Lewycky | cb33799 | 2009-05-10 20:57:05 +0000 | [diff] [blame] | 174 | bool ParseMDNodeVector(SmallVectorImpl<Value*> &); |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 175 | |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 176 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 177 | // Function Semantic Analysis. |
| 178 | class PerFunctionState { |
| 179 | LLParser &P; |
| 180 | Function &F; |
| 181 | std::map<std::string, std::pair<Value*, LocTy> > ForwardRefVals; |
| 182 | std::map<unsigned, std::pair<Value*, LocTy> > ForwardRefValIDs; |
| 183 | std::vector<Value*> NumberedVals; |
| 184 | public: |
| 185 | PerFunctionState(LLParser &p, Function &f); |
| 186 | ~PerFunctionState(); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 187 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 188 | Function &getFunction() const { return F; } |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 189 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 190 | bool VerifyFunctionComplete(); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 191 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 192 | /// GetVal - Get a value with the specified name or ID, creating a |
| 193 | /// forward reference record if needed. This can return null if the value |
| 194 | /// exists but does not have the right type. |
| 195 | Value *GetVal(const std::string &Name, const Type *Ty, LocTy Loc); |
| 196 | Value *GetVal(unsigned ID, const Type *Ty, LocTy Loc); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 197 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 198 | /// SetInstName - After an instruction is parsed and inserted into its |
| 199 | /// basic block, this installs its name. |
| 200 | bool SetInstName(int NameID, const std::string &NameStr, LocTy NameLoc, |
| 201 | Instruction *Inst); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 202 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 203 | /// GetBB - Get a basic block with the specified name or ID, creating a |
| 204 | /// forward reference record if needed. This can return null if the value |
| 205 | /// is not a BasicBlock. |
| 206 | BasicBlock *GetBB(const std::string &Name, LocTy Loc); |
| 207 | BasicBlock *GetBB(unsigned ID, LocTy Loc); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 208 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 209 | /// DefineBB - Define the specified basic block, which is either named or |
| 210 | /// unnamed. If there is an error, this returns null otherwise it returns |
| 211 | /// the block being defined. |
| 212 | BasicBlock *DefineBB(const std::string &Name, LocTy Loc); |
| 213 | }; |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 214 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 215 | bool ConvertValIDToValue(const Type *Ty, ValID &ID, Value *&V, |
| 216 | PerFunctionState &PFS); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 217 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 218 | bool ParseValue(const Type *Ty, Value *&V, PerFunctionState &PFS); |
| 219 | bool ParseValue(const Type *Ty, Value *&V, LocTy &Loc, |
| 220 | PerFunctionState &PFS) { |
| 221 | Loc = Lex.getLoc(); |
| 222 | return ParseValue(Ty, V, PFS); |
| 223 | } |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 224 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 225 | bool ParseTypeAndValue(Value *&V, PerFunctionState &PFS); |
| 226 | bool ParseTypeAndValue(Value *&V, LocTy &Loc, PerFunctionState &PFS) { |
| 227 | Loc = Lex.getLoc(); |
| 228 | return ParseTypeAndValue(V, PFS); |
| 229 | } |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 230 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 231 | struct ParamInfo { |
| 232 | LocTy Loc; |
| 233 | Value *V; |
| 234 | unsigned Attrs; |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 235 | ParamInfo(LocTy loc, Value *v, unsigned attrs) |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 236 | : Loc(loc), V(v), Attrs(attrs) {} |
| 237 | }; |
| 238 | bool ParseParameterList(SmallVectorImpl<ParamInfo> &ArgList, |
| 239 | PerFunctionState &PFS); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 240 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 241 | // Function Parsing. |
| 242 | struct ArgInfo { |
| 243 | LocTy Loc; |
| 244 | PATypeHolder Type; |
| 245 | unsigned Attrs; |
| 246 | std::string Name; |
| 247 | ArgInfo(LocTy L, PATypeHolder Ty, unsigned Attr, const std::string &N) |
| 248 | : Loc(L), Type(Ty), Attrs(Attr), Name(N) {} |
| 249 | }; |
| 250 | bool ParseArgumentList(std::vector<ArgInfo> &ArgList, |
Chris Lattner | dfd19dd | 2009-01-05 18:34:07 +0000 | [diff] [blame] | 251 | bool &isVarArg, bool inType); |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 252 | bool ParseFunctionHeader(Function *&Fn, bool isDefine); |
| 253 | bool ParseFunctionBody(Function &Fn); |
| 254 | bool ParseBasicBlock(PerFunctionState &PFS); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 255 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 256 | // Instruction Parsing. |
| 257 | bool ParseInstruction(Instruction *&Inst, BasicBlock *BB, |
| 258 | PerFunctionState &PFS); |
| 259 | bool ParseCmpPredicate(unsigned &Pred, unsigned Opc); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 260 | |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 261 | bool ParseRet(Instruction *&Inst, BasicBlock *BB, PerFunctionState &PFS); |
| 262 | bool ParseBr(Instruction *&Inst, PerFunctionState &PFS); |
| 263 | bool ParseSwitch(Instruction *&Inst, PerFunctionState &PFS); |
| 264 | bool ParseInvoke(Instruction *&Inst, PerFunctionState &PFS); |
Misha Brukman | 9ea4034 | 2009-01-02 22:46:48 +0000 | [diff] [blame] | 265 | |
Chris Lattner | e914b59 | 2009-01-05 08:24:46 +0000 | [diff] [blame] | 266 | bool ParseArithmetic(Instruction *&I, PerFunctionState &PFS, unsigned Opc, |
| 267 | unsigned OperandType); |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 268 | bool ParseLogical(Instruction *&I, PerFunctionState &PFS, unsigned Opc); |
| 269 | bool ParseCompare(Instruction *&I, PerFunctionState &PFS, unsigned Opc); |
| 270 | bool ParseCast(Instruction *&I, PerFunctionState &PFS, unsigned Opc); |
| 271 | bool ParseSelect(Instruction *&I, PerFunctionState &PFS); |
Chris Lattner | 0088a5c | 2009-01-05 08:18:44 +0000 | [diff] [blame] | 272 | bool ParseVA_Arg(Instruction *&I, PerFunctionState &PFS); |
Chris Lattner | df98617 | 2009-01-02 07:01:27 +0000 | [diff] [blame] | 273 | bool ParseExtractElement(Instruction *&I, PerFunctionState &PFS); |
| 274 | bool ParseInsertElement(Instruction *&I, PerFunctionState &PFS); |
| 275 | bool ParseShuffleVector(Instruction *&I, PerFunctionState &PFS); |
| 276 | bool ParsePHI(Instruction *&I, PerFunctionState &PFS); |
| 277 | bool ParseCall(Instruction *&I, PerFunctionState &PFS, bool isTail); |
| 278 | bool ParseAlloc(Instruction *&I, PerFunctionState &PFS, unsigned Opc); |
| 279 | bool ParseFree(Instruction *&I, PerFunctionState &PFS); |
| 280 | bool ParseLoad(Instruction *&I, PerFunctionState &PFS, bool isVolatile); |
| 281 | bool ParseStore(Instruction *&I, PerFunctionState &PFS, bool isVolatile); |
| 282 | bool ParseGetResult(Instruction *&I, PerFunctionState &PFS); |
| 283 | bool ParseGetElementPtr(Instruction *&I, PerFunctionState &PFS); |
| 284 | bool ParseExtractValue(Instruction *&I, PerFunctionState &PFS); |
| 285 | bool ParseInsertValue(Instruction *&I, PerFunctionState &PFS); |
| 286 | }; |
| 287 | } // End llvm namespace |
| 288 | |
| 289 | #endif |