[PATCH] D61030: [PassManagerBuilder] Add option for interleaved loops, for loop vectorize.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 14:31:51 PDT 2019


This revision was automatically updated to reflect the committed changes.
asbirlea marked an inline comment as done.
Closed by commit rL359615: [PassManagerBuilder] Add option for interleaved loops, for loop vectorize. (authored by asbirlea, committed by ).

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61030/new/

https://reviews.llvm.org/D61030

Files:
  llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h
  llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
  llvm/trunk/test/Transforms/LoopVectorize/X86/unroll-pm.ll


Index: llvm/trunk/test/Transforms/LoopVectorize/X86/unroll-pm.ll
===================================================================
--- llvm/trunk/test/Transforms/LoopVectorize/X86/unroll-pm.ll
+++ llvm/trunk/test/Transforms/LoopVectorize/X86/unroll-pm.ll
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -O2 -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx -force-vector-width=4 -S | FileCheck %s
-; RUN: opt < %s -O2 -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx -force-vector-width=4 -disable-loop-unrolling -S | FileCheck %s -check-prefix=CHECK-NOUNRL
+; RUN: opt < %s -O2 -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx -force-vector-width=4 -disable-loop-unrolling -interleave-loops=false -S | FileCheck %s -check-prefix=CHECK-NOUNRL
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
 target triple = "x86_64-apple-macosx10.8.0"
Index: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -162,9 +162,7 @@
     DisableUnrollLoops = false;
     SLPVectorize = RunSLPVectorization;
     LoopVectorize = EnableLoopVectorization;
-    // FIXME: Add: LoopsInterleaved = EnableLoopInterleaving;
-    // Replace usage of DisableUnrollLoops with LoopsInterleaved when creating
-    // the LoopVectorize pass, to be consistent with the new pass manager.
+    LoopsInterleaved = EnableLoopInterleaving;
     RerollLoops = RunLoopRerolling;
     NewGVN = RunNewGVN;
     LicmMssaOptCap = SetLicmMssaOptCap;
@@ -673,7 +671,7 @@
   // llvm.loop.distribute=true or when -enable-loop-distribute is specified.
   MPM.add(createLoopDistributePass());
 
-  MPM.add(createLoopVectorizePass(DisableUnrollLoops, !LoopVectorize));
+  MPM.add(createLoopVectorizePass(!LoopsInterleaved, !LoopVectorize));
 
   // Eliminate loads by forwarding stores from the previous iteration to loads
   // of the current iteration.
Index: llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h
===================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h
+++ llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h
@@ -145,6 +145,7 @@
   bool DisableUnrollLoops;
   bool SLPVectorize;
   bool LoopVectorize;
+  bool LoopsInterleaved;
   bool RerollLoops;
   bool NewGVN;
   bool DisableGVNLoadPRE;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61030.197446.patch
Type: text/x-patch
Size: 2551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190430/11e0adcd/attachment.bin>


More information about the llvm-commits mailing list