Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2415 commits
Select commit Hold shift + click to select a range
f9dee67
[CIR][CIRGen][Builtin][Neon] Lower neon_vrsraq_n_v and neon_vrsra_n_v…
ghehg Dec 12, 2024
28bdb64
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddlvq_s16 (#1231)
ghehg Dec 12, 2024
8990725
[CIR][CIRGen] Add uwtable attribute (#1226)
smeenai Dec 12, 2024
e06d300
[CIR][CIRGen] Match skeleton for setCIRFunctionAttributesForDefinitio…
smeenai Dec 13, 2024
1f552da
[CIR][ThroughMLIR][NFC] BinOpKind_Max NYI ThroughMLIR lowering (#1233)
ghehg Dec 13, 2024
61f8f89
[CIR][CIRGen] Introduce cir.delete.array op (#1172)
ChuanqiXu9 Dec 17, 2024
50b5898
[CIR][CIRGen] Support Lambda capturing `this` object (#1213)
ghehg Dec 17, 2024
0091bdb
[CIR][CIRGen] Fixes function calls with return values and cleanup sta…
gitoleg Dec 17, 2024
d5d9902
[CIR] Put loop body in nested scopes (#1221)
Lancern Dec 17, 2024
61957db
[CIR][Dialect] Add FMaximumOp and FMinimumOp (#1237)
ghehg Dec 17, 2024
5d791e7
[CIR][CIRGen][TBAA] Add support for scalar types (#1220)
PikachuHyA Dec 18, 2024
6398a01
[CIR][CodeGen][NFC] centralized split `std::initializer_list` field (…
HerrCai0907 Dec 18, 2024
cdd0b60
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddv_f32, neon_vaddvq_f32 an…
ghehg Dec 18, 2024
6eda0ec
[CIR][CIRGen][Builtin][Neon] Lower neon_vmax_v and neon_vmaxq_v (#1239)
ghehg Dec 18, 2024
4ebb958
[CIR][NFC] Silence warning from recent PR
bcardosolopes Dec 18, 2024
f1fee16
[CIR][CIRGen][TBAA] Replace hardcoded TBAA names with getTBAAName (#1…
PikachuHyA Dec 19, 2024
e881455
[CIR][CodeGen] fixes access to globals with bitfields (#1244)
gitoleg Dec 19, 2024
7de25fa
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddvq_s64/s32, neon_vaddv_s3…
ghehg Dec 19, 2024
565f776
[CIR] Introduce a new dir in tests for known crashes to fix
lanza Dec 20, 2024
87ab7ea
[CIR][Lowering] fixes return value for = operator for bitfields (#1247)
gitoleg Dec 20, 2024
ad0f63a
Revert "[CIR][CIRGen][TBAA] Replace hardcoded TBAA names with getTBAA…
bcardosolopes Dec 20, 2024
ea5cb23
Revert "[CIR][CIRGen][TBAA] Add support for scalar types (#1220)"
bcardosolopes Dec 20, 2024
f0a56c0
[CIR][Types] Mimic OG codegen on isFuncParamTypeConvertible
bcardosolopes Dec 20, 2024
7e06e8f
[CIR] Lower `cir.bool` to i1 (#1158)
orbiri Jan 6, 2025
2f71d04
[CIR][CIRGen] Improve emission for array of unions (#1236)
ChuanqiXu9 Jan 6, 2025
380ba1c
[CIR][CIRGen][Builtin][Neon] Lower neon_vsetq_lane_f64 (#1251)
AmrDeveloper Jan 6, 2025
06d1ac4
[CIR][CIRGen][Builtin][Neon] Lower `neon_vaddd_s64` and `neon_vaddd_u…
AmrDeveloper Jan 6, 2025
bac4b5c
[CIR][CIRGen][Builtin][Neon] Lower `neon_vsubd_s64` and `neon_vsubd_u…
AmrDeveloper Jan 6, 2025
aee90fa
[CIR][CIRGen][Builtin][Neon] Lower `vaddh_f16`, `vsubh_f16`, `vmulh_f…
AmrDeveloper Jan 6, 2025
a40bbc5
[CIR][CIRGen][Builtin][Neon] Lower vshld_n_s64 and vshld_n_u64 (#1259)
AmrDeveloper Jan 6, 2025
541f20a
[CIR][CIRGen][Builtin][Neon] Lower vshrd_n_s64 (#1260)
AmrDeveloper Jan 6, 2025
596b9e9
[CIR][CIRGen][Builtin][Neon] Lower neon_vset_lane_f64 (#1253)
AmrDeveloper Jan 6, 2025
d8df9fd
[CIR] Add MLIR lowering for f16, bf16, and f128 (#1264)
Lancern Jan 7, 2025
e62e033
Lower neon_vmaxvq_u8,neon_vmaxvq_s8, neon_vmaxv_u8 and neon_vmaxvq_s8…
ghehg Jan 7, 2025
df3c39a
[CIR][CodeGen] handle zero init padding case (#1257)
gitoleg Jan 9, 2025
a995452
[CIR] Cleanup: convert from Clang type to CIR type (#1271)
dkolsen-pgi Jan 9, 2025
4f7b5ec
[CIR][CIRGen][Builtin][Neon] Lower vabsh_f16 (#1269)
AmrDeveloper Jan 9, 2025
c5bbd2e
[CIR][CIRGen][NFCI] Get more scope information to match OG
bcardosolopes Jan 9, 2025
9b51d7a
[CIR] Add support for GCC function attribute "const" and "pure" (#1262)
Lancern Jan 9, 2025
369fc37
Revert "[CIR] Remove the !cir.void return type for functions returnin…
keryell Jan 10, 2025
9a3f1df
[CIR] Remove return !cir.void from IR and textual representation (#1249)
keryell Jan 10, 2025
82b2b82
[CIR][CodeGen][NFC] Add documentation regarding memory emission defer…
orbiri Jan 13, 2025
f5973cb
[CIR][Doc][NFC] Add a description for all the passes (#1282)
keryell Jan 13, 2025
ffbd297
[CIR][CIRGen] Fix CXX codegen for default args (#1278)
gitoleg Jan 14, 2025
6b97d9e
[CIR][CIRGen] virtual table pointer initialization without ctor (#1283)
ghehg Jan 14, 2025
5029096
[CIR] Data member pointer comparison and casts (#1268)
Lancern Jan 15, 2025
3724448
[CIR] Add integer result type for cir.global_view (#1248)
Lancern Jan 21, 2025
8efa1d0
[CIR][CIRGen] Simplify LLVM IR array initialization for clang CIR (#1…
Rajveer100 Jan 21, 2025
6ea1d14
[CIR][NFC] Add cleanup region to ScopeOp
bcardosolopes Jan 23, 2025
3c3b096
[CIR] Add limited support for array new (#1286)
andykaylor Jan 27, 2025
cf09dbf
[CIR] Fix build due to deprecated interfaces (#1299)
darkbuck Jan 28, 2025
34bd74e
[CIR] Cleanup cir.scopes with a single cir.yield operation (#1291)
AmrDeveloper Jan 29, 2025
1b45e8c
[CIR] Add initial support for array cookies (#1297)
andykaylor Jan 29, 2025
a310ae0
[CIR][NFC] Teach op parsers to use enum keyword parsing helpers (#1298)
AmrDeveloper Jan 29, 2025
d329c96
[CIR] Fix vector issues from latest rebase
bcardosolopes Jan 29, 2025
2267e5d
[CIR][CIRGen] Add padding to unions (#1289)
gitoleg Jan 31, 2025
713ba6a
[CIR][CIRGen][Builtin][Clang] Lowering clang::AArch64::BI__builtin_ar…
AmrDeveloper Jan 31, 2025
c4e5842
[CIR] Fix Lowering/ptrstride.cir xfailed after rebasing (#1302)
AmrDeveloper Jan 31, 2025
de1cd92
[CIR] Implement support for zero-initialized builtin type allocation …
andykaylor Feb 3, 2025
7c22251
[CIR][CIRGen] Implement array cookie ABI for AppleARM64 targets (#1301)
andykaylor Feb 3, 2025
f8821e8
[CIR] Implement partial initialization for array new (#1307)
andykaylor Feb 4, 2025
fee4bb6
[CIR][Codegen] Fixes global variables that point to another globals (…
gitoleg Feb 5, 2025
5373f42
[CIR][ABI][Lowering] Fixes calling convention (#1308)
gitoleg Feb 5, 2025
90a5b61
[CIR][CUDA] Initial support for host compilation (#1309)
AdUhTkJm Feb 5, 2025
82d18f5
[CIR][CUDA] Initial support for device compilation (#1311)
AdUhTkJm Feb 6, 2025
95a497b
[CIR] Enable cir.bool binops (#1312)
andykaylor Feb 6, 2025
6d1b387
[CIR] Silence warnings introduced in the past few weeks
bcardosolopes Feb 6, 2025
a07dbdf
[CIR] Implement array new handling for variable array size (#1313)
andykaylor Feb 6, 2025
f7b9151
[CIR] Add attribute visitor for lowering globals (#1318)
andykaylor Feb 7, 2025
a7383c9
[CIR][HIP] Compile host code (#1319)
koparasy Feb 7, 2025
53335ae
[CIR][CIRGen][Builtin][Neon] Lower neon_vuzp_v and neon_vuzpq_v (#1314)
AmrDeveloper Feb 10, 2025
2294d5f
[CIR][CUDA] Generate attribute for kernel name of device stubs (#1317)
AdUhTkJm Feb 10, 2025
3e17e7b
[CIR][HIP] Compile HIP device code (#1322)
koparasy Feb 10, 2025
637f2f3
[CIR][CIRGen] Handle __sync_{and,or,xor}_and_fetch (#1328)
moar55 Feb 11, 2025
e1a9263
[CIR][CIRGen] Support __builtin_isinf_sign (#1142)
PikachuHyA Feb 11, 2025
2c7e65e
[CIR][CIRGen][Builtin][Neon] Lower neon_vzip_v and neon_vzipq_v (#1320)
AmrDeveloper Feb 11, 2025
dde0549
[CIR][NFC] Replace CIR attr visitor base class with a type switch (#1…
andykaylor Feb 11, 2025
37fab7c
[CIR][CIRGen][Builtin][Neon] Lower neon_vsra_n_v and neon_vsraq_n_v (…
FantasqueX Feb 11, 2025
c4409e1
[CIR][CIRGen] Add alignment attribute to AtomicCmpXchg (#1327)
FantasqueX Feb 11, 2025
1468ac4
[CIR][CIRGen][TBAA] Add support for scalar types (#1329)
PikachuHyA Feb 11, 2025
3017a00
[CIR][CodeGen] Add initial support for __cxa_rethrow (#1290)
bruteforceboy Feb 11, 2025
a322191
[CIR] Correct initialization of VoidPtrPtrTy (#1336)
AdUhTkJm Feb 11, 2025
1c92e3f
[CIR][NFC] Refactor GlobalOpLowering to align with upstream (#1337)
andykaylor Feb 12, 2025
e342308
[CIR][CUDA] Generate device stubs (#1332)
AdUhTkJm Feb 12, 2025
6dd6d82
[CIR][CIRGen] Support for builtin `__atomic_thread_fence` (#1287)
Rajveer100 Feb 12, 2025
03e6535
[CIR][ABI][AArch64][Lowering] Fix calls for struct types > 128 bits (…
bruteforceboy Feb 12, 2025
090718c
[CIR] Fix error messages when the conversion to MLIR standard dialect…
Jezurko Feb 12, 2025
db307ce
[CIR][HIP] Use CUDA attributes for HIP global functions (#1333)
koparasy Feb 12, 2025
0bdd896
Revert "[CIR][HIP] Use CUDA attributes for HIP global functions (#1333)"
bcardosolopes Feb 13, 2025
be82182
[CIR][CUDA][NFC] Skeleton of `setCUDAKernelCallingConvention` (#1344)
AdUhTkJm Feb 13, 2025
8debbb9
[CIR][CIRGen][Builtin][Neon] Lower neon_vstl1_lane_s64 and vstl1q_lan…
AmrDeveloper Feb 14, 2025
0d2a01f
[CIR] Add support for array new with constructors (#1347)
andykaylor Feb 14, 2025
cf491db
[CIR][CUDA] Generate kernel calls (#1348)
AdUhTkJm Feb 14, 2025
a0091e3
[CIR] Add missing Language::CIR cases (#1349)
xlauko Feb 14, 2025
c69469e
[CIR] Lower nested local constant alloca (#1261)
Lancern Feb 17, 2025
bf3135b
[CIR][NFC] Fix typo (#1366)
FantasqueX Feb 18, 2025
13a8b5d
[CIR][CIRGen][Builtin][Neon] Lower neon_vldap1_lane_s64 and vldap1q_l…
AmrDeveloper Feb 19, 2025
a0fe0fb
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddlv s16 and u16 (#1352)
AmrDeveloper Feb 19, 2025
23b5d05
[CIR][CIRGen][Builtin][Neon] Lower neon_vsrad_n_s64 (#1355)
AmrDeveloper Feb 19, 2025
19e5076
[CIR][CIRGen] Atomics: handle atomic_compare_exchange_weak (#1359)
FantasqueX Feb 19, 2025
a99b65f
[CIR][CIRGen][Builtin][Neon] Lower vget_lane_bf16, vduph_lane f16 and…
AmrDeveloper Feb 19, 2025
dbe544d
[CIR][CIRGen] handle `__builtin_elementwise_acos` (#1362)
FantasqueX Feb 19, 2025
2b94285
[CIR][CIRGen] handle vectors of size 3 like size 4 for better perform…
FantasqueX Feb 19, 2025
b510e50
[CIR][CUDA] Handle shared and local variables (#1368)
AdUhTkJm Feb 19, 2025
74e4af3
[CIR] Add handling for initializing multi-dimension arrays (#1369)
andykaylor Feb 19, 2025
ab985cc
[CIR][HIP|CUDA] Generate global storing CUDA|HIP stub function (#1341)
koparasy Feb 19, 2025
a4d50eb
[CIR][CIRGen][Builtin][Neon] Lower neon_vshrd_n_u64 (#1353)
AmrDeveloper Feb 19, 2025
8dfd5ee
[CIR][CIRGen][Builtin][Neon] Lower neon_vsrad_n_u64 (#1356)
AmrDeveloper Feb 19, 2025
4e4e4b4
[CIR][Bugfix] fixes global array of pointers (#1350)
gitoleg Feb 19, 2025
27154ac
[CIR][CIRGen] Handle __sync_nand_and_fetch (#1351)
moar55 Feb 19, 2025
2df2022
[CIR][CIRGen][Builtin][Neon] Lower vgetq_lane_bf16, vduph f16 and fb1…
AmrDeveloper Feb 19, 2025
e6165c8
[CIR][CIRGen] Add more support for __cxa_rethrow (#1343)
bruteforceboy Feb 20, 2025
de13703
[CIR][CIRGen][TBAA] Add CIR_TBAAStructAttr (#1365)
PikachuHyA Feb 20, 2025
d48d459
[CIR][CodeGen] Fix extra Yieldop case during try-catch generation (#1…
bruteforceboy Feb 20, 2025
6492b9b
[CIR][CIRGen] handle `__builtin_elementwise_exp` (#1376)
FantasqueX Feb 20, 2025
5f68f6c
[CIR][CIRGen][Builtin][Neon] Lower vrsrad_n u64 and s64 (#1379)
AmrDeveloper Feb 20, 2025
a1ab6bf
[CIR] Fix Address element type problems (#1373)
andykaylor Feb 21, 2025
cc67bf7
[CIR][CUDA] Skeleton of NVPTX target lowering info (#1358)
AdUhTkJm Feb 22, 2025
dda69c8
[CIR][CUDA] Add attribute for CUDA fat binary name (#1377)
AdUhTkJm Feb 22, 2025
37fa92a
[CIR][CIRGen][Builtin][Neon] Lower neon_vrshrd_n for s64 and u64 (#1383)
AmrDeveloper Feb 22, 2025
b6796c4
[CIR][CIRGen][Builtin][Neon] Lower builtin_neon_vqshld_n s64 and u64 …
AmrDeveloper Feb 22, 2025
c301b4a
[CIR] LLVM lowering support for pointers to member functions (#1292)
Lancern Feb 22, 2025
c997030
[CIR][CIRGen][Builtin][Neon] Lower builtin_neon_vqshlud_n_s64 (#1384)
AmrDeveloper Feb 24, 2025
e607e3f
[CIR] Add support for __builtin_bitreverse (#1386)
Lancern Feb 24, 2025
60126e9
[CIR][CIRGen][Builtin][Neon] Lower neon_vrnd32x (#1388)
AmrDeveloper Feb 24, 2025
0018c12
[CIR] CallConvLowering for X86 aggregate (#1387)
AdUhTkJm Feb 24, 2025
52bb68c
[CIR][NFC] Un XFAIL global-bar-simple test (#1395)
FantasqueX Feb 24, 2025
db3e279
[CIR][CIRGen][builtin] handle `_mm_clflush` (#1397)
FantasqueX Feb 24, 2025
d44a8e7
[CIR][CIRGen][Builtin][Neon] Lower vrnd32z and vrnd32zq (#1399)
AmrDeveloper Feb 24, 2025
2947f38
[CIR][CodeGen] Support return in TryOp (#1398)
bruteforceboy Feb 24, 2025
253fb9a
[CIR][Lowering][TBAA] Lower CIR_TBAAStructAttr (#1381)
PikachuHyA Feb 24, 2025
af9a39d
[CIR] New assembly format for function type return (#1391)
dkolsen-pgi Feb 24, 2025
b5fb765
[CIR][CUDA] Fix CUDA CIR mangling bug (#1396)
advay168 Feb 24, 2025
dc932de
[CIR] ClangIR specific .clang-tidy files (#1402)
dkolsen-pgi Feb 25, 2025
aff6245
[CIR] Add support for comparisons between pointers to member function…
Lancern Feb 25, 2025
89293bf
[CIR][CUDA] support for device variables (#1394)
JamesL425 Feb 26, 2025
fb4ab6e
[CIR] clang-tidy CIRGenFunction.cpp (#1410)
dkolsen-pgi Feb 26, 2025
86d9e42
[CIR] Remove redundant BoolType customAssemblyFormat (NFC) (#1407)
xlauko Feb 26, 2025
35a7398
[CIR][CIRGen][Builtin][Neon] Lower vrnd64x and vrnd64xq (#1400)
AmrDeveloper Feb 26, 2025
cd5458b
[CIR] Track size_t and int size with module attributes (#1389)
AdUhTkJm Feb 26, 2025
ee515c7
[CIR][CIRGen] Simplify __builtin_elementwise_abs (#1393)
FantasqueX Feb 26, 2025
4ea0083
[CIR] Simple casts on pointers to member functions (#1409)
Lancern Feb 26, 2025
c35a706
[CIR] Simplify FuncType printer/parser (#1413)
xlauko Feb 26, 2025
8746bd4
[CIR][CIRGen][Builtin][Neon] Lower vrnd64z and vrnd64zq (#1401)
AmrDeveloper Feb 27, 2025
ab1d10b
[CIR][ThroughMLIR] remove nested memref wrapper for array types (#1412)
PikachuHyA Feb 27, 2025
f9c0515
[CIR] Delete `FuncOp::verifyType` (#1421)
dkolsen-pgi Feb 27, 2025
eb6b63d
[CIR][Github][CI] Add clangir upstream rebase workflow (#1345)
xlauko Feb 28, 2025
d2209ec
[CIR][CodeGen] Emit cir.resume for synthetic TryOp's in place (#1418)
bruteforceboy Mar 1, 2025
6d7f899
[CIR] clang-tidy CIRGenModule.cpp (#1428)
dkolsen-pgi Mar 1, 2025
a018447
[CIR] Add syncscope to AtomicCmpXchgOp (#1419)
FantasqueX Mar 1, 2025
0bedc28
[CIR] Clean up and complete CIRGlobalValueInterface methods (#1423)
xlauko Mar 1, 2025
2ab0704
[CIR] Base-to-derived and derived-to-base casts on pointers to member…
Lancern Mar 1, 2025
994dee0
[CIR][CUDA] Fix destructor behaviour (#1422)
AdUhTkJm Mar 4, 2025
9ff80af
[CIR][CIRGen] Move CIRGenModule::getTargetCIRGenInfo() to CIRGenModul…
advay168 Mar 4, 2025
a3ab178
[CIR] Change AtomicFenceOp's syncscope to OptionalAttr (#1429)
FantasqueX Mar 4, 2025
5a75305
[CIR][CIRGen][Builtin][Neon] Lower vcaged_f64 (#1432)
AmrDeveloper Mar 4, 2025
56d2262
[CIR][Lowering][TBAA] distinct C and C++ (#1406)
PikachuHyA Mar 5, 2025
d4fbab3
[CIR][CUDA] Treat nvptx triple as alias for nvptx64 (#1420)
advay168 Mar 5, 2025
2d36018
[CIR][CodeGen] Fix std::ofstream fail during CodeGen (#1437)
bruteforceboy Mar 5, 2025
0e7b6c7
[CIR][CUDA] Lowering device and shared variables (#1438)
AdUhTkJm Mar 5, 2025
3d51c1d
[MLIR][mlir-link] Add mlir-link tool main entry-point
xlauko Oct 30, 2024
3b58a1e
[MLIR][mlir-link] Generate composite module
xlauko Oct 30, 2024
5c3839b
[MLIR][mlir-link] Setup linker library
xlauko Jan 21, 2025
edaf60c
[MLIR][mlir-link] Setup single module link
xlauko Jan 21, 2025
e739e73
[MLIR][Interfaces] Add LinkableModuleOpInterface
xlauko Jan 22, 2025
03c6a7e
[MLIR][mlir-link] Use LinkableModuleOpInterface instead of ModuleOp
xlauko Jan 22, 2025
92ab9c2
[MLIR][IR] Make ModuleOp to implement LinkableModuleOpInterface
xlauko Jan 22, 2025
a6e375f
[MLIR][Interfaces] Resolve the cyclic include dependency
xlauko Jan 22, 2025
bd036e5
[MLIR][Interfaces] Add GlobalValueLinkageOpInterface
xlauko Jan 22, 2025
2a64376
[MLIR][LLVM] Make LLVMFuncOp implement GlobalValueLinkageOpInterface
xlauko Jan 22, 2025
d902792
[MLIR][Interfaces] Add linkage interfaces hierarchy that mirrors LLVM's
xlauko Jan 24, 2025
8774297
[MLIR][LLVM] Annotate operations with linkage interfaces
xlauko Jan 24, 2025
a81437b
[MLIR][mlir-link] Add linkage queries
xlauko Jan 24, 2025
19784a6
[MLIR][Interfaces] Add COMDAT functions to linkage interfaces
xlauko Jan 27, 2025
680d083
[MLIR][mlir-link] Add COMDAT symbol table
xlauko Jan 27, 2025
71601da
[MLIR][LLVM] Implement getComdatSelectionKind for global values
xlauko Jan 27, 2025
0ca6918
[MLIR][mlir-link] Setup module linker run skeleton
xlauko Jan 27, 2025
fdc4bb6
[MLIR][Interfaces] Add symbol-related methods to linkage interface
xlauko Jan 27, 2025
f1cc1ee
[MLIR][mlir-link] Add linkIfNeeded resolution
xlauko Jan 27, 2025
5e111dc
[MLIR][Interfaces] Add isConstant to GlobalVariableLinkageOpInterface
xlauko Jan 30, 2025
ca470ce
[MLIR][LLVM] Let GlobalOp implement GlobalVariableLinkageOpInterface
xlauko Jan 30, 2025
fa3479e
[MLIR][mlir-link] Setup linkIfNeeded skeleton
xlauko Jan 30, 2025
a0c77b4
[mlir][mlir-link] Initial skeleton for an MLIR-linker
hbrodin Jan 23, 2025
313de6e
[MLIR][mlir-link] Fix naming and should link condition
hbrodin Feb 4, 2025
c033b2f
[MLIR][mlir-link] Refactor options processing
xlauko Feb 4, 2025
5e65f8d
[MLIR][mlir-link] Add `--show-dialects` option
xlauko Feb 4, 2025
d50d0c8
[MLIR][mlir-link] Allow to split and process input buffers
xlauko Feb 4, 2025
d5a1fac
[MLIR][mlir-link] Refactor file processor
xlauko Feb 4, 2025
541959c
[MLIR][mlir-link] Add llvm functions link test
xlauko Feb 5, 2025
b7a573c
[MLIR][mlir-link] Migrate from Operation* towards interface usage
hbrodin Feb 4, 2025
fe7d964
[MLIR][mlir-link] Add reordering of globals
hbrodin Feb 5, 2025
11980c9
[MLIR][mlir-link] Implements linking of simple global variables
hbrodin Feb 5, 2025
69f1cc7
[MLIR][mlir-link] Add test for global values linkage
hbrodin Feb 5, 2025
f568b26
[MLIR][mlir-link] Add linkage and visibility tests
xlauko Feb 5, 2025
5311de3
[MLIR][mlir-link] Let comdat model real pairs
xlauko Feb 6, 2025
05c9c76
[MLIR][LLVM] Update comdat interface implementation
xlauko Feb 7, 2025
d66cf26
[MLIR][mlir-link] Add lazy comdat members processing support
xlauko Feb 7, 2025
c19c218
[MLIR][mlir-link] Clean up comdat naming (NFC)
xlauko Feb 7, 2025
31a0190
[MLIR][Interfaces] Extend the SymbolUserOpInterface with getUserSymbol
hbrodin Feb 7, 2025
ef3ac0b
[MLIR][Interfaces] Do not use extraClassDefnition
hbrodin Feb 7, 2025
124fc1a
[MLIR][mlir-link] Move return to end of function
hbrodin Feb 7, 2025
92b62b2
[MLIR][mlir-link] Make the linkage-a test pass (#18)
hbrodin Feb 12, 2025
26f8f55
[MLIR][mlir-link] Fix Incorrect logical expression in Linker
hbrodin Feb 14, 2025
d52f29d
[MLIR][mlir-link] Linkage-b pass
hbrodin Feb 14, 2025
798a6f3
[MLIR][mlir-link] Introduce LinkerInterface for dialects
xlauko Feb 10, 2025
6c94b31
[MLIR][LLVM] Register LinkerInterface with LLVM dialect
xlauko Feb 10, 2025
f890706
[MLIR][mlir-link] Rework to operate with dialect interface
xlauko Feb 23, 2025
46133b7
[MLIR][mlir-link] Do not link empty module in test
xlauko Feb 23, 2025
d09fce2
[MLIR][mlir-link] Remove LinkableModuleOpInterface and Comdat infra
xlauko Mar 5, 2025
fd5ee4b
[MLIR][mlir-link] Add summary state base
xlauko Mar 5, 2025
1343050
[MLIR][LLVM] Move LLVMLinkerInterface to separate file
xlauko Mar 5, 2025
455d247
[MLIR] Register linker interface for builtin dialect
xlauko Mar 5, 2025
a77f9c9
[MLIR][mlir-link] Make `createCompositeModule` part of LinkerInterface
xlauko Mar 5, 2025
007073f
Fix printing signed switch op values
reytchison Mar 6, 2025
783be99
[MLIR][mlir-link] Remove internalization for now
xlauko Mar 6, 2025
56edbf5
[MLIR][mlir-link] Simplify inference of linker flags for the first mo…
xlauko Mar 6, 2025
6aabc44
[MLIR][mlir-link] Simplify and generalize linker interfaces
xlauko Mar 8, 2025
a00b0bb
[MLIR][mlir-link] Add option to sort output symbols by name
xlauko Mar 10, 2025
1030725
[MLIR][mlir-link] Update test to sort the expected output
xlauko Mar 10, 2025
d52166a
[MLIR] Make getUserSymbol return SymbolRefAttr
xlauko Mar 27, 2025
d3c03e6
[MLIR][mlir-link] Link required symbols even if they are only declara…
xlauko Mar 27, 2025
436aded
[MLIR][mlir-link] Turn off linkonce test for now
xlauko Mar 27, 2025
d0b0e12
[MLIR][mlir-link] Fix conflict resolution
xlauko Mar 28, 2025
a7a92de
[MLIR][mlir-link] Fix typo
xlauko Mar 28, 2025
67fc3c7
[MLIR][mlir-link] Simplify materialization
xlauko Mar 29, 2025
0904cba
[MLIR][mlir-link] Rename ConflictPair to Conflict
xlauko Mar 29, 2025
27a80d5
[MLIR][mlir-link] Simplify conflict resolution
xlauko Mar 29, 2025
d30c70b
[MLIR][mlir-link] Add simple global linkage tests
xlauko Mar 29, 2025
45efaee
[MLIR][mlir-link] Implement private linkage resolution
xlauko Mar 31, 2025
d8b9192
[MLIR][mlir-link] Add private linkage tests
xlauko Mar 31, 2025
1b55dee
[MLIR][mlir-link] Fix internal linkage for dependencies
xlauko Mar 31, 2025
68728c3
[MLIR][mlir-link] Add internal linkage tests
xlauko Mar 31, 2025
d4d713f
[MLIR][mlir-link] Add extern_weak linkage tests
xlauko Mar 31, 2025
38246d3
[MLIR][mlir-link] Resolve available_externally defined functions
xlauko Apr 1, 2025
8f39972
[MLIR][mlir-link] Implement weak and linkonce linkage
xlauko Apr 1, 2025
0c45484
[MLIR][mlir-link] Implement common linkage
xlauko Apr 1, 2025
966ee90
[MLIR][mlir-link] Import tests from llvm-link.
Jezurko Mar 26, 2025
31eb8ef
[MLIR][mlir-link] Implement visibility resolution
Jezurko Apr 7, 2025
cfa0c16
[MLIR][mlir-link] Enable visibility tests
Jezurko Apr 7, 2025
89c9fde
[CIR][cir-link] Setup CIRLinkerInterface
xlauko Apr 10, 2025
d5f5275
[CIR][cir-link] Setup cir-link tool
xlauko Apr 10, 2025
737d8c2
[MLIR][mlir-link] Refactor out SymbolAttrLinkerInterface
xlauko Apr 10, 2025
6ff77e6
[MLIR][mlir-link] Extract common llvm linker interface
xlauko Apr 10, 2025
db016fe
[CIR][cir-link] Implement CIRSymbolLinkerInterface
xlauko Apr 10, 2025
57abe66
[CIR][cir-link] Add simple cir function linker test
xlauko Apr 10, 2025
89e17b0
[MLIR][mlir-link] Add adapted tests for unnamed_addr
Jezurko Apr 7, 2025
e224f25
[MLIR][mlir-link] Implement unnamed_addr support
Jezurko Apr 7, 2025
6d11c66
[CIR][cir-link] Add stubs for UnnamedAddr
Jezurko Apr 18, 2025
0266ce5
[CIR][cir-link] Add missing MLIRLinker dependency to cmake
xlauko Apr 18, 2025
e4a23f9
[CIR-link] move link interface implementation into dialect to prevent…
2over12 Apr 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 49 additions & 0 deletions .github/workflows/clang-cir-rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Clang CIR Rebase

on: workflow_dispatch

permissions:
contents: write

env:
UPSTREAM_REPO: https://github.com/llvm/llvm-project.git
TARGET_BRANCH: rebased-${{ github.head_ref || github.ref_name }}

jobs:
rebase:
name: Rebase Clang CIR onto LLVM upstream
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.WORKFLOW_TOKEN }}

- name: Set up Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Add upstream remote
run: |
git remote add upstream $UPSTREAM_REPO
git fetch upstream main

- name: Rebase CIR branch onto LLVM upstream
run: |
sh ./.github/workflows/rebase-clangir-onto-llvm-upstream.sh $TARGET_BRANCH

- name: Push rebase branch ${{ github.env.TARGET_BRANCH }}
run: |
git push --set-upstream origin ${{ github.env.TARGET_BRANCH }}

test-clang-cir:
name: Test Clang CIR
needs: rebase
uses: ./.github/workflows/llvm-project-tests.yml
with:
build_target: check-clang-cir
projects: clang;mlir
extra_cmake_args: -DCLANG_ENABLE_CIR=ON
repo_ref: ${{ github.env.TARGET_BRANCH }}
38 changes: 38 additions & 0 deletions .github/workflows/clang-cir-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Clang CIR Tests

permissions:
contents: read

on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- 'clang/**'
- '.github/workflows/clang-cir-tests.yml'
- '.github/workflows/llvm-project-tests.yml'
- '!llvm/**'
pull_request:
branches:
- '**'
paths:
- 'clang/**'
- '.github/workflows/clang-cir-tests.yml'
- '.github/workflows/llvm-project-tests.yml'
- '!llvm/**'

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
check_clang_cir:
name: Test clang-cir
uses: ./.github/workflows/llvm-project-tests.yml
with:
build_target: check-clang-cir
projects: clang;mlir
extra_cmake_args: -DCLANG_ENABLE_CIR=ON
3 changes: 0 additions & 3 deletions .github/workflows/libcxx-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ on:
- 'runtimes/**'
- 'cmake/**'
- '.github/workflows/libcxx-build-and-test.yaml'
schedule:
# Run nightly at 08:00 UTC (aka 00:00 Pacific, aka 03:00 Eastern)
- cron: '0 8 * * *'

permissions:
contents: read # Default everything to read-only
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/llvm-project-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ on:
type: string
default: '3.11'

# Optional reference to the branch being checked out.
# Uses the current branch if not specified.
repo_ref:
required: false
type: string

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
Expand Down Expand Up @@ -93,6 +99,7 @@ jobs:
# clean: false.
- uses: actions/checkout@v4
with:
ref: ${{ inputs.repo_ref || github.ref }}
fetch-depth: 250
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
if: github.repository == 'llvm/llvm-project'
if: github.repository == 'llvm/clangir'
steps:
- name: Fetch LLVM sources
uses: actions/checkout@v4
Expand Down
118 changes: 118 additions & 0 deletions .github/workflows/rebase-clangir-onto-llvm-upstream.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#!/bin/bash

set -e

GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
NC='\033[0m'

REBASE_BRANCH=rebased-clangir-onto-llvm-upstream
TARGET_BRANCH=$1
RUN_CHECK=false

log() { printf "%b[%s]%b %s\n" "$1" "$2" "$NC" "$3"; }
log_info() { log "$GREEN" "INFO" "$1"; }
log_warn() { log "$YELLOW" "WARN" "$1"; }
log_error() { log "$RED" "ERROR" "$1" >&2; }

error_exit() {
log_error "$1"
exit 1
}

is_rebasing() {
git rev-parse --git-path rebase-merge >/dev/null 2>&1 ||
git rev-parse --git-path rebase-apply >/dev/null 2>&1
}

while [[ $# -gt 0 ]]; do
case "$1" in
--checked)
RUN_CHECK=true
shift
;;
*)
TARGET_BRANCH="$1"
shift
;;
esac
done

git rev-parse --is-inside-work-tree >/dev/null 2>&1 ||
error_exit "Not in a Git repository."

git remote get-url upstream >/dev/null 2>&1 ||
error_exit "Upstream remote not found."

log_info "Fetching latest changes from upstream..."

git fetch upstream main ||
error_exit "Failed to fetch from upstream."

REBASING_CIR_BRANCH=$(git branch --show-current)

if [ -z "$COMMON_ANCESTOR" ]; then
COMMON_ANCESTOR=$(git merge-base upstream/main "$REBASING_CIR_BRANCH") ||
error_exit "Could not find common ancestor."
log_info "Common ancestor commit: $COMMON_ANCESTOR"
fi

if [ "$REBASING_CIR_BRANCH" != "$REBASE_BRANCH" ]; then
if git rev-parse --verify "$REBASE_BRANCH" >/dev/null 2>&1; then
git branch -D "$REBASE_BRANCH" >/dev/null 2>&1 ||
log_warn "Failed to delete existing branch $REBASE_BRANCH."
fi

git switch -c "$REBASE_BRANCH" "$COMMON_ANCESTOR" ||
error_exit "Failed to create branch $REBASE_BRANCH."
fi

#
# Rebase upstream changes
#
log_info "Processing upstream commits..."
git rebase upstream/main ||
error_exit "Failed to rebase."

#
# Reverse upstream CIR commits
#
log_info "Reverting upstream CIR commits..."
git log --grep="\[CIR\]" --format="%H %s" "$COMMON_ANCESTOR..upstream/main" | while read -r HASH MESSAGE; do
log_info "Reverting: $MESSAGE"

if ! git revert --no-edit "$HASH"; then
error_exit "Failed to revert commit $HASH"
fi
done

#
# Rebase CIR commits
#
log_info "Rebasing CIR incubator commits..."

if [ -z "$TARGET_BRANCH" ]; then
log_error "Target branch not specified."
exit 1
fi

if git rev-parse --verify "$TARGET_BRANCH" >/dev/null 2>&1; then
git branch -D "$TARGET_BRANCH" >/dev/null 2>&1 ||
error_exit "Failed to delete existing branch $TARGET_BRANCH."
fi

git switch "$REBASING_CIR_BRANCH" ||
error_exit "Failed to switch to $REBASING_CIR_BRANCH."
git checkout -b "$TARGET_BRANCH" ||
error_exit "Failed to checkout $TARGET_BRANCH."

if [ "$RUN_CHECK" = true ]; then
git rebase --exec "ninja -C build check-clang-cir" "$REBASE_BRANCH" "$TARGET_BRANCH" ||
error_exit "Failed to rebase."
else
git rebase "$REBASE_BRANCH" "$TARGET_BRANCH" ||
error_exit "Failed to rebase."
fi

log_info "Rebase completed successfully!"
45 changes: 2 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,3 @@
# The LLVM Compiler Infrastructure
# ClangIR (CIR)

[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/llvm/llvm-project/badge)](https://securityscorecards.dev/viewer/?uri=github.com/llvm/llvm-project)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8273/badge)](https://www.bestpractices.dev/projects/8273)
[![libc++](https://github.com/llvm/llvm-project/actions/workflows/libcxx-build-and-test.yaml/badge.svg?branch=main&event=schedule)](https://github.com/llvm/llvm-project/actions/workflows/libcxx-build-and-test.yaml?query=event%3Aschedule)

Welcome to the LLVM project!

This repository contains the source code for LLVM, a toolkit for the
construction of highly optimized compilers, optimizers, and run-time
environments.

The LLVM project has multiple components. The core of the project is
itself called "LLVM". This contains all of the tools, libraries, and header
files needed to process intermediate representations and convert them into
object files. Tools include an assembler, disassembler, bitcode analyzer, and
bitcode optimizer.

C-like languages use the [Clang](https://clang.llvm.org/) frontend. This
component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode
-- and from there into object files, using LLVM.

Other components include:
the [libc++ C++ standard library](https://libcxx.llvm.org),
the [LLD linker](https://lld.llvm.org), and more.

## Getting the Source Code and Building LLVM

Consult the
[Getting Started with LLVM](https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm)
page for information on building and running LLVM.

For information on how to contribute to the LLVM project, please take a look at
the [Contributing to LLVM](https://llvm.org/docs/Contributing.html) guide.

## Getting in touch

Join the [LLVM Discourse forums](https://discourse.llvm.org/), [Discord
chat](https://discord.gg/xS7Z362),
[LLVM Office Hours](https://llvm.org/docs/GettingInvolved.html#office-hours) or
[Regular sync-ups](https://llvm.org/docs/GettingInvolved.html#online-sync-ups).

The LLVM project has adopted a [code of conduct](https://llvm.org/docs/CodeOfConduct.html) for
participants to all modes of communication within the project.
Check https://clangir.org for general information, build instructions and documentation.
10 changes: 8 additions & 2 deletions clang-tools-extra/clang-tidy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/clang-tidy-config.h)
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})

add_clang_library(clangTidy STATIC
add_clang_library(clangTidy
ClangTidy.cpp
ClangTidyCheck.cpp
ClangTidyModule.cpp
Expand All @@ -23,7 +23,7 @@ add_clang_library(clangTidy STATIC
ClangSACheckers
omp_gen
ClangDriverOptions
)
)

clang_target_link_libraries(clangTidy
PRIVATE
Expand Down Expand Up @@ -76,6 +76,9 @@ add_subdirectory(performance)
add_subdirectory(portability)
add_subdirectory(readability)
add_subdirectory(zircon)
if(CLANG_ENABLE_CIR)
add_subdirectory(cir)
endif()
set(ALL_CLANG_TIDY_CHECKS
clangTidyAndroidModule
clangTidyAbseilModule
Expand Down Expand Up @@ -104,6 +107,9 @@ set(ALL_CLANG_TIDY_CHECKS
if(CLANG_TIDY_ENABLE_STATIC_ANALYZER)
list(APPEND ALL_CLANG_TIDY_CHECKS clangTidyMPIModule)
endif()
if(CLANG_ENABLE_CIR)
list(APPEND ALL_CLANG_TIDY_CHECKS clangTidyCIRModule)
endif()
set(ALL_CLANG_TIDY_CHECKS ${ALL_CLANG_TIDY_CHECKS} PARENT_SCOPE)

# Other subtargets. These may reference ALL_CLANG_TIDY_CHECKS
Expand Down
4 changes: 4 additions & 0 deletions clang-tools-extra/clang-tidy/ClangTidy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
#include "ClangTidyModuleRegistry.h"
#include "ClangTidyProfiling.h"
#include "ExpandModularHeadersPPCallbacks.h"
#ifndef CLANG_TIDY_CONFIG_H
#include "clang-tidy-config.h"
#endif
#include "utils/OptionsUtils.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Format/Format.h"
Expand Down Expand Up @@ -466,6 +469,7 @@ ClangTidyASTConsumerFactory::createASTConsumer(
Consumers.push_back(std::move(AnalysisConsumer));
}
#endif // CLANG_TIDY_ENABLE_STATIC_ANALYZER

return std::make_unique<ClangTidyASTConsumer>(
std::move(Consumers), std::move(Profiling), std::move(Finder),
std::move(Checks));
Expand Down
22 changes: 22 additions & 0 deletions clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
#include "llvm/Support/Regex.h"
#include <optional>

// Workaround unitests not needing to change unittests to require
// "clang-tidy-config.h" being generated.
#if __has_include("clang-tidy-config.h")
#ifndef CLANG_TIDY_CONFIG_H
#include "clang-tidy-config.h"
#endif
#endif

#if CLANG_ENABLE_CIR
#include "clang/Basic/CodeGenOptions.h"
#endif

namespace clang {

class ASTContext;
Expand Down Expand Up @@ -140,6 +152,12 @@ class ClangTidyContext {
/// Gets the language options from the AST context.
const LangOptions &getLangOpts() const { return LangOpts; }

#if CLANG_ENABLE_CIR
/// Get and set CodeGenOpts
CodeGenOptions &getCodeGenOpts() { return CodeGenOpts; };
void setCodeGenOpts(CodeGenOptions &CGO) { CodeGenOpts = CGO; }
#endif

/// Returns the name of the clang-tidy check which produced this
/// diagnostic ID.
std::string getCheckName(unsigned DiagnosticID) const;
Expand Down Expand Up @@ -245,6 +263,10 @@ class ClangTidyContext {

LangOptions LangOpts;

#if CLANG_ENABLE_CIR
CodeGenOptions CodeGenOpts;
#endif

ClangTidyStats Stats;

std::string CurrentBuildDirectory;
Expand Down
Loading