Skip to content

[CIR][ThroughMLIR] Lower structs and GetMemberOp #1565

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,472 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2472 commits
Select commit Hold shift + click to select a range
c6229c0
[CIR][CIRGen][Builtin][Neon] Lower vshld_n_s64 and vshld_n_u64 (#1259)
AmrDeveloper Jan 6, 2025
9230529
[CIR][CIRGen][Builtin][Neon] Lower vshrd_n_s64 (#1260)
AmrDeveloper Jan 6, 2025
3a574fc
[CIR][CIRGen][Builtin][Neon] Lower neon_vset_lane_f64 (#1253)
AmrDeveloper Jan 6, 2025
02e1dec
[CIR] Add MLIR lowering for f16, bf16, and f128 (#1264)
Lancern Jan 7, 2025
4996e13
Lower neon_vmaxvq_u8,neon_vmaxvq_s8, neon_vmaxv_u8 and neon_vmaxvq_s8…
ghehg Jan 7, 2025
6bf07e8
[CIR][CodeGen] handle zero init padding case (#1257)
gitoleg Jan 9, 2025
99060d4
[CIR] Cleanup: convert from Clang type to CIR type (#1271)
dkolsen-pgi Jan 9, 2025
a68e893
[CIR][CIRGen][Builtin][Neon] Lower vabsh_f16 (#1269)
AmrDeveloper Jan 9, 2025
03eda66
[CIR][CIRGen][NFCI] Get more scope information to match OG
bcardosolopes Jan 9, 2025
cc856c3
[CIR] Add support for GCC function attribute "const" and "pure" (#1262)
Lancern Jan 9, 2025
42192a1
Revert "[CIR] Remove the !cir.void return type for functions returnin…
lanza Mar 17, 2025
fa44b47
[CIR] Remove return !cir.void from IR and textual representation (#1249)
keryell Jan 10, 2025
53fa5d6
[CIR][CodeGen][NFC] Add documentation regarding memory emission defer…
orbiri Jan 13, 2025
0707448
[CIR][Doc][NFC] Add a description for all the passes (#1282)
keryell Jan 13, 2025
6ae6f3f
[CIR][CIRGen] Fix CXX codegen for default args (#1278)
gitoleg Jan 14, 2025
81ef7d0
[CIR][CIRGen] virtual table pointer initialization without ctor (#1283)
ghehg Jan 14, 2025
8d28385
[CIR] Data member pointer comparison and casts (#1268)
Lancern Jan 15, 2025
682b746
[CIR] Add integer result type for cir.global_view (#1248)
Lancern Jan 21, 2025
47d61e4
[CIR][CIRGen] Simplify LLVM IR array initialization for clang CIR (#1…
Rajveer100 Jan 21, 2025
d996178
[CIR][NFC] Add cleanup region to ScopeOp
bcardosolopes Jan 23, 2025
0c8e2b2
[CIR] Add limited support for array new (#1286)
andykaylor Jan 27, 2025
3bcd0e8
[CIR] Fix build due to deprecated interfaces (#1299)
darkbuck Jan 28, 2025
9bb2d7b
[CIR] Cleanup cir.scopes with a single cir.yield operation (#1291)
AmrDeveloper Jan 29, 2025
c810381
[CIR] Add initial support for array cookies (#1297)
andykaylor Jan 29, 2025
150a263
[CIR][NFC] Teach op parsers to use enum keyword parsing helpers (#1298)
AmrDeveloper Jan 29, 2025
a8cc875
[CIR] Fix vector issues from latest rebase
bcardosolopes Jan 29, 2025
0a6c013
[CIR][CIRGen] Add padding to unions (#1289)
gitoleg Jan 31, 2025
ad3914a
[CIR][CIRGen][Builtin][Clang] Lowering clang::AArch64::BI__builtin_ar…
AmrDeveloper Jan 31, 2025
2b0bec8
[CIR] Fix Lowering/ptrstride.cir xfailed after rebasing (#1302)
AmrDeveloper Jan 31, 2025
2ab1d08
[CIR] Implement support for zero-initialized builtin type allocation …
andykaylor Feb 3, 2025
d7aafc3
[CIR][CIRGen] Implement array cookie ABI for AppleARM64 targets (#1301)
andykaylor Feb 3, 2025
ad8774a
[CIR] Implement partial initialization for array new (#1307)
andykaylor Feb 4, 2025
f0ef162
[CIR][Codegen] Fixes global variables that point to another globals (…
gitoleg Feb 5, 2025
7ba2f16
[CIR][ABI][Lowering] Fixes calling convention (#1308)
gitoleg Feb 5, 2025
1ac141c
[CIR][CUDA] Initial support for host compilation (#1309)
AdUhTkJm Feb 5, 2025
dd4a7f0
[CIR][CUDA] Initial support for device compilation (#1311)
AdUhTkJm Feb 6, 2025
5170571
[CIR] Enable cir.bool binops (#1312)
andykaylor Feb 6, 2025
f6e1404
[CIR] Silence warnings introduced in the past few weeks
bcardosolopes Feb 6, 2025
a91fdf0
[CIR] Implement array new handling for variable array size (#1313)
andykaylor Feb 6, 2025
b3c7b25
[CIR] Add attribute visitor for lowering globals (#1318)
andykaylor Feb 7, 2025
65b7b84
[CIR][HIP] Compile host code (#1319)
koparasy Feb 7, 2025
cdc4fff
[CIR][CIRGen][Builtin][Neon] Lower neon_vuzp_v and neon_vuzpq_v (#1314)
AmrDeveloper Feb 10, 2025
27088c8
[CIR][CUDA] Generate attribute for kernel name of device stubs (#1317)
AdUhTkJm Feb 10, 2025
9a50518
[CIR][HIP] Compile HIP device code (#1322)
koparasy Feb 10, 2025
7d26c99
[CIR][CIRGen] Handle __sync_{and,or,xor}_and_fetch (#1328)
moar55 Feb 11, 2025
1a81c39
[CIR][CIRGen] Support __builtin_isinf_sign (#1142)
PikachuHyA Feb 11, 2025
d9e18cd
[CIR][CIRGen][Builtin][Neon] Lower neon_vzip_v and neon_vzipq_v (#1320)
AmrDeveloper Feb 11, 2025
3b06408
[CIR][NFC] Replace CIR attr visitor base class with a type switch (#1…
andykaylor Feb 11, 2025
f52719c
[CIR][CIRGen][Builtin][Neon] Lower neon_vsra_n_v and neon_vsraq_n_v (…
FantasqueX Feb 11, 2025
8c6ee5d
[CIR][CIRGen] Add alignment attribute to AtomicCmpXchg (#1327)
FantasqueX Feb 11, 2025
ea1add3
[CIR][CIRGen][TBAA] Add support for scalar types (#1329)
PikachuHyA Feb 11, 2025
698c4c3
[CIR][CodeGen] Add initial support for __cxa_rethrow (#1290)
bruteforceboy Feb 11, 2025
32f26aa
[CIR] Correct initialization of VoidPtrPtrTy (#1336)
AdUhTkJm Feb 11, 2025
9b47ba2
[CIR][NFC] Refactor GlobalOpLowering to align with upstream (#1337)
andykaylor Feb 12, 2025
fbbb815
[CIR][CUDA] Generate device stubs (#1332)
AdUhTkJm Feb 12, 2025
b1c92ad
[CIR][CIRGen] Support for builtin `__atomic_thread_fence` (#1287)
Rajveer100 Feb 12, 2025
ceb83f4
[CIR][ABI][AArch64][Lowering] Fix calls for struct types > 128 bits (…
bruteforceboy Feb 12, 2025
5b1a30f
[CIR] Fix error messages when the conversion to MLIR standard dialect…
Jezurko Feb 12, 2025
804d302
[CIR][HIP] Use CUDA attributes for HIP global functions (#1333)
koparasy Feb 12, 2025
afdc580
Revert "[CIR][HIP] Use CUDA attributes for HIP global functions (#1333)"
bcardosolopes Feb 13, 2025
f34a05e
[CIR][CUDA][NFC] Skeleton of `setCUDAKernelCallingConvention` (#1344)
AdUhTkJm Feb 13, 2025
95f6f4a
[CIR][CIRGen][Builtin][Neon] Lower neon_vstl1_lane_s64 and vstl1q_lan…
AmrDeveloper Feb 14, 2025
7009a0e
[CIR] Add support for array new with constructors (#1347)
andykaylor Feb 14, 2025
44ddada
[CIR][CUDA] Generate kernel calls (#1348)
AdUhTkJm Feb 14, 2025
45353f5
[CIR] Add missing Language::CIR cases (#1349)
xlauko Feb 14, 2025
2e0aec0
[CIR] Lower nested local constant alloca (#1261)
Lancern Feb 17, 2025
fc57710
[CIR][NFC] Fix typo (#1366)
FantasqueX Feb 18, 2025
a98dc9c
[CIR][CIRGen][Builtin][Neon] Lower neon_vldap1_lane_s64 and vldap1q_l…
AmrDeveloper Feb 19, 2025
22279ca
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddlv s16 and u16 (#1352)
AmrDeveloper Feb 19, 2025
b15bbb8
[CIR][CIRGen][Builtin][Neon] Lower neon_vsrad_n_s64 (#1355)
AmrDeveloper Feb 19, 2025
77543d8
[CIR][CIRGen] Atomics: handle atomic_compare_exchange_weak (#1359)
FantasqueX Feb 19, 2025
38f2113
[CIR][CIRGen][Builtin][Neon] Lower vget_lane_bf16, vduph_lane f16 and…
AmrDeveloper Feb 19, 2025
a74dc4b
[CIR][CIRGen] handle `__builtin_elementwise_acos` (#1362)
FantasqueX Feb 19, 2025
5c3fbe7
[CIR][CIRGen] handle vectors of size 3 like size 4 for better perform…
FantasqueX Feb 19, 2025
3078781
[CIR][CUDA] Handle shared and local variables (#1368)
AdUhTkJm Feb 19, 2025
e60f83a
[CIR] Add handling for initializing multi-dimension arrays (#1369)
andykaylor Feb 19, 2025
cb6a71c
[CIR][HIP|CUDA] Generate global storing CUDA|HIP stub function (#1341)
koparasy Feb 19, 2025
87595c7
[CIR][CIRGen][Builtin][Neon] Lower neon_vshrd_n_u64 (#1353)
AmrDeveloper Feb 19, 2025
0b854cc
[CIR][CIRGen][Builtin][Neon] Lower neon_vsrad_n_u64 (#1356)
AmrDeveloper Feb 19, 2025
a80f70f
[CIR][Bugfix] fixes global array of pointers (#1350)
gitoleg Feb 19, 2025
7cdb401
[CIR][CIRGen] Handle __sync_nand_and_fetch (#1351)
moar55 Feb 19, 2025
61fa3e1
[CIR][CIRGen][Builtin][Neon] Lower vgetq_lane_bf16, vduph f16 and fb1…
AmrDeveloper Feb 19, 2025
ad51a9e
[CIR][CIRGen] Add more support for __cxa_rethrow (#1343)
bruteforceboy Feb 20, 2025
da80fb1
[CIR][CIRGen][TBAA] Add CIR_TBAAStructAttr (#1365)
PikachuHyA Feb 20, 2025
5d14a63
[CIR][CodeGen] Fix extra Yieldop case during try-catch generation (#1…
bruteforceboy Feb 20, 2025
33c94c8
[CIR][CIRGen] handle `__builtin_elementwise_exp` (#1376)
FantasqueX Feb 20, 2025
5f95f26
[CIR][CIRGen][Builtin][Neon] Lower vrsrad_n u64 and s64 (#1379)
AmrDeveloper Feb 20, 2025
e786dd9
[CIR] Fix Address element type problems (#1373)
andykaylor Feb 21, 2025
f5207ff
[CIR][CUDA] Skeleton of NVPTX target lowering info (#1358)
AdUhTkJm Feb 22, 2025
c1905b9
[CIR][CUDA] Add attribute for CUDA fat binary name (#1377)
AdUhTkJm Feb 22, 2025
3c7a8b9
[CIR][CIRGen][Builtin][Neon] Lower neon_vrshrd_n for s64 and u64 (#1383)
AmrDeveloper Feb 22, 2025
51caa21
[CIR][CIRGen][Builtin][Neon] Lower builtin_neon_vqshld_n s64 and u64 …
AmrDeveloper Feb 22, 2025
67c1a0e
[CIR] LLVM lowering support for pointers to member functions (#1292)
Lancern Feb 22, 2025
e0e13b7
[CIR][CIRGen][Builtin][Neon] Lower builtin_neon_vqshlud_n_s64 (#1384)
AmrDeveloper Feb 24, 2025
ecd941a
[CIR] Add support for __builtin_bitreverse (#1386)
Lancern Feb 24, 2025
7e0bc85
[CIR][CIRGen][Builtin][Neon] Lower neon_vrnd32x (#1388)
AmrDeveloper Feb 24, 2025
43586f6
[CIR] CallConvLowering for X86 aggregate (#1387)
AdUhTkJm Feb 24, 2025
886160b
[CIR][NFC] Un XFAIL global-bar-simple test (#1395)
FantasqueX Feb 24, 2025
52bb08b
[CIR][CIRGen][builtin] handle `_mm_clflush` (#1397)
FantasqueX Feb 24, 2025
a323796
[CIR][CIRGen][Builtin][Neon] Lower vrnd32z and vrnd32zq (#1399)
AmrDeveloper Feb 24, 2025
1f5f121
[CIR][CodeGen] Support return in TryOp (#1398)
bruteforceboy Feb 24, 2025
b65aa1a
[CIR][Lowering][TBAA] Lower CIR_TBAAStructAttr (#1381)
PikachuHyA Feb 24, 2025
1b064d1
[CIR] New assembly format for function type return (#1391)
dkolsen-pgi Feb 24, 2025
2bb77e7
[CIR][CUDA] Fix CUDA CIR mangling bug (#1396)
advay168 Feb 24, 2025
00c1e54
[CIR] ClangIR specific .clang-tidy files (#1402)
dkolsen-pgi Feb 25, 2025
b74ec0c
[CIR] Add support for comparisons between pointers to member function…
Lancern Feb 25, 2025
919ebf9
[CIR][CUDA] support for device variables (#1394)
JamesL425 Feb 26, 2025
f67be93
[CIR] clang-tidy CIRGenFunction.cpp (#1410)
dkolsen-pgi Feb 26, 2025
a4035d8
[CIR] Remove redundant BoolType customAssemblyFormat (NFC) (#1407)
xlauko Feb 26, 2025
15928ac
[CIR][CIRGen][Builtin][Neon] Lower vrnd64x and vrnd64xq (#1400)
AmrDeveloper Feb 26, 2025
e5d8035
[CIR] Track size_t and int size with module attributes (#1389)
AdUhTkJm Feb 26, 2025
09f19c2
[CIR][CIRGen] Simplify __builtin_elementwise_abs (#1393)
FantasqueX Feb 26, 2025
632a492
[CIR] Simple casts on pointers to member functions (#1409)
Lancern Feb 26, 2025
dc0afab
[CIR] Simplify FuncType printer/parser (#1413)
xlauko Feb 26, 2025
4060a0f
[CIR][CIRGen][Builtin][Neon] Lower vrnd64z and vrnd64zq (#1401)
AmrDeveloper Feb 27, 2025
eb464e6
[CIR][ThroughMLIR] remove nested memref wrapper for array types (#1412)
PikachuHyA Feb 27, 2025
59996c8
[CIR] Delete `FuncOp::verifyType` (#1421)
dkolsen-pgi Feb 27, 2025
6e5ca2d
[CIR][Github][CI] Add clangir upstream rebase workflow (#1345)
xlauko Feb 28, 2025
5023611
[CIR][CodeGen] Emit cir.resume for synthetic TryOp's in place (#1418)
bruteforceboy Mar 1, 2025
7b37885
[CIR] clang-tidy CIRGenModule.cpp (#1428)
dkolsen-pgi Mar 1, 2025
895f19a
[CIR] Add syncscope to AtomicCmpXchgOp (#1419)
FantasqueX Mar 1, 2025
3a554f4
[CIR] Clean up and complete CIRGlobalValueInterface methods (#1423)
xlauko Mar 1, 2025
ebd5d6e
[CIR] Base-to-derived and derived-to-base casts on pointers to member…
Lancern Mar 1, 2025
d2fad95
[CIR][CUDA] Fix destructor behaviour (#1422)
AdUhTkJm Mar 4, 2025
3ae84f7
[CIR][CIRGen] Move CIRGenModule::getTargetCIRGenInfo() to CIRGenModul…
advay168 Mar 4, 2025
c1c22c5
[CIR] Change AtomicFenceOp's syncscope to OptionalAttr (#1429)
FantasqueX Mar 4, 2025
91617b3
[CIR][CIRGen][Builtin][Neon] Lower vcaged_f64 (#1432)
AmrDeveloper Mar 4, 2025
20b1222
[CIR][Lowering][TBAA] distinct C and C++ (#1406)
PikachuHyA Mar 5, 2025
18aff1a
[CIR][CUDA] Treat nvptx triple as alias for nvptx64 (#1420)
advay168 Mar 5, 2025
ec4dc3a
[CIR][CodeGen] Fix std::ofstream fail during CodeGen (#1437)
bruteforceboy Mar 5, 2025
7266f0b
[CIR][CUDA] Lowering device and shared variables (#1438)
AdUhTkJm Mar 5, 2025
52828d3
[CIR][CUDA] Generate registration function (Part 1) (#1415)
AdUhTkJm Mar 5, 2025
c855857
[CIR][CIRGen][TBAA] Add support for enum (#1435)
PikachuHyA Mar 5, 2025
7b2dfc3
[CIR] Add option to emit MLIR in LLVM dialect. (#1316)
Jezurko Mar 5, 2025
6c4ad61
[CIR] Disable -Woverloaded-virtual when compiling with gcc (#1440)
andykaylor Mar 5, 2025
6e5d5af
[CIR] Fix test to use -emit-mlir=core
bcardosolopes Mar 5, 2025
05b092c
[CIR] Fix multiple warnings across CIR codebase
bcardosolopes Mar 6, 2025
0aceb4a
[CIR] Remove -clangir-disable-passes from test
bcardosolopes Mar 6, 2025
0aa4f77
[CIR][CIRGen][Neon] Make vrndns emit RoundEvenOp directly (#1434)
FantasqueX Mar 6, 2025
1093db8
[CIR][CIRGen][TBAA] Add support for BitInt (#1443)
PikachuHyA Mar 7, 2025
da94019
[CIR] Fix attributes lowering for GlobalOp (#1447)
AdUhTkJm Mar 7, 2025
887c6d1
[CIR][CIRGen][Builtin][Neon] Lower vcagtd_f64 (#1448)
AmrDeveloper Mar 7, 2025
d9f3e99
[CIR][CIRGen][Builtin][Neon] Lower neon vaddlvq_s32 (#1450)
AmrDeveloper Mar 7, 2025
74b72f2
[CIR][CIRGen][Builtin][Neon] Lower neon vaddlv_u32 (#1451)
AmrDeveloper Mar 7, 2025
da01f09
[CIR][CIRGen][TBAA] Add support for pointer tbaa (#1452)
PikachuHyA Mar 7, 2025
7e7a821
[CIR][CIRGen][Neon] Make vrnda emit RoundOp directly (#1453)
FantasqueX Mar 7, 2025
01c27e9
[CIR][CUDA] Support for built-in CUDA surface type (#1455)
JamesL425 Mar 8, 2025
01a1748
[CIR][CUDA] Fix address space values for NVPTX (#1445)
anominos Mar 11, 2025
f26fff3
[CIR][CIRGen][Builtin][Neon] Lower neon vcages_f32 (#1449)
AmrDeveloper Mar 11, 2025
a00b403
[CIR][CUDA] Add target-specific attributes (#1457)
AdUhTkJm Mar 11, 2025
5f03b07
[CIR][CIRGen][Builtin][Neon] Lower neon vmaxv_f32 (#1460)
AmrDeveloper Mar 11, 2025
cadb738
[CIR][CUDA] implement cuda constant variables (#1444)
anominos Mar 11, 2025
4318044
[CIR][CUDA] Register __global__ functions (#1441)
AdUhTkJm Mar 11, 2025
37abce3
[CIR][CUDA] Miscellanous bugfixes (#1462)
AdUhTkJm Mar 11, 2025
49383ee
[CIR][CIRGen][Builtin][Neon] Lower neon vaddlv_s32 (#1464)
AmrDeveloper Mar 11, 2025
f556661
[CIR][CUDA] Generate CUDA destructor (#1470)
AdUhTkJm Mar 12, 2025
52cf5c0
[CIR][CIRGen][builtin] handle `__lzcnt` (#1382)
FantasqueX Mar 12, 2025
fe2206a
[CIR][CUDA] Support builtin CUDA variables (#1458)
advay168 Mar 12, 2025
bf52b48
[CIR][CUDA] Support for inbuilt texture types (#1469)
JamesL425 Mar 12, 2025
9b0b837
[CIR] Lower `signext` and `zeroext` attributes (#1473)
AdUhTkJm Mar 13, 2025
f896192
[CIR][CIRGen][TBAA] Add support for vtable pointer (#1463)
PikachuHyA Mar 13, 2025
6e31c6e
[CIR][CIRGen][builtin][X86] handle _mm_lfence (#1474)
FantasqueX Mar 13, 2025
0aef9ed
[CIR][CUDA] Support device-side printf (#1475)
AdUhTkJm Mar 13, 2025
867d736
[CIR][CIRGen][builtin] handle `__popcnt` (#1479)
FantasqueX Mar 13, 2025
4f8c2a8
[CIR][CUDA] CallConvLowering for basic types in NVPTX (#1468)
AdUhTkJm Mar 17, 2025
9e8806a
[CIR][NFC] Fix test failures caused by double spaces in check line (#…
seven-mile Mar 17, 2025
17935d6
[CIR] Fix assertion in CIRGenTypes::isFuncParamTypeConvertible (#1487)
Lancern Mar 17, 2025
bce7507
[CIR][CIRGen][Builtin][Neon] Lower neon vabsd_s64 (#1489)
AmrDeveloper Mar 17, 2025
6369507
[CIR] Implement ::verify for cir.atomic.xchg and cir.atomic.cmp_xchg …
Icaro-Nunes Mar 18, 2025
e74e226
[CIR][CIRGen][Builtin][Neon] Lower neon vcaled_f64 (#1495)
AmrDeveloper Mar 18, 2025
dd37e38
[CIR][CIRGen][builtin] handle _mm_pause (#1493)
shrikardongre Mar 18, 2025
d73d4cb
[CIR] Add support for nontemporal loads and stores (#1494)
Lancern Mar 18, 2025
e810ed3
[CIR] Add support for nontemporal loads and stores (#1494)
Lancern Mar 18, 2025
6a3e881
[CIR] Emit nsw flag for unary integer operations (#1485)
Lancern Mar 19, 2025
8f04109
[CIR][CIRGen][Builtin][Neon] Lower vcales_f32 (#1500)
AmrDeveloper Mar 19, 2025
28b0986
[CIR][CodeGen] Add InsertionGuard for tryBodyScope (#1498)
bruteforceboy Mar 19, 2025
aefb5e7
[CIR][NFC] Generalize IdiomRecognizer (#1484)
AdUhTkJm Mar 19, 2025
126956d
[CIR][NFC] Fix a wrong test case in fc293bb (#1503)
Lancern Mar 20, 2025
778bedb
cir-translate: Use default target triple instead of x86 if no target …
mmha Mar 20, 2025
86a85ef
[CIR][CUDA] Decorate global CUDA shadow variables with appropriate CI…
Sharp-Edged Mar 20, 2025
c66f98b
[CIR][CIRGen][Builtin] add `__builtin_tan` (#1502)
el-ev Mar 20, 2025
0004b81
[CIR][CIRGen][Builtin][Neon] Lower neon vcaltd_f64 (#1505)
AmrDeveloper Mar 20, 2025
59f739d
Revert "cir-translate: Use default target triple instead of x86 if no…
bcardosolopes Mar 20, 2025
571e56f
[CIR] Match comment in upstream
bcardosolopes Mar 20, 2025
6b19f09
[CIR] Backport clang commit to unxfail some builtin call (#1501)
FantasqueX Mar 20, 2025
a442924
[CIR][CodeGen] Replace LLVMIntrinsicCallOp with ACosOp in __builtin_e…
ayokunle321 Mar 21, 2025
2a6a8d8
Drop use of comprimised action
tstellar Mar 21, 2025
49be891
Drop use of comprimised action
tstellar Mar 21, 2025
beccc39
[CIR][CodeGen] Support for `__builtin_elementwise_asin` (#1511)
ayokunle321 Mar 24, 2025
f60e828
[CIR] Un-xfail variadic calls (#1517)
AdUhTkJm Mar 24, 2025
a61a0d8
[CIR][CIRGen][Builtin][Neon] Lower vcalts_f32 (#1520)
AmrDeveloper Mar 24, 2025
ec817c5
[CIR][CodeGen] Support for `__builtin_elementwise_atan` (#1512)
ayokunle321 Mar 25, 2025
06cee96
[CIR] Add `AddressPointAttr` (#1508)
el-ev Mar 25, 2025
3af8b3f
[CIR][CUDA] Handle clang builtin functions (#1496)
AdUhTkJm Mar 25, 2025
a468e26
[CIR] Refactor `StructType` with TableGen (#1504)
el-ev Mar 25, 2025
de866fa
[CIR][CodeGen] Add support for x86 memory fence (#1519)
shrikardongre Mar 25, 2025
45e6aa1
[CIR][CIRGen][NFC] Handle `PragmaComment` in `emitTopLevelDecl` (#1521)
el-ev Mar 25, 2025
54bc877
[CIR][LowerToLLVM][NFC] Refactor GlobalOpLowering for better readabil…
seven-mile Mar 25, 2025
86d6c7b
[CIR][NFC] Rectify the documentation of convertTypeForMem (#1526)
seven-mile Mar 25, 2025
4a39d45
[CIR][NFC] Sort emit functions in CIRGenFunction.h (#1524)
andykaylor Mar 25, 2025
2089f53
[CIR][CIRGen][CUDA][NFC] Mirror CUDARuntime skeleton of OG (#1527)
seven-mile Mar 26, 2025
ea4458a
[CIR][CodeGen] Support for BI__rdtsc (#1523)
shrikardongre Mar 26, 2025
c861519
[CIR][ThroughMLIR] Add ATanOp Lowering (#1528)
ayokunle321 Mar 26, 2025
dfef455
[CIR][CIRGen][Builtin][Neon] Lower vabds_f32 and vabdd_f64 (#1531)
AmrDeveloper Mar 26, 2025
7ec6a86
[CIR][ThroughMLIR] Add ACosOp Lowering (#1529)
ayokunle321 Mar 28, 2025
cf67fcf
[CIR][CIRGen][Builtin][Neon] Lower vmaxv_s32 (#1533)
AmrDeveloper Mar 28, 2025
657db03
[CIR][ThroughMLIR] Add ASinOp Lowering (#1530)
ayokunle321 Mar 31, 2025
29fae5c
[CIR][CIRGen][Builtin][Neon] Lower vmaxv_u32 (#1534)
AmrDeveloper Mar 31, 2025
40cce88
[CIR][CIRGen][Builtin][Neon] Lower vmaxvq_f64 (#1535)
AmrDeveloper Mar 31, 2025
2b63b2c
[CIR][LowerToLLVM] Support for LinkerOptions lowering (#1532)
el-ev Apr 1, 2025
a2cbfbf
[CIR][CIRGen][Builtin][Neon] Lower vmaxnmvq f32 and f64 (#1537)
AmrDeveloper Apr 1, 2025
c9b58ef
[CIR][NFC] Backport refactoring of unary plus/minus handling (#1499)
andykaylor Apr 1, 2025
91a32b0
[CIR][ThroughMLIR] Lower UnreachableOp (#1539)
AdUhTkJm Apr 1, 2025
ee4805a
[CIR][CIRGen][Builtin] Add `__builtin_elementwise_{log, log2, log10}`…
el-ev Apr 1, 2025
a2fe8b8
[CIR][CIRGen][Builtin][Neon] Lower vmaxnmv_f32 (#1544)
AmrDeveloper Apr 1, 2025
ea5bfe3
[CIR] Backport support zero init attr for all FP types (#1536)
AmrDeveloper Apr 4, 2025
64f01d1
[CIR][ThroughMLIR] Add TanOp Lowering (#1540)
goxul Apr 4, 2025
0a624db
[CIR] Unxfail memory effect attribute test (#1545)
FantasqueX Apr 4, 2025
a8c9ca9
[CIR][CIRGen][Builtin][Neon] Lower vminnmv_f32, vminnmvq_f64 and vmin…
AmrDeveloper Apr 4, 2025
b8299a5
[CIR] Fix for missing side effects during null pointer initialization…
andykaylor Apr 4, 2025
c653658
[CIR][CIRGen][Builtin][Neon] Lower vminv_s32 (#1550)
AmrDeveloper Apr 7, 2025
13a5e65
[CIR][CIRGen][Builtin][Neon] Lower vminv_u32 (#1551)
AmrDeveloper Apr 7, 2025
5987318
[CIR][CIRGen][Builtin] Add skeleton for missing builtin entries. (NFC…
el-ev Apr 9, 2025
98e8811
[CIR][CIRGen][Builtin] Add several elementwise FP builtins (#1553)
el-ev Apr 9, 2025
24ab10f
[CIR] Fix test failure caused by rebase (NFC) (#1558)
el-ev Apr 11, 2025
e5c6935
[CIR][CIRGen][Builtin][Neon] Lower vminvq_f32 and vminvq_f64 (#1555)
AmrDeveloper Apr 11, 2025
61259b3
[CIR] Attempt to fix windows bots
bcardosolopes Apr 11, 2025
84b4603
[CIR][NFC] Simplify struct type name creation (#1556)
andykaylor Apr 11, 2025
6502f55
[CIR][ThroughMLIR] Templatize unary math op lowerings. (#1557)
goxul Apr 11, 2025
4e7a223
[CIR] Rename `cir.struct` to `cir.record` and associated changes (#1559)
andykaylor Apr 14, 2025
cdef49c
[CIR][NFC] Reverse the polarity of RecordType complete/incomplete (#1…
andykaylor Apr 15, 2025
204c03e
[CIR] Treat cir.record class and struct types equivalently. (#1564)
andykaylor Apr 16, 2025
90833a4
[CIR] Always zero-extend shift amounts (#1568)
mmha Apr 17, 2025
4c4a762
[CIR][ThroughMLIR] Lower TrapOp (#1561)
Apr 17, 2025
9f6742f
[CIR][CodeGen] Fix crash during exception cleanup (#1566)
bruteforceboy Apr 17, 2025
4991421
[CIR][CodeGen] Supports const array user in the globals replacement (…
gitoleg Apr 18, 2025
0bae1fd
[CIR] Infer MLIR context in type builders when possible (#1570)
xlauko Apr 18, 2025
390cf25
[CIR] Replace RecordType data layout calculations (#1569)
andykaylor Apr 18, 2025
6c34681
[CIR][NFC] Simplify BoolAttr builders (#1572)
xlauko Apr 18, 2025
5933d4b
[CIR] Backport support zero init for VectorType (#1574)
AmrDeveloper Apr 21, 2025
3b2053c
[CIR][CIRGen][Builtin][Neon] Lower vqsubd_s64 and vqadds_u32 (#1575)
AmrDeveloper Apr 21, 2025
099c13c
[CIR] Simplify bool constant lowering (#1573)
xlauko Apr 21, 2025
2d5a287
[CIR] Make UndefAttr use AttrBuilderWithInferredContext (#1577)
xlauko Apr 21, 2025
efc735d
[CIR] Make ZeroAttr use AttrBuilderWithInferredContext (#1576)
xlauko Apr 21, 2025
8c264de
[CIR] Let ConstantOp builder infer its type automatically (#1578)
xlauko Apr 21, 2025
c7b27ec
[CIR] Make PoisonAttr use AttrBuilderWithInferredContext (#1579)
xlauko Apr 21, 2025
395999a
[CIR] Change record type alias prefix from !ty_ to !rec_ (#1580)
andykaylor Apr 22, 2025
92927ee
[CIR] Infer MLIRContext in attr builders when possible (#1582)
xlauko Apr 22, 2025
9c7f38a
[CIR] Create CIR_TypedAttr common class (#1583)
xlauko Apr 23, 2025
5251097
[CIR][ThroughMLIR] Lower structs and GetMemberOp
AdUhTkJm Apr 11, 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
12 changes: 6 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ on:
jobs:
check-docs-build:
name: "Test documentation build"
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
if: github.repository == 'llvm/llvm-project'
steps:
# Don't fetch before checking for file changes to force the file changes
Expand All @@ -60,12 +60,12 @@ jobs:
# a local checkout beforehand.
- name: Fetch LLVM sources (Push)
if: ${{ github.event_name == 'push' }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Get subprojects that have doc changes
id: docs-changed-subprojects
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1
with:
files_yaml: |
llvm:
Expand Down Expand Up @@ -98,11 +98,11 @@ jobs:
- '.github/workflows/docs.yml'
- name: Fetch LLVM sources (PR)
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Python env
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
mkdir built-docs/flang
cp -r flang-build/docs/* built-docs/flang/
- name: Upload docs
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
uses: actions/upload-artifact@v4
with:
name: docs-output
path: built-docs/
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.repo_ref || github.ref }}
fetch-depth: 250
- name: Setup ccache
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pr-code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,36 @@ on:

jobs:
code_formatter:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
timeout-minutes: 30
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Checkout through merge base
uses: rmacklin/fetch-through-merge-base@bfe4d03a86f9afa52bc1a70e9814fc92a07f7b75 # v0.3.0
uses: rmacklin/fetch-through-merge-base@v0
with:
base_ref: ${{ github.event.pull_request.base.ref }}
head_ref: ${{ github.event.pull_request.head.sha }}
deepen_length: 500

- name: Get changed files
id: changed-files
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1
with:
separator: ","
skip_initial_fetch: true

# We need to pull the script from the main branch, so that we ensure
# we get the latest version of this script.
- name: Fetch code formatting utils
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.base_ref }}
Expand All @@ -58,12 +58,12 @@ jobs:
echo "$CHANGED_FILES"

- name: Install clang-format
uses: aminya/setup-cpp@17c11551771948abc5752bbf3183482567c7caf0 # v1.1.1
uses: aminya/setup-cpp@v1
with:
clangformat: 19.1.6

- name: Setup Python env
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
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.
Loading
Loading