MCPcopy Create free account
hub / github.com/apache/arrow / RemoveBuildTargetAttributes

Function RemoveBuildTargetAttributes

cpp/src/gandiva/engine.cc:293–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293void RemoveBuildTargetAttributes(llvm::Module& module) {
294 // Precompiled bitcode is JIT-compiled on the runtime host, so do not retain the
295 // target selected when the bitcode was built. LLVM 23 checks target-feature
296 // compatibility even for alwaysinline functions and prevents inlining on a mismatch.
297 // See https://releases.llvm.org/23.1.0/docs/ReleaseNotes.html#changes-to-the-llvm-ir.
298 for (auto& function : module.functions()) {
299 function.removeFnAttr("target-cpu");
300 function.removeFnAttr("target-features");
301 function.removeFnAttr("tune-cpu");
302 }
303}
304
305} // namespace
306

Callers 2

LoadPreCompiledIRMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected