Spurious Gate failure

Doug Simon doug.simon at oracle.com
Thu Apr 19 14:30:53 UTC 2018


What happens if you omit the @SuppressWarnings("unused") annotation? That's how it is upstream.


> On 19 Apr 2018, at 16:09, Andrew Haley <aph at redhat.com> wrote:
> 
> I can't figure out how to fix this warning:
> 
> ----------
> 1. ERROR in /home/travis/build/oracle/graal/compiler/src/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Move.java (at line 211)
> 	public void emitCode(@SuppressWarnings("unused") CompilationResultBuilder crb, AArch64MacroAssembler masm) {
> 	                                       ^^^^^^^^
> Unnecessary @SuppressWarnings("unused")
> ----------
> 
> The code is this:
> 
>    public static class MembarOp extends AArch64LIRInstruction {
>        public static final LIRInstructionClass<MembarOp> TYPE = LIRInstructionClass.create(MembarOp.class);
> 
>        // For future use.
>        @SuppressWarnings("unused")
>        private final int barriers;
> 
>        public MembarOp(int barriers) {
>            super(TYPE);
>            this.barriers = barriers;
>        }
> 
>        @Override
>        public void emitCode(@SuppressWarnings("unused") CompilationResultBuilder crb, AArch64MacroAssembler masm) {
>            // As I understand it load acquire/store release have the same semantics as on IA64
>            // and allow us to handle LoadStore, LoadLoad and StoreStore without an explicit
>            // barrier.
>            // But Graal support to figure out if a load/store is volatile is non-existant so for
>            // now just use memory barriers everywhere.
>            // if ((barrier & MemoryBarriers.STORE_LOAD) != 0) {
>            masm.dmb(AArch64MacroAssembler.BarrierKind.ANY_ANY);
>            // }
>        }
>    }
> 
> -- 
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the graal-dev mailing list