Skip to content

Commit b17a358

Browse files
committed
Review comments
1 parent 479cabd commit b17a358

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/nodes/GraphState.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,12 @@ public boolean isExplicitExceptionsNoDeopt() {
561561
return guardsStage == GuardsStage.FIXED_DEOPTS && isAfterStage(StageFlag.GUARD_LOWERING);
562562
}
563563

564+
/**
565+
* Determines if {@link jdk.graal.compiler.nodes.memory.FloatingReadNode FloatingReadNodes} are
566+
* allowed to be inserted. They should only be manually inserted if
567+
* {@link jdk.graal.compiler.phases.common.FloatingReadPhase} has been run and
568+
* {@link jdk.graal.compiler.phases.common.FixReadsPhase} has not.
569+
*/
564570
public boolean allowsFloatingReads() {
565571
return isAfterStage(StageFlag.FLOATING_READS) && isBeforeStage(StageFlag.FIXED_READS);
566572
}

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/SnippetTemplate.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ protected SnippetTemplate(OptionValues options,
12131213
boolean needsPEA = false;
12141214
boolean needsCE = false;
12151215
LoweringTool.LoweringStage loweringStage = args.cacheKey.loweringStage;
1216-
boolean allowsFloatingReads = args.cacheKey.allowsFloatingReads;
1216+
final boolean allowsFloatingReads = args.cacheKey.allowsFloatingReads;
12171217
for (Node n : snippetCopy.getNodes()) {
12181218
if (!needsPEA && (n instanceof AbstractNewObjectNode || n instanceof AbstractBoxingNode)) {
12191219
needsPEA = true;
@@ -1247,7 +1247,6 @@ protected SnippetTemplate(OptionValues options,
12471247
if (loweringStage != LoweringTool.StandardLoweringStage.HIGH_TIER) {
12481248
// (3)
12491249
assert !guardsStage.allowsFloatingGuards() : guardsStage;
1250-
// Create memory map nodes
12511250
new FloatingReadPhase(true, allowsFloatingReads, canonicalizer).apply(snippetCopy, providers);
12521251

12531252
if (!snippetCopy.getGraphState().isExplicitExceptionsNoDeopt()) {

0 commit comments

Comments
 (0)