llvm / clangir

A new (MLIR based) high-level IR for clang.
https://clangir.org
Other
327 stars 86 forks source link

[CIR][NFC] Create LLVM intrinsic calls through `createCallLLVMIntrinsicOp` #564

Closed Lancern closed 3 months ago

Lancern commented 3 months ago

This PR does not introduce any functional changes. It cleans up code in LowerToLLVM.cpp and creates all LLVM intrinsic calls through the unified createCallLLVMIntrinsicOp function, as suggested by this comment in #556 .

Some LLVM intrinsics already have specialized LLVMIR operations. CIR operations that depend on these intrinsics are lowered to those specialized operations rather than llvm.call_intrinsic operation.