[cfe-dev] missing info in `-print-before-all -print-after-all`
Son Tuan VU via cfe-dev
cfe-dev at lists.llvm.org
Wed Jul 3 01:20:57 PDT 2019
Hi Nick,
Here's my two cents:
Loop unrolling is a loop pass so it would print the loop after its run.
However, loop unrolling deletes the loop if it is completely unrolled,
that's why loop unrolling doesn't print anything after its run.
HTH,
Son Tuan Vu
On Tue, Jul 2, 2019 at 7:25 PM Nick Desaulniers via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> Ah, I think my problem is due to loop unrolling. So I guess the bug
> is that loop unrolling doesn't print it's after results, ie.
> the is no after corresponding to:
> *** IR Dump Before Unroll loops ***
> ie.
> *** IR Dump After Unroll loops *** (is not printed)
>
> On Tue, Jul 2, 2019 at 10:03 AM Nick Desaulniers
> <ndesaulniers at google.com> wrote:
> >
> > Hello,
> > I'm trying to run this through opt to see where a problematic change
> > is being made:
> > https://gist.github.com/nickdesaulniers/73aef95e9735a50765f654ebdcbb99dd
> >
> > I'm running this as:
> > opt -O2 -print-before-all -print-after-all -verify-each
> > generic.get_fixed_ranges.ll -S -o - 2>&1 | less
> >
> > Near
> > *** IR Dump Before MergedLoadStoreMotion ***
> > for the function
> > @get_fixed_ranges
> > I see a problematic callbr instruction:
> > callbr void asm sideeffect "1:.byte
> > 0x0f,0x1f,0x44,0x00,0\0A\09.pushsection __jump_table, \22aw\22 \0A\09
> > .balign 8 \0A\09.long 1b - ., ${2:l} - . \0A\09 .quad ${0:c} + ${1:c}
> > - .\0A\09.popsection \0A\09",
> > "i,i,X,~{dirflag},~{fpsr},~{flags}"(%struct.static_key* getelementptr
> > inbounds (%struct.tracepoint, %struct.tracepoint*
> > @__tracepoint_read_msr, i64 0, i32 1), i1 false, i8*
> > blockaddress(@get_fixed_ranges, %20)) #6
> > to label %native_read_msr.exit31.1 [label %49], !srcloc !4
> >
> > The thing is, I can't find where this was introduced. I would have
> > expected it to be printed AFTER the result of some previous pass, but
> > the previous pass looks like `Unroll loops`.
> >
> > I would have expected some pass to muck this up, at which point it
> > would appear in an "AFTER" print out. What I don't understand is that
> > this bad transform first appears in a "BEFORE" transform printout.
> >
> > Am I holding it wrong?
> > --
> > Thanks,
> > ~Nick Desaulniers
>
>
>
> --
> Thanks,
> ~Nick Desaulniers
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190703/3cbf5e1e/attachment.html>
More information about the cfe-dev
mailing list