summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-07-31 19:57:02 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-07-31 19:57:02 +0000
commitf695f8f9eddec10d0b0eb24e9fbbb2821128e023 (patch)
treeb6b9da6ed48ed00af868f5369d8bcf81143cc21b
parent0b636a24c7b107fd4e02e2598a1b324df4766587 (diff)
downloadbcm5719-llvm-f695f8f9eddec10d0b0eb24e9fbbb2821128e023.tar.gz
bcm5719-llvm-f695f8f9eddec10d0b0eb24e9fbbb2821128e023.zip
llc: Add -mc-relax-all.
llvm-svn: 109954
-rw-r--r--llvm/tools/llc/llc.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index 199a1a92043..d4416e60ef5 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/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<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 @@ 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)) {
OpenPOWER on IntegriCloud