Skip to content

Commit

Permalink
Correct init of expanded count in Default Policy.
Browse files Browse the repository at this point in the history
  • Loading branch information
boris-spas committed Apr 8, 2020
1 parent d6d1088 commit 87c0f3e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class DefaultPolicy implements InliningPolicy {
private static final int MAX_DEPTH = 15;
private static final Comparator<CallNode> CALL_NODE_COMPARATOR = (o1, o2) -> Double.compare(o2.getRootRelativeFrequency(), o1.getRootRelativeFrequency());
private final OptionValues options;
private int expandedCount = 0;
private int expandedCount;

DefaultPolicy(OptionValues options) {
this.options = options;
Expand Down Expand Up @@ -83,6 +83,7 @@ private void inline(CallTree tree) {
private void expand(CallTree tree) {
final int expansionBudget = getPolyglotOptionValue(options, PolyglotCompilerOptions.InliningExpansionBudget);
final int maximumRecursiveInliningValue = getPolyglotOptionValue(options, PolyglotCompilerOptions.InliningRecursionDepth);
expandedCount = tree.getRoot().getIR().getNodeCount();
final PriorityQueue<CallNode> expandQueue = getQueue(tree, CallNode.State.Cutoff);
CallNode candidate;
while ((candidate = expandQueue.poll()) != null) {
Expand Down

0 comments on commit 87c0f3e

Please sign in to comment.