mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 20:56:13 +00:00
Add more llvm optimization passes (#445)
Add more llvm optimization passes to improve AOT/JIT performance
This commit is contained in:
parent
892af84161
commit
f4770ae8c8
|
@ -1401,6 +1401,20 @@ aot_create_comp_context(AOTCompData *comp_data,
|
|||
LLVMAddCFGSimplificationPass(comp_ctx->pass_mgr);
|
||||
LLVMAddJumpThreadingPass(comp_ctx->pass_mgr);
|
||||
LLVMAddConstantPropagationPass(comp_ctx->pass_mgr);
|
||||
LLVMAddIndVarSimplifyPass(comp_ctx->pass_mgr);
|
||||
|
||||
if (!option->is_jit_mode) {
|
||||
LLVMAddLoopRotatePass(comp_ctx->pass_mgr);
|
||||
LLVMAddLoopUnswitchPass(comp_ctx->pass_mgr);
|
||||
LLVMAddInstructionCombiningPass(comp_ctx->pass_mgr);
|
||||
LLVMAddCFGSimplificationPass(comp_ctx->pass_mgr);
|
||||
LLVMAddGVNPass(comp_ctx->pass_mgr);
|
||||
LLVMAddLICMPass(comp_ctx->pass_mgr);
|
||||
LLVMAddLoopVectorizePass(comp_ctx->pass_mgr);
|
||||
LLVMAddSLPVectorizePass(comp_ctx->pass_mgr);
|
||||
LLVMAddInstructionCombiningPass(comp_ctx->pass_mgr);
|
||||
LLVMAddCFGSimplificationPass(comp_ctx->pass_mgr);
|
||||
}
|
||||
|
||||
/* Create metadata for llvm float experimental constrained intrinsics */
|
||||
if (!(comp_ctx->fp_rounding_mode =
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
#include "llvm-c/Object.h"
|
||||
#include "llvm-c/ExecutionEngine.h"
|
||||
#include "llvm-c/Analysis.h"
|
||||
#include "llvm-c/Transforms/Utils.h"
|
||||
#include "llvm-c/Transforms/Scalar.h"
|
||||
#include "llvm-c/Transforms/Vectorize.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
Loading…
Reference in New Issue
Block a user