[Mlir-commits] [mlir] f11e074 - [mlir] Use the same pipeline tuning options as clang for execution engine

Denys Shabalin llvmlistbot at llvm.org
Wed Nov 2 07:07:07 PDT 2022


Author: Denys Shabalin
Date: 2022-11-02T15:07:01+01:00
New Revision: f11e07416a011ced399e1ec75b3267249e5c9adb

URL: https://github.com/llvm/llvm-project/commit/f11e07416a011ced399e1ec75b3267249e5c9adb
DIFF: https://github.com/llvm/llvm-project/commit/f11e07416a011ced399e1ec75b3267249e5c9adb.diff

LOG: [mlir] Use the same pipeline tuning options as clang for execution engine

This change make sure that ExecutionEngine's pass pipeline is identical to one
used by clang. Previously, SLPVectorization was not enabled which caused
differences in code...

...generation.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D137248

Added: 
    

Modified: 
    mlir/lib/ExecutionEngine/OptUtils.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/ExecutionEngine/OptUtils.cpp b/mlir/lib/ExecutionEngine/OptUtils.cpp
index 403e54f004e2b..893a8a490d44a 100644
--- a/mlir/lib/ExecutionEngine/OptUtils.cpp
+++ b/mlir/lib/ExecutionEngine/OptUtils.cpp
@@ -68,7 +68,13 @@ mlir::makeOptimizingTransformer(unsigned optLevel, unsigned sizeLevel,
     CGSCCAnalysisManager cgam;
     ModuleAnalysisManager mam;
 
-    PassBuilder pb(targetMachine);
+    PipelineTuningOptions tuningOptions;
+    tuningOptions.LoopUnrolling = true;
+    tuningOptions.LoopInterleaving = true;
+    tuningOptions.LoopVectorization = true;
+    tuningOptions.SLPVectorization = true;
+
+    PassBuilder pb(targetMachine, tuningOptions);
 
     pb.registerModuleAnalyses(mam);
     pb.registerCGSCCAnalyses(cgam);


        


More information about the Mlir-commits mailing list