[PATCH] D31188: [AntiDepBreaker] Do not use getPristineRegs for marking live registers.

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 11:24:40 PDT 2017


qcolombet added inline comments.


================
Comment at: llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp:166-171
+    assert(MF.getFrameInfo().isCalleeSavedInfoValid());
+    const auto &CSI = MFI.getCalleeSavedInfo();
+    return find_if(CSI.begin(), CSI.end(), [Reg](const CalleeSavedInfo &C) {
+             return C.getReg() == Reg;
+           }) != CSI.end();
+  };
----------------
timshen wrote:
> MatzeB wrote:
> > This looks like you are replacing the check for pristine regs with manually written code that does the same. Am I missing something?
> This is because of Quentin's comment in the bug:
> 
>   I would just resort on live ins information, if at all possible.
>   If not possible I would work toward making that possible :).
> 
> I did it without fully understanding the big picture. :P
> 
> It'd be good to have you or someone explain the big picture. :)
Yeah what I was saying is that is we can use isLiveIn alone we should do that.
If we cannot, the long run should be to get rid of the pristine stuff (i.e., just resort on isLiveIn to convey the right information).
I don't expect this patch to fix that :).


================
Comment at: llvm/test/CodeGen/PowerPC/pr32292.ll:1
+; RUN: llc < %s | FileCheck %s
+target datalayout = "e-m:e-i64:64-n32:64"
----------------
Using a .mir test case you should be able to reduce the test even more.


================
Comment at: llvm/test/CodeGen/PowerPC/pr32292.ll:1
+; RUN: llc < %s | FileCheck %s
+target datalayout = "e-m:e-i64:64-n32:64"
----------------
qcolombet wrote:
> Using a .mir test case you should be able to reduce the test even more.
Please use a more descriptive name for the filename. List the PR in the file if you want.


https://reviews.llvm.org/D31188





More information about the llvm-commits mailing list