Skip to content

[WIP][CIR][CIRGen][TBAA] Add support for -new-struct-path-tbaa #1403

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,301 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2301 commits
Select commit Hold shift + click to select a range
7dd1678
[CIR][CIRGen][Builtin][Neon] Lower neon_vaesmcq_u8 (#1072)
ghehg Nov 8, 2024
d815f58
[CIR][CIRGen] Move CIRGen types into clang::CIRGen (#1082)
smeenai Nov 8, 2024
6ddac78
[CIR][ABI][AArch64][Lowering] Support unions (#1075)
bruteforceboy Nov 8, 2024
51b2e52
[CIR] Merge the mlir::cir namespace into cir (#1084)
smeenai Nov 8, 2024
c345b03
[CIR] Merge two copies of CIRGenAction.h (#1085)
smeenai Nov 8, 2024
25fb28b
[CIR][NFC] Expand doc on `cir.scope` terminators (#1078)
HerrCai0907 Nov 8, 2024
adf1b7d
[CIR][CIRGen][Builtin][Neon] Lower neon_vqdmulhq_v, neon_vqdmulh_v (#…
ghehg Nov 8, 2024
337da0c
[CIR][CIRGen] Change buildX functions to emitX (#1093)
smeenai Nov 9, 2024
a28811a
[CIR][NFC] Move LoweringPrepare into CIRGen (#1092)
lanza Nov 9, 2024
b5bc92b
[CIR][CodeGen][LowerToLLVM] String literals for OpenCL (#1091)
seven-mile Nov 9, 2024
5ba213a
Revert "[CIR][NFC] Move LoweringPrepare into CIRGen (#1092)"
bcardosolopes Nov 9, 2024
3bef174
[CIR][CIRGen] support builtin signbit (#1033)
PikachuHyA Nov 11, 2024
65979e6
[CIR][CIRGen][Builtin] Support __builtin_memcpy_inline (#1069)
ghehg Nov 11, 2024
4a2c3b2
[CIR][CIRGen][Builtin] Support __sync_add_and_fetch (#1077)
ghehg Nov 11, 2024
c55faa1
[CIR][CodeGen][NFC] Simplify replacing initializer of static decls (#…
seven-mile Nov 11, 2024
331549e
[CIR][Dialect][NFC] Fix double white spaces in `cir.global` assembly …
seven-mile Nov 11, 2024
30aa428
[CIR] Properly ensure terminating IfOp and ScopeOp regions (#1097)
orbiri Nov 11, 2024
fb546ae
[CIR][CIRGen][Builtin][Neon] Lower neon_vhsub_v, neon_vhsubq_v (#1103)
ghehg Nov 11, 2024
0d56f00
[CIR][NFC] Fix formatting (#1105)
smeenai Nov 12, 2024
366207f
[CIR][NFC] Conform if/else lowering order to match clang's output (#1…
orbiri Nov 12, 2024
a38a523
[CIR] [Lowering] [X86_64] Support VAArg in shape (#1100)
ChuanqiXu9 Nov 13, 2024
55adbd2
[CIR][CIRGen][Builtin][Neon] Lower neon_vqdmlal, neon_vqdmlsl (#1104)
ghehg Nov 13, 2024
18daffa
[CIR][ABI][AArch64] Support struct passing with coercion through memo…
gitoleg Nov 13, 2024
e6e7625
[CIR][CIRGen][Builtin][Neon] Lower neon_vaeseq_u8 (#1112)
ghehg Nov 13, 2024
3db6127
[CIR][CIRGen][Builtin] Support __builtin_wmemchr (#1115)
ghehg Nov 13, 2024
3447484
[CIR][CIRGen] Support __builtin_signbitl (#1117)
PikachuHyA Nov 13, 2024
d435cca
[CIR][Dialect][NFC] Refactor hardcoded attribute name strings (#1122)
seven-mile Nov 13, 2024
1e37f52
[CIR][ABI][Lowering] Fixes calls with union type (#1119)
gitoleg Nov 14, 2024
f3823af
[CIR][Builtin][NFC] More informative llvm_unreachable message in CIRG…
ghehg Nov 14, 2024
478122a
[CIR][CIRGen][Builtin][Neon] Lower vcvt_f32_v, vcvtq_f32_v (#1120)
ghehg Nov 14, 2024
d9133c9
[CIR][LowerToLLVM] Lowering triple from `cir.triple` attribute (#1125)
seven-mile Nov 14, 2024
55d0f53
[CIR][ABI][AArch64][Lowering] Support calls for struct types > 128 bi…
bruteforceboy Nov 14, 2024
98809ec
[CIR][CIRGen][Builtin] Support __builtin_elementwise_abs and extend A…
ghehg Nov 14, 2024
1323fb1
[ClangIR][Lowering][NFC] Split LowerToLLVM.h from LowerToLLVM.cpp (#1…
ChuanqiXu9 Nov 15, 2024
b156983
[CIR][CIRGen][Builtin][Neon] Lower neon_splat_lane, neon_splat_laneq…
ghehg Nov 15, 2024
4fe38ef
[CIR][CIRGen][Builtin] Support __builtin___memmove_chk (#1106)
ghehg Nov 15, 2024
63fd9ef
[CIR][CIRGen] Support for visual bases in getAddressOfBaseClass
bcardosolopes Nov 8, 2024
344b515
[CIR][NFC] Fix unused variable warning
bcardosolopes Nov 15, 2024
530afbc
[CIR][CIRGen] Bring getAddressOfBaseClass a bit closer to OG
bcardosolopes Nov 15, 2024
66fe032
[CIR][CIRGen][NFC] More unification of virtual and non-virtual offset…
bcardosolopes Nov 15, 2024
c370c1d
[CIR][CIRGen][NFC] More skeleton conformance
bcardosolopes Nov 15, 2024
38bb064
[CIR][CIRGen] Teach all uses of ApplyNonVirtualAndVirtualOffset to us…
bcardosolopes Nov 15, 2024
19f7a41
[CIR] Force cir.cmp to always return bool (#1110)
orbiri Nov 18, 2024
bb076bf
[CIR][CIRGen] Support __builtin_memset_inline (#1114)
PikachuHyA Nov 19, 2024
c01a339
[CIR][CIRGen][TBAA] Initial TBAA support (#1116)
PikachuHyA Nov 19, 2024
4eb60b4
[CIR][ABI][AArch64][Lowering] Support structures with padding (#1118)
bruteforceboy Nov 19, 2024
479a4ab
[CIR] fix deref nullptr when verify symbol for `cir.get_global` (#1143)
HerrCai0907 Nov 20, 2024
564a588
[CIR][NFC] Refactor code for populating LLVM conversion patterns (#1152)
Lancern Nov 22, 2024
1e3a8e3
[CIR][Dialect] Extend UnaryFPToFPBuiltinOp to vector of FP type (#1132)
ghehg Nov 23, 2024
e3d9fc3
[CIR][Builtin][Neon][NFC] Introduce skeleton of emitCommonNeonSISDBui…
ghehg Nov 23, 2024
ab98b3c
[CIR][CIRGen][Builtin][Neon] Lower neon_vqshrn_n_v (#1144)
ghehg Nov 23, 2024
bf83e5d
[CIR][FlattenCFG] Let results of CIR ScopeOp forwarded during Flatten…
ghehg Nov 23, 2024
8cb8d8d
[CIR][Transforms][NFC] Fix undesirable include of clang's private hea…
seven-mile Nov 23, 2024
486a298
[CIR][NFC] move data member pointer lowering to CXXABI (#1130)
Lancern Nov 25, 2024
b5a5e97
[CIR][AArch64][Lowering] Support fields with structs containing const…
bruteforceboy Nov 25, 2024
b29c903
[CIR][CIRGen][Builtin] Support __builtin_frame_address (#1137)
ghehg Nov 25, 2024
c1c576a
[CIR][ABI][AArch64][Lowering] support for calling struct types in ran…
bruteforceboy Nov 25, 2024
7377ae9
[CIR][CIRGen][Builtin] Support builtin __sync_sub_and_fetch (#1146)
ghehg Nov 25, 2024
4baa37e
[CIR][CIRGen][Builtin][Neon] Lower neon_vpadal_v, neon_vpadalq_v (#1148)
ghehg Nov 25, 2024
ee7e3b8
[CIR] [Lowering] [X86_64] Support VAArg for LongDouble (#1150)
ChuanqiXu9 Nov 25, 2024
d10a685
[CIR][CIRGen][Builtin][Neon] Lower neon_vrshl_v and neon_vrshlq_v (#1…
ghehg Nov 25, 2024
f5084d2
[CIR][CIRGen] Fix a stack-use-after-free (#1155)
smeenai Nov 25, 2024
2ae5f4f
[CIR][Dialect][NFC] Remove redundant module attribute `llvm.data_layo…
seven-mile Nov 25, 2024
6d7d313
[CIR][CIRGen][Builtin][Neon] Lower neon_vqrshrn_n_v (#1161)
ghehg Nov 25, 2024
dff40b1
[CIR][TargetLowering] Fix use iteration (#1162)
smeenai Nov 25, 2024
02ea9aa
[CIR][FlattenCFG] Fix rewrite API misuse (#1163)
smeenai Nov 25, 2024
940390d
[CIR][CIRGen][Builtin][Neon] Lower neon_vabs_v and neon_vabsq_v (#1081)
ghehg Nov 25, 2024
4762e73
[CIR][CIRGen][Builtin] Support __builtin_launder except in the case o…
ghehg Nov 26, 2024
5d787bd
[CIR][CIRGen] Support copy constructors with non-record arrays (#1165)
smeenai Nov 26, 2024
292b4f0
[CIR][Dialect] Introduce StdInitializerListOp to represent high-level…
HerrCai0907 Nov 26, 2024
2af9ae9
[CIR][CIRGen][Builtin][Neon] Lower __builtin_neon_vshl_v (#1134)
ghehg Nov 26, 2024
f61557a
[CIR] Correct signedness for createSignedInt (#1167)
ChuanqiXu9 Nov 26, 2024
f8ecab2
[CIR] Relax the requirement for ternary operation (#1168)
ChuanqiXu9 Nov 26, 2024
98179f8
[CIR][ABI][AArch64][Lowering] Fix the callsite for nested unions (#1169)
bruteforceboy Nov 26, 2024
1933610
[CIR][NFC][Test] Add llvm ir test for lambdas (#1170)
ghehg Nov 27, 2024
160e55d
[CIR][CIRGen] Add more tracking skeleton for missing cleanups
bcardosolopes Nov 26, 2024
641baf6
[CIR][NFC] Cleanup warnings post rebase
bcardosolopes Nov 27, 2024
9f52eee
[CIR][Lowering][debuginfo] Disable debug info if `-g` is not specifie…
PikachuHyA Nov 27, 2024
37294b3
[CIR] Remove InavalidUnionFieldAttr and remove a check in array attr …
ChuanqiXu9 Nov 27, 2024
0425722
[CIR][Dialect] Extend BinaryFPToFPBuiltinOp to vector of FP type (#1173)
ghehg Nov 27, 2024
537ad9f
[CIR][CIRGen][Builtin] Support __builtin_elementwise_abs with vector …
ghehg Nov 27, 2024
0e51250
[CIR][CIRGen][Builtin][Neon] Lower SISD neon_vqrdmulhs_s32 (#1175)
ghehg Nov 27, 2024
cf9ed01
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddlvq_u16 (#1176)
ghehg Nov 27, 2024
9c04e02
[CIR][CIRGen] Change SignBitOp result type to !cir.bool (#1187)
PikachuHyA Dec 2, 2024
63471c0
[CIR] Add code generation options to lowering context (#1171)
Lancern Dec 2, 2024
f22e0a7
[CIR] [CodeGen] Handle arrangeCXXStructorDeclaration (#1179)
ChuanqiXu9 Dec 2, 2024
a6bbd66
[CIR] Add support for casting pointer-to-data-member values (#1188)
Lancern Dec 2, 2024
3892a4c
[CIR][CodeGen][LowerToLLVM] Fix llvm lowering of CIR `UnaryOpKind_Not…
ghehg Dec 3, 2024
db6c436
[CIR][CIRGen] Support emitting memcpys for fields (#1195)
smeenai Dec 3, 2024
4c4ffec
[CIR][CIRGen] Call trivial assignment operators in more cases (#1196)
smeenai Dec 3, 2024
8a79b26
[CIR][CIRGen] Emit memcpys for copy constructors (#1197)
smeenai Dec 3, 2024
495ffd4
[CIR][CIRGen] Remove -clangir-disable-emit-cxx-default (#1198)
smeenai Dec 3, 2024
f1b4ba2
[CIR] Make use of !invariant.group metadata for const allocas (#1159)
Lancern Dec 6, 2024
d219ab9
[CIR][CIRGen] Add CIRGen support for assume statement (#1205)
Lancern Dec 6, 2024
23b6ff5
[CIR][CIRGen][Builtin][Neon] Lower neon_vbsl_v and neon_vbslq_v (#1206)
ghehg Dec 6, 2024
90aa3e5
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddlvq_u32 (#1208)
ghehg Dec 6, 2024
2e3d973
[CIR][CIRGen] Flesh out CIRGenModule::Release skeleton (#1209)
smeenai Dec 6, 2024
afab91d
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddv_s16 and neon_vaddv_u16 …
ghehg Dec 6, 2024
eec51a8
[CIR] revert `StdInitializerListOp` (#1216)
HerrCai0907 Dec 7, 2024
84add0e
[CIR][NFC] Cleanup: MLIRContext vs ASTContext (#1217)
dkolsen-pgi Dec 9, 2024
14532cd
[CIR][CIRGen][Builtin][Neon] Lower neon_vqadds_s32 (#1200)
ghehg Dec 9, 2024
c7fa618
[CIR][CodeGen][NFC] Sync emitDeclInit to CodeGen
lanza Dec 11, 2024
fb8b8ce
[CIR] Honor -clangir-disable-verifier while printing
bcardosolopes Dec 11, 2024
bd298b3
[CIR][CIRGen][NFCI] Take a step into getting scope information to mat…
bcardosolopes Nov 27, 2024
f2f5bfb
Revert "[CIR][CIRGen][NFCI] Take a step into getting scope informatio…
bcardosolopes Dec 12, 2024
9107c99
[CIR][CodeGen][NFC] Refactor emitCXXGlobalVarDeclInit to match codegen
lanza Dec 12, 2024
cf875ec
[CIR][CodeGen] Flesh out some more missing features from Address
lanza Dec 12, 2024
9ddefd8
[CIR][CIRGen] Handle NYI in CIRGenModule::tryEmitBaseDestructorAsAlia…
ChuanqiXu9 Dec 12, 2024
1eeed6e
[CIR][cir-translate] Support specifying target for `cir-translate` (#…
seven-mile Dec 12, 2024
3d7fcd4
[CIR][CIRGen][Builtin][Neon] Lower neon_vqmovns_s32 and add CIR Poiso…
ghehg Dec 12, 2024
3d735ec
[CIR][Dialect] Add BinOpKind_Max (#1201)
ghehg Dec 12, 2024
5d1c778
[CIR] Fix tests with LLVM_LINK_LLVM_DYLIB (#1222)
smeenai Dec 12, 2024
4af8e29
[CIR] Remove the !cir.void return type for functions returning void (…
keryell Dec 12, 2024
ff9ae83
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddvq_u32 and neon_vaddvq_u6…
ghehg Dec 12, 2024
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
3f64640
[mlir][llvm] support new-struct-path-tbaa
PikachuHyA Dec 12, 2024
7d3576c
[CIR][CIRGen][TBAA] Add support for -new-struct-path-tbaa
PikachuHyA Feb 25, 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
  •  
  •  
  •  
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
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
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
9 changes: 9 additions & 0 deletions clang-tools-extra/clang-tidy/ClangTidyForceLinker.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYFORCELINKER_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYFORCELINKER_H

#ifndef CLANG_TIDY_CONFIG_H
#include "clang-tidy-config.h"
#endif
#include "llvm/Support/Compiler.h"

namespace clang::tidy {
Expand Down Expand Up @@ -137,6 +139,13 @@ extern volatile int ZirconModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination =
ZirconModuleAnchorSource;

#if CLANG_ENABLE_CIR
// This anchor is used to force the linker to link the CIRModule.
extern volatile int CIRModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED CIRModuleAnchorDestination =
CIRModuleAnchorSource;
#endif

} // namespace clang::tidy

#endif
50 changes: 50 additions & 0 deletions clang-tools-extra/clang-tidy/cir-tidy/tool/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )

set(LLVM_LINK_COMPONENTS
AllTargetsAsmParsers
AllTargetsDescs
AllTargetsInfos
FrontendOpenMP
support
)

# Needed by LLVM's CMake checks because this file defines multiple targets.
set(LLVM_OPTIONAL_SOURCES CIRTidyMain.cpp CIRTidyToolMain.cpp)

add_clang_library(CIRTidyMain
CIRTidyMain.cpp

LINK_LIBS
CIRTidy
clangTidy
MLIRIR
${ALL_CLANG_TIDY_CHECKS}
MLIRIR

DEPENDS
omp_gen
)

clang_target_link_libraries(CIRTidyMain
PRIVATE
clangBasic
clangTooling
clangToolingCore
)

add_clang_tool(cir-tidy
CIRTidyToolMain.cpp
)
add_dependencies(cir-tidy
clang-resource-headers
)

target_link_libraries(cir-tidy
PRIVATE
CIRTidyMain
CIRTidy
)

install(TARGETS cir-tidy
DESTINATION bin
)
34 changes: 34 additions & 0 deletions clang-tools-extra/clang-tidy/cir/CIRTidyModule.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//===--- CIRTidyModule.cpp - clang-tidy -----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "../ClangTidy.h"
#include "../ClangTidyModule.h"
#include "../ClangTidyModuleRegistry.h"
#include "Lifetime.h"

namespace clang::tidy {
namespace cir {

class CIRModule : public ClangTidyModule {
public:
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
CheckFactories.registerCheck<Lifetime>("cir-lifetime-check");
}
};

} // namespace cir

// Register the CIRTidyModule using this statically initialized variable.
static ClangTidyModuleRegistry::Add<cir::CIRModule>
X("cir-module", "Adds ClangIR (CIR) based clang-tidy checks.");

// This anchor is used to force the linker to link in the generated object file
// and thus register the CIRModule.
volatile int CIRModuleAnchorSource = 0;

} // namespace clang::tidy
57 changes: 57 additions & 0 deletions clang-tools-extra/clang-tidy/cir/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
set(LLVM_LINK_COMPONENTS
FrontendOpenMP
Support
)

include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
include_directories( ${LLVM_MAIN_SRC_DIR}/../mlir/include )
include_directories( ${CMAKE_BINARY_DIR}/tools/mlir/include )

get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)

add_clang_library(clangTidyCIRModule
Lifetime.cpp
CIRTidyModule.cpp

LINK_LIBS
clangASTMatchers
clangCIR
clangFrontend
clangSerialization
clangTidy
clangTidyUtils
${dialect_libs}
MLIRCIR
MLIRCIRTransforms
MLIRAffineToStandard
MLIRAnalysis
MLIRIR
MLIRLLVMCommonConversion
MLIRLLVMDialect
MLIRLLVMToLLVMIRTranslation
MLIRMemRefDialect
MLIRMemRefToLLVM
MLIRParser
MLIRPass
MLIRSideEffectInterfaces
MLIRSCFToControlFlow
MLIRFuncToLLVM
MLIRSupport
MLIRMemRefDialect
MLIRTargetLLVMIRExport
MLIRTransforms

DEPENDS
omp_gen
)

clang_target_link_libraries(clangTidyCIRModule
PRIVATE
clangAnalysis
clangAST
clangASTMatchers
clangBasic
clangLex
clangTooling
clangToolingCore
)
Loading
Loading