[clang] [CIR] Add math and builtin intrinsics support (PR #175233)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 14 10:07:17 PST 2026
adams381 wrote:
Addressed @bcardosolopes's feedback about the expensive AST visitor walk.
**Changes in commit 0f7052857adf:**
- Added `hasEmittedBuiltinCall` flag to `CIRGenFunction` that gets set when `emitBuiltinExpr` is called
- Updated `setCIRFunctionAttributesForDefinition` to accept this flag instead of walking the AST
- Removed the `BuiltinCallFinder` visitor (37 lines) and replaced with a simple boolean check
- Removed the now-unused `StmtVisitor.h` include
This changes the builtin detection from O(n) AST traversal to O(1) flag check, set during the normal codegen process.
https://github.com/llvm/llvm-project/pull/175233
More information about the cfe-commits
mailing list