This is an archive of the discontinued LLVM Phabricator instance.

[llvm][SelectionDAGBuilder] use getRegistersForValue to generate legal copies
AbandonedPublic

Authored by nickdesaulniers on Feb 13 2023, 4:02 PM.

Details

Summary

Fixes crashes observed when building the ARCH=i386 and ARCH=powerpc
Linux kernel.

Rewrite bits of SelectionDAGBuilder::visitCallBrLandingPad to re-use
machinery similar to SelectionDAGBuilder::visitInlineAsm. This is a bit
more robust for Flag Output Operands, outputs with a ConstraintVT that's
illegal for a given target, and outputs that require more than one
register.

Diff Detail

Event Timeline

nickdesaulniers requested review of this revision.Feb 13 2023, 4:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2023, 4:02 PM
  • git clang-format HEAD~
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
11658

unused

I applied this change along with the others from https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/11 and built and boot tested a variety of configurations on the architectures that the Linux kernel cares about and saw no new issues.

  • remove unnecessary Flag variable that was being shadowed
This revision is now accepted and ready to land.Feb 14 2023, 2:07 PM