This is an archive of the discontinued LLVM Phabricator instance.

[MIPS GlobalISel] Handle position independent code
ClosedPublic

Authored by Petar.Avramovic on May 29 2019, 6:43 AM.

Details

Summary

Handle position independent code for MIPS32.
When callee is global address, lower call will emit callee as
G_GLOBAL_VALUE and add target flag if needed.
Support $gp in getRegBankFromRegClass().
Select G_GLOBAL_VALUE, specially handle case when
there are target flags attached by lowerCall.

Diff Detail

Event Timeline

atanasyan accepted this revision.May 30 2019, 11:59 PM

LGTM with a nit.

lib/Target/Mips/MipsCallLowering.cpp
527

You could write it as Callee.isGlobal() && TM.isPositionIndependent();

This revision is now accepted and ready to land.May 30 2019, 11:59 PM
This revision was automatically updated to reflect the committed changes.
Petar.Avramovic marked an inline comment as done.May 31 2019, 1:26 AM