Relax loop-back-edge-use for different dexers.
D8 is less aggressive with removing transitive gotos when
--no-locals is not used in case the user wants a breakpoint
in the middle of that empty loop.
Consider:
while (...) {
boolean incoming = field;
while (incoming) {
}
}
DX would just generate:
|0007: invoke-static {}, LMain;.$opt$noinline$ensureSideEffects:()Z // method@0000
|000a: move-result v1
|000b: if-eqz v1, 0012 // +0007
|000d: sget-boolean v0, LMain;.field:Z // field@0001
|000f: if-eqz v0, 0007 // -0008
|0011: goto 000f // -0002
|0012: return-void
D8 would generate:
0007: invoke-static {}, LMain;.$opt$noinline$ensureSideEffects:()Z // method@0000
000a: move-result v0
000b: if-eqz v0, 0013 // +0008
000d: sget-boolean v0, LMain;.field:Z // field@0001
000f: if-eqz v0, 0012 // +0003
0011: goto 000f // -0002
0012: goto 0007 // -000b
0013: return-void
The extra basic block changes the order of the graph printing a bit.
Change-Id: I8f6149ba20b34ca0c50ec80c36aed13fb45e55ea
Consider:
Bug: 65168732
Test: USE_D8=true ./art/test.py -b --host -r -t 482-checker-loop-back-edge-use
USE_D8=false ./art/test.py -b --host -r -t 482-checker-loop-back-edge-use
2 files changed