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 data member pointer lowering to CXXABI #1130

Open
wants to merge 2,086 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2086 commits
Select commit Hold shift + click to select a range
f0c9ec7
[CIR] Exceptions: check LLVM output for more complex dtor order
bcardosolopes Sep 18, 2024
c6325bf
[CIR][ABI] Fix use after free from erasing while iterating (#854)
smeenai Sep 18, 2024
8e7d093
Recommit [CIR][Pipeline] Support -fclangir-analysis-only (#832)
ChuanqiXu9 Sep 18, 2024
d8a4905
[CIR][Lowering] Fix lowering for multi dimensional array (#851)
bruteforceboy Sep 18, 2024
74eb038
[CIR][CodeGen] Support global temporaries
lanza Sep 18, 2024
fa7cab8
[CIR][CodeGen][NFC] Move GetUndefRValue to the right file
lanza Sep 18, 2024
85422c5
[CIR][CIRGen] Exceptions: lexical scope issue with global initializers
bcardosolopes Sep 18, 2024
eed49f6
[CIR][CIRGen][Builtin][Neon] Lower __builtin_neon_vrndns_f32 (#858)
ghehg Sep 19, 2024
7137b9c
[CIR][CodeGen][NFC] Add TBAAAccessInfo stubbed out and many usages of…
lanza Sep 19, 2024
44852a2
[CIR][CodeGen] Stub out an empty CIRGenDebugInfo type
lanza Sep 19, 2024
30fbe24
[CIR][CIRGen] Implement Nullpointer arithmatic extension (#861)
ChuanqiXu9 Sep 19, 2024
e416e10
[CIR][Codegen] supports aarch64_be (#864)
gitoleg Sep 19, 2024
e9282c5
[CIR] Split cir-simplify into two passes (#868)
Lancern Sep 19, 2024
c4287aa
[CIR][CodeGen] Implement union cast (#867)
bruteforceboy Sep 19, 2024
69c43b5
[CIR][CIRGen] Exceptions: unlock nested try/catch support
bcardosolopes Sep 20, 2024
cb53381
[CIR][CodeGen] Fix array initialization in CIRGenExprAgg (#852)
bruteforceboy Sep 20, 2024
174a82a
[CIR][CIRGen] Correct isSized predicate for vector type (#869)
ghehg Sep 20, 2024
e5795cf
[CIR][CIRGen][Builtin][Neon] Lower builtin_neon_vrnda_v and builtin_n…
ghehg Sep 20, 2024
5b41047
[CIR][CIRGen] Handle VisitCXXRewrittenBinaryOperator for scalars
bcardosolopes Sep 20, 2024
e140ca1
[CIR][CIRGen][NFC] Cleanups: add skeleton for DominatingValue<RValue>…
bcardosolopes Sep 20, 2024
ae236b5
[CIR][Infra] Run check-clang-cir against any branch based PR (#873)
lanza Sep 20, 2024
a021d11
[CIR][CIRGen][NFC] Cleanups: add more skeleton to pushFullExprCleanup
bcardosolopes Sep 21, 2024
f370265
[CIR][CodeGen][BugFix] don't place alloca before the label (#875)
gitoleg Sep 23, 2024
ed18860
[CIR][CIRGen] Allow constant evaluation of int annotation (#874)
keryell Sep 23, 2024
24e3311
[CIR][CIRGen] Cleanups: handle conditional cleanups
bcardosolopes Sep 21, 2024
2664ee2
[CIR][CIRGen][NFC] Cleanups: Prepare for conditional cleanup
bcardosolopes Sep 23, 2024
ab59ec0
[CIR][CIRGen][NFC] Cleanups: more boilerplate work for conditional on…
bcardosolopes Sep 23, 2024
27cbc49
[CIR][CodeGen] Handling multiple stmt followed after a switch case (#…
ChuanqiXu9 Sep 24, 2024
e6f7025
[CIR][CIRGen] Generate CIR for empty compound literal (#880)
ghehg Sep 24, 2024
23ce0cf
[CIR][CIRGen] Generate CIR for vset_lane and vsetq_lane intrinsics (#…
ghehg Sep 24, 2024
7a4cf9e
[CIR][CI] Remove libcxx tests
lanza Sep 25, 2024
510c147
[CIR][Dialect][CodeGen] Add a unit attribute for OpenCL kernels (#877)
seven-mile Sep 25, 2024
4e6a07c
[CIR][CodeGen] Handle the case of 'case' after label statement after …
ChuanqiXu9 Sep 25, 2024
aaca26b
[CIR][CIRGen] Generate CIR for neon_vget and neon_vdup lane intrinsic…
ghehg Sep 25, 2024
842963c
[CIR][CIRGen] Allow maybeSetTrivialComdat for GlobalOp (#885)
ghehg Sep 25, 2024
49067d3
[CIR][CIRGen][Builtin][Neon] Lower neon vqadd_v (#890)
ghehg Sep 27, 2024
d683dd8
[CIR][CIRGen][NFC] Split cir.scope creation on buildReturnStmt
bcardosolopes Sep 24, 2024
9bce165
[CIR][NFC] Add helpers for cir.try and do some refactoring
bcardosolopes Sep 24, 2024
0d17581
[CIR][CIRGen][Builtin] Allow CIRGen for builtin calls with math error…
ghehg Sep 27, 2024
ee84edb
[CIR][CIRGen] Support __builtin_huge_val for float type (#889)
ghehg Sep 27, 2024
80bd527
[CIR][NFC] Rename test
bcardosolopes Sep 27, 2024
5a77095
[CIR][ABI] Apply CC lowering pass by default (#842)
sitio-couto Sep 28, 2024
d3f26d8
[CIR][CIRGen][Builtin][Neon] Lower vqrshrun_n and add getAArch64SIMDI…
ghehg Sep 30, 2024
85ba26f
[CIR][NFC] Silence unused warning
bcardosolopes Sep 28, 2024
ef686b2
Revert "[CIR][ABI] Apply CC lowering pass by default (#842)"
bcardosolopes Sep 30, 2024
f3ba587
[CIR][CIRGen] Add time trace to several CIRGen pieces (#898)
ChuanqiXu9 Sep 30, 2024
5358f02
[CIR][Dialect] Support OpenCL work group uniformity attribute (#896)
seven-mile Sep 30, 2024
ff6b5b7
[CIR][CodeGen][NFC] Rename the confusing `buildGlobal` overload (#897)
seven-mile Sep 30, 2024
f09c88d
[CIR][CIRGen][Builtin][Neon] Lower neon vld1_lane and vld1q_lane (#901)
ghehg Sep 30, 2024
3754a55
[CIR][CodeGen][NFC] Break the missing feature flag for OpenCL into sm…
seven-mile Oct 1, 2024
6f5d387
[CIR][CodeGen] Add `nothrow` for functions in OpenCL languages (#903)
seven-mile Oct 1, 2024
c194a47
[CIR][CodeGen] Set constant properly for global variables (#904)
seven-mile Oct 1, 2024
2a6b30e
[CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910)
ghehg Oct 2, 2024
dd514ef
[CIR][Lowering] Fix Global Attr Lowering (#906)
bruteforceboy Oct 2, 2024
68ad989
[CIR][CIRGen][Builtin] Implement builtin __sync_fetch_and_sub (#932)
ghehg Oct 2, 2024
b9c251b
[CIR][CIRGen] Cleanup: enable conditional cleanup with exceptions
bcardosolopes Sep 24, 2024
c45f01c
[CIR][CIRGen][Builtin][Neon] Lower BI__builtin_neon_vmovn_v (#909)
ghehg Oct 4, 2024
33b4226
[CIR][CIRGen][Builtin][Neon] Lower neon vst1q_lane and vst1_lane (#935)
ghehg Oct 4, 2024
d89f4ba
[CIR] Derived-to-base conversions (#937)
dkolsen-pgi Oct 5, 2024
06554a4
[CIR][NFC] Updates against -Wswitch after rebase
bcardosolopes Oct 5, 2024
413d4e1
[CIR][CIRGen] Exceptions: fix agg store for temporaries
bcardosolopes Oct 5, 2024
2fc0967
[CIR][CIRGen] Lower cir.throw in absence of dtors
bcardosolopes Oct 7, 2024
d797fc5
[CIR][NFC] Update wrong comments from previous commit
bcardosolopes Oct 7, 2024
5457e49
[CIR][CIRGen] Exceptions: support free'ing allocated exception resources
bcardosolopes Oct 7, 2024
8595b15
[Lowering][DirectToLLVM] Fix calling variadic functions (#945)
smeenai Oct 8, 2024
861a0ee
[CIR] [CodeGen] Remove NYI in buildPointerWithAlignment (#949)
ChuanqiXu9 Oct 8, 2024
a72c4a0
[CIR][Lowering] Introduce HoistAllocasPass (#887)
ChuanqiXu9 Oct 9, 2024
fd13e77
[CIR][CodeGen] Enable -fno-PIE (#940)
bruteforceboy Oct 9, 2024
49fc4ee
[CIR][CIRGen] Add support for __fp16 type (#950)
Lancern Oct 9, 2024
e3cb89e
[CIR][CIRGen][Builtin] Support unsigned type for _sync_(bool/val)_com…
ghehg Oct 9, 2024
6c35fbb
[CIR][CIRGen][NFC] Improve buildAutoVarAlloca skeleton and add hooks …
bcardosolopes Oct 9, 2024
3d849ab
[CIR][CIRGen] Support annotations on local var decl
bcardosolopes Oct 9, 2024
8e890c9
[CIR][LowerToLLVM][NFC] Move annotation lowering around
bcardosolopes Oct 9, 2024
48ea4eb
[CIR][NFC] Fix post-rebase warning
bcardosolopes Oct 9, 2024
71ce3a0
[CIR][LowerToLLVM] Add support for local var annotations
bcardosolopes Oct 10, 2024
b0851e9
Reapply and patch "[CIR][ABI] Apply CC lowering pass by default (#842…
sitio-couto Oct 11, 2024
96912b3
[CIR][CodeGen] kr-style for function arguments (#938)
gitoleg Oct 11, 2024
3523638
[CIR][CIRGen] Add const attribute to alloca operations (#892)
Lancern Oct 11, 2024
d7d449b
[CIR][Lowering] VecCreateOp and VecSplatOp lowering choose LLVM:Poiso…
ghehg Oct 11, 2024
2e38800
[CIR][NFC][Testing] Fix test failure (#963)
ghehg Oct 11, 2024
26a6eac
[CIR][CodeGen] Support static references to temporaries
lanza Sep 19, 2024
4766335
[CIR][CIRGen] Support CodeGen for vbase constructors
Laity000 May 21, 2024
2d12627
[CIR][CIRGen][Builtin][Neon] Lower neon_vtrn and neon_vtrnq (#942)
ghehg Oct 11, 2024
1fdaa56
[CIR][CIRGen][Builtin][Neon] Lower neon_vext_v and neon_vextq_v (#951)
ghehg Oct 11, 2024
c834e88
[CIR][Lowering] Handling Lowering of multiple dimension array correct…
ChuanqiXu9 Oct 14, 2024
17e9b10
[CIR][CIRGen][Builtin][Neon] Lower vld1_dup and vld1q_dup (#936)
ghehg Oct 14, 2024
7412547
[CIR][CIRGen][Builtin][Neon] Lower neon_vpadd_v and neon_vpaddq_v int…
ghehg Oct 14, 2024
fed67da
[CIR] [Lowering] Fix handling of multiple array for ZeroAttr (#970)
ChuanqiXu9 Oct 14, 2024
1162102
[CIR][Driver] Fix -fclangir-call-conv-lowering behavior
bcardosolopes Oct 14, 2024
43e21e0
[CIR] Add more user facing messages for -fno-clangir-call-conv-lowering
bcardosolopes Oct 15, 2024
7806409
[CIR] Make the asserts to display suggestion for -fno-clangir-call-co…
bcardosolopes Oct 15, 2024
80a2c83
[CIR][NFC] Massively rename workarounds for callconv lowering
bcardosolopes Oct 15, 2024
fabfae9
[CIR][CIRGen] Implement CIRGenModule::shouldEmitFunction (#984)
smeenai Oct 16, 2024
f3b2a57
[CIR][CIRGen] Port 1d0bd8e51be2627f79bede54735c38b917ea04ee (#983)
smeenai Oct 16, 2024
2703cc4
[CIR][LowerToLLVM] Lower cir.vtt.address_point
bcardosolopes Oct 16, 2024
a2fb31f
[CIR][NFC] Rename function in a test
bcardosolopes Oct 16, 2024
d29f2f7
[CIR][CIRGen] Get more vtable and dtor working
bcardosolopes Oct 16, 2024
49aba1b
[CIR][CIRGen][NFC] Consolidate RUN lines for builtin tests (#968)
ghehg Oct 16, 2024
93c4af7
[CIR] [Lowering] care trailing zero for lowering constant array (#976)
ChuanqiXu9 Oct 16, 2024
c33a9df
[CIR] Add support for __int128 type (#980)
Lancern Oct 16, 2024
57591cc
[CIR][CIRGen][Builtin][Neon] Lower neon_vrshrn_n to llvm intrinsic ca…
ghehg Oct 16, 2024
9f38e23
[CIR][CIRGen][Builtin][Neon] Lower vqdmulhq_lane, vqdmulh_lane, vqrdm…
ghehg Oct 16, 2024
f5ed512
[CIR][CIRGen][Builtin][Type] Support for IEEE Quad (long double) adde…
mvvsmk Oct 16, 2024
a390662
[CIR][NFC] Fix some consistency issues with missing features
bcardosolopes Oct 16, 2024
7da2873
[CIR] Disable `-fclangir-call-conv-lowering` from default in the LLVM…
bcardosolopes Oct 16, 2024
255f0ab
[CIR][CIRGen][Builtin] Implement builtin addressof (#987)
ghehg Oct 16, 2024
e6e835a
[CIR][NFC] Improve documentation about goto's
bcardosolopes Oct 16, 2024
5a7df72
[CIR][NFC] Move code around to match OG
bcardosolopes Oct 16, 2024
daf730d
[CIR][CIRGen][NFC] Add more skeleton for handling inheritance ctors
bcardosolopes Oct 18, 2024
5bee6b3
[CIR][CIRGen] Ensure default visibility for local linkage functions (…
smeenai Oct 18, 2024
52fc064
[CIR][CIRGen][Builtin][Neon] Lower neon_vshl_n_v and neon_vshlq_n_v (…
ghehg Oct 18, 2024
a4367bf
[CIR][CIRGen] Use Clang Codegen's skeleton in CIRGenFunction::buildBu…
ghehg Oct 18, 2024
5c18bcb
[CIR][CIRGen][Builtin][Neon] Lower neon_vqaddq_v, neon_vqsubq and neo…
ghehg Oct 18, 2024
a1aff8a
[CIR][CIRGen][Builtin][Neon] Lower neon_vmovl_v (#989)
ghehg Oct 18, 2024
0b9b0a4
[CIR][CIRGen] Support initial cases of inheritance ctor/dtor
bcardosolopes Oct 18, 2024
470a163
[CIR][CIRGen] Null init some inheritance components
bcardosolopes Oct 18, 2024
c481b17
[CIR][CIRGen][NFC] More skeleton for building constants
bcardosolopes Oct 19, 2024
b739bc2
[CIR][CIRGen] Add missing testcase for null base class
bcardosolopes Oct 19, 2024
1810bc0
[CIR] [CodeGen] Introduce IsFPClassOp to support builtin_isfpclass (#…
ChuanqiXu9 Oct 21, 2024
4b4a9b1
[CIR][NFC] Move callconv tests around
bcardosolopes Oct 21, 2024
3405a67
[CIR][Asm] Implement parser for cir.func annotations (#981)
keryell Oct 21, 2024
824eda3
[CIR][CIRGen][Builtin][Neon] Lower neon_vabd_v and neon_vabdq_v (#996)
ghehg Oct 21, 2024
12d00bd
[CIR][CIRGen][Builtin][Neon] Lower neon_vmull_v (#998)
ghehg Oct 21, 2024
8676652
[CIR][CIRGen][Builtin][Neon] Lower neon_vrhadd_v and neon_vrhaddq_v (…
ghehg Oct 21, 2024
5362a4f
[CIR][CIRGen][Builtin][Neon] Lower neon_vmin_v and neon_vminq_v (#1000)
ghehg Oct 21, 2024
e92884b
[CIR][Transforms] Fix CallConv Function Lowering (#979)
bruteforceboy Oct 26, 2024
274dd71
[CIR][CIRGen][Lowering] Use same set of annotation-related global var…
ghehg Oct 26, 2024
ac0a2b7
[CIR][CodeGen][NFC] Cleanup CIRGenFunction::StartFunction to match OG…
lanza Oct 26, 2024
bb50940
[ClangIR][Lowering] Handle lowered array index (#1008)
ChuanqiXu9 Oct 26, 2024
f05175f
[CIR][CIRGen] Removed extra space in "cir.shift( right)" (#997) (#1009)
MarcoCalabretta Oct 28, 2024
c8fa3f6
[CIR][CIRGen][Builtin][Neon] Lower neon_vshll_n (#1010)
ghehg Oct 28, 2024
45f49ba
[ClangIR][CIRGen] Introduce CaseOp and refactor SwitchOp (#1006)
ChuanqiXu9 Oct 29, 2024
c6a17f8
[CIR][ABI][AArch64][Lowering] Initial support for return of struct ty…
gitoleg Oct 29, 2024
7af5e8a
[CIR][Lowering] Supports varargs in the CallingConvention pass (#1005)
gitoleg Oct 29, 2024
f90e3b9
[CIR][CodeGen][NFC] Add some missing guards for unreachable
lanza Oct 30, 2024
9b7427f
[CIR][CodeGen] Store the old CIRGenFunction when popping to a new one
lanza Oct 30, 2024
88152b8
[CIR][CodeGen][NFC] Implement a missing function
lanza Oct 30, 2024
b47fd6e
[CIR][ABI][Lowering] Supports function pointers in the calling conven…
gitoleg Oct 30, 2024
084419a
[CIR][CIRGen][Builtin][Neon] Lower neon_vqmovun_v (#1012)
ghehg Oct 30, 2024
ed48e54
[CIR][CIRGen] Enable comdat for static variables (#1015)
ghehg Oct 30, 2024
b25af59
[CIR][CIRGen] Fix "definition with same mangled name" error (#1016)
smeenai Oct 30, 2024
de2cce1
[CIR][CIRGen][Builtin][Neon] Lower neon_vrshr_n and vrshrq_n to llvm …
ghehg Oct 30, 2024
ac501a2
[CIR][Dialect][NFC] Fix double whitespaces in `cir.func` assembly (#1…
seven-mile Oct 30, 2024
a62daa0
[CIR][CIRGen] Add support for abs (#1011)
PikachuHyA Oct 30, 2024
89aa90c
[CIR][Lowering] Transform cir.store of const arrays into cir.copy
bcardosolopes Oct 29, 2024
b07cb33
[CIR][CIRGen] Fix typo in test check
smeenai Oct 30, 2024
bb2a2fc
[CIR][CIRGen] Fix swapped parameters in test
smeenai Oct 31, 2024
edf1eda
[CIR][CIRGen][Builtin][Neon] Lower neon_vtst_v and neon_vtstq_v (#1013)
ghehg Oct 31, 2024
917c431
[CIR][CIRGen] Add support for memmove (#1019)
PikachuHyA Oct 31, 2024
f024214
[CIR][ABI][AArch64] support for return struct types greater than 128 …
gitoleg Oct 31, 2024
849c2af
[CIR][ABI][Lowering] Supports call by function pointer in the calling…
gitoleg Oct 31, 2024
fa7a1b8
[CIR][CIRGen][Builtin] Support BI__builtin_operator_new and BI__built…
ghehg Oct 31, 2024
31d37e1
[CIR][ABI][Lowering] Add CCLower support for int128 on x86_64 (#1036)
Lancern Oct 31, 2024
1a28ad4
[CIR][CIRGen][Builtin][Neon] Lower neon_vqshlu_n and neon_vqshluq_n (…
ghehg Oct 31, 2024
a7c9deb
[CIR][CIRGen] Support more member init variations
bcardosolopes Oct 31, 2024
734507c
[Driver] Bring back -emit-cir as a frontend option
lanza Nov 1, 2024
4c8914f
[CIR] Add a cir.undef attr
smeenai Nov 1, 2024
8e4370c
[CIR][CIRGen] Scalar emission for casts of base to derived
bcardosolopes Nov 1, 2024
417d6d3
[CIR][CIRGen] Fix const codegen for empty struct
smeenai Nov 1, 2024
b470cf7
[CIR][CIRGen][Builtin][Neon] Lower neon_vhadd_v and neon_vhaddq_v (#1…
ghehg Nov 2, 2024
850bd83
[CIR][CIRGen][Builtin][Neon] Lower neon_vshrn_n_v (#1040)
ghehg Nov 2, 2024
85567c8
[CIR][NFC] Remove leftovers from previous commit
bcardosolopes Nov 2, 2024
74f2c37
[CIR][LowerToLLVM] Fold base address computation if offset is zero
bcardosolopes Nov 2, 2024
48a16fc
[CIR][CIRGen][Builtin][Neon] Lower neon_vshlq_v (#1042)
ghehg Nov 2, 2024
c8faebe
Remove disablement of Wdeprecated-declarations
lanza Nov 4, 2024
0ad8020
[CIR][CIRGen] Add support for memset (#1026)
PikachuHyA Nov 4, 2024
f7df2dd
[CIR][CIRGen][Builtin][Neon] Lower neon_vshr_n_v and neon_vshrq_n_v (…
ghehg Nov 4, 2024
781a0c0
[ClangIR][CIRGen] Handle nested union in arrays of struct (#1007)
ChuanqiXu9 Nov 4, 2024
e19d2ad
[CIR][NFC] Fix warnings post rebase and some pre-existing ones
bcardosolopes Nov 4, 2024
9dcb512
[CIR][CIRGen] Support __builtin___memcpy_chk (#1032)
smeenai Nov 4, 2024
60c8d68
[CIR][CIRGen] Support __builtin___memset_chk (#1053)
smeenai Nov 2, 2024
ddc3e89
[CIR][CIRGen] Emit required vtables (#1054)
smeenai Nov 5, 2024
78af26c
[CIR][CodeGen][NFC] Add `getMLIRContext` to CIRGenModule
lanza Nov 5, 2024
6d10568
[CIR][Dialect][NFC] Add some helpers to LoadOp
lanza Nov 5, 2024
11feef3
[CIR][ABI][AArch64][Lowering] Initial support for passing struct type…
gitoleg Nov 5, 2024
79afcd0
[CIR][ABI][AArch64] convers aarch64_be return struct case (#1049)
gitoleg Nov 5, 2024
304f1ed
[CIR][CIRGen][Builtin][NFC] Refactor IntrinsicCallOp (#1056)
ghehg Nov 5, 2024
b4ef453
[CIR][CIRGen][Builtin] Support __builtin_char_memchr (#1050)
ghehg Nov 6, 2024
67121cb
[CIR] fix getTypeSizeInBits with fp80 and fp128 (#1058)
PikachuHyA Nov 6, 2024
2a5b70d
[CIR][ABI][Lowering] covers return struct case with coercion through …
gitoleg Nov 6, 2024
ff5074b
[CIR][CIRGen][Builtin][Neon] Lower neon_vqrdmulh_v and neon_vqrdmulhq…
ghehg Nov 6, 2024
0249cac
[CIR][CIRGen][Builtin][Neon] Lower neon_vpaddl and neon_vpaddlq (#1064)
ghehg Nov 6, 2024
2404d8b
[CIR][Lowering] Add LLVM lowering support for cir.assume (#1066)
Lancern Nov 6, 2024
1e5c1bd
[CIR][CodeGen] Fix the default linkage of string literals (#1067)
seven-mile Nov 6, 2024
7c3bdfc
[CIR][ABI][AArch64][Lowering] support for passing struct types > 128 …
gitoleg Nov 6, 2024
b53d5ee
[CIR][CIRGen] Add aliases for virtual dtors calls
bcardosolopes Nov 4, 2024
902c13a
[CIR][NFC] Fix unused warning
bcardosolopes Nov 6, 2024
6f5d545
[CIR][CodeGen] Use the same SSA name as OG's for string literals (#1073)
seven-mile Nov 7, 2024
4f54597
[CIR] Make X86ArgClass an `enum class` (#1080)
smeenai Nov 7, 2024
84afe61
[CIR][CIRGen] Fix some alias issues under -O1 and above
bcardosolopes Nov 7, 2024
2824576
[CIR][NFC] Add more checks and notes for virtual-destructor-calls.cpp…
bcardosolopes Nov 7, 2024
e507d92
[CIR][NFC] Update test comment
bcardosolopes Nov 8, 2024
cc176b7
[CIR][NFC] More comments removed for ir differences
bcardosolopes Nov 8, 2024
fdadaf4
Revert "[CIR] fix getTypeSizeInBits with fp80 and fp128" (#1089)
PikachuHyA Nov 8, 2024
0960f32
[CIR][CIRGen][Builtin] Support __builtin_return_address (#1046)
ghehg Nov 8, 2024
f105395
[CIR] Extend support for floating point attributes (#572)
orbiri Nov 8, 2024
7f2732b
[CIR][CIRGen][Builtin][Neon] Lower neon_vqmovn_v (#1071)
ghehg Nov 8, 2024
313a733
[CIR][CIRGen][Builtin][Neon] Lower neon_vaesmcq_u8 (#1072)
ghehg Nov 8, 2024
ccf07f6
[CIR][CIRGen] Move CIRGen types into clang::CIRGen (#1082)
smeenai Nov 8, 2024
2333bfa
[CIR][ABI][AArch64][Lowering] Support unions (#1075)
bruteforceboy Nov 8, 2024
a12bfcd
[CIR] Merge the mlir::cir namespace into cir (#1084)
smeenai Nov 8, 2024
a8f135d
[CIR] Merge two copies of CIRGenAction.h (#1085)
smeenai Nov 8, 2024
8330f30
[CIR][NFC] Expand doc on `cir.scope` terminators (#1078)
HerrCai0907 Nov 8, 2024
d4bece8
[CIR][CIRGen][Builtin][Neon] Lower neon_vqdmulhq_v, neon_vqdmulh_v (#…
ghehg Nov 8, 2024
efacbbd
[CIR][CIRGen] Change buildX functions to emitX (#1093)
smeenai Nov 9, 2024
6ce2aaf
[CIR][NFC] Move LoweringPrepare into CIRGen (#1092)
lanza Nov 9, 2024
09299e7
[CIR][CodeGen][LowerToLLVM] String literals for OpenCL (#1091)
seven-mile Nov 9, 2024
8043f18
Revert "[CIR][NFC] Move LoweringPrepare into CIRGen (#1092)"
bcardosolopes Nov 9, 2024
439ed75
[CIR][CIRGen] support builtin signbit (#1033)
PikachuHyA Nov 11, 2024
f9ac647
[CIR][CIRGen][Builtin] Support __builtin_memcpy_inline (#1069)
ghehg Nov 11, 2024
557a21b
[CIR][CIRGen][Builtin] Support __sync_add_and_fetch (#1077)
ghehg Nov 11, 2024
a3bf7b6
[CIR][CodeGen][NFC] Simplify replacing initializer of static decls (#…
seven-mile Nov 11, 2024
b654538
[CIR][Dialect][NFC] Fix double white spaces in `cir.global` assembly …
seven-mile Nov 11, 2024
851abf8
[CIR] Properly ensure terminating IfOp and ScopeOp regions (#1097)
orbiri Nov 11, 2024
8fdb5be
[CIR][CIRGen][Builtin][Neon] Lower neon_vhsub_v, neon_vhsubq_v (#1103)
ghehg Nov 11, 2024
def8476
[CIR][NFC] Fix formatting (#1105)
smeenai Nov 12, 2024
9b678fa
[CIR][NFC] Conform if/else lowering order to match clang's output (#1…
orbiri Nov 12, 2024
8aa1099
[CIR] [Lowering] [X86_64] Support VAArg in shape (#1100)
ChuanqiXu9 Nov 13, 2024
6495df4
[CIR][CIRGen][Builtin][Neon] Lower neon_vqdmlal, neon_vqdmlsl (#1104)
ghehg Nov 13, 2024
b9247df
[CIR][ABI][AArch64] Support struct passing with coercion through memo…
gitoleg Nov 13, 2024
df950d8
[CIR][CIRGen][Builtin][Neon] Lower neon_vaeseq_u8 (#1112)
ghehg Nov 13, 2024
0040a0a
[CIR][CIRGen][Builtin] Support __builtin_wmemchr (#1115)
ghehg Nov 13, 2024
9e3a476
[CIR][CIRGen] Support __builtin_signbitl (#1117)
PikachuHyA Nov 13, 2024
0a09c3b
[CIR][Dialect][NFC] Refactor hardcoded attribute name strings (#1122)
seven-mile Nov 13, 2024
9d90efd
[CIR][ABI][Lowering] Fixes calls with union type (#1119)
gitoleg Nov 14, 2024
98dc94a
[CIR][Builtin][NFC] More informative llvm_unreachable message in CIRG…
ghehg Nov 14, 2024
6ca33eb
[CIR][CIRGen][Builtin][Neon] Lower vcvt_f32_v, vcvtq_f32_v (#1120)
ghehg Nov 14, 2024
09d82e7
[CIR][LowerToLLVM] Lowering triple from `cir.triple` attribute (#1125)
seven-mile Nov 14, 2024
0cc449f
[CIR][ABI][AArch64][Lowering] Support calls for struct types > 128 bi…
bruteforceboy Nov 14, 2024
8d4b850
[CIR][CIRGen][Builtin] Support __builtin_elementwise_abs and extend A…
ghehg Nov 14, 2024
9181e89
[ClangIR][Lowering][NFC] Split LowerToLLVM.h from LowerToLLVM.cpp (#1…
ChuanqiXu9 Nov 15, 2024
937fc31
[CIR][CIRGen][Builtin][Neon] Lower neon_splat_lane, neon_splat_laneq…
ghehg Nov 15, 2024
333fa63
[CIR][CIRGen][Builtin] Support __builtin___memmove_chk (#1106)
ghehg Nov 15, 2024
c0af341
[CIR][CIRGen] Support for visual bases in getAddressOfBaseClass
bcardosolopes Nov 8, 2024
6b2d8ec
[CIR][NFC] Fix unused variable warning
bcardosolopes Nov 15, 2024
8460d8a
[CIR][CIRGen] Bring getAddressOfBaseClass a bit closer to OG
bcardosolopes Nov 15, 2024
ab13883
[CIR][CIRGen][NFC] More unification of virtual and non-virtual offset…
bcardosolopes Nov 15, 2024
3ec7fad
[CIR][CIRGen][NFC] More skeleton conformance
bcardosolopes Nov 15, 2024
a837cf9
[CIR][CIRGen] Teach all uses of ApplyNonVirtualAndVirtualOffset to us…
bcardosolopes Nov 15, 2024
52f27a9
[CIR] Force cir.cmp to always return bool (#1110)
orbiri Nov 18, 2024
fcc722d
[CIR][CIRGen] Support __builtin_memset_inline (#1114)
PikachuHyA Nov 19, 2024
f622726
[CIR][CIRGen][TBAA] Initial TBAA support (#1116)
PikachuHyA Nov 19, 2024
7a3ee3f
[CIR][ABI][AArch64][Lowering] Support structures with padding (#1118)
bruteforceboy Nov 19, 2024
2f281fc
[CIR] fix deref nullptr when verify symbol for `cir.get_global` (#1143)
HerrCai0907 Nov 20, 2024
8176d88
[CIR][NFC] Refactor code for populating LLVM conversion patterns (#1152)
Lancern Nov 22, 2024
aa6fe48
[CIR][Dialect] Extend UnaryFPToFPBuiltinOp to vector of FP type (#1132)
ghehg Nov 23, 2024
aa47c8f
[CIR][Builtin][Neon][NFC] Introduce skeleton of emitCommonNeonSISDBui…
ghehg Nov 23, 2024
06555d3
[CIR][CIRGen][Builtin][Neon] Lower neon_vqshrn_n_v (#1144)
ghehg Nov 23, 2024
4aca8d4
[CIR][FlattenCFG] Let results of CIR ScopeOp forwarded during Flatten…
ghehg Nov 23, 2024
94f8d28
[CIR][NFC] move data member pointer lowering to CXXABI
Lancern Nov 15, 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