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

Method updateInstrCount

lib/llvm/compiler.cpp:4186–4197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4184 }
4185
4186 void updateInstrCount() noexcept {
4187 if (LocalInstrCount) {
4188 auto Store [[maybe_unused]] = Builder.createAtomicRMW(
4189 LLVMAtomicRMWBinOpAdd, Context.getInstrCount(Builder, ExecCtx),
4190 Builder.createLoad(Context.Int64Ty, LocalInstrCount),
4191 LLVMAtomicOrderingMonotonic);
4192#if LLVM_VERSION_MAJOR >= 13
4193 Store.setAlignment(8);
4194#endif
4195 Builder.createStore(LLContext.getInt64(0), LocalInstrCount);
4196 }
4197 }
4198
4199 void updateGas() noexcept {
4200 if (LocalGas) {

Callers

nothing calls this directly

Calls 6

createAtomicRMWMethod · 0.80
createLoadMethod · 0.80
setAlignmentMethod · 0.80
createStoreMethod · 0.80
getInt64Method · 0.80
getInstrCountMethod · 0.45

Tested by

no test coverage detected