Skip to content

Commit

Permalink
Merge pull request #7277 from rmnattas/unsafe-checkTR_DisableUnsafe
Browse files Browse the repository at this point in the history
Check TR_DisableUnsafe before transforming Unsafe copyMemory & setMemory
  • Loading branch information
vijaysun-omr authored Feb 29, 2024
2 parents 9235a2f + c75d6d2 commit bf5fa84
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/compile/OMRCompilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,7 @@ bool OMR::Compilation::canTransformUnsafeCopyToArrayCopy()
{
if (!self()->getOptions()->realTimeGC() &&
!TR::Compiler->om.canGenerateArraylets() &&
!self()->getOption(TR_DisableUnsafe) &&
self()->cg()->canTransformUnsafeCopyToArrayCopy())
return true;

Expand All @@ -1684,6 +1685,7 @@ bool OMR::Compilation::canTransformUnsafeSetMemory()
{
if (!self()->getOptions()->realTimeGC() &&
!TR::Compiler->om.canGenerateArraylets() &&
!self()->getOption(TR_DisableUnsafe) &&
self()->cg()->canTransformUnsafeSetMemory())
return true;

Expand Down

0 comments on commit bf5fa84

Please sign in to comment.