Re: [rvm-research] Bytecode merge is disabled for aload in Baseline compiler
Erik Brangs <[email protected]> Sun, 19 Nov 2017 17:48:41 +0100
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 19.11.2017 15:41, Lingyu Zhu wrote: > During digging the baseline compiler codes for ia32, I cannot understand the following quetion: > > In org.jikesrvm.compilers.baseline.BaselineCompiler, emit_aload() method comments out bcodes.peekNextOpcode(), which technically disables the possibility to merge with getfield. Meanwhile emit_iload(), emit_lcmp() allows merges. Is there any consideration for this regression? Technically, this isn't a regression because bytecode merging for aload was never enabled for Jikes RVM. If you enable bytecode merging (e.g. using the attached patch), you'll see that prototype will fail to build. Kind regards, Erik Brangs ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jikesrvm-researchers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
enable_bytecode_merge_for_aload_and_cause_assertion_failure_on_prototype.diff
(text/x-patch, 1.2 KB)
diff --git a/rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java b/rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java
index f9fcc0e1e..d202783f6 100644
--- a/rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java
+++ b/rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java
@@ -20,7 +20,6 @@ import static org.jikesrvm.classloader.BytecodeConstants.JBC_ifgt;
import static org.jikesrvm.classloader.BytecodeConstants.JBC_ifle;
import static org.jikesrvm.classloader.BytecodeConstants.JBC_iflt;
import static org.jikesrvm.classloader.BytecodeConstants.JBC_ifne;
-import static org.jikesrvm.classloader.BytecodeConstants.JBC_nop;
import static org.jikesrvm.runtime.ExitStatus.EXIT_STATUS_BOGUS_COMMAND_LINE_ARG;
import static org.jikesrvm.runtime.UnboxedSizeConstants.LOG_BYTES_IN_ADDRESS;
@@ -431,7 +430,7 @@ public abstract class BaselineCompiler extends TemplateCompilerFramework {
if (!mergeBytecodes || basicBlockBoundary()) {
emit_regular_aload(index);
} else {
- int nextBC = JBC_nop; // bcodes.peekNextOpcode();
+ int nextBC = bcodes.peekNextOpcode();
switch (nextBC) {
case JBC_getfield: {
int gfIndex = bcodes.index();