Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
3a87d66
implement unsigned bounds and known bits
merykitty Jan 20, 2024
61f4d21
refactor
merykitty Jan 20, 2024
d11497e
fix template parameter
merykitty Jan 20, 2024
12f268a
add unit tests
merykitty Jan 20, 2024
6b417f9
fix tests, add verify
merykitty Jan 20, 2024
756d615
add comments, group arguments to reduce C-style reference passing arg…
merykitty Jan 22, 2024
1faa48b
fix release build
merykitty Jan 22, 2024
ffb0abd
Merge branch 'master' into unsignedbounds
merykitty Mar 15, 2024
6e2e6c5
add comments
merykitty Mar 15, 2024
ec4ca3e
Merge branch 'master' into unsignedbounds
merykitty Aug 14, 2024
d5ad9f1
fix compile errors
merykitty Aug 14, 2024
2c3807b
address reviews
merykitty Sep 3, 2024
ae47385
move static_asserts
merykitty Sep 3, 2024
2bf545f
add more comments, group KnownBits
merykitty Sep 4, 2024
4f4a6be
fix build
merykitty Sep 4, 2024
8d14f8e
fix build
merykitty Sep 4, 2024
f164821
more explanation
merykitty Sep 5, 2024
5990628
rename tests
merykitty Sep 5, 2024
123e055
make should return the correct type
merykitty Sep 5, 2024
089c566
add trivial test cases
merykitty Sep 5, 2024
2e3955d
fix builds
merykitty Sep 5, 2024
e8ab32a
Merge branch 'master' into unsignedbounds
merykitty Sep 8, 2024
9b70213
change (~v & ones) == 0 to (v & ones) == ones
merykitty Sep 8, 2024
81f4e15
add doc to TypeInt, rename parameters, remove unused methods
merykitty Sep 10, 2024
a77e8f4
remove leftover code
merykitty Sep 10, 2024
2564378
refine comments
merykitty Sep 12, 2024
8a5370a
add comments, refactor functions to helper class
merykitty Sep 18, 2024
644bced
address reviews
merykitty Sep 19, 2024
f2d3f3b
formality
merykitty Sep 19, 2024
c440a72
comment adjust_lo empty case
merykitty Sep 20, 2024
4858e12
address reviews
merykitty Sep 20, 2024
7f3316f
Merge branch 'master' into unsignedbounds
merykitty Oct 20, 2024
41082f6
Merge branch 'master' into unsignedbounds
merykitty Nov 13, 2024
468834f
further reviews
merykitty Nov 13, 2024
c2d7d36
whitespace
merykitty Nov 13, 2024
dcc9030
build failures
merykitty Nov 13, 2024
7164653
build failure
merykitty Nov 13, 2024
8c0ac2f
Merge branch 'master' into unsignedbounds
merykitty Dec 6, 2024
cf1de62
move try_cast to Type
merykitty Dec 6, 2024
85acf6e
Merge branch 'master' into unsignedbounds
merykitty Dec 15, 2024
d033833
Merge branch 'master' into unsignedbounds
merykitty Jan 4, 2025
4d33014
copyright
merykitty Jan 4, 2025
539a032
Merge branch 'master' into unsignedbounds
merykitty Jan 22, 2025
c4d46c8
remove precompiled.hpp
merykitty Jan 22, 2025
98aaa03
Merge branch 'master' into unsignedbounds
merykitty Jan 27, 2025
ac1ddfc
Emmanuel's review
merykitty Jan 27, 2025
f85eff5
make con
merykitty Jan 28, 2025
01dc22d
exhaustive tests
kittyoracle Jan 29, 2025
c33576a
assignment operator
kittyoracle Jan 29, 2025
cf56091
refine first_violation
merykitty Jan 30, 2025
a849917
clean up intn_t
merykitty Jan 30, 2025
1d34a54
include
merykitty Jan 30, 2025
ee07d29
number lemmas
merykitty Jan 30, 2025
d87e036
harden SimpleCanonicalResult
merykitty Jan 30, 2025
0f347a5
Merge branch 'master' into unsignedbounds
merykitty Feb 12, 2025
3cd2586
Merge branch 'master' into unsignedbounds
merykitty Feb 13, 2025
5586036
refine comments
merykitty Feb 14, 2025
7b26016
Merge branch 'master' into unsignedbounds
merykitty Mar 3, 2025
727216f
reviews
merykitty Mar 3, 2025
9ca8023
Merge branch 'master' into unsignedbounds
merykitty Mar 25, 2025
cdab191
Merge branch 'master' into unsignedbounds
merykitty Apr 21, 2025
0fbbe5c
Explain what alignment means
merykitty Apr 22, 2025
fd7a7fa
More for Emanuel
merykitty Apr 22, 2025
eb3d69a
more rigour for ~hi
merykitty Apr 22, 2025
7a72c6f
Merge branch 'master' into unsignedbounds
merykitty Apr 30, 2025
547926e
formality for the non-existence case
merykitty Apr 30, 2025
0eafb3a
alignment note
merykitty Apr 30, 2025
1f53efa
grammar, more details for non-existence
merykitty May 1, 2025
654f833
wording
merykitty May 1, 2025
e215d69
clarify where overflow comes from
merykitty May 1, 2025
52d57e8
refer back to the formality section
merykitty May 1, 2025
b29ff4a
new_hi computation
merykitty May 1, 2025
3a2aa8d
Emanuel's reviews
merykitty May 1, 2025
5616c23
Emanuel's reviews
merykitty May 2, 2025
58978fb
Emanuel's reviews
merykitty May 2, 2025
95e5a23
intn_t refinements
merykitty May 2, 2025
25a6f9b
add some more sanity static_asserts
merykitty May 2, 2025
950a266
refine the cases where there does not exist a result
merykitty May 2, 2025
693cec2
refinement
merykitty May 2, 2025
56ffe4f
alignment wording
merykitty May 3, 2025
6be30c5
Emanuel's reviews
merykitty May 5, 2025
77aa406
add more intn_t tests
merykitty May 5, 2025
ad6ac7c
Merge branch 'master' into unsignedbounds
merykitty Jun 9, 2025
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
6 changes: 5 additions & 1 deletion src/hotspot/share/opto/castnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,11 @@ Node* ConstraintCastNode::make_cast_for_type(Node* c, Node* in, const Type* type

Node* ConstraintCastNode::optimize_integer_cast(PhaseGVN* phase, BasicType bt) {
PhaseIterGVN *igvn = phase->is_IterGVN();
const TypeInteger* this_type = this->type()->is_integer(bt);
const TypeInteger* this_type = this->type()->isa_integer(bt);
if (this_type == nullptr) {
return nullptr;
}

Node* z = in(1);
const TypeInteger* rx = nullptr;
const TypeInteger* ry = nullptr;
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/opto/compile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4521,7 +4521,9 @@ Node* Compile::conv_I2X_index(PhaseGVN* phase, Node* idx, const TypeInt* sizetyp
// number. (The prior range check has ensured this.)
// This assertion is used by ConvI2LNode::Ideal.
int index_max = max_jint - 1; // array size is max_jint, index is one less
if (sizetype != nullptr) index_max = sizetype->_hi - 1;
if (sizetype != nullptr && sizetype->_hi > 0) {
index_max = sizetype->_hi - 1;
}
const TypeInt* iidxtype = TypeInt::make(0, index_max, Type::WidenMax);
idx = constrained_convI2L(phase, idx, iidxtype, ctrl);
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/opto/compile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,8 @@ class Compile : public Phase {
bool copy_node_notes_to(Node* dest, Node* source);

// Workhorse function to sort out the blocked Node_Notes array:
inline Node_Notes* locate_node_notes(GrowableArray<Node_Notes*>* arr,
int idx, bool can_grow = false);
Node_Notes* locate_node_notes(GrowableArray<Node_Notes*>* arr,
int idx, bool can_grow = false);

void grow_node_notes(GrowableArray<Node_Notes*>* arr, int grow_by);

Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/opto/graphKit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3853,7 +3853,9 @@ Node* GraphKit::new_array(Node* klass_node, // array klass (maybe variable)
if (tilen != nullptr && tilen->_lo < 0) {
// Add a manual constraint to a positive range. Cf. array_element_address.
jint size_max = fast_size_limit;
if (size_max > tilen->_hi) size_max = tilen->_hi;
if (size_max > tilen->_hi && tilen->_hi >= 0) {
size_max = tilen->_hi;
}
const TypeInt* tlcon = TypeInt::make(0, size_max, Type::WidenMin);

// Only do a narrow I2L conversion if the range check passed.
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/opto/ifnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,8 +1046,7 @@ bool IfNode::fold_compares_helper(ProjNode* proj, ProjNode* success, ProjNode* f
if (failtype != nullptr) {
const TypeInt* type2 = filtered_int_type(igvn, n, fail);
if (type2 != nullptr) {
failtype = failtype->join(type2)->is_int();
if (failtype->empty()) {
if (failtype->filter(type2) == Type::TOP) {
// previous if determines the result of this if so
// replace Bool with constant
igvn->replace_input_of(this, 1, igvn->intcon(success->_con));
Expand Down
Loading