[PATCH] D26872: Outliner: Add MIR-level outlining pass
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 15:34:33 PST 2017
aprantl added inline comments.
================
Comment at: lib/CodeGen/MachineOutliner.cpp:199
+ while (EndIt != StartIt) {
+ MI = MF.CloneMachineInstr(&*EndIt);
+ MI->dropMemRefs();
----------------
aprantl wrote:
> aprantl wrote:
> > I looked at the implementation of MachineFunction::CloneMachineInstr() but I still can't tell:
> > What happens when the original instruction has a debug location on it - will it be stripped?
> > What happens when the original instruction is a DBG_VALUE - will it be copied?
> Did you get a chance to look into this?
Ping :-)
Note that it is really important to skip over any DBG_VALUE intrinsics while deciding whether to outline a sequence of instructions. Otherwise compiling with -g will produce different code than without, which we generally consider to be serious bug in the compiler.
Repository:
rL LLVM
https://reviews.llvm.org/D26872
More information about the llvm-commits
mailing list