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

Function Compiler

lib/driver/compilerTool.cpp:23–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace Driver {
22
23int Compiler([[maybe_unused]] struct DriverCompilerOptions &Opt) noexcept {
24 using namespace std::literals;
25
26 std::ios::sync_with_stdio(false);
27 Log::setInfoLoggingLevel();
28
29#ifdef WASMEDGE_USE_LLVM
30
31 Configure Conf;
32 // WASM standard configuration has the highest priority.
33 if (Opt.PropWASM1.value()) {
34 Conf.setWASMStandard(Standard::WASM_1);
35 }
36 if (Opt.PropWASM2.value()) {
37 Conf.setWASMStandard(Standard::WASM_2);
38 }
39 if (Opt.PropWASM3.value()) {
40 Conf.setWASMStandard(Standard::WASM_3);
41 }
42
43 // Proposals adjustment.
44 if (Opt.PropMutGlobals.value()) {
45 Conf.removeProposal(Proposal::ImportExportMutGlobals);
46 }
47 if (Opt.PropNonTrapF2IConvs.value()) {
48 Conf.removeProposal(Proposal::NonTrapFloatToIntConversions);
49 }
50 if (Opt.PropSignExtendOps.value()) {
51 Conf.removeProposal(Proposal::SignExtensionOperators);
52 }
53 if (Opt.PropMultiValue.value()) {
54 Conf.removeProposal(Proposal::MultiValue);
55 }
56 if (Opt.PropBulkMemOps.value()) {
57 Conf.removeProposal(Proposal::BulkMemoryOperations);
58 }
59 if (Opt.PropSIMD.value()) {
60 Conf.removeProposal(Proposal::SIMD);
61 }
62 if (Opt.PropTailCall.value()) {
63 Conf.removeProposal(Proposal::TailCall);
64 }
65 if (Opt.PropExtendConst.value()) {
66 Conf.removeProposal(Proposal::ExtendedConst);
67 }
68 if (Opt.PropMultiMem.value()) {
69 Conf.removeProposal(Proposal::MultiMemories);
70 }
71 if (Opt.PropRelaxedSIMD.value()) {
72 Conf.removeProposal(Proposal::RelaxSIMD);
73 }
74 if (Opt.PropTailCallDeprecated.value()) {
75 Conf.addProposal(Proposal::TailCall);
76 }
77 if (Opt.PropExtendConstDeprecated.value()) {
78 Conf.addProposal(Proposal::ExtendedConst);
79 }
80 if (Opt.PropMultiMemDeprecated.value()) {

Callers 1

UniToolFunction · 0.70

Calls 15

setInfoLoggingLevelFunction · 0.85
setWASMStandardMethod · 0.80
removeProposalMethod · 0.80
addProposalMethod · 0.80
setOptimizationLevelMethod · 0.80
setRunModeMethod · 0.80
parseModuleMethod · 0.80
setDumpIRMethod · 0.80
setInterruptibleMethod · 0.80
setCostMeasuringMethod · 0.80
setTimeMeasuringMethod · 0.80

Tested by

no test coverage detected