[llvm-dev] What can cause llc to throw an error for instruction numbering?

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 8 12:39:09 PDT 2019


On Mon, 8 Jul 2019 at 20:32, Krzysztof Parzyszek <kparzysz at quicinc.com> wrote:
> The problem is that there are some unnamed values in the listing, that are not explicitly printed.  In reality you have

I don't think that works as a complete explanation, but it does
strongly suggest another avenue to investigate: what if LLVM is
starting a new basic block after every instruction for some reason?
Then LLVM would think it had

    define i32 @main(i32 %, i8** %1) {
     %2:
       %3 = alloca i32, align 4
     %4:
       %5 = alloca i8**, align 8
     %6:
        ...

Watching NumberedVals would still reveal this (I think), but not
SetInstName. And it would suggest looking at any extra code that might
affect when LLVM starts a new block.

Cheers.

Tim.


More information about the llvm-dev mailing list