[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
This commit is contained in:
Chad Rosier
2012-10-30 19:11:54 +00:00
parent e7b406d7ac
commit 3d71688476
6 changed files with 36 additions and 11 deletions
@@ -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;