Skip to content

Commit

Permalink
[GR-59963] Fix stamps in ReadExceptionObjectNode
Browse files Browse the repository at this point in the history
PullRequest: graal/19391
  • Loading branch information
patrick96 committed Dec 5, 2024
2 parents 8459a70 + 877d818 commit 15759c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@
*/
package com.oracle.svm.core.graal.llvm.lowering;

import jdk.graal.compiler.core.common.type.StampFactory;
import com.oracle.svm.core.graal.nodes.ReadExceptionObjectNode;
import com.oracle.svm.core.graal.snippets.NodeLoweringProvider;
import com.oracle.svm.core.nodes.CFunctionEpilogueNode;
import com.oracle.svm.core.thread.VMThreads;

import jdk.graal.compiler.debug.GraalError;
import jdk.graal.compiler.nodes.FixedWithNextNode;
import jdk.graal.compiler.nodes.FrameState;
import jdk.graal.compiler.nodes.NodeView;
import jdk.graal.compiler.nodes.StructuredGraph;
import jdk.graal.compiler.nodes.java.LoadExceptionObjectNode;
import jdk.graal.compiler.nodes.spi.LoweringTool;

import com.oracle.svm.core.graal.nodes.ReadExceptionObjectNode;
import com.oracle.svm.core.graal.snippets.NodeLoweringProvider;
import com.oracle.svm.core.nodes.CFunctionEpilogueNode;
import com.oracle.svm.core.thread.VMThreads;

public class LLVMLoadExceptionObjectLowering implements NodeLoweringProvider<LoadExceptionObjectNode> {

@Override
Expand All @@ -46,7 +46,7 @@ public void lower(LoadExceptionObjectNode node, LoweringTool tool) {

StructuredGraph graph = node.graph();
GraalError.guarantee(graph.getGuardsStage().areFrameStatesAtDeopts(), "Should be after FSA %s", node);
FixedWithNextNode readRegNode = graph.add(new ReadExceptionObjectNode(StampFactory.objectNonNull()));
FixedWithNextNode readRegNode = graph.add(new ReadExceptionObjectNode(node.stamp(NodeView.DEFAULT)));
graph.replaceFixedWithFixed(node, readRegNode);

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@

import jdk.graal.compiler.api.replacements.Snippet;
import jdk.graal.compiler.api.replacements.Snippet.ConstantParameter;
import jdk.graal.compiler.core.common.type.StampFactory;
import jdk.graal.compiler.graph.Node;
import jdk.graal.compiler.nodes.FixedWithNextNode;
import jdk.graal.compiler.nodes.NodeView;
import jdk.graal.compiler.nodes.StructuredGraph;
import jdk.graal.compiler.nodes.UnwindNode;
import jdk.graal.compiler.nodes.java.LoadExceptionObjectNode;
Expand Down Expand Up @@ -111,7 +111,7 @@ public static class LoadExceptionObjectLowering implements NodeLoweringProvider<
@Override
public void lower(LoadExceptionObjectNode node, LoweringTool tool) {
StructuredGraph graph = node.graph();
FixedWithNextNode readRegNode = graph.add(new ReadExceptionObjectNode(StampFactory.objectNonNull()));
FixedWithNextNode readRegNode = graph.add(new ReadExceptionObjectNode(node.stamp(NodeView.DEFAULT)));
graph.replaceFixedWithFixed(node, readRegNode);
}
}
Expand Down

0 comments on commit 15759c9

Please sign in to comment.