Skip to content

Commit

Permalink
Remove incorrect transformation of getAndSet
Browse files Browse the repository at this point in the history
getAndSet returns the old value of the memory address instead of a
boolean. The correspondent atomic symbol hasn't been implemented, thus
remove the incorrent transformation for now.

Signed-off-by: Liqun Liu <liqunl@ca.ibm.com>
  • Loading branch information
Liqun Liu committed Sep 18, 2018
1 parent d01f5df commit a6ea96e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions runtime/compiler/optimizer/J9RecognizedCallTransformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,8 @@ bool J9::RecognizedCallTransformer::isInlineable(TR::TreeTop* treetop)
switch(node->getSymbol()->castToMethodSymbol()->getMandatoryRecognizedMethod())
{
case TR::sun_misc_Unsafe_getAndAddInt:
case TR::sun_misc_Unsafe_getAndSetInt:
return TR::Compiler->target.cpu.isX86() && !comp()->getOption(TR_DisableUnsafe) && !comp()->compileRelocatableCode() && !TR::Compiler->om.canGenerateArraylets();
case TR::sun_misc_Unsafe_getAndAddLong:
case TR::sun_misc_Unsafe_getAndSetLong:
return TR::Compiler->target.cpu.isX86() && !comp()->getOption(TR_DisableUnsafe) && !comp()->compileRelocatableCode() && TR::Compiler->target.is64Bit() && !TR::Compiler->om.canGenerateArraylets();
case TR::java_lang_Class_isAssignableFrom:
return cg()->supportsInliningOfIsAssignableFrom();
Expand Down Expand Up @@ -164,15 +162,9 @@ void J9::RecognizedCallTransformer::transform(TR::TreeTop* treetop)
case TR::sun_misc_Unsafe_getAndAddInt:
processUnsafeAtomicCall(treetop, node, TR::SymbolReferenceTable::atomicFetchAndAdd32BitSymbol);
break;
case TR::sun_misc_Unsafe_getAndSetInt:
processUnsafeAtomicCall(treetop, node, TR::SymbolReferenceTable::atomicSwap32BitSymbol);
break;
case TR::sun_misc_Unsafe_getAndAddLong:
processUnsafeAtomicCall(treetop, node, TR::SymbolReferenceTable::atomicFetchAndAdd64BitSymbol);
break;
case TR::sun_misc_Unsafe_getAndSetLong:
processUnsafeAtomicCall(treetop, node, TR::SymbolReferenceTable::atomicSwap64BitSymbol);
break;
case TR::java_lang_Class_isAssignableFrom:
process_java_lang_Class_IsAssignableFrom(treetop, node);
break;
Expand Down

0 comments on commit a6ea96e

Please sign in to comment.