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

Accelerate Unsafe CAS Intrinsics on Aarch64 #7505

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions compiler/compile/OMRMethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,14 @@ OMR::Method::getParameterIterator(TR::Compilation&, TR_ResolvedMethod *)
}

bool
OMR::Method::isUnsafeCAS(TR::Compilation *comp)
OMR::Method::isUnsafeCAS()
{
TR_UNIMPLEMENTED();
return false;
}

bool
OMR::Method::isUnsafeWithObjectArg(TR::Compilation *comp)
OMR::Method::isUnsafeWithObjectArg()
{
TR_UNIMPLEMENTED();
return false;
Expand Down
4 changes: 2 additions & 2 deletions compiler/compile/OMRMethod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ class Method
virtual uint32_t numberOfExplicitParameters();
virtual bool isArchetypeSpecimen(){ return false; }
virtual void setArchetypeSpecimen(bool b = true);
virtual bool isUnsafeWithObjectArg(TR::Compilation * = NULL);
virtual bool isUnsafeCAS(TR::Compilation * = NULL);
virtual bool isUnsafeWithObjectArg();
virtual bool isUnsafeCAS();
virtual bool isFinalInObject();


Expand Down
1 change: 0 additions & 1 deletion compiler/compile/ResolvedMethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ bool TR_ResolvedMethod::isSameMethod(TR_ResolvedMethod *) { TR_
bool TR_ResolvedMethod::isNewInstanceImplThunk() { TR_UNIMPLEMENTED(); return false; }
bool TR_ResolvedMethod::isJNINative() { TR_UNIMPLEMENTED(); return false; }
bool TR_ResolvedMethod::isJITInternalNative() { TR_UNIMPLEMENTED(); return false; }
//bool TR_ResolvedMethod::isUnsafeWithObjectArg(TR::Compilation *) { TR_UNIMPLEMENTED(); return false; }
void * TR_ResolvedMethod::resolvedMethodAddress() { TR_UNIMPLEMENTED(); return 0; }
void * TR_ResolvedMethod::startAddressForJittedMethod() { TR_UNIMPLEMENTED(); return 0; }
void * TR_ResolvedMethod::startAddressForJNIMethod(TR::Compilation *) { TR_UNIMPLEMENTED(); return 0; }
Expand Down
14 changes: 5 additions & 9 deletions compiler/optimizer/RedundantAsyncCheckRemoval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,15 +435,11 @@ bool TR_RedundantAsyncCheckRemoval::callDoesAnImplicitAsyncCheck(TR::Node *callN
if (symbol->isNative() &&
((symbol->getRecognizedMethod()==TR::sun_misc_Unsafe_compareAndSwapInt_jlObjectJII_Z) ||
(symbol->getRecognizedMethod()==TR::sun_misc_Unsafe_compareAndSwapLong_jlObjectJJJ_Z) ||
(symbol->getRecognizedMethod()==TR::sun_misc_Unsafe_compareAndSwapObject_jlObjectJjlObjectjlObject_Z)))
return false;

if (symbol->isNative() &&
(comp()->target().cpu.isPower() || comp()->target().cpu.isX86() || comp()->target().cpu.isZ()) &&
((symbol->getRecognizedMethod()==TR::jdk_internal_misc_Unsafe_compareAndExchangeInt) ||
(symbol->getRecognizedMethod()==TR::jdk_internal_misc_Unsafe_compareAndExchangeLong) ||
(symbol->getRecognizedMethod()==TR::jdk_internal_misc_Unsafe_compareAndExchangeObject) ||
(symbol->getRecognizedMethod()==TR::jdk_internal_misc_Unsafe_compareAndExchangeReference)))
(symbol->getRecognizedMethod()==TR::sun_misc_Unsafe_compareAndSwapObject_jlObjectJjlObjectjlObject_Z) ||
(symbol->getRecognizedMethod()==TR::jdk_internal_misc_Unsafe_compareAndExchangeInt) ||
(symbol->getRecognizedMethod()==TR::jdk_internal_misc_Unsafe_compareAndExchangeLong) ||
(symbol->getRecognizedMethod()==TR::jdk_internal_misc_Unsafe_compareAndExchangeObject) ||
(symbol->getRecognizedMethod()==TR::jdk_internal_misc_Unsafe_compareAndExchangeReference)))
return false;
#endif
return true;
Expand Down