ControlFlowAnchorNode.java revision 12657:6ef01bd40ce2
1221339Sdim/* 2221339Sdim * Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved. 3221339Sdim * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4221339Sdim * 5221339Sdim * This code is free software; you can redistribute it and/or modify it 6221339Sdim * under the terms of the GNU General Public License version 2 only, as 7221339Sdim * published by the Free Software Foundation. 8221339Sdim * 9221339Sdim * This code is distributed in the hope that it will be useful, but WITHOUT 10221339Sdim * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11221339Sdim * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12221339Sdim * version 2 for more details (a copy is included in the LICENSE file that 13221339Sdim * accompanied this code). 14221339Sdim * 15221339Sdim * You should have received a copy of the GNU General Public License version 16234353Sdim * 2 along with this work; if not, write to the Free Software Foundation, 17234353Sdim * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18221339Sdim * 19263508Sdim * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20221339Sdim * or visit www.oracle.com if you need additional information or have any 21221339Sdim * questions. 22249423Sdim */ 23221339Sdimpackage org.graalvm.compiler.nodes.debug; 24221339Sdim 25249423Sdimimport static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_0; 26221339Sdimimport static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_0; 27249423Sdim 28249423Sdimimport org.graalvm.compiler.core.common.type.StampFactory; 29249423Sdimimport org.graalvm.compiler.graph.Node; 30249423Sdimimport org.graalvm.compiler.graph.NodeClass; 31221339Sdimimport org.graalvm.compiler.nodeinfo.NodeInfo; 32234353Sdimimport org.graalvm.compiler.nodes.FixedWithNextNode; 33249423Sdimimport org.graalvm.compiler.nodes.Invoke; 34221339Sdimimport org.graalvm.compiler.nodes.spi.LIRLowerable; 35221339Sdimimport org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool; 36221339Sdim 37221339Sdim@NodeInfo(cycles = CYCLES_0, size = SIZE_0) 38221339Sdimpublic final class ControlFlowAnchorNode extends FixedWithNextNode implements LIRLowerable, ControlFlowAnchored { 39221339Sdim 40221339Sdim public static final NodeClass<ControlFlowAnchorNode> TYPE = NodeClass.create(ControlFlowAnchorNode.class); 41221339Sdim 42221339Sdim private static class Unique { 43234353Sdim } 44234353Sdim 45234353Sdim protected Unique unique; 46234353Sdim 47234353Sdim public ControlFlowAnchorNode() { 48234353Sdim super(TYPE, StampFactory.forVoid()); 49234353Sdim this.unique = new Unique(); 50234353Sdim } 51234353Sdim 52234353Sdim /** 53234353Sdim * Used by MacroSubstitution. 54221339Sdim */ 55221339Sdim public ControlFlowAnchorNode(@SuppressWarnings("unused") Invoke invoke) { 56221339Sdim this(); 57221339Sdim } 58234353Sdim 59243830Sdim @Override 60249423Sdim public void generate(NodeLIRBuilderTool generator) { 61249423Sdim // do nothing 62221339Sdim } 63234353Sdim 64243830Sdim @Override 65221339Sdim protected void afterClone(Node other) { 66221339Sdim assert other.graph() != null && other.graph() != graph() : this + " should never be cloned in the same graph"; 67221339Sdim } 68243830Sdim} 69221339Sdim