This is an archive of the discontinued LLVM Phabricator instance.

[mips][fastisel] Handle 0-4 arguments without SelectionDAG.
ClosedPublic

Authored by dsanders on Jul 22 2016, 7:46 AM.

Details

Summary

Implements fastLowerArguments() to avoid the need to fall back on
SelectionDAG for 0-4 argument functions that don't do tricky things like
passing double in a pair of i32's.

This allows us to move all except one test to -fast-isel-abort=3. The
remaining one has function prototypes of the form 'i32 (i32, double, double)'
which requires floats to be passed in GPR's.

Diff Detail

Event Timeline

dsanders updated this revision to Diff 65077.Jul 22 2016, 7:46 AM
dsanders retitled this revision from to [mips][fastisel] Handle 0-4 arguments without SelectionDAG..
dsanders updated this object.
dsanders added a reviewer: sdardis.
dsanders added a subscriber: llvm-commits.
sdardis accepted this revision.Jul 25 2016, 9:14 AM
sdardis edited edge metadata.

LTGM though callabi.ll (functions cxcccc & cxhhhh) has some extra changes with my local copy of LLVM. It appears there's another frame object object being allocated which changes the offsets. Ok with that test fixed.

lib/Target/Mips/MipsFastISel.cpp
1272

".. gave up (calling convention is not C)" is clearer here I think.

test/CodeGen/Mips/Fast-ISel/callabi.ll
186–190

Stack slot has a 24 byte offset.

221–225

Stack slot has 24 byte offset here as well.

This revision is now accepted and ready to land.Jul 25 2016, 9:14 AM
dsanders closed this revision.Jul 28 2016, 8:03 AM
dsanders added inline comments.Jul 28 2016, 8:27 AM
lib/Target/Mips/MipsFastISel.cpp
1272

I unintentionally committed before fixing this so I made this change in r276984

test/CodeGen/Mips/Fast-ISel/callabi.ll
186–190

It was 16 when I ran 'ninja check' just before the commit so I haven't made this change.

221–225

It was 16 when I ran 'ninja check' just before the commit so I haven't made this change.