This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel][X86] support G_FRAME_INDEX instruction selection.
ClosedPublic

Authored by igorb on Mar 15 2017, 6:47 AM.

Details

Summary

Support G_FRAME_INDEX instruction selection.

Diff Detail

Repository
rL LLVM

Event Timeline

igorb created this revision.Mar 15 2017, 6:47 AM
ab edited edge metadata.Mar 19 2017, 9:21 AM

Seems reasonable; a couple nits.

test/CodeGen/X86/GlobalISel/frameIndex-instructionselect.mir
3

Also test X32 LEA64_32r? and rename the i386 check prefix ;)

7

FWIW, I found this function more confusing than helpful: it doesn't involve any frame index for x86_64, yet the mir has one. Maybe make the function an empty void() ? We still want to teach mir not to require an IR definition someday.

Alternatively, write a test using an alloca? That should have the same behavior everywhere.

igorb updated this revision to Diff 92516.Mar 21 2017, 11:24 AM
igorb marked 2 inline comments as done.

Thanks for the comments.

ab accepted this revision.Mar 21 2017, 5:10 PM

LGTM, thanks!
Looks like the test has a file mode svn prop, maybe you can undo that?

lib/Target/X86/X86LegalizerInfo.cpp
72

Maybe check STI->isTarget64BitILP32 so that you don't have to carry around a TargetMachine?

This revision is now accepted and ready to land.Mar 21 2017, 5:10 PM
igorb closed this revision.Mar 26 2017, 1:42 AM

Thanks for the review!
Closed by commit rL298800