< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileInvokeNode.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.
*** 35,44 **** --- 35,53 ---- public ProfileInvokeNode(ResolvedJavaMethod method, int freqLog, int probabilityLog) { super(TYPE, method, freqLog, probabilityLog); } + @Override + protected boolean canBeMergedWith(ProfileNode p) { + if (p instanceof ProfileInvokeNode) { + ProfileInvokeNode that = (ProfileInvokeNode) p; + return this.method.equals(that.method); + } + return false; + } + /** * Gathers all the {@link ProfileInvokeNode}s that are inputs to the * {@linkplain StructuredGraph#getNodes() live nodes} in a given graph. */ public static NodeIterable<ProfileInvokeNode> getProfileInvokeNodes(StructuredGraph graph) {
< prev index next >