diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp index cf92130a3aaed..fe028f2bf09ec 100644 --- a/src/aotcompile.cpp +++ b/src/aotcompile.cpp @@ -1894,18 +1894,18 @@ void addOptimizationPasses(legacy::PassManagerBase *PM, int opt_level, // merging the `alloca` for the unboxed data and the `alloca` created by the `alloc_opt` // pass. PM->add(createAllocOptPass()); + PM->add(createInstSimplifyLegacyPass()); + PM->add(createJumpThreadingPass()); + PM->add(createCorrelatedValuePropagationPass()); + PM->add(createCFGSimplificationPass(basicSimplifyCFGOptions)); // consider AggressiveInstCombinePass at optlevel > 2 PM->add(createInstructionCombiningPass()); - PM->add(createCFGSimplificationPass(basicSimplifyCFGOptions)); if (dump_native) { PM->add(createStripDeadPrototypesPass()); PM->add(createMultiVersioningPass(external_use)); } PM->add(createCPUFeaturesPass()); PM->add(createSROAPass()); - PM->add(createInstSimplifyLegacyPass()); - PM->add(createJumpThreadingPass()); - PM->add(createCorrelatedValuePropagationPass()); PM->add(createReassociatePass());