[llvm] r201836 - Make DisableIntegratedAS a TargetOption.
Rafael Espindola
rafael.espindola at gmail.com
Thu Feb 20 19:13:55 PST 2014
Author: rafael
Date: Thu Feb 20 21:13:54 2014
New Revision: 201836
URL: http://llvm.org/viewvc/llvm-project?rev=201836&view=rev
Log:
Make DisableIntegratedAS a TargetOption.
This replaces the old NoIntegratedAssembler with at TargetOption. This is
more flexible and will be used to forward clang's -no-integrated-as option.
Modified:
llvm/trunk/docs/ReleaseNotes.rst
llvm/trunk/include/llvm/Target/TargetOptions.h
llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
llvm/trunk/tools/llc/llc.cpp
Modified: llvm/trunk/docs/ReleaseNotes.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.rst?rev=201836&r1=201835&r2=201836&view=diff
==============================================================================
--- llvm/trunk/docs/ReleaseNotes.rst (original)
+++ llvm/trunk/docs/ReleaseNotes.rst Thu Feb 20 21:13:54 2014
@@ -49,7 +49,8 @@ Non-comprehensive list of changes in thi
* All inline assembly is parsed by the integrated assembler when it is enabled.
Previously this was only the case for object-file output. It is now the case
- for assembly output as well.
+ for assembly output as well. The integrated assembler can be disabled with
+ the ``-no-integrated-as`` option,
.. NOTE
For small 1-3 sentence descriptions, just add an entry at the end of
Modified: llvm/trunk/include/llvm/Target/TargetOptions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOptions.h?rev=201836&r1=201835&r2=201836&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetOptions.h (original)
+++ llvm/trunk/include/llvm/Target/TargetOptions.h Thu Feb 20 21:13:54 2014
@@ -42,17 +42,17 @@ namespace llvm {
public:
TargetOptions()
: PrintMachineCode(false), NoFramePointerElim(false),
- LessPreciseFPMADOption(false),
- UnsafeFPMath(false), NoInfsFPMath(false),
- NoNaNsFPMath(false), HonorSignDependentRoundingFPMathOption(false),
- UseSoftFloat(false), NoZerosInBSS(false),
- JITEmitDebugInfo(false), JITEmitDebugInfoToDisk(false),
- GuaranteedTailCallOpt(false), DisableTailCalls(false),
- StackAlignmentOverride(0),
+ LessPreciseFPMADOption(false), UnsafeFPMath(false),
+ NoInfsFPMath(false), NoNaNsFPMath(false),
+ HonorSignDependentRoundingFPMathOption(false), UseSoftFloat(false),
+ NoZerosInBSS(false), JITEmitDebugInfo(false),
+ JITEmitDebugInfoToDisk(false), GuaranteedTailCallOpt(false),
+ DisableTailCalls(false), StackAlignmentOverride(0),
EnableFastISel(false), PositionIndependentExecutable(false),
- EnableSegmentedStacks(false), UseInitArray(false), TrapFuncName(""),
- FloatABIType(FloatABI::Default), AllowFPOpFusion(FPOpFusion::Standard)
- {}
+ EnableSegmentedStacks(false), UseInitArray(false),
+ DisableIntegratedAS(false), TrapFuncName(""),
+ FloatABIType(FloatABI::Default),
+ AllowFPOpFusion(FPOpFusion::Standard) {}
/// PrintMachineCode - This flag is enabled when the -print-machineinstrs
/// option is specified on the command line, and should enable debugging
@@ -158,6 +158,9 @@ namespace llvm {
/// constructors.
unsigned UseInitArray : 1;
+ /// Disable the integrated assembler.
+ unsigned DisableIntegratedAS : 1;
+
/// getTrapFunctionName - If this returns a non-empty string, this means
/// isel should lower Intrinsic::trap to a call to the specified function
/// name instead of an ISD::TRAP node.
Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=201836&r1=201835&r2=201836&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Thu Feb 20 21:13:54 2014
@@ -53,10 +53,6 @@ static cl::opt<cl::boolOrDefault>
AsmVerbose("asm-verbose", cl::desc("Add comments to directives."),
cl::init(cl::BOU_UNSET));
-static cl::opt<bool>
-NoIntegratedAssembler("no-integrated-as", cl::Hidden,
- cl::desc("Disable integrated assembler"));
-
static bool getVerboseAsm() {
switch (AsmVerbose) {
case cl::BOU_UNSET: return TargetMachine::getAsmVerbosityDefault();
@@ -77,7 +73,7 @@ void LLVMTargetMachine::initAsmInfo() {
"Make sure you include the correct TargetSelect.h"
"and that InitializeAllTargetMCs() is being invoked!");
- if (NoIntegratedAssembler)
+ if (Options.DisableIntegratedAS)
TmpAsmInfo->setUseIntegratedAssembler(false);
AsmInfo = TmpAsmInfo;
Modified: llvm/trunk/tools/llc/llc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=201836&r1=201835&r2=201836&view=diff
==============================================================================
--- llvm/trunk/tools/llc/llc.cpp (original)
+++ llvm/trunk/tools/llc/llc.cpp Thu Feb 20 21:13:54 2014
@@ -58,6 +58,10 @@ TimeCompilations("time-compilations", cl
cl::value_desc("N"),
cl::desc("Repeat compilation N times for timing"));
+static cl::opt<bool>
+NoIntegratedAssembler("no-integrated-as", cl::Hidden,
+ cl::desc("Disable integrated assembler"));
+
// Determine optimization level.
static cl::opt<char>
OptLevel("O",
@@ -260,6 +264,7 @@ static int compileModule(char **argv, LL
}
TargetOptions Options = InitTargetOptionsFromCodeGenFlags();
+ Options.DisableIntegratedAS = NoIntegratedAssembler;
OwningPtr<TargetMachine>
target(TheTarget->createTargetMachine(TheTriple.getTriple(),
More information about the llvm-commits
mailing list