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][OpenMP] Implementation of critical directive #675

Open
wants to merge 1,611 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1611 commits
Select commit Hold shift + click to select a range
eced6fa
[CIR][CIRGen] Handle __extension__ keyword (#421)
YazZz1k Jan 31, 2024
efb9922
[CIR][CIRGen] Add missing case to 'isNullValue' (#433)
YazZz1k Jan 31, 2024
87c4338
[CIR][CIRGen] Support for section atttribute (#422)
YazZz1k Feb 2, 2024
765e5dc
[CIR][CIRGen][Bugfix] Fix bool zero initialization (#411)
YazZz1k Feb 2, 2024
58b5474
[CIR][Lowering] Support conversion of cir.zero to dense consts (#413)
YazZz1k Feb 2, 2024
7b4745e
[CIR][CodeGen] Initial support for dynamic_cast (#426)
Lancern Feb 2, 2024
323e0c1
[CIR][CIRGen] Add codegen for branch prediction info builtins (#439)
YazZz1k Feb 2, 2024
615a367
[CIR][CIRGen] Handle ternary op inside if cond (#440)
YazZz1k Feb 2, 2024
a010209
[CIR][CIRGen] Support check for zero-init pointers (#441)
YazZz1k Feb 2, 2024
c35b579
[CIR][CIRGen] Support dynamic_cast to void ptr (#442)
Lancern Feb 2, 2024
d54e041
[CIR][CodeGen][Lowering] Supports arrays with trailing zeros (#393)
gitoleg Feb 2, 2024
e7e05a8
[CIR][LibOpt] Extend std::find optimization to all calls with raw poi…
philnik777 Feb 2, 2024
6094902
[CIR][CIRGen] Implement "if consteval" code generation (#446)
keryell Feb 3, 2024
da3343a
[CIR] Allow mlir::UnknownLoc in function op (#448)
Lancern Feb 4, 2024
38bd933
[CIR][CodeGen] Const structs with bitfields (#412)
gitoleg Feb 5, 2024
113b787
[CIR][Lowering][Bugfix] Fix lowering of bool_to_int cast (#450)
YazZz1k Feb 5, 2024
cb53cf8
[CIR][CIRGen][Exceptions] Connect the unwind region to the rest of Ca…
bcardosolopes Feb 6, 2024
671ffc7
[CIR][CIRGen][Exceptions] Add support for catch_all
bcardosolopes Feb 6, 2024
72e9f23
[CIR][CIRGen] Add suppport for local typedefs (#451)
YazZz1k Feb 6, 2024
013a653
[CIR][CIRGen][BugFix] Fix building of calls (#452)
YazZz1k Feb 6, 2024
e95a5c4
[CIR][CIRGen][Exceptions] Handle a catch_all corner case
bcardosolopes Feb 6, 2024
c3e6388
[CIR][CIRGen] Implement "if constexpr" code generation (#436)
keryell Feb 7, 2024
4f89aa7
[CIR][CIRGen] Add codegen for global compound literals (#454)
YazZz1k Feb 8, 2024
6c29cd4
[CIR][CodeGen] VLA support next step (#453)
gitoleg Feb 8, 2024
06da08a
[CIR][CIRGen][Bugfix] Emit valid type for evaluated const (#456)
YazZz1k Feb 8, 2024
101c4c0
[CIR][CIRGen][Exceptions][NFC] Add skeleton for some missing function…
bcardosolopes Feb 9, 2024
b63a943
[CIR][CIRGen] Support for local const arrays (#458)
YazZz1k Feb 9, 2024
ad2de47
[CIR][CIRGen][NFC] Relax asserts for using decls and namespace alias
bcardosolopes Feb 10, 2024
877a15e
[CIR][CIRGen] Fix in replacing of no_proto func (#460)
YazZz1k Feb 12, 2024
c976e4b
[CIR][CIRGen][Exceptions][NFC] Re-arrange CallLikeOp building
bcardosolopes Feb 12, 2024
d7f09ca
[CIR][CIRGen][Exceptions][NFC] Reuse lexical scope instead of custom …
bcardosolopes Feb 12, 2024
a1d0b22
[CIR][Lowering] add lowering of bool attribute (#461)
YazZz1k Feb 13, 2024
49bcdd2
[CIR][CIRGen][Exceptions] Prep work for using cir.try_call outside ci…
bcardosolopes Feb 13, 2024
6d83a86
[CIR][CodeGen] Locally inited structures with bitfields (#463)
gitoleg Feb 14, 2024
d3b91b5
[CIR][CIRGen] Introduce cir.unreachable operation (#447)
Lancern Feb 14, 2024
19350cf
[CIR][CIRGen] Add missing case to VisitMemberExpr (#464)
YazZz1k Feb 14, 2024
e3d14fd
[CIR][CIRGen][Exceptions] Add unwind attribute
bcardosolopes Feb 14, 2024
e0dc80f
[CIR][CodeGen] Inline assembly: adds operands (#465)
gitoleg Feb 15, 2024
b5e684e
[CIR][NFC] Refactor more call related mechanisms
bcardosolopes Feb 15, 2024
da2e461
[CIR][CodeGen] Adds clobbers to inline assembly (#469)
gitoleg Feb 16, 2024
559da04
[CIR][NFC] Use an attribute alias for extra_func_attrs
bcardosolopes Feb 17, 2024
321ca2b
[CIR][Lowering] Handle unsupported types for CIR-MLIR type conversion…
mrsoliman Feb 20, 2024
e846fd2
[CIR][CIRGen] Support for zero initialization of arrays (#468)
YazZz1k Feb 20, 2024
72eccae
[CIR][CodeGen][Bugfix] Fix storage size for bitfields (#462)
gitoleg Feb 20, 2024
b82fdb0
[CIR] introduce CIR floating-point types (#385)
Lancern Feb 21, 2024
624f2be
[CIR][Codegen] Fix bitfields unary and binary ops (#477)
gitoleg Feb 22, 2024
876101b
[CIR][CIRGen] Fix calling a function through a function pointer (#467)
YazZz1k Feb 22, 2024
c2bca4a
[CIR] initial support for pointer-to-data-member type (#401)
Lancern Feb 22, 2024
85a48c7
[CIR][NFC] Add unimplemented feature guard for dialect code (#481)
Lancern Feb 29, 2024
9a69667
[CIR][Lowering] More cir.asm lowering (#472)
gitoleg Feb 29, 2024
0ba4f5a
[CIR][CIRGen] Emit `cir.unreachable` on implicit returns (#486)
Lancern Mar 5, 2024
116a86d
[CIR][CIRGen] Add support for builtin bit operations (#474)
Lancern Mar 5, 2024
19de5fc
[CIR] Vector types - part 4 (#490)
dkolsen-pgi Mar 5, 2024
9d55d0f
[CIR][CIRGen] Support for __builtin_expect (#478)
YazZz1k Mar 5, 2024
6191da3
[CIR][CIRGen] Partial support for `offsetof` (#492)
YazZz1k Mar 6, 2024
2ab8d1e
[CIR][CIRGen] Support for CStyleCastExprClass in buildCastLValue (#494)
YazZz1k Mar 6, 2024
bfc16da
[CIR] Add `cir.trap` operation (#496)
Lancern Mar 7, 2024
e10f9d9
[CIR][FrontendTool] Fix overly conservative compatible flags
bcardosolopes Mar 8, 2024
62e97a7
[CIR] Vector ternary operator (#500)
dkolsen-pgi Mar 9, 2024
062b69e
[CIR][CIRGen][NFC] Use proper help with shouldEmitRTTI and clean up
bcardosolopes Mar 9, 2024
460cffa
[CIR][CIRGen][RTTI] Handle vtables in face of -fno-rtti
bcardosolopes Mar 9, 2024
cc4fddd
[CIR][CIRGen] Emit more delete calls
bcardosolopes Mar 11, 2024
26e1ad1
[CIR][CIRGen][NFC] Expand skeleton for constructing array types
bcardosolopes Mar 11, 2024
1ee9340
[CIR][Lowering] Add LLVMIR lowering support for CIR bit operations (#…
Lancern Mar 12, 2024
829dd95
[CIR][CIRGen] Enable support of bool increment (#493)
YazZz1k Mar 12, 2024
d7d62a6
[CIR][CIRGen] Inline asm: operand attributes (#491)
gitoleg Mar 12, 2024
108d233
[CIR] Vector type cleanup and refactoring (#503)
dkolsen-pgi Mar 12, 2024
47c2e56
[CIR][Codegen][Lowering] Introduce new bitfield layout (#487)
gitoleg Mar 12, 2024
65f27ad
[CIR][CIRGen] Add support for ctor/dtor based array init/destroy
bcardosolopes Mar 12, 2024
a7910b8
[CIR][CIRGen] Lower C++ array init and destroy
bcardosolopes Mar 14, 2024
c550e90
[CIR][LoweringPrepare] Add a missing store for current array idx
bcardosolopes Mar 14, 2024
15903b6
[CIR][CIRGen][NFC] Skeleton for atomics support
bcardosolopes Mar 14, 2024
2c680f1
[CIR][CIRGen][Atomics][NFC] Skeleton for constant order codegen
bcardosolopes Mar 14, 2024
90786c8
[CIR][Codegen] Initial support for packed structures (#473)
gitoleg Mar 15, 2024
3d86b46
[CIR][CIRGen] Support for initialization of unions. (#495)
YazZz1k Mar 15, 2024
7c7c4ff
[CIR][CIRGen] Support for __builtin_prefetch (#504)
YazZz1k Mar 15, 2024
1f8f096
[CIR] Add MemRead/MemWrite markers to bitfield ops (#507)
gitoleg Mar 15, 2024
2a0fcd5
[CIR][CIRGen] Support for __builtin_constant_p (#506)
YazZz1k Mar 15, 2024
9fde505
[CIR][CIRGen] Support for C++20 three-way comparison (#485)
Lancern Mar 19, 2024
3896c0e
[CIR][Rebase] Add CountAttributed enum case in a switch
lanza Mar 21, 2024
fd354e5
[CIR][CIRGen] Support for compound literal lvalue (#515)
YazZz1k Mar 22, 2024
8d87565
[CIR][CIRGen] Support for __attribute__((fallthrough)) statement (#517)
YazZz1k Mar 22, 2024
c9dd759
[CIR][CIRGen] Add handling __extension__ keyword for lvalue (#519)
YazZz1k Mar 22, 2024
670f30d
[CIR] Add MLIRCIREnumsGen as a dep to MLIRCIRInterfaces
lanza Apr 2, 2024
49b609b
[CIR] Introduce a flattening pass (#516)
gitoleg Apr 3, 2024
d18777b
[CIR] shufflevector and convertvector built-ins (#530)
dkolsen-pgi Apr 5, 2024
e58a597
[CIR][CIRGen] Add support for __atomic_add_fetch
bcardosolopes Apr 3, 2024
84851f8
[CIR] Add support for byteswap intrinsic (#523)
Lancern Apr 6, 2024
4b49152
[CIR] GNU vector type cleanup (#531)
dkolsen-pgi Apr 6, 2024
a853799
[CIR][CIRGen] Add support for other __atomic_{binop}_fetch
bcardosolopes Apr 8, 2024
8ba2142
[CIR][CIRGen] Add a verifier to catch binop_fetch's that do not suppo…
bcardosolopes Apr 8, 2024
eaea071
[CIR][CIRGen] Add support for __atomic_fetch_binop
bcardosolopes Apr 8, 2024
a5c9aca
[CIR][CIRGen] Add min/max atomic fetch variants
bcardosolopes Apr 8, 2024
7f4768b
[CIR][CIRGen] Add atomic load support
bcardosolopes Apr 9, 2024
459f6f5
[CIR][CIRGen] Add missing CIRGen for generic bit operation builtins (…
Lancern Apr 10, 2024
7804db0
[CIR][CIRGen] Add atomic store support
bcardosolopes Apr 10, 2024
ccd551b
[CIR][CIRGen] Add support for __attribute__((constructor))
bcardosolopes Apr 10, 2024
06cf3c3
[CIR][CIRGen][NFC] Rename globalCtor to global_ctor
bcardosolopes Apr 11, 2024
17c8db6
[CIR][CIRGen][NFC] More prep work before global dtors
bcardosolopes Apr 11, 2024
58b8bc7
[CIR][NFC] Fixup a few changes requested from upstream PRs
lanza Apr 11, 2024
90710ce
[CIR][NFC] Remove `SYSTEM` from MLIR include_directories calls
lanza Apr 11, 2024
a0e3c1c
[CIR][CIRGen] Add support for __attribute__((destructor))
bcardosolopes Apr 11, 2024
91685f8
[CIR][CIRGen][NFC] Simplify global ctor/dtor priority handling
bcardosolopes Apr 11, 2024
6233ee0
[CIR][CIRGen][NFC] Add more skeleton to VisitOpaqueValueExpr
bcardosolopes Apr 12, 2024
a1bc344
[CIR][CIRGen] Scalar handling for part of VisitOpaqueValueExpr
bcardosolopes Apr 12, 2024
906c314
[CIR][CIRGen] Add skeleton for AggExprEmitter::VisitCompoundLiteralExpr
bcardosolopes Apr 12, 2024
7865351
[CIR][CIRGen] Add more variations of compound literal support
bcardosolopes Apr 12, 2024
84ebc8c
[CIR][CIRGen] Add TLS codegen skeleton while building globals
bcardosolopes Apr 12, 2024
440f02e
[CIR][Codegen] IfOp flattening (#537)
gitoleg Apr 15, 2024
12fb4ed
[CIR] Add initial support for bit-precise integer types (#538)
Lancern Apr 15, 2024
7380a63
[CIR] Add TLS models to CIR and teach GlobalOp about them
bcardosolopes Apr 15, 2024
275f0e4
[CIR][CIRGen] Add initial __thread support
bcardosolopes Apr 15, 2024
267dd72
[CIR][CIRGen][LLVMLowering] Add support retrieving thread local globa…
bcardosolopes Apr 15, 2024
a53950f
[CIR][LLVMLowering] Lower cir.objectsize (#545)
ghehg Apr 16, 2024
62c6a86
[CIR][LLVMLowering] Fix handling of dense array conversions from cons…
bcardosolopes Apr 17, 2024
2db13d8
[CIR][Rebase] Stub out error handling for Pass option initialization
lanza Apr 17, 2024
730ffda
[CIR][CodeGen] Inline assembly: store the results (#512)
gitoleg Apr 17, 2024
8b4c7e0
Revert "[CIR][LLVMLowering] Lower cir.objectsize (#545)"
bcardosolopes Apr 17, 2024
5348562
Re-introduce [CIR][LLVMLowering] Lower cir.objectsize
bcardosolopes Apr 17, 2024
043f8dc
[CIR][NFC] Fix few compiler warnings
bcardosolopes Apr 17, 2024
7740a8d
[CIR][CodeGen] Flattening for ScopeOp and LoopOpInterface (#546)
gitoleg Apr 17, 2024
080f276
[CIR][Codegen] Fix union init with constant (#548)
gitoleg Apr 17, 2024
95e11a5
[CIR][CodeGen][Lowering] Support Integer overflow with fwrap (#539)
gitoleg Apr 17, 2024
4c07a3c
[CIR][CIRGen] Clean up call arrangement
bcardosolopes Apr 18, 2024
4361c2d
[CIR][CIRGen][NFC] Update atomic libcall skeleton to match upstream
bcardosolopes Apr 18, 2024
c1311f5
[CIR][CIRGen][NFC] Make createRuntimeFunction use proper function cre…
bcardosolopes Apr 18, 2024
dce1725
[CIR][CIRGen][NFC] Add entry points for later addition of more functi…
bcardosolopes Apr 18, 2024
c0061fc
[CIR][CIRGen][NFC] Update other remainig parts of buildAtomicExpr to …
bcardosolopes Apr 19, 2024
b5429f1
[CIR] Add `cir.dyn_cast` operation (#483)
Lancern Apr 19, 2024
73da668
[CIR][Codegen] TernaryOp flattening (#550)
gitoleg Apr 19, 2024
536d4c2
[CIR][CIRGen][NFC] Update buildPointerWithAlignment with LLVM upstrea…
bcardosolopes Apr 19, 2024
8daf005
[CIR] Add support for long double type (#536)
Lancern Apr 19, 2024
1c3cd0a
[CIR][CIRGen] Introduce initial support for ASTAllocaAddressSpace (#551)
orbiri Apr 19, 2024
9327912
[CIR] Introduce StructLayoutAttr
bcardosolopes Apr 20, 2024
8ef3b36
[CIR] Extend StructLayoutAttr to support querying offset for members
bcardosolopes Apr 20, 2024
9c305cb
[CIR][CodeGen] Adds SwitchOp flattening (#549)
gitoleg Apr 22, 2024
b51fcf7
[CIR][NFC] Improve verifier related error messages (#553)
gxsoar Apr 22, 2024
b64cb19
[CIR][NFC] Fix warnings, remove redudant comments and cleanup helpers
bcardosolopes Apr 22, 2024
5d9a961
[CIR][CIRGen][LLVMLowering] Support atomic exchange
bcardosolopes Apr 22, 2024
b61cf01
[CIR][CIRGen] Add support for more variations of __atomic_exchange
bcardosolopes Apr 23, 2024
77f4a0c
[CIR] Lower certain `cir.cmp3way` operations to LLVM intrinsics (#556)
Lancern Apr 23, 2024
da1dd0f
[CIR][CIRGen] Atomics: Add skeleton for compare and exchange
bcardosolopes Apr 23, 2024
68fe3ed
[CIR][CIRGen] Atomics: initial compare and exchange support
bcardosolopes Apr 24, 2024
9daae1b
[CIR][LLVMLowering][NFC] Refactor and share getLLVMAtomicOrder
bcardosolopes Apr 24, 2024
7402372
[CIR][CIRGen] Fix follow up stores for atomic loads
bcardosolopes Apr 25, 2024
96722f7
[CIR][CIRGen] Add dynamic builtin alloca intrinsics support (#547)
orbiri Apr 25, 2024
7cda6e9
[CIR[CIRGen][NFC] Refactor build switch op (#552)
wenpen Apr 25, 2024
116e184
[CIR][NFC] Create LLVM intrinsic calls through `createCallLLVMIntrins…
Lancern Apr 25, 2024
ded2fa7
[CIR][Lowering] Add MLIR lowering support for CIR cos operations (#565)
zhoujingya Apr 25, 2024
5718db5
[CIR] Remove redundant error from parseConstantValue (#567)
orbiri Apr 25, 2024
a1cb2c0
[CIR][CIRGen] Add more testcases for atomic xchg/cmp_xchg
bcardosolopes Apr 26, 2024
80f74eb
[CIR][CIRGen] Atomics: handle atomic_compare_exchange_strong
bcardosolopes Apr 26, 2024
26a5b07
[CIR][Lowering] Add long double types for cos operation lowering (#568)
zhoujingya Apr 26, 2024
67fa2b7
[CIR][CIRGen] Atomics: make cir.atomic.cmp_xchg a bit more lower level
bcardosolopes Apr 26, 2024
426233f
[CIR][CIRGen] Atomics: add one more testcase
bcardosolopes Apr 26, 2024
ccddaa4
[CIR][CIRGen] Atomics: improve docs and constraints
bcardosolopes Apr 26, 2024
e197d4e
[CIR][CodeGen] Fix a usage of volatile -> volatileQualified
lanza Apr 27, 2024
97b7280
[CIR] Support lowering GlobalOp and GetGlobalOp to memref (#574)
ShivaChen Apr 30, 2024
09c86ed
[CIR][NFC] Homogenize printing/parsing of CIR_PointerType (#575)
definelicht May 1, 2024
c9b4fdc
[CIR][OpenMP] Taskwait, Taskyield and Barrier implementation (#555)
eZWALT May 1, 2024
9da804f
[CIR][CIRGen][LLVMLowering] Initial support for GNU void* and func pt…
bcardosolopes May 1, 2024
35f6ea5
[CIR][LowerToLLVM][NFC] Refactor int cast creation
bcardosolopes May 2, 2024
bdfdb22
[CIR][LowerToLLVM] Generalize ptr_stride proper int casts
bcardosolopes May 2, 2024
64a6edb
[CIR][CIRGen][LowerToLLVM] Fix LLVM lowering for ptr arith extensions
bcardosolopes May 2, 2024
b361bbe
[CIR][CIRGen] One more variation of ptr arith extensions
bcardosolopes May 3, 2024
1efee91
[CIR][ThroughMLIR] Support lowering CastOp to arith (#577)
ShivaChen May 3, 2024
795925f
[CIR][LowerToLLVM] Fix ptrdiffs in face of !cir.void
bcardosolopes May 3, 2024
5961a8d
[CIR][Asm] Remove duplicated lambda & coroutine attributes (#580)
keryell May 3, 2024
f52e99e
[CIR][CIRGen] Add skeleton for AArch64 and x86/x86_64 builtin/instrin…
bcardosolopes May 3, 2024
981c976
[CIR] Remove redundant result type of cir.const operation (#581)
orbiri May 4, 2024
f9b1067
[CIR][CIRGen][LLVMLowering] Add support for checked arithmetic builti…
Lancern May 5, 2024
f690ca9
[CIR][NFC] remove redundant test in CIR/IR/data-member-ptr.cir (#582)
Lancern May 5, 2024
e00ad6d
[CIR][CIRGen][NFC] Builtins: update/modernize skeleton against upstream
bcardosolopes May 6, 2024
6a31da9
[CIR][CIRGen] Builtins: add rotate left/right
bcardosolopes May 6, 2024
a922dfe
[CIR][LowerToLLVM] Fix bug in ptr_stride lowering
bcardosolopes May 6, 2024
cc6e1b4
[CIR][LowerToLLVM][NFC] Fix warning
bcardosolopes May 6, 2024
5b418cd
[CIR][CIRGen][NFC] Atomics: add skeleton to support __c11_atomic_init
bcardosolopes May 6, 2024
05bfd13
[CIR][ThroughMLIR] Support lowering ptrStrideOp with loadOp or storeO…
ShivaChen May 7, 2024
7655c70
[CIR] Generate `cir.dyn_cast` for dynamic casts to void ptr (#557)
Lancern May 7, 2024
91a4e15
[CIR][CIRGen][NFCI] Atomics: more skeleton and helpers for c11 init
bcardosolopes May 8, 2024
185619e
[CIR][CodeGen] Goto pass (#562)
gitoleg May 8, 2024
e175549
[CIR][Transforms] Simplify redundant bitcasts (#591)
seven-mile May 8, 2024
cee2f1c
[CIR][Lowering] Add MLIR lowering support for CIR sin operations (#586)
GaoXiangYa May 8, 2024
0cd9250
[CIR][CIRGen] Atomics: add initial support for c11 init
bcardosolopes May 8, 2024
d92b583
[CIR][CIRGen] Add most simple form of __c11_atomic_fetch_{add,sub}
bcardosolopes May 8, 2024
3e4d5e6
[CIR][CIRGen][NFC] Cleanup buildIfOnBoolExpr
bcardosolopes May 9, 2024
e49fe27
[CIR][Lowering] Add MLIR lowering support for CIR math operations (#592)
GaoXiangYa May 9, 2024
b86fbc2
[CIR][CIRGen] Add VisitAbstractConditionalOperator aggregate edition
bcardosolopes May 9, 2024
3bb9130
[CIR][Tests] Update test to newer approach and remove XFAIL
bcardosolopes May 9, 2024
9f2ed31
[CIR][CIRGen] Add a missing union init scenario
bcardosolopes May 9, 2024
1c51447
[CIR][CIRGen] Implement VisitBinComma for aggregates
bcardosolopes May 9, 2024
33b67ca
[CIR][LowerToLLVM] Support pointer arithmetic for function types (#594)
PragmaTwice May 9, 2024
dfbe827
[CIR][CIRGen] Handle one more case of VisitCompoundLiteralExpr for ag…
bcardosolopes May 9, 2024
3bad644
[CIR][NFC] Move tests to more appropriate subdir
bcardosolopes May 9, 2024
43094d7
[CIR][CIRGen] Add CIRGen support for float16 and bfloat (#571)
Lancern May 14, 2024
3da10fa
[NFC] Remove empty file `clang/asf` (#607)
piggynl May 16, 2024
582df2a
[CIR][CIRGen] Support for dereferencing void pointers (#595)
PragmaTwice May 18, 2024
0d5d153
[CIR][IR] Fix FuncOp duplicate attr printing (#609)
sitio-couto May 18, 2024
ff44cfb
[NFC][CIR] Complete CIR check in test case ctor-member-lvalue-to-rval…
PragmaTwice May 18, 2024
dad7c84
[CIR][CIRGen] Fix compound assignment for vector types (#610)
seven-mile May 18, 2024
5730174
[CIR][CIRGen] Support for signed #cir.ptr (#598)
Laity000 May 18, 2024
1166bdb
[CIR][CIRGen][LowerToLLVM] Add address space attribute for pointer ty…
seven-mile May 20, 2024
632d7e0
[CIR][CIRGen][LLVMLowering] Vtable support for simple multiple inhert…
Laity000 May 21, 2024
e3b160f
[CIR][CIRGen] Add support for gnu range on switch stmts (#599)
wenpen May 21, 2024
e9719c6
[CIR] Move CIRDataLayout.h into include/clang/CIR/Dialect/IR (#621)
ghehg May 22, 2024
8e1e909
[CIR][CIRGen][NFC] More AArch64 builtins skeleton
bcardosolopes May 22, 2024
65bd5d9
[CIR][CIRGen][NFC] Update ReturnValueSlot according to upstream
bcardosolopes May 23, 2024
ab67854
[CIR][CIRGen] AArch64 builtins: add support for neon vld1/vst1
bcardosolopes May 23, 2024
ce56a3f
[CIR][CIRGen] Support CodeGen for structural bindings (#618)
PragmaTwice May 23, 2024
c2e22aa
[CIR][ThroughMLIR] Support lowering ForOp to scf (#605)
ShivaChen May 24, 2024
c3540b3
[CIR][CodeGen][Bugfix] fixes volatile structs copy (#623)
gitoleg May 24, 2024
c3efc60
[CIR][CodeGen][Bugfix] store fptr of a function with no args (#622)
gitoleg May 24, 2024
957c8d2
[CIR] Add -cir-mlir-scf-prepare to simplify lowering to SCF (#604)
ShivaChen May 24, 2024
32087eb
[CIR][CIRGen][NFC] Add optional alignment to cir.load and cir.store
bcardosolopes May 24, 2024
889eaa5
[CIR][LowerToLLVM] Forward or compute alignment for every store
bcardosolopes May 24, 2024
49609ae
[CIR][LowerToLLVM] Forward or compute alignment for loads
bcardosolopes May 24, 2024
8effbcc
[CIR][CodeGen] Support trailing_zeros for constant string literals (#…
ivanmurashko May 24, 2024
492242b
[CIR][IR][NFC] Fix CallOp builder with void return (#629)
sitio-couto May 28, 2024
b5f3862
[CIR][LowerToLLVM][CXXABI] Lower cir.va.arg (#573)
ghehg May 28, 2024
9e87cfc
[CIR][Lowering] Add MLIR lowering support for CIR shift operations (#…
May 29, 2024
eaae025
[CIR] Add C source code as comments in for.cir unit test (#625)
ShivaChen May 29, 2024
9fb9e7f
[CIR][CIRGen] Honor alignment on createAlignedLoad
bcardosolopes May 24, 2024
de5d468
[CIR][CIRGen] Honor alignment for createAlignedStore
bcardosolopes May 29, 2024
a37440d
[CIR][Passes] Add CallConvLowering pass skeleton (#642)
sitio-couto May 30, 2024
cda4ef5
[CIR][CIRGen] Add CIRGen for binary fp2fp builtin operations (#616)
Lancern May 30, 2024
e07b151
[CIR][Interface] introduce CIRGlobalValueInterface for GlobalOp and F…
ghehg May 31, 2024
5a0a234
[CIR][ThroughMLIR] lowering cir.bit.clz and cir.bit.ctz to MLIR (#645)
May 31, 2024
4ffa090
[CIR][CIRGen] Aarch64 Builtins: add more load/store variants
bcardosolopes May 29, 2024
e16048a
[CIR][CodeGen] Get rid of ZeroInitConstOp (#646)
ivanmurashko Jun 3, 2024
f4d538f
[CIR][Pipeline] Support -fclangir-analysis-only (#638)
ChuanqiXu9 Jun 3, 2024
fd7494c
[CIR][ThroughMLIR] lowering cir.bit.* to MLIR (#654)
Jun 3, 2024
ce0e60e
[CIR][CIRGen] Builtins: add __sync_fetch_and_add (#631)
gitoleg Jun 3, 2024
c8ba55b
[CIR] Centralize feature guarding (#649)
sitio-couto Jun 3, 2024
c23ea3d
[CIR][CIRGen] Add support for static decl initializer type mismatch
bcardosolopes Jun 5, 2024
4200ad0
[CIR] Add Case Op Kind Range (#650)
wenpen Jun 5, 2024
76613f6
[CIR][LLVMLowering] Add LLVM lowering for unary fp2fp builtins (#651)
Lancern Jun 5, 2024
2cb424c
[CIR][ABI] Create target lowering library skeleton (#643)
sitio-couto Jun 5, 2024
b61d6a7
[CIR][CIRGen] Handle empty structs on aggregates
bcardosolopes Jun 6, 2024
93282e0
[CIR][NFC] Fix multiple warnings from latest PRs
bcardosolopes Jun 6, 2024
a949a65
[CIR][CIRGen] Support OpenCL Vector Types (#613)
seven-mile Jun 6, 2024
7501afa
Revert "[CIR][Pipeline] Support -fclangir-analysis-only (#638)"
bcardosolopes Jun 6, 2024
59d969c
[CIR][CIRGen] Create a new block after break and continue (#611)
piggynl Jun 6, 2024
5b44dd7
[CIR][CIRGen][LowerToLLVM] Support address space casting (#652)
seven-mile Jun 6, 2024
76f7488
[CIR][CIRGen] Fix static init for unions
bcardosolopes Jun 7, 2024
6cc4973
[CIR][CodeGen] builtins: adds __sync_bool/val_compare_and_swap (#656)
gitoleg Jun 7, 2024
7c87502
[CIR][ThroughMLIR] Support lowering cir.condition and cir.while to sc…
GaoXiangYa Jun 7, 2024
4fcb3ac
[CIR][ThroughMLIR] Support lowering cir.if to scf.if (#640)
GaoXiangYa Jun 7, 2024
94cd19d
[CIR][Transforms] Fix flattening for TernaryOp to properly handle loc…
bcardosolopes Jun 7, 2024
9720c61
[CIR][LowerToLLVM] Fix crash in PtrStrideOp lowering
bcardosolopes Jun 8, 2024
1263383
[CIR][OpenMP] Implementation of critical directive
eZWALT Jun 10, 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:
- 'main'
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
2 changes: 1 addition & 1 deletion .github/workflows/pr-code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
code_formatter:
runs-on: ubuntu-latest
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.
8 changes: 7 additions & 1 deletion clang-tools-extra/clang-tidy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ add_clang_library(clangTidy
ClangSACheckers
omp_gen
ClangDriverOptions
)
)

clang_target_link_libraries(clangTidy
PRIVATE
Expand Down Expand Up @@ -77,6 +77,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 @@ -105,6 +108,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