summaryrefslogtreecommitdiffstats
path: root/llvm/tools
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
commitd821f4ac60e0a6228f73e74bed0c2aa6578e6d39 (patch)
tree5e6e8b4a82af15468c46ea0125a6a71cea1fc058 /llvm/tools
parent63eed63312c150d70d056d0e569122280e783e5a (diff)
downloadbcm5719-llvm-d821f4ac60e0a6228f73e74bed0c2aa6578e6d39.tar.gz
bcm5719-llvm-d821f4ac60e0a6228f73e74bed0c2aa6578e6d39.zip
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. llvm-svn: 99563
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-mc/llvm-mc.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mc/llvm-mc.cpp b/llvm/tools/llvm-mc/llvm-mc.cpp
index 0e183b05045..6dce5cc96c7 100644
--- a/llvm/tools/llvm-mc/llvm-mc.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud