diff options
author | Eric Christopher <echristo@gmail.com> | 2013-01-11 18:12:39 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-01-11 18:12:39 +0000 |
commit | 0cb6fd930e1d9b428fbed3244dd971439801b6bb (patch) | |
tree | 63b2fa08c83a69c2d3283ad2fc1e03fba9da4ca0 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | c0e8a85ea8449d2deb9b2508e00ef2610d5bc35a (diff) | |
download | llvm-0cb6fd930e1d9b428fbed3244dd971439801b6bb.zip llvm-0cb6fd930e1d9b428fbed3244dd971439801b6bb.tar.gz llvm-0cb6fd930e1d9b428fbed3244dd971439801b6bb.tar.bz2 |
For inline asm:
- recognize string "{memory}" in the MI generation
- mark as mayload/maystore when there's a memory clobber constraint.
PR14859.
Patch by Krzysztof Parzyszek
llvm-svn: 172228
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index df82a17a..8f7c5fd 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1476,10 +1476,14 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const { OS << " "; getOperand(InlineAsm::MIOp_AsmString).print(OS, TM); - // Print HasSideEffects, IsAlignStack + // Print HasSideEffects, MayLoad, MayStore, IsAlignStack unsigned ExtraInfo = getOperand(InlineAsm::MIOp_ExtraInfo).getImm(); if (ExtraInfo & InlineAsm::Extra_HasSideEffects) OS << " [sideeffect]"; + if (ExtraInfo & InlineAsm::Extra_MayLoad) + OS << " [mayload]"; + if (ExtraInfo & InlineAsm::Extra_MayStore) + OS << " [maystore]"; if (ExtraInfo & InlineAsm::Extra_IsAlignStack) OS << " [alignstack]"; if (getInlineAsmDialect() == InlineAsm::AD_ATT) |