This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Make logic of resultsCompatible clearer
ClosedPublic

Authored by DavidSpickett on May 4 2020, 2:07 AM.

Details

Diff Detail

Event Timeline

DavidSpickett created this revision.May 4 2020, 2:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2020, 2:07 AM

Maybe it would be more straightforward to use CCValAssign::getExtraInfo()? Either way is fine, I guess.

llvm/lib/CodeGen/CallingConvLower.cpp
288

Don't need braces on innermost if.

  • Use getExtraInfo after checking we have two registers or two memory offsets.
DavidSpickett marked an inline comment as done.May 5 2020, 2:11 AM
efriedma accepted this revision.May 5 2020, 12:48 PM

LGTM with one minor comment.

llvm/lib/CodeGen/CallingConvLower.cpp
281

Don't need parentheses around each compare.

This revision is now accepted and ready to land.May 5 2020, 12:48 PM
DavidSpickett closed this revision.May 6 2020, 1:53 AM

Committed as d782d1f898eaafee49548d5332e84c3ae11ebac4. (closing manually because I forgot to add the revision line to the commit msg)

Reverted due to CodeGen/X86/sibcall.ll failing, will investigate.

DavidSpickett marked an inline comment as done.May 6 2020, 2:16 AM

Relanded as 055ea585c77cd8ae9cd3bc327c1e4404020fdf27 with a typo fixed. This:
(Loc1.getExtraInfo() != Loc1.getExtraInfo()
Is now:
(Loc1.getExtraInfo() != Loc2.getExtraInfo())