Mercurial > hg > graal-compiler
changeset 22612:ac9b27dd4df6
c.o.g.microbenchmarks: fix warnings.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Wed, 09 Sep 2015 14:27:14 +0200 |
parents | bdb46c461d75 |
children | f08fed409c49 |
files | graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/ArrayDuplicationBenchmark.java graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/ConditionalEliminationBenchmark.java graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/GraphCopyBenchmark.java graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/util/FrameStateAssignmentState.java graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/util/GraphState.java |
diffstat | 5 files changed, 14 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/ArrayDuplicationBenchmark.java Wed Sep 09 13:02:41 2015 +0200 +++ b/graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/ArrayDuplicationBenchmark.java Wed Sep 09 14:27:14 2015 +0200 @@ -91,6 +91,7 @@ return dummy; } + @SuppressWarnings("cast") public Object[] arraysClone(Object[] cache) { return (Object[]) cache.clone(); }
--- a/graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/ConditionalEliminationBenchmark.java Wed Sep 09 13:02:41 2015 +0200 +++ b/graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/ConditionalEliminationBenchmark.java Wed Sep 09 14:27:14 2015 +0200 @@ -68,7 +68,7 @@ @Benchmark @Warmup(iterations = 20) - public void nullness(Nullness s, GraalState g) { + public void nullness(Nullness s, @SuppressWarnings("unused") GraalState g) { new ConditionalEliminationPhase().apply(s.graph); } @@ -119,7 +119,7 @@ } @Benchmark - public void search(Search s, GraalState g) { + public void search(Search s, @SuppressWarnings("unused") GraalState g) { new ConditionalEliminationPhase().apply(s.graph); } }
--- a/graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/GraphCopyBenchmark.java Wed Sep 09 13:02:41 2015 +0200 +++ b/graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/GraphCopyBenchmark.java Wed Sep 09 14:27:14 2015 +0200 @@ -72,7 +72,7 @@ @Benchmark @Warmup(iterations = 20) - public StructuredGraph nullness(Nullness s, GraalState g) { + public StructuredGraph nullness(Nullness s, @SuppressWarnings("unused") GraalState g) { return (StructuredGraph) s.graph.copy(); } @@ -124,7 +124,7 @@ @Benchmark @Warmup(iterations = 20) - public StructuredGraph search(Search s, GraalState g) { + public StructuredGraph search(Search s, @SuppressWarnings("unused") GraalState g) { return (StructuredGraph) s.graph.copy(); } }
--- a/graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/util/FrameStateAssignmentState.java Wed Sep 09 13:02:41 2015 +0200 +++ b/graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/util/FrameStateAssignmentState.java Wed Sep 09 14:27:14 2015 +0200 @@ -30,9 +30,9 @@ public FrameStateAssignmentPhase phase; @Override - protected StructuredGraph preprocessOriginal(StructuredGraph graph) { - new GuardLoweringPhase().apply(graph, null); - return graph; + protected StructuredGraph preprocessOriginal(StructuredGraph structuredGraph) { + new GuardLoweringPhase().apply(structuredGraph, null); + return structuredGraph; } @Override
--- a/graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/util/GraphState.java Wed Sep 09 13:02:41 2015 +0200 +++ b/graal/com.oracle.graal.microbenchmarks/src/com/oracle/graal/microbenchmarks/graal/util/GraphState.java Wed Sep 09 14:27:14 2015 +0200 @@ -39,6 +39,7 @@ @State(Scope.Thread) public abstract class GraphState { + @SuppressWarnings("try") public GraphState() { // Ensure a debug configuration for this thread is initialized if (Debug.isEnabled() && DebugScope.getConfig() == null) { @@ -47,17 +48,17 @@ GraalState graal = new GraalState(); ResolvedJavaMethod method = graal.metaAccess.lookupJavaMethod(getMethodFromMethodSpec(getClass())); - StructuredGraph graph = null; + StructuredGraph structuredGraph = null; try (Debug.Scope s = Debug.scope("GraphState", method)) { - graph = preprocessOriginal(getGraph(graal, method)); + structuredGraph = preprocessOriginal(getGraph(graal, method)); } catch (Throwable t) { Debug.handle(t); } - this.originalGraph = graph; + this.originalGraph = structuredGraph; } - protected StructuredGraph preprocessOriginal(StructuredGraph graph) { - return graph; + protected StructuredGraph preprocessOriginal(StructuredGraph structuredGraph) { + return structuredGraph; } /**