OLD | NEW |
1 //===-- llvm/InlineAsm.h - Class to represent inline asm strings-*- C++ -*-===// | 1 //===-- llvm/InlineAsm.h - Class to represent inline asm strings-*- C++ -*-===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This class represents the inline asm strings, which are Value*'s that are | 10 // This class represents the inline asm strings, which are Value*'s that are |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 const std::string &getAsmString() const { return AsmString; } | 86 const std::string &getAsmString() const { return AsmString; } |
87 const std::string &getConstraintString() const { return Constraints; } | 87 const std::string &getConstraintString() const { return Constraints; } |
88 | 88 |
89 /// Verify - This static method can be used by the parser to check to see if | 89 /// Verify - This static method can be used by the parser to check to see if |
90 /// the specified constraint string is legal for the type. This returns true | 90 /// the specified constraint string is legal for the type. This returns true |
91 /// if legal, false if not. | 91 /// if legal, false if not. |
92 /// | 92 /// |
93 static bool Verify(FunctionType *Ty, StringRef Constraints); | 93 static bool Verify(FunctionType *Ty, StringRef Constraints); |
94 | 94 |
| 95 // @LOCALMOD-START |
| 96 /// isAsmMemory - Returns true if the Instruction corresponds to |
| 97 /// ``asm("":::"memory")``, which is often used as a compiler barrier. |
| 98 /// |
| 99 bool isAsmMemory() const; |
| 100 // @LOCALMOD-END |
| 101 |
95 // Constraint String Parsing | 102 // Constraint String Parsing |
96 enum ConstraintPrefix { | 103 enum ConstraintPrefix { |
97 isInput, // 'x' | 104 isInput, // 'x' |
98 isOutput, // '=x' | 105 isOutput, // '=x' |
99 isClobber // '~x' | 106 isClobber // '~x' |
100 }; | 107 }; |
101 | 108 |
102 typedef std::vector<std::string> ConstraintCodeVector; | 109 typedef std::vector<std::string> ConstraintCodeVector; |
103 | 110 |
104 struct SubConstraintInfo { | 111 struct SubConstraintInfo { |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 return false; | 307 return false; |
301 RC = High - 1; | 308 RC = High - 1; |
302 return true; | 309 return true; |
303 } | 310 } |
304 | 311 |
305 }; | 312 }; |
306 | 313 |
307 } // End llvm namespace | 314 } // End llvm namespace |
308 | 315 |
309 #endif | 316 #endif |
OLD | NEW |