Skip to content

LLVM and SPIRV-LLVM-Translator pulldown (WW26) #3961

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

Merged
merged 480 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
480 commits
Select commit Hold shift + click to select a range
08be746
[llvm-dlltool] [test] Remove superfluous --coff-exports option to llv…
mstorsjo Jun 14, 2021
675d52b
[llvm-dlltool] [test] Add a testcase for all machine option types. NFC.
mstorsjo Jun 14, 2021
ca56b33
[llvm-dlltool] Imply the target arch from a tool triple prefix
mstorsjo Jun 14, 2021
ceee35e
[LLD] [COFF] Remove a stray duplicate comment. NFC.
mstorsjo Jun 16, 2021
5355b8c
[ELF] Restore arm-branch.s test
igorkudrin Jun 17, 2021
b18f30f
[NFC] test commit, fix namespace ending comment.
fmayer Jun 17, 2021
1a4af2e
[flang] preserve symbol in DescriptorInquiry
jeanPerier Jun 17, 2021
69b0ed9
[InstCombine] Fix miscompile on GEP+load to icmp fold (PR45210)
hyeongyukim Jun 17, 2021
1807072
[hwasan] Do not use short granule tags as poison tags.
fmayer Jun 15, 2021
ccc0f77
[hwasan] Improve report for addresses within regions.
fmayer Jun 16, 2021
d7e8912
[mlir] Enable delayed registration of attribute/operation/type interf…
ftynse Jun 16, 2021
983ed1b
[lldb] Set return object failed status even if error string is empty
DavidSpickett Jun 16, 2021
7a580f3
[lldb] Remove redundant calls to set eReturnStatusFailed
DavidSpickett Jun 16, 2021
6b63381
[mlir] define a customized DEBUG_TYPE in InterfaceSupport.h
ftynse Jun 17, 2021
0bd5bbb
[X86] Add test showing binary differences with -x86-pad-for-align.
fhahn Jun 17, 2021
8d64ed8
[libc] Generate one benchmark per implementation
gchatelet Jun 10, 2021
aa6e8e9
[X86] Check using default in test added in 0bd5bbb31e0345ae.
fhahn Jun 17, 2021
5b3cb31
[mlir][linalg] Purge linalg.indexed_generic.
pifon2a Jun 17, 2021
cdb4fcf
[X86] combineSelect - refactor MIN/MAX detection code to make it easi…
RKSimon Jun 17, 2021
c878d03
[mlir] Split things dependent on LLVM_DEBUG into a .cpp file
d0k Jun 17, 2021
3f59684
[FuncSpec] Precommit test: don't specialise funcs with NoDuplicate in…
Jun 17, 2021
eaf60a4
[lldb] Remove redundant calls to set eReturnStatusFailed
DavidSpickett Jun 17, 2021
7cddf56
[mlir] Remove linalg.indexed_generic forward decl.
pifon2a Jun 17, 2021
fa1de88
[DebugInfo] Prevent non-determinism when updating DIArgList users of …
SLTozer Jun 17, 2021
fc6ec9b
[Sema] Fix for PR50741
tauchris Jun 16, 2021
e8991ca
Revert "[DebugInfo] Prevent non-determinism when updating DIArgList u…
SLTozer Jun 17, 2021
26f1f6d
[llvm] fix typo in comment
gchatelet Jun 17, 2021
60a8edf
[FPEnv][InstSimplify] Precommit tests for D103169.
kpneal Jun 17, 2021
6765b9c
[clangd] Explicitly fail if the file passed to --check is not valid.
hokein Jun 17, 2021
24706cd
[lld-macho] Avoid force-loading the same archive twice
int3 Jun 17, 2021
dee2c76
Reapply "[DebugInfo] Prevent non-determinism when updating DIArgList …
SLTozer Jun 17, 2021
bbea642
RISCV: adjust handling of relocation emission for RISCV
compnerd May 26, 2021
249d9b0
Revert "Remove obsolete call to AsyncSignalSafeLazyInitiFakeStack."
kda Jun 17, 2021
ac35ed5
[compiler-rt][hwasan]: undefine new/delete operators with alignment o…
yabinc Jun 17, 2021
5b1079f
[InstCombine][x86] add tests for complex vector shift value tracking;…
rotateright Jun 16, 2021
61196f8
[InstSimplify] add tests for computeKnownBits of shift-with-bitcast o…
rotateright Jun 17, 2021
53f5f14
fix an -Wunused-variable warning in release built, NFC
hokein Jun 17, 2021
e70d499
test: clean up some of the RISCV tests (NFC)
compnerd Jun 17, 2021
a22c55c
[libcxx][iwyu] 🎨 adds more headers to IWYU
cjdb Jun 16, 2021
d827af0
[libcxx][module-map] 🎨 updates module map to account for ranges headers
cjdb Jun 16, 2021
2291158
[mlir][sparse] Add Matricized Tensor Times Khatri-Rao Product (MTTKRP…
gussmith23 Jun 16, 2021
734d688
[clang] Fix a race condition in the build of clangInterpreter
sstamenova Jun 17, 2021
f27e454
[lld-macho] Implement ICF
gkmhub May 19, 2021
00553a3
[gn build] Port f27e4548fc42
llvmgnsyncbot Jun 17, 2021
4e2aee8
[AIX] Remove --as-needed passing into aix linker
jasonliudev Jun 17, 2021
37dfc46
[NFC] LoopVectorizationCostModel::getMaximizedVFForTarget(): clarify …
LebedevRI Jun 17, 2021
69caacc
[X86] AMD Zen 3: don't confuse shift and shuffle, NFC
LebedevRI Jun 17, 2021
d02bf36
[llvm-symbolizer][docs] Update example for --verbose in the guide
nga888 Jun 11, 2021
366df11
[lld-macho] Rework mergeFlag to behave closer to what ld64 does.
oontvoo Jun 9, 2021
758633f
[lld][WebAssembly] Add new `--import-undefined` option
sbc100 May 27, 2021
dc11d4e
[MCA] [RegisterFile] Allow for skipping Defs with RegID of 0 (rather …
holland11 Jun 16, 2021
f7c54c4
[LoopUnroll] Fold all exits based on known trip count/multiple
nikic Jun 13, 2021
aa4685c
[lldb-vscode] only report long running progress events
walter-erquinigo Apr 30, 2021
9ac7388
Revert "[NFC] Remove checking pointee type for byval/preallocated type"
slackito Jun 17, 2021
7b06120
[AArch64][GISel] and+or+shl => bfi
jroelofs May 27, 2021
a2ab765
[GISel] Eliminate redundant bitmasking
jroelofs May 28, 2021
71e4d43
[libc++] Make sure std::allocator<void> is always trivial
ldionne Jun 16, 2021
116841c
RISCV: clean up target expression handling
compnerd Jun 17, 2021
8a567e5
[ScalarEvolution] Fix pointer/int type handling converting select/phi…
efriedma-quic Jun 16, 2021
8441b99
[DFSan] Cleanup code for platforms other than Linux x86_64.
browneee Jun 17, 2021
99e9585
[PartiallyInlineLibCalls] Disable sqrt expansion for strictfp.
topperc Jun 17, 2021
76d0747
[InstrProfiling] Make __profd_ unconditionally private for ELF
MaskRay Jun 17, 2021
39295e9
Revert "[DFSan] Cleanup code for platforms other than Linux x86_64."
browneee Jun 17, 2021
c1360fd
[lldb-vscode] remove failed test
Jun 17, 2021
bf9f21a
[trace][intel-pt] Create basic SB API
Jun 1, 2021
d01e673
[lld][WebAssembly] Fix crash calling weakly undefined function in PIC…
sbc100 Jun 17, 2021
722c514
[clang][AST] Make `getLocalOrImportedSubmoduleID` work with const `Mo…
vsapsai Jun 16, 2021
eaf1b68
[Attributor] Derive AACallEdges attribute
kuterd Jun 10, 2021
84eeb82
[NFC][SimpleLoopUnswitch] unswitchTrivialBranch(): add debug output e…
LebedevRI Jun 17, 2021
e7bf451
[M68k][NFC] Fix indentation in M68kInstrArithmetic.td
tclin914 Jun 18, 2021
3522167
[Coroutine] Properly deal with byval and noalias parameters
lxfind Jun 18, 2021
6aaf4fa
Bring our handling of -Wframe-larger-than more in line with GCC.
zygoloid Jun 18, 2021
1d891d4
[WebAssembly] Rename event to tag
aheejin Jun 15, 2021
a10aeb3
[AMDGPU] Remove duplicate setOperationAction for v4i16/v4f16 (NFC)
perlfu Jun 18, 2021
85ec210
[objdump][ARM] Fix evaluating the target address of a Thumb BLX(i)
igorkudrin Jun 18, 2021
aea6723
[InstCombine][NFC] Added tests for mul with zext/sext operands
dseredkin Jun 18, 2021
c2e97ba
[RISCV] Don't enable Interleaved Access Vectorization
luke957 Jun 16, 2021
a78671e
[FIX][Attributor] Fix broken build due to missing virtual deconstruct…
kuterd Jun 18, 2021
05d0f1a
Frontend: Respect -fno-temp-file when creating a PCH
ZacharyHenkel Jun 18, 2021
c6b5a25
[dfsan] Replace dfs$ prefix with .dfsan suffix
gbalats Jun 17, 2021
8d7bace
[Attributor][NFC] AAReachability is currently stateless, don't invali…
jdoerfert May 6, 2021
39e1876
[Attributor][NFC] Precommit a set of test cases for load simplification
jdoerfert Jun 8, 2021
ca7563b
[Attributor][NFC] Add test from PR49606
jdoerfert Jun 10, 2021
9a23e67
[OpenMP][NFC] Expose AAExecutionDomain and rename its getter
jdoerfert May 12, 2021
9959eee
[Attributor] Make sure Heap2Stack works properly on a GPU target
jdoerfert Jun 17, 2021
d9194b6
[Attributor] Introduce a helper do deal with constant type mismatches
jdoerfert May 10, 2021
666dc6f
[Attributor] Use a centralized value simplification interface
jdoerfert Jun 17, 2021
3d6df01
[Attributor] Allow to skip the initial update for a new AA
jdoerfert Jun 18, 2021
30c9d68
[Attributor][FIX] Arguments of unknown functions can be undef
jdoerfert May 16, 2021
5798be8
Revert D103717 "[InstrProfiling] Make __profd_ unconditionally privat…
MaskRay Jun 18, 2021
6aac277
[polly][GPGPU] Fixup related to overloading exponent type in llvm.powi
bjope Jun 18, 2021
3105333
[InstCombine] Fold (sext bool X) * (sext bool X) to zext (and X, X)
dseredkin Jun 2, 2021
37afd67
[libc] Add few macro definitions to make it easy to accommodate Windows.
Jun 18, 2021
6de741d
Revert "[InstCombine] Fold (sext bool X) * (sext bool X) to zext (and…
dseredkin Jun 18, 2021
2a5bb9c
[Demangle][Rust] Parse dot suffix
tmiasko Jun 18, 2021
7a1e4f1
[libc][Obvious] Add the new header file PlatformDefs.h to the fputil …
Jun 18, 2021
7670938
[Attributor] Don't print the call-graph in a hard-coded file.
hokein Jun 18, 2021
2a629ef
[Polly][Isl] Refactoring IslAstInfo::getBuild() and IslAstInfo::IslAs…
patacca Jun 18, 2021
6f665cd
[mlir][linalg] Fix PadTensorOp constructor
matthias-springer Jun 18, 2021
fa5eb22
[NFC] Assert non-zero factor before division
xortator Jun 18, 2021
a740b70
[llvm][Inliner] Add an optional PriorityInlineOrder
taoliq Jun 18, 2021
4498137
[flang] Rewrite test for CPU_TIME
rovka Jun 18, 2021
07bbfd9
[Test] Add XFAIL unit test for PR50765
xortator Jun 18, 2021
6643e51
[InstCombine] Fold (sext bool X) * (sext bool X) to zext (and X, X)
dseredkin Jun 2, 2021
1f9dcd2
[AMDGPU] Update generated checks. NFC.
jayfoad Jun 18, 2021
3f5d53a
[Attributor] Fix UB behavior on uninitalized bool variables.
hokein Jun 18, 2021
18c8c93
[MLIR] Introduce scf.execute_region op
bondhugula Jun 18, 2021
de92287
[LoopDeletion] Break backedge if we can prove that the loop is exited…
xortator Jun 18, 2021
93183a4
Revert D104028 "[llvm][Inliner] Add an optional PriorityInlineOrder"
taoliq Jun 18, 2021
cec8e69
[ORC] Add support for dumping objects to the C API.
lhames Jun 18, 2021
7ddd15c
[clang] Exclude function pointers on DefaultedComparisonAnalyzer
mizvekov Jun 7, 2021
cbfb124
[ORC] Use uint8_t rather than char for RPC wrapper-function calls.
lhames Jun 18, 2021
8962c68
[ORC][C-bindings] Re-order object transform function arguments.
lhames Jun 18, 2021
fd569a1
[libclang] Fix error handler in translateSourceLocation.
statham-arm Jun 18, 2021
cc2ef19
[analyzer] Handle NTTP invocation in CallContext.getCalleeDecl()
tomasz-kaminski-sonarsource Jun 18, 2021
7353bed
[DAG] SelectionDAG::computeKnownBits - use APInt::insertBits to merge…
RKSimon Jun 18, 2021
7f7be19
[mlir] Add notes about using external interface application.
silvasean Jun 17, 2021
ced6b20
[clang] Implement P2266 Simpler implicit move
mizvekov Mar 19, 2021
493565a
[HWASan] Run LAM tests with -hwasan-generate-tags-with-calls.
morehouse Jun 18, 2021
b30bc8c
RISCV: simplify a test case for RISCV (NFCI)
compnerd Jun 18, 2021
9777f3f
Fix build failure on 32 bit Arm
omjavaid Jun 18, 2021
c5b7c7c
[NFC][libomptarget] Fixed -DLLVM_ENABLE_RUNTIMES="openmp" build.
Jun 18, 2021
836992a
[NFC][libomptarget] Build elf_common with PIC.
Jun 18, 2021
78b75b4
[AArch64] Add TableGen patterns to generate uaddlv
jaykang10 Jun 14, 2021
8120c9e
Rename option -icf MODE to --icf=MODE
gkmhub Jun 18, 2021
f736689
[lld/mac] Support -data_in_code_info, -function_starts flags
nico Jun 18, 2021
f2c009d
[lldb-vscode] attempt to fix flakiness
Jun 18, 2021
79caf69
[flang] Runtime implementation for default derived type formatted I/O
klausler Jun 17, 2021
88d9392
[compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp
PiJoules Jun 16, 2021
e0b68f7
[hwasan] Clarify report for allocation-tail-overwritten.
fmayer Jun 18, 2021
5c189d3
[OpenMP] Update FAQ for enabling cuda offloading
ashermancinelli Jun 18, 2021
ec91df8
Delay initialization of OptBisect
Jun 18, 2021
c1e6d25
XFAIL a testcase on Hexagon (missing-abstract-variable.ll)
Jun 18, 2021
4688d15
Revert "Delay initialization of OptBisect"
Jun 18, 2021
1440733
[DFSan] Cleanup code for platforms other than Linux x86_64.
browneee Jun 17, 2021
c60f1d5
[CSSPGO] Fix an invalid hash table reference issue in the CS preinliner.
htyu Jun 16, 2021
2e5dc4a
[AMDGPU] [CodeGen] Fold negate llvm.amdgcn.class into test mask
gandhi56 Jun 18, 2021
8c2c972
[CSSPGO][llvm-profgen] Ignore LBR records after interrupt transition
htyu Jun 18, 2021
ac87133
[RISCV] Teach vsetvli insertion to remember when predecessors have sa…
topperc Jun 18, 2021
bdd5da9
[clang-tidy] performance-unnecessary-copy-initialization: Directly ex…
May 24, 2021
dd15c27
[libc++] [P1518R2] Better CTAD behavior for containers with allocators.
Quuxplusone Mar 1, 2021
8fdd475
[flang][OpenMP] Add semantic checks for occurrence of nested Barrier …
Jun 18, 2021
4c49f9c
[lld-macho] Handle non-extern symbols marked as private extern
int3 Jun 18, 2021
1d31fb8
[lld-macho] Have path-related functions return std::string, not Strin…
int3 Jun 18, 2021
f7999e7
[NFC][compiler-rt][hwasan] Move hwasanThreadList().CreateCurrentThrea…
PiJoules Jun 18, 2021
193e41c
[Clang][Codegen] Add GNU function attribute 'no_profile' and lower it…
nickdesaulniers Jun 18, 2021
bef2992
[GCOVProfiling] don't profile Fn's w/ noprofile attribute
nickdesaulniers Jun 18, 2021
d1baf28
[mlir] Add support to SourceMgrDiagnosticHandler for filtering FileLi…
River707 Jun 18, 2021
fb19aa0
[CSSPGO][llvm-profgen] Fix an issue in findDisjointRanges
htyu Jun 18, 2021
8e0c4b0
Merge from 'sycl' to 'sycl-web'
Jun 18, 2021
3308205
[LoopUnroll] Simplify optimization remarks
nikic Jun 17, 2021
4b9d28b
Partial rollback: Disable MLIR verifier parallelism.
stellaraccident Jun 18, 2021
8172183
Whitespace fixes for
nickdesaulniers Jun 18, 2021
36f93fc
[flang] Fix clang build (struct/class mismatch warning)
klausler Jun 18, 2021
bd52495
[CSSPGO] Undoing the concept of dangling pseudo probe
htyu Jun 17, 2021
dbde9c1
Merge from 'main' to 'sycl-web' (#5)
abhinavgaba Jun 18, 2021
ec97866
[OpenMP] Make bug49334.cpp more reproducible
shiltian Jun 18, 2021
ad4a182
AMDGPU: Fix assert on m0_lo16/m0_hi16
arsenm Jun 14, 2021
fb32de9
Re-Revert "DirectoryWatcher: add an implementation for Windows"
nico Jun 18, 2021
d6467e0
AMDGPU: Fix infinite loop in DAG combine with fneg + fma
arsenm Jun 12, 2021
5540470
[profile][test] Delete profraw directory so that tests are immune to …
MaskRay Jun 18, 2021
b3c1f53
[flang] Recode a switch() to dodge a sketchy warning
klausler Jun 18, 2021
3307240
[InstrProfiling][ELF] Make __profd_ private if the function does not …
MaskRay Jun 19, 2021
c9b241e
Revert "[lld-macho] Avoid force-loading the same archive twice"
nico Jun 19, 2021
575ba6f
[InstCombine] Don't transform code if DoTransform is false
weiguozhi Jun 19, 2021
0705562
[libfuzzer] Disable failing DFSan-related tests
gbalats Jun 18, 2021
9b69945
[ORC][examples] Fix file name in comment.
lhames Jun 18, 2021
80f30a6
[ORC][C-bindings] Add access to LLJIT IRTransformLayer, ThreadSafeMod…
lhames Jun 19, 2021
671a871
[llvm][Inliner] Add an optional PriorityInlineOrder
taoliq Jun 19, 2021
a79c018
Revert "[lld-macho] Have path-related functions return std::string, n…
int3 Jun 19, 2021
4507f64
[re-land][lld-macho] Avoid force-loading the same archive twice
int3 Jun 19, 2021
24199f5
[mlir][linalg] Lower subtensor(pad_tensor) to pad_tensor(subtensor)
matthias-springer Jun 19, 2021
382b3fe
[ORC][examples] Add missing library dependence
lhames Jun 19, 2021
3119073
[RISCV][test] Add new tests for add-mul optimization in the zba exten…
benshi001 Jun 19, 2021
d934b72
[RISCV] Optimize add-mul in the zba extension with SH*ADD
benshi001 Jun 19, 2021
1bd4085
[LoopUnroll] Push runtime unrolling decision up into tryToUnrollLoop()
nikic Jun 17, 2021
876de06
[mlir] Add EmitC dialect
marbre Jun 9, 2021
a1449a1
[clang][FPEnv] Clang floatng point model ffp-model=precise enables ff…
Jun 19, 2021
c9889c4
[clang-cl] Don't expand /permissive- to /ZC:strictStrings yet
zero9178 Jun 19, 2021
134723e
[libcxx] Move all algorithms into their own headers
ldionne Jun 17, 2021
2ec672d
[gn build] Port 134723edd5bf
llvmgnsyncbot Jun 19, 2021
9abaf5c
Revert "[clang][FPEnv] Clang floatng point model ffp-model=precise en…
Jun 19, 2021
18dbe68
[ARM][NFC] Tidy up subtarget frame pointer routines
tmatheson-arm Jun 17, 2021
1bcfa84
Allow building for release with EXPENSIVE_CHECKS
tmatheson-arm Jun 18, 2021
decfad7
Revert "Re-Revert "DirectoryWatcher: add an implementation for Windows""
compnerd Jun 18, 2021
328b21a
[InstCombine][test] add tests for select-of-bit-manip; NFC
rotateright Jun 19, 2021
940efa4
[amdgpu] Improve the from f32 to i64.
darkbuck Jun 11, 2021
b9c05af
[MIRPrinter] Add machine metadata support.
darkbuck May 26, 2021
17271ec
[lld/mac] Give __DATA,__thread_ptrs type S_THREAD_LOCAL_VARIABLE_POIN…
nico Jun 19, 2021
c931e12
[lld/mac] Make sure __thread_ptrs is in front of __thread_bss
nico Jun 19, 2021
1605fce
[gn build] (manually) port b9c05aff205b (MIRTests)
nico Jun 19, 2021
59d90fe
Simplify some typedef struct
MaskRay Jun 19, 2021
834aafa
[NFC] AMD Zen 3: fix typo in a comment
LebedevRI Jun 19, 2021
b663f30
[RISCV] Prevent formation of shXadd(.uw) and add.uw if it prevents th…
topperc Jun 19, 2021
0f558db
[llvm-profdata] Delete unneeded empty output filename check
MaskRay Jun 19, 2021
1c8bb62
[LLD] [MinGW] Print errors/warnings in lld-link with a "ld.lld" prefix
mstorsjo Jun 18, 2021
e1adf90
[LLD] [COFF] Avoid doing repeated fuzzy symbol lookup for each iterat…
mstorsjo Jun 17, 2021
d85c258
[profile] Don't publish VMO if there are no counters
petrhosek May 19, 2021
8ea2a58
[llvm-profdata] Make diagnostics consistent with the (no capitalizati…
MaskRay Jun 19, 2021
d4c2b97
[profile] Fix variable name
petrhosek Jun 19, 2021
cee85fc
[test] Fix nocompress.test
MaskRay Jun 19, 2021
f075760
[Flang][test] Fix Windows buildbot.
Meinersbur Jun 20, 2021
e85eecf
[llvm-cov gcov] Change case to match the prevailing style && replace …
MaskRay Jun 20, 2021
0873016
[llvm-cov gcov] Support GCC 12 format
MaskRay Jun 20, 2021
09e8c0d
[InstSimplify] icmp poison, X -> poison
aqjune Jun 20, 2021
ad87761
[SimplifyCFG] HoistThenElseCodeToIf(): don't hoist if either block ha…
LebedevRI Jun 20, 2021
c5b7335
[SimplifyCFG] FoldTwoEntryPHINode(): don't fold if either block has i…
LebedevRI Jun 20, 2021
b1f55c3
[UpdateTestUtils] Print test filename when complaining about conflict…
LebedevRI Jun 20, 2021
e497b12
[NFC][AArch64][ARM][Thumb][Hexagon] Autogenerate some tests
LebedevRI Jun 20, 2021
240acb0
[InstCombine] avoid infinite loops with select folds of constant expr…
rotateright Jun 20, 2021
e7f78fb
[flang] Implement constant folding for the NOT intrinsic
psteinfeld Jun 19, 2021
56aac56
[libcxx] Implement P0883R2 ("Fixing Atomic Initialization")
tambry Jun 6, 2021
4c44b02
[InstCombine] fold ctpop-of-select with 1 or more constant arms
rotateright Jun 20, 2021
a24b021
[DSE] Remove stores in the same loop iteration
davemgreen Jun 20, 2021
d4c437c
[lldb] [Process/elf-core] Fix reading NetBSD/i386 core dumps
mgorny Apr 22, 2021
521d373
Fix -Wunused-variable and -Wunused-but-set-variable in -DLLVM_ENABLE_…
MaskRay Jun 20, 2021
5022511
[lld-link] Fix -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=…
MaskRay Jun 20, 2021
558ee58
[mlir] Fix -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off …
MaskRay Jun 20, 2021
1ae266f
[LoopUnroll] Use smallest exact trip count from any exit
nikic Jun 19, 2021
9ea6dd5
Add a corefile style option to process save-core; skinny corefiles
jasonmolenda Jun 20, 2021
3a8c706
[TypePromotion] Prune Intrinsic includes. NFC
topperc Jun 20, 2021
af91388
Try to unbreak the windows CI
jasonmolenda Jun 20, 2021
ffa252e
[GCOVProfiling][test] Ensure that 'opt' drops any files in a temp dir…
gribozavr Jun 20, 2021
cd6b1b2
[ELF][test] Add missing tests for --no-export-dynamic & --no-warn-bac…
MaskRay Jun 20, 2021
89e66a3
[ELF] Delete --no-cref which does not exist in GNU ld
MaskRay Jun 20, 2021
f79e7a5
[lld-macho] Have inputOrder default to less than INT_MAX
int3 Jun 20, 2021
912b3b0
[IVDescriptors] Fix comment that getUnsafeAlgebraInst has been rename…
tclin914 Jun 20, 2021
62ed024
[NFC][ScalarEvolution] Clean up ExitLimit constructors.
efriedma-quic Jun 21, 2021
e6cb55d
[lld/mac] Test zerofill sections after __thread_bss
nico Jun 20, 2021
ce192ce
[InstCombine] Use poison constant to represent the result of unreacha…
aqjune Jun 20, 2021
3a6a60f
[lld/mac] Make a variable more local; no behavior change
nico Jun 21, 2021
735ad67
[clang] NFC: adjust indentation of statements with more than one lines
zhouzhouyi-hub Jun 21, 2021
bb1dc87
[LoopDeletion] Handle Phis with similar inputs from different blocks
xortator Jun 21, 2021
657aa3a
[yaml2obj] Add support for writing the long symbol name.
Jun 21, 2021
e37653d
[clangd] Type hints for C++14 return type deduction
HighCommander4 Jun 7, 2021
3f2ff7c
[Test] Add some tests showing room for optimization exploiting undef …
xortator Jun 21, 2021
7a97cd9
[AMDGPU][Libomptarget] Remove redundant functions
pdhaliwal-amd Jun 18, 2021
80fd5fa
[AMDGPU] Replace non-kernel function uses of LDS globals by pointers.
hsmahesha Jun 21, 2021
b746a8d
[gn build] Port 80fd5fa5269c
llvmgnsyncbot Jun 21, 2021
e04533d
[mlir][Linalg] Introduce a BufferizationAliasInfo (6/n)
nicolasvasilache Jun 16, 2021
11e9a72
[mlir][Linalg] NFC - Drop unused variable definition.
nicolasvasilache Jun 21, 2021
208332d
[AMDGPU] Add Optimize VGPR LiveRange Pass.
ruiling Apr 19, 2021
808ac8d
[gn build] Port 208332de8abf
llvmgnsyncbot Jun 21, 2021
225b960
[mlir][linalg] Support low padding in subtensor(pad_tensor) lowering
matthias-springer Jun 21, 2021
342bbb7
[FuncSpec] Don't specialise functions with NoDuplicate instructions.
Jun 17, 2021
7540e25
Merge remote-tracking branch 'otcshare_llvm/sycl-web' into llvmspirv_…
vmaksimo Jun 21, 2021
39d0d53
Merge commit '342bbb7832b69cc2adba9acaac0ed2b9bffbe896' into llvmspir…
vmaksimo Jun 21, 2021
a087f3e
Handle OpSpecConstantOp with VectorShuffle
svenvh Jun 3, 2021
96004a5
Handle OpSpecConstantOp with CompositeExtract and CompositeInsert
svenvh Jun 4, 2021
d3bc86b
Fix handling of complex constant expressions
Fznamznon Jun 15, 2021
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
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "../utils/LexerUtils.h"
#include "../utils/Matchers.h"
#include "../utils/OptionsUtils.h"
#include "clang/AST/Decl.h"
#include "clang/Basic/Diagnostic.h"

namespace clang {
Expand Down Expand Up @@ -72,14 +73,14 @@ AST_MATCHER_FUNCTION(StatementMatcher, isConstRefReturningFunctionCall) {
.bind(InitFunctionCallId);
}

AST_MATCHER_FUNCTION(StatementMatcher, isInitializedFromReferenceToConst) {
AST_MATCHER_FUNCTION(StatementMatcher, initializerReturnsReferenceToConst) {
auto OldVarDeclRef =
declRefExpr(to(varDecl(hasLocalStorage()).bind(OldVarDeclId)));
return declStmt(has(varDecl(hasInitializer(
return expr(
anyOf(isConstRefReturningFunctionCall(), isConstRefReturningMethodCall(),
ignoringImpCasts(OldVarDeclRef),
ignoringImpCasts(unaryOperator(
hasOperatorName("&"), hasUnaryOperand(OldVarDeclRef))))))));
ignoringImpCasts(unaryOperator(hasOperatorName("&"),
hasUnaryOperand(OldVarDeclRef)))));
}

// This checks that the variable itself is only used as const, and also makes
Expand All @@ -106,18 +107,14 @@ static bool isInitializingVariableImmutable(const VarDecl &InitializingVar,
if (!isa<ReferenceType, PointerType>(T))
return true;

auto Matches =
match(findAll(declStmt(has(varDecl(equalsNode(&InitializingVar))))
.bind("declStmt")),
BlockStmt, Context);
// The reference or pointer is not initialized in the BlockStmt. We assume
// its pointee is not modified then.
if (Matches.empty())
// The reference or pointer is not declared and hence not initialized anywhere
// in the function. We assume its pointee is not modified then.
if (!InitializingVar.isLocalVarDecl() || !InitializingVar.hasInit()) {
return true;
}

const auto *Initialization = selectFirst<DeclStmt>("declStmt", Matches);
Matches =
match(isInitializedFromReferenceToConst(), *Initialization, Context);
auto Matches = match(initializerReturnsReferenceToConst(),
*InitializingVar.getInit(), Context);
// The reference is initialized from a free function without arguments
// returning a const reference. This is a global immutable object.
if (selectFirst<CallExpr>(InitFunctionCallId, Matches) != nullptr)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_UNNECESSARY_COPY_INITIALIZATION_H

#include "../ClangTidyCheck.h"
#include "clang/AST/Decl.h"

namespace clang {
namespace tidy {
Expand Down
15 changes: 11 additions & 4 deletions clang-tools-extra/clangd/CompileCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
#include <string>
#include <vector>

namespace clang {
namespace clangd {
Expand Down Expand Up @@ -209,14 +211,20 @@ void CommandMangler::adjust(std::vector<std::string> &Cmd) const {
Cmd = tooling::getStripPluginsAdjuster()(Cmd, "");
Cmd = tooling::getClangSyntaxOnlyAdjuster()(Cmd, "");

std::vector<std::string> ToAppend;
if (ResourceDir && !Has("-resource-dir"))
Cmd.push_back(("-resource-dir=" + *ResourceDir));
ToAppend.push_back(("-resource-dir=" + *ResourceDir));

// Don't set `-isysroot` if it is already set or if `--sysroot` is set.
// `--sysroot` is a superset of the `-isysroot` argument.
if (Sysroot && !Has("-isysroot") && !Has("--sysroot")) {
Cmd.push_back("-isysroot");
Cmd.push_back(*Sysroot);
ToAppend.push_back("-isysroot");
ToAppend.push_back(*Sysroot);
}

if (!ToAppend.empty()) {
Cmd = tooling::getInsertArgumentAdjuster(
std::move(ToAppend), tooling::ArgumentInsertPosition::END)(Cmd, "");
}

if (!Cmd.empty()) {
Expand Down Expand Up @@ -504,7 +512,6 @@ void ArgStripper::process(std::vector<std::string> &Args) const {
Args.resize(Write);
}


std::string printArgv(llvm::ArrayRef<llvm::StringRef> Args) {
std::string Buf;
llvm::raw_string_ostream OS(Buf);
Expand Down
5 changes: 4 additions & 1 deletion clang-tools-extra/clangd/ConfigCompile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "llvm/Support/Regex.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/SourceMgr.h"
#include <algorithm>
#include <string>

namespace clang {
Expand Down Expand Up @@ -270,7 +271,9 @@ struct FragmentCompiler {
Add.push_back(std::move(*A));
Out.Apply.push_back([Add(std::move(Add))](const Params &, Config &C) {
C.CompileFlags.Edits.push_back([Add](std::vector<std::string> &Args) {
Args.insert(Args.end(), Add.begin(), Add.end());
// The point to insert at. Just append when `--` isn't present.
auto It = llvm::find(Args, "--");
Args.insert(It, Add.begin(), Add.end());
});
});
}
Expand Down
44 changes: 21 additions & 23 deletions clang-tools-extra/clangd/Diagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ bool mentionsMainFile(const Diag &D) {
return false;
}

bool isExcluded(const Diag &D) {
bool isExcluded(unsigned DiagID) {
// clang will always fail parsing MS ASM, we don't link in desc + asm parser.
if (D.ID == clang::diag::err_msasm_unable_to_create_target ||
D.ID == clang::diag::err_msasm_unsupported_arch)
if (DiagID == clang::diag::err_msasm_unable_to_create_target ||
DiagID == clang::diag::err_msasm_unsupported_arch)
return true;
return false;
}
Expand Down Expand Up @@ -726,44 +726,42 @@ void StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
// Handle the new main diagnostic.
flushLastDiag();

if (Adjuster) {
LastDiag = Diag();
// FIXME: Merge with feature modules.
if (Adjuster)
DiagLevel = Adjuster(DiagLevel, Info);
if (DiagLevel == DiagnosticsEngine::Ignored) {
LastPrimaryDiagnosticWasSuppressed = true;
return;
}
}
LastPrimaryDiagnosticWasSuppressed = false;

LastDiag = Diag();
FillDiagBase(*LastDiag);
if (isExcluded(LastDiag->ID))
LastDiag->Severity = DiagnosticsEngine::Ignored;
if (DiagCB)
DiagCB(Info, *LastDiag);
// Don't bother filling in the rest if diag is going to be dropped.
if (LastDiag->Severity == DiagnosticsEngine::Ignored)
return;

LastDiagLoc.emplace(Info.getLocation(), Info.getSourceManager());
LastDiagOriginallyError = OriginallyError;

if (!Info.getFixItHints().empty())
AddFix(true /* try to invent a message instead of repeating the diag */);
if (Fixer) {
auto ExtraFixes = Fixer(DiagLevel, Info);
auto ExtraFixes = Fixer(LastDiag->Severity, Info);
LastDiag->Fixes.insert(LastDiag->Fixes.end(), ExtraFixes.begin(),
ExtraFixes.end());
}
if (DiagCB)
DiagCB(Info, *LastDiag);
} else {
// Handle a note to an existing diagnostic.

// If a diagnostic was suppressed due to the suppression filter,
// also suppress notes associated with it.
if (LastPrimaryDiagnosticWasSuppressed) {
return;
}

if (!LastDiag) {
assert(false && "Adding a note without main diagnostic");
IgnoreDiagnostics::log(DiagLevel, Info);
return;
}

// If a diagnostic was suppressed due to the suppression filter,
// also suppress notes associated with it.
if (LastDiag->Severity == DiagnosticsEngine::Ignored)
return;

if (!Info.getFixItHints().empty()) {
// A clang note with fix-it is not a separate diagnostic in clangd. We
// attach it as a Fix to the main diagnostic instead.
Expand All @@ -788,7 +786,7 @@ void StoreDiags::flushLastDiag() {
LastDiag.reset();
});

if (isExcluded(*LastDiag))
if (LastDiag->Severity == DiagnosticsEngine::Ignored)
return;
// Move errors that occur from headers into main file.
if (!LastDiag->InsideMainFile && LastDiagLoc && LastDiagOriginallyError) {
Expand Down
1 change: 0 additions & 1 deletion clang-tools-extra/clangd/Diagnostics.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ class StoreDiags : public DiagnosticConsumer {
SourceManager *OrigSrcMgr = nullptr;

llvm::DenseSet<std::pair<unsigned, unsigned>> IncludedErrorLocations;
bool LastPrimaryDiagnosticWasSuppressed = false;
};

/// Determine whether a (non-clang-tidy) diagnostic is suppressed by config.
Expand Down
13 changes: 13 additions & 0 deletions clang-tools-extra/clangd/InlayHints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,19 @@ class InlayHintVisitor : public RecursiveASTVisitor<InlayHintVisitor> {
return true;
}

bool VisitFunctionDecl(FunctionDecl *D) {
if (auto *AT = D->getReturnType()->getContainedAutoType()) {
QualType Deduced = AT->getDeducedType();
if (!Deduced.isNull()) {
addInlayHint(D->getFunctionTypeLoc().getRParenLoc(),
InlayHintKind::TypeHint,
"-> " + D->getReturnType().getAsString(TypeHintPolicy));
}
}

return true;
}

bool VisitVarDecl(VarDecl *D) {
// Do not show hints for the aggregate in a structured binding.
// In the future, we may show hints for the individual bindings.
Expand Down
6 changes: 5 additions & 1 deletion clang-tools-extra/clangd/tool/ClangdMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,11 @@ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment var

if (CheckFile.getNumOccurrences()) {
llvm::SmallString<256> Path;
llvm::sys::fs::real_path(CheckFile, Path, /*expand_tilde=*/true);
if (auto Error =
llvm::sys::fs::real_path(CheckFile, Path, /*expand_tilde=*/true)) {
elog("Failed to resolve path {0}: {1}", CheckFile, Error.message());
return 1;
}
log("Entering check mode (no LSP server)");
uint32_t Begin = 0, End = std::numeric_limits<uint32_t>::max();
if (!CheckFileLines.empty()) {
Expand Down
12 changes: 6 additions & 6 deletions clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ TEST(CommandMangler, Everything) {
Mangler.ClangPath = testPath("fake/clang");
Mangler.ResourceDir = testPath("fake/resources");
Mangler.Sysroot = testPath("fake/sysroot");
std::vector<std::string> Cmd = {"clang++", "-Xclang", "-load", "-Xclang",
"plugin", "-MF", "dep", "foo.cc"};
std::vector<std::string> Cmd = {"clang++", "-Xclang", "-load",
"-Xclang", "plugin", "-MF",
"dep", "--", "foo.cc"};
Mangler.adjust(Cmd);
EXPECT_THAT(Cmd, ElementsAre(testPath("fake/clang++"), "foo.cc",
"-fsyntax-only",
EXPECT_THAT(Cmd, ElementsAre(testPath("fake/clang++"), "-fsyntax-only",
"-resource-dir=" + testPath("fake/resources"),
"-isysroot", testPath("fake/sysroot")));
"-isysroot", testPath("fake/sysroot"), "--",
"foo.cc"));
}

TEST(CommandMangler, ResourceDir) {
Expand Down Expand Up @@ -378,4 +379,3 @@ TEST(PrintArgvTest, All) {
} // namespace
} // namespace clangd
} // namespace clang

4 changes: 2 additions & 2 deletions clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ TEST_F(ConfigCompileTests, Condition) {
TEST_F(ConfigCompileTests, CompileCommands) {
Frag.CompileFlags.Add.emplace_back("-foo");
Frag.CompileFlags.Remove.emplace_back("--include-directory=");
std::vector<std::string> Argv = {"clang", "-I", "bar/", "a.cc"};
std::vector<std::string> Argv = {"clang", "-I", "bar/", "--", "a.cc"};
EXPECT_TRUE(compileAndApply());
EXPECT_THAT(Conf.CompileFlags.Edits, SizeIs(2));
for (auto &Edit : Conf.CompileFlags.Edits)
Edit(Argv);
EXPECT_THAT(Argv, ElementsAre("clang", "a.cc", "-foo"));
EXPECT_THAT(Argv, ElementsAre("clang", "-foo", "--", "a.cc"));
}

TEST_F(ConfigCompileTests, CompilationDatabase) {
Expand Down
32 changes: 32 additions & 0 deletions clang-tools-extra/clangd/unittests/FeatureModulesTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "Annotations.h"
#include "FeatureModule.h"
#include "Selection.h"
#include "TestTU.h"
Expand Down Expand Up @@ -53,6 +54,37 @@ TEST(FeatureModulesTest, ContributesTweak) {
EXPECT_EQ(Actual->get()->id(), TweakID);
}

TEST(FeatureModulesTest, SuppressDiags) {
struct DiagModifierModule final : public FeatureModule {
struct Listener : public FeatureModule::ASTListener {
void sawDiagnostic(const clang::Diagnostic &Info,
clangd::Diag &Diag) override {
Diag.Severity = DiagnosticsEngine::Ignored;
}
};
std::unique_ptr<ASTListener> astListeners() override {
return std::make_unique<Listener>();
};
};
FeatureModuleSet FMS;
FMS.add(std::make_unique<DiagModifierModule>());

Annotations Code("[[test]]; /* error-ok */");
TestTU TU;
TU.Code = Code.code().str();

{
auto AST = TU.build();
EXPECT_THAT(*AST.getDiagnostics(), testing::Not(testing::IsEmpty()));
}

TU.FeatureModules = &FMS;
{
auto AST = TU.build();
EXPECT_THAT(*AST.getDiagnostics(), testing::IsEmpty());
}
}

} // namespace
} // namespace clangd
} // namespace clang
33 changes: 25 additions & 8 deletions clang-tools-extra/clangd/unittests/InlayHintTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,14 +478,31 @@ TEST(TypeHints, StructuredBindings) {
}

TEST(TypeHints, ReturnTypeDeduction) {
// FIXME: Not handled yet.
// This test is currently here mostly because a naive implementation
// might have us print something not super helpful like the function type.
assertTypeHints(R"cpp(
auto func(int x) {
return x + 1;
}
)cpp");
assertTypeHints(
R"cpp(
auto f1(int x$ret1a[[)]]; // Hint forward declaration too
auto f1(int x$ret1b[[)]] { return x + 1; }

// Include pointer operators in hint
int s;
auto& f2($ret2[[)]] { return s; }

// Do not hint `auto` for trailing return type.
auto f3() -> int;

// `auto` conversion operator
struct A {
operator auto($retConv[[)]] { return 42; }
};

// FIXME: Dependent types do not work yet.
template <typename T>
struct S {
auto method() { return T(); }
};
)cpp",
ExpectedHint{"-> int", "ret1a"}, ExpectedHint{"-> int", "ret1b"},
ExpectedHint{"-> int &", "ret2"}, ExpectedHint{"-> int", "retConv"});
}

TEST(TypeHints, DependentType) {
Expand Down
Loading