m m via llvm-dev
2019-Jan-09 23:23 UTC
[llvm-dev] How to debug Before Expand ISel Pseudo-instructions ?
Hi, I'm new to LLVM and I ran llc with -print-before-all and I can see that the IR is already wrong before Expand ISel Pseudo-instructions. The MOVE instruction moves a register to itself and shouldn't be there. How do you debug something like this? *** IR Dump After Module Verifier *** define i32* @_Z9test_mathv() #0 { %a = alloca i32, align 4 ret i32* %a } # *** IR Dump Before Expand ISel Pseudo-instructions ***: # Machine code for function _Z9test_mathv: Properties: <> Frame Objects: fi#0: size=4, align=4, at location [SP] BB#0: derived from LLVM BB %0 %vreg0<def> = MOVE %vreg0; CPURegs:%vreg0 %R4<def> = COPY %vreg0; CPURegs:%vreg0 JLR %R4 Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190109/e1444cdf/attachment.html>
Eli Friedman via llvm-dev
2019-Jan-09 23:39 UTC
[llvm-dev] How to debug Before Expand ISel Pseudo-instructions ?
On 1/9/2019 3:23 PM, m m via llvm-dev wrote:> Hi, > > I'm new to LLVM and I ran llc with -print-before-all and I can see > that the IR is already wrong before Expand ISel Pseudo-instructions. > The MOVE instruction moves a register to itself and shouldn't be > there. How do you debug something like this?"-debug" dumps a lot of additional information. More specifically, "-debug-only=isel" probably has the information you're looking for. -Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190109/f9a2892a/attachment.html>