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]Use unique ID to distinguish same name structure. #740

Open
wants to merge 1,671 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1671 commits
Select commit Hold shift + click to select a range
dcab399
[CIR][CIRGen] Emit more delete calls
bcardosolopes Mar 11, 2024
e07bb72
[CIR][CIRGen][NFC] Expand skeleton for constructing array types
bcardosolopes Mar 11, 2024
175af01
[CIR][Lowering] Add LLVMIR lowering support for CIR bit operations (#…
Lancern Mar 12, 2024
db668fb
[CIR][CIRGen] Enable support of bool increment (#493)
YazZz1k Mar 12, 2024
dca881d
[CIR][CIRGen] Inline asm: operand attributes (#491)
gitoleg Mar 12, 2024
b1aae3a
[CIR] Vector type cleanup and refactoring (#503)
dkolsen-pgi Mar 12, 2024
8c83f75
[CIR][Codegen][Lowering] Introduce new bitfield layout (#487)
gitoleg Mar 12, 2024
e50e95c
[CIR][CIRGen] Add support for ctor/dtor based array init/destroy
bcardosolopes Mar 12, 2024
69c8d94
[CIR][CIRGen] Lower C++ array init and destroy
bcardosolopes Mar 14, 2024
6ec946e
[CIR][LoweringPrepare] Add a missing store for current array idx
bcardosolopes Mar 14, 2024
dc0b5c2
[CIR][CIRGen][NFC] Skeleton for atomics support
bcardosolopes Mar 14, 2024
976c733
[CIR][CIRGen][Atomics][NFC] Skeleton for constant order codegen
bcardosolopes Mar 14, 2024
9b5356b
[CIR][Codegen] Initial support for packed structures (#473)
gitoleg Mar 15, 2024
7fd38c4
[CIR][CIRGen] Support for initialization of unions. (#495)
YazZz1k Mar 15, 2024
69fa22a
[CIR][CIRGen] Support for __builtin_prefetch (#504)
YazZz1k Mar 15, 2024
6e6fb5a
[CIR] Add MemRead/MemWrite markers to bitfield ops (#507)
gitoleg Mar 15, 2024
22488f5
[CIR][CIRGen] Support for __builtin_constant_p (#506)
YazZz1k Mar 15, 2024
f2aad7c
[CIR][CIRGen] Support for C++20 three-way comparison (#485)
Lancern Mar 19, 2024
92147b5
[CIR][Rebase] Add CountAttributed enum case in a switch
lanza Mar 21, 2024
0d0801d
[CIR][CIRGen] Support for compound literal lvalue (#515)
YazZz1k Mar 22, 2024
ebb4410
[CIR][CIRGen] Support for __attribute__((fallthrough)) statement (#517)
YazZz1k Mar 22, 2024
369c58e
[CIR][CIRGen] Add handling __extension__ keyword for lvalue (#519)
YazZz1k Mar 22, 2024
8bc923c
[CIR] Add MLIRCIREnumsGen as a dep to MLIRCIRInterfaces
lanza Apr 2, 2024
eb761ac
[CIR] Introduce a flattening pass (#516)
gitoleg Apr 3, 2024
fa89fc8
[CIR] shufflevector and convertvector built-ins (#530)
dkolsen-pgi Apr 5, 2024
45c885e
[CIR][CIRGen] Add support for __atomic_add_fetch
bcardosolopes Apr 3, 2024
85033ea
[CIR] Add support for byteswap intrinsic (#523)
Lancern Apr 6, 2024
29af8b4
[CIR] GNU vector type cleanup (#531)
dkolsen-pgi Apr 6, 2024
b9dd8d5
[CIR][CIRGen] Add support for other __atomic_{binop}_fetch
bcardosolopes Apr 8, 2024
6ee99cf
[CIR][CIRGen] Add a verifier to catch binop_fetch's that do not suppo…
bcardosolopes Apr 8, 2024
4ce4cd6
[CIR][CIRGen] Add support for __atomic_fetch_binop
bcardosolopes Apr 8, 2024
5b4f378
[CIR][CIRGen] Add min/max atomic fetch variants
bcardosolopes Apr 8, 2024
ade699b
[CIR][CIRGen] Add atomic load support
bcardosolopes Apr 9, 2024
bb81c2a
[CIR][CIRGen] Add missing CIRGen for generic bit operation builtins (…
Lancern Apr 10, 2024
db30f6a
[CIR][CIRGen] Add atomic store support
bcardosolopes Apr 10, 2024
f14daf8
[CIR][CIRGen] Add support for __attribute__((constructor))
bcardosolopes Apr 10, 2024
cce8de5
[CIR][CIRGen][NFC] Rename globalCtor to global_ctor
bcardosolopes Apr 11, 2024
738e202
[CIR][CIRGen][NFC] More prep work before global dtors
bcardosolopes Apr 11, 2024
3269b40
[CIR][NFC] Fixup a few changes requested from upstream PRs
lanza Apr 11, 2024
38b06c2
[CIR][NFC] Remove `SYSTEM` from MLIR include_directories calls
lanza Apr 11, 2024
6c94bbc
[CIR][CIRGen] Add support for __attribute__((destructor))
bcardosolopes Apr 11, 2024
0307999
[CIR][CIRGen][NFC] Simplify global ctor/dtor priority handling
bcardosolopes Apr 11, 2024
e5b5b78
[CIR][CIRGen][NFC] Add more skeleton to VisitOpaqueValueExpr
bcardosolopes Apr 12, 2024
e8bfd3a
[CIR][CIRGen] Scalar handling for part of VisitOpaqueValueExpr
bcardosolopes Apr 12, 2024
f769a94
[CIR][CIRGen] Add skeleton for AggExprEmitter::VisitCompoundLiteralExpr
bcardosolopes Apr 12, 2024
3179274
[CIR][CIRGen] Add more variations of compound literal support
bcardosolopes Apr 12, 2024
a3888e4
[CIR][CIRGen] Add TLS codegen skeleton while building globals
bcardosolopes Apr 12, 2024
1522f34
[CIR][Codegen] IfOp flattening (#537)
gitoleg Apr 15, 2024
677006d
[CIR] Add initial support for bit-precise integer types (#538)
Lancern Apr 15, 2024
b9cd5e8
[CIR] Add TLS models to CIR and teach GlobalOp about them
bcardosolopes Apr 15, 2024
a59a2e8
[CIR][CIRGen] Add initial __thread support
bcardosolopes Apr 15, 2024
ba7a2d4
[CIR][CIRGen][LLVMLowering] Add support retrieving thread local globa…
bcardosolopes Apr 15, 2024
bf6d34c
[CIR][LLVMLowering] Lower cir.objectsize (#545)
ghehg Apr 16, 2024
893e4e9
[CIR][LLVMLowering] Fix handling of dense array conversions from cons…
bcardosolopes Apr 17, 2024
ab16420
[CIR][Rebase] Stub out error handling for Pass option initialization
lanza Apr 17, 2024
0c2545b
[CIR][CodeGen] Inline assembly: store the results (#512)
gitoleg Apr 17, 2024
e3825c4
Revert "[CIR][LLVMLowering] Lower cir.objectsize (#545)"
bcardosolopes Apr 17, 2024
962ccf3
Re-introduce [CIR][LLVMLowering] Lower cir.objectsize
bcardosolopes Apr 17, 2024
4af84a7
[CIR][NFC] Fix few compiler warnings
bcardosolopes Apr 17, 2024
234dad2
[CIR][CodeGen] Flattening for ScopeOp and LoopOpInterface (#546)
gitoleg Apr 17, 2024
bceb2d0
[CIR][Codegen] Fix union init with constant (#548)
gitoleg Apr 17, 2024
3a16a15
[CIR][CodeGen][Lowering] Support Integer overflow with fwrap (#539)
gitoleg Apr 17, 2024
6d6845c
[CIR][CIRGen] Clean up call arrangement
bcardosolopes Apr 18, 2024
f471b6f
[CIR][CIRGen][NFC] Update atomic libcall skeleton to match upstream
bcardosolopes Apr 18, 2024
368f286
[CIR][CIRGen][NFC] Make createRuntimeFunction use proper function cre…
bcardosolopes Apr 18, 2024
d4a3d65
[CIR][CIRGen][NFC] Add entry points for later addition of more functi…
bcardosolopes Apr 18, 2024
21dfa67
[CIR][CIRGen][NFC] Update other remainig parts of buildAtomicExpr to …
bcardosolopes Apr 19, 2024
ab3c3a9
[CIR] Add `cir.dyn_cast` operation (#483)
Lancern Apr 19, 2024
e6aeec4
[CIR][Codegen] TernaryOp flattening (#550)
gitoleg Apr 19, 2024
379ed92
[CIR][CIRGen][NFC] Update buildPointerWithAlignment with LLVM upstrea…
bcardosolopes Apr 19, 2024
1f7eb76
[CIR] Add support for long double type (#536)
Lancern Apr 19, 2024
3b160a6
[CIR][CIRGen] Introduce initial support for ASTAllocaAddressSpace (#551)
orbiri Apr 19, 2024
02712dc
[CIR] Introduce StructLayoutAttr
bcardosolopes Apr 20, 2024
f9eeec4
[CIR] Extend StructLayoutAttr to support querying offset for members
bcardosolopes Apr 20, 2024
e34e7da
[CIR][CodeGen] Adds SwitchOp flattening (#549)
gitoleg Apr 22, 2024
e2cba82
[CIR][NFC] Improve verifier related error messages (#553)
gxsoar Apr 22, 2024
c4c804b
[CIR][NFC] Fix warnings, remove redudant comments and cleanup helpers
bcardosolopes Apr 22, 2024
79fc1d2
[CIR][CIRGen][LLVMLowering] Support atomic exchange
bcardosolopes Apr 22, 2024
1554404
[CIR][CIRGen] Add support for more variations of __atomic_exchange
bcardosolopes Apr 23, 2024
725cceb
[CIR] Lower certain `cir.cmp3way` operations to LLVM intrinsics (#556)
Lancern Apr 23, 2024
ea88717
[CIR][CIRGen] Atomics: Add skeleton for compare and exchange
bcardosolopes Apr 23, 2024
a93d3da
[CIR][CIRGen] Atomics: initial compare and exchange support
bcardosolopes Apr 24, 2024
019ec5f
[CIR][LLVMLowering][NFC] Refactor and share getLLVMAtomicOrder
bcardosolopes Apr 24, 2024
879b425
[CIR][CIRGen] Fix follow up stores for atomic loads
bcardosolopes Apr 25, 2024
7ced971
[CIR][CIRGen] Add dynamic builtin alloca intrinsics support (#547)
orbiri Apr 25, 2024
adc96e8
[CIR[CIRGen][NFC] Refactor build switch op (#552)
wenpen Apr 25, 2024
b1f7552
[CIR][NFC] Create LLVM intrinsic calls through `createCallLLVMIntrins…
Lancern Apr 25, 2024
669dd94
[CIR][Lowering] Add MLIR lowering support for CIR cos operations (#565)
zhoujingya Apr 25, 2024
72607a6
[CIR] Remove redundant error from parseConstantValue (#567)
orbiri Apr 25, 2024
0dfb610
[CIR][CIRGen] Add more testcases for atomic xchg/cmp_xchg
bcardosolopes Apr 26, 2024
e88c6f9
[CIR][CIRGen] Atomics: handle atomic_compare_exchange_strong
bcardosolopes Apr 26, 2024
9a4c3fa
[CIR][Lowering] Add long double types for cos operation lowering (#568)
zhoujingya Apr 26, 2024
b8f31ad
[CIR][CIRGen] Atomics: make cir.atomic.cmp_xchg a bit more lower level
bcardosolopes Apr 26, 2024
66dd1cd
[CIR][CIRGen] Atomics: add one more testcase
bcardosolopes Apr 26, 2024
f76b129
[CIR][CIRGen] Atomics: improve docs and constraints
bcardosolopes Apr 26, 2024
37d5011
[CIR][CodeGen] Fix a usage of volatile -> volatileQualified
lanza Apr 27, 2024
6afddce
[CIR] Support lowering GlobalOp and GetGlobalOp to memref (#574)
ShivaChen Apr 30, 2024
edf67cc
[CIR][NFC] Homogenize printing/parsing of CIR_PointerType (#575)
definelicht May 1, 2024
f943ce9
[CIR][OpenMP] Taskwait, Taskyield and Barrier implementation (#555)
eZWALT May 1, 2024
8a0cf8b
[CIR][CIRGen][LLVMLowering] Initial support for GNU void* and func pt…
bcardosolopes May 1, 2024
e43f117
[CIR][LowerToLLVM][NFC] Refactor int cast creation
bcardosolopes May 2, 2024
42fedf5
[CIR][LowerToLLVM] Generalize ptr_stride proper int casts
bcardosolopes May 2, 2024
5c79851
[CIR][CIRGen][LowerToLLVM] Fix LLVM lowering for ptr arith extensions
bcardosolopes May 2, 2024
37ffed7
[CIR][CIRGen] One more variation of ptr arith extensions
bcardosolopes May 3, 2024
b28b8f3
[CIR][ThroughMLIR] Support lowering CastOp to arith (#577)
ShivaChen May 3, 2024
77d4443
[CIR][LowerToLLVM] Fix ptrdiffs in face of !cir.void
bcardosolopes May 3, 2024
7772edd
[CIR][Asm] Remove duplicated lambda & coroutine attributes (#580)
keryell May 3, 2024
2e2330c
[CIR][CIRGen] Add skeleton for AArch64 and x86/x86_64 builtin/instrin…
bcardosolopes May 3, 2024
77667c6
[CIR] Remove redundant result type of cir.const operation (#581)
orbiri May 4, 2024
9d546ee
[CIR][CIRGen][LLVMLowering] Add support for checked arithmetic builti…
Lancern May 5, 2024
95de0e3
[CIR][NFC] remove redundant test in CIR/IR/data-member-ptr.cir (#582)
Lancern May 5, 2024
3552afe
[CIR][CIRGen][NFC] Builtins: update/modernize skeleton against upstream
bcardosolopes May 6, 2024
5584519
[CIR][CIRGen] Builtins: add rotate left/right
bcardosolopes May 6, 2024
46365b5
[CIR][LowerToLLVM] Fix bug in ptr_stride lowering
bcardosolopes May 6, 2024
229a181
[CIR][LowerToLLVM][NFC] Fix warning
bcardosolopes May 6, 2024
10a96f0
[CIR][CIRGen][NFC] Atomics: add skeleton to support __c11_atomic_init
bcardosolopes May 6, 2024
c69b540
[CIR][ThroughMLIR] Support lowering ptrStrideOp with loadOp or storeO…
ShivaChen May 7, 2024
c037450
[CIR] Generate `cir.dyn_cast` for dynamic casts to void ptr (#557)
Lancern May 7, 2024
7030e22
[CIR][CIRGen][NFCI] Atomics: more skeleton and helpers for c11 init
bcardosolopes May 8, 2024
1490110
[CIR][CodeGen] Goto pass (#562)
gitoleg May 8, 2024
2d9bb28
[CIR][Transforms] Simplify redundant bitcasts (#591)
seven-mile May 8, 2024
0d6d368
[CIR][Lowering] Add MLIR lowering support for CIR sin operations (#586)
GaoXiangYa May 8, 2024
defd37f
[CIR][CIRGen] Atomics: add initial support for c11 init
bcardosolopes May 8, 2024
ea47023
[CIR][CIRGen] Add most simple form of __c11_atomic_fetch_{add,sub}
bcardosolopes May 8, 2024
42f7889
[CIR][CIRGen][NFC] Cleanup buildIfOnBoolExpr
bcardosolopes May 9, 2024
75d3051
[CIR][Lowering] Add MLIR lowering support for CIR math operations (#592)
GaoXiangYa May 9, 2024
96290cf
[CIR][CIRGen] Add VisitAbstractConditionalOperator aggregate edition
bcardosolopes May 9, 2024
0f36cd5
[CIR][Tests] Update test to newer approach and remove XFAIL
bcardosolopes May 9, 2024
1a50e60
[CIR][CIRGen] Add a missing union init scenario
bcardosolopes May 9, 2024
4fac774
[CIR][CIRGen] Implement VisitBinComma for aggregates
bcardosolopes May 9, 2024
4a0c2b1
[CIR][LowerToLLVM] Support pointer arithmetic for function types (#594)
PragmaTwice May 9, 2024
dc1c2ee
[CIR][CIRGen] Handle one more case of VisitCompoundLiteralExpr for ag…
bcardosolopes May 9, 2024
ab42b3b
[CIR][NFC] Move tests to more appropriate subdir
bcardosolopes May 9, 2024
a0aa2c9
[CIR][CIRGen] Add CIRGen support for float16 and bfloat (#571)
Lancern May 14, 2024
85029c8
[NFC] Remove empty file `clang/asf` (#607)
piggynl May 16, 2024
d188c48
[CIR][CIRGen] Support for dereferencing void pointers (#595)
PragmaTwice May 18, 2024
e1e8c7c
[CIR][IR] Fix FuncOp duplicate attr printing (#609)
sitio-couto May 18, 2024
82df489
[NFC][CIR] Complete CIR check in test case ctor-member-lvalue-to-rval…
PragmaTwice May 18, 2024
413c7d9
[CIR][CIRGen] Fix compound assignment for vector types (#610)
seven-mile May 18, 2024
06ed80a
[CIR][CIRGen] Support for signed #cir.ptr (#598)
Laity000 May 18, 2024
1bf48dc
[CIR][CIRGen][LowerToLLVM] Add address space attribute for pointer ty…
seven-mile May 20, 2024
750a85d
[CIR][CIRGen][LLVMLowering] Vtable support for simple multiple inhert…
Laity000 May 21, 2024
1c97f43
[CIR][CIRGen] Add support for gnu range on switch stmts (#599)
wenpen May 21, 2024
c8a78c0
[CIR] Move CIRDataLayout.h into include/clang/CIR/Dialect/IR (#621)
ghehg May 22, 2024
4bc6869
[CIR][CIRGen][NFC] More AArch64 builtins skeleton
bcardosolopes May 22, 2024
5991025
[CIR][CIRGen][NFC] Update ReturnValueSlot according to upstream
bcardosolopes May 23, 2024
7106b6c
[CIR][CIRGen] AArch64 builtins: add support for neon vld1/vst1
bcardosolopes May 23, 2024
d3300d1
[CIR][CIRGen] Support CodeGen for structural bindings (#618)
PragmaTwice May 23, 2024
a39b03a
[CIR][ThroughMLIR] Support lowering ForOp to scf (#605)
ShivaChen May 24, 2024
b14af05
[CIR][CodeGen][Bugfix] fixes volatile structs copy (#623)
gitoleg May 24, 2024
660a107
[CIR][CodeGen][Bugfix] store fptr of a function with no args (#622)
gitoleg May 24, 2024
5e17546
[CIR] Add -cir-mlir-scf-prepare to simplify lowering to SCF (#604)
ShivaChen May 24, 2024
a3443eb
[CIR][CIRGen][NFC] Add optional alignment to cir.load and cir.store
bcardosolopes May 24, 2024
0f4b576
[CIR][LowerToLLVM] Forward or compute alignment for every store
bcardosolopes May 24, 2024
df40a4c
[CIR][LowerToLLVM] Forward or compute alignment for loads
bcardosolopes May 24, 2024
8c4672e
[CIR][CodeGen] Support trailing_zeros for constant string literals (#…
ivanmurashko May 24, 2024
db2fa4a
[CIR][IR][NFC] Fix CallOp builder with void return (#629)
sitio-couto May 28, 2024
eba61e7
[CIR][LowerToLLVM][CXXABI] Lower cir.va.arg (#573)
ghehg May 28, 2024
0143d85
[CIR][Lowering] Add MLIR lowering support for CIR shift operations (#…
May 29, 2024
0dbc613
[CIR] Add C source code as comments in for.cir unit test (#625)
ShivaChen May 29, 2024
51b75c9
[CIR][CIRGen] Honor alignment on createAlignedLoad
bcardosolopes May 24, 2024
0fd79f8
[CIR][CIRGen] Honor alignment for createAlignedStore
bcardosolopes May 29, 2024
38f843c
[CIR][Passes] Add CallConvLowering pass skeleton (#642)
sitio-couto May 30, 2024
d73a8b2
[CIR][CIRGen] Add CIRGen for binary fp2fp builtin operations (#616)
Lancern May 30, 2024
625ccde
[CIR][Interface] introduce CIRGlobalValueInterface for GlobalOp and F…
ghehg May 31, 2024
312ab42
[CIR][ThroughMLIR] lowering cir.bit.clz and cir.bit.ctz to MLIR (#645)
May 31, 2024
fb8ab48
[CIR][CIRGen] Aarch64 Builtins: add more load/store variants
bcardosolopes May 29, 2024
ed6098b
[CIR][CodeGen] Get rid of ZeroInitConstOp (#646)
ivanmurashko Jun 3, 2024
1f942c2
[CIR][Pipeline] Support -fclangir-analysis-only (#638)
ChuanqiXu9 Jun 3, 2024
331154b
[CIR][ThroughMLIR] lowering cir.bit.* to MLIR (#654)
Jun 3, 2024
d1ddc58
[CIR][CIRGen] Builtins: add __sync_fetch_and_add (#631)
gitoleg Jun 3, 2024
03f0c48
[CIR] Centralize feature guarding (#649)
sitio-couto Jun 3, 2024
83bbfb5
[CIR][CIRGen] Add support for static decl initializer type mismatch
bcardosolopes Jun 5, 2024
43c5c4f
[CIR] Add Case Op Kind Range (#650)
wenpen Jun 5, 2024
bf7ccd0
[CIR][LLVMLowering] Add LLVM lowering for unary fp2fp builtins (#651)
Lancern Jun 5, 2024
680dca5
[CIR][ABI] Create target lowering library skeleton (#643)
sitio-couto Jun 5, 2024
20dc8aa
[CIR][CIRGen] Handle empty structs on aggregates
bcardosolopes Jun 6, 2024
ae487ec
[CIR][NFC] Fix multiple warnings from latest PRs
bcardosolopes Jun 6, 2024
c04acc8
[CIR][CIRGen] Support OpenCL Vector Types (#613)
seven-mile Jun 6, 2024
94dddc2
Revert "[CIR][Pipeline] Support -fclangir-analysis-only (#638)"
bcardosolopes Jun 6, 2024
4bdb41b
[CIR][CIRGen] Create a new block after break and continue (#611)
piggynl Jun 6, 2024
6ea568e
[CIR][CIRGen][LowerToLLVM] Support address space casting (#652)
seven-mile Jun 6, 2024
9d708fa
[CIR][CIRGen] Fix static init for unions
bcardosolopes Jun 7, 2024
45b8509
[CIR][CodeGen] builtins: adds __sync_bool/val_compare_and_swap (#656)
gitoleg Jun 7, 2024
3d83a59
[CIR][ThroughMLIR] Support lowering cir.condition and cir.while to sc…
GaoXiangYa Jun 7, 2024
b0243d2
[CIR][ThroughMLIR] Support lowering cir.if to scf.if (#640)
GaoXiangYa Jun 7, 2024
7b55d12
[CIR][Transforms] Fix flattening for TernaryOp to properly handle loc…
bcardosolopes Jun 7, 2024
f83b516
[CIR][LowerToLLVM] Fix crash in PtrStrideOp lowering
bcardosolopes Jun 8, 2024
b1594b6
[CIR][LowerToLLVM][CXXABI] Fix basic block ordering issue. (#676)
ghehg Jun 10, 2024
9cf6e57
[CIR][CodeGen] Special treatment of 3-element extended vector load an…
seven-mile Jun 11, 2024
4c8a306
[CIR][ABI][NFC] Add CC lowering for void CallOps (#668)
sitio-couto Jun 11, 2024
8a8f201
[CIR][ABI][NFC] Add CC lowering for void FuncOps (#678)
sitio-couto Jun 11, 2024
82267a4
[CIR][CodeGen] Support side effects in address space casting (#673)
seven-mile Jun 12, 2024
4959834
[CIR][Transforms] Move RemoveRedundantBranches logic into BrOp::fold …
Jun 13, 2024
1e3bcb8
[CIR][ThroughMLIR] Fix FuncOp for functions with pointer arguments. (…
Jun 13, 2024
17f2f00
[CIR] Add FuncAttrs to cir.calls (#637)
roro47 Jun 13, 2024
a77fa2e
[CIR][ThroughMLIR] lowering cir.vec.create, extract, insert op to MLI…
Jun 14, 2024
1b6a0f9
[CIR][LLVMLowering] Add LLVM lowering for data member pointers (#612)
Lancern Jun 17, 2024
fbc5268
Revert "[CIR][ABI][NFC] Add CC lowering for void FuncOps (#678)"
bcardosolopes Jun 17, 2024
8fc4de9
Revert "[CIR][ABI][NFC] Add CC lowering for void CallOps (#668)"
bcardosolopes Jun 17, 2024
1f9cdc5
[CIR][CIRDataLayout]moving CIRDataLayout to MLIRCIR (#693)
ghehg Jun 18, 2024
361107d
[CIR][ABI] Replay TargetLowering library reverted commits (#697)
sitio-couto Jun 20, 2024
c4cdf0b
[CIR] Add support for unary fp2int builtins (#669)
Lancern Jun 20, 2024
eb98122
[CIR][CodeGen] Basic skeleton of SPIRV64 target support (#671)
seven-mile Jun 20, 2024
4afea73
[CIR] Update region-simplify usage to enum value
lanza Jun 21, 2024
622346f
[CIR] Fix erroneous flag passed to cc1 in a test invocation
lanza Jun 21, 2024
42fe769
[CIR][Lowering] Add missing dep
lanza Jun 21, 2024
422ddbb
[CIR] Account for changes to gep lowering that now uses i64
lanza Jun 21, 2024
9ea95d4
[CIR] Account for change to clang behavior to emit ZdlPvm instead of …
lanza Jun 21, 2024
9dbce79
[CIR][ThroughMLIR] fix BinOp, CmpOp Lowering to MLIR and lowering cir…
Kritoooo Jun 20, 2024
c290c04
[CIR][CodeGen] Fix missing 'nsw' flag in add, sub, and mul in binop o…
mingshi2333 Jun 20, 2024
2dd4609
[CIR][Rebase] Fix aarch64-neon-intrinsics.c issue
bcardosolopes Jun 22, 2024
c289083
[CIR][ABI][NFC] Prime AArch64 CC lowering (#679)
sitio-couto Jun 22, 2024
d2f2fde
[CIR][CIRGen] Add dsolocal attribute to GlobalOp and FuncOp (#686)
ghehg Jun 25, 2024
d5f48dc
[CIR][NFC] Replace uses of isa/dyn_cast/cast/... member functions (#703)
jopperm Jun 26, 2024
8d549af
[CIR] Refactor TryCallOp creation (#704)
roro47 Jun 27, 2024
9427412
[CIR][Dialect] Make addrspace in pointer types to model LangAS (#692)
seven-mile Jun 27, 2024
b41d427
[CIR][ABI] Add unsigned int CC lowering for x86_64 (#701)
sitio-couto Jun 30, 2024
d999c53
[CIR] Vector constants (#700)
dkolsen-pgi Jul 1, 2024
c2ed2c4
[CIR][NFC] Fix bug during fp16 unary op CIRGen (#706)
Lancern Jul 1, 2024
807b1aa
[CIR][ABI] Add AArch64 unsigned int CC lowering (#708)
sitio-couto Jul 2, 2024
f907c42
[CIR][CIRGen] Add setNonAliasAttributes for GlobalOp and FuncOp (#707)
ghehg Jul 2, 2024
212e7ee
[CIR][CIRGen] Resolve more calls to member functions (#715)
ghehg Jul 2, 2024
c8891bd
[CIR][CIRGen] Add support for exact dynamic cast (#709)
Lancern Jul 2, 2024
a9eb565
[CIR][LLVMLowering] Add LLVM lowering support for _Float16 (#716)
Lancern Jul 2, 2024
05f3834
[CIR][ABI][NFC] Add missing x86-64 signed int CC lowering tests (#713)
sitio-couto Jul 2, 2024
89bf895
[CIR][LLVMLowering] Add LLVM lowering for __bf16 (#717)
Lancern Jul 3, 2024
f7c508c
[CIR][NFC] Don't enforce deprecated API check on MSVC (#718)
jopperm Jul 3, 2024
ec94476
[CIR][CIRGen] Add complex type and its CIRGen support (#513)
Lancern Jul 3, 2024
5acd73c
[CIR][CIRGen] Defer template printing to existing machinery
bcardosolopes Jul 3, 2024
d486bad
[CIR][CIRGen] Add support for operator new with null checks
bcardosolopes Jul 4, 2024
3284442
[CIR][CIRGen] Builtins: Lower __builtin___clear_cache to CIR
bcardosolopes Jul 8, 2024
06026aa
[CIR][LowerToLLVM] Builtins: Lower cir.clear_cache to LLVM
bcardosolopes Jul 8, 2024
f7059c7
[CIR][ThroughMLIR] Fix floating GlobalOp lowering without initialized…
ShivaChen Jul 8, 2024
5792eb0
Revert "[CIR][Transforms] Move RemoveRedundantBranches logic into BrO…
bcardosolopes Jul 8, 2024
58d5f0b
[CIR] Fix for __atomic_compare_exchange weak arg (#721)
dkolsen-pgi Jul 9, 2024
80e1a10
[CIR][LLVMLowering] Add LLVM lowering for complex operations (#723)
Lancern Jul 9, 2024
7c4d03a
[CIR][NFC] Fix bug in MLIR lowering of cir.call (#728)
Lancern Jul 10, 2024
2710188
[CIR][Dialect] Emit OpenCL kernel metadata (#705)
seven-mile Jul 10, 2024
c849210
[CIR] Extend -cir-mlir-scf-prepare to support hoisting loop invariant…
ShivaChen Jul 10, 2024
dd9353b
[CIR][ThroughMLIR] Lower CIR IV load with SCF IV move operation (#729)
ShivaChen Jul 10, 2024
c1e7b87
[CIR][Fix] FP builtins should lower directly to LLVM builtins (#670)
Lancern Jul 11, 2024
965a3bc
[CIR][Lowering] Exceptions: Add support for flattening cir.try
bcardosolopes Jul 12, 2024
42a4292
[CIR][NFCI] cir.try: improve docs and be more flexible on the region
bcardosolopes Jul 12, 2024
96b0628
[CIR][IR] Fix parsing of dsolocal in cir.func (#732)
ghehg Jul 12, 2024
fa1e9b5
[CIR][ABI][NFC] AppleARM64 CXXABI handling in TargetLowering library …
seven-mile Jul 12, 2024
d6005d1
[CIR][ABI][NFC] Make `createLowerModule` public (#734)
seven-mile Jul 12, 2024
5d9732a
[CIR][CIRGen] More on dsolocal: visibility improvements (#735)
ghehg Jul 12, 2024
b365964
[CIR][CIRGen] cir.try: handle trivial ones and fix crash
bcardosolopes Jul 13, 2024
81ee3d5
Use unique ID to distinguish same name structure.
566hub Jul 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:
- '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