[mips] Support `long_call/far/near` attributes passed by front-end
ClosedPublic

Authored by atanasyan on Jul 17 2017, 5:30 AM.

Details

Reviewers
sdardis
Summary

This patch adds handling of the long_call, far, and near attributes passed by front-end. The patch depends on D35479.

Diff Detail

Repository
rL LLVM
atanasyan created this revision.Jul 17 2017, 5:30 AM

Some minor nits. Also, see my question inline.

lib/Target/Mips/MipsISelLowering.cpp
3156

Restore the comment from lines 3156-3157 to an appropriate place.

Question (I haven't looked throughly yet): Can an ExternalSymbolSDNode have the long-call/near-call attribute?

If it can, then this expansion code is missing the portions that check the attributes of the ExternalSymbolSDNode.

test/CodeGen/Mips/long-call-attr.ll
6

Also requires testing for mips64.

16

; CHECK-LABEL: foo: before this.

atanasyan added inline comments.Jul 19 2017, 5:33 AM
lib/Target/Mips/MipsISelLowering.cpp
3156

Can an ExternalSymbolSDNode have the long-call/near-call attribute?

As far as I understand the IR, ExternalSymbolSDNode cannot contains any attribute.

atanasyan updated this revision to Diff 107287.Jul 19 2017, 5:35 AM
  • Addressed review comments: add 64-bit tests, restore comment in the code.
sdardis accepted this revision.Jul 20 2017, 3:13 AM

LGTM.

This revision is now accepted and ready to land.Jul 20 2017, 3:13 AM
atanasyan closed this revision.Aug 8 2017, 12:31 PM

Closed by commit rL308606