This is an archive of the discontinued LLVM Phabricator instance.

[MIPS GlobalISel] Lower i8 and i16 arguments
ClosedPublic

Authored by Petar.Avramovic on Aug 21 2018, 3:14 AM.
Tokens
"Like" token, awarded by xiangzhai.

Details

Summary

Lower integer arguments smaller then i32.
Support both register and stack arguments.
Define setLocInfo function for setting LocInfo field in ArgLocs vector.

Diff Detail

Event Timeline

atanasyan accepted this revision.Aug 22 2018, 12:11 AM

LGTM with minor nit

lib/Target/Mips/MipsCallLowering.cpp
250

nit: let's reduce number of indentation levels:

if (VT.getSizeInBits() >= RegisterVT.getSizeInBits())
  return CCValAssign::LocInfo::Full;

if (Flags.isSExt())
  return CCValAssign::LocInfo::SExt;
if (Flags.isZExt())
  return CCValAssign::LocInfo::ZExt;
return CCValAssign::LocInfo::AExt;
This revision is now accepted and ready to land.Aug 22 2018, 12:11 AM
lib/Target/Mips/MipsCallLowering.cpp
250

Case when VT.getSizeInBits() > RegisterVT.getSizeInBits()
can not happen, I can change >= to ==

Addressed review comments.

Let's commit.

This revision was automatically updated to reflect the committed changes.