Skip to content

SPIRV-LLVM-Translator pulldown (WW39) #4612

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 559 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
559 commits
Select commit Hold shift + click to select a range
2aa8474
[Bazel] Use posix definitions for FreeBSD
wamuir Sep 16, 2021
e6020b2
[clang][NFC] refactor GlobalMethodPool to encapsulate its map
rmaz Sep 16, 2021
233b42a
[mlir][sparse] remove unused TENSOR environment
aartbik Sep 16, 2021
04a66f8
Fixing vector add pattern that incorrectly returns success.
Sep 16, 2021
65feb9f
[symbolizer] Change libcxx paths in buildscript.
hctim Sep 16, 2021
4b19e7d
[LoopIdiomRecognize][Remarks] Track loop-strided store to/from blocks
jroelofs Sep 16, 2021
5f2b787
NFC. Add tests exposing missing analysis invalidation in LoopPredicat…
Sep 14, 2021
0e36288
[LoopPredication] Report changes correctly when attempting loop exit …
Sep 14, 2021
d9195d6
[flang] More precise checks for NULL() operands
klausler Sep 7, 2021
646299d
[Support] Convert BinaryStream class zoo to 64-bit offsets
nico Sep 16, 2021
19afc49
[flang] Enforce array conformance in actual arguments to ELEMENTALs
klausler Sep 9, 2021
fe950cb
Update LoopPredication test to fix buildbot failure.
Sep 16, 2021
78b083d
[ORC] Add finalization & deallocation actions, SimpleExecutorMemoryMa…
lhames Sep 14, 2021
a9a6cdc
[gn build] Port 78b083dbb725
llvmgnsyncbot Sep 16, 2021
47373f9
[compiler-rt][test] Add int128 requirement to TestCases/Misc/Linux/st…
PiJoules Sep 17, 2021
26aff84
[flang] Fold COUNT()
klausler Sep 10, 2021
1d08a19
[ELF] Clarify --export-dynamic-symbol/--dynamic-list. NFC
MaskRay Sep 17, 2021
f4092c7
[compiler-rt][test] Ensure CMAKE_SYSROOT is added as a test cflag if …
PiJoules Sep 17, 2021
cc82296
Extract LC_CODE_SIGNATURE related implementation out of LLD
Sep 16, 2021
2755670
[gn build] Port cc8229603b67
llvmgnsyncbot Sep 17, 2021
aaf00f3
Add MachO signature verification test
Sep 17, 2021
e9e1d47
[X86] Refactor GetSSETypeAtOffset to fix pr51813
phoebewang Sep 17, 2021
167ff52
[GlobalOpt] Do not shrink global to bool for an unfavorable AS
cdevadas Sep 15, 2021
6403f71
[NFC][MachineRegisterInfo] Fix typo in comments of getLiveInVirtReg()…
RamNalamothu Sep 14, 2021
b588f5d
[clang][scan-build] Use cc/c++ instead of gcc/g++ on OpenBSD.
fcambus Sep 17, 2021
ed92128
[flang] Make 'this_image()' an intrinsic function
rasmussn Sep 17, 2021
fc08cfb
CodeView: static_cast result of getOffset() to size_t.
pcc Sep 17, 2021
63838d8
[examples] Fix SectionMemoryManager deconstruction error with MSVC.
lhames Sep 17, 2021
97cc678
[FuncSpec] Specialising on addresses of const global values.
Sep 17, 2021
0195f86
[Clang] Fix long double availability check
ecnelises Sep 17, 2021
7e8babe
Revert "[examples] Fix SectionMemoryManager deconstruction error with…
lhames Sep 17, 2021
74fa174
[Test] One more missing opportunity on IndVars check removal
xortator Sep 17, 2021
80584f0
Revert "[PowerPC][ELF] make sure local variable space does not overla…
Sep 17, 2021
bdafe31
[DSE] Add test cases with stores to objects before they escape.
fhahn Sep 15, 2021
690f769
[Test] Add simple test where IndVars fails to remove checks on negati…
xortator Sep 17, 2021
37cdc7e
[OpenCL] Supports optional pipe types in C++ for OpenCL 2021
Topotuna Sep 1, 2021
d477a7c
GlobalISel/Utils: Refactor integer/float constant match functions
petar-avramovic Sep 17, 2021
1a5ab3e
[SystemZ] Recognize .machine directive in parser.
JonPsson Sep 12, 2021
f263ea1
[MLIR] Matrix: support resizing horizontally
Superty Sep 17, 2021
6607bd9
[MLIR] AffineStructures::removeIdRange: support specifying a range wi…
Superty Sep 16, 2021
44db07f
[MLIR] AffineStructures: support removing a range of constraints at once
Superty Sep 16, 2021
8821345
[TextAPI] Use const-ref iterator in for-range loop. NFCI.
RKSimon Sep 16, 2021
e4b2f66
[TableGen] Record::checkRecordAssertions() - Use const-ref iterator i…
RKSimon Sep 16, 2021
9e70d4e
[AsmPrinter] DebugLocEntry::dump() - Use const-ref iterator in for-ra…
RKSimon Sep 16, 2021
cbaaede
[CodeGen] MachineInstr::getUsedDebugRegs() - Use const-ref iterator i…
RKSimon Sep 16, 2021
5ebe95e
[X86][Atom] Fix integer shuffles uops, latency and throughput
RKSimon Sep 17, 2021
77f6c0b
Fix Wdocumentation warnings. NFCI.
RKSimon Sep 17, 2021
58719f6
[MLIR] PresbugerSet: slightly expand documentation
Superty Sep 17, 2021
e3b1052
Make multiversioning work with internal linkage
Sep 16, 2021
db23f27
[X86] X86PreTileConfig - Use const-ref iterator in for-range loop. NFCI.
RKSimon Sep 17, 2021
bbebb56
[TableGen] X86EVEX2VEXTablesEmitter - Use const-ref iterator in for-r…
RKSimon Sep 17, 2021
4af7643
[CodeGen] LiveDebug - Use const-ref iterator in for-range loop. NFCI.
RKSimon Sep 17, 2021
72e5786
[DebugInfo] DWARF - Use const-ref iterator in for-range loop. NFCI.
RKSimon Sep 17, 2021
b7e9d20
[OpenCL] Supports optional same image reads and writes in C++ for Ope…
Topotuna Sep 1, 2021
197a3d1
Fix test failure from e3b10525b489b604d6a1e540be78bda80afb5868
Sep 17, 2021
ff6b074
[NFC] Added testcase for PR25725
davidbolvansky Sep 17, 2021
6fb01a9
[flang][OpenMP] Add semantic checks for ordered construct
PeixinQiao Sep 17, 2021
750d5fc
[HWASan] Intercept setjmp/longjmp on x86_64.
morehouse Sep 17, 2021
8a7a280
Fix CodeGen/pgo-sample-thinlto-summary.c with old PM
Sep 17, 2021
1894250
[flang] Revamp C1502 checking of END INTERFACE [generic-spec]
klausler Sep 9, 2021
90b7817
[mlir][linalg] Add helper to update IndexOps after tiling (NFC).
Sep 17, 2021
3a587ed
[InstCombine] add vector tests for 'and' folds; NFC
rotateright Sep 17, 2021
41ff761
[InstCombine] allow splat vectors for narrowing masked fold
rotateright Sep 17, 2021
12ba727
[flang] Accept SIZE(assumed-rank, DIM=n)
klausler Sep 13, 2021
df1ab7d
[gn build] (semi-manually) port 750d5fc65c92
nico Sep 17, 2021
358df06
[X86] Improve `matchBinaryShuffle()`'s `BLEND` lowering with per-elem…
LebedevRI Sep 17, 2021
e2febc2
[llvm] Use drop_begin (NFC)
kazutakahirata Sep 17, 2021
7ff9208
[flang] Catch errors with intrinsic array inquiry functions
klausler Sep 11, 2021
7f1a6d8
[OpenMP] libomp: Update third-party sources of ittnotify client code.
AndreyChurbanov Sep 17, 2021
59b877d
[OpenMP] NFC: add type casts to silence gcc warnings
AndreyChurbanov Sep 17, 2021
43d41b2
[flang] Correct overflow detection in folding of real->integer conver…
klausler Sep 14, 2021
81a1a91
[NFC] clang-format -i /openmp/libomptarget/deviceRTLs/interface.h
shiltian Sep 17, 2021
b428c3e
[lld-macho] Ignore local personality symbols if non-local with th…
oontvoo Sep 15, 2021
a123e3c
[mlir] Fix potential crash in hoistRedundantVectorTransfers
ThomasRaoux Sep 16, 2021
4166796
[mlir] Linalg hoisting should ignore uses outside the loop
ThomasRaoux Sep 17, 2021
36aac53
[mlir][linalg] Extend drop unit dim pattern to all cases of reduction
ThomasRaoux Sep 17, 2021
20afd38
[flang] Upgrade warning to error in case of PURE procedure
klausler Sep 14, 2021
9245f35
[flang] Validate SIZE(x,DIM=n) dimension for assumed-size array x
klausler Sep 13, 2021
2b0b1d5
[SLP][NFC]Add a test for reorder of alt shuffle operands.
alexey-bataev Sep 17, 2021
9c03662
[Dexter] Mutually exclusive argument group for --builder and --binary
SLTozer Sep 10, 2021
101c3de
Add information about C99 to the C status page.
AaronBallman Sep 17, 2021
f6ddfac
[flang] Enforce fixed form rules about END continuation
klausler Sep 15, 2021
338f21a
[flang] Enforce specification function rules on callee, not call
klausler Sep 16, 2021
d13d9da
[clang] [ARM] Don't set the strict alignment flag for armv7 on Windows
mstorsjo Sep 16, 2021
08f0cb7
[mlir] Prevent crash in DropUnitDim pattern due to tensor with encoding
ThomasRaoux Sep 17, 2021
121aab8
[MLIR][Affine] Simplify nested modulo operations when able
krzysz00 Sep 16, 2021
80d6299
[clang][darwin] Add support for --emit-static-lib
keith Sep 8, 2021
c5fafc1
[CSSPGO] Tweakes to lower pseudo probe runtime overhead
htyu Sep 17, 2021
f18c073
[llvm-reduce] Add reduce operands pass
saeubank Sep 17, 2021
5a6c38f
[flang] Fix build
klausler Sep 17, 2021
3db9590
[compiler-rt] Implement __clear_cache() on OpenBSD/riscv64
jcourreges Sep 17, 2021
e93bade
[nfc] [lldb] Remove unused DIEPointerSet, DeclToDIEMap and m_decl_to_die
jankratochvil Sep 17, 2021
c533b88
[DFSan] Add force_zero_label abilist option to DFSan. This can be use…
browneee Sep 15, 2021
d01e0c8
[NFC] Precommit tests for D109954
davidbolvansky Sep 17, 2021
d4e1617
[mlir][sparse] add dce test for all sparse tensor ops
aartbik Sep 17, 2021
46e77b5
[mlir][sparse] add a sparse quantized_matmul example to integration test
aartbik Sep 16, 2021
6da3503
[InstCombine] add tests for min/max intrinsics with offset operand; NFC
rotateright Sep 17, 2021
2908fc0
[OpenMP] Use irbuilder as default for masked and master construct
chichunchen Sep 17, 2021
c7d7b98
OpenMP 5.0 metadirective
chichunchen Sep 17, 2021
7efb825
Revert "OpenMP 5.0 metadirective"
chichunchen Sep 17, 2021
347f3c1
OpenMP 5.0 metadirective
Sep 17, 2021
9ff848c
Revert "[OpenMP] Use irbuilder as default for masked and master const…
chichunchen Sep 17, 2021
843390c
Apply proper source location to fallthrough switch cases.
adrian-prantl Sep 17, 2021
0db9481
[NFC] Remove FIXMEs about calling LLVMContext::yield()
aeubanks Sep 17, 2021
757384a
[AArch64][SVE][InstCombine] Fold redundant zip1/2(uzp1/2) operations
UsmanNadeem Sep 12, 2021
bcb2591
[flang] More checking of NULL pointer actual arguments
klausler Sep 17, 2021
3b14d80
[MachCore] Report arm64 thread exception state
vedantk Sep 14, 2021
91ace9f
[lld-macho] Construct CFString literals by copying the ConcatInputSec…
int3 Jul 7, 2021
fec2927
[OpenMP] Add NoSync attributes to alloc / free shared RTL calls
jhuber6 Sep 17, 2021
27905ee
[Attributor] Change AAExecutionDomain to check intrinsic edges
jhuber6 Sep 15, 2021
6f7483b
Reland "[LLD] Remove global state in lld/COFF" after fixing asan and …
amykhuang Sep 16, 2021
2cda4f8
[mlir] Fix syntax example for tensor.from_elements
GMNGeoffrey Sep 18, 2021
724a1df
[lld] Fix small error in previous commit
amykhuang Sep 18, 2021
c30d773
[OpenMP] Change debugging symbol to weak_odr linkage
jhuber6 Sep 17, 2021
b266bcb
[OpenMP] Implement __assert_fail in the new device runtime
jhuber6 Sep 16, 2021
ec02c34
[OpenMP] Add additional fields to device environment
jhuber6 Sep 16, 2021
f1c821f
[OpenMP] Add support for dynamic shared memory in new RTL
jhuber6 Sep 17, 2021
4121ac1
Check for invalid projects passed in LLVM_ENABLE_PROJECTS
joker-eph Sep 18, 2021
57eda9b
[MLIR][GPU] Add constant propagator for gpu.launch op
bondhugula Jul 25, 2021
2790498
Adjust the doc after the renaming of debuginfo-tests => cross-project…
sylvestre Sep 18, 2021
23763dd
llvm doc: subversion isn't necessary in this example
sylvestre Sep 18, 2021
8919e7b
llvm doc: remove the old reference to subversion and add a link to th…
sylvestre Sep 18, 2021
0eb75a4
Revert "Check for invalid projects passed in LLVM_ENABLE_PROJECTS"
LebedevRI Sep 18, 2021
9b889f8
Thread safety analysis: Warn when demoting locks on back edges
aaronpuchert Sep 18, 2021
31cca21
Revert "OpenMP 5.0 metadirective"
nico Sep 18, 2021
0a1e569
[mlir-c] Add getting fused loc
jpienaar Sep 18, 2021
1b2c36a
[lld/mac] Fix comment typo to cycle bots
nico Sep 18, 2021
2b44a73
[MLIR] Simplex: support adding new variables dynamically
Superty Sep 18, 2021
48719e3
[CodeGen] Use make_early_inc_range (NFC)
kazutakahirata Sep 18, 2021
33afea5
[MLIR] Simplex: rename num{Variables,Constraints} to getNum{Variables…
Superty Sep 18, 2021
cb5e3f7
[ARM] Prevent large integer VQDMULH pattern crashes
davemgreen Sep 18, 2021
7b25fa8
[Support] Attempt to fix deadlock in ThreadGroup
aganea Sep 18, 2021
713c768
Check for invalid projects passed in LLVM_ENABLE_PROJECTS
joker-eph Sep 18, 2021
d841c72
Precommit tests for D109807 "[InstCombine] Narrow type of logical ope…
UsmanNadeem Sep 18, 2021
000875c
OpenMP 5.0 metadirective
Sep 17, 2021
80110aa
[Tests] Fix incorrect noalias metadata
nikic Sep 16, 2021
abe21da
[Tests] Fix noalias metadata in one more test
nikic Sep 18, 2021
6a2c226
[X86] Improve i8 all-ones element insertion in pre-SSE4.1
LebedevRI Sep 18, 2021
d2373c0
DWARFDie.cpp: Reduce indentation with early continue
dwblaikie Sep 19, 2021
ae08734
DWARFDie:DWARFTypePrinter: Add common utility function for checking w…
dwblaikie Sep 19, 2021
dee5a8c
[RISCV] Optimize (add (shl x, c0), (shl y, c1)) with SH*ADD
benshi001 Aug 30, 2021
b7ec8f3
llvm/cmake: fix a typo
sylvestre Sep 19, 2021
e381d8b
[X86][Atom] Fix (U)COMISS/SD uops, latency and throughput
RKSimon Sep 18, 2021
9de88fc
[mlir][emitc] Fix indent in CondBranchOp and block label
xndcn Sep 19, 2021
1da52ef
[ARM] Add VGETLANEu patterns for v4f16 and v8f16
davemgreen Sep 19, 2021
9555d1e
[InstCombine] add/adjust tests for min/max intrinsics; NFC
rotateright Sep 19, 2021
1e72ca9
[X86] combineX86ShufflesRecursively(): call SimplifyMultipleUseDemand…
LebedevRI Sep 19, 2021
0852313
[NFC] combineX86ShufflesRecursively(): actually address nits for prev…
LebedevRI Sep 19, 2021
07f1d8f
[X86] lowerShuffleAsDecomposedShuffleMerge(): if both inputs are broa…
LebedevRI Sep 19, 2021
5f2fe48
[X86][TLI] SimplifyDemandedVectorEltsForTargetNode(): don't break apa…
LebedevRI Sep 19, 2021
cf8fac7
[X86][Atom] Specific uops for all IMUL/IDIV instructions
RKSimon Sep 19, 2021
2ca637c
llvm-dwarfdump: Refactor type pretty printing tests
dwblaikie Sep 19, 2021
b7342e3
[X86] Fold SHUFPS(shuffle(x),shuffle(y),mask) -> SHUFPS(x,y,mask')
RKSimon Sep 19, 2021
f855ef2
[X86][Atom] Fix FP uops + port usage
RKSimon Sep 19, 2021
f09ca5c
DWARFDie: Improve type printing for function and array types - with q…
dwblaikie Sep 19, 2021
a51fb58
DWARFDie.cpp: Minor follow-up clang-format
dwblaikie Sep 19, 2021
2bde3dc
[X86] Add test cases for pr51908. NFC
topperc Sep 19, 2021
391fa37
[X86] Remove Commutable flag from mpsadbw intrinsics.
topperc Sep 19, 2021
372e2c2
llvm-dwarfdump: Pretty printing types including a space between const…
dwblaikie Sep 19, 2021
5ba8020
[DebugInfo][LSR] Emit shorter expressions from scev-based salvaging
Sep 19, 2021
84b07c9
[llvm] Use pop_back_val (NFC)
kazutakahirata Sep 19, 2021
437ba18
Merge from 'sycl' to 'sycl-web'
Sep 19, 2021
0ed6856
Merge from 'main' to 'sycl-web' (1 commits)
Sep 19, 2021
0e89ff8
[X86] SimplifyDemandedBits - only narrow a broadcast source if we onl…
RKSimon Sep 19, 2021
5bfe520
llvm-dwarfdump: Pretty print names qualified/with scopes
dwblaikie Sep 19, 2021
11e0b79
llvm-dwarfdump: Don't print even an empty string when a type is unpri…
dwblaikie Sep 20, 2021
606ea0d
llvm-dwarfdump: support for type printing "decltype(nullptr)" as "nul…
dwblaikie Sep 20, 2021
cb42bb3
llvm-dwarfdump: pretty type printing: print fully qualified names in …
dwblaikie Sep 20, 2021
def15c5
[SCEV] Support negative values in signed/unsigned predicate reasoning
xortator Sep 20, 2021
74670e7
[libc] Add implementations of div, ldiv, lldiv and imaxdiv.
Sep 17, 2021
471217c
Revert "Revert "[IndVars] Replace PHIs if loop exits on 1st iteration""
xortator Sep 20, 2021
e9d34c5
[NFC] Add assert and test showing that revert of D109596 wasn't justi…
xortator Sep 20, 2021
5252aa2
[libc][obvious] Make *abs and *div functions buildable in default mode.
Sep 20, 2021
f5b8f12
[libc][obvious] Add inttypes.h and stdlib.h as deps to *div functions.
Sep 20, 2021
9669223
[lldb] Remove two #ifndef linux from Platform.cpp
labath Sep 17, 2021
9a2255d
[mlir][NFC] Add explicit "::mlir" namespace to tblgen generated code
Sep 3, 2021
ec03bbe
[mlir] Fix bug in partial dialect conversion
Aug 20, 2021
76cb876
[MLIR] Simplex::appendVariable: early return if count == 0
Superty Sep 20, 2021
4b80f01
[CMake] Add debuginfo-tests to LLVM_ALL_PROJECTS after D110016
MaskRay Sep 20, 2021
7f6a482
[CaptureTracking] Allow passing LI to PointerMayBeCapturedBefore (NFC).
fhahn Sep 20, 2021
bdcf4b9
[MLIR][Linalg] Make detensoring cost-model more flexible.
ergawy Sep 20, 2021
92904cc
[lldb] [gdb-remote] Remove unused arg from GDBRemoteRegisterContext::…
mgorny Aug 30, 2021
f6e0edc
[lldb] [gdb-remote] Recognize aarch64v type from gdbserver
mgorny Sep 16, 2021
92c9b28
Revert "[AArch64][SVE] Teach cost model that masked loads/stores are …
DavidSpickett Sep 20, 2021
798e4bf
[mlir] Fix integration tests failures introduced in D108505
Sep 20, 2021
13aa102
AArch64: use ldp/stp for 128-bit atomic load/store in v.84 onwards
TNorthover Sep 15, 2021
ca3bebd
[OpenCL] Supports optional writing to 3d images in C++ for OpenCL 2021
Topotuna Sep 6, 2021
15feaaa
Add myself as a code owner for SYCL support
bader Sep 20, 2021
eb3af1e
[clang][NFC] Remove dead code
wingo Aug 4, 2021
c8cb7f6
[NewPM] Make InlinerPass (aka 'inline') a parameterized pass
bjope Sep 16, 2021
e4c46dd
[GlobalISel] Improve elimination of dead instructions in legalizer
petar-avramovic Sep 20, 2021
b109912
[lldb] [gdb-remote] Always send PID when detaching w/ multiprocess
mgorny Sep 19, 2021
d6929aa
[mlir][openacc] Make use of the second counter extension in DataOp tr…
clementval Jul 22, 2021
ea17b15
[MCA] InstructionTables::execute() - use const-ref iterator in for-ra…
RKSimon Sep 17, 2021
4ab7c0d
[X86] X86TargetTransformInfo - remove unnecessary if-else after early…
RKSimon Sep 17, 2021
7fc12b8
MachOObjectFile - checkOverlappingElement - use const-ref to avoid un…
RKSimon Sep 17, 2021
6d7b3d6
Fix CLANG_ENABLE_STATIC_ANALYZER=OFF building all analyzer source
arichardson Sep 20, 2021
7b68c07
pre-commit test for D109767
arichardson Sep 20, 2021
817e23d
[update_mir_test_checks.py] Use -NEXT FileCheck directories
arichardson Sep 20, 2021
3f90df2
[ARM] MVE reverse shuffles.
davemgreen Sep 20, 2021
fae57a6
[Clang] [Fix] Clang build fails when build directory contains space c…
Sep 20, 2021
4737dcb
[lldb] [test] Add unittest for DynamicRegisterInfo::Finalize()
mgorny Sep 16, 2021
ec50d35
[lldb] [DynamicRegisterInfo] Unset value_regs/invalidate_regs before …
mgorny Sep 18, 2021
6de19ea
Thread safety analysis: Drop special block handling
aaronpuchert Sep 20, 2021
68914dc
[JITLink] Adopt forEachRelocation() helper in ELF x86-64 backend (NFC)
weliveindetail Sep 20, 2021
e8d81d8
[JITLink] Adopt forEachRelocation() helper in ELF RISCV backend (NFC)
weliveindetail Sep 20, 2021
680592b
[AMDGPU] Regenerate checks
jayfoad Sep 20, 2021
f988f68
[Analysis] Add support for vscale in computeKnownBitsFromOperator
david-arm Sep 16, 2021
07a1c07
Resolve build failure
maksimsab Sep 20, 2021
5dee501
[analyzer] Move docs of SmartPtr to correct subcategory
RedDocMD Sep 20, 2021
6db928b
[mlir][linalg] Fusion on tensors.
Sep 20, 2021
444a5f3
[clangd] Bail-out when an empty compile flag is encountered
kadircet Sep 16, 2021
e0522b7
Merge from 'sycl' to 'sycl-web' (2 commits)
Sep 20, 2021
228dd20
[OpenCL] Supports atomics in C++ for OpenCL 2021
Topotuna Sep 7, 2021
5b47256
[X86] Add test to show the effect caused by D109607. NFC
phoebewang Sep 19, 2021
2276733
[X86] Always check the size of SourceTy before getting the next type
phoebewang Sep 20, 2021
5661317
[flang] Put intrinsic function table back into order
klausler Sep 15, 2021
bc69dd6
[SLP]Improve graph reordering.
alexey-bataev Aug 3, 2021
09100c7
[mlir][linalg] Fix typo (NFC).
Sep 20, 2021
644b55d
[MLIR][SCF] Add for-to-while loop transformation pass
mortbopet Aug 20, 2021
7be28d8
[mlir][linalg] Add IndexOp support to fusion on tensors.
Sep 20, 2021
963d3a2
[DSE] Add additional tests to cover review comments.
fhahn Sep 20, 2021
fe4b846
[lldb] Fix whitespace in CommandObjectTarget (NFC)
JDevlieghere Sep 17, 2021
a89bfc6
[lldb] Extract adding symbols for UUID/File/Frame (NFC)
JDevlieghere Sep 20, 2021
8700f2b
[Verifier] Verify scoped noalias metadata
nikic Sep 16, 2021
d001ab8
[ELF] Don't fall back to .text for e_entry
MaskRay Sep 20, 2021
d85e347
[RISCV] Add a pass to recognize VLS strided loads/store from gather/s…
topperc Sep 20, 2021
93604c9
[gn build] Port d85e347a28dc
llvmgnsyncbot Sep 20, 2021
f3cfec9
[MCA] Fix a warning
kazutakahirata Sep 20, 2021
ecd52a5
[Verifier] Try to fix MSVC build
nikic Sep 20, 2021
a954bb1
[ELF] Add --why-extract= to query why archive members/lazy object fil…
MaskRay Sep 20, 2021
6e994a8
[lld] Remove timers.ll because inconsistent timers behavior causes th…
amykhuang Sep 20, 2021
f4b5d59
Add use_default_shell_env = True to ctx.actions.run
Flamefire Sep 20, 2021
f18f1ab
Temporarily XFAIL MLIR test that fails the LLVM verifier after 8700f2bd3
joker-eph Sep 20, 2021
5edd79f
Revert "[MLIR][SCF] Add for-to-while loop transformation pass"
joker-eph Sep 20, 2021
3679d20
[NCF][OpenMP] Fix metadirective test on SystemZ
chichunchen Sep 20, 2021
e31b2d7
[lldb][crashlog] Avoid specifying arch for image when a UUID is present
vedantk Sep 17, 2021
890027b
[RISCV] Add test cases showing failure to use .vf vector operations w…
topperc Sep 20, 2021
04ab6c8
[RISCV] Teach RISCVTargetLowering::shouldSinkOperands to sink splats …
topperc Sep 20, 2021
d7d7060
Eliminate _LIBCPP_EQUAL_DELETE in favor of `=delete`.
Quuxplusone Sep 17, 2021
a077271
Revert code change of D63497 & D74399 for riscv64-*-linux GCC detection
MaskRay Sep 20, 2021
6cd382b
Revert "[CMake] Add debuginfo-tests to LLVM_ALL_PROJECTS after D110016"
MaskRay Sep 20, 2021
4cf5269
Merge from '"main"' to '"sycl-web"' (44 commits)
maksimsab Sep 21, 2021
feac4ca
Merge from 'sycl' to 'sycl-web' (7 commits)
Sep 21, 2021
bd7b5b4
Merge from '"main"' to '"sycl-web"' (61 commits)
maksimsab Sep 21, 2021
59f7707
Merge remote-tracking branch 'otcshare_llvm/sycl-web' into llvmspirv_…
vladimirlaz Sep 21, 2021
02d3ed7
Enforce UserSemantic decoration if no FPGA decorations found
MrSidims Sep 13, 2021
d011697
Amend SingleElementVectorINTEL decoration use cases according to spec…
DmitryBushev Sep 15, 2021
3c8e592
Fix for a bunch of fixed point integer SPIR-V instructions (#1213)
Sep 20, 2021
ff2d235
Fix tests with wrong alias metadata
MrSidims Sep 21, 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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-include-fixer/IncludeFixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ clang::TypoCorrection IncludeFixerSemaSource::CorrectTypo(
// parent_path.
// FIXME: Don't rely on source text.
const char *End = Source.end();
while (isIdentifierBody(*End) || *End == ':')
while (isAsciiIdentifierContinue(*End) || *End == ':')
++End;

return std::string(Source.begin(), End);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void IntegerTypesCheck::check(const MatchFinder::MatchResult &Result) {
const StringRef Port = "unsigned short port";
const char *Data = Result.SourceManager->getCharacterData(Loc);
if (!std::strncmp(Data, Port.data(), Port.size()) &&
!isIdentifierBody(Data[Port.size()]))
!isAsciiIdentifierContinue(Data[Port.size()]))
return;

std::string Replacement =
Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clang-tidy/readability/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ add_clang_library(clangTidyReadabilityModule
AvoidConstParamsInDecls.cpp
BracesAroundStatementsCheck.cpp
ConstReturnTypeCheck.cpp
ContainerDataPointerCheck.cpp
ContainerSizeEmptyCheck.cpp
ConvertMemberFunctionsToStatic.cpp
DeleteNullPointerCheck.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
//===--- ContainerDataPointerCheck.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 "ContainerDataPointerCheck.h"

#include "clang/Lex/Lexer.h"
#include "llvm/ADT/StringRef.h"

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
ContainerDataPointerCheck::ContainerDataPointerCheck(StringRef Name,
ClangTidyContext *Context)
: ClangTidyCheck(Name, Context) {}

void ContainerDataPointerCheck::registerMatchers(MatchFinder *Finder) {
const auto Record =
cxxRecordDecl(
isSameOrDerivedFrom(
namedDecl(
has(cxxMethodDecl(isPublic(), hasName("data")).bind("data")))
.bind("container")))
.bind("record");

const auto NonTemplateContainerType =
qualType(hasUnqualifiedDesugaredType(recordType(hasDeclaration(Record))));
const auto TemplateContainerType =
qualType(hasUnqualifiedDesugaredType(templateSpecializationType(
hasDeclaration(classTemplateDecl(has(Record))))));

const auto Container =
qualType(anyOf(NonTemplateContainerType, TemplateContainerType));

Finder->addMatcher(
unaryOperator(
unless(isExpansionInSystemHeader()), hasOperatorName("&"),
hasUnaryOperand(anyOf(
ignoringParenImpCasts(
cxxOperatorCallExpr(
callee(cxxMethodDecl(hasName("operator[]"))
.bind("operator[]")),
argumentCountIs(2),
hasArgument(
0,
anyOf(ignoringParenImpCasts(
declRefExpr(
to(varDecl(anyOf(
hasType(Container),
hasType(references(Container))))))
.bind("var")),
ignoringParenImpCasts(hasDescendant(
declRefExpr(
to(varDecl(anyOf(
hasType(Container),
hasType(pointsTo(Container)),
hasType(references(Container))))))
.bind("var"))))),
hasArgument(1,
ignoringParenImpCasts(
integerLiteral(equals(0)).bind("zero"))))
.bind("operator-call")),
ignoringParenImpCasts(
cxxMemberCallExpr(
hasDescendant(
declRefExpr(to(varDecl(anyOf(
hasType(Container),
hasType(references(Container))))))
.bind("var")),
argumentCountIs(1),
hasArgument(0,
ignoringParenImpCasts(
integerLiteral(equals(0)).bind("zero"))))
.bind("member-call")),
ignoringParenImpCasts(
arraySubscriptExpr(
hasLHS(ignoringParenImpCasts(
declRefExpr(to(varDecl(anyOf(
hasType(Container),
hasType(references(Container))))))
.bind("var"))),
hasRHS(ignoringParenImpCasts(
integerLiteral(equals(0)).bind("zero"))))
.bind("array-subscript")))))
.bind("address-of"),
this);
}

void ContainerDataPointerCheck::check(const MatchFinder::MatchResult &Result) {
const auto *UO = Result.Nodes.getNodeAs<UnaryOperator>("address-of");
const auto *DRE = Result.Nodes.getNodeAs<DeclRefExpr>("var");

std::string ReplacementText;
ReplacementText = std::string(Lexer::getSourceText(
CharSourceRange::getTokenRange(DRE->getSourceRange()),
*Result.SourceManager, getLangOpts()));
if (DRE->getType()->isPointerType())
ReplacementText += "->data()";
else
ReplacementText += ".data()";

FixItHint Hint =
FixItHint::CreateReplacement(UO->getSourceRange(), ReplacementText);
diag(UO->getBeginLoc(),
"'data' should be used for accessing the data pointer instead of taking "
"the address of the 0-th element")
<< Hint;
}
} // namespace readability
} // namespace tidy
} // namespace clang
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//===--- ContainerDataPointerCheck.h - clang-tidy ---------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONTAINERDATAPOINTERCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONTAINERDATAPOINTERCHECK_H

#include "../ClangTidyCheck.h"

namespace clang {
namespace tidy {
namespace readability {
/// Checks whether a call to `operator[]` and `&` can be replaced with a call to
/// `data()`.
///
/// This only replaces the case where the offset being accessed through the
/// subscript operation is a known constant 0. This avoids a potential invalid
/// memory access when the container is empty. Cases where the constant is not
/// explictly zero can be addressed through the clang static analyzer, and those
/// which cannot be statically identified can be caught using UBSan.
class ContainerDataPointerCheck : public ClangTidyCheck {
public:
ContainerDataPointerCheck(StringRef Name, ClangTidyContext *Context);

bool isLanguageVersionSupported(const LangOptions &LO) const override {
return LO.CPlusPlus11;
}

void registerMatchers(ast_matchers::MatchFinder *Finder) override;

void check(const ast_matchers::MatchFinder::MatchResult &Result) override;

llvm::Optional<TraversalKind> getCheckTraversalKind() const override {
return TK_IgnoreUnlessSpelledInSource;
}
};
} // namespace readability
} // namespace tidy
} // namespace clang

#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONTAINERDATAPOINTERCHECK_H
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "AvoidConstParamsInDecls.h"
#include "BracesAroundStatementsCheck.h"
#include "ConstReturnTypeCheck.h"
#include "ContainerDataPointerCheck.h"
#include "ContainerSizeEmptyCheck.h"
#include "ConvertMemberFunctionsToStatic.h"
#include "DeleteNullPointerCheck.h"
Expand Down Expand Up @@ -62,6 +63,8 @@ class ReadabilityModule : public ClangTidyModule {
"readability-braces-around-statements");
CheckFactories.registerCheck<ConstReturnTypeCheck>(
"readability-const-return-type");
CheckFactories.registerCheck<ContainerDataPointerCheck>(
"readability-container-data-pointer");
CheckFactories.registerCheck<ContainerSizeEmptyCheck>(
"readability-container-size-empty");
CheckFactories.registerCheck<ConvertMemberFunctionsToStatic>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ void RenamerClangTidyCheck::check(const MatchFinder::MatchResult &Result) {
Failure.FixStatus = ShouldFixStatus::ConflictsWithKeyword;
else if (Ident->hasMacroDefinition())
Failure.FixStatus = ShouldFixStatus::ConflictsWithMacroDefinition;
} else if (!isValidIdentifier(Info.Fixup)) {
} else if (!isValidAsciiIdentifier(Info.Fixup)) {
Failure.FixStatus = ShouldFixStatus::FixInvalidIdentifier;
}

Expand Down
20 changes: 11 additions & 9 deletions clang-tools-extra/clangd/CodeComplete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1842,14 +1842,14 @@ CompletionPrefix guessCompletionPrefix(llvm::StringRef Content,
CompletionPrefix Result;

// Consume the unqualified name. We only handle ASCII characters.
// isIdentifierBody will let us match "0invalid", but we don't mind.
while (!Rest.empty() && isIdentifierBody(Rest.back()))
// isAsciiIdentifierContinue will let us match "0invalid", but we don't mind.
while (!Rest.empty() && isAsciiIdentifierContinue(Rest.back()))
Rest = Rest.drop_back();
Result.Name = Content.slice(Rest.size(), Offset);

// Consume qualifiers.
while (Rest.consume_back("::") && !Rest.endswith(":")) // reject ::::
while (!Rest.empty() && isIdentifierBody(Rest.back()))
while (!Rest.empty() && isAsciiIdentifierContinue(Rest.back()))
Rest = Rest.drop_back();
Result.Qualifier =
Content.slice(Rest.size(), Result.Name.begin() - Content.begin());
Expand All @@ -1874,9 +1874,10 @@ CodeCompleteResult codeComplete(PathRef FileName, Position Pos,
? std::move(Flow).runWithoutSema(ParseInput.Contents, *Offset,
*ParseInput.TFS)
: std::move(Flow).run({FileName, *Offset, *Preamble,
// We want to serve code completions with
// low latency, so don't bother patching.
/*PreamblePatch=*/llvm::None, ParseInput});
/*PreamblePatch=*/
PreamblePatch::createMacroPatch(
FileName, ParseInput, *Preamble),
ParseInput});
}

SignatureHelp signatureHelp(PathRef FileName, Position Pos,
Expand All @@ -1898,7 +1899,8 @@ SignatureHelp signatureHelp(PathRef FileName, Position Pos,
Result),
Options,
{FileName, *Offset, Preamble,
PreamblePatch::create(FileName, ParseInput, Preamble), ParseInput});
PreamblePatch::createFullPatch(FileName, ParseInput, Preamble),
ParseInput});
return Result;
}

Expand Down Expand Up @@ -2057,8 +2059,8 @@ bool allowImplicitCompletion(llvm::StringRef Content, unsigned Offset) {
return true;

// Complete words. Give non-ascii characters the benefit of the doubt.
return !Content.empty() &&
(isIdentifierBody(Content.back()) || !llvm::isASCII(Content.back()));
return !Content.empty() && (isAsciiIdentifierContinue(Content.back()) ||
!llvm::isASCII(Content.back()));
}

} // namespace clangd
Expand Down
14 changes: 9 additions & 5 deletions clang-tools-extra/clangd/CompileCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,22 +198,26 @@ CommandMangler CommandMangler::forTests() { return CommandMangler(); }
void CommandMangler::adjust(std::vector<std::string> &Cmd,
llvm::StringRef File) const {
trace::Span S("AdjustCompileFlags");
// Most of the modifications below assumes the Cmd starts with a driver name.
// We might consider injecting a generic driver name like "cc" or "c++", but
// a Cmd missing the driver is probably rare enough in practice and errnous.
if (Cmd.empty())
return;
auto &OptTable = clang::driver::getDriverOptTable();
// OriginalArgs needs to outlive ArgList.
llvm::SmallVector<const char *, 16> OriginalArgs;
OriginalArgs.reserve(Cmd.size());
for (const auto &S : Cmd)
OriginalArgs.push_back(S.c_str());
bool IsCLMode =
!OriginalArgs.empty() &&
driver::IsClangCL(driver::getDriverMode(
OriginalArgs[0], llvm::makeArrayRef(OriginalArgs).slice(1)));
bool IsCLMode = driver::IsClangCL(driver::getDriverMode(
OriginalArgs[0], llvm::makeArrayRef(OriginalArgs).slice(1)));
// ParseArgs propagates missig arg/opt counts on error, but preserves
// everything it could parse in ArgList. So we just ignore those counts.
unsigned IgnoredCount;
// Drop the executable name, as ParseArgs doesn't expect it. This means
// indices are actually of by one between ArgList and OriginalArgs.
auto ArgList = OptTable.ParseArgs(
llvm::opt::InputArgList ArgList;
ArgList = OptTable.ParseArgs(
llvm::makeArrayRef(OriginalArgs).drop_front(), IgnoredCount, IgnoredCount,
/*FlagsToInclude=*/
IsCLMode ? (driver::options::CLOption | driver::options::CoreOption)
Expand Down
2 changes: 2 additions & 0 deletions clang-tools-extra/clangd/Compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ void disableUnsupportedOptions(CompilerInvocation &CI) {
std::unique_ptr<CompilerInvocation>
buildCompilerInvocation(const ParseInputs &Inputs, clang::DiagnosticConsumer &D,
std::vector<std::string> *CC1Args) {
if (Inputs.CompileCommand.CommandLine.empty())
return nullptr;
std::vector<const char *> ArgStrs;
for (const auto &S : Inputs.CompileCommand.CommandLine)
ArgStrs.push_back(S.c_str());
Expand Down
14 changes: 14 additions & 0 deletions clang-tools-extra/clangd/FindTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ const NamedDecl *getTemplatePattern(const NamedDecl *D) {
return nullptr;
}

// Returns true if the `TypedefNameDecl` should not be reported.
bool shouldSkipTypedef(const TypedefNameDecl *TD) {
// These should be treated as keywords rather than decls - the typedef is an
// odd implementation detail.
if (TD == TD->getASTContext().getObjCInstanceTypeDecl() ||
TD == TD->getASTContext().getObjCIdDecl())
return true;
return false;
}

// TargetFinder locates the entities that an AST node refers to.
//
// Typically this is (possibly) one declaration and (possibly) one type, but
Expand Down Expand Up @@ -395,6 +405,8 @@ struct TargetFinder {
}
}
void VisitTypedefType(const TypedefType *TT) {
if (shouldSkipTypedef(TT->getDecl()))
return;
Outer.add(TT->getDecl(), Flags);
}
void
Expand Down Expand Up @@ -903,6 +915,8 @@ refInTypeLoc(TypeLoc L, const HeuristicResolver *Resolver) {
}

void VisitTypedefTypeLoc(TypedefTypeLoc L) {
if (shouldSkipTypedef(L.getTypedefNameDecl()))
return;
Refs.push_back(ReferenceLoc{NestedNameSpecifierLoc(),
L.getNameLoc(),
/*IsDecl=*/false,
Expand Down
Loading