RFR: JDK-8277139 Improve code readability in PredecessorValidator (c1_IR.cpp) [v3]
Ludvig Janiuk
duke at openjdk.java.net
Thu Nov 25 16:21:02 UTC 2021
On Thu, 25 Nov 2021 08:30:19 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> I've split these loops up on purpose because I want to separate concerns. I appreciate the urge to optimize for fewer iterations, but I think the added readability will enable other, bigger optimizations.
>
> I don't have a strict opinion here but I thought the assertions belong to the `block->end()->sux_at(i)/block->exception_handler_at(i)` calls below as an additional verification of the kind of blocks. But I'm fine with both.
My reading was that `PredecessorValidator` validates several things. Validating the flags in one concern, the other is what happens in `verify_block_preds_against_collected_preds`. And `collect_predecessors` is just necessary to make `verify_block_preds_against_collected_preds` possible.
I can sort of imagine what you mean, but those assertions aren't necessary for a call to `block->end()->sux_at(i)`. So I'll keep it as is if it's fine by you.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6394
More information about the hotspot-compiler-dev
mailing list