711 Commits

Author SHA1 Message Date
Christian Hagedorn
9f1516492c 8259049: Uninitialized variable after JDK-8257513
Reviewed-by: kvn, thartmann
2021-01-05 09:54:18 +00:00
Hao Sun
dd8996c5f5 8258946: Fix optimization-unstable code involving signed integer overflow
Reviewed-by: thartmann, kvn
2021-01-05 07:31:44 +00:00
Ioi Lam
5ea960728c 8258459: Decouple gc_globals.hpp from globals.hpp
Reviewed-by: lfoltan, coleenp
2021-01-05 05:57:08 +00:00
Claes Redestad
9d160aa1b7 8257815: Replace global log2 functions with efficient implementations
Reviewed-by: kbarrett, stefank
2021-01-04 21:01:25 +00:00
Jesper Wilhelmsson
f2bad3a0be Merge 2020-12-22 21:16:59 +00:00
Vladimir Ivanov
772addfd24 8258790: C2: Crash on empty macro node list
Reviewed-by: kvn, chagedorn
2020-12-22 12:12:21 +00:00
Xin Liu
30b9ff660f 8258653: CallJavaNode::_bci is not in use
Reviewed-by: kvn, vlivanov
2020-12-21 23:27:33 +00:00
Roberto Castañeda Lozano
4e8338eb13 8255763: C2: OSR miscompilation caused by invalid memory instruction placement
Disable GCM hoisting of memory-writing nodes for irreducible CFGs. This prevents
GCM from wrongly "hoisting" stores into descendants of their original loop. Such
an "inverted hoisting" can happen due to CFGLoop::compute_freq()'s inaccurate
estimation of frequencies for irreducible CFGs.

Extend CFG verification code by checking that memory-writing nodes are placed in
either their original loop or an ancestor.

Add tests for the reducible and irreducible cases. The former was already
handled correctly before the change (the frequency estimation model prevents
"inverted hoisting" for reducible CFGs), and is just added for coverage.

This change addresses the specific miscompilation issue in a conservative way,
for simplicity and safety. Future work includes investigating if only the
illegal blocks can be discarded as candidates for GCM hoisting, and refining
frequency estimation for irreducible CFGs.

Reviewed-by: kvn, chagedorn
2020-12-21 13:04:24 +00:00
Christian Hagedorn
8e42efaada 8257513: C2: assert((constant_addr - _masm.code()->consts()->start()) == con.offset())
Reviewed-by: kvn, thartmann
2020-12-21 08:06:48 +00:00
Igor Veresov
7f92d187b1 8258553: Limit number of fields in instance to be considered for scalar replacement
Reviewed-by: kvn, vlivanov
2020-12-18 21:08:04 +00:00
Jatin Bhateja
c11525a45e 8257772: Vectorizing clear memory operation using AVX-512 masked operations
Reviewed-by: thartmann, kvn
2020-12-17 04:42:19 +00:00
Jesper Wilhelmsson
11bd7a814f Merge 2020-12-17 03:04:19 +00:00
Ioi Lam
59f4c4aad5 8258075: Use auto variable declarations for enum iteration
Reviewed-by: jrose, ccheung
2020-12-16 19:39:24 +00:00
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
Ioi Lam
1d15ebe19e 8243205: Modularize JVM flags declaration
Reviewed-by: kvn, coleenp, stefank
2020-12-11 04:18:54 +00:00
Ioi Lam
d4282b0cfc 8257731: Remove excessive include of stubRoutines.hpp
Reviewed-by: coleenp, kvn
2020-12-10 23:57:35 +00:00
Ioi Lam
80dac5a87c 8257912: Convert enum iteration to use range-based for loops
Reviewed-by: kbarrett, tschatzl, gziemski
2020-12-10 20:33:13 +00:00
Claes Redestad
f57405617e 8256424: Move ciSymbol::symbol_name() to ciSymbols::symbol_name()
Reviewed-by: kvn, iklam
2020-12-10 17:22:48 +00:00
Dong Bo
026b09cf64 8257483: C2: Split immediate vector rotate from RotateLeftV and RotateRightV nodes
Reviewed-by: vlivanov
2020-12-10 12:26:04 +00:00
Roland Westrelin
d93293f31b 8256730: Code that uses Object.checkIndex() range checks doesn't optimize well
Reviewed-by: vlivanov, thartmann
2020-12-10 08:09:08 +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
Roland Westrelin
0b6b6eb59a 8257813: [redo] C2: Filter type in PhiNode::Value() for induction variables of trip-counted integer loops
Reviewed-by: chagedorn, kvn
2020-12-08 08:30:18 +00:00
Vladimir Ivanov
62c7788b29 8257211: C2: Enable call devirtualization during post-parse phase
Reviewed-by: kvn, neliasso, thartmann
2020-12-07 22:50:38 +00:00
Roland Westrelin
f5a582c287 8257575: C2: "failed: only phis" assert failure in loop strip mining verification
Reviewed-by: thartmann, neliasso
2020-12-07 09:38:22 +00:00
Aleksey Shipilev
e590618962 8252505: C1/C2 compiler support for blackholes
Reviewed-by: vlivanov, aph
2020-12-06 17:43:34 +00:00
Vladimir Kozlov
dd0b9454a2 8257531: Super word not applied to a loop of simple Buffer operations
Reviewed-by: roland, psandoz
2020-12-04 19:23:52 +00:00
Roland Westrelin
86b65756cb 8257574: C2: "failed: parsing found no loops but there are some" assert failure
Reviewed-by: thartmann, neliasso, chagedorn
2020-12-04 12:01:53 +00:00
Vladimir Ivanov
fbdc1877e2 8257624: C2: PhaseMacroExpand::eliminate_macro_nodes() crashes on out-of-bounds access into macro node array
Reviewed-by: neliasso, kvn
2020-12-04 09:37:18 +00:00
Vladimir Ivanov
fd6756ee2b 8257634: C2: Introduce IncrementalInliningForceCleanup diagnostic flag
Reviewed-by: kvn, adityam, thartmann
2020-12-04 09:24:08 +00:00
Christian Hagedorn
4a85514963 8257182: JCK test failures in integer / long rotation tests
Reviewed-by: mdoerr, vlivanov, thartmann, kvn
2020-12-04 08:10:31 +00:00
Vladimir Ivanov
f33808ffc9 8257631: C2: Assertion failure in ArrayCopyNode::get_count() during late inlining
Reviewed-by: neliasso, kvn, thartmann
2020-12-04 07:55:40 +00:00
Vladimir Ivanov
417e7e6317 8257632: C2: Late inlining attempt on a call with a dead memory crashes
Reviewed-by: neliasso, kvn, thartmann
2020-12-04 07:55:04 +00:00
Vladimir Ivanov
6845fee905 8257625: C2: Harden input checks in vector intrinsics
Reviewed-by: thartmann
2020-12-04 07:54:24 +00:00
Vladimir Ivanov
4390f2c8c3 8257630: C2: ReplacedNodes doesn't handle non-CFG multi nodes
Reviewed-by: neliasso, kvn, thartmann
2020-12-04 07:53:17 +00:00
Volker Simonis
d3f3c32282 8255742: PrintInlining as compiler directive doesn't print virtual calls
Reviewed-by: thartmann, kvn
2020-12-03 18:02:05 +00:00
Vladimir Kozlov
6c9482eef5 8257561: Some code is not vectorized after 8251925 and 8250607
Reviewed-by: chagedorn, vlivanov, thartmann
2020-12-03 17:02:04 +00:00
Tobias Hartmann
129c37700f 8257594: C2 compiled checkcast of non-null object triggers endless deoptimization/recompilation cycle
Reviewed-by: roland, vlivanov
2020-12-03 13:42:19 +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
Patric Hedlin
e3d0f27031 8257231: assert(!is_mcall || (call_returns[block->_pre_order] <= (uint) current_offset))
Reviewed-by: shade, chagedorn
2020-12-01 14:16:41 +00:00
Claes Redestad
2966d0d334 8257223: C2: Optimize RegMask::is_bound
Reviewed-by: kvn, neliasso
2020-12-01 13:18:32 +00:00
Christian Hagedorn
aa2d36f6de 8256807: C2: Not marking stores correctly as mismatched in string opts
Reviewed-by: vlivanov, roland, thartmann
2020-12-01 10:11:39 +00:00
Roland Westrelin
3d460bd295 8256655: rework long counted loop handling
Reviewed-by: kvn, thartmann, vlivanov
2020-12-01 07:30:51 +00:00
Tobias Hartmann
353e791a18 8257398: Enhance debug output in Type::check_symmetrical
Reviewed-by: vlivanov, chagedorn
2020-12-01 07:02:48 +00:00
Ioi Lam
f48737c7b3 8256254: Convert vmIntrinsics::ID to enum class
Reviewed-by: redestad, kvn
2020-12-01 05:35:29 +00:00
Per Liden
e3abe51a31 8257418: C2: Rename barrier data member in MemNode and LoadStoreNode
Reviewed-by: vlivanov
2020-11-30 14:15:43 +00:00
Vladimir Ivanov
337d7bce03 8257165: C2: Improve box elimination for vector masks and shuffles
Reviewed-by: kvn, thartmann
2020-11-30 10:36:38 +00:00
Vladimir Ivanov
4e55d0f31e 8257057: C2: Improve safepoint processing during vector scalarization pass
Reviewed-by: kvn, thartmann
2020-11-30 10:30:47 +00:00
Claes Redestad
9bcd2695c3 8257221: C2: RegMask::is_bound_set split set handling broken since JDK-8221404
Reviewed-by: kvn, neliasso
2020-11-30 08:18:32 +00:00
Vladimir Kozlov
816e8f83b8 8256999: Add C2 intrinsic for Reference.refersTo and PhantomReference::refersTo
Reviewed-by: pliden, vlivanov, rkennke, eosterlund, shade
2020-11-29 20:27:01 +00:00
Aleksey Shipilev
9a468d8599 8256757: Incorrect MachCallRuntimeNode::ret_addr_offset() for CallLeafNoFP on x86_32
Reviewed-by: jiefu, kvn
2020-11-27 06:47:30 +00:00