Skip to content

Commit 06252f0

Browse files
author
Felix Berlakovich
committed
Add option to enable/disable raw conditional elimination only in FixReads
1 parent b7571b8 commit 06252f0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/core/common/GraalOptions.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -207,6 +207,9 @@ public final class GraalOptions {
207207
@Option(help = "", type = OptionType.Debug)
208208
public static final OptionKey<Boolean> ReplaceInputsWithConstantsBasedOnStamps = new OptionKey<>(true);
209209

210+
@Option(help = "", type=OptionType.Debug)
211+
public static final OptionKey<Boolean> EnableFixReadsConditionalElimination = new OptionKey<>(true);
212+
210213
@Option(help = "Uses deoptimization to prune branches of code in the generated code that have never " +
211214
"been executed by the interpreter.", type = OptionType.Expert)
212215
public static final OptionKey<Boolean> RemoveNeverExecutedCode = new OptionKey<>(true);

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/common/FixReadsPhase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -688,7 +688,7 @@ protected void run(StructuredGraph graph, CoreProviders context) {
688688
fixReadsClosure.processNodes(block);
689689
}
690690

691-
if (GraalOptions.RawConditionalElimination.getValue(graph.getOptions())) {
691+
if (GraalOptions.RawConditionalElimination.getValue(graph.getOptions()) && GraalOptions.EnableFixReadsConditionalElimination.getValue(graph.getOptions())) {
692692
schedule.getCFG().visitDominatorTree(createVisitor(graph, schedule, context), false);
693693
}
694694
}

0 commit comments

Comments
 (0)