Skip to content

LLVM and SPIRV-LLVM-Translator pulldown (WW01-02) #3015

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 351 commits into from
Jan 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
351 commits
Select commit Hold shift + click to select a range
5c1c844
[lldb] Abstract scoped timer logic behind LLDB_SCOPED_TIMER (NFC)
JDevlieghere Dec 21, 2020
be85b3e
Fix some misnamed variables in sve-fixed-length-int-minmax.ll.
paulwalker-arm Dec 22, 2020
5d10b8a
[ADT] Add resize_for_overwrite method to SmallVector.
njames93 Dec 22, 2020
f106b28
[tests] precommit a test mentioned in review for D93317
preames Dec 22, 2020
ac90bbc
[LoopDeletion] Add test case where outer loop needs to be deleted.
fhahn Dec 22, 2020
f507148
[ADT] Fix some tests after 5d10b8ad
njames93 Dec 22, 2020
e17a00f
[lldb] Add SBType::IsScopedEnumerationType method
werat Dec 22, 2020
1432ae5
[lldb] Add SBType::GetEnumerationIntegerType method
werat Dec 22, 2020
612ddc3
[OpenMP][Docs] Updated the faq about building an OpenMP offloading ca…
shiltian Dec 22, 2020
85d4a4b
Revert "Fix memory leak complicated non-type template arguments."
aeubanks Dec 22, 2020
ab7a60e
Revert "Fix MSVC "not all control paths return a value" warnings. NFCI."
aeubanks Dec 22, 2020
2080232
Revert "[c++20] P1907R1: Support for generalized non-type template ar…
aeubanks Dec 22, 2020
af0dbaa
Revert "Following up on PR48517, fix handling of template arguments t…
aeubanks Dec 22, 2020
34e72a1
Revert "DR2064: decltype(E) is only a dependent type if E is type-dep…
aeubanks Dec 22, 2020
1aa10ab
Revert "[Flang][openmp][5.0] Add task_reduction clause."
Dec 22, 2020
b2e734d
Revert "[clangd] zap a few warnings"
aeubanks Dec 22, 2020
6283d2a
Revert "[LLDB] Unbreak the build after recent clang changes"
aeubanks Dec 22, 2020
a5311d7
[clang-tidy] Handle template instantiations in container size check
steveire Oct 27, 2020
ae8f4b2
[AMDGPU] Folding of FI operand with flat scratch
rampitec Dec 18, 2020
333108e
Add a llvm.coro.end.async intrinsic
aschwaighofer Dec 15, 2020
9cb7487
[OpenMP][Docs] Add FAQ entry about math and complex on GPUs
jdoerfert Dec 22, 2020
1eb082c
[OpenMP][Docs] Fixed a typo in the doc that can mislead users to a CM…
shiltian Dec 22, 2020
7b0f9dd
[OpenMP][Docs] Fix Typo
jdoerfert Dec 22, 2020
53deef9
[RISCV] Remove unneeded !eq comparing a single bit value to 0/1 in RI…
topperc Dec 22, 2020
7ec7788
Try to fix build on Windows
steveire Dec 22, 2020
57ffbe0
glld/mac] Don't add names of unreferenced symbols to string table
nico Dec 22, 2020
0d15d4b
[SLP] use operand index abstraction for number of operands
rotateright Dec 22, 2020
f6929c0
[SLP] add reduction tests for maxnum/minnum intrinsics; NFC
rotateright Dec 22, 2020
3dbe471
[clangd] Use atomics instead of locks to track periodic memory trimming
sam-mccall Dec 22, 2020
df6cbd3
[mlir] Lower gpu.memcpy to GPU runtime calls.
chsigg Dec 22, 2020
f7a2612
[clangd] Release notes for b8c37153d5393aad96
sam-mccall Dec 22, 2020
a781a70
[WebAssembly][SIMD] Rename shuffle, swizzle, and load_splats
tlively Dec 22, 2020
8de43b9
[mlir] Remove instance methods from LLVMType
ftynse Dec 22, 2020
1c19804
[OpenMP] Add OpenMP Documentation for Libomptarget environment variables
jhuber6 Dec 22, 2020
75a3f32
[IR] Add an ImplicitLocOpBuilder helper class for building IR with th…
lattner Dec 22, 2020
6dfe580
scudo: Move the configuration for the primary allocator to Config. NFCI.
pcc Dec 15, 2020
ca4bf58
[AMDGPU] Support unaligned flat scratch in TLI
rampitec Dec 21, 2020
d15119a
[AMDGPU][GlobalISel] GlobalISel for flat scratch
rampitec Dec 21, 2020
e6b3db6
scudo: Replace the Cache argument on MapAllocator with a Config argum…
pcc Dec 15, 2020
faac1c0
scudo: Move the management of the UseMemoryTagging bit out of the Pri…
pcc Dec 22, 2020
22cf54a
Replace `T(x)` with `reinterpret_cast<T>(x)` everywhere it means rein…
Quuxplusone Mar 23, 2020
5bec082
VirtRegMap: Use Register
arsenm Dec 17, 2020
29ed846
AMDGPU: Fix assert when checking for implicit operand legality
arsenm Dec 21, 2020
c887446
[RISCV] Add intrinsics for vslide1up/down, vfslide1up/down instruction
arcbbb Dec 21, 2020
4268783
[RISCV] Add intrinsics for vwmacc[u|su|us] instructions
arcbbb Dec 22, 2020
ad0a7ad
[RISCV] Add intrinsics for vf[n]macc/vf[n]msac/vf[n]madd/vf[n]msub in…
arcbbb Dec 22, 2020
bac5463
AMDGPU: Add spilled CSR SGPRs to entry block live ins
arsenm Dec 18, 2020
8bf9cde
AMDGPU: Use Register
arsenm Dec 18, 2020
77fb45e
[lld/mac] Add --version flag
nico Dec 22, 2020
581d13f
GlobalISel: Return APInt from getConstantVRegVal
arsenm Nov 3, 2020
e6fde1a
[MemorySSA] Use is_contained (NFC)
kazutakahirata Dec 23, 2020
efe7f5e
[WebAssembly][NFC] Refactor SIMD load/store tablegen defs
tlively Dec 23, 2020
3c707d7
[NewGVN] Remove for_each_found (NFC)
kazutakahirata Dec 23, 2020
0219cf7
[NewPM] Fix objc-arc-apelim pass typo
aeubanks Dec 23, 2020
4d47944
[RISCV] Define the vfmin, vfmax RVV intrinsics
Dec 23, 2020
032600b
[RISCV] Define vmerge/vfmerge intrinsics.
zakk0610 Dec 22, 2020
bdef1f8
[llvm-readobj] - Dump the ELF file type better.
Dec 22, 2020
6301871
[RISCV] Add intrinsics for vfwmacc, vfwnmacc, vfwmsac, vfwnmsac instr…
arcbbb Dec 22, 2020
221fded
[AMDGPU][GlobalISel] Fold flat vgpr + constant addresses
Flakebi Dec 22, 2020
65ba0cd
[mlir] Modernize std-to-llvm operation conversion doc
ftynse Dec 23, 2020
8451d48
[mlir] NFC: Remove ConvertToLLVMPattern::getDataPtr(). All call sites…
chsigg Dec 23, 2020
32a884c
[mlir] Add translation of omp.wsloop to LLVM IR
ftynse Dec 8, 2020
19a0d0a
[mlir] Rename ConvertToLLVMPattern::isSupportedMemRefType() to isConv…
chsigg Dec 23, 2020
25a02c3
Revert "PR24076, PR33655, C++ CWG 1558: Consider the instantiation-de…
akuegel Dec 23, 2020
eb9483b
[format] Add overload to parseConfiguration that accept llvm::MemoryB…
njames93 Dec 23, 2020
7ed9cfc
[mlir] Remove static constructors from LLVMType
ftynse Dec 22, 2020
c3acda0
[VE] Vector 'and' isel and tests
Dec 23, 2020
acaa6e4
[NFC] Uniquify 'const' in TargetTransformInfoImpl.h
Dec 23, 2020
a9f14cd
[ARM] Add bank conflict hazarding
dpenry Dec 23, 2020
6e60346
[OpenMP] Fixing Typo in Documentation
jhuber6 Dec 23, 2020
5426b2f
[clang-format] PR48535 clang-format Incorrectly Removes Space After C…
mydeveloperday Dec 23, 2020
031743c
[clang-format] PR48539 ReflowComments breaks Qt translation comments
mydeveloperday Dec 23, 2020
1d0dc9b
[MLIR][SPIRV] Add rewrite pattern to convert select+cmp into GLSL clamp.
ergawy Dec 23, 2020
2522fa0
[clangd] Do not take stale definition from the static index.
ArcsinX Dec 23, 2020
9fb074e
[BPI] Improve static heuristics for "cold" paths.
ebrevnov Jun 18, 2020
e122a71
[TableGen] Add the !substr() bang operator
Dec 16, 2020
9d1140e
[lld-macho] Simulator & DriverKit executables should always be PIE
int3 Dec 23, 2020
631501b
[OpenMP] Fixing typo on memory size in Documenation
jhuber6 Dec 23, 2020
7ad6667
Revert 741978d727 and things that landed on top of it.
nico Dec 23, 2020
42980a7
[mlir][spirv] Convert functions returning one value
antiagainst Dec 23, 2020
fcf9479
[lldb] Don't instrument demangling.
JDevlieghere Dec 22, 2020
a944887
[lldb] Refactor and simplify GetCommandSPExact interface
JDevlieghere Dec 22, 2020
e0110a4
[RISCV] Add intrinsics for vfmv.v.f
topperc Dec 23, 2020
b920adf
This is a test commit
evodius96 Dec 23, 2020
3b3a9d2
Updated GettingInvolved.md to reflect Flang Biweekly Call changes
AlexisPerry Dec 23, 2020
b1191c8
[IROutliner] Adding support for elevating constants that are not the …
AndrewLitteken Sep 15, 2020
bbd758a
Revert "This is a test commit"
evodius96 Dec 23, 2020
1876a29
Revert more changes that landed on top of 741978d727
nico Dec 23, 2020
7418688
[mlir][vector] Add more vector Ops canonicalization
ThomasRaoux Dec 11, 2020
4c37453
clang: Build and run FrontendTests with CLANG_ENABLE_STATIC_ANALYZER=…
nico Dec 23, 2020
e124844
[LoopIdiom] Introduce 'left-shift until bittest' idiom
LebedevRI Dec 23, 2020
cb2e598
[LoopIdiom] 'left-shift until bittest' idiom: support constant bit mask
LebedevRI Dec 23, 2020
a0ddc61
[LoopIdiom] 'left-shift until bittest' idiom: support canonical sign …
LebedevRI Dec 23, 2020
2b61e7c
[LoopIdiom] 'left-shift until bittest' idiom: support rewriting loop …
LebedevRI Dec 23, 2020
a16fbff
[mlir][spirv] Create a pass for testing SCFToSPIRV patterns
antiagainst Dec 23, 2020
34e70d7
Append ".__part." to every basic block section symbol.
tmsri Dec 23, 2020
930c74f
[mlir][spirv] NFC: rename SPIR-V conversion files for consistency
antiagainst Dec 23, 2020
897990e
[IROutliner] Use isa instead of dyn_cast where the casted value isn't…
topperc Dec 23, 2020
ae895ac
[mlir][spirv] De-template deserialization
antiagainst Dec 23, 2020
fc41777
[mlir][spirv] De-template serialization
antiagainst Dec 23, 2020
de127d8
[InstCombine] Add tests for PR48577 (NFC)
nikic Dec 23, 2020
899faa5
[InstCombine] Check inbounds in load/store of gep null transform (PR4…
nikic Dec 23, 2020
1a7ac29
[RISCV] Add ISel support for RVV vector/scalar forms
frasercrmck Dec 15, 2020
c7e825b
[format][NFC] Use unsigned char as the base of all enums in FormatStyle
njames93 Dec 23, 2020
87087a0
[InstCombine] Add tests for gep of null (NFC)
nikic Dec 23, 2020
eb79fd3
[InstCombine] Fold gep inbounds of null to null
nikic Dec 23, 2020
759b8c1
[InstCombine] Handle different pointer types when folding gep of null
nikic Dec 23, 2020
cce473e
[IRSim] Adding commutativity matching to structure checking
AndrewLitteken Aug 22, 2020
0503926
[IRSim] Adding support for isomorphic predicates
AndrewLitteken Aug 23, 2020
f807935
[InstCombine] canonicalizeAbsNabs(): don't propagate NSW flag for NAB…
LebedevRI Dec 23, 2020
374f1d8
[clang-format] Fix handling of TextProto comments
HazardyKnusperkeks Dec 12, 2020
47877c9
[clang-format] Add SpaceBeforeCaseColon option
HazardyKnusperkeks Dec 14, 2020
45a4f34
Revert "[IRSim] Adding support for isomorphic predicates"
AndrewLitteken Dec 23, 2020
74b3ace
[clangd] Fix case mismatch crash on in CDB on windows after 92dd077af…
sam-mccall Dec 23, 2020
d97e9f1
[lldb] Simplify ObjectFile::FindPlugin (NFC)
JDevlieghere Dec 23, 2020
7143923
Fix lldb test failure due to D93082.
tmsri Dec 23, 2020
be89d74
[lld][test] Relax test assertion of cmake defaults appearing in --ver…
rupprecht Dec 23, 2020
747f67e
[AMDGPU] Fix adjustWritemask subreg handling
rampitec Dec 23, 2020
245218b
Basic: Support named pipes natively in SourceManager and FileManager
dexonsmith Dec 3, 2020
3ee43ad
Basic: Add native support for stdin to SourceManager and FileManager
dexonsmith Dec 10, 2020
ca1ab0c
[mlir] Add tensor passes to passes.md
jpienaar Dec 24, 2020
d29f93b
[DAGCombiner] Don't create sexts of deleted xors when they were in-vi…
laytonio Dec 24, 2020
69132d1
[Clang] Reverse test to save on indentation. NFC.
aganea Dec 24, 2020
48ad819
[IRSim] Adding support for isomorphic predicates
AndrewLitteken Aug 23, 2020
db7a2f3
Precommit transform tests that have poison as insertelement's placeho…
aqjune Dec 24, 2020
3036547
Precommit analysis/etc tests for inselt poison placeholder
aqjune Dec 24, 2020
9939cf5
[ExecutionEngine, Linker] Use erase_if (NFC)
kazutakahirata Dec 24, 2020
200b15a
[Analysis] Remove spliceFunction (NFC)
kazutakahirata Dec 24, 2020
b8cb180
[obj2yaml] - Dump the content of a broken GNU hash table properly.
Dec 23, 2020
9017791
Revert "[InstCombine] Fold gep inbounds of null to null"
nikic Dec 24, 2020
6117794
[AMDGPU] Use MUBUF instructions for global address space access
pvellien Dec 24, 2020
e075123
[CodeGen] Add "noreturn" attirbute to _Unwind_Resume
Dec 23, 2020
ef2f843
Revert "[InstCombine] Check inbounds in load/store of gep null transf…
nikic Dec 24, 2020
ce4413e
Moved dwarf_eh_resume.ll from Generic to X86 folder
Dec 24, 2020
fb46895
[Support] Explicitly state that KnownBits::getMinValue/getMaxValue ar…
RKSimon Dec 23, 2020
6895581
[Support] Add KnownBits::getSignedMinValue/getSignedMaxValue helpers.
RKSimon Dec 24, 2020
89abe1c
[InstCombine] foldICmpUsingKnownBits - use KnownBits signed/unsigned …
RKSimon Dec 24, 2020
df81211
[CodeGen, Transforms] Use llvm::any_of (NFC)
kazutakahirata Dec 24, 2020
e457896
[CodeGen] Remove unused function hasInlineAsmMemConstraint (NFC)
kazutakahirata Dec 24, 2020
ff3749f
[NFC] SimplifyCFGOpt::simplifyUnreachable(): pacify unused variable w…
LebedevRI Dec 24, 2020
b3021a7
[IR][InstCombine] Add m_ImmConstant(), that matches on non-ConstantEx…
LebedevRI Dec 24, 2020
da4c7e1
[NFC][InstCombine] Autogenerate check lines in vec_shuffle.ll test
LebedevRI Dec 24, 2020
1fda233
[NFC][InstCombine] Add test for `a & ~(a ^ b)` pattern
LebedevRI Dec 24, 2020
5b78303
[InstCombine] Fold `a & ~(a ^ b)` to `x & y`
LebedevRI Dec 24, 2020
8001dcb
[NFC][InstCombine] Add test coverage for `(x ^ C) ^ y` pattern
LebedevRI Dec 24, 2020
d9ebaee
[InstCombine] Hoist xor-by-constant from xor-by-value
LebedevRI Dec 24, 2020
6e074a8
[NFC][LoopIdiom] Improve test coverage for 'left-shift-until-bittest'…
LebedevRI Dec 24, 2020
25aebe2
[LoopIdiom] 'left-shift-until-bittest': keep no-wrap flags on shift, …
LebedevRI Dec 24, 2020
afd03cd
[RISCV] Define vector single-width reduction intrinsic.
monkchiang Dec 24, 2020
912740a
[RISCV] Add intrinsics for vrgather instruction
arcbbb Dec 24, 2020
351c216
[RISCV] Define vector mask-register logical intrinsics.
zakk0610 Dec 25, 2020
d6ff5cf
[Target] Use llvm::any_of (NFC)
kazutakahirata Dec 25, 2020
da4a637
[RISCV] Define vpopc/vfirst intrinsics.
zakk0610 Dec 23, 2020
e0721a0
[AArch64][GlobalISel] Notify observer of mutated instruction for shif…
aemerson Dec 25, 2020
438bc15
[libObject] - Add more ELF types to LLVM_ELF_IMPORT_TYPES_ELFT define…
Dec 24, 2020
177779e
[llvm-readelf/obj] - Improve the warning reported when unable to read…
Dec 24, 2020
893c84d
[obj2yaml] - Dump the content of a broken hash table properly.
Dec 24, 2020
a2ca6bb
[Flang][OpenMP] Add semantic check for OpenMP Private, Firstprivate a…
praveen-g-ctt Dec 25, 2020
621ad46
[mlir] Async: lowering async.value to LLVM
ezhulenev Dec 24, 2020
61422c8
[mlir] Async: add support for lowering async value operands to LLVM
ezhulenev Dec 24, 2020
b96a6ea
[BasicAA] Make sure context instruction is symmetric
nikic Dec 13, 2020
a3614a3
[BasicAA] Pass context instruction to isKnownNonZero()
nikic Dec 25, 2020
b0e6007
[InstCombine] Add additional tests for known non zero (NFC)
nikic Dec 25, 2020
35676a4
[InstCombine] Generalize icmp handling in isKnownNonZero()
nikic Dec 25, 2020
ea39991
[llvm-nm, llvm-objdump] Use llvm::is_contained (NFC)
kazutakahirata Dec 25, 2020
c795dd1
[BasicAA] Pass AC/DT to isKnownNonEqual()
nikic Dec 25, 2020
46bea9b
[Local] Remove unused function RemovePredecessorAndSimplify (NFC)
kazutakahirata Dec 25, 2020
e334c52
[llvm-objcopy] Use llvm::erase_if (NFC)
kazutakahirata Dec 25, 2020
622ea9c
[RISCV] Define vector widening reduction intrinsic.
monkchiang Dec 26, 2020
e8c7e7c
[ValueTracking] Add more known non zero tests (NFC)
nikic Dec 26, 2020
b218407
[ValueTracking] Handle more non-trivial conditions in isKnownNonZero()
nikic Dec 26, 2020
c7dcc4c
[clang-format] PR48569 clang-format fails to align case label with `s…
mydeveloperday Dec 26, 2020
c4ca108
[SLP] use switch to improve readability; NFC
rotateright Dec 22, 2020
badf0f2
[SLP] rename reduction variables for readability; NFC
rotateright Dec 24, 2020
62beac7
[NFC] Refactor some SourceMgr code
njames93 Dec 26, 2020
9c9bca4
[llvm-pdbutil] Use llvm::is_contained (NFC)
kazutakahirata Dec 26, 2020
63a2bde
[TableGen] Use llvm::erase_if (NFC)
kazutakahirata Dec 26, 2020
b676f2f
[llvm-cov, llvm-symbolizer] Use llvm::erase_if (NFC)
kazutakahirata Dec 26, 2020
5bc5c01
[CVP] Add tests for select form of and/or (NFC)
nikic Dec 26, 2020
8791949
[test] Pin some tests to legacy PM
aeubanks Dec 26, 2020
9eb3e56
[ODS] Make the getType() method on a OneResult instruction return a s…
lattner Dec 24, 2020
76202f0
[RISCV] Improve VMConstraint checking on more unary and nullary instr…
topperc Dec 27, 2020
33051d5
[X86] Remove X86Fmadd SDNode from tablegen. Use standard fma instead.…
topperc Dec 27, 2020
7df3544
[GlobalISel] Fix assertion failures after "GlobalISel: Return APInt f…
aemerson Dec 27, 2020
aca4488
[lldb] Surpress "ingoring result" warning in reproducer_handler
labath Dec 27, 2020
bd39a5c
[lldb/test] Automatically skip remote lldb-server tests when applicable
labath Dec 18, 2020
7a3e11f
[ARM] Add some NEON anyextend testing. NFC
davemgreen Dec 27, 2020
0c6e19b
[AArch64] Add some anyextend testing. NFC
davemgreen Dec 27, 2020
fb77d95
[AArch64] Fix legalization of i128 ctpop without neon
nikic Dec 26, 2020
0af42d3
[PatternMatch][LVI] Handle select-form and/or in LVI
nikic Dec 22, 2020
0799233
[llvm-cov] Use is_contained (NFC)
kazutakahirata Dec 27, 2020
789d250
[CodeGen, Transforms] Use *Map::lookup (NFC)
kazutakahirata Dec 27, 2020
8299fb8
[Transforms] Use llvm::append_range (NFC)
kazutakahirata Dec 27, 2020
0ea3749
[LV] Set up branch from middle block earlier.
fhahn Dec 27, 2020
0d05c1f
[GVN] Add tests for select form of and/or (NFC)
aqjune Dec 27, 2020
0060f10
[EarlyCSE] Add tests for select form of and/or (NFC)
aqjune Dec 27, 2020
f1d648b
[GVN] Use m_LogicalAnd/Or to propagate equality from branch conditions
aqjune Dec 27, 2020
d3f1f7b
[EarlyCSE] Use m_LogicalAnd/Or matchers to handle branch conditions
aqjune Dec 27, 2020
eca40c3
[ValueTracking] Add unit tests for isKnownNonZero, isImpliedCondition…
aqjune Dec 27, 2020
4ad4190
[GVN] Correctly set modified status when doing PRE on indices.
fhahn Dec 27, 2020
860199d
[ValueTracking] Use m_LogicalAnd/Or to look into conditions
aqjune Dec 27, 2020
9d70dbd
[InstCombine] use poison as placeholder for undemanded elems
aqjune Dec 27, 2020
d76c1d2
[RS4GC] Lazily set changed flag when folding single entry phis
Dec 28, 2020
31c2b93
[MachineSink] add threshold in machinesink pass to reduce compiling t…
Dec 28, 2020
fde3ae8
[asan][memprof] Declare _DYNAMIC and fix -Wparentheses
MaskRay Dec 28, 2020
0b56e3c
[sanitizer] Defined SANITIZER_TEST_HAS_PVALLOC only on glibc
MaskRay Dec 28, 2020
99d650b
[compiler-rt][test] Make glibc-* feature detection work on a musl dis…
MaskRay Dec 28, 2020
60afb58
[msan] Delete unused glibc header <execinfo.h>
MaskRay Dec 28, 2020
d85a198
[RISCV] Pattern-match more vector-splatted constants
frasercrmck Dec 24, 2020
a485a59
[benchmark] Fixed a build error when using CMake 3.15.1 + NDK-R20
AnzhongHuang Dec 28, 2020
5b17263
[AMDGPU][MC][NFC] Parser refactoring
dpreobra Dec 28, 2020
8c25bb3
[AMDGPU][MC] Improved errors handling for v_interp* operands
dpreobra Dec 28, 2020
e673d40
[RISCV] Define vmsbf.m/vmsif.m/vmsof.m/viota.m/vid.v intrinsics.
zakk0610 Dec 25, 2020
644da78
[AMDGPU] Split edge to make si_if dominate end_cf
alex-t Nov 13, 2020
0999408
[clangd] Add error handling (elog) in code completion.
gislan Dec 14, 2020
c3b9d85
[clang-tidy][NFC] Remove unnecessary headers
njames93 Dec 28, 2020
e73f885
[PowerPC] Remove redundant COPY_TO_REGCLASS introduced by 8a58f21f5b6c
nemanjai Dec 28, 2020
496fb70
[MachO] Fix enum-int mismatch warning
Dec 28, 2020
d55627d
[flang] Fix bugs in .mod file for abstract interface
tskeith Dec 28, 2020
b9a7c89
[MIRPrinter] Fix incorrect output of unnamed stack names
Dec 28, 2020
d4ccef3
[InstCombine] 'hoist xor-by-constant from xor-by-value': ignore const…
LebedevRI Dec 28, 2020
4820af9
[TableGen] Fix bug in !interleave operator
Dec 25, 2020
38bfa25
Revert "[benchmark] Fixed a build error when using CMake 3.15.1 + NDK…
LebedevRI Dec 28, 2020
c7ff2c0
[AMDGPU][MC][NFC] Split large asm tests into smaller chunks
dpreobra Dec 28, 2020
dcd2157
[ValueTracking] Fix isKnownNonEqual() with constexpr mul
nikic Dec 28, 2020
e4df6a4
[LV] Vectorize (some) early and multiple exit loops
preames Dec 28, 2020
4ffcd4f
Revert "[LV] Vectorize (some) early and multiple exit loops"
aeubanks Dec 28, 2020
4b33b23
Reapply "[LV] Vectorize (some) early and multiple exit loops"" w/fix …
preames Dec 28, 2020
30f589c
[libc++] Constexpr-proof some machinery in not_fn.pass.cpp. NFCI.
Quuxplusone Dec 25, 2020
7b00e9f
[libc++] [P1065] Constexpr invoke, reference_wrapper, mem_fn, not_fn,…
Quuxplusone Dec 25, 2020
9abc457
[NewPM][AMDGPU] Port amdgpu-simplifylib/amdgpu-usenative
aeubanks Dec 28, 2020
dd756e3
[libc++] Fix a test failure in 7b00e9fae3 (D93815).
Quuxplusone Dec 28, 2020
76a718e
[lldb] Deduplicate some lldb-server tests
labath Dec 19, 2020
cf8f682
[RISCV] Adjust tested vor ops for more stable tests. NFC.
frasercrmck Dec 28, 2020
34405b4
[CodeGen][ObjC] Destroy callee-destroyed arguments in the caller
ahatanaka Dec 28, 2020
6d02d12
[AMDGPU][MC][NFC] Added more tests for flat_global
dpreobra Dec 28, 2020
f931290
[PowerPC] Parse and ignore .machine
MaskRay Dec 28, 2020
ef93f7a
[SimplifyCFG] FoldBranchToCommonDest: gracefully handle unreachable c…
LebedevRI Dec 28, 2020
87c032f
[IR] Make Value::getType() work better with invalid IR.
lattner Dec 28, 2020
1351f71
[InstSimplify] add tests for ctpop; NFC (PR48608)
rotateright Dec 28, 2020
236c452
[InstSimplify] remove ctpop of 1 (low) bit
rotateright Dec 28, 2020
b4655a0
[NFC][sanitizer] Remove unused typedef
vitalybuka Dec 24, 2020
0c8f4f8
Reenable -disable-llvm-passes lost in pulldown.
tianqingw Jan 6, 2021
839d45b
Merge from 'sycl' to 'sycl-web'
Jan 7, 2021
e2b359c
Merge from 'main' to 'sycl-web' (#3)
ochupina Jan 7, 2021
7472639
Add test.
tianqingw Jan 8, 2021
34d8419
Merge remote-tracking branch 'otcshare_llvm/sycl-web' into llvmspirv_…
vmaksimo Jan 11, 2021
bcaa1ca
Merge commit 'b4655a0815d0cd75297cfe323526397ee7a03dca' into llvmspir…
vmaksimo Jan 11, 2021
cc2437d
Instantiate atomic instructions via inheritance
Dec 7, 2020
fbd9079
Merge branch 'pr_2999' into llvmspirv_pulldown
vmaksimo Jan 12, 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
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions clang-tools-extra/clang-tidy/ClangTidy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@
#include "ExpandModularHeadersPPCallbacks.h"
#include "clang-tidy-config.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Format/Format.h"
#include "clang/Frontend/ASTConsumers.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Frontend/MultiplexConsumer.h"
#include "clang/Frontend/TextDiagnosticPrinter.h"
Expand All @@ -43,7 +40,6 @@
#include "clang/Tooling/ReplacementsYaml.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Signals.h"
#include <algorithm>
#include <utility>

Expand Down
2 changes: 0 additions & 2 deletions clang-tools-extra/clang-tidy/ClangTidyCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/YAMLParser.h"
#include "llvm/Support/raw_ostream.h"

namespace clang {
namespace tidy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,24 @@
#include "clang/AST/Attr.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/DiagnosticRenderer.h"
#include "clang/Tooling/Core/Diagnostic.h"
#include "clang/Tooling/Core/Replacement.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Regex.h"
#include <tuple>
#include <vector>
using namespace clang;
using namespace tidy;

#ifdef LLVM_CLANG_AST_ATTR_H
//#error
#endif

namespace {
class ClangTidyDiagnosticRenderer : public DiagnosticRenderer {
public:
Expand Down
2 changes: 0 additions & 2 deletions clang-tools-extra/clang-tidy/ClangTidyModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include <functional>
#include <map>
#include <memory>
#include <string>

namespace clang {
namespace tidy {
Expand Down
1 change: 0 additions & 1 deletion clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "llvm/Support/MemoryBufferRef.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/raw_ostream.h"
#include <utility>

#define DEBUG_TYPE "clang-tidy-options"
Expand Down
2 changes: 0 additions & 2 deletions clang-tools-extra/clang-tidy/ClangTidyProfiling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
//===----------------------------------------------------------------------===//

#include "ClangTidyProfiling.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/raw_ostream.h"
#include <system_error>
#include <utility>
Expand Down
183 changes: 148 additions & 35 deletions clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,77 @@
using namespace clang::ast_matchers;

namespace clang {
namespace ast_matchers {
AST_POLYMORPHIC_MATCHER_P2(hasAnyArgumentWithParam,
AST_POLYMORPHIC_SUPPORTED_TYPES(CallExpr,
CXXConstructExpr),
internal::Matcher<Expr>, ArgMatcher,
internal::Matcher<ParmVarDecl>, ParamMatcher) {
BoundNodesTreeBuilder Result;
// The first argument of an overloaded member operator is the implicit object
// argument of the method which should not be matched against a parameter, so
// we skip over it here.
BoundNodesTreeBuilder Matches;
unsigned ArgIndex = cxxOperatorCallExpr(callee(cxxMethodDecl()))
.matches(Node, Finder, &Matches)
? 1
: 0;
int ParamIndex = 0;
for (; ArgIndex < Node.getNumArgs(); ++ArgIndex) {
BoundNodesTreeBuilder ArgMatches(*Builder);
if (ArgMatcher.matches(*(Node.getArg(ArgIndex)->IgnoreParenCasts()), Finder,
&ArgMatches)) {
BoundNodesTreeBuilder ParamMatches(ArgMatches);
if (expr(anyOf(cxxConstructExpr(hasDeclaration(cxxConstructorDecl(
hasParameter(ParamIndex, ParamMatcher)))),
callExpr(callee(functionDecl(
hasParameter(ParamIndex, ParamMatcher))))))
.matches(Node, Finder, &ParamMatches)) {
Result.addMatch(ParamMatches);
*Builder = std::move(Result);
return true;
}
}
++ParamIndex;
}
return false;
}

AST_MATCHER(Expr, usedInBooleanContext) {
const char *ExprName = "__booleanContextExpr";
auto Result =
expr(expr().bind(ExprName),
anyOf(hasParent(varDecl(hasType(booleanType()))),
hasParent(cxxConstructorDecl(
hasAnyConstructorInitializer(cxxCtorInitializer(
withInitializer(expr(equalsBoundNode(ExprName))),
forField(hasType(booleanType())))))),
hasParent(fieldDecl(hasType(booleanType()))),
hasParent(stmt(anyOf(
explicitCastExpr(hasDestinationType(booleanType())),
ifStmt(hasCondition(expr(equalsBoundNode(ExprName)))),
doStmt(hasCondition(expr(equalsBoundNode(ExprName)))),
whileStmt(hasCondition(expr(equalsBoundNode(ExprName)))),
forStmt(hasCondition(expr(equalsBoundNode(ExprName)))),
conditionalOperator(
hasCondition(expr(equalsBoundNode(ExprName)))),
parenListExpr(hasParent(varDecl(hasType(booleanType())))),
parenExpr(hasParent(
explicitCastExpr(hasDestinationType(booleanType())))),
returnStmt(forFunction(returns(booleanType()))),
cxxUnresolvedConstructExpr(hasType(booleanType())),
callExpr(hasAnyArgumentWithParam(
expr(equalsBoundNode(ExprName)),
parmVarDecl(hasType(booleanType())))),
binaryOperator(hasAnyOperatorName("&&", "||")),
unaryOperator(hasOperatorName("!")).bind("NegOnSize"))))))
.matches(Node, Finder, Builder);
Builder->removeBindings([ExprName](const BoundNodesMap &Nodes) {
return Nodes.getNode(ExprName).getNodeKind().isNone();
});
return Result;
}
} // namespace ast_matchers
namespace tidy {
namespace readability {

Expand All @@ -26,18 +97,27 @@ ContainerSizeEmptyCheck::ContainerSizeEmptyCheck(StringRef Name,
: ClangTidyCheck(Name, Context) {}

void ContainerSizeEmptyCheck::registerMatchers(MatchFinder *Finder) {
const auto ValidContainer = qualType(hasUnqualifiedDesugaredType(
recordType(hasDeclaration(cxxRecordDecl(isSameOrDerivedFrom(
namedDecl(
has(cxxMethodDecl(
isConst(), parameterCountIs(0), isPublic(),
hasName("size"),
returns(qualType(isInteger(), unless(booleanType()))))
.bind("size")),
has(cxxMethodDecl(isConst(), parameterCountIs(0), isPublic(),
hasName("empty"), returns(booleanType()))
.bind("empty")))
.bind("container")))))));
const auto ValidContainerRecord = cxxRecordDecl(isSameOrDerivedFrom(
namedDecl(
has(cxxMethodDecl(isConst(), parameterCountIs(0), isPublic(),
hasName("size"),
returns(qualType(isInteger(), unless(booleanType()),
unless(elaboratedType()))))
.bind("size")),
has(cxxMethodDecl(isConst(), parameterCountIs(0), isPublic(),
hasName("empty"), returns(booleanType()))
.bind("empty")))
.bind("container")));

const auto ValidContainerNonTemplateType =
qualType(hasUnqualifiedDesugaredType(
recordType(hasDeclaration(ValidContainerRecord))));
const auto ValidContainerTemplateType =
qualType(hasUnqualifiedDesugaredType(templateSpecializationType(
hasDeclaration(classTemplateDecl(has(ValidContainerRecord))))));

const auto ValidContainer = qualType(
anyOf(ValidContainerNonTemplateType, ValidContainerTemplateType));

const auto WrongUse = traverse(
TK_AsIs,
Expand All @@ -52,18 +132,34 @@ void ContainerSizeEmptyCheck::registerMatchers(MatchFinder *Finder) {
anyOf(hasParent(
unaryOperator(hasOperatorName("!")).bind("NegOnSize")),
anything()))),
hasParent(explicitCastExpr(hasDestinationType(booleanType())))));
usedInBooleanContext()));

Finder->addMatcher(
cxxMemberCallExpr(on(expr(anyOf(hasType(ValidContainer),
cxxMemberCallExpr(unless(isInTemplateInstantiation()),
on(expr(anyOf(hasType(ValidContainer),
hasType(pointsTo(ValidContainer)),
hasType(references(ValidContainer))))),
hasType(references(ValidContainer))))
.bind("MemberCallObject")),
callee(cxxMethodDecl(hasName("size"))), WrongUse,
unless(hasAncestor(cxxMethodDecl(
ofClass(equalsBoundNode("container"))))))
.bind("SizeCallExpr"),
this);

Finder->addMatcher(
callExpr(has(cxxDependentScopeMemberExpr(
hasObjectExpression(
expr(anyOf(hasType(ValidContainer),
hasType(pointsTo(ValidContainer)),
hasType(references(ValidContainer))))
.bind("MemberCallObject")),
hasMemberName("size"))),
WrongUse,
unless(hasAncestor(
cxxMethodDecl(ofClass(equalsBoundNode("container"))))))
.bind("SizeCallExpr"),
this);

// Empty constructor matcher.
const auto DefaultConstructor = cxxConstructExpr(
hasDeclaration(cxxConstructorDecl(isDefaultConstructor())));
Expand All @@ -72,12 +168,11 @@ void ContainerSizeEmptyCheck::registerMatchers(MatchFinder *Finder) {
ignoringImpCasts(stringLiteral(hasSize(0))),
ignoringImpCasts(cxxBindTemporaryExpr(has(DefaultConstructor))),
ignoringImplicit(DefaultConstructor),
cxxConstructExpr(
hasDeclaration(cxxConstructorDecl(isCopyConstructor())),
has(expr(ignoringImpCasts(DefaultConstructor)))),
cxxConstructExpr(
hasDeclaration(cxxConstructorDecl(isMoveConstructor())),
has(expr(ignoringImpCasts(DefaultConstructor)))));
cxxConstructExpr(hasDeclaration(cxxConstructorDecl(isCopyConstructor())),
has(expr(ignoringImpCasts(DefaultConstructor)))),
cxxConstructExpr(hasDeclaration(cxxConstructorDecl(isMoveConstructor())),
has(expr(ignoringImpCasts(DefaultConstructor)))),
cxxUnresolvedConstructExpr(argumentCountIs(0)));
// Match the object being compared.
const auto STLArg =
anyOf(unaryOperator(
Expand All @@ -87,31 +182,41 @@ void ContainerSizeEmptyCheck::registerMatchers(MatchFinder *Finder) {
expr(hasType(ValidContainer)).bind("STLObject"));
Finder->addMatcher(
cxxOperatorCallExpr(
unless(isInTemplateInstantiation()),
hasAnyOverloadedOperatorName("==", "!="),
anyOf(allOf(hasArgument(0, WrongComparend), hasArgument(1, STLArg)),
allOf(hasArgument(0, STLArg), hasArgument(1, WrongComparend))),
unless(hasAncestor(
cxxMethodDecl(ofClass(equalsBoundNode("container"))))))
.bind("BinCmp"),
this);
Finder->addMatcher(
binaryOperator(hasAnyOperatorName("==", "!="),
anyOf(allOf(hasLHS(WrongComparend), hasRHS(STLArg)),
allOf(hasLHS(STLArg), hasRHS(WrongComparend))),
unless(hasAncestor(
cxxMethodDecl(ofClass(equalsBoundNode("container"))))))
.bind("BinCmp"),
this);
}

void ContainerSizeEmptyCheck::check(const MatchFinder::MatchResult &Result) {
const auto *MemberCall =
Result.Nodes.getNodeAs<CXXMemberCallExpr>("SizeCallExpr");
const auto *MemberCall = Result.Nodes.getNodeAs<Expr>("SizeCallExpr");
const auto *MemberCallObject =
Result.Nodes.getNodeAs<Expr>("MemberCallObject");
const auto *BinCmp = Result.Nodes.getNodeAs<CXXOperatorCallExpr>("BinCmp");
const auto *BinCmpTempl = Result.Nodes.getNodeAs<BinaryOperator>("BinCmp");
const auto *BinaryOp = Result.Nodes.getNodeAs<BinaryOperator>("SizeBinaryOp");
const auto *Pointee = Result.Nodes.getNodeAs<Expr>("Pointee");
const auto *E =
MemberCall
? MemberCall->getImplicitObjectArgument()
MemberCallObject
? MemberCallObject
: (Pointee ? Pointee : Result.Nodes.getNodeAs<Expr>("STLObject"));
FixItHint Hint;
std::string ReplacementText = std::string(
Lexer::getSourceText(CharSourceRange::getTokenRange(E->getSourceRange()),
*Result.SourceManager, getLangOpts()));
if (BinCmp && IsBinaryOrTernary(E)) {
// Not just a DeclRefExpr, so parenthesize to be on the safe side.
if (IsBinaryOrTernary(E) || isa<UnaryOperator>(E)) {
ReplacementText = "(" + ReplacementText + ")";
}
if (E->getType()->isPointerType())
Expand All @@ -125,7 +230,13 @@ void ContainerSizeEmptyCheck::check(const MatchFinder::MatchResult &Result) {
}
Hint =
FixItHint::CreateReplacement(BinCmp->getSourceRange(), ReplacementText);
} else if (BinaryOp) { // Determine the correct transformation.
} else if (BinCmpTempl) {
if (BinCmpTempl->getOpcode() == BinaryOperatorKind::BO_NE) {
ReplacementText = "!" + ReplacementText;
}
Hint = FixItHint::CreateReplacement(BinCmpTempl->getSourceRange(),
ReplacementText);
} else if (BinaryOp) { // Determine the correct transformation.
bool Negation = false;
const bool ContainerIsLHS =
!llvm::isa<IntegerLiteral>(BinaryOp->getLHS()->IgnoreImpCasts());
Expand Down Expand Up @@ -195,15 +306,17 @@ void ContainerSizeEmptyCheck::check(const MatchFinder::MatchResult &Result) {
"!" + ReplacementText);
}

if (MemberCall) {
diag(MemberCall->getBeginLoc(),
"the 'empty' method should be used to check "
"for emptiness instead of 'size'")
auto WarnLoc = MemberCall ? MemberCall->getBeginLoc() : SourceLocation{};

if (WarnLoc.isValid()) {
diag(WarnLoc, "the 'empty' method should be used to check "
"for emptiness instead of 'size'")
<< Hint;
} else {
diag(BinCmp->getBeginLoc(),
"the 'empty' method should be used to check "
"for emptiness instead of comparing to an empty object")
WarnLoc = BinCmpTempl ? BinCmpTempl->getBeginLoc()
: (BinCmp ? BinCmp->getBeginLoc() : SourceLocation{});
diag(WarnLoc, "the 'empty' method should be used to check "
"for emptiness instead of comparing to an empty object")
<< Hint;
}

Expand Down
3 changes: 3 additions & 0 deletions clang-tools-extra/clangd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ if (NOT DEFINED CLANGD_BUILD_XPC)
unset(CLANGD_BUILD_XPC_DEFAULT)
endif ()

option(CLANGD_MALLOC_TRIM "Call malloc_trim(3) periodically in Clangd. (only takes effect when using glibc)" ON)

llvm_canonicalize_cmake_booleans(
CLANGD_BUILD_XPC
CLANGD_ENABLE_REMOTE
CLANGD_MALLOC_TRIM
LLVM_ENABLE_ZLIB
)

Expand Down
Loading