| 291 | } |
| 292 | |
| 293 | void 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 |
no outgoing calls
no test coverage detected