From 7c380eded54a19870bd5f4f076733d174f9aa582 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Sat, 31 Jul 2010 19:57:02 +0000 Subject: [PATCH] llc: Add -mc-relax-all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109954 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llc/llc.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 199a1a92043..d4416e60ef5 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -76,6 +76,9 @@ MAttrs("mattr", cl::desc("Target specific attributes (-mattr=help for details)"), cl::value_desc("a1,+a2,-a3,...")); +static cl::opt +RelaxAll("mc-relax-all", cl::desc("Relax all fixups")); + cl::opt FileType("filetype", cl::init(TargetMachine::CGFT_AssemblyFile), cl::desc("Choose a file type (not all types are supported by all targets):"), @@ -329,6 +332,14 @@ int main(int argc, char **argv) { // Override default to generate verbose assembly. Target.setAsmVerbosityDefault(true); + if (RelaxAll) { + if (FileType != TargetMachine::CGFT_ObjectFile) + errs() << argv[0] + << ": warning: ignoring -mc-relax-all because filetype != obj"; + else + Target.setMCRelaxAll(true); + } + // Ask the target to add backend passes as necessary. if (Target.addPassesToEmitFile(PM, *Out, FileType, OLvl, DisableVerify)) { -- 2.34.1