diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-10-30 19:11:54 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-10-30 19:11:54 +0000 |
commit | 3d71688476951d56ac00a81b17c2f83fd781b208 (patch) | |
tree | 13c4910a677393f45e540d495ba0a5fee1a3f0eb /lib/CodeGen/SelectionDAG/InstrEmitter.cpp | |
parent | e7b406d7ac150189522f0a139f1a2f76bde2cb26 (diff) | |
download | llvm-3d71688476951d56ac00a81b17c2f83fd781b208.tar.gz llvm-3d71688476951d56ac00a81b17c2f83fd781b208.tar.bz2 llvm-3d71688476951d56ac00a81b17c2f83fd781b208.tar.xz |
[inline asm] Implement mayLoad and mayStore for inline assembly. In general,
the MachineInstr MayLoad/MayLoad flags are based on the tablegen implementation.
For inline assembly, however, we need to compute these based on the constraints.
Revert r166929 as this is no longer needed, but leave the test case in place.
rdar://12033048 and PR13504
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/InstrEmitter.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp index d1baa3f716..5fc71cc223 100644 --- a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp +++ b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp @@ -903,6 +903,13 @@ EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned, getZExtValue(); MI->addOperand(MachineOperand::CreateImm(ExtraInfo)); + // Set the MayLoad and MayStore flags. + if (ExtraInfo & InlineAsm::Extra_MayLoad) + MI->setFlag(MachineInstr::MayLoad); + + if (ExtraInfo & InlineAsm::Extra_MayStore) + MI->setFlag(MachineInstr::MayStore); + // Remember to operand index of the group flags. SmallVector<unsigned, 8> GroupIdx; |