From: Denys Shabalin Date: Wed, 2 Nov 2022 13:04:37 +0000 (+0100) Subject: [mlir] Use the same pipeline tuning options as clang for execution engine X-Git-Tag: upstream/17.0.6~28731 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f11e07416a011ced399e1ec75b3267249e5c9adb;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/mlir/lib/ExecutionEngine/OptUtils.cpp b/mlir/lib/ExecutionEngine/OptUtils.cpp index 403e54f..893a8a4 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);