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] Check CLANG_ENABLE_CIR is actually enabled when using CIR #888

Open
wants to merge 1,876 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1876 commits
Select commit Hold shift + click to select a range
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
dafb6eb
[CIR][Dialect] Add minimal definitions of unified address space `offl…
seven-mile Jul 15, 2024
a944884
[CIR] Atomic builtins with non-const memory order (#736)
dkolsen-pgi Jul 15, 2024
dc9f39d
[CIR] Add support and enable MLIR's mem2reg for flat CIR (#659)
gitoleg Jul 17, 2024
c114152
[CIR] Add support for binary arithmetic operations on complex numbers…
Lancern Jul 17, 2024
8adfe26
[CIR][Transforms][TargetLowering][NFC] Add SPIR-V skeleton (#737)
seven-mile Jul 17, 2024
48196fd
[CIR] Add MLIR visibility for weak and weak_odr linkage (#744)
roro47 Jul 17, 2024
b7ff719
[CIR][DirectToLLVM][NFC] Add include of target lowering library to Di…
seven-mile Jul 17, 2024
a1c3cc5
[CIR][Builder][NFC] Refactor `getPointerTo` considering AddressSpaceA…
seven-mile Jul 17, 2024
3e00be7
[CIR][CodeGen][NFC] Refactor `performAddrSpaceCast` to consume CIR ad…
seven-mile Jul 18, 2024
4ea2ec3
[CIR] Add support for complex related intrinsics (#748)
Lancern Jul 18, 2024
7fc592a
[CIR][CIRGen][NFC] Exceptions: redesign cir.catch in terms of cir.try
bcardosolopes Jul 23, 2024
4a9df20
[CIR] Add support for unary complex operations (#750)
Lancern Jul 23, 2024
d573a0b
[CIR][CIRGen][NFC] Exceptions: Remove cir.try in favor of cir.call ex…
bcardosolopes Jul 24, 2024
4d16080
[CIR][CIRGen][NFC] Exceptions: tide up lexical scope information needed
bcardosolopes Jul 24, 2024
600e7f6
[CIR][CIRGen][NFC] Exceptions: remove exception ptr alloca, not used …
bcardosolopes Jul 24, 2024
d047947
[CIR][CIRGen][FlattenCFG] Exceptions: incremental work for handling c…
bcardosolopes Jul 24, 2024
3a64b24
[CIR][CIRGen][FlattenCFG] Exceptions: introduce cir.eh.selector
bcardosolopes Jul 24, 2024
0f94033
[CIR][Transforms][NFC] Use `unique_ptr` to encapsulate LowerModule (#…
seven-mile Jul 25, 2024
49941e2
[CIR][Lowering][NFC] Move helper functions to LoweringHelpers.cpp (#754)
ShivaChen Jul 25, 2024
9eb0d8c
[CIR][FlattenCFG] Exceptions: handle type and unwind cases
bcardosolopes Jul 24, 2024
c5abf55
[CIR][NFC] Tide up exception test a bit
bcardosolopes Jul 26, 2024
c7e7b19
[CIR][ABI] Add X86_64 float and double CC lowering (#714)
sitio-couto Jul 26, 2024
c72f8ff
[CIR][NFC] Exceptions: re-introduce cir.try_call (skeleton), now with…
bcardosolopes Jul 26, 2024
9b9c653
[CIR][CIRGen] Add comdat support, enabling more dso_local and comdat …
ghehg Jul 26, 2024
9445acc
[CIR][CodeGen][LowerToLLVM] End-to-end implementation of `offload_*` …
seven-mile Jul 26, 2024
c646aa5
[CIR][FlattenCFG][NFC] Factor out try body emission
bcardosolopes Jul 26, 2024
e39d270
[CIR][FlattenCFG] Exceptions: lower call to try_call and wire up land…
bcardosolopes Jul 27, 2024
5c067d1
[CIR][FlattenCFG] Exceptions: add support for catch all
bcardosolopes Jul 27, 2024
e290bc0
[CIR][FlattenCFG] Exceptions: move cir.eh.selector up to dominate mor…
bcardosolopes Jul 27, 2024
2b2e9e3
[CIR][FlattenCFG] Exceptions: support catch all only try's
bcardosolopes Jul 27, 2024
eefdc8f
[CIR][ABI] Add X86_64 and AArch64 bool CC lowering (#755)
sitio-couto Jul 29, 2024
e595f9b
[CIR][NFC] Exceptions: use a pointer for an opaque exception type ins…
bcardosolopes Jul 29, 2024
eeddae2
[CIR][FlattenCFG] Exceptions: use block arguments to pass down selector
bcardosolopes Jul 29, 2024
b8281ef
[CIR][FlattenCFG] Exceptions: simplify selector/slot a bit further
bcardosolopes Jul 29, 2024
2aba30e
[CIR][FlattenCFG] Exceptions: extend 'cir.catch_param' to cover more …
bcardosolopes Jul 29, 2024
5a1ca85
[CIR][ABI] Add AArch64 singed integer and floating point CC lowering …
sitio-couto Jul 30, 2024
361354b
[CIR][FlattenCFG] Exceptions: track type symbols in cir.eh.inflight_e…
bcardosolopes Jul 30, 2024
9e5b891
[CIR][LowerToLLVM][NFC] Refactor CallOp in prep for TryCall lowering
bcardosolopes Jul 31, 2024
18f5db6
[CIR][LowerToLLVM] Exceptions: lower cir.try_call to llvm's invoke
bcardosolopes Jul 31, 2024
7150a05
[CIR][LowerToLLVM][NFC] Fix formatting error and add skeleton for EhI…
bcardosolopes Jul 31, 2024
a4aa65b
[CIR][LowerToLLVM] Exceptions: more lowering work for `cir.try_call` …
bcardosolopes Jul 31, 2024
a3c126c
[CIR][LowerToLLVM] Exceptions: lower cir.eh.typeid
bcardosolopes Jul 31, 2024
07a6f80
[CIR][LowerToLLVM] Exceptions: lower cir.catch_param
bcardosolopes Jul 31, 2024
b99d471
[CIR][NFC] Fix few unused vars and tablegen format
bcardosolopes Jul 31, 2024
821534c
[CIR][CodeGen][Lowering] Better handling of alloca address space with…
seven-mile Aug 1, 2024
cc01a56
[CIR][ThroughMLIR] Lowering cir.do to scf.while,and fix cir.while low…
GaoXiangYa Aug 1, 2024
1674254
[CIR][CIRGen] Add CIRGen for scalar co_yield expression (#761)
Lancern Aug 1, 2024
79acb05
[CIR] CIRGen for bit cast builtin (#762)
Lancern Aug 1, 2024
13ed46a
[CIR][ABI][NFCI] Enable SPIR-V return value and argument ABI to use D…
seven-mile Aug 1, 2024
c8b2aed
[CIR][LowerToLLVM][NFC] Refactor `amendOperation` to dispatch differe…
seven-mile Aug 2, 2024
f9f0970
[CIR][Dialect] Emit OpenCL kernel argument metadata (#767)
seven-mile Aug 2, 2024
53f9d44
[CIR][Dialect][Lowering] Add calling convention attribute to FuncOp (…
seven-mile Aug 2, 2024
e136285
[CIR][ThroughMLIR] Support array type GlobalOp lowering with initial …
ShivaChen Aug 2, 2024
38c1348
[CIR][LowerToLLVM][NFC] Add data layout verification of alloca as (#769)
seven-mile Aug 7, 2024
14aca60
[CIR][CodeGen][NFC] Replace the calling convention in CodeGen with th…
seven-mile Aug 7, 2024
83d5272
[CIR][Dialect] Add OpenCL C language in cir.lang (#774)
seven-mile Aug 7, 2024
e288169
[CIR][FlattenCFG][LowerToLLVM] Exceptions: lower cir.resume
bcardosolopes Aug 7, 2024
b6e5f0d
[CIR] Introduce CIR simplification (#696)
gitoleg Aug 7, 2024
5292a04
[CIR][NFC] Cleanup whitespaces
bcardosolopes Aug 7, 2024
12794b3
[CIR][NFC] Fix warnings post rebase + from PRs
bcardosolopes Aug 7, 2024
6d069d3
[CIR] Add support for complex cast operations (#758)
Lancern Aug 8, 2024
ccac403
[CIR][CodeGen][LowerToLLVM] Emit OpenCL version metadata for SPIR-V t…
seven-mile Aug 8, 2024
1dfe2f0
[CIR][Transforms] Add folders for complex operations (#775)
Lancern Aug 8, 2024
66fe871
[CIR][CodeGen][NFCI] Target-independent ABI handling for SpirKernel c…
seven-mile Aug 8, 2024
1be8c1f
[CIR][Dialect] Add address space attribute to global op (#779)
seven-mile Aug 8, 2024
bb4b715
[CIR][CIRGen][NFC] Tide up cir.alloc.exception
bcardosolopes Aug 8, 2024
9cccb01
[CIR][LowerToLLVM] Exceptions: lower cir.alloc.exception
bcardosolopes Aug 8, 2024
eda60d8
[CIR][LowerToLLVM] Exceptions: lower cir.throw
bcardosolopes Aug 9, 2024
4de1376
[CIR][CodeGen] Set CIR function calling conventions (#780)
seven-mile Aug 9, 2024
2000077
[CIR][CodeGen][Dialect][NFC] Refactor OpenCL stuff to separate impl f…
seven-mile Aug 9, 2024
716e838
[CIR][ClangTidy][Lifetime] Update to newer dyn_cast usage and update …
bcardosolopes Aug 9, 2024
1c4ab34
[CIR][CIRGen][NFC] Add more missing feature tracking and cleanup warn…
bcardosolopes Aug 9, 2024
60214e0
[CIR][FrontendAction] Use ClangIR pipeline to emit LLVM bitcode (#782)
seven-mile Aug 9, 2024
acf2445
[CIR][NFC] Add missing feature for nodebug
bcardosolopes Aug 9, 2024
90e8feb
[CIR][CIRGen] Emit constant global _Atomic's
bcardosolopes Aug 9, 2024
9c4435d
[CIR][CIRGen] Builtins: focus on non fast math path
bcardosolopes Aug 10, 2024
749f1db
[CIR][LowerToLLVM] Support address space lowering for global ops (#783)
seven-mile Aug 12, 2024
828b089
[CIR][ABI] Implement basic struct CC lowering for x86_64 (#784)
sitio-couto Aug 12, 2024
118f463
[CIR][CIRGen] Implement VisitCXXStdInitializerListExpr to support use…
ghehg Aug 13, 2024
d74cc1b
[CIR][CIRGen] Support more complex value casts (#786)
Lancern Aug 13, 2024
45c7bf4
[CIR][Dialect] Add verification of address space to `get_global` (#787)
seven-mile Aug 13, 2024
4cc61c4
[CIR][CodeGen] Set address space for OpenCL globals (#788)
seven-mile Aug 14, 2024
0548b34
[CIR] Fix wrong LLVMIR lowering of fp decrement (#789)
Lancern Aug 14, 2024
5ebbd52
[CIR][CIRGen] Add new CIR visibility to represent Default, Hidden, Pr…
roro47 Aug 15, 2024
c1900b7
[CIR][CIRGen] Complex unary increment and decrement operator (#790)
Lancern Aug 15, 2024
548458f
[CIR][CodeGen] Set address space for OpenCL static and local-qualifie…
seven-mile Aug 15, 2024
e1fe8e1
[CIR][ABI][NFC] Follow-up to struct unpacking (#791)
sitio-couto Aug 15, 2024
1006c88
[CIR][CIRGen] Add CIRGen support for pointer-to-member-functions (#722)
Lancern Aug 20, 2024
d5d122c
[CIR][CIRGen] Achieve union's bitfields additionally. (#742)
566hub Aug 20, 2024
84e18ed
[CIR] Cleanup most recent warnings
bcardosolopes Aug 21, 2024
d9a78f5
[CIR] More warning fixed by another fresh build
bcardosolopes Aug 21, 2024
f0a7791
[CIR] Add select operation (#796)
Lancern Aug 21, 2024
b54917b
[CIR][CIRGen] Inline variables processing (#794)
ivanmurashko Aug 22, 2024
5847da6
[CIR] Incorrect global view index and offset when neg index (#795)
HerrCai0907 Aug 22, 2024
c207843
[CIR][NFC] Replace ternary ops after lowering prepare to select ops (…
Lancern Aug 22, 2024
2360bc9
[CIR][CirGen][Bugfix] Fixes __sync_fetch_and_add for unsigned integer…
bruteforceboy Aug 23, 2024
9417d43
[CIR][CIRGen] Support global initialization with new
bcardosolopes Aug 23, 2024
ad02f92
[CIR][NFC] Fix sign-compare warning
bcardosolopes Aug 23, 2024
29d3232
[CIR] Add missing testcase for previous commit
bcardosolopes Aug 23, 2024
826abe4
[CIR][CIRGen] Add minimal support for building invariant globals
bcardosolopes Aug 23, 2024
d3af20c
[CIR][Lowering] Add the concept of simple lowering and use it for una…
Lancern Aug 27, 2024
e18275e
[CIR][CIRGen] Exceptions: Use the surrounding scope (if available) fo…
bcardosolopes Aug 28, 2024
fa078a3
[CIR][NFC] Exceptions: introduce cleanup region to cir.try
bcardosolopes Aug 28, 2024
6aaa8c2
[CIR][CIRGen] Exceptions: handle cleanups and global initializers
bcardosolopes Aug 26, 2024
c7dfaca
[CIR][FlattenCFG] Exceptions: propagate cleanups to flat CIR
bcardosolopes Aug 28, 2024
86e2095
[CIR] Exceptions: propagate more cleanup info for LLVM lowering use
bcardosolopes Aug 29, 2024
68f03c0
[CIR][CIRGen][NFC] Add more skeleton to make crashes fine grained on …
bcardosolopes Aug 29, 2024
27849d7
[CIR][NFC] Exceptions: Move a crash to an assert
bcardosolopes Aug 29, 2024
aa282a9
[CIR][CIRGen] Handle paren list init and get dtors right
bcardosolopes Aug 29, 2024
ddd1724
[CIR][CIRGen] Handle more cleanup situations and fix bug
bcardosolopes Aug 29, 2024
c666c2b
[CIR][NFC] Leftover from previous commit
bcardosolopes Aug 30, 2024
4ed7cda
[CIR][NFC] Cleanup tests a bit to reflect tested platform
bcardosolopes Aug 30, 2024
d029509
[CIR] Disable test temporatily
bcardosolopes Aug 30, 2024
76e7c0a
[CIR] Another attempt to disable tests
bcardosolopes Aug 30, 2024
c798182
[CIR] Add missing RUN line
bcardosolopes Aug 30, 2024
8a8ba9e
[CIR] Reland failing tests (#811)
bcardosolopes Aug 31, 2024
d167034
[CIR][CIRGen] Support pure and deleted virtual functions (#823)
smeenai Sep 5, 2024
761ecf9
[CIR][CIRGen][Lowering] Get alignment from frontend and pass it to LL…
ghehg Sep 9, 2024
016405c
[CIR][CodeGen] Fix address space of result pointer type of array deca…
seven-mile Sep 9, 2024
8b2274d
[CIR][Transform] Add simplify transformation for select op (#816)
Lancern Sep 9, 2024
987f1e1
[CIR][NFC] Extend simple lowering to unary fp2int ops and binary fp2f…
Lancern Sep 9, 2024
97357e1
[CIR][CIRGen] Add initial CIRGen support for local temporary material…
Lancern Sep 9, 2024
c329de7
[CIR][CIRGen] Implement delegating constructors (#821)
smeenai Sep 9, 2024
4780fb7
[CIR][Dialect] Verify bitcast does not contain address space conversi…
seven-mile Sep 10, 2024
fc73bd2
[CIR][Dialect] Remove 22 prefix and suffix from type aliases (#826)
smeenai Sep 10, 2024
53bdfb5
[CIR][Lowering] Fix BrCond Lowering (#819)
bruteforceboy Sep 10, 2024
f5e58b4
[CIR] Add some extra dumping to help with intermitent bug
bcardosolopes Sep 10, 2024
c324d34
[CIR][driver] Forward -fno-clangir-direct-lowering option to cc1 (#822)
keryell Sep 10, 2024
aaf38b3
[CIR][CIRGen] Exceptions: handle synthetic cir.try within functions
bcardosolopes Sep 11, 2024
fcc2590
[CIR][Transform] Add ternary simplification (#809)
Lancern Sep 11, 2024
18ad5b8
[CIR][CIRGen] Support a defined pure virtual destructor (#825)
smeenai Sep 11, 2024
d472146
[CIR][Dialect] Add calling convention attribute to cir.call op (#828)
seven-mile Sep 11, 2024
b6217e9
[CIR][CIRGen] Exception: get scope order right for try/catch with cle…
bcardosolopes Sep 11, 2024
6d5fb38
[CIR][LowerToLLVM] Exceptions: llvm.zero needed for landingpad should…
bcardosolopes Sep 11, 2024
05fb5a2
[CIR][CIRGen] Exceptions: support nested scope cleanup
bcardosolopes Sep 11, 2024
a700915
[CIR] Add .clang-tidy files to agree with our style convention (#834)
lanza Sep 12, 2024
a061729
[CIR][CodeGen][NFCI] Unify attribute list handling of func / call by …
seven-mile Sep 12, 2024
bde154c
[CIR][CodeGen] Refactor `setExtraAttributesForFunc` to better align w…
seven-mile Sep 12, 2024
8c017d9
[CIR][Asm] Fix parsing of extra(...) attributes in cir.call (#835)
keryell Sep 13, 2024
62bfcde
[CIR][CodeGen][LowerToLLVM] Set calling convention for call ops (#836)
seven-mile Sep 13, 2024
843f6b6
[CIR][Lowering] Fix static array lowering (#838)
bruteforceboy Sep 13, 2024
d2d8b45
[CIR][CIRGen][Lowering] Add support for attribute annotate (#804)
ghehg Sep 13, 2024
2d04dbe
[CIR][CIRGen][NFC] Exceptions: add cleanups to cir.call
bcardosolopes Sep 13, 2024
ca9bd89
[CIR][CIRGen][NFC] Exceptions: refactor invoke checks to better align…
bcardosolopes Sep 13, 2024
08bb891
[CIR][CIRGen][NFC] Exceptions: sink invoke logic closer to call emission
bcardosolopes Sep 13, 2024
fd3ba1d
[CIR][CIRGen][NFC] Exceptions: Move the logic to create surrounding t…
bcardosolopes Sep 13, 2024
7c24e59
[CIR][CIRGen][NFCI] Exceptions: change getEHDispatchBlock to create b…
bcardosolopes Sep 14, 2024
5da0007
[CIR][NFC] Fix mismatch of argument type in IR tests (#837)
seven-mile Sep 14, 2024
ba8c248
[CIR][Dialect] Add `convergent` attribute to functions for SIMT langu…
seven-mile Sep 16, 2024
d9e17d3
[CIR][FlattenCFG] Fix use after free when flattening terminator (#843)
smeenai Sep 16, 2024
2d1a4a4
[CIR][CodeGen][BugFix] Fixes structures name collisions (#844)
gitoleg Sep 16, 2024
5b1ff51
[CIR][Bugfix] renames minor/major parameters of the OpenCLVersionAttr…
gitoleg Sep 16, 2024
fad1fd1
[CIR][CodeGen] Support FullExpression storage duration cleanup (#846)
lanza Sep 16, 2024
cef3459
[CIR][CIRGen] Properly link multiple level of cleanups
bcardosolopes Sep 14, 2024
cdca0aa
[CIR][CodeGen] Fix packed structures (#839)
bruteforceboy Sep 17, 2024
fe403ca
[CIR][CIRGen] add CIRGen support for assume builtins (#841)
Lancern Sep 17, 2024
67cde4f
[CIR][NFC] Change default LLVM output file extension (#849)
Lancern Sep 17, 2024
45f360d
[CIR][Asm] Parse extra attributes after calling convention (#847)
keryell Sep 17, 2024
4821218
[CIR][CIRGen][Lowering] Lower AArch64::BI__builtin_arm_ldrex to llvm …
ghehg Sep 17, 2024
a314bec
[CIR][FlattenCFG][NFC] Exceptions: refactor landing pad code and catches
bcardosolopes Sep 17, 2024
d69f818
[CIR][CIRGen][NFC] Exceptions: refactor more infra for handling multi…
bcardosolopes Sep 18, 2024
9e196ee
[CIR][CIRGen][NFCI] Exceptions: generalize landing pad insertion
bcardosolopes Sep 18, 2024
4b6ce6c
[CIR][FlattenCFG][NFCI] Exceptions: more generalization for dispatch …
bcardosolopes Sep 18, 2024
241536e
[CIR][FlattenCFG][NFCI] Exceptions: generalize catch dispatch emission
bcardosolopes Sep 18, 2024
b22d7d0
[CIR][NFC] Move things around in try-catch-dtors.cpp
bcardosolopes Sep 18, 2024
291accd
[CIR][FlattenCFG] Exceptions: enable many calls / many landing pads s…
bcardosolopes Sep 18, 2024
1c3abd2
[CIR][LowerToLLVM][NFC] Exceptions: use getOrCreateLLVMFuncOp to crea…
bcardosolopes Sep 18, 2024
759de62
[CIR][Lowering] Erase op through rewriter instead of directly (#853)
smeenai Sep 18, 2024
0742aab
[CIR] Exceptions: check LLVM output for more complex dtor order
bcardosolopes Sep 18, 2024
8862495
[CIR][ABI] Fix use after free from erasing while iterating (#854)
smeenai Sep 18, 2024
e437114
Recommit [CIR][Pipeline] Support -fclangir-analysis-only (#832)
ChuanqiXu9 Sep 18, 2024
0789637
[CIR][Lowering] Fix lowering for multi dimensional array (#851)
bruteforceboy Sep 18, 2024
567d56a
[CIR][CodeGen] Support FullExpression storage duration cleanup
lanza Sep 18, 2024
b353c5c
[CIR][CodeGen] Support global temporaries
lanza Sep 18, 2024
f1dacca
[CIR][CodeGen][NFC] Move GetUndefRValue to the right file
lanza Sep 18, 2024
eece5de
[CIR][CIRGen] Exceptions: lexical scope issue with global initializers
bcardosolopes Sep 18, 2024
01a99e6
[CIR][CIRGen][Builtin][Neon] Lower __builtin_neon_vrndns_f32 (#858)
ghehg Sep 19, 2024
9a85975
[CIR][CodeGen][NFC] Add TBAAAccessInfo stubbed out and many usages of…
lanza Sep 19, 2024
845c25a
[CIR][CodeGen] Stub out an empty CIRGenDebugInfo type
lanza Sep 19, 2024
7caf141
[CIR][CIRGen] Initialize more CGF member variables to nullptr (#863)
smeenai Sep 19, 2024
87b06bf
[CIR][CIRGen] Implement Nullpointer arithmatic extension (#861)
ChuanqiXu9 Sep 19, 2024
3358f42
[CIR][Codegen] supports aarch64_be (#864)
gitoleg Sep 19, 2024
923264b
[CIR] Split cir-simplify into two passes (#868)
Lancern Sep 19, 2024
c947dc7
[CIR][CodeGen] Implement union cast (#867)
bruteforceboy Sep 19, 2024
d00c3a3
[CIR][CIRGen] Exceptions: unlock nested try/catch support
bcardosolopes Sep 20, 2024
4fff508
[CIR][CodeGen] Fix array initialization in CIRGenExprAgg (#852)
bruteforceboy Sep 20, 2024
ac8c6a5
[CIR][CIRGen] Correct isSized predicate for vector type (#869)
ghehg Sep 20, 2024
5b5dfd3
[CIR][CIRGen][Builtin][Neon] Lower builtin_neon_vrnda_v and builtin_n…
ghehg Sep 20, 2024
d92a33a
[CIR][CIRGen] Handle VisitCXXRewrittenBinaryOperator for scalars
bcardosolopes Sep 20, 2024
2f45cd1
[CIR][CIRGen][NFC] Cleanups: add skeleton for DominatingValue<RValue>…
bcardosolopes Sep 20, 2024
71be373
[CIR][Infra] Run check-clang-cir against any branch based PR (#873)
lanza Sep 20, 2024
11a1328
[CIR][CIRGen][NFC] Cleanups: add more skeleton to pushFullExprCleanup
bcardosolopes Sep 21, 2024
f016fc4
[CIR][CodeGen][BugFix] don't place alloca before the label (#875)
gitoleg Sep 23, 2024
1cb5462
[CIR][CIRGen] Allow constant evaluation of int annotation (#874)
keryell Sep 23, 2024
b7d603d
[CIR][CIRGen] Cleanups: handle conditional cleanups
bcardosolopes Sep 21, 2024
ed426a6
[CIR][CIRGen][NFC] Cleanups: Prepare for conditional cleanup
bcardosolopes Sep 23, 2024
5fd96c6
[CIR][CIRGen][NFC] Cleanups: more boilerplate work for conditional on…
bcardosolopes Sep 23, 2024
72b42af
[CIR][CodeGen] Handling multiple stmt followed after a switch case (#…
ChuanqiXu9 Sep 24, 2024
85bc640
[CIR][CIRGen] Generate CIR for empty compound literal (#880)
ghehg Sep 24, 2024
a76cb16
[CIR][CIRGen] Generate CIR for vset_lane and vsetq_lane intrinsics (#…
ghehg Sep 24, 2024
3b82272
[CIR][CI] Remove libcxx tests
lanza Sep 25, 2024
0e7e715
[CIR][Dialect][CodeGen] Add a unit attribute for OpenCL kernels (#877)
seven-mile Sep 25, 2024
8710834
[CIR][CodeGen] Handle the case of 'case' after label statement after …
ChuanqiXu9 Sep 25, 2024
37aafef
[CIR][CIRGen] Generate CIR for neon_vget and neon_vdup lane intrinsic…
ghehg Sep 25, 2024
52323c1
[CIR][CIRGen] Allow maybeSetTrivialComdat for GlobalOp (#885)
ghehg Sep 25, 2024
387f949
[CIR] Check CLANG_ENABLE_CIR is actually enabled when using CIR
luismarques Sep 26, 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 @@ -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