Integrated: 8292285: C2: remove unreachable block after NeverBranch-to-Goto conversion
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Wed Aug 17 06:28:13 UTC 2022
On Fri, 12 Aug 2022 12:42:29 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
> `NeverBranch` nodes introduce fake branches out of infinite loops to simplify intermediate optimizations that assume full reachability:
> 
> `PhaseCFG::convert_NeverBranch_to_Goto()` transforms such nodes into simple `Goto` nodes, removing the fake branch and thus making its destination block unreachable:
> 
> This changeset removes the unreachable destination block created by `PhaseCFG::convert_NeverBranch_to_Goto()` from the list of basic blocks:
> 
> Removing unreachable blocks created by `PhaseCFG::convert_NeverBranch_to_Goto()` simplifies late control-flow analysis (for example, recomputing dominators during the output phase as required for late barrier analysis in Generational ZGC) and slightly reduces the size of the generated code.
>
> #### Testing
>
> - hs-tier1-3 (windows-x64, linux-x64, linux-aarch64, and macosx-x64; release and debug mode). The changeset does not introduce new test cases because it is already exercised by at least two existing ones (`compiler/inlining/StringConcatInfiniteLoop.java`, `compiler/loopopts/TestInfiniteLoopNotInnerMost.java`).
> - fuzzing (~30 min. on each platform).
This pull request has now been integrated.
Changeset: a25e1dc5
Author: Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a25e1dc53cecc5dd917ac0f76fd86ef1f074adba
Stats: 24 lines in 1 file changed: 18 ins; 0 del; 6 mod
8292285: C2: remove unreachable block after NeverBranch-to-Goto conversion
Reviewed-by: thartmann, chagedorn, kvn
-------------
PR: https://git.openjdk.org/jdk/pull/9853
More information about the hotspot-compiler-dev
mailing list