Add our own legacy loop unswitch pass (#1339)
Since legacy binding for loop unswitch pass was removed and we can't get it back. Implement its equivalent in `aot_llvm_extra.cpp` and use it in `aot_compiler.c`. Follow up to #1183.
This commit is contained in:
@ -2643,9 +2643,8 @@ apply_func_passes(AOTCompContext *comp_ctx)
|
||||
LLVMAddLoopRotatePass(pass_mgr);
|
||||
#if LLVM_VERSION_MAJOR < 15
|
||||
LLVMAddLoopUnswitchPass(pass_mgr);
|
||||
/* Binding disabled in LLVM 15, don't add the pass util we can either
|
||||
add a binding to SimpleLoopUnswitchPass, or add it to
|
||||
aot_llvm_extra.cpp */
|
||||
#else
|
||||
aot_add_simple_loop_unswitch_pass(pass_mgr);
|
||||
#endif
|
||||
LLVMAddInstructionCombiningPass(pass_mgr);
|
||||
LLVMAddCFGSimplificationPass(pass_mgr);
|
||||
|
||||
Reference in New Issue
Block a user