[PATCH] D26872: Outliner: Add MIR-level outlining pass
Sean Silva via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 00:42:14 PST 2017
silvas added a comment.
I did a quick run on SPEC CPU 2006 with FullLTO and it seems like I ran into 3 different assertion failures across various programs: https://reviews.llvm.org/P7954
There seem to be 3 different assertions getting hit.
Here are some basic bugpoint-reduced test cases. Repro with `llc -enable-machine-outliner -O3 foo.ll` (though I expect these will be sensitive to minor codegen changes; I assume you have access to SPEC so you can reduce them again if needed)
Assertion `!NodePtr->isKnownSentinel()' failed.
Assertion `(isImpReg || Op.isRegMask() || MCID->isVariadic() || OpNo < MCID->getNumOperands() || isMetaDataOp) && "Trying to add an operand to a machine instr that is already done!"' failed.
Assertion `Occurrences.size() > 0 && "Longest repeated substring has no occurrences."' failed.
Also, here is a case that takes a really long time to compile (it does eventually finish) stuck in MachineOutliner::buildCandidateList :
Bugpoint found this one from the "Occurrences.size() > 0" assertion failure case.
For now, it's probably best to focus on the code review comments. Once the code is in good shape and committed, these sorts of bugs can be incrementally hammered out (tracked in bugzilla, fixed with clear individual patches (with test cases :) )).
Comment at: include/llvm/CodeGen/Passes.h:402
+ /// This pass performs outlining on machine instructions directly before printing assembly.
+ ModulePass *createOutlinerPass();
} // End llvm namespace
Nit: comment and function aren't aligned.
Comment at: include/llvm/Target/TargetInstrInfo.h:1518
Nit: inconsistent indent.
Comment at: lib/CodeGen/MachineOutliner.cpp:48
Nit: this won't work on case-sensitive file systems.
More information about the llvm-commits