< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java

Print this page

        

*** 78,91 **** * * @see CompilationResultBuilderFactory */ public class CompilationResultBuilder { ! // @formatter:off ! @Option(help = "Include the LIR as comments with the final assembly.", type = OptionType.Debug) public static final OptionKey<Boolean> PrintLIRWithAssembly = new OptionKey<>(false); ! // @formatter:on private static class ExceptionInfo { public final int codeOffset; public final LabelRef exceptionEdge; --- 78,91 ---- * * @see CompilationResultBuilderFactory */ public class CompilationResultBuilder { ! public static class Options { ! @Option(help = "Include the LIR as comments with the final assembly.", type = OptionType.Debug) // public static final OptionKey<Boolean> PrintLIRWithAssembly = new OptionKey<>(false); ! } private static class ExceptionInfo { public final int codeOffset; public final LabelRef exceptionEdge;
*** 293,309 **** } public AbstractAddress recordDataReferenceInCode(Constant constant, int alignment) { assert constant != null; debug.log("Constant reference in code: pos = %d, data = %s", asm.position(), constant); Data data = dataCache.get(constant); if (data == null) { data = dataBuilder.createDataItem(constant); dataCache.put(constant, data); } ! data.updateAlignment(alignment); ! return recordDataSectionReference(data); } public AbstractAddress recordDataReferenceInCode(byte[] data, int alignment) { assert data != null; if (debug.isLogEnabled()) { --- 293,320 ---- } public AbstractAddress recordDataReferenceInCode(Constant constant, int alignment) { assert constant != null; debug.log("Constant reference in code: pos = %d, data = %s", asm.position(), constant); + Data data = createDataItem(constant); + data.updateAlignment(alignment); + return recordDataSectionReference(data); + } + + public AbstractAddress recordDataReferenceInCode(Data data, int alignment) { + assert data != null; + data.updateAlignment(alignment); + return recordDataSectionReference(data); + } + + public Data createDataItem(Constant constant) { Data data = dataCache.get(constant); if (data == null) { data = dataBuilder.createDataItem(constant); dataCache.put(constant, data); } ! return data; } public AbstractAddress recordDataReferenceInCode(byte[] data, int alignment) { assert data != null; if (debug.isLogEnabled()) {
*** 470,480 **** private void emitBlock(AbstractBlockBase<?> block) { if (block == null) { return; } ! boolean emitComment = debug.isDumpEnabled(DebugContext.BASIC_LEVEL) || PrintLIRWithAssembly.getValue(getOptions()); if (emitComment) { blockComment(String.format("block B%d %s", block.getId(), block.getLoop())); } for (LIRInstruction op : lir.getLIRforBlock(block)) { --- 481,491 ---- private void emitBlock(AbstractBlockBase<?> block) { if (block == null) { return; } ! boolean emitComment = debug.isDumpEnabled(DebugContext.BASIC_LEVEL) || Options.PrintLIRWithAssembly.getValue(getOptions()); if (emitComment) { blockComment(String.format("block B%d %s", block.getId(), block.getLoop())); } for (LIRInstruction op : lir.getLIRforBlock(block)) {
< prev index next >