[all-commits] [llvm/llvm-project] ffb19f: [CIR] Infrastructure: class CIRGenBuilderTy; cache...
David Olsen via All-commits
all-commits at lists.llvm.org
Tue Dec 10 11:30:09 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ffb19f4018e38ba7ff034b78914d5a8d2890a603
https://github.com/llvm/llvm-project/commit/ffb19f4018e38ba7ff034b78914d5a8d2890a603
Author: David Olsen <dolsen at nvidia.com>
Date: 2024-12-10 (Tue, 10 Dec 2024)
Changed paths:
A clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
A clang/lib/CIR/CodeGen/CIRGenBuilder.h
M clang/lib/CIR/CodeGen/CIRGenModule.cpp
M clang/lib/CIR/CodeGen/CIRGenModule.h
M clang/lib/CIR/CodeGen/CIRGenTypeCache.h
M clang/lib/CIR/CodeGen/CIRGenTypes.cpp
M clang/lib/CIR/CodeGen/CIRGenTypes.h
Log Message:
-----------
[CIR] Infrastructure: class CIRGenBuilderTy; cache CIR types (#119037)
Small infrastructure and background changes to ClangIR.
Create class `CIRGenBuilderTy` and its base class `CIRBaseBuilderTy`.
These are mostly empty for now, except for what is inherited from
`mlir::OpBuilder`. But they will fill up quickly as more ClangIR code
gen is upstreamed. `CIRGenModule` and `CIRGenTypes` are changed to use
`CIRGenBuilderTy`.
Add cached types to struct `CIRGenTypeCache` for the integral types that
are currently supported. Initialize those cached types in the
`CIRGenModule` constructor. The first uses of those types (well, one of
them) is in `CIRGenTypes::convertType`.
Have `CIRGenTypes::convertType` cache its results in a map from
`clang::Type` to `mlir::Type`, saving it from having to convert the same
type again and again.
There are no new tests or changed tests in this commit. There are no
changes to behavior, just improvements to how the existing behavior is
implemented.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list