mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-31 10:09:59 +00:00
8194740: UseSubwordForMaxVector causes performance regression
Reviewed-by: kvn, thartmann
This commit is contained in:
parent
cb2d33f02c
commit
29cd9fe2ea
@ -861,7 +861,9 @@ bool IdealLoopTree::policy_unroll(PhaseIdealLoop *phase) {
|
||||
|
||||
// Check for being too big
|
||||
if (body_size > (uint)_local_loop_unroll_limit) {
|
||||
if ((UseSubwordForMaxVector || xors_in_loop >= 4) && body_size < (uint)LoopUnrollLimit * 4) return true;
|
||||
if ((cl->is_subword_loop() || xors_in_loop >= 4) && body_size < (uint)LoopUnrollLimit * 4) {
|
||||
return true;
|
||||
}
|
||||
// Normal case: loop too big
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -75,7 +75,8 @@ protected:
|
||||
HasRangeChecks=8192,
|
||||
IsMultiversioned=16384,
|
||||
StripMined=32768,
|
||||
ProfileTripFailed=65536};
|
||||
SubwordLoop=65536,
|
||||
ProfileTripFailed=131072};
|
||||
char _unswitch_count;
|
||||
enum { _unswitch_max=3 };
|
||||
char _postloop_flags;
|
||||
@ -99,6 +100,7 @@ public:
|
||||
bool partial_peel_has_failed() const { return _loop_flags & PartialPeelFailed; }
|
||||
bool is_strip_mined() const { return _loop_flags & StripMined; }
|
||||
bool is_profile_trip_failed() const { return _loop_flags & ProfileTripFailed; }
|
||||
bool is_subword_loop() const { return _loop_flags & SubwordLoop; }
|
||||
|
||||
void mark_partial_peel_failed() { _loop_flags |= PartialPeelFailed; }
|
||||
void mark_has_reductions() { _loop_flags |= HasReductions; }
|
||||
@ -112,6 +114,7 @@ public:
|
||||
void mark_strip_mined() { _loop_flags |= StripMined; }
|
||||
void clear_strip_mined() { _loop_flags &= ~StripMined; }
|
||||
void mark_profile_trip_failed() { _loop_flags |= ProfileTripFailed; }
|
||||
void mark_subword_loop() { _loop_flags |= SubwordLoop; }
|
||||
|
||||
int unswitch_max() { return _unswitch_max; }
|
||||
int unswitch_count() { return _unswitch_count; }
|
||||
|
||||
@ -376,6 +376,7 @@ void SuperWord::unrolling_analysis(int &local_loop_unroll_factor) {
|
||||
if (same_type) {
|
||||
max_vector = cur_max_vector;
|
||||
flag_small_bt = true;
|
||||
cl->mark_subword_loop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user