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
This commit is contained in:
Daniel Dunbar
2010-03-25 22:49:09 +00:00
parent 2d2898e6e9
commit ac2884a717
5 changed files with 36 additions and 10 deletions

View File

@@ -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);