src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopPolicies.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
26 |
26 |
27 import java.util.List; |
27 import java.util.List; |
28 |
28 |
29 import org.graalvm.compiler.nodes.ControlSplitNode; |
29 import org.graalvm.compiler.nodes.ControlSplitNode; |
30 import org.graalvm.compiler.nodes.cfg.ControlFlowGraph; |
30 import org.graalvm.compiler.nodes.cfg.ControlFlowGraph; |
|
31 import org.graalvm.compiler.options.Option; |
|
32 import org.graalvm.compiler.options.OptionKey; |
|
33 import org.graalvm.compiler.options.OptionType; |
31 |
34 |
32 import jdk.vm.ci.meta.MetaAccessProvider; |
35 import jdk.vm.ci.meta.MetaAccessProvider; |
33 |
36 |
34 public interface LoopPolicies { |
37 public interface LoopPolicies { |
|
38 |
|
39 class Options { |
|
40 @Option(help = "", type = OptionType.Expert) public static final OptionKey<Boolean> PeelALot = new OptionKey<>(false); |
|
41 } |
|
42 |
35 boolean shouldPeel(LoopEx loop, ControlFlowGraph cfg, MetaAccessProvider metaAccess); |
43 boolean shouldPeel(LoopEx loop, ControlFlowGraph cfg, MetaAccessProvider metaAccess); |
36 |
44 |
37 boolean shouldFullUnroll(LoopEx loop); |
45 boolean shouldFullUnroll(LoopEx loop); |
38 |
46 |
39 boolean shouldPartiallyUnroll(LoopEx loop); |
47 boolean shouldPartiallyUnroll(LoopEx loop); |