diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-07-28 21:48:00 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-07-28 21:48:00 +0000 |
commit | ff03048c1350fcc4fda1ef6d6c57252f3a950854 (patch) | |
tree | b2acebff9cd7d5210b5f461d00ceb7d95db32550 /lib/AsmParser/LLParser.h | |
parent | 7f1cce55b5da7ef53269426e3c64586177384dca (diff) | |
download | llvm-ff03048c1350fcc4fda1ef6d6c57252f3a950854.tar.gz llvm-ff03048c1350fcc4fda1ef6d6c57252f3a950854.tar.bz2 llvm-ff03048c1350fcc4fda1ef6d6c57252f3a950854.tar.xz |
LangRef and basic memory-representation/reading/writing for 'cmpxchg' and
'atomicrmw' instructions, which allow representing all the current atomic
rmw intrinsics.
The allowed operands for these instructions are heavily restricted at the
moment; we can probably loosen it a bit, but supporting general
first-class types (where it makes sense) might get a bit complicated,
given how SelectionDAG works.
As an initial cut, these operations do not support specifying an alignment,
but it would be possible to add if we think it's useful. Specifying an
alignment lower than the natural alignment would be essentially
impossible to support on anything other than x86, but specifying a greater
alignment would be possible. I can't think of any useful optimizations which
would use that information, but maybe someone else has ideas.
Optimizer/codegen support coming soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136404 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.h')
-rw-r--r-- | lib/AsmParser/LLParser.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h index 6d2a929cc4..7fd01b6a21 100644 --- a/lib/AsmParser/LLParser.h +++ b/lib/AsmParser/LLParser.h @@ -365,6 +365,8 @@ namespace llvm { int ParseAlloc(Instruction *&I, PerFunctionState &PFS); int ParseLoad(Instruction *&I, PerFunctionState &PFS, bool isVolatile); int ParseStore(Instruction *&I, PerFunctionState &PFS, bool isVolatile); + int ParseCmpXchg(Instruction *&I, PerFunctionState &PFS, bool isVolatile); + int ParseAtomicRMW(Instruction *&I, PerFunctionState &PFS, bool isVolatile); int ParseFence(Instruction *&I, PerFunctionState &PFS); int ParseGetElementPtr(Instruction *&I, PerFunctionState &PFS); int ParseExtractValue(Instruction *&I, PerFunctionState &PFS); |