Skip to content
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

[CIR][NFC] Move LoweringPrepare into CIRGen #1223

Open
wants to merge 2,143 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2143 commits
Select commit Hold shift + click to select a range
4b20937
[CIR][CIRGen][Builtin][Neon] Lower neon vst1q_lane and vst1_lane (#935)
ghehg Oct 4, 2024
be0ed7f
[CIR] Derived-to-base conversions (#937)
dkolsen-pgi Oct 5, 2024
e106e19
[CIR][NFC] Updates against -Wswitch after rebase
bcardosolopes Oct 5, 2024
3eb30af
[CIR][CIRGen] Exceptions: fix agg store for temporaries
bcardosolopes Oct 5, 2024
796de49
[CIR][CIRGen] Lower cir.throw in absence of dtors
bcardosolopes Oct 7, 2024
7479ff4
[CIR][NFC] Update wrong comments from previous commit
bcardosolopes Oct 7, 2024
7969186
[CIR][CIRGen] Exceptions: support free'ing allocated exception resources
bcardosolopes Oct 7, 2024
c95581f
[Lowering][DirectToLLVM] Fix calling variadic functions (#945)
smeenai Oct 8, 2024
bc89f0a
[CIR] [CodeGen] Remove NYI in buildPointerWithAlignment (#949)
ChuanqiXu9 Oct 8, 2024
8035cd8
[CIR][Lowering] Introduce HoistAllocasPass (#887)
ChuanqiXu9 Oct 9, 2024
da4c034
[CIR][CodeGen] Enable -fno-PIE (#940)
bruteforceboy Oct 9, 2024
8e22e66
[CIR][CIRGen] Add support for __fp16 type (#950)
Lancern Oct 9, 2024
f299d00
[CIR][CIRGen][Builtin] Support unsigned type for _sync_(bool/val)_com…
ghehg Oct 9, 2024
8bc797b
[CIR][CIRGen][NFC] Improve buildAutoVarAlloca skeleton and add hooks …
bcardosolopes Oct 9, 2024
c64cbf7
[CIR][CIRGen] Support annotations on local var decl
bcardosolopes Oct 9, 2024
11b0d25
[CIR][LowerToLLVM][NFC] Move annotation lowering around
bcardosolopes Oct 9, 2024
7d61ee3
[CIR][NFC] Fix post-rebase warning
bcardosolopes Oct 9, 2024
a344051
[CIR][LowerToLLVM] Add support for local var annotations
bcardosolopes Oct 10, 2024
8c06e47
Reapply and patch "[CIR][ABI] Apply CC lowering pass by default (#842…
sitio-couto Oct 11, 2024
7b2f5c1
[CIR][CodeGen] kr-style for function arguments (#938)
gitoleg Oct 11, 2024
20ef766
[CIR][CIRGen] Add const attribute to alloca operations (#892)
Lancern Oct 11, 2024
b044dda
[CIR][Lowering] VecCreateOp and VecSplatOp lowering choose LLVM:Poiso…
ghehg Oct 11, 2024
7cbc200
[CIR][NFC][Testing] Fix test failure (#963)
ghehg Oct 11, 2024
3a2fc4b
[CIR][CodeGen] Support static references to temporaries
lanza Sep 19, 2024
b73d367
[CIR][CIRGen] Support CodeGen for vbase constructors
Laity000 May 21, 2024
44bcbea
[CIR][CIRGen][Builtin][Neon] Lower neon_vtrn and neon_vtrnq (#942)
ghehg Oct 11, 2024
69dd4d3
[CIR][CIRGen][Builtin][Neon] Lower neon_vext_v and neon_vextq_v (#951)
ghehg Oct 11, 2024
5d0e62b
[CIR][Lowering] Handling Lowering of multiple dimension array correct…
ChuanqiXu9 Oct 14, 2024
0668d29
[CIR][CIRGen][Builtin][Neon] Lower vld1_dup and vld1q_dup (#936)
ghehg Oct 14, 2024
1160a8d
[CIR][CIRGen][Builtin][Neon] Lower neon_vpadd_v and neon_vpaddq_v int…
ghehg Oct 14, 2024
5f9b3b8
[CIR] [Lowering] Fix handling of multiple array for ZeroAttr (#970)
ChuanqiXu9 Oct 14, 2024
cb888fa
[CIR][Driver] Fix -fclangir-call-conv-lowering behavior
bcardosolopes Oct 14, 2024
7c851c3
[CIR] Add more user facing messages for -fno-clangir-call-conv-lowering
bcardosolopes Oct 15, 2024
55f6776
[CIR] Make the asserts to display suggestion for -fno-clangir-call-co…
bcardosolopes Oct 15, 2024
dd9423f
[CIR][NFC] Massively rename workarounds for callconv lowering
bcardosolopes Oct 15, 2024
761c564
[CIR][CIRGen] Implement CIRGenModule::shouldEmitFunction (#984)
smeenai Oct 16, 2024
efd641c
[CIR][CIRGen] Port 1d0bd8e51be2627f79bede54735c38b917ea04ee (#983)
smeenai Oct 16, 2024
8a12125
[CIR][LowerToLLVM] Lower cir.vtt.address_point
bcardosolopes Oct 16, 2024
26a1cae
[CIR][NFC] Rename function in a test
bcardosolopes Oct 16, 2024
d8fc11b
[CIR][CIRGen] Get more vtable and dtor working
bcardosolopes Oct 16, 2024
1091422
[CIR][CIRGen][NFC] Consolidate RUN lines for builtin tests (#968)
ghehg Oct 16, 2024
11cbb68
[CIR] [Lowering] care trailing zero for lowering constant array (#976)
ChuanqiXu9 Oct 16, 2024
ecb9cc5
[CIR] Add support for __int128 type (#980)
Lancern Oct 16, 2024
bafe969
[CIR][CIRGen][Builtin][Neon] Lower neon_vrshrn_n to llvm intrinsic ca…
ghehg Oct 16, 2024
526f3b7
[CIR][CIRGen][Builtin][Neon] Lower vqdmulhq_lane, vqdmulh_lane, vqrdm…
ghehg Oct 16, 2024
73a42c7
[CIR][CIRGen][Builtin][Type] Support for IEEE Quad (long double) adde…
mvvsmk Oct 16, 2024
4183dde
[CIR][NFC] Fix some consistency issues with missing features
bcardosolopes Oct 16, 2024
784750e
[CIR] Disable `-fclangir-call-conv-lowering` from default in the LLVM…
bcardosolopes Oct 16, 2024
0522f59
[CIR][CIRGen][Builtin] Implement builtin addressof (#987)
ghehg Oct 16, 2024
f6f02d1
[CIR][NFC] Improve documentation about goto's
bcardosolopes Oct 16, 2024
cb384db
[CIR][NFC] Move code around to match OG
bcardosolopes Oct 16, 2024
8c92d88
[CIR][CIRGen][NFC] Add more skeleton for handling inheritance ctors
bcardosolopes Oct 18, 2024
da80c19
[CIR][CIRGen] Ensure default visibility for local linkage functions (…
smeenai Oct 18, 2024
030630b
[CIR][CIRGen][Builtin][Neon] Lower neon_vshl_n_v and neon_vshlq_n_v (…
ghehg Oct 18, 2024
622f498
[CIR][CIRGen] Use Clang Codegen's skeleton in CIRGenFunction::buildBu…
ghehg Oct 18, 2024
85e47c1
[CIR][CIRGen][Builtin][Neon] Lower neon_vqaddq_v, neon_vqsubq and neo…
ghehg Oct 18, 2024
9415d8a
[CIR][CIRGen][Builtin][Neon] Lower neon_vmovl_v (#989)
ghehg Oct 18, 2024
dbddba6
[CIR][CIRGen] Support initial cases of inheritance ctor/dtor
bcardosolopes Oct 18, 2024
c6ae220
[CIR][CIRGen] Null init some inheritance components
bcardosolopes Oct 18, 2024
da31d2c
[CIR][CIRGen][NFC] More skeleton for building constants
bcardosolopes Oct 19, 2024
862ca6c
[CIR][CIRGen] Add missing testcase for null base class
bcardosolopes Oct 19, 2024
e953ba7
[CIR] [CodeGen] Introduce IsFPClassOp to support builtin_isfpclass (#…
ChuanqiXu9 Oct 21, 2024
569d798
[CIR][NFC] Move callconv tests around
bcardosolopes Oct 21, 2024
0922f49
[CIR][Asm] Implement parser for cir.func annotations (#981)
keryell Oct 21, 2024
13fd66d
[CIR][CIRGen][Builtin][Neon] Lower neon_vabd_v and neon_vabdq_v (#996)
ghehg Oct 21, 2024
9b5694b
[CIR][CIRGen][Builtin][Neon] Lower neon_vmull_v (#998)
ghehg Oct 21, 2024
03041b1
[CIR][CIRGen][Builtin][Neon] Lower neon_vrhadd_v and neon_vrhaddq_v (…
ghehg Oct 21, 2024
479202d
[CIR][CIRGen][Builtin][Neon] Lower neon_vmin_v and neon_vminq_v (#1000)
ghehg Oct 21, 2024
c4d9214
[CIR][Transforms] Fix CallConv Function Lowering (#979)
bruteforceboy Oct 26, 2024
56ef01a
[CIR][CIRGen][Lowering] Use same set of annotation-related global var…
ghehg Oct 26, 2024
259bcfe
[CIR][CodeGen][NFC] Cleanup CIRGenFunction::StartFunction to match OG…
lanza Oct 26, 2024
9c86b7f
[ClangIR][Lowering] Handle lowered array index (#1008)
ChuanqiXu9 Oct 26, 2024
a5b40e8
[CIR][CIRGen] Removed extra space in "cir.shift( right)" (#997) (#1009)
MarcoCalabretta Oct 28, 2024
97295ae
[CIR][CIRGen][Builtin][Neon] Lower neon_vshll_n (#1010)
ghehg Oct 28, 2024
231bc8d
[ClangIR][CIRGen] Introduce CaseOp and refactor SwitchOp (#1006)
ChuanqiXu9 Oct 29, 2024
2baf388
[CIR][ABI][AArch64][Lowering] Initial support for return of struct ty…
gitoleg Oct 29, 2024
2cecfae
[CIR][Lowering] Supports varargs in the CallingConvention pass (#1005)
gitoleg Oct 29, 2024
a920a61
[CIR][CodeGen][NFC] Add some missing guards for unreachable
lanza Oct 30, 2024
6f3b350
[CIR][CodeGen] Store the old CIRGenFunction when popping to a new one
lanza Oct 30, 2024
7882ad4
[CIR][CodeGen][NFC] Implement a missing function
lanza Oct 30, 2024
8325970
[CIR][ABI][Lowering] Supports function pointers in the calling conven…
gitoleg Oct 30, 2024
2fe7d89
[CIR][CIRGen][Builtin][Neon] Lower neon_vqmovun_v (#1012)
ghehg Oct 30, 2024
453385a
[CIR][CIRGen] Enable comdat for static variables (#1015)
ghehg Oct 30, 2024
25a5d40
[CIR][CIRGen] Fix "definition with same mangled name" error (#1016)
smeenai Oct 30, 2024
e6941d4
[CIR][CIRGen][Builtin][Neon] Lower neon_vrshr_n and vrshrq_n to llvm …
ghehg Oct 30, 2024
b1baa53
[CIR][Dialect][NFC] Fix double whitespaces in `cir.func` assembly (#1…
seven-mile Oct 30, 2024
2d29490
[CIR][CIRGen] Add support for abs (#1011)
PikachuHyA Oct 30, 2024
a9e0ca9
[CIR][Lowering] Transform cir.store of const arrays into cir.copy
bcardosolopes Oct 29, 2024
12ec494
[CIR][CIRGen] Fix typo in test check
smeenai Oct 30, 2024
d54d414
[CIR][CIRGen] Fix swapped parameters in test
smeenai Oct 31, 2024
f55ceac
[CIR][CIRGen][Builtin][Neon] Lower neon_vtst_v and neon_vtstq_v (#1013)
ghehg Oct 31, 2024
ce830e8
[CIR][CIRGen] Add support for memmove (#1019)
PikachuHyA Oct 31, 2024
055976b
[CIR][ABI][AArch64] support for return struct types greater than 128 …
gitoleg Oct 31, 2024
0921486
[CIR][ABI][Lowering] Supports call by function pointer in the calling…
gitoleg Oct 31, 2024
db98348
[CIR][CIRGen][Builtin] Support BI__builtin_operator_new and BI__built…
ghehg Oct 31, 2024
c777b0f
[CIR][ABI][Lowering] Add CCLower support for int128 on x86_64 (#1036)
Lancern Oct 31, 2024
fcca3e5
[CIR][CIRGen][Builtin][Neon] Lower neon_vqshlu_n and neon_vqshluq_n (…
ghehg Oct 31, 2024
c7370e6
[CIR][CIRGen] Support more member init variations
bcardosolopes Oct 31, 2024
ed9c32c
[Driver] Bring back -emit-cir as a frontend option
lanza Nov 1, 2024
a4d1036
[CIR] Add a cir.undef attr
smeenai Nov 1, 2024
e331781
[CIR][CIRGen] Scalar emission for casts of base to derived
bcardosolopes Nov 1, 2024
ec9a4eb
[CIR][CIRGen] Fix const codegen for empty struct
smeenai Nov 1, 2024
ca5879d
[CIR][CIRGen][Builtin][Neon] Lower neon_vhadd_v and neon_vhaddq_v (#1…
ghehg Nov 2, 2024
3fd09f2
[CIR][CIRGen][Builtin][Neon] Lower neon_vshrn_n_v (#1040)
ghehg Nov 2, 2024
4943da4
[CIR][NFC] Remove leftovers from previous commit
bcardosolopes Nov 2, 2024
9e7b590
[CIR][LowerToLLVM] Fold base address computation if offset is zero
bcardosolopes Nov 2, 2024
7b06c72
[CIR][CIRGen][Builtin][Neon] Lower neon_vshlq_v (#1042)
ghehg Nov 2, 2024
8e74189
Remove disablement of Wdeprecated-declarations
lanza Nov 4, 2024
acc80e5
[CIR][CIRGen] Add support for memset (#1026)
PikachuHyA Nov 4, 2024
c6fb5ba
[CIR][CIRGen][Builtin][Neon] Lower neon_vshr_n_v and neon_vshrq_n_v (…
ghehg Nov 4, 2024
fb35ec0
[ClangIR][CIRGen] Handle nested union in arrays of struct (#1007)
ChuanqiXu9 Nov 4, 2024
76e4405
[CIR][NFC] Fix warnings post rebase and some pre-existing ones
bcardosolopes Nov 4, 2024
d8e3753
[CIR][CIRGen] Support __builtin___memcpy_chk (#1032)
smeenai Nov 4, 2024
2b7f643
[CIR][CIRGen] Support __builtin___memset_chk (#1053)
smeenai Nov 2, 2024
ee9871a
[CIR][CIRGen] Emit required vtables (#1054)
smeenai Nov 5, 2024
7e20d84
[CIR][CodeGen][NFC] Add `getMLIRContext` to CIRGenModule
lanza Nov 5, 2024
470d2a0
[CIR][Dialect][NFC] Add some helpers to LoadOp
lanza Nov 5, 2024
b62e02a
[CIR][ABI][AArch64][Lowering] Initial support for passing struct type…
gitoleg Nov 5, 2024
374b548
[CIR][ABI][AArch64] convers aarch64_be return struct case (#1049)
gitoleg Nov 5, 2024
26e030f
[CIR][CIRGen][Builtin][NFC] Refactor IntrinsicCallOp (#1056)
ghehg Nov 5, 2024
ad29a18
[CIR][CIRGen][Builtin] Support __builtin_char_memchr (#1050)
ghehg Nov 6, 2024
7f04228
[CIR] fix getTypeSizeInBits with fp80 and fp128 (#1058)
PikachuHyA Nov 6, 2024
1339049
[CIR][ABI][Lowering] covers return struct case with coercion through …
gitoleg Nov 6, 2024
7fe15c9
[CIR][CIRGen][Builtin][Neon] Lower neon_vqrdmulh_v and neon_vqrdmulhq…
ghehg Nov 6, 2024
d62d629
[CIR][CIRGen][Builtin][Neon] Lower neon_vpaddl and neon_vpaddlq (#1064)
ghehg Nov 6, 2024
3998d0c
[CIR][Lowering] Add LLVM lowering support for cir.assume (#1066)
Lancern Nov 6, 2024
3fe6687
[CIR][CodeGen] Fix the default linkage of string literals (#1067)
seven-mile Nov 6, 2024
e8cadf7
[CIR][ABI][AArch64][Lowering] support for passing struct types > 128 …
gitoleg Nov 6, 2024
de0c2dc
[CIR][CIRGen] Add aliases for virtual dtors calls
bcardosolopes Nov 4, 2024
fccf9c2
[CIR][NFC] Fix unused warning
bcardosolopes Nov 6, 2024
fa657ba
[CIR][CodeGen] Use the same SSA name as OG's for string literals (#1073)
seven-mile Nov 7, 2024
9fc9c35
[CIR] Make X86ArgClass an `enum class` (#1080)
smeenai Nov 7, 2024
4371510
[CIR][CIRGen] Fix some alias issues under -O1 and above
bcardosolopes Nov 7, 2024
1038560
[CIR][NFC] Add more checks and notes for virtual-destructor-calls.cpp…
bcardosolopes Nov 7, 2024
4a7fd6f
[CIR][NFC] Update test comment
bcardosolopes Nov 8, 2024
3d2c01d
[CIR][NFC] More comments removed for ir differences
bcardosolopes Nov 8, 2024
2834149
Revert "[CIR] fix getTypeSizeInBits with fp80 and fp128" (#1089)
PikachuHyA Nov 8, 2024
dae0c5b
[CIR][CIRGen][Builtin] Support __builtin_return_address (#1046)
ghehg Nov 8, 2024
f7bcc45
[CIR] Extend support for floating point attributes (#572)
orbiri Nov 8, 2024
47c29dd
[CIR][CIRGen][Builtin][Neon] Lower neon_vqmovn_v (#1071)
ghehg Nov 8, 2024
0c97f55
[CIR][CIRGen][Builtin][Neon] Lower neon_vaesmcq_u8 (#1072)
ghehg Nov 8, 2024
e909adc
[CIR][CIRGen] Move CIRGen types into clang::CIRGen (#1082)
smeenai Nov 8, 2024
1a6bdd3
[CIR][ABI][AArch64][Lowering] Support unions (#1075)
bruteforceboy Nov 8, 2024
3707a72
[CIR] Merge the mlir::cir namespace into cir (#1084)
smeenai Nov 8, 2024
83db253
[CIR] Merge two copies of CIRGenAction.h (#1085)
smeenai Nov 8, 2024
4eb06c7
[CIR][NFC] Expand doc on `cir.scope` terminators (#1078)
HerrCai0907 Nov 8, 2024
0ac7b11
[CIR][CIRGen][Builtin][Neon] Lower neon_vqdmulhq_v, neon_vqdmulh_v (#…
ghehg Nov 8, 2024
4718df5
[CIR][CIRGen] Change buildX functions to emitX (#1093)
smeenai Nov 9, 2024
ebed4b7
[CIR][NFC] Move LoweringPrepare into CIRGen (#1092)
lanza Nov 9, 2024
c25e447
[CIR][CodeGen][LowerToLLVM] String literals for OpenCL (#1091)
seven-mile Nov 9, 2024
6bf94fe
Revert "[CIR][NFC] Move LoweringPrepare into CIRGen (#1092)"
bcardosolopes Nov 9, 2024
0b63ccd
[CIR][CIRGen] support builtin signbit (#1033)
PikachuHyA Nov 11, 2024
f2ccc39
[CIR][CIRGen][Builtin] Support __builtin_memcpy_inline (#1069)
ghehg Nov 11, 2024
d4e2be6
[CIR][CIRGen][Builtin] Support __sync_add_and_fetch (#1077)
ghehg Nov 11, 2024
b4a40d0
[CIR][CodeGen][NFC] Simplify replacing initializer of static decls (#…
seven-mile Nov 11, 2024
ff8c15c
[CIR][Dialect][NFC] Fix double white spaces in `cir.global` assembly …
seven-mile Nov 11, 2024
17aef13
[CIR] Properly ensure terminating IfOp and ScopeOp regions (#1097)
orbiri Nov 11, 2024
4524501
[CIR][CIRGen][Builtin][Neon] Lower neon_vhsub_v, neon_vhsubq_v (#1103)
ghehg Nov 11, 2024
b409ca9
[CIR][NFC] Fix formatting (#1105)
smeenai Nov 12, 2024
87dc8c3
[CIR][NFC] Conform if/else lowering order to match clang's output (#1…
orbiri Nov 12, 2024
cc2c767
[CIR] [Lowering] [X86_64] Support VAArg in shape (#1100)
ChuanqiXu9 Nov 13, 2024
776a709
[CIR][CIRGen][Builtin][Neon] Lower neon_vqdmlal, neon_vqdmlsl (#1104)
ghehg Nov 13, 2024
30f1701
[CIR][ABI][AArch64] Support struct passing with coercion through memo…
gitoleg Nov 13, 2024
3f41317
[CIR][CIRGen][Builtin][Neon] Lower neon_vaeseq_u8 (#1112)
ghehg Nov 13, 2024
61440d5
[CIR][CIRGen][Builtin] Support __builtin_wmemchr (#1115)
ghehg Nov 13, 2024
47a5936
[CIR][CIRGen] Support __builtin_signbitl (#1117)
PikachuHyA Nov 13, 2024
00c96c4
[CIR][Dialect][NFC] Refactor hardcoded attribute name strings (#1122)
seven-mile Nov 13, 2024
f54457b
[CIR][ABI][Lowering] Fixes calls with union type (#1119)
gitoleg Nov 14, 2024
462f155
[CIR][Builtin][NFC] More informative llvm_unreachable message in CIRG…
ghehg Nov 14, 2024
9ec869b
[CIR][CIRGen][Builtin][Neon] Lower vcvt_f32_v, vcvtq_f32_v (#1120)
ghehg Nov 14, 2024
ec2e575
[CIR][LowerToLLVM] Lowering triple from `cir.triple` attribute (#1125)
seven-mile Nov 14, 2024
278aad0
[CIR][ABI][AArch64][Lowering] Support calls for struct types > 128 bi…
bruteforceboy Nov 14, 2024
53d3562
[CIR][CIRGen][Builtin] Support __builtin_elementwise_abs and extend A…
ghehg Nov 14, 2024
887b109
[ClangIR][Lowering][NFC] Split LowerToLLVM.h from LowerToLLVM.cpp (#1…
ChuanqiXu9 Nov 15, 2024
95a65b6
[CIR][CIRGen][Builtin][Neon] Lower neon_splat_lane, neon_splat_laneq…
ghehg Nov 15, 2024
f74e7ba
[CIR][CIRGen][Builtin] Support __builtin___memmove_chk (#1106)
ghehg Nov 15, 2024
72dc06c
[CIR][CIRGen] Support for visual bases in getAddressOfBaseClass
bcardosolopes Nov 8, 2024
663f0d2
[CIR][NFC] Fix unused variable warning
bcardosolopes Nov 15, 2024
fbeba10
[CIR][CIRGen] Bring getAddressOfBaseClass a bit closer to OG
bcardosolopes Nov 15, 2024
78c5af8
[CIR][CIRGen][NFC] More unification of virtual and non-virtual offset…
bcardosolopes Nov 15, 2024
87b366b
[CIR][CIRGen][NFC] More skeleton conformance
bcardosolopes Nov 15, 2024
94dd02f
[CIR][CIRGen] Teach all uses of ApplyNonVirtualAndVirtualOffset to us…
bcardosolopes Nov 15, 2024
5f0c55d
[CIR] Force cir.cmp to always return bool (#1110)
orbiri Nov 18, 2024
7170758
[CIR][CIRGen] Support __builtin_memset_inline (#1114)
PikachuHyA Nov 19, 2024
0a5ea8e
[CIR][CIRGen][TBAA] Initial TBAA support (#1116)
PikachuHyA Nov 19, 2024
4b5fd68
[CIR][ABI][AArch64][Lowering] Support structures with padding (#1118)
bruteforceboy Nov 19, 2024
3739dd8
[CIR] fix deref nullptr when verify symbol for `cir.get_global` (#1143)
HerrCai0907 Nov 20, 2024
8c95ff5
[CIR][NFC] Refactor code for populating LLVM conversion patterns (#1152)
Lancern Nov 22, 2024
dfff479
[CIR][Dialect] Extend UnaryFPToFPBuiltinOp to vector of FP type (#1132)
ghehg Nov 23, 2024
40661fb
[CIR][Builtin][Neon][NFC] Introduce skeleton of emitCommonNeonSISDBui…
ghehg Nov 23, 2024
b0fdf3d
[CIR][CIRGen][Builtin][Neon] Lower neon_vqshrn_n_v (#1144)
ghehg Nov 23, 2024
a04cf10
[CIR][FlattenCFG] Let results of CIR ScopeOp forwarded during Flatten…
ghehg Nov 23, 2024
a223ec2
[CIR][Transforms][NFC] Fix undesirable include of clang's private hea…
seven-mile Nov 23, 2024
9b73052
[CIR][NFC] move data member pointer lowering to CXXABI (#1130)
Lancern Nov 25, 2024
0ace889
[CIR][AArch64][Lowering] Support fields with structs containing const…
bruteforceboy Nov 25, 2024
c1f1871
[CIR][CIRGen][Builtin] Support __builtin_frame_address (#1137)
ghehg Nov 25, 2024
9ded4f6
[CIR][ABI][AArch64][Lowering] support for calling struct types in ran…
bruteforceboy Nov 25, 2024
1863ab5
[CIR][CIRGen][Builtin] Support builtin __sync_sub_and_fetch (#1146)
ghehg Nov 25, 2024
03bb2e0
[CIR][CIRGen][Builtin][Neon] Lower neon_vpadal_v, neon_vpadalq_v (#1148)
ghehg Nov 25, 2024
2a95651
[CIR] [Lowering] [X86_64] Support VAArg for LongDouble (#1150)
ChuanqiXu9 Nov 25, 2024
96dd61c
[CIR][CIRGen][Builtin][Neon] Lower neon_vrshl_v and neon_vrshlq_v (#1…
ghehg Nov 25, 2024
38e93ed
[CIR][CIRGen] Fix a stack-use-after-free (#1155)
smeenai Nov 25, 2024
3fbb13e
[CIR][Dialect][NFC] Remove redundant module attribute `llvm.data_layo…
seven-mile Nov 25, 2024
550ccbd
[CIR][CIRGen][Builtin][Neon] Lower neon_vqrshrn_n_v (#1161)
ghehg Nov 25, 2024
f00568c
[CIR][TargetLowering] Fix use iteration (#1162)
smeenai Nov 25, 2024
9db508a
[CIR][FlattenCFG] Fix rewrite API misuse (#1163)
smeenai Nov 25, 2024
41078e9
[CIR][CIRGen][Builtin][Neon] Lower neon_vabs_v and neon_vabsq_v (#1081)
ghehg Nov 25, 2024
a18db3c
[CIR][CIRGen][Builtin] Support __builtin_launder except in the case o…
ghehg Nov 26, 2024
2cec820
[CIR][CIRGen] Support copy constructors with non-record arrays (#1165)
smeenai Nov 26, 2024
7532e05
[CIR][Dialect] Introduce StdInitializerListOp to represent high-level…
HerrCai0907 Nov 26, 2024
e8cdbc1
[CIR][CIRGen][Builtin][Neon] Lower __builtin_neon_vshl_v (#1134)
ghehg Nov 26, 2024
2968396
[CIR] Correct signedness for createSignedInt (#1167)
ChuanqiXu9 Nov 26, 2024
2b03d94
[CIR] Relax the requirement for ternary operation (#1168)
ChuanqiXu9 Nov 26, 2024
676b861
[CIR][ABI][AArch64][Lowering] Fix the callsite for nested unions (#1169)
bruteforceboy Nov 26, 2024
70a2723
[CIR][NFC][Test] Add llvm ir test for lambdas (#1170)
ghehg Nov 27, 2024
ffa0c9e
[CIR][CIRGen] Add more tracking skeleton for missing cleanups
bcardosolopes Nov 26, 2024
7c8ffe9
[CIR][NFC] Cleanup warnings post rebase
bcardosolopes Nov 27, 2024
1b052da
[CIR][Lowering][debuginfo] Disable debug info if `-g` is not specifie…
PikachuHyA Nov 27, 2024
c04a964
[CIR] Remove InavalidUnionFieldAttr and remove a check in array attr …
ChuanqiXu9 Nov 27, 2024
fb77b51
[CIR][Dialect] Extend BinaryFPToFPBuiltinOp to vector of FP type (#1173)
ghehg Nov 27, 2024
cb4c940
[CIR][CIRGen][Builtin] Support __builtin_elementwise_abs with vector …
ghehg Nov 27, 2024
8dc68cd
[CIR][CIRGen][Builtin][Neon] Lower SISD neon_vqrdmulhs_s32 (#1175)
ghehg Nov 27, 2024
888f00c
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddlvq_u16 (#1176)
ghehg Nov 27, 2024
aa7b5c6
[CIR][CIRGen] Change SignBitOp result type to !cir.bool (#1187)
PikachuHyA Dec 2, 2024
7cbfe8e
[CIR] Add code generation options to lowering context (#1171)
Lancern Dec 2, 2024
67bbd1e
[CIR] [CodeGen] Handle arrangeCXXStructorDeclaration (#1179)
ChuanqiXu9 Dec 2, 2024
eacaabb
[CIR] Add support for casting pointer-to-data-member values (#1188)
Lancern Dec 2, 2024
9a951af
[CIR][CodeGen][LowerToLLVM] Fix llvm lowering of CIR `UnaryOpKind_Not…
ghehg Dec 3, 2024
baad05f
[CIR][CIRGen] Support emitting memcpys for fields (#1195)
smeenai Dec 3, 2024
540b171
[CIR][CIRGen] Call trivial assignment operators in more cases (#1196)
smeenai Dec 3, 2024
165afb8
[CIR][CIRGen] Emit memcpys for copy constructors (#1197)
smeenai Dec 3, 2024
7fb608d
[CIR][CIRGen] Remove -clangir-disable-emit-cxx-default (#1198)
smeenai Dec 3, 2024
c566b19
[CIR] Make use of !invariant.group metadata for const allocas (#1159)
Lancern Dec 6, 2024
65c857e
[CIR][CIRGen] Add CIRGen support for assume statement (#1205)
Lancern Dec 6, 2024
317985e
[CIR][CIRGen][Builtin][Neon] Lower neon_vbsl_v and neon_vbslq_v (#1206)
ghehg Dec 6, 2024
4a23ed0
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddlvq_u32 (#1208)
ghehg Dec 6, 2024
4ae9a04
[CIR][CIRGen] Flesh out CIRGenModule::Release skeleton (#1209)
smeenai Dec 6, 2024
8d507b1
[CIR][CIRGen][Builtin][Neon] Lower neon_vaddv_s16 and neon_vaddv_u16 …
ghehg Dec 6, 2024
3189c0d
[CIR] revert `StdInitializerListOp` (#1216)
HerrCai0907 Dec 7, 2024
cfe7c63
[CIR][NFC] Cleanup: MLIRContext vs ASTContext (#1217)
dkolsen-pgi Dec 9, 2024
21e8647
[CIR][CIRGen][Builtin][Neon] Lower neon_vqadds_s32 (#1200)
ghehg Dec 9, 2024
8df3e50
[𝘀𝗽𝗿] initial version
lanza Dec 11, 2024
483b793
[CIR][CodeGen][NFC] Sync emitDeclInit to CodeGen
lanza Dec 11, 2024
57baf31
cleanup
lanza Dec 11, 2024
8c82ee2
[CIR] Honor -clangir-disable-verifier while printing
bcardosolopes Dec 11, 2024
9a63c50
[CIR][CIRGen][NFCI] Take a step into getting scope information to mat…
bcardosolopes Nov 27, 2024
f1a29c6
Revert "[CIR][CIRGen][NFCI] Take a step into getting scope informatio…
bcardosolopes Dec 12, 2024
8794dc7
switch to builder
lanza Dec 12, 2024
5168b82
[CIR][CodeGen][NFC] Refactor emitCXXGlobalVarDeclInit to match codegen
lanza Dec 12, 2024
3120ea3
rebase
lanza Dec 12, 2024
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 @@ -137,6 +149,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 @@ -242,6 +260,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