This is an archive of the discontinued LLVM Phabricator instance.

[mips][FastISel] Implement intrinsics memset, memcopy & memmove.
ClosedPublic

Authored by vkalintiris on Jan 23 2015, 8:04 PM.

Details

Summary

Implement the intrinsics memset, memcopy and memmove in MIPS FastISel.
Make some needed infrastructure fixes so that this can work.

Based on a patch by Reed Kotler.

Diff Detail

Repository
rL LLVM

Event Timeline

rkotler updated this revision to Diff 18712.Jan 23 2015, 8:04 PM
rkotler retitled this revision from to Implement intrinsics memset, memcopy and memmove in Mips fast-isel.
rkotler updated this object.
rkotler edited the test plan for this revision. (Show Details)
rkotler added a reviewer: dsanders.
rkotler added subscribers: rfuhler, Unknown Object (MLST).
vkalintiris commandeered this revision.Apr 16 2015, 5:47 AM
vkalintiris added a reviewer: rkotler.
dsanders added inline comments.May 12 2015, 9:31 AM
lib/Target/Mips/MipsFastISel.cpp
505–506 ↗(On Diff #18712)

Given that InMBB only makes sense when V is an Instruction, why don't we test it on line 494?

1312–1320 ↗(On Diff #18712)

Not required for this patch but we shouldn't be using JALR for the majority of calls

test/CodeGen/Mips/Fast-ISel/memtest1.ll
17 ↗(On Diff #18712)

Should also check the jalr, the arguments and the return.

Likewise for mov(), and clear() below

52–60 ↗(On Diff #18712)

Nit: Unnecessary.

dsanders requested changes to this revision.May 12 2015, 9:31 AM
dsanders edited edge metadata.
This revision now requires changes to proceed.May 12 2015, 9:31 AM
vkalintiris edited edge metadata.
vkalintiris retitled this revision from Implement intrinsics memset, memcopy and memmove in Mips fast-isel to [mips][FastISel] Implement intrinsics memset, memcopy & memmove..
vkalintiris updated this object.

Addressed review comments.

dsanders accepted this revision.May 19 2015, 4:01 AM
dsanders edited edge metadata.

LGTM

lib/Target/Mips/MipsFastISel.cpp
480 ↗(On Diff #25983)

Nit: Could you add a comment about why we require the same BB?

This revision is now accepted and ready to land.May 19 2015, 4:01 AM
This revision was automatically updated to reflect the committed changes.