Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove…

Press ? to show keyboard shortcuts.
Status
Partially Audited
Auditors
dsanders
H39 MIPS Backend Audit Triggered Audit
grosbach
H23 MC code reviews Triggered Audit
Committed
dsandersFeb 13 2014, 6:44 AM
Reviewer
rafael
Differential Revision
D2686: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call
Parents
rL201332: [asan] Disable 1 test on Android.
Branches
Unknown
Tags
Unknown
Subscribers
None
Description

Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call

Summary:
AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for
targets with mature MC support. Such targets will always parse the inline
assembly (even when emitting assembly). Targets without mature MC support
continue to use EmitRawText() for assembly output.

The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced
with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler
to parse inline assembly (even when emitting assembly output). UseIntegratedAs
is set to true for targets that consider any failure to parse valid assembly
to be a bug. Target specific subclasses generally enable the integrated
assembler in their constructor. The default value can be overridden with
-no-integrated-as.

All tests that rely on inline assembly supporting invalid assembly (for example,
those that use mnemonics such as 'foo' or 'hello world') have been updated to
disable the integrated assembler.

Changes since review (and last commit attempt):

  • Fixed test failures that were missed due to configuration of local build. (fixes crash.ll and a couple others).
  • Fixed tests that happened to pass because the local build was on X86 (should fix 2007-12-17-InvokeAsm.ll)
  • mature-mc-support.ll's should no longer require all targets to be compiled. (should fix ARM and PPC buildbots)
  • Object output (-filetype=obj and similar) now forces the integrated assembler to be enabled regardless of default setting or -no-integrated-as. (should fix SystemZ buildbots)

Reviewers: rafael

Reviewed By: rafael

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2686

dsanders accepted this commit.Via LegacyMar 3 2014, 8:33 AM

Changes (96)

HistoryBrowseChangePath
HistoryBrowseModifiedcfe/trunk/test/CodeGen/2010-06-17-asmcrash.c
HistoryBrowseModifiedcfe/trunk/test/Frontend/backend-diagnostic.c
HistoryBrowseModifiedllvm/trunk/include/llvm/MC/MCAsmInfo.h
HistoryBrowseModifiedllvm/trunk/include/llvm/MC/MCObjectStreamer.h
HistoryBrowseModifiedllvm/trunk/include/llvm/MC/MCStreamer.h
HistoryBrowseModifiedllvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
HistoryBrowseModifiedllvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
HistoryBrowseModifiedllvm/trunk/lib/MC/MCAsmInfo.cpp
HistoryBrowseModifiedllvm/trunk/lib/MC/MCAsmInfoCOFF.cpp
HistoryBrowseModifiedllvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
HistoryBrowseModifiedllvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
HistoryBrowseModifiedllvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
HistoryBrowseModifiedllvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
HistoryBrowseModifiedllvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h
HistoryBrowseModifiedllvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
HistoryBrowseModifiedllvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
HistoryBrowseModifiedllvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
HistoryBrowseModifiedllvm/trunk/test/CodeGen/AArch64/inline-asm-constraints.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/AArch64/inline-asm-modifiers.ll
HistoryBrowseAddedllvm/trunk/test/CodeGen/AArch64/mature-mc-support.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/ARM/2009-04-06-AsmModifier.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/ARM/arm-modifier.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/ARM/crash-O0.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/ARM/inlineasm-64bit.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/ARM/inlineasm-imm-arm.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/ARM/inlineasm3.ll
HistoryBrowseAddedllvm/trunk/test/CodeGen/ARM/mature-mc-support.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/ARM/mult-alt-generic-arm.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/ARM/subreg-remat.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/Generic/2007-04-08-MultipleFrameIndices.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/Generic/2007-04-27-InlineAsm-X-Dest.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/Generic/2007-04-27-LargeMemObject.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/Generic/2008-02-20-MatchingMem.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/Generic/asm-large-immediate.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/Generic/inline-asm-mem-clobber.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/Generic/inline-asm-special-strings.ll
HistoryBrowseAddedllvm/trunk/test/CodeGen/Mips/mature-mc-support.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/PowerPC/2007-05-03-InlineAsm-S-Constraint.ll
HistoryBrowseAddedllvm/trunk/test/CodeGen/PowerPC/mature-mc-support.ll
HistoryBrowseAddedllvm/trunk/test/CodeGen/SPARC/mature-mc-support.ll
HistoryBrowseAddedllvm/trunk/test/CodeGen/SystemZ/mature-mc-support.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/Thumb/inlineasm-imm-thumb.ll
HistoryBrowseAddedllvm/trunk/test/CodeGen/Thumb/mature-mc-support.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2006-07-20-InlineAsm.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2006-07-31-SingleRegClass.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2007-03-24-InlineAsmPModifier.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2007-03-24-InlineAsmVectorOp.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2007-10-28-inlineasm-q-modifier.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2007-11-04-LiveVariablesBug.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2007-11-04-rip-immediate-constant.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2008-02-20-InlineAsmClobber.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2008-02-26-AsmDirectMemOp.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2008-04-26-Asm-Optimize-Imm.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2008-09-18-inline-asm-2.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2008-10-17-Asm64bitRConstraint.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2008-10-20-AsmDoubleInI32.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2009-02-12-InlineAsm-nieZ-constraints.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2009-04-13-2AddrAssert-2.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2009-05-08-InlineAsmIOffset.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2009-09-19-earlyclobber.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2009-12-01-EarlyClobberBug.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2010-05-05-LocalAllocEarlyClobber.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2010-06-15-FastAllocEarlyCLobber.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2010-06-25-asm-RA-crash.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2010-06-28-FastAllocTiedOperand.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2010-06-28-matched-g-constraint.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2010-07-02-asm-alignstack.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2010-07-06-asm-RIP.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2010-07-13-indirectXconstraint.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/2011-10-11-SpillDead.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/asm-block-labels.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/asm-global-imm.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/cas.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/crash.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/fast-isel.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/fold-xmm-zero.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/inline-asm-flag-clobber.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/inline-asm-fpstack.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/inline-asm-h.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/inline-asm-modifier-n.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/inline-asm-mrv.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/inline-asm-q-regs.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/inline-asm-stack-realign3.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/inline-asm-tied.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/inline-asm-x-scalar.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/inline-asm.ll
HistoryBrowseAddedllvm/trunk/test/CodeGen/X86/mature-mc-support.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/ms-inline-asm.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/mult-alt-generic-i686.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/mult-alt-generic-x86_64.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/mult-alt-x86.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/multiple-loop-post-inc.ll
HistoryBrowseModifiedllvm/trunk/test/CodeGen/X86/opaque-constant-asm.ll
HistoryBrowseModifiedllvm/trunk/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll

rL201333

cfe/trunk/test/CodeGen/2010-06-17-asmcrash.c

Loading...

cfe/trunk/test/Frontend/backend-diagnostic.c

Loading...

llvm/trunk/include/llvm/MC/MCAsmInfo.h

Loading...

llvm/trunk/include/llvm/MC/MCObjectStreamer.h

Loading...

llvm/trunk/include/llvm/MC/MCStreamer.h

Loading...

llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp

Loading...

llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp

Loading...

llvm/trunk/lib/MC/MCAsmInfo.cpp

Loading...

llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp

Loading...

llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp

Loading...

llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp

Loading...

llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp

Loading...

llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp

Loading...

llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h

Loading...

llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp

Loading...

llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp

Loading...

llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp

Loading...

llvm/trunk/test/CodeGen/AArch64/inline-asm-constraints.ll

Loading...

llvm/trunk/test/CodeGen/AArch64/inline-asm-modifiers.ll

Loading...

llvm/trunk/test/CodeGen/AArch64/mature-mc-support.ll

Loading...

llvm/trunk/test/CodeGen/ARM/2009-04-06-AsmModifier.ll

Loading...

llvm/trunk/test/CodeGen/ARM/arm-modifier.ll

Loading...

llvm/trunk/test/CodeGen/ARM/crash-O0.ll

Loading...

llvm/trunk/test/CodeGen/ARM/inlineasm-64bit.ll

Loading...

llvm/trunk/test/CodeGen/ARM/inlineasm-imm-arm.ll

Loading...

llvm/trunk/test/CodeGen/ARM/inlineasm3.ll

Loading...

llvm/trunk/test/CodeGen/ARM/mature-mc-support.ll

Loading...

llvm/trunk/test/CodeGen/ARM/mult-alt-generic-arm.ll

Loading...

llvm/trunk/test/CodeGen/ARM/subreg-remat.ll

Loading...

llvm/trunk/test/CodeGen/Generic/2007-04-08-MultipleFrameIndices.ll

Loading...

llvm/trunk/test/CodeGen/Generic/2007-04-27-InlineAsm-X-Dest.ll

Loading...

llvm/trunk/test/CodeGen/Generic/2007-04-27-LargeMemObject.ll

Loading...

llvm/trunk/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll

Loading...

llvm/trunk/test/CodeGen/Generic/2008-02-20-MatchingMem.ll

Loading...

llvm/trunk/test/CodeGen/Generic/asm-large-immediate.ll

Loading...

llvm/trunk/test/CodeGen/Generic/inline-asm-mem-clobber.ll

Loading...

llvm/trunk/test/CodeGen/Generic/inline-asm-special-strings.ll

Loading...

llvm/trunk/test/CodeGen/Mips/mature-mc-support.ll

Loading...

llvm/trunk/test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll

Loading...

llvm/trunk/test/CodeGen/PowerPC/2007-05-03-InlineAsm-S-Constraint.ll

Loading...

llvm/trunk/test/CodeGen/PowerPC/mature-mc-support.ll

Loading...

llvm/trunk/test/CodeGen/SPARC/mature-mc-support.ll

Loading...

llvm/trunk/test/CodeGen/SystemZ/mature-mc-support.ll

Loading...

llvm/trunk/test/CodeGen/Thumb/inlineasm-imm-thumb.ll

Loading...

llvm/trunk/test/CodeGen/Thumb/mature-mc-support.ll

Loading...

llvm/trunk/test/CodeGen/X86/2006-07-20-InlineAsm.ll

Loading...

llvm/trunk/test/CodeGen/X86/2006-07-31-SingleRegClass.ll

Loading...

llvm/trunk/test/CodeGen/X86/2007-03-24-InlineAsmPModifier.ll

Loading...

llvm/trunk/test/CodeGen/X86/2007-03-24-InlineAsmVectorOp.ll

Loading...

llvm/trunk/test/CodeGen/X86/2007-10-28-inlineasm-q-modifier.ll

Loading...

llvm/trunk/test/CodeGen/X86/2007-11-04-LiveVariablesBug.ll

Loading...

llvm/trunk/test/CodeGen/X86/2007-11-04-rip-immediate-constant.ll

Loading...

llvm/trunk/test/CodeGen/X86/2008-02-20-InlineAsmClobber.ll

Loading...

llvm/trunk/test/CodeGen/X86/2008-02-26-AsmDirectMemOp.ll

Loading...

llvm/trunk/test/CodeGen/X86/2008-04-26-Asm-Optimize-Imm.ll

Loading...

llvm/trunk/test/CodeGen/X86/2008-09-18-inline-asm-2.ll

Loading...

llvm/trunk/test/CodeGen/X86/2008-10-17-Asm64bitRConstraint.ll

Loading...

llvm/trunk/test/CodeGen/X86/2008-10-20-AsmDoubleInI32.ll

Loading...

llvm/trunk/test/CodeGen/X86/2009-02-12-InlineAsm-nieZ-constraints.ll

Loading...

llvm/trunk/test/CodeGen/X86/2009-04-13-2AddrAssert-2.ll

Loading...

llvm/trunk/test/CodeGen/X86/2009-05-08-InlineAsmIOffset.ll

Loading...

llvm/trunk/test/CodeGen/X86/2009-09-19-earlyclobber.ll

Loading...

llvm/trunk/test/CodeGen/X86/2009-12-01-EarlyClobberBug.ll

Loading...

llvm/trunk/test/CodeGen/X86/2010-05-05-LocalAllocEarlyClobber.ll

Loading...

llvm/trunk/test/CodeGen/X86/2010-06-15-FastAllocEarlyCLobber.ll

Loading...

llvm/trunk/test/CodeGen/X86/2010-06-25-asm-RA-crash.ll

Loading...

llvm/trunk/test/CodeGen/X86/2010-06-28-FastAllocTiedOperand.ll

Loading...

llvm/trunk/test/CodeGen/X86/2010-06-28-matched-g-constraint.ll

Loading...

llvm/trunk/test/CodeGen/X86/2010-07-02-asm-alignstack.ll

Loading...

llvm/trunk/test/CodeGen/X86/2010-07-06-asm-RIP.ll

Loading...

llvm/trunk/test/CodeGen/X86/2010-07-13-indirectXconstraint.ll

Loading...

llvm/trunk/test/CodeGen/X86/2011-10-11-SpillDead.ll

Loading...

llvm/trunk/test/CodeGen/X86/asm-block-labels.ll

Loading...

llvm/trunk/test/CodeGen/X86/asm-global-imm.ll

Loading...

llvm/trunk/test/CodeGen/X86/cas.ll

Loading...

llvm/trunk/test/CodeGen/X86/crash.ll

Loading...

llvm/trunk/test/CodeGen/X86/fast-isel.ll

Loading...

llvm/trunk/test/CodeGen/X86/fold-xmm-zero.ll

Loading...

llvm/trunk/test/CodeGen/X86/inline-asm-flag-clobber.ll

Loading...

llvm/trunk/test/CodeGen/X86/inline-asm-fpstack.ll

Loading...

llvm/trunk/test/CodeGen/X86/inline-asm-h.ll

Loading...

llvm/trunk/test/CodeGen/X86/inline-asm-modifier-n.ll

Loading...

llvm/trunk/test/CodeGen/X86/inline-asm-mrv.ll

Loading...

llvm/trunk/test/CodeGen/X86/inline-asm-q-regs.ll

Loading...

llvm/trunk/test/CodeGen/X86/inline-asm-stack-realign3.ll

Loading...

llvm/trunk/test/CodeGen/X86/inline-asm-tied.ll

Loading...

llvm/trunk/test/CodeGen/X86/inline-asm-x-scalar.ll

Loading...

llvm/trunk/test/CodeGen/X86/inline-asm.ll

Loading...

llvm/trunk/test/CodeGen/X86/mature-mc-support.ll

Loading...

llvm/trunk/test/CodeGen/X86/ms-inline-asm.ll

Loading...

llvm/trunk/test/CodeGen/X86/mult-alt-generic-i686.ll

Loading...

llvm/trunk/test/CodeGen/X86/mult-alt-generic-x86_64.ll

Loading...

llvm/trunk/test/CodeGen/X86/mult-alt-x86.ll

Loading...

llvm/trunk/test/CodeGen/X86/multiple-loop-post-inc.ll

Loading...

llvm/trunk/test/CodeGen/X86/opaque-constant-asm.ll

Loading...

llvm/trunk/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll

Loading...

Add Comment