[llvm-bugs] [Bug 48738] New: [NPM] LoopFlatten not running

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 13 06:19:43 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=48738

            Bug ID: 48738
           Summary: [NPM] LoopFlatten not running
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: sjoerd.meijer at arm.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Looks like LoopFlatten is not running under the NPM. This pass is not enabled
by default, so needs -mllvm -enable-loop-flatten on the command line. For
example, compiling this:

void add(unsigned N, short *A, short val) {
 for (unsigned i = 0; i < N; i++)
  for (unsigned j = 0; j < N; j++)
    A[i*N+j] += val;
}

with:

bin/clang --target=arm-arm-none-eabi -mcpu=cortex-m33 -O3 -mllvm
-enable-loop-flatten t.c

Doesn't trigger loop flatten.

>From a quick grep, LoopFlatten is added to
`buildO1FunctionSimplificationPipeline`, but I guess it also needs to be added
to `buildFunctionSimplificationPipeline` which must have been on oversight when
I added LoopFlatten.

Raising this for visibility, probably on me to fix.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210113/d18d9ea1/attachment.html>


More information about the llvm-bugs mailing list