diff options
author | Alan Leung <acleung@google.com> | 2017-10-17 13:34:02 -0700 |
---|---|---|
committer | Alan Leung <acleung@google.com> | 2017-10-17 13:50:42 -0700 |
commit | 883bf3cd1542db3784fd727204526a993441eadd (patch) | |
tree | 7c052fb5f42cf751a1094d9a1fe51c2877c7dd33 /compiler/optimizing/codegen_test_utils.h | |
parent | ea7638349dd23dfdd6ee0c2e45a63faa653962e3 (diff) |
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
Diffstat (limited to 'compiler/optimizing/codegen_test_utils.h')
0 files changed, 0 insertions, 0 deletions