[PATCH] D71027: Support repeated machine outlining
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 10 14:46:37 PDT 2020
paquette added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineOutliner.cpp:1510-1512
+ unsigned NumRepeats = NumRepeat;
+ if (NumRepeats < 1)
+ NumRepeats = 1;
----------------
I think that allowing the number of repeats to be 0 is unintuitive.
Would it be possible to output an error when the number of repeats is less than 1 instead of silently changing it?
================
Comment at: llvm/lib/CodeGen/MachineOutliner.cpp:1515-1517
+ for (unsigned I = 0; I < NumRepeats; I++) {
+ if (!runOnceOnModule(M, I))
+ return Changed;
----------------
Can you add some debug output here that says why the outliner stopped running?
E.g.
- "Stopped outlining because `I >= NumRepeats`"
- "Stopped outlining at iteration `I` because no changes were found"
This debug output could then be used in a separate testcase showing that repeated outlining terminates as expected.
================
Comment at: llvm/test/CodeGen/AArch64/machine-outliner-iterative.mir:65-71
+ %tmp4 = alloca [24 x i8], align 8
+ %tmp101 = getelementptr inbounds %10, %10* %tmp11, i64 0, i32 1
+ %tmp103 = bitcast %6* %tmp101 to i8*
+ call void @foo(i8* nonnull %tmp103, [24 x i8]* nonnull %tmp4, i64 33, i8* null)
+ %tmp1042 = bitcast %2* %tmp38 to %0*
+ call void @widget(%0* %tmp1042)
+ ret void
----------------
The IR instructions inside each of the IR functions here should not be necessary.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71027/new/
https://reviews.llvm.org/D71027
More information about the llvm-commits
mailing list