This is an archive of the discontinued LLVM Phabricator instance.

DAG: propagate ConsecutiveRegs flags to returns too.
ClosedPublic

Authored by t.p.northover on Mar 5 2019, 10:18 AM.

Details

Reviewers
arsenm
Summary

Arguments already have a flag to inform backends when they have been split up. The AArch64 arm64_32 ABI makes use of these on return types too, so that code emitted for armv7k can be ABI-compliant.

There should be no CodeGen changes yet, just making more information available.

Diff Detail

Repository
rL LLVM

Event Timeline

t.p.northover created this revision.Mar 5 2019, 10:18 AM
arsenm added a subscriber: arsenm.Mar 5 2019, 10:47 AM
arsenm added inline comments.
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1643

The hook name is inaccurate here. Maybe there should be an alias for it for the return value?

t.p.northover marked an inline comment as done.Mar 11 2019, 8:06 AM
t.p.northover added inline comments.
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1643

I don't think it merits two separate callbacks, returns and parameters are basically the same thing and I'd rather bend the meaning of "argument" if it comes down to it. It's not even really a change to existing practice: OutputArg and ArgFlagsTy are already used in visitRet.

I did put the code actually using this variable into the wrong patch though. I'll upload a new version to fix that and add context while we muse on this.

Added context, and moved use of NeedsRegBlock from incorrect patch I'd uploaded elsewhere.

arsenm accepted this revision.Apr 15 2019, 4:13 AM

LGTM

This revision is now accepted and ready to land.Apr 15 2019, 4:13 AM
t.p.northover closed this revision.Apr 15 2019, 5:13 AM

Thanks, *this* one is r358399.