This is an archive of the discontinued LLVM Phabricator instance.

[MIPS GlobalISel] Adding GlobalISel
ClosedPublic

Authored by Petar.Avramovic on Feb 21 2018, 9:25 AM.
Tokens
"Like" token, awarded by xiangzhai.

Details

Summary

Add GlobalISel infrastructure up to the point where we can select a ret void.

Diff Detail

Repository
rL LLVM

Event Timeline

This revision is now accepted and ready to land.Feb 21 2018, 10:37 AM
bogner added a subscriber: bogner.Feb 21 2018, 11:14 AM
bogner added inline comments.
test/CodeGen/Mips/GlobalISel/mips-irtranslator.ll
1–9 ↗(On Diff #135268)

Can you use utils/update_mir_test_checks.py to generate check lines for these tests? That will make things easier to maintain down the line.

LGTM, some nits inlined.

I'm also seeing -Wunused-private-field warnings for lines lib/Target/Mips/MipsInstructionSelector.cpp:32, 33, 36.

Not sure if you're seeing them.

lib/Target/Mips/MipsCallLowering.cpp
1 ↗(On Diff #135268)

Missing C++ tag.

lib/Target/Mips/MipsInstructionSelector.cpp
51 ↗(On Diff #135268)

Full sentence with full stop.

56 ↗(On Diff #135268)

Here too.

test/CodeGen/Mips/GlobalISel/mips-irtranslator.ll
1 ↗(On Diff #135268)

This can go in test/CodeGen/Mips/GlobalISel/irtranslator/ret.ll

test/CodeGen/Mips/GlobalISel/mips-isel.ll
1 ↗(On Diff #135268)

Can you move this file to test/CodeGen/Mips/GlobalISel/llvm-ir/ret.ll

I'd like the test directory organised in the same way we do for normal instruction, just under GlobalISel/.

i. e. each particular construct gets it's own file, as our ISA variants and revisions can make the test files particularly big.

Can you also use -mtriple=mipsel-linux-gnu with the llc invocation, so that we can use update_llc_checks.py on these files. Also use the check prefix MIPS32.

3 ↗(On Diff #135268)

You can just name the test functions that will go here after their types.

sdardis accepted this revision.Feb 21 2018, 11:40 AM

Addressed review comments
I am aware that those private fields in instructionselector are unused but i didn't get any warnings during compilation. They will be used in the future.

Petar.Avramovic marked 7 inline comments as done.Feb 22 2018, 5:54 AM
This revision was automatically updated to reflect the committed changes.