MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / toLLVMCodeGenLevel

Function toLLVMCodeGenLevel

lib/llvm/compiler.cpp:107–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105#endif
106
107static inline LLVMCodeGenOptLevel toLLVMCodeGenLevel(
108 WasmEdge::CompilerConfigure::OptimizationLevel Level) noexcept {
109 using OL = WasmEdge::CompilerConfigure::OptimizationLevel;
110 switch (Level) {
111 case OL::O0:
112 return LLVMCodeGenLevelNone;
113 case OL::O1:
114 return LLVMCodeGenLevelLess;
115 case OL::O2:
116 return LLVMCodeGenLevelDefault;
117 case OL::O3:
118 return LLVMCodeGenLevelAggressive;
119 case OL::Os:
120 return LLVMCodeGenLevelDefault;
121 case OL::Oz:
122 return LLVMCodeGenLevelDefault;
123 default:
124 assumingUnreachable();
125 }
126}
127} // namespace
128
129struct LLVM::Compiler::CompileContext {

Callers 1

compileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected