From ac2884a717daf3ad2aa8425320795d661e8a980b Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 25 Mar 2010 22:49:09 +0000 Subject: 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 --- tools/llvm-mc/llvm-mc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools') 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 OutputAsmVariant("output-asm-variant", cl::desc("Syntax variant to use for output printing")); +static cl::opt +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); -- cgit v1.1