Skip to content

[CIR] Add 'core-flat' as an option value for '-emit-mlir=' #1466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2,381 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2381 commits
Select commit Hold shift + click to select a range
df0aad7
[CIR][CIRGen][Builtin][Neon] Lower neon_vabs_v and neon_vabsq_v (#1081)
ghehg Nov 25, 2024
78005e5
[CIR][CIRGen][Builtin] Support __builtin_launder except in the case o…
ghehg Nov 26, 2024
8b21b9f
[CIR][CIRGen] Support copy constructors with non-record arrays (#1165)
smeenai Nov 26, 2024
ee4f0e1
[CIR][Dialect] Introduce StdInitializerListOp to represent high-level…
HerrCai0907 Nov 26, 2024
89b0cd9
[CIR][CIRGen][Builtin][Neon] Lower __builtin_neon_vshl_v (#1134)
ghehg Nov 26, 2024
286d691
[CIR] Correct signedness for createSignedInt (#1167)
ChuanqiXu9 Nov 26, 2024
b62258e
[CIR] Relax the requirement for ternary operation (#1168)
ChuanqiXu9 Nov 26, 2024
5ff5af2
[CIR][ABI][AArch64][Lowering] Fix the callsite for nested unions (#1169)
bruteforceboy Nov 26, 2024
c719085
[CIR][NFC][Test] Add llvm ir test for lambdas (#1170)
ghehg Nov 27, 2024
1f845ba
[CIR][CIRGen] Add more tracking skeleton for missing cleanups
bcardosolopes Nov 26, 2024
49e6856
[CIR][NFC] Cleanup warnings post rebase
bcardosolopes Nov 27, 2024
6c99597
[CIR][Lowering][debuginfo] Disable debug info if `-g` is not specifie…
PikachuHyA Nov 27, 2024
6f55abd
[CIR] Remove InavalidUnionFieldAttr and remove a check in array attr …
ChuanqiXu9 Nov 27, 2024
53d7913
[CIR][Dialect] Extend BinaryFPToFPBuiltinOp to vector of FP type (#1173)
ghehg Nov 27, 2024
8b6e586
[CIR][CIRGen][Builtin] Support __builtin_elementwise_abs with vector …
ghehg Nov 27, 2024
a41dfe7
[CIR][CIRGen][Builtin][Neon] Lower SISD neon_vqrdmulhs_s32 (#1175)
ghehg Nov 27, 2024
e2ccdd9
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddlvq_u16 (#1176)
ghehg Nov 27, 2024
3fdceb9
[CIR][CIRGen] Change SignBitOp result type to !cir.bool (#1187)
PikachuHyA Dec 2, 2024
0c612b8
[CIR] Add code generation options to lowering context (#1171)
Lancern Dec 2, 2024
ebb7ab8
[CIR] [CodeGen] Handle arrangeCXXStructorDeclaration (#1179)
ChuanqiXu9 Dec 2, 2024
b11f2b0
[CIR] Add support for casting pointer-to-data-member values (#1188)
Lancern Dec 2, 2024
90815ba
[CIR][CodeGen][LowerToLLVM] Fix llvm lowering of CIR `UnaryOpKind_Not…
ghehg Dec 3, 2024
671e312
[CIR][CIRGen] Support emitting memcpys for fields (#1195)
smeenai Dec 3, 2024
52c9efb
[CIR][CIRGen] Call trivial assignment operators in more cases (#1196)
smeenai Dec 3, 2024
8ce1ead
[CIR][CIRGen] Emit memcpys for copy constructors (#1197)
smeenai Dec 3, 2024
254c501
[CIR][CIRGen] Remove -clangir-disable-emit-cxx-default (#1198)
smeenai Dec 3, 2024
bae1930
[CIR] Make use of !invariant.group metadata for const allocas (#1159)
Lancern Dec 6, 2024
55ce063
[CIR][CIRGen] Add CIRGen support for assume statement (#1205)
Lancern Dec 6, 2024
a70a37f
[CIR][CIRGen][Builtin][Neon] Lower neon_vbsl_v and neon_vbslq_v (#1206)
ghehg Dec 6, 2024
9de5973
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddlvq_u32 (#1208)
ghehg Dec 6, 2024
ab9b83a
[CIR][CIRGen] Flesh out CIRGenModule::Release skeleton (#1209)
smeenai Dec 6, 2024
18ab3ab
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddv_s16 and neon_vaddv_u16 …
ghehg Dec 6, 2024
c9d0bf4
[CIR] revert `StdInitializerListOp` (#1216)
HerrCai0907 Dec 7, 2024
9b2efbf
[CIR][NFC] Cleanup: MLIRContext vs ASTContext (#1217)
dkolsen-pgi Dec 9, 2024
c8670a5
[CIR][CIRGen][Builtin][Neon] Lower neon_vqadds_s32 (#1200)
ghehg Dec 9, 2024
bc9ac48
[CIR][CodeGen][NFC] Sync emitDeclInit to CodeGen
lanza Dec 11, 2024
56b77ba
[CIR] Honor -clangir-disable-verifier while printing
bcardosolopes Dec 11, 2024
00f47fd
[CIR][CIRGen][NFCI] Take a step into getting scope information to mat…
bcardosolopes Nov 27, 2024
e5baa79
Revert "[CIR][CIRGen][NFCI] Take a step into getting scope informatio…
bcardosolopes Dec 12, 2024
14bf0c0
[CIR][CodeGen][NFC] Refactor emitCXXGlobalVarDeclInit to match codegen
lanza Dec 12, 2024
41295de
[CIR][CodeGen] Flesh out some more missing features from Address
lanza Dec 12, 2024
b56869f
[CIR][CIRGen] Handle NYI in CIRGenModule::tryEmitBaseDestructorAsAlia…
ChuanqiXu9 Dec 12, 2024
d0253d9
[CIR][cir-translate] Support specifying target for `cir-translate` (#…
seven-mile Dec 12, 2024
54ea4fe
[CIR][CIRGen][Builtin][Neon] Lower neon_vqmovns_s32 and add CIR Poiso…
ghehg Dec 12, 2024
70b0bc9
[CIR][Dialect] Add BinOpKind_Max (#1201)
ghehg Dec 12, 2024
a7a0268
[CIR] Fix tests with LLVM_LINK_LLVM_DYLIB (#1222)
smeenai Dec 12, 2024
5c50ed9
[CIR] Remove the !cir.void return type for functions returning void (…
keryell Dec 12, 2024
ff8e44c
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddvq_u32 and neon_vaddvq_u6…
ghehg Dec 12, 2024
7697fec
[CIR][CIRGen][Builtin][Neon] Lower neon_vrsraq_n_v and neon_vrsra_n_v…
ghehg Dec 12, 2024
aa02aa7
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddlvq_s16 (#1231)
ghehg Dec 12, 2024
98a09b6
[CIR][CIRGen] Add uwtable attribute (#1226)
smeenai Dec 12, 2024
7a9be9d
[CIR][CIRGen] Match skeleton for setCIRFunctionAttributesForDefinitio…
smeenai Dec 13, 2024
129feaa
[CIR][ThroughMLIR][NFC] BinOpKind_Max NYI ThroughMLIR lowering (#1233)
ghehg Dec 13, 2024
95ddbd9
[CIR][CIRGen] Introduce cir.delete.array op (#1172)
ChuanqiXu9 Dec 17, 2024
c8ade18
[CIR][CIRGen] Support Lambda capturing `this` object (#1213)
ghehg Dec 17, 2024
40be77f
[CIR][CIRGen] Fixes function calls with return values and cleanup sta…
gitoleg Dec 17, 2024
031fb9c
[CIR] Put loop body in nested scopes (#1221)
Lancern Dec 17, 2024
9d3c1cc
[CIR][Dialect] Add FMaximumOp and FMinimumOp (#1237)
ghehg Dec 17, 2024
4a4f647
[CIR][CIRGen][TBAA] Add support for scalar types (#1220)
PikachuHyA Dec 18, 2024
541ea8f
[CIR][CodeGen][NFC] centralized split `std::initializer_list` field (…
HerrCai0907 Dec 18, 2024
2c521be
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddv_f32, neon_vaddvq_f32 an…
ghehg Dec 18, 2024
a6a15c3
[CIR][CIRGen][Builtin][Neon] Lower neon_vmax_v and neon_vmaxq_v (#1239)
ghehg Dec 18, 2024
22e4ce8
[CIR][NFC] Silence warning from recent PR
bcardosolopes Dec 18, 2024
7ec6c02
[CIR][CIRGen][TBAA] Replace hardcoded TBAA names with getTBAAName (#1…
PikachuHyA Dec 19, 2024
de8ca87
[CIR][CodeGen] fixes access to globals with bitfields (#1244)
gitoleg Dec 19, 2024
abb0ad7
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddvq_s64/s32, neon_vaddv_s3…
ghehg Dec 19, 2024
5f8989c
[CIR] Introduce a new dir in tests for known crashes to fix
lanza Dec 20, 2024
de6469f
[CIR][Lowering] fixes return value for = operator for bitfields (#1247)
gitoleg Dec 20, 2024
a37479d
Revert "[CIR][CIRGen][TBAA] Replace hardcoded TBAA names with getTBAA…
bcardosolopes Dec 20, 2024
fc5ef40
Revert "[CIR][CIRGen][TBAA] Add support for scalar types (#1220)"
bcardosolopes Dec 20, 2024
1e31146
[CIR][Types] Mimic OG codegen on isFuncParamTypeConvertible
bcardosolopes Dec 20, 2024
2666203
[CIR] Lower `cir.bool` to i1 (#1158)
orbiri Jan 6, 2025
3864a88
[CIR][CIRGen] Improve emission for array of unions (#1236)
ChuanqiXu9 Jan 6, 2025
5dd38b2
[CIR][CIRGen][Builtin][Neon] Lower neon_vsetq_lane_f64 (#1251)
AmrDeveloper Jan 6, 2025
947433b
[CIR][CIRGen][Builtin][Neon] Lower `neon_vaddd_s64` and `neon_vaddd_u…
AmrDeveloper Jan 6, 2025
9735539
[CIR][CIRGen][Builtin][Neon] Lower `neon_vsubd_s64` and `neon_vsubd_u…
AmrDeveloper Jan 6, 2025
4d7d214
[CIR][CIRGen][Builtin][Neon] Lower `vaddh_f16`, `vsubh_f16`, `vmulh_f…
AmrDeveloper Jan 6, 2025
2a9daa9
[CIR][CIRGen][Builtin][Neon] Lower vshld_n_s64 and vshld_n_u64 (#1259)
AmrDeveloper Jan 6, 2025
df1b606
[CIR][CIRGen][Builtin][Neon] Lower vshrd_n_s64 (#1260)
AmrDeveloper Jan 6, 2025
ba8ff4c
[CIR][CIRGen][Builtin][Neon] Lower neon_vset_lane_f64 (#1253)
AmrDeveloper Jan 6, 2025
f233f1a
[CIR] Add MLIR lowering for f16, bf16, and f128 (#1264)
Lancern Jan 7, 2025
b0a4d33
Lower neon_vmaxvq_u8,neon_vmaxvq_s8, neon_vmaxv_u8 and neon_vmaxvq_s8…
ghehg Jan 7, 2025
981f07a
[CIR][CodeGen] handle zero init padding case (#1257)
gitoleg Jan 9, 2025
b8c5a34
[CIR] Cleanup: convert from Clang type to CIR type (#1271)
dkolsen-pgi Jan 9, 2025
55181f0
[CIR][CIRGen][Builtin][Neon] Lower vabsh_f16 (#1269)
AmrDeveloper Jan 9, 2025
2195035
[CIR][CIRGen][NFCI] Get more scope information to match OG
bcardosolopes Jan 9, 2025
11a0c26
[CIR] Add support for GCC function attribute "const" and "pure" (#1262)
Lancern Jan 9, 2025
4e37eb7
Revert "[CIR] Remove the !cir.void return type for functions returnin…
lanza Mar 17, 2025
489de07
[CIR] Remove return !cir.void from IR and textual representation (#1249)
keryell Jan 10, 2025
d2e8197
[CIR][CodeGen][NFC] Add documentation regarding memory emission defer…
orbiri Jan 13, 2025
3cf0d5f
[CIR][Doc][NFC] Add a description for all the passes (#1282)
keryell Jan 13, 2025
4212838
[CIR][CIRGen] Fix CXX codegen for default args (#1278)
gitoleg Jan 14, 2025
d70f1f1
[CIR][CIRGen] virtual table pointer initialization without ctor (#1283)
ghehg Jan 14, 2025
0dd0622
[CIR] Data member pointer comparison and casts (#1268)
Lancern Jan 15, 2025
200dbd8
[CIR] Add integer result type for cir.global_view (#1248)
Lancern Jan 21, 2025
596c50f
[CIR][CIRGen] Simplify LLVM IR array initialization for clang CIR (#1…
Rajveer100 Jan 21, 2025
442bff7
[CIR][NFC] Add cleanup region to ScopeOp
bcardosolopes Jan 23, 2025
a2527c7
[CIR] Add limited support for array new (#1286)
andykaylor Jan 27, 2025
45c9231
[CIR] Fix build due to deprecated interfaces (#1299)
darkbuck Jan 28, 2025
bbe1e81
[CIR] Cleanup cir.scopes with a single cir.yield operation (#1291)
AmrDeveloper Jan 29, 2025
0108e09
[CIR] Add initial support for array cookies (#1297)
andykaylor Jan 29, 2025
6fce557
[CIR][NFC] Teach op parsers to use enum keyword parsing helpers (#1298)
AmrDeveloper Jan 29, 2025
473ff1b
[CIR] Fix vector issues from latest rebase
bcardosolopes Jan 29, 2025
f9293c4
[CIR][CIRGen] Add padding to unions (#1289)
gitoleg Jan 31, 2025
453892a
[CIR][CIRGen][Builtin][Clang] Lowering clang::AArch64::BI__builtin_ar…
AmrDeveloper Jan 31, 2025
ef22e0f
[CIR] Fix Lowering/ptrstride.cir xfailed after rebasing (#1302)
AmrDeveloper Jan 31, 2025
8606fed
[CIR] Implement support for zero-initialized builtin type allocation …
andykaylor Feb 3, 2025
765d92c
[CIR][CIRGen] Implement array cookie ABI for AppleARM64 targets (#1301)
andykaylor Feb 3, 2025
242b48b
[CIR] Implement partial initialization for array new (#1307)
andykaylor Feb 4, 2025
ef6d075
[CIR][Codegen] Fixes global variables that point to another globals (…
gitoleg Feb 5, 2025
d9e602a
[CIR][ABI][Lowering] Fixes calling convention (#1308)
gitoleg Feb 5, 2025
02cbd3c
[CIR][CUDA] Initial support for host compilation (#1309)
AdUhTkJm Feb 5, 2025
6042fe9
[CIR][CUDA] Initial support for device compilation (#1311)
AdUhTkJm Feb 6, 2025
d84e99d
[CIR] Enable cir.bool binops (#1312)
andykaylor Feb 6, 2025
99a9c8c
[CIR] Silence warnings introduced in the past few weeks
bcardosolopes Feb 6, 2025
6bacbcd
[CIR] Implement array new handling for variable array size (#1313)
andykaylor Feb 6, 2025
82950ca
[CIR] Add attribute visitor for lowering globals (#1318)
andykaylor Feb 7, 2025
5d2007b
[CIR][HIP] Compile host code (#1319)
koparasy Feb 7, 2025
d38092f
[CIR][CIRGen][Builtin][Neon] Lower neon_vuzp_v and neon_vuzpq_v (#1314)
AmrDeveloper Feb 10, 2025
6b167f8
[CIR][CUDA] Generate attribute for kernel name of device stubs (#1317)
AdUhTkJm Feb 10, 2025
2535bf5
[CIR][HIP] Compile HIP device code (#1322)
koparasy Feb 10, 2025
292a561
[CIR][CIRGen] Handle __sync_{and,or,xor}_and_fetch (#1328)
moar55 Feb 11, 2025
1444fc1
[CIR][CIRGen] Support __builtin_isinf_sign (#1142)
PikachuHyA Feb 11, 2025
efb6c85
[CIR][CIRGen][Builtin][Neon] Lower neon_vzip_v and neon_vzipq_v (#1320)
AmrDeveloper Feb 11, 2025
46fa370
[CIR][NFC] Replace CIR attr visitor base class with a type switch (#1…
andykaylor Feb 11, 2025
5095142
[CIR][CIRGen][Builtin][Neon] Lower neon_vsra_n_v and neon_vsraq_n_v (…
FantasqueX Feb 11, 2025
ce6e888
[CIR][CIRGen] Add alignment attribute to AtomicCmpXchg (#1327)
FantasqueX Feb 11, 2025
e1a212c
[CIR][CIRGen][TBAA] Add support for scalar types (#1329)
PikachuHyA Feb 11, 2025
f4d2b56
[CIR][CodeGen] Add initial support for __cxa_rethrow (#1290)
bruteforceboy Feb 11, 2025
7a15736
[CIR] Correct initialization of VoidPtrPtrTy (#1336)
AdUhTkJm Feb 11, 2025
626a007
[CIR][NFC] Refactor GlobalOpLowering to align with upstream (#1337)
andykaylor Feb 12, 2025
ceb01db
[CIR][CUDA] Generate device stubs (#1332)
AdUhTkJm Feb 12, 2025
245e140
[CIR][CIRGen] Support for builtin `__atomic_thread_fence` (#1287)
Rajveer100 Feb 12, 2025
9949de9
[CIR][ABI][AArch64][Lowering] Fix calls for struct types > 128 bits (…
bruteforceboy Feb 12, 2025
bd8ea20
[CIR] Fix error messages when the conversion to MLIR standard dialect…
Jezurko Feb 12, 2025
3567f09
[CIR][HIP] Use CUDA attributes for HIP global functions (#1333)
koparasy Feb 12, 2025
a9bcb4d
Revert "[CIR][HIP] Use CUDA attributes for HIP global functions (#1333)"
bcardosolopes Feb 13, 2025
54b36a7
[CIR][CUDA][NFC] Skeleton of `setCUDAKernelCallingConvention` (#1344)
AdUhTkJm Feb 13, 2025
4b27ff8
[CIR][CIRGen][Builtin][Neon] Lower neon_vstl1_lane_s64 and vstl1q_lan…
AmrDeveloper Feb 14, 2025
7d8ec63
[CIR] Add support for array new with constructors (#1347)
andykaylor Feb 14, 2025
e8e434a
[CIR][CUDA] Generate kernel calls (#1348)
AdUhTkJm Feb 14, 2025
b9f0fb5
[CIR] Add missing Language::CIR cases (#1349)
xlauko Feb 14, 2025
59e7eb9
[CIR] Lower nested local constant alloca (#1261)
Lancern Feb 17, 2025
3a02101
[CIR][NFC] Fix typo (#1366)
FantasqueX Feb 18, 2025
49f42c7
[CIR][CIRGen][Builtin][Neon] Lower neon_vldap1_lane_s64 and vldap1q_l…
AmrDeveloper Feb 19, 2025
8d77ae1
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddlv s16 and u16 (#1352)
AmrDeveloper Feb 19, 2025
6c8cc7e
[CIR][CIRGen][Builtin][Neon] Lower neon_vsrad_n_s64 (#1355)
AmrDeveloper Feb 19, 2025
11b3488
[CIR][CIRGen] Atomics: handle atomic_compare_exchange_weak (#1359)
FantasqueX Feb 19, 2025
7cd4023
[CIR][CIRGen][Builtin][Neon] Lower vget_lane_bf16, vduph_lane f16 and…
AmrDeveloper Feb 19, 2025
f7e5e94
[CIR][CIRGen] handle `__builtin_elementwise_acos` (#1362)
FantasqueX Feb 19, 2025
5df8c01
[CIR][CIRGen] handle vectors of size 3 like size 4 for better perform…
FantasqueX Feb 19, 2025
fbf1581
[CIR][CUDA] Handle shared and local variables (#1368)
AdUhTkJm Feb 19, 2025
9fa9d18
[CIR] Add handling for initializing multi-dimension arrays (#1369)
andykaylor Feb 19, 2025
58c03ea
[CIR][HIP|CUDA] Generate global storing CUDA|HIP stub function (#1341)
koparasy Feb 19, 2025
0943911
[CIR][CIRGen][Builtin][Neon] Lower neon_vshrd_n_u64 (#1353)
AmrDeveloper Feb 19, 2025
59493c0
[CIR][CIRGen][Builtin][Neon] Lower neon_vsrad_n_u64 (#1356)
AmrDeveloper Feb 19, 2025
4d47993
[CIR][Bugfix] fixes global array of pointers (#1350)
gitoleg Feb 19, 2025
93765ff
[CIR][CIRGen] Handle __sync_nand_and_fetch (#1351)
moar55 Feb 19, 2025
4ff53b6
[CIR][CIRGen][Builtin][Neon] Lower vgetq_lane_bf16, vduph f16 and fb1…
AmrDeveloper Feb 19, 2025
e2b4540
[CIR][CIRGen] Add more support for __cxa_rethrow (#1343)
bruteforceboy Feb 20, 2025
a6fd39f
[CIR][CIRGen][TBAA] Add CIR_TBAAStructAttr (#1365)
PikachuHyA Feb 20, 2025
334c30e
[CIR][CodeGen] Fix extra Yieldop case during try-catch generation (#1…
bruteforceboy Feb 20, 2025
5f1f57c
[CIR][CIRGen] handle `__builtin_elementwise_exp` (#1376)
FantasqueX Feb 20, 2025
eca2e55
[CIR][CIRGen][Builtin][Neon] Lower vrsrad_n u64 and s64 (#1379)
AmrDeveloper Feb 20, 2025
a19d530
[CIR] Fix Address element type problems (#1373)
andykaylor Feb 21, 2025
e1e08cf
[CIR][CUDA] Skeleton of NVPTX target lowering info (#1358)
AdUhTkJm Feb 22, 2025
e55ad76
[CIR][CUDA] Add attribute for CUDA fat binary name (#1377)
AdUhTkJm Feb 22, 2025
a2d7768
[CIR][CIRGen][Builtin][Neon] Lower neon_vrshrd_n for s64 and u64 (#1383)
AmrDeveloper Feb 22, 2025
6890355
[CIR][CIRGen][Builtin][Neon] Lower builtin_neon_vqshld_n s64 and u64 …
AmrDeveloper Feb 22, 2025
f35546e
[CIR] LLVM lowering support for pointers to member functions (#1292)
Lancern Feb 22, 2025
4669855
[CIR][CIRGen][Builtin][Neon] Lower builtin_neon_vqshlud_n_s64 (#1384)
AmrDeveloper Feb 24, 2025
7a4763b
[CIR] Add support for __builtin_bitreverse (#1386)
Lancern Feb 24, 2025
265c075
[CIR][CIRGen][Builtin][Neon] Lower neon_vrnd32x (#1388)
AmrDeveloper Feb 24, 2025
8d170c0
[CIR] CallConvLowering for X86 aggregate (#1387)
AdUhTkJm Feb 24, 2025
f9d4c4c
[CIR][NFC] Un XFAIL global-bar-simple test (#1395)
FantasqueX Feb 24, 2025
65b46b5
[CIR][CIRGen][builtin] handle `_mm_clflush` (#1397)
FantasqueX Feb 24, 2025
49ba380
[CIR][CIRGen][Builtin][Neon] Lower vrnd32z and vrnd32zq (#1399)
AmrDeveloper Feb 24, 2025
e0244f3
[CIR][CodeGen] Support return in TryOp (#1398)
bruteforceboy Feb 24, 2025
10059b9
[CIR][Lowering][TBAA] Lower CIR_TBAAStructAttr (#1381)
PikachuHyA Feb 24, 2025
d169505
[CIR] New assembly format for function type return (#1391)
dkolsen-pgi Feb 24, 2025
0a0500c
[CIR][CUDA] Fix CUDA CIR mangling bug (#1396)
advay168 Feb 24, 2025
8a068e9
[CIR] ClangIR specific .clang-tidy files (#1402)
dkolsen-pgi Feb 25, 2025
f0a74e0
[CIR] Add support for comparisons between pointers to member function…
Lancern Feb 25, 2025
809c370
[CIR][CUDA] support for device variables (#1394)
JamesL425 Feb 26, 2025
2f10c09
[CIR] clang-tidy CIRGenFunction.cpp (#1410)
dkolsen-pgi Feb 26, 2025
0ed3ce0
[CIR] Remove redundant BoolType customAssemblyFormat (NFC) (#1407)
xlauko Feb 26, 2025
24e1d77
[CIR][CIRGen][Builtin][Neon] Lower vrnd64x and vrnd64xq (#1400)
AmrDeveloper Feb 26, 2025
41efb52
[CIR] Track size_t and int size with module attributes (#1389)
AdUhTkJm Feb 26, 2025
a735c0c
[CIR][CIRGen] Simplify __builtin_elementwise_abs (#1393)
FantasqueX Feb 26, 2025
d33063b
[CIR] Simple casts on pointers to member functions (#1409)
Lancern Feb 26, 2025
a47d48e
[CIR] Simplify FuncType printer/parser (#1413)
xlauko Feb 26, 2025
700bafc
[CIR][CIRGen][Builtin][Neon] Lower vrnd64z and vrnd64zq (#1401)
AmrDeveloper Feb 27, 2025
4a6c446
[CIR][ThroughMLIR] remove nested memref wrapper for array types (#1412)
PikachuHyA Feb 27, 2025
1108d7e
[CIR] Delete `FuncOp::verifyType` (#1421)
dkolsen-pgi Feb 27, 2025
a844b1b
[CIR][Github][CI] Add clangir upstream rebase workflow (#1345)
xlauko Feb 28, 2025
c245e6f
[CIR][CodeGen] Emit cir.resume for synthetic TryOp's in place (#1418)
bruteforceboy Mar 1, 2025
e9808c1
[CIR] clang-tidy CIRGenModule.cpp (#1428)
dkolsen-pgi Mar 1, 2025
eb25ff3
[CIR] Add syncscope to AtomicCmpXchgOp (#1419)
FantasqueX Mar 1, 2025
703c45e
[CIR] Clean up and complete CIRGlobalValueInterface methods (#1423)
xlauko Mar 1, 2025
b2212ac
[CIR] Base-to-derived and derived-to-base casts on pointers to member…
Lancern Mar 1, 2025
77885cd
[CIR][CUDA] Fix destructor behaviour (#1422)
AdUhTkJm Mar 4, 2025
d4cd88e
[CIR][CIRGen] Move CIRGenModule::getTargetCIRGenInfo() to CIRGenModul…
advay168 Mar 4, 2025
0f231b1
[CIR] Change AtomicFenceOp's syncscope to OptionalAttr (#1429)
FantasqueX Mar 4, 2025
80bbe6d
[CIR][CIRGen][Builtin][Neon] Lower vcaged_f64 (#1432)
AmrDeveloper Mar 4, 2025
7f44386
[CIR][Lowering][TBAA] distinct C and C++ (#1406)
PikachuHyA Mar 5, 2025
d076f0a
[CIR][CUDA] Treat nvptx triple as alias for nvptx64 (#1420)
advay168 Mar 5, 2025
36fb12d
[CIR][CodeGen] Fix std::ofstream fail during CodeGen (#1437)
bruteforceboy Mar 5, 2025
747d112
[CIR][CUDA] Lowering device and shared variables (#1438)
AdUhTkJm Mar 5, 2025
ba7332d
[CIR][CUDA] Generate registration function (Part 1) (#1415)
AdUhTkJm Mar 5, 2025
b0aafb2
[CIR][CIRGen][TBAA] Add support for enum (#1435)
PikachuHyA Mar 5, 2025
1318975
[CIR] Add option to emit MLIR in LLVM dialect. (#1316)
Jezurko Mar 5, 2025
27b3efb
[CIR] Disable -Woverloaded-virtual when compiling with gcc (#1440)
andykaylor Mar 5, 2025
b35509b
[CIR] Fix test to use -emit-mlir=core
bcardosolopes Mar 5, 2025
4e2c357
[CIR] Fix multiple warnings across CIR codebase
bcardosolopes Mar 6, 2025
b748136
[CIR] Remove -clangir-disable-passes from test
bcardosolopes Mar 6, 2025
cb6ce95
[CIR][CIRGen][Neon] Make vrndns emit RoundEvenOp directly (#1434)
FantasqueX Mar 6, 2025
ca07d1b
[CIR][CIRGen][TBAA] Add support for BitInt (#1443)
PikachuHyA Mar 7, 2025
11a2777
[CIR] Fix attributes lowering for GlobalOp (#1447)
AdUhTkJm Mar 7, 2025
9116979
[CIR][CIRGen][Builtin][Neon] Lower vcagtd_f64 (#1448)
AmrDeveloper Mar 7, 2025
2dcbe23
[CIR][CIRGen][Builtin][Neon] Lower neon vaddlvq_s32 (#1450)
AmrDeveloper Mar 7, 2025
35cd6ec
[CIR][CIRGen][Builtin][Neon] Lower neon vaddlv_u32 (#1451)
AmrDeveloper Mar 7, 2025
2cd4fbf
[CIR][CIRGen][TBAA] Add support for pointer tbaa (#1452)
PikachuHyA Mar 7, 2025
f0111ff
[CIR][CIRGen][Neon] Make vrnda emit RoundOp directly (#1453)
FantasqueX Mar 7, 2025
4d861f6
[CIR][CUDA] Support for built-in CUDA surface type (#1455)
JamesL425 Mar 8, 2025
5e50b7e
[CIR][CUDA] Fix address space values for NVPTX (#1445)
anominos Mar 11, 2025
9aba928
[CIR][CIRGen][Builtin][Neon] Lower neon vcages_f32 (#1449)
AmrDeveloper Mar 11, 2025
5591ae8
[CIR][CUDA] Add target-specific attributes (#1457)
AdUhTkJm Mar 11, 2025
624b139
[CIR][CIRGen][Builtin][Neon] Lower neon vmaxv_f32 (#1460)
AmrDeveloper Mar 11, 2025
3b62a12
[CIR][CUDA] implement cuda constant variables (#1444)
anominos Mar 11, 2025
9320a84
[CIR][CUDA] Register __global__ functions (#1441)
AdUhTkJm Mar 11, 2025
26d342e
[CIR][CUDA] Miscellanous bugfixes (#1462)
AdUhTkJm Mar 11, 2025
5371e59
[CIR][CIRGen][Builtin][Neon] Lower neon vaddlv_s32 (#1464)
AmrDeveloper Mar 11, 2025
a120c21
[CIR][CUDA] Generate CUDA destructor (#1470)
AdUhTkJm Mar 12, 2025
444da4f
[CIR][CIRGen][builtin] handle `__lzcnt` (#1382)
FantasqueX Mar 12, 2025
be7bab5
[CIR][CUDA] Support builtin CUDA variables (#1458)
advay168 Mar 12, 2025
0dc6ca6
[CIR][CUDA] Support for inbuilt texture types (#1469)
JamesL425 Mar 12, 2025
b233fd1
[CIR] Lower `signext` and `zeroext` attributes (#1473)
AdUhTkJm Mar 13, 2025
af77107
[CIR][CIRGen][TBAA] Add support for vtable pointer (#1463)
PikachuHyA Mar 13, 2025
28f9896
[CIR][CIRGen][builtin][X86] handle _mm_lfence (#1474)
FantasqueX Mar 13, 2025
07e9d6e
[CIR][CUDA] Support device-side printf (#1475)
AdUhTkJm Mar 13, 2025
6d6b23a
[CIR][CIRGen][builtin] handle `__popcnt` (#1479)
FantasqueX Mar 13, 2025
5781e00
[CIR][CUDA] CallConvLowering for basic types in NVPTX (#1468)
AdUhTkJm Mar 17, 2025
c6fca3d
[CIR][NFC] Fix test failures caused by double spaces in check line (#…
seven-mile Mar 17, 2025
ba0c9fd
[CIR] Fix assertion in CIRGenTypes::isFuncParamTypeConvertible (#1487)
Lancern Mar 17, 2025
f2eb0f7
[CIR][CIRGen][Builtin][Neon] Lower neon vabsd_s64 (#1489)
AmrDeveloper Mar 17, 2025
1b1a832
[CIR] Implement ::verify for cir.atomic.xchg and cir.atomic.cmp_xchg …
Icaro-Nunes Mar 18, 2025
4cf5576
[CIR][CIRGen][Builtin][Neon] Lower neon vcaled_f64 (#1495)
AmrDeveloper Mar 18, 2025
7679ba9
[CIR][CIRGen][builtin] handle _mm_pause (#1493)
shrikardongre Mar 18, 2025
79d0d74
[CIR] Add support for nontemporal loads and stores (#1494)
Lancern Mar 18, 2025
8ec33f0
[CIR] Add 'core-flat' as an option value for '-emit-mlir='
darkbuck Mar 7, 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
Loading