aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-mc
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-25 22:49:09 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-25 22:49:09 +0000
commitac2884a717daf3ad2aa8425320795d661e8a980b (patch)
treef04ee17becb8ac8f77d5f76f433164be88344756 /tools/llvm-mc
parent2d2898e6e99a5a4a16352b86070fa0986b7d1efd (diff)
downloadexternal_llvm-ac2884a717daf3ad2aa8425320795d661e8a980b.zip
external_llvm-ac2884a717daf3ad2aa8425320795d661e8a980b.tar.gz
external_llvm-ac2884a717daf3ad2aa8425320795d661e8a980b.tar.bz2
llvm-mc: Add a -mc-relax-all option, which relaxes every fixup. We always need
exactly two passes in that case, and don't ever need to recompute any layout, so this is a nice baseline for relaxation performance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc')
-rw-r--r--tools/llvm-mc/llvm-mc.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp
index 0e183b0..6dce5cc 100644
--- a/tools/llvm-mc/llvm-mc.cpp
+++ b/tools/llvm-mc/llvm-mc.cpp
@@ -55,6 +55,9 @@ static cl::opt<unsigned>
OutputAsmVariant("output-asm-variant",
cl::desc("Syntax variant to use for output printing"));
+static cl::opt<bool>
+RelaxAll("mc-relax-all", cl::desc("Relax all fixups"));
+
enum OutputFileType {
OFT_Null,
OFT_AssemblyFile,
@@ -298,7 +301,7 @@ static int AssembleInput(const char *ProgName) {
assert(FileType == OFT_ObjectFile && "Invalid file type!");
CE.reset(TheTarget->createCodeEmitter(*TM, Ctx));
TAB.reset(TheTarget->createAsmBackend(TripleName));
- Str.reset(createMachOStreamer(Ctx, *TAB, *Out, CE.get()));
+ Str.reset(createMachOStreamer(Ctx, *TAB, *Out, CE.get(), RelaxAll));
}
AsmParser Parser(SrcMgr, Ctx, *Str.get(), *MAI);