This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Allow pointer values in ARMCodeGenPrepare
ClosedPublic

Authored by samparker on Jul 31 2018, 5:35 AM.

Details

Diff Detail

Event Timeline

samparker created this revision.Jul 31 2018, 5:35 AM
samparker updated this revision to Diff 160575.Aug 14 2018, 7:02 AM

Rebased and fixed the handling of undef values. I've also moved the tests around so we have a standalone file for the call tests. Also added a small piece of control to decide whether we bother to promote or not: if we find nothing but sources, sinks and the icmp, then we don't bother doing anything.

Nit picking the subject/description:

Ignore pointer values in ARMCodeGenPrepare

and

Skip pointer values so they don't unnecessarily prevent the transformation.

But pointer types are now supported types. Thus you're actually *allowing* them, not ignoring/skipping. Not only is 'allowing' a more positive twist, I also think it is clearer :)

lib/Target/ARM/ARMCodeGenPrepare.cpp
634

Do you need to test this again? It looks like this is already done in a few place, e.g. line 588.

test/CodeGen/ARM/arm-cgp-calls.ll
93 ↗(On Diff #160575)

Do you want to test something here?

samparker retitled this revision from [ARM] Ignore pointer values in ARMCodeGenPrepare to [ARM] Allow pointer values in ARMCodeGenPrepare.Aug 14 2018, 7:47 AM
samparker added inline comments.Aug 14 2018, 7:49 AM
lib/Target/ARM/ARMCodeGenPrepare.cpp
634

Good point, Leaves will contain all the non-instruction values. I should be able to remove all of these checks.

test/CodeGen/ARM/arm-cgp-calls.ll
93 ↗(On Diff #160575)

That would be nice wouldn't it? :)

samparker updated this revision to Diff 160589.Aug 14 2018, 8:01 AM

Removed the unnecessary isa<Instruction> checks and updated the test to actually test.

SjoerdMeijer accepted this revision.Aug 14 2018, 8:10 AM

Looks okay to me

This revision is now accepted and ready to land.Aug 14 2018, 8:10 AM
This revision was automatically updated to reflect the committed changes.