[llvm-commits] [llvm] r109954 - /llvm/trunk/tools/llc/llc.cpp
Michael J. Spencer
bigcheesegs at gmail.com
Sat Jul 31 12:57:02 PDT 2010
Author: mspencer
Date: Sat Jul 31 14:57:02 2010
New Revision: 109954
URL: http://llvm.org/viewvc/llvm-project?rev=109954&view=rev
Log:
llc: Add -mc-relax-all.
Modified:
llvm/trunk/tools/llc/llc.cpp
Modified: llvm/trunk/tools/llc/llc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=109954&r1=109953&r2=109954&view=diff
==============================================================================
--- llvm/trunk/tools/llc/llc.cpp (original)
+++ llvm/trunk/tools/llc/llc.cpp Sat Jul 31 14:57:02 2010
@@ -76,6 +76,9 @@
cl::desc("Target specific attributes (-mattr=help for details)"),
cl::value_desc("a1,+a2,-a3,..."));
+static cl::opt<bool>
+RelaxAll("mc-relax-all", cl::desc("Relax all fixups"));
+
cl::opt<TargetMachine::CodeGenFileType>
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 @@
// 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)) {
More information about the llvm-commits
mailing list