diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-21 03:13:54 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-21 03:13:54 +0000 |
| commit | 48fa6ed1535ae5a94b7710482355e0f13353c5c6 (patch) | |
| tree | ab069566d69b014a9eb0d35ba20e9a54b1c71257 /llvm | |
| parent | e4a5220d7c463d5f891f23e520f54e7734c24960 (diff) | |
| download | bcm5719-llvm-48fa6ed1535ae5a94b7710482355e0f13353c5c6.tar.gz bcm5719-llvm-48fa6ed1535ae5a94b7710482355e0f13353c5c6.zip | |
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.
llvm-svn: 201836
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/docs/ReleaseNotes.rst | 3 | ||||
| -rw-r--r-- | llvm/include/llvm/Target/TargetOptions.h | 23 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/LLVMTargetMachine.cpp | 6 | ||||
| -rw-r--r-- | llvm/tools/llc/llc.cpp | 5 |
4 files changed, 21 insertions, 16 deletions
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst index 4aab5423074..42127c81f70 100644 --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/docs/ReleaseNotes.rst @@ -49,7 +49,8 @@ Non-comprehensive list of changes in this release * 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 diff --git a/llvm/include/llvm/Target/TargetOptions.h b/llvm/include/llvm/Target/TargetOptions.h index d9c8651e7ed..f50af6734b1 100644 --- a/llvm/include/llvm/Target/TargetOptions.h +++ b/llvm/include/llvm/Target/TargetOptions.h @@ -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. diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index 51cd9d68617..6c217cd232e 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp @@ -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; diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index 435d4e22b78..f8f02831913 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -58,6 +58,10 @@ TimeCompilations("time-compilations", cl::Hidden, cl::init(1u), 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, LLVMContext &Context) { } TargetOptions Options = InitTargetOptionsFromCodeGenFlags(); + Options.DisableIntegratedAS = NoIntegratedAssembler; OwningPtr<TargetMachine> target(TheTarget->createTargetMachine(TheTriple.getTriple(), |

