Skip to content

Commit

Permalink
Use Compilation API for asking if recursive method target
Browse files Browse the repository at this point in the history
Replace recursive method checks with `isRecursiveMethodTarget` Compilation query.

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
  • Loading branch information
0xdaryl committed Oct 8, 2020
1 parent f9a71c7 commit 4535ff3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/riscv/codegen/RVInstruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ uint8_t *TR::JtypeInstruction::generateBinaryEncoding() {
TR::ResolvedMethodSymbol *sym = getSymbolReference()->getSymbol()->getResolvedMethodSymbol();
TR_ResolvedMethod *resolvedMethod = sym == NULL ? NULL : sym->getResolvedMethod();

if (resolvedMethod != NULL && resolvedMethod->isSameMethod(cg()->comp()->getCurrentMethod()))
if (comp()->isRecursiveMethodTarget(resolvedMethod))
{
offset = cg()->getCodeStart() - cursor;
}
Expand Down

0 comments on commit 4535ff3

Please sign in to comment.