59 Commits

Author SHA1 Message Date
Christian Hagedorn
ce36aeaac3 8257822: C2 crashes with SIGFPE due to a division that floats above its zero check
Reviewed-by: kvn, thartmann
2020-12-15 15:14:34 +00:00
Christian Hagedorn
1d0adbb812 8253644: C2: assert(skeleton_predicate_has_opaque(iff)) failed: unexpected
Reviewed-by: roland, kvn
2020-12-08 08:48:58 +00:00
Xin Liu
ce496cbda5 8257190: simplify PhaseIdealLoop constructors
Currently, C2 has 3 private constructors of PhaseIdealLoop as follows. a-b are for verification. only c is for real loop optimizations.
a. PhaseIdealLoop( PhaseIterGVN &igvn)
b. PhaseIdealLoop(PhaseIterGVN &igvn, const PhaseIdealLoop *verify_me)
c. PhaseIdealLoop(PhaseIterGVN &igvn, LoopOptsMode mode)

I propose 3 changes to simplify them.
1. add assertion in the constructor c. C2 shouldn't use mode = LoopOptsVerify for it.
2. merge a and b into one constructor.
3. make the merged verification ctor only for debug builds.

Reviewed-by: thartmann, kvn
2020-12-01 23:50:53 +00:00
Roland Westrelin
3d460bd295 8256655: rework long counted loop handling
Reviewed-by: kvn, thartmann, vlivanov
2020-12-01 07:30:51 +00:00
Aleksey Shipilev
69188188f4 8255265: IdealLoopTree::iteration_split_impl does not use should_align
Reviewed-by: thartmann, kvn
2020-10-26 07:16:10 +00:00
Vladimir Ivanov
27230fae24 8255026: C2: Miscellaneous cleanups in Compile and PhaseIdealLoop code
Reviewed-by: thartmann, neliasso, redestad
2020-10-21 07:34:54 +00:00
Tobias Hartmann
afd852ccb8 8241114: Better range handling
Reviewed-by: kvn, vlivanov, rhalade, ahgross
2020-10-20 14:58:37 -07:00
Roland Westrelin
e76de18956 8223051: support loops with long (64b) trip counts
Reviewed-by: vlivanov, thartmann, jrose
2020-10-19 11:30:13 +00:00
Roland Westrelin
a6c23b7753 8253923: C2 doesn't always run loop opts for compilations that include loops
Reviewed-by: neliasso, thartmann
2020-10-12 10:55:22 +00:00
Roland Westrelin
76a5852776 8253756: C2 CompilerThread0 crash in Node::add_req(Node*)
Reviewed-by: vlivanov, thartmann
2020-10-08 08:39:40 +00:00
Roland Westrelin
b1e2f026d9 8253524: C2: Refactor code that clones predicates during loop unswitching
Reviewed-by: chagedorn, kvn, thartmann
2020-09-24 10:00:33 +00:00
Roland Westrelin
3fe5886baf 8252696: Loop unswitching may cause out of bound array load to be executed
Reviewed-by: neliasso, chagedorn
2020-09-23 07:34:56 +00:00
Christian Hagedorn
8d30bb03ee 8249607: C2: assert(!had_error) failed: bad dominance
Fix prevented igvn optimization in SplitIf for LoadNodes which resulted in dominanance errors with loop strip mining.

Reviewed-by: roland, kvn
2020-08-31 12:10:25 +02:00
Xiaohong Gong
23ed3a9e91 8250808: Re-associate loop invariants with other associative operations
Reviewed-by: kvn, thartmann
2020-08-11 06:00:43 +00:00
Roland Westrelin
b67814941f 8229495: SIGILL in C2 generated OSR compilation
Reviewed-by: kvn, chagedorn
2020-07-01 17:28:49 +02:00
Roland Westrelin
05dc2af21f 8247824: CTW: C2 (Shenandoah) compilation fails with SEGV in SBC2Support::pin_and_expand
Reviewed-by: rkennke, thartmann
2020-06-18 13:51:40 +02:00
Patric Hedlin
d19f2bdec0 8234605: C2 failed "assert(C->live_nodes() - live_at_begin <= 2 * _nodes_required) failed: Bad node estimate: actual = 208 >> request = 101"
Reviewed-by: neliasso, kvn
2020-06-29 19:33:35 +02:00
Roland Westrelin
57388f807f 8244504: C2: refactor counted loop code in preparation for long counted loop
Reviewed-by: jrose, thartmann
2020-05-28 14:34:01 +02:00
Christian Hagedorn
c01e986cc9 8237859: C2: Crash when loads float above range check
Fix control edges of predicates to data nodes when creating pre/main/post loops.

Reviewed-by: neliasso, thartmann, roland
2020-03-25 14:41:52 +01:00
Christian Hagedorn
a51dd58f38 8240227: Loop predicates should be copied to unswitched loops
Copy loop range check predicates to unswitched loops and update their control edges.

Reviewed-by: kvn, neliasso, thartmann, roland
2020-03-19 10:15:28 +01:00
Tobias Hartmann
642d2ddcbc 8235452: Strip mined loop verification fails with assert(is_OuterStripMinedLoop()) failed: invalid node class
Do not try to verify strip mining if the strip mined loop is malformed.

Reviewed-by: roland, vlivanov
2019-12-11 10:42:44 +01:00
Patric Hedlin
902858e3ce 8231565: More node budget asserts in fuzzed tests
Reviewed-by: neliasso, thartmann
2019-10-23 12:51:53 +02:00
Patric Hedlin
8275b17b07 8229499: Node budget assert in fuzzed test
Reviewed-by: thartmann, neliasso
2019-09-12 11:44:51 +02:00
Roland Westrelin
9b81fe37f2 8230470: Shenandoah doesn't need change from JDK-8212610 anymore
Reviewed-by: thartmann
2019-09-03 09:28:42 +02:00
Nils Eliasson
75e9d0a290 8224675: Late GC barrier insertion for ZGC
Reviewed-by: roland, eosterlund, pliden
2019-02-14 14:54:05 +01:00
Patric Hedlin
d222b01dee 8223363: Bad node estimate assertion failure
8223502: Node estimate for loop unswitching is not correct: assert(delta <= 2 * required) failed: Bad node estimate
8224648: assert(!exceeding_node_budget()) failed: Too many NODES required! failure with ctw

Tighten the node estimates. New est_loop_clone_sz() implementation that will compute a "fan-out" complexity estimate as part of the size estimate (to better estimate complex loop body size after cloning). New est_loop_unroll_sz() function, used to estimate the size of a loop body att full/maximal unrolling. Correction to node budget final tests and asserts.

Reviewed-by: neliasso, kvn
2019-05-28 14:56:58 +02:00
Aleksey Shipilev
c6307aec19 8223911: Disable bad node budget verification until the fix
Reviewed-by: kvn, thartmann
2019-05-15 11:53:47 +02:00
Patric Hedlin
e08506e683 8216137: assert failed: Live node limit exceeded
8219520: assert failed: Live node limit exceeded

Adding simplistic node budget support for loop-transformations. This /should/attempts to/ resolve most cases of: "assert(Compile::current()->live_nodes() < Compile::current()->max_node_limit()) failed: Live Node limit exceeded limit".

Reviewed-by: vlivanov, neliasso
2019-04-17 14:57:53 +02:00
Patric Hedlin
8088ed8317 8223143: Restructure/clean-up for 'loopexit_or_null()'
Minor restructure and clean-up for 'loopexit_or_null()' and its use.

Reviewed-by: vlivanov
2019-04-17 14:56:45 +02:00
Patric Hedlin
ceef0f69dc 8223139: Rename mandatory policy-do routines
Rename 'policy_do_remove_empty_loop' to 'do_remove_empty_loop', 'policy_do_one_iteration_loop' to 'do_one_iteration_loop'.

Reviewed-by: vlivanov, dl
2019-04-17 14:55:01 +02:00
Patric Hedlin
205085d8d5 8223138: Small clean-up in loop-tree support
Rename predicate 'is_inner()' to 'is_innermost()' to be accurate. Added 'is_root()' predicate for root parent test in loop-tree. Changed definition of 'is_loop()' to always lazy-read the tail, since it should never be NULL. Cleanup of 'tail()' definition.

Reviewed-by: vlivanov, neliasso
2019-05-02 11:05:47 +02:00
Patric Hedlin
fcbca82247 8223137: Rename predicate 'do_unroll_only()' to 'is_unroll_only()'
Reviewed-by: vlivanov
2019-04-17 14:52:25 +02:00
Roman Kennke
03ab1404f0 8221766: Load-reference barriers for Shenandoah
Reviewed-by: kvn, erikj, aph, shade
2019-04-02 23:00:22 +02:00
Vladimir Ivanov
40c61cce4b 8218874: C2: Unsafe to access PhaseIdealLoop outside of constructors
Reviewed-by: thartmann, kvn
2019-02-14 15:27:12 -08:00
Jesper Wilhelmsson
a8c5f1e59a Merge 2019-01-15 22:54:09 +01:00
Patric Hedlin
a17df8d45b 8210392: assert(Compile::current()->live_nodes() < Compile::current()->max_node_limit()) failed: Live Node limit exceeded limit
Avoid excessive split-if.

Reviewed-by: thartmann, neliasso
2018-12-18 10:12:28 +01:00
Roland Westrelin
6bbfc1d2a8 8216135: C2 assert(!had_error) failed: bad dominance
Reviewed-by: thartmann, kvn
2019-01-14 15:07:22 +01:00
Roland Westrelin
103c8dc608 8215265: C2: range check elimination may allow illegal out of bound access
Reviewed-by: thartmann, kvn
2018-12-14 11:22:26 +01:00
Rahul Raghavan
5a6385b363 8211698: Crash in C2 compiled code during execution of double array heavy processing code
Correctly registered new Opaque4Node in add_range_check_predicate

Reviewed-by: roland, thartmann
2018-12-18 19:13:54 +05:30
Coleen Phillimore
154a1a02bf 8216167: Update include guards to reflect correct directories
Use script and some manual fixup to fix directores names in include guards.

Reviewed-by: lfoltan, eosterlund, kbarrett
2019-01-10 15:13:51 -05:00
Vivek Deshpande
05e175bf1b 8214751: X86: Support for VNNI Instructions
Co-authored-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
Reviewed-by: kvn
2018-12-12 14:48:34 -08:00
Roman Kennke
8b62a2ee9d 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
Co-authored-by: Christine Flood <chf@redhat.com>
Co-authored-by: Aleksey Shipilev <shade@redhat.com>
Co-authored-by: Roland Westrelin <rwestrel@redhat.com>
Co-authored-by: Zhenygu Gu <zgu@redhat.com>
Co-authored-by: Andrew Haley <aph@redhat.com>
Co-authored-by: Andrew Dinn <adinn@redhat.com>
Co-authored-by: Mario Torre <mtorre@redhat.com>
Reviewed-by: kvn, roland, shade, coleenp, lmesnik, pliden, jgeorge, ihse, erikj
2018-12-10 15:47:44 +01:00
Roland Westrelin
8f4456e77a 8211451: ~2.5% regression on compression benchmark starting with 12-b11
Reviewed-by: kvn, thartmann
2018-11-08 10:20:04 +01:00
Roland Westrelin
8e57878e0a 8212610: Fix handling of memory in PhaseIdealLoop::clone_loop_predicates()
Reviewed-by: kvn, thartmann
2018-11-05 13:13:29 +01:00
Roland Westrelin
40af989884 8209686: cleanup arguments to PhaseIdealLoop() constructor
Reviewed-by: thartmann, kvn, pliden
2018-08-22 10:36:39 +02:00
Thomas Schatzl
e98c176026 8208670: Compiler changes to allow enabling -Wreorder
Reviewed-by: kvn
2018-08-08 15:31:06 +02:00
Vivek Deshpande
29cd9fe2ea 8194740: UseSubwordForMaxVector causes performance regression
Reviewed-by: kvn, thartmann
2018-07-09 13:25:08 -07:00
Tobias Hartmann
d2f70d7052 8205033: [REDO] Induction variable of over-unrolled loop conflicts with range checks
Update skeleton predicates before main loop during unrolling to remove dead code.

Reviewed-by: kvn, roland
2018-06-19 12:25:42 +02:00
Roland Westrelin
97dd8bf743 8203197: C2: consider all paths in loop body for loop predication
Reviewed-by: kvn, neliasso
2018-06-19 09:08:39 +02:00
Tobias Hartmann
d01224d43e 8205034: [BACKOUT] Induction variable of over-unrolled loop conflicts with range checks
Backout fix for JDK-8203915 because it causes SIGILL failures.

Reviewed-by: shade
2018-06-14 11:22:04 +02:00