Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add can skip null value store check #7184

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions compiler/il/OMRMethodSymbol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ class OMR_EXTENSIBLE MethodSymbol : public TR::Symbol
bool safeToSkipDivChecks() { return false; }
bool safeToSkipCheckCasts() { return false; }
bool safeToSkipArrayStoreChecks() { return false; }
bool safeToSkipNonNullableArrayNullStoreCheck() { return false; }
bool safeToSkipZeroInitializationOnNewarrays() { return false; }
bool safeToSkipChecksOnArrayCopies() { return false; }

Expand Down
15 changes: 8 additions & 7 deletions compiler/il/OMRResolvedMethodSymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,14 @@ OMR::ResolvedMethodSymbol::ResolvedMethodSymbol(TR_ResolvedMethod * method, TR::

self()->setParameterList();

_properties.set(CanSkipNullChecks , self()->safeToSkipNullChecks());
_properties.set(CanSkipBoundChecks , self()->safeToSkipBoundChecks());
_properties.set(CanSkipCheckCasts , self()->safeToSkipCheckCasts());
_properties.set(CanSkipDivChecks , self()->safeToSkipDivChecks());
_properties.set(CanSkipArrayStoreChecks , self()->safeToSkipArrayStoreChecks());
_properties.set(CanSkipChecksOnArrayCopies , self()->safeToSkipChecksOnArrayCopies());
_properties.set(CanSkipZeroInitializationOnNewarrays, self()->safeToSkipZeroInitializationOnNewarrays());
_properties.set(CanSkipNullChecks , self()->safeToSkipNullChecks());
_properties.set(CanSkipBoundChecks , self()->safeToSkipBoundChecks());
_properties.set(CanSkipCheckCasts , self()->safeToSkipCheckCasts());
_properties.set(CanSkipDivChecks , self()->safeToSkipDivChecks());
_properties.set(CanSkipArrayStoreChecks , self()->safeToSkipArrayStoreChecks());
_properties.set(CanSkipNonNullableArrayNullStoreCheck, self()->safeToSkipNonNullableArrayNullStoreCheck());
_properties.set(CanSkipChecksOnArrayCopies , self()->safeToSkipChecksOnArrayCopies());
_properties.set(CanSkipZeroInitializationOnNewarrays , self()->safeToSkipZeroInitializationOnNewarrays());
}


Expand Down
3 changes: 2 additions & 1 deletion compiler/il/OMRResolvedMethodSymbol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ class OMR_EXTENSIBLE ResolvedMethodSymbol : public TR::MethodSymbol
bool skipCheckCasts() { return _properties.testAny(CanSkipCheckCasts); }
bool skipDivChecks() { return _properties.testAny(CanSkipDivChecks); }
bool skipArrayStoreChecks() { return _properties.testAny(CanSkipArrayStoreChecks); }
bool skipNonNullableArrayNullStoreCheck() { return _properties.testAny(CanSkipNonNullableArrayNullStoreCheck); }
bool skipChecksOnArrayCopies() { return _properties.testAny(CanSkipChecksOnArrayCopies); }
bool skipZeroInitializationOnNewarrays() { return _properties.testAny(CanSkipZeroInitializationOnNewarrays); }

Expand Down Expand Up @@ -336,7 +337,7 @@ class OMR_EXTENSIBLE ResolvedMethodSymbol : public TR::MethodSymbol
CanSkipZeroInitializationOnNewarrays = 1 << 5,
CanSkipArrayStoreChecks = 1 << 6,
HasSnapshots = 1 << 7,
// AVAILABLE = 1 << 8,
CanSkipNonNullableArrayNullStoreCheck = 1 << 8,
CanDirectNativeCall = 1 << 9,
CanReplaceWithHWInstr = 1 << 10,
IsSideEffectFree = 1 << 12,
Expand Down
Loading