Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
dfa0afa
8335392
eme64 Jul 1, 2024
0cf7be6
rm old code
eme64 Jul 1, 2024
98ee6eb
MemPointer::parse_simple_form WIP
eme64 Jul 2, 2024
0762947
manual merge
eme64 Jul 4, 2024
702efad
refactor
eme64 Jul 5, 2024
d9e9206
Merge branch 'master' into JDK-8335392-MemPointer
eme64 Jul 8, 2024
52b00ff
shift and some printing
eme64 Jul 8, 2024
2fbd546
create a proper MemPointerSimpleForm from the summands
eme64 Jul 9, 2024
fcc317f
node -> variable renaming
eme64 Jul 9, 2024
f1d5c87
more work on scale
eme64 Jul 10, 2024
9d7bf14
64-bit vs 32 bit
eme64 Jul 10, 2024
bb2f2a3
replace jlong with jint
eme64 Jul 10, 2024
adec9f7
add comment
eme64 Jul 10, 2024
4769cbf
introduce NoOverflowInt
eme64 Jul 10, 2024
21048a7
some bits
eme64 Jul 10, 2024
4a60797
handle sub
eme64 Jul 11, 2024
e116e1b
move from constructor to init
eme64 Jul 12, 2024
b0e1b37
MemPointerAliasing
eme64 Jul 12, 2024
c13b0f5
move some code, start with is_adjacent_to_and_before impl
eme64 Jul 12, 2024
6aff01f
MemPointerSimpleForm::get_aliasing_with
eme64 Jul 12, 2024
da2d6d3
casts
eme64 Jul 15, 2024
8f3faac
work on tests now
eme64 Jul 15, 2024
fbbb127
wip fuzzing
eme64 Jul 15, 2024
4add54d
make slicker
eme64 Jul 15, 2024
39a6f4c
rm test stub
eme64 Aug 12, 2024
37de864
add another test case
eme64 Aug 12, 2024
dcb5e96
Handle AddI overflow
eme64 Aug 12, 2024
1414e6d
SubI test
eme64 Aug 12, 2024
7cfe51e
fix SubI parsing
eme64 Aug 12, 2024
6efccfd
refactor is_safe_from_int_overflow
eme64 Aug 13, 2024
9dd172f
fix LShiftI
eme64 Aug 13, 2024
2f501dc
fix MulI
eme64 Aug 13, 2024
ccb2df4
fix test400a
eme64 Aug 13, 2024
9829b5d
fix 600 series of tests
eme64 Aug 13, 2024
845801b
some TODOs
eme64 Aug 13, 2024
9129776
first attempts at sort
eme64 Aug 14, 2024
f068b0b
TraceMergeStores CompileCommand refactor
eme64 Aug 14, 2024
128c710
more details for tracing
eme64 Aug 14, 2024
a806691
make printing more concise
eme64 Aug 14, 2024
06424ba
test601a only for 64bit
eme64 Aug 14, 2024
ea0f047
NoOverflowInt in its own file
eme64 Aug 14, 2024
c385835
NoOverflowInt gtests
eme64 Aug 14, 2024
d76db70
more test, and fix truncate_to_30_bits
eme64 Aug 14, 2024
899da47
simplify MemPointerAliasing to Always and Unknown
eme64 Aug 14, 2024
49b96a6
10 vs 11 summands test
eme64 Aug 15, 2024
5a299dc
address some small issues
eme64 Aug 15, 2024
c7561dd
combine summands
eme64 Aug 15, 2024
402cc0d
handle zero and NaN scale summands
eme64 Aug 15, 2024
afbff60
rm scaleL NaN case
eme64 Aug 15, 2024
c39d7ca
manual merge
eme64 Aug 15, 2024
64ea993
simple -> linear
eme64 Aug 15, 2024
f7419ab
beautify parsing
eme64 Aug 15, 2024
9deaa48
parse through ConvI2L on 32bit
eme64 Aug 15, 2024
d810b5e
address some of Christians feedback
eme64 Aug 15, 2024
4d1200b
make more elegant, add comments
eme64 Aug 15, 2024
048cba9
more comments
eme64 Aug 15, 2024
efcbb70
TestMergeStoresMemorySegment.java from compiler/loopopts/superword/Te…
eme64 Aug 15, 2024
55aa851
add BASIC tag
eme64 Aug 16, 2024
47f4b70
implement tests for TestMergeStoresMemorySegment.java
eme64 Aug 16, 2024
737432c
rm some TODOs
eme64 Aug 16, 2024
5b7b06d
small fixes
eme64 Aug 16, 2024
1b7e0dc
rename linear -> decomposed
eme64 Aug 16, 2024
23916a8
beautify some more things
eme64 Aug 16, 2024
6545579
more ideas
eme64 Aug 16, 2024
e5a8606
Merge branch 'master' into JDK-8335392-MemPointer
eme64 Sep 10, 2024
9ded881
fix the default
eme64 Sep 10, 2024
17712f8
first part of the proof
eme64 Sep 10, 2024
075aa44
move proof to hpp
eme64 Sep 11, 2024
ec376b9
improve the proof
eme64 Sep 11, 2024
c314db9
more proof
eme64 Sep 11, 2024
fdc67d8
rm scaleL, was not even necessary!
eme64 Sep 11, 2024
f9e655c
finishing up more proofs
eme64 Sep 11, 2024
0687da5
add precompiled.hpp to gtest
eme64 Sep 11, 2024
ae68fa7
fix build and test
eme64 Sep 12, 2024
3132781
Merge branch 'master' into JDK-8335392-MemPointer
eme64 Oct 15, 2024
3c333ba
Merge branch 'master' into JDK-8335392-MemPointer
eme64 Oct 17, 2024
d716e9a
more examples and comments for Vladimir
eme64 Oct 18, 2024
5315005
some unsafe and native benchmarks added
eme64 Oct 18, 2024
a911b63
updates for Vladimir
eme64 Oct 21, 2024
b8fc83b
rm dead assert
eme64 Oct 21, 2024
a35a7cf
changes to NoOverflowInt for Dean
eme64 Oct 22, 2024
8f58e88
manual merge with master
eme64 Oct 29, 2024
75400f2
Apply suggestions from code review
eme64 Oct 29, 2024
93f123a
Apply suggestions from code review
eme64 Oct 29, 2024
072452c
Apply suggestions from code review
eme64 Oct 29, 2024
c52c5b6
Apply suggestions from code review
eme64 Oct 29, 2024
46bcc48
more updates for Christian
eme64 Oct 29, 2024
51381eb
whitespace
eme64 Oct 29, 2024
9f442d2
fix distance assert
eme64 Oct 29, 2024
63496f3
Apply suggestions from code review
eme64 Nov 1, 2024
3ca647e
apply more suggestions from Christian
eme64 Nov 1, 2024
e8ad275
Merge branch 'master' into JDK-8335392-MemPointer
eme64 Nov 1, 2024
e2550c9
Apply suggestions from code review
eme64 Nov 1, 2024
d10b76f
more review applications
eme64 Nov 1, 2024
03219bb
Apply suggestions from code review
eme64 Nov 4, 2024
823bed7
Update test/hotspot/jtreg/compiler/c2/TestMergeStoresMemorySegment.java
eme64 Nov 4, 2024
c1f274f
more changes for Christian
eme64 Nov 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/hotspot/share/compiler/compilerDirectives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "memory/resourceArea.hpp"
#include "opto/phasetype.hpp"
#include "opto/traceAutoVectorizationTag.hpp"
#include "opto/traceMergeStoresTag.hpp"
#include "runtime/globals_extension.hpp"

CompilerDirectives::CompilerDirectives() : _next(nullptr), _match(nullptr), _ref_count(0) {
Expand Down Expand Up @@ -302,7 +303,8 @@ DirectiveSet::DirectiveSet(CompilerDirectives* d) :
_inlinematchers(nullptr),
_directive(d),
_ideal_phase_name_set(PHASE_NUM_TYPES, mtCompiler),
_trace_auto_vectorization_tags(TRACE_AUTO_VECTORIZATION_TAG_NUM, mtCompiler)
_trace_auto_vectorization_tags(TRACE_AUTO_VECTORIZATION_TAG_NUM, mtCompiler),
_trace_merge_stores_tags(TraceMergeStores::TAG_NUM, mtCompiler)
{
#define init_defaults_definition(name, type, dvalue, compiler) this->name##Option = dvalue;
compilerdirectives_common_flags(init_defaults_definition)
Expand Down Expand Up @@ -432,7 +434,6 @@ DirectiveSet* DirectiveSet::compilecommand_compatibility_init(const methodHandle
compilerdirectives_c1_flags(init_default_cc)
#undef init_default_cc

// Parse PrintIdealPhaseName and create a lookup set
#ifndef PRODUCT
#ifdef COMPILER2
if (!_modified[TraceAutoVectorizationIndex]) {
Expand All @@ -445,6 +446,17 @@ DirectiveSet* DirectiveSet::compilecommand_compatibility_init(const methodHandle
}
}
}
if (!_modified[TraceMergeStoresIndex]) {
// Parse ccstr and create mask
ccstrlist option;
if (CompilerOracle::has_option_value(method, CompileCommandEnum::TraceMergeStores, option)) {
TraceMergeStores::TagValidator validator(option, false);
if (validator.is_valid()) {
set.cloned()->set_trace_merge_stores_tags(validator.tags());
}
}
}
// Parse PrintIdealPhaseName and create a lookup set
if (!_modified[PrintIdealPhaseIndex]) {
// Parse ccstr and create set
ccstrlist option;
Expand Down
8 changes: 8 additions & 0 deletions src/hotspot/share/compiler/compilerDirectives.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ NOT_PRODUCT(cflags(IGVPrintLevel, intx, PrintIdealGraphLevel, IGVPrintLeve
cflags(MaxNodeLimit, intx, MaxNodeLimit, MaxNodeLimit)
#define compilerdirectives_c2_string_flags(cflags) \
NOT_PRODUCT(cflags(TraceAutoVectorization, ccstrlist, "", TraceAutoVectorization)) \
NOT_PRODUCT(cflags(TraceMergeStores, ccstrlist, "", TraceMergeStores)) \
NOT_PRODUCT(cflags(PrintIdealPhase, ccstrlist, "", PrintIdealPhase))
#else
#define compilerdirectives_c2_other_flags(cflags)
Expand Down Expand Up @@ -131,6 +132,7 @@ class DirectiveSet : public CHeapObj<mtCompiler> {
TriBoolArray<(size_t)vmIntrinsics::number_of_intrinsics(), int> _intrinsic_control_words;
CHeapBitMap _ideal_phase_name_set;
CHeapBitMap _trace_auto_vectorization_tags;
CHeapBitMap _trace_merge_stores_tags;

public:
DirectiveSet(CompilerDirectives* directive);
Expand Down Expand Up @@ -211,6 +213,12 @@ void set_##name(void* value) { \
const CHeapBitMap& trace_auto_vectorization_tags() {
return _trace_auto_vectorization_tags;
};
void set_trace_merge_stores_tags(const CHeapBitMap& tags) {
_trace_merge_stores_tags.set_from(tags);
};
const CHeapBitMap& trace_merge_stores_tags() {
return _trace_merge_stores_tags;
};

void print_intx(outputStream* st, ccstr n, intx v, bool mod) { if (mod) { st->print("%s:" INTX_FORMAT " ", n, v); } }
void print_uintx(outputStream* st, ccstr n, intx v, bool mod) { if (mod) { st->print("%s:" UINTX_FORMAT " ", n, v); } }
Expand Down
7 changes: 7 additions & 0 deletions src/hotspot/share/compiler/compilerOracle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "oops/symbol.hpp"
#include "opto/phasetype.hpp"
#include "opto/traceAutoVectorizationTag.hpp"
#include "opto/traceMergeStoresTag.hpp"
#include "runtime/globals_extension.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/jniHandles.hpp"
Expand Down Expand Up @@ -802,6 +803,12 @@ static void scan_value(enum OptionType type, char* line, int& total_bytes_read,
else if (option == CompileCommandEnum::TraceAutoVectorization) {
TraceAutoVectorizationTagValidator validator(value, true);

if (!validator.is_valid()) {
jio_snprintf(errorbuf, buf_size, "Unrecognized tag name in %s: %s", option2name(option), validator.what());
}
} else if (option == CompileCommandEnum::TraceMergeStores) {
TraceMergeStores::TagValidator validator(value, true);

if (!validator.is_valid()) {
jio_snprintf(errorbuf, buf_size, "Unrecognized tag name in %s: %s", option2name(option), validator.what());
}
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/compiler/compilerOracle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ NOT_PRODUCT(option(PrintIdeal, "PrintIdeal", Bool)) \
NOT_PRODUCT(option(PrintIdealPhase, "PrintIdealPhase", Ccstrlist)) \
NOT_PRODUCT(option(IGVPrintLevel, "IGVPrintLevel", Intx)) \
NOT_PRODUCT(option(TraceAutoVectorization, "TraceAutoVectorization", Ccstrlist)) \
NOT_PRODUCT(option(TraceMergeStores, "TraceMergeStores", Ccstrlist)) \
option(Vectorize, "Vectorize", Bool) \
option(CloneMapDebug, "CloneMapDebug", Bool) \
option(IncrementalInlineForceCleanup, "IncrementalInlineForceCleanup", Bool) \
Expand Down
10 changes: 10 additions & 0 deletions src/hotspot/share/compiler/directivesParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "memory/resourceArea.hpp"
#include "opto/phasetype.hpp"
#include "opto/traceAutoVectorizationTag.hpp"
#include "opto/traceMergeStoresTag.hpp"
#include "runtime/os.hpp"
#include <string.h>

Expand Down Expand Up @@ -347,6 +348,15 @@ bool DirectivesParser::set_option_flag(JSON_TYPE t, JSON_VAL* v, const key* opti
} else {
error(VALUE_ERROR, "Unrecognized tag name detected in TraceAutoVectorization: %s", validator.what());
}
} else if (strncmp(option_key->name, "TraceMergeStores", 16) == 0) {
TraceMergeStores::TagValidator validator(s, false);

valid = validator.is_valid();
if (valid) {
set->set_trace_merge_stores_tags(validator.tags());
} else {
error(VALUE_ERROR, "Unrecognized tag name detected in TraceMergeStores: %s", validator.what());
}
} else if (strncmp(option_key->name, "PrintIdealPhase", 15) == 0) {
PhaseNameValidator validator(s);

Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/opto/c2_globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,6 @@
product(bool, MergeStores, true, DIAGNOSTIC, \
"Optimize stores by combining values into larger store") \
\
develop(bool, TraceMergeStores, false, \
"Trace creation of merged stores") \
\
product_pd(bool, OptoBundling, \
"Generate nops to fill i-cache lines") \
\
Expand Down
Loading