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][AArch64][Lowering] Support fields with structs containing constant arrays or pointers #1136

Open
wants to merge 2,089 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2089 commits
Select commit Hold shift + click to select a range
0868b62
[CIR][ABI] Fix use after free from erasing while iterating (#854)
smeenai Sep 18, 2024
ecfca99
Recommit [CIR][Pipeline] Support -fclangir-analysis-only (#832)
ChuanqiXu9 Sep 18, 2024
5e6f67b
[CIR][Lowering] Fix lowering for multi dimensional array (#851)
bruteforceboy Sep 18, 2024
edfffa5
[CIR][CodeGen] Support global temporaries
lanza Sep 18, 2024
17d8d70
[CIR][CodeGen][NFC] Move GetUndefRValue to the right file
lanza Sep 18, 2024
51bbb15
[CIR][CIRGen] Exceptions: lexical scope issue with global initializers
bcardosolopes Sep 18, 2024
a09e7b9
[CIR][CIRGen][Builtin][Neon] Lower __builtin_neon_vrndns_f32 (#858)
ghehg Sep 19, 2024
c4e85ea
[CIR][CodeGen][NFC] Add TBAAAccessInfo stubbed out and many usages of…
lanza Sep 19, 2024
0fc106c
[CIR][CodeGen] Stub out an empty CIRGenDebugInfo type
lanza Sep 19, 2024
6ec52ac
[CIR][CIRGen] Initialize more CGF member variables to nullptr (#863)
smeenai Sep 19, 2024
49ca6dd
[CIR][CIRGen] Implement Nullpointer arithmatic extension (#861)
ChuanqiXu9 Sep 19, 2024
f62d7f0
[CIR][Codegen] supports aarch64_be (#864)
gitoleg Sep 19, 2024
a182179
[CIR] Split cir-simplify into two passes (#868)
Lancern Sep 19, 2024
83145a4
[CIR][CodeGen] Implement union cast (#867)
bruteforceboy Sep 19, 2024
4e66034
[CIR][CIRGen] Exceptions: unlock nested try/catch support
bcardosolopes Sep 20, 2024
4ac7cd1
[CIR][CodeGen] Fix array initialization in CIRGenExprAgg (#852)
bruteforceboy Sep 20, 2024
73490a3
[CIR][CIRGen] Correct isSized predicate for vector type (#869)
ghehg Sep 20, 2024
47d3674
[CIR][CIRGen][Builtin][Neon] Lower builtin_neon_vrnda_v and builtin_n…
ghehg Sep 20, 2024
7fbe3f4
[CIR][CIRGen] Handle VisitCXXRewrittenBinaryOperator for scalars
bcardosolopes Sep 20, 2024
ecdaa8d
[CIR][CIRGen][NFC] Cleanups: add skeleton for DominatingValue<RValue>…
bcardosolopes Sep 20, 2024
671564f
[CIR][Infra] Run check-clang-cir against any branch based PR (#873)
lanza Sep 20, 2024
f713df2
[CIR][CIRGen][NFC] Cleanups: add more skeleton to pushFullExprCleanup
bcardosolopes Sep 21, 2024
2ea15db
[CIR][CodeGen][BugFix] don't place alloca before the label (#875)
gitoleg Sep 23, 2024
1010be6
[CIR][CIRGen] Allow constant evaluation of int annotation (#874)
keryell Sep 23, 2024
f7c98af
[CIR][CIRGen] Cleanups: handle conditional cleanups
bcardosolopes Sep 21, 2024
d02a8d8
[CIR][CIRGen][NFC] Cleanups: Prepare for conditional cleanup
bcardosolopes Sep 23, 2024
41bcfcd
[CIR][CIRGen][NFC] Cleanups: more boilerplate work for conditional on…
bcardosolopes Sep 23, 2024
d12be0b
[CIR][CodeGen] Handling multiple stmt followed after a switch case (#…
ChuanqiXu9 Sep 24, 2024
34f1e38
[CIR][CIRGen] Generate CIR for empty compound literal (#880)
ghehg Sep 24, 2024
1fa4f45
[CIR][CIRGen] Generate CIR for vset_lane and vsetq_lane intrinsics (#…
ghehg Sep 24, 2024
52b24e5
[CIR][CI] Remove libcxx tests
lanza Sep 25, 2024
3320e4d
[CIR][Dialect][CodeGen] Add a unit attribute for OpenCL kernels (#877)
seven-mile Sep 25, 2024
f684c04
[CIR][CodeGen] Handle the case of 'case' after label statement after …
ChuanqiXu9 Sep 25, 2024
c246557
[CIR][CIRGen] Generate CIR for neon_vget and neon_vdup lane intrinsic…
ghehg Sep 25, 2024
3bff980
[CIR][CIRGen] Allow maybeSetTrivialComdat for GlobalOp (#885)
ghehg Sep 25, 2024
8ce24be
[CIR][CIRGen][Builtin][Neon] Lower neon vqadd_v (#890)
ghehg Sep 27, 2024
c249d0c
[CIR][CIRGen][NFC] Split cir.scope creation on buildReturnStmt
bcardosolopes Sep 24, 2024
c38932f
[CIR][NFC] Add helpers for cir.try and do some refactoring
bcardosolopes Sep 24, 2024
6b0e058
[CIR][CIRGen][Builtin] Allow CIRGen for builtin calls with math error…
ghehg Sep 27, 2024
78bf276
[CIR][CIRGen] Support __builtin_huge_val for float type (#889)
ghehg Sep 27, 2024
506bbe7
[CIR][NFC] Rename test
bcardosolopes Sep 27, 2024
f2e3e99
[CIR][ABI] Apply CC lowering pass by default (#842)
sitio-couto Sep 28, 2024
621d633
[CIR][CIRGen][Builtin][Neon] Lower vqrshrun_n and add getAArch64SIMDI…
ghehg Sep 30, 2024
781f482
[CIR][NFC] Silence unused warning
bcardosolopes Sep 28, 2024
0b231a6
Revert "[CIR][ABI] Apply CC lowering pass by default (#842)"
bcardosolopes Sep 30, 2024
0f67818
[CIR][CIRGen] Add time trace to several CIRGen pieces (#898)
ChuanqiXu9 Sep 30, 2024
e557714
[CIR][Dialect] Support OpenCL work group uniformity attribute (#896)
seven-mile Sep 30, 2024
33e2517
[CIR][CodeGen][NFC] Rename the confusing `buildGlobal` overload (#897)
seven-mile Sep 30, 2024
12807a8
[CIR][CIRGen][Builtin][Neon] Lower neon vld1_lane and vld1q_lane (#901)
ghehg Sep 30, 2024
f6fb31f
[CIR][CodeGen][NFC] Break the missing feature flag for OpenCL into sm…
seven-mile Oct 1, 2024
c2c990e
[CIR][CodeGen] Add `nothrow` for functions in OpenCL languages (#903)
seven-mile Oct 1, 2024
ef86a59
[CIR][CodeGen] Set constant properly for global variables (#904)
seven-mile Oct 1, 2024
cb52a46
[CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910)
ghehg Oct 2, 2024
76b3dc5
[CIR][Lowering] Fix Global Attr Lowering (#906)
bruteforceboy Oct 2, 2024
9eb20fb
[CIR][CIRGen][Builtin] Implement builtin __sync_fetch_and_sub (#932)
ghehg Oct 2, 2024
713a8fa
[CIR][CIRGen] Cleanup: enable conditional cleanup with exceptions
bcardosolopes Sep 24, 2024
34858fc
[CIR][CIRGen][Builtin][Neon] Lower BI__builtin_neon_vmovn_v (#909)
ghehg Oct 4, 2024
bc9038e
[CIR][CIRGen][Builtin][Neon] Lower neon vst1q_lane and vst1_lane (#935)
ghehg Oct 4, 2024
12ad272
[CIR] Derived-to-base conversions (#937)
dkolsen-pgi Oct 5, 2024
77bb2a2
[CIR][NFC] Updates against -Wswitch after rebase
bcardosolopes Oct 5, 2024
bfd5cd6
[CIR][CIRGen] Exceptions: fix agg store for temporaries
bcardosolopes Oct 5, 2024
1d409e6
[CIR][CIRGen] Lower cir.throw in absence of dtors
bcardosolopes Oct 7, 2024
0e8092d
[CIR][NFC] Update wrong comments from previous commit
bcardosolopes Oct 7, 2024
0a9ff03
[CIR][CIRGen] Exceptions: support free'ing allocated exception resources
bcardosolopes Oct 7, 2024
e9ccae7
[Lowering][DirectToLLVM] Fix calling variadic functions (#945)
smeenai Oct 8, 2024
1c1448a
[CIR] [CodeGen] Remove NYI in buildPointerWithAlignment (#949)
ChuanqiXu9 Oct 8, 2024
c2e7b30
[CIR][Lowering] Introduce HoistAllocasPass (#887)
ChuanqiXu9 Oct 9, 2024
8c8b2ce
[CIR][CodeGen] Enable -fno-PIE (#940)
bruteforceboy Oct 9, 2024
632273a
[CIR][CIRGen] Add support for __fp16 type (#950)
Lancern Oct 9, 2024
5102c6f
[CIR][CIRGen][Builtin] Support unsigned type for _sync_(bool/val)_com…
ghehg Oct 9, 2024
442c8fd
[CIR][CIRGen][NFC] Improve buildAutoVarAlloca skeleton and add hooks …
bcardosolopes Oct 9, 2024
46d82a5
[CIR][CIRGen] Support annotations on local var decl
bcardosolopes Oct 9, 2024
8a32f09
[CIR][LowerToLLVM][NFC] Move annotation lowering around
bcardosolopes Oct 9, 2024
2b3febf
[CIR][NFC] Fix post-rebase warning
bcardosolopes Oct 9, 2024
a83e7cc
[CIR][LowerToLLVM] Add support for local var annotations
bcardosolopes Oct 10, 2024
9d3c8e4
Reapply and patch "[CIR][ABI] Apply CC lowering pass by default (#842…
sitio-couto Oct 11, 2024
34f3d39
[CIR][CodeGen] kr-style for function arguments (#938)
gitoleg Oct 11, 2024
5931d7e
[CIR][CIRGen] Add const attribute to alloca operations (#892)
Lancern Oct 11, 2024
32ce46a
[CIR][Lowering] VecCreateOp and VecSplatOp lowering choose LLVM:Poiso…
ghehg Oct 11, 2024
3acdc98
[CIR][NFC][Testing] Fix test failure (#963)
ghehg Oct 11, 2024
92d38e0
[CIR][CodeGen] Support static references to temporaries
lanza Sep 19, 2024
3cfefd7
[CIR][CIRGen] Support CodeGen for vbase constructors
Laity000 May 21, 2024
0adaf62
[CIR][CIRGen][Builtin][Neon] Lower neon_vtrn and neon_vtrnq (#942)
ghehg Oct 11, 2024
c0eaf16
[CIR][CIRGen][Builtin][Neon] Lower neon_vext_v and neon_vextq_v (#951)
ghehg Oct 11, 2024
ba6f0a3
[CIR][Lowering] Handling Lowering of multiple dimension array correct…
ChuanqiXu9 Oct 14, 2024
ed0010b
[CIR][CIRGen][Builtin][Neon] Lower vld1_dup and vld1q_dup (#936)
ghehg Oct 14, 2024
634f656
[CIR][CIRGen][Builtin][Neon] Lower neon_vpadd_v and neon_vpaddq_v int…
ghehg Oct 14, 2024
aebe2e9
[CIR] [Lowering] Fix handling of multiple array for ZeroAttr (#970)
ChuanqiXu9 Oct 14, 2024
5f456db
[CIR][Driver] Fix -fclangir-call-conv-lowering behavior
bcardosolopes Oct 14, 2024
1361acb
[CIR] Add more user facing messages for -fno-clangir-call-conv-lowering
bcardosolopes Oct 15, 2024
f97779f
[CIR] Make the asserts to display suggestion for -fno-clangir-call-co…
bcardosolopes Oct 15, 2024
d83778a
[CIR][NFC] Massively rename workarounds for callconv lowering
bcardosolopes Oct 15, 2024
c1811d9
[CIR][CIRGen] Implement CIRGenModule::shouldEmitFunction (#984)
smeenai Oct 16, 2024
c44ecae
[CIR][CIRGen] Port 1d0bd8e51be2627f79bede54735c38b917ea04ee (#983)
smeenai Oct 16, 2024
0692ca8
[CIR][LowerToLLVM] Lower cir.vtt.address_point
bcardosolopes Oct 16, 2024
ae3af92
[CIR][NFC] Rename function in a test
bcardosolopes Oct 16, 2024
06967ca
[CIR][CIRGen] Get more vtable and dtor working
bcardosolopes Oct 16, 2024
02f6c9d
[CIR][CIRGen][NFC] Consolidate RUN lines for builtin tests (#968)
ghehg Oct 16, 2024
e6d2597
[CIR] [Lowering] care trailing zero for lowering constant array (#976)
ChuanqiXu9 Oct 16, 2024
4e85bb6
[CIR] Add support for __int128 type (#980)
Lancern Oct 16, 2024
aaca9aa
[CIR][CIRGen][Builtin][Neon] Lower neon_vrshrn_n to llvm intrinsic ca…
ghehg Oct 16, 2024
10e9bf0
[CIR][CIRGen][Builtin][Neon] Lower vqdmulhq_lane, vqdmulh_lane, vqrdm…
ghehg Oct 16, 2024
f12577e
[CIR][CIRGen][Builtin][Type] Support for IEEE Quad (long double) adde…
mvvsmk Oct 16, 2024
bda383e
[CIR][NFC] Fix some consistency issues with missing features
bcardosolopes Oct 16, 2024
329ae00
[CIR] Disable `-fclangir-call-conv-lowering` from default in the LLVM…
bcardosolopes Oct 16, 2024
c975f8c
[CIR][CIRGen][Builtin] Implement builtin addressof (#987)
ghehg Oct 16, 2024
89ebcb1
[CIR][NFC] Improve documentation about goto's
bcardosolopes Oct 16, 2024
e6642f1
[CIR][NFC] Move code around to match OG
bcardosolopes Oct 16, 2024
6e32b2b
[CIR][CIRGen][NFC] Add more skeleton for handling inheritance ctors
bcardosolopes Oct 18, 2024
a721243
[CIR][CIRGen] Ensure default visibility for local linkage functions (…
smeenai Oct 18, 2024
18f3cec
[CIR][CIRGen][Builtin][Neon] Lower neon_vshl_n_v and neon_vshlq_n_v (…
ghehg Oct 18, 2024
70c24e5
[CIR][CIRGen] Use Clang Codegen's skeleton in CIRGenFunction::buildBu…
ghehg Oct 18, 2024
8a61a2b
[CIR][CIRGen][Builtin][Neon] Lower neon_vqaddq_v, neon_vqsubq and neo…
ghehg Oct 18, 2024
dc191dc
[CIR][CIRGen][Builtin][Neon] Lower neon_vmovl_v (#989)
ghehg Oct 18, 2024
e2f452b
[CIR][CIRGen] Support initial cases of inheritance ctor/dtor
bcardosolopes Oct 18, 2024
ab4fbbb
[CIR][CIRGen] Null init some inheritance components
bcardosolopes Oct 18, 2024
e54956b
[CIR][CIRGen][NFC] More skeleton for building constants
bcardosolopes Oct 19, 2024
0df4cb4
[CIR][CIRGen] Add missing testcase for null base class
bcardosolopes Oct 19, 2024
f475de4
[CIR] [CodeGen] Introduce IsFPClassOp to support builtin_isfpclass (#…
ChuanqiXu9 Oct 21, 2024
ce9531c
[CIR][NFC] Move callconv tests around
bcardosolopes Oct 21, 2024
d81a344
[CIR][Asm] Implement parser for cir.func annotations (#981)
keryell Oct 21, 2024
84ff88b
[CIR][CIRGen][Builtin][Neon] Lower neon_vabd_v and neon_vabdq_v (#996)
ghehg Oct 21, 2024
d5abada
[CIR][CIRGen][Builtin][Neon] Lower neon_vmull_v (#998)
ghehg Oct 21, 2024
2b3af41
[CIR][CIRGen][Builtin][Neon] Lower neon_vrhadd_v and neon_vrhaddq_v (…
ghehg Oct 21, 2024
4c1e646
[CIR][CIRGen][Builtin][Neon] Lower neon_vmin_v and neon_vminq_v (#1000)
ghehg Oct 21, 2024
4a415b0
[CIR][Transforms] Fix CallConv Function Lowering (#979)
bruteforceboy Oct 26, 2024
beb2cb8
[CIR][CIRGen][Lowering] Use same set of annotation-related global var…
ghehg Oct 26, 2024
48df8c5
[CIR][CodeGen][NFC] Cleanup CIRGenFunction::StartFunction to match OG…
lanza Oct 26, 2024
edc5ad7
[ClangIR][Lowering] Handle lowered array index (#1008)
ChuanqiXu9 Oct 26, 2024
9874471
[CIR][CIRGen] Removed extra space in "cir.shift( right)" (#997) (#1009)
MarcoCalabretta Oct 28, 2024
efc6bbb
[CIR][CIRGen][Builtin][Neon] Lower neon_vshll_n (#1010)
ghehg Oct 28, 2024
9543ce0
[ClangIR][CIRGen] Introduce CaseOp and refactor SwitchOp (#1006)
ChuanqiXu9 Oct 29, 2024
76b4932
[CIR][ABI][AArch64][Lowering] Initial support for return of struct ty…
gitoleg Oct 29, 2024
9e89c55
[CIR][Lowering] Supports varargs in the CallingConvention pass (#1005)
gitoleg Oct 29, 2024
80cde74
[CIR][CodeGen][NFC] Add some missing guards for unreachable
lanza Oct 30, 2024
b72ab68
[CIR][CodeGen] Store the old CIRGenFunction when popping to a new one
lanza Oct 30, 2024
673338c
[CIR][CodeGen][NFC] Implement a missing function
lanza Oct 30, 2024
985e849
[CIR][ABI][Lowering] Supports function pointers in the calling conven…
gitoleg Oct 30, 2024
dd8af2a
[CIR][CIRGen][Builtin][Neon] Lower neon_vqmovun_v (#1012)
ghehg Oct 30, 2024
fb75936
[CIR][CIRGen] Enable comdat for static variables (#1015)
ghehg Oct 30, 2024
3449921
[CIR][CIRGen] Fix "definition with same mangled name" error (#1016)
smeenai Oct 30, 2024
1f3deff
[CIR][CIRGen][Builtin][Neon] Lower neon_vrshr_n and vrshrq_n to llvm …
ghehg Oct 30, 2024
bc9f172
[CIR][Dialect][NFC] Fix double whitespaces in `cir.func` assembly (#1…
seven-mile Oct 30, 2024
f11da35
[CIR][CIRGen] Add support for abs (#1011)
PikachuHyA Oct 30, 2024
663704f
[CIR][Lowering] Transform cir.store of const arrays into cir.copy
bcardosolopes Oct 29, 2024
58666de
[CIR][CIRGen] Fix typo in test check
smeenai Oct 30, 2024
21c99e6
[CIR][CIRGen] Fix swapped parameters in test
smeenai Oct 31, 2024
d64b8a6
[CIR][CIRGen][Builtin][Neon] Lower neon_vtst_v and neon_vtstq_v (#1013)
ghehg Oct 31, 2024
e634a47
[CIR][CIRGen] Add support for memmove (#1019)
PikachuHyA Oct 31, 2024
ae4af2e
[CIR][ABI][AArch64] support for return struct types greater than 128 …
gitoleg Oct 31, 2024
2f6e66f
[CIR][ABI][Lowering] Supports call by function pointer in the calling…
gitoleg Oct 31, 2024
9f119ea
[CIR][CIRGen][Builtin] Support BI__builtin_operator_new and BI__built…
ghehg Oct 31, 2024
9340d87
[CIR][ABI][Lowering] Add CCLower support for int128 on x86_64 (#1036)
Lancern Oct 31, 2024
0906fde
[CIR][CIRGen][Builtin][Neon] Lower neon_vqshlu_n and neon_vqshluq_n (…
ghehg Oct 31, 2024
15c4e97
[CIR][CIRGen] Support more member init variations
bcardosolopes Oct 31, 2024
c44f3b7
[Driver] Bring back -emit-cir as a frontend option
lanza Nov 1, 2024
01d3bf6
[CIR] Add a cir.undef attr
smeenai Nov 1, 2024
72a0f15
[CIR][CIRGen] Scalar emission for casts of base to derived
bcardosolopes Nov 1, 2024
6c8a9d1
[CIR][CIRGen] Fix const codegen for empty struct
smeenai Nov 1, 2024
ca63f95
[CIR][CIRGen][Builtin][Neon] Lower neon_vhadd_v and neon_vhaddq_v (#1…
ghehg Nov 2, 2024
4e5ddeb
[CIR][CIRGen][Builtin][Neon] Lower neon_vshrn_n_v (#1040)
ghehg Nov 2, 2024
7292552
[CIR][NFC] Remove leftovers from previous commit
bcardosolopes Nov 2, 2024
9228ff9
[CIR][LowerToLLVM] Fold base address computation if offset is zero
bcardosolopes Nov 2, 2024
adf0c99
[CIR][CIRGen][Builtin][Neon] Lower neon_vshlq_v (#1042)
ghehg Nov 2, 2024
fa2bdd8
Remove disablement of Wdeprecated-declarations
lanza Nov 4, 2024
96a27a0
[CIR][CIRGen] Add support for memset (#1026)
PikachuHyA Nov 4, 2024
d2df0f6
[CIR][CIRGen][Builtin][Neon] Lower neon_vshr_n_v and neon_vshrq_n_v (…
ghehg Nov 4, 2024
6f15a2e
[ClangIR][CIRGen] Handle nested union in arrays of struct (#1007)
ChuanqiXu9 Nov 4, 2024
d461377
[CIR][NFC] Fix warnings post rebase and some pre-existing ones
bcardosolopes Nov 4, 2024
d4f09e6
[CIR][CIRGen] Support __builtin___memcpy_chk (#1032)
smeenai Nov 4, 2024
815dfaa
[CIR][CIRGen] Support __builtin___memset_chk (#1053)
smeenai Nov 2, 2024
fca6e2c
[CIR][CIRGen] Emit required vtables (#1054)
smeenai Nov 5, 2024
9e2ff80
[CIR][CodeGen][NFC] Add `getMLIRContext` to CIRGenModule
lanza Nov 5, 2024
9dfe49d
[CIR][Dialect][NFC] Add some helpers to LoadOp
lanza Nov 5, 2024
4fbdd36
[CIR][ABI][AArch64][Lowering] Initial support for passing struct type…
gitoleg Nov 5, 2024
ea733a4
[CIR][ABI][AArch64] convers aarch64_be return struct case (#1049)
gitoleg Nov 5, 2024
5f1afad
[CIR][CIRGen][Builtin][NFC] Refactor IntrinsicCallOp (#1056)
ghehg Nov 5, 2024
e57cdb4
[CIR][CIRGen][Builtin] Support __builtin_char_memchr (#1050)
ghehg Nov 6, 2024
73c5bc8
[CIR] fix getTypeSizeInBits with fp80 and fp128 (#1058)
PikachuHyA Nov 6, 2024
6ae32d2
[CIR][ABI][Lowering] covers return struct case with coercion through …
gitoleg Nov 6, 2024
0005b7f
[CIR][CIRGen][Builtin][Neon] Lower neon_vqrdmulh_v and neon_vqrdmulhq…
ghehg Nov 6, 2024
82767f4
[CIR][CIRGen][Builtin][Neon] Lower neon_vpaddl and neon_vpaddlq (#1064)
ghehg Nov 6, 2024
925cf47
[CIR][Lowering] Add LLVM lowering support for cir.assume (#1066)
Lancern Nov 6, 2024
4a60357
[CIR][CodeGen] Fix the default linkage of string literals (#1067)
seven-mile Nov 6, 2024
681e660
[CIR][ABI][AArch64][Lowering] support for passing struct types > 128 …
gitoleg Nov 6, 2024
a249ba9
[CIR][CIRGen] Add aliases for virtual dtors calls
bcardosolopes Nov 4, 2024
dbf320e
[CIR][NFC] Fix unused warning
bcardosolopes Nov 6, 2024
7619b20
[CIR][CodeGen] Use the same SSA name as OG's for string literals (#1073)
seven-mile Nov 7, 2024
94b4d89
[CIR] Make X86ArgClass an `enum class` (#1080)
smeenai Nov 7, 2024
ee210d3
[CIR][CIRGen] Fix some alias issues under -O1 and above
bcardosolopes Nov 7, 2024
b414f2b
[CIR][NFC] Add more checks and notes for virtual-destructor-calls.cpp…
bcardosolopes Nov 7, 2024
0d3be92
[CIR][NFC] Update test comment
bcardosolopes Nov 8, 2024
f429d5c
[CIR][NFC] More comments removed for ir differences
bcardosolopes Nov 8, 2024
edc337b
Revert "[CIR] fix getTypeSizeInBits with fp80 and fp128" (#1089)
PikachuHyA Nov 8, 2024
f858c4e
[CIR][CIRGen][Builtin] Support __builtin_return_address (#1046)
ghehg Nov 8, 2024
2d4ba15
[CIR] Extend support for floating point attributes (#572)
orbiri Nov 8, 2024
7522d50
[CIR][CIRGen][Builtin][Neon] Lower neon_vqmovn_v (#1071)
ghehg Nov 8, 2024
5eb371d
[CIR][CIRGen][Builtin][Neon] Lower neon_vaesmcq_u8 (#1072)
ghehg Nov 8, 2024
3f66d51
[CIR][CIRGen] Move CIRGen types into clang::CIRGen (#1082)
smeenai Nov 8, 2024
0634b25
[CIR][ABI][AArch64][Lowering] Support unions (#1075)
bruteforceboy Nov 8, 2024
0c77b27
[CIR] Merge the mlir::cir namespace into cir (#1084)
smeenai Nov 8, 2024
2fc3593
[CIR] Merge two copies of CIRGenAction.h (#1085)
smeenai Nov 8, 2024
723afef
[CIR][NFC] Expand doc on `cir.scope` terminators (#1078)
HerrCai0907 Nov 8, 2024
9abe35f
[CIR][CIRGen][Builtin][Neon] Lower neon_vqdmulhq_v, neon_vqdmulh_v (#…
ghehg Nov 8, 2024
5e91e4f
[CIR][CIRGen] Change buildX functions to emitX (#1093)
smeenai Nov 9, 2024
4463352
[CIR][NFC] Move LoweringPrepare into CIRGen (#1092)
lanza Nov 9, 2024
f220fa7
[CIR][CodeGen][LowerToLLVM] String literals for OpenCL (#1091)
seven-mile Nov 9, 2024
94289aa
Revert "[CIR][NFC] Move LoweringPrepare into CIRGen (#1092)"
bcardosolopes Nov 9, 2024
15f3e5e
[CIR][CIRGen] support builtin signbit (#1033)
PikachuHyA Nov 11, 2024
d5b2a8e
[CIR][CIRGen][Builtin] Support __builtin_memcpy_inline (#1069)
ghehg Nov 11, 2024
ab1df14
[CIR][CIRGen][Builtin] Support __sync_add_and_fetch (#1077)
ghehg Nov 11, 2024
492babc
[CIR][CodeGen][NFC] Simplify replacing initializer of static decls (#…
seven-mile Nov 11, 2024
e53464f
[CIR][Dialect][NFC] Fix double white spaces in `cir.global` assembly …
seven-mile Nov 11, 2024
e6b2808
[CIR] Properly ensure terminating IfOp and ScopeOp regions (#1097)
orbiri Nov 11, 2024
f395453
[CIR][CIRGen][Builtin][Neon] Lower neon_vhsub_v, neon_vhsubq_v (#1103)
ghehg Nov 11, 2024
ab0d0c8
test
lanza Nov 11, 2024
a18a580
[CIR][NFC] Fix formatting (#1105)
smeenai Nov 12, 2024
5c5d584
[CIR][NFC] Conform if/else lowering order to match clang's output (#1…
orbiri Nov 12, 2024
ef90a8b
[CIR] [Lowering] [X86_64] Support VAArg in shape (#1100)
ChuanqiXu9 Nov 13, 2024
a6c9820
[CIR][CIRGen][Builtin][Neon] Lower neon_vqdmlal, neon_vqdmlsl (#1104)
ghehg Nov 13, 2024
7787e7c
[CIR][ABI][AArch64] Support struct passing with coercion through memo…
gitoleg Nov 13, 2024
e6544b5
[CIR][CIRGen][Builtin][Neon] Lower neon_vaeseq_u8 (#1112)
ghehg Nov 13, 2024
6666565
[CIR][CIRGen][Builtin] Support __builtin_wmemchr (#1115)
ghehg Nov 13, 2024
0ec8cf3
[CIR][CIRGen] Support __builtin_signbitl (#1117)
PikachuHyA Nov 13, 2024
16a027a
[CIR][Dialect][NFC] Refactor hardcoded attribute name strings (#1122)
seven-mile Nov 13, 2024
d1ad076
[CIR][ABI][Lowering] Fixes calls with union type (#1119)
gitoleg Nov 14, 2024
ff44e98
[CIR][Builtin][NFC] More informative llvm_unreachable message in CIRG…
ghehg Nov 14, 2024
c644ee7
[CIR][CIRGen][Builtin][Neon] Lower vcvt_f32_v, vcvtq_f32_v (#1120)
ghehg Nov 14, 2024
5548546
[CIR][LowerToLLVM] Lowering triple from `cir.triple` attribute (#1125)
seven-mile Nov 14, 2024
1b97f92
[CIR][ABI][AArch64][Lowering] Support calls for struct types > 128 bi…
bruteforceboy Nov 14, 2024
329aca9
[CIR][CIRGen][Builtin] Support __builtin_elementwise_abs and extend A…
ghehg Nov 14, 2024
da6218b
[ClangIR][Lowering][NFC] Split LowerToLLVM.h from LowerToLLVM.cpp (#1…
ChuanqiXu9 Nov 15, 2024
8fbc640
[CIR][CIRGen][Builtin][Neon] Lower neon_splat_lane, neon_splat_laneq…
ghehg Nov 15, 2024
ab9fbcf
[CIR][CIRGen][Builtin] Support __builtin___memmove_chk (#1106)
ghehg Nov 15, 2024
c50cec7
[CIR][CIRGen] Support for visual bases in getAddressOfBaseClass
bcardosolopes Nov 8, 2024
29cb9bc
[CIR][NFC] Fix unused variable warning
bcardosolopes Nov 15, 2024
a61e202
[CIR][CIRGen] Bring getAddressOfBaseClass a bit closer to OG
bcardosolopes Nov 15, 2024
2430c26
[CIR][CIRGen][NFC] More unification of virtual and non-virtual offset…
bcardosolopes Nov 15, 2024
c10f493
[CIR][CIRGen][NFC] More skeleton conformance
bcardosolopes Nov 15, 2024
3aed38c
[CIR][CIRGen] Teach all uses of ApplyNonVirtualAndVirtualOffset to us…
bcardosolopes Nov 15, 2024
45a6e17
initial commit
bruteforceboy Nov 18, 2024
157d5fb
update tests
bruteforceboy Nov 18, 2024
5810d6c
update tests
bruteforceboy Nov 18, 2024
6427019
[CIR] Force cir.cmp to always return bool (#1110)
orbiri Nov 18, 2024
da601b3
[cherry-pick][mlir][llvm] Add support for memset.inline (#115711) (#1…
PikachuHyA Nov 18, 2024
affa8f8
[CIR][CIRGen] Support __builtin_memset_inline (#1114)
PikachuHyA Nov 19, 2024
e57a9da
[CIR][CIRGen][TBAA] Initial TBAA support (#1116)
PikachuHyA Nov 19, 2024
70fed1b
[CIR][ABI][AArch64][Lowering] Support structures with padding (#1118)
bruteforceboy Nov 19, 2024
bae7bd9
[CIR] fix deref nullptr when verify symbol for `cir.get_global` (#1143)
HerrCai0907 Nov 20, 2024
43627ae
Merge remote-tracking branch 'origin/main' into lower-context
bruteforceboy Nov 20, 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.
Empty file added asdf
Empty file.
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