[PATCH] D150388: [CodeGen]Allow targets to use target specific COPY instructions for live range splitting

Asmaa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 09:34:22 PDT 2023


asmok-g added a comment.

In D150388#4504387 <https://reviews.llvm.org/D150388#4504387>, @arsenm wrote:

> In D150388#4504380 <https://reviews.llvm.org/D150388#4504380>, @vitalybuka wrote:
>
>> It's still regression. Unless someone has a patch ready to land, we need to revert this.
>
> I'd ask that you provide a reproducer, and perform the experiment I mentioned. If we can just disable the expanded isCopyInstr identification, it will be a lot less painful

I tried the suggestion; based on my understanding what I did is:

  @@ -1038,10 +1038,10 @@
     /// registers as machine operands, for all other instructions the method calls
     /// target-dependent implementation.
     std::optional<DestSourcePair> isCopyInstr(const MachineInstr &MI) const {
  -    if (MI.isCopy()) {
  -      return DestSourcePair{MI.getOperand(0), MI.getOperand(1)};
  -    }
  -    return isCopyInstrImpl(MI);
  +    // if (MI.isCopy()) {
  +    return DestSourcePair{MI.getOperand(0), MI.getOperand(1)};
  +    // }
  +    // return isCopyInstrImpl(MI);
     }
   
     bool isFullCopyInstr(const MachineInstr &MI) const {

But clang crashes when I use it to build the target test (and many other targets), I can't include the exact stack trace. But maybe you meant something else by your suggestion?

  1.	<eof> parser at end of file
  2.	Code generation
  3.	Running pass 'Function Pass Manager' on module $xyz.
  4.	Running pass 'Greedy Register Allocator' on function 

Target: x86_64-grtev4-linux-gnu

I'm still working on a repro.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150388/new/

https://reviews.llvm.org/D150388



More information about the llvm-commits mailing list