< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileBranchNode.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 69,78 **** --- 69,87 ---- public boolean hasCondition() { return branchCondition != null; } + @Override + protected boolean canBeMergedWith(ProfileNode p) { + if (p instanceof ProfileBranchNode) { + ProfileBranchNode that = (ProfileBranchNode) p; + return this.method.equals(that.method) && this.bci == that.bci; + } + return false; + } + /** * Gathers all the {@link ProfileBranchNode}s that are inputs to the * {@linkplain StructuredGraph#getNodes() live nodes} in a given graph. */ public static NodeIterable<ProfileBranchNode> getProfileBranchNodes(StructuredGraph graph) {
< prev index next >