Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/merge upstream 20210504 #53

Merged
merged 1,573 commits into from
Jul 12, 2021
Merged
Changes from all commits
Commits
Show all changes
1573 commits
Select commit Hold shift + click to select a range
a27af1d
[analyzer] Fix assertion in SVals.h
vabridgers Apr 30, 2021
8989268
[flang] Allow KIND type parameters to be used as LEN parameters of co…
psteinfeld Apr 28, 2021
e90792d
[clang] Update comments on another libstdc++ HACK
urnathan Apr 29, 2021
936c777
[AArch64] Adds a pre-indexed paired Load/Store optimization for LDR-STR.
stelios-arm Apr 30, 2021
a3fd82c
[SLP]Fix the crash on cost calculation if non-compatible vectors shuf…
alexey-bataev Apr 28, 2021
5a3309f
[libcxx][ranges] adds `range` access CPOs
cjdb Apr 11, 2021
7c17731
[libcxx][ranges] adds `ranges::range`, `ranges::common_range`, and ra…
cjdb Apr 11, 2021
8ebbaf1
[gn build] Port 5a3309f82576
llvmgnsyncbot Apr 30, 2021
5596bc4
[gn build] Port 7c17731596e9
llvmgnsyncbot Apr 30, 2021
cab19d8
[NFC] Refactor ExecuteAssembler in cc1as_main.cpp
slinder1 Apr 30, 2021
c6f20d7
[ADT] Add STLForwardCompat.h and llvm::disjunction
slinder1 Apr 30, 2021
adf4dc0
[gn build] Port c6f20d70a8c9
llvmgnsyncbot Apr 30, 2021
7308862
[OpenMP][CMake] Use in-project clang as CUDA->IR compiler.
Meinersbur Apr 30, 2021
6e6ae6c
[AArch64] Fix lowering for fshl/fshr with SVE types.
efriedma-quic Apr 29, 2021
499e89f
Add patterns to lower vector.multi_reduction into a sequence of vecto…
asaadaldien Apr 29, 2021
518d955
Support: Stop using F_{None,Text,Append} compatibility synonyms, NFC
dexonsmith Apr 29, 2021
1b88557
[libc++] Revert the change that runs clang-format and generated-outpu…
ldionne Apr 30, 2021
f3026d8
[ADT] Add llvm::remove_cvref and llvm::remove_cvref_t
slinder1 Apr 30, 2021
93bc038
[M68k] fix -Wdefaulted-function-deleted and -Woverloaded-virtual
nickdesaulniers Apr 30, 2021
dde24a8
[llvm-objdump] add -v alias for --version
nickdesaulniers Apr 30, 2021
dcbfb6f
[libcxx] Use joined format for include flag on Windows
petrhosek Apr 29, 2021
54aad63
Revert "AMDGPU/llvm-readobj: Add missing tests for note parsing/displ…
kzhuravl Apr 30, 2021
c92cdb4
[libc++] [test] Recommit the unsetting of LC_COLLATE in the builder s…
Quuxplusone Apr 30, 2021
545a817
[llvm-reduce] Add flag to only run specific passes
aeubanks Apr 30, 2021
cbd5ace
[NFC][tsan] Fix cast after D101428
vitalybuka Apr 30, 2021
511f2ce
[llvm-reduce] Don't unset dso_local on implicitly dso_local GVs
aeubanks Apr 30, 2021
b817ea7
[MachineFunction] Make comment for TracksLiveness more clearer
weiguozhi Apr 30, 2021
ad12590
[InstCombine] Added tests for PR50172, NFC
davidbolvansky Apr 30, 2021
3489c2d
[TTI] NFC: Change getTypeLegalizationCost to return InstructionCost.
dfukalov Apr 29, 2021
ef89e8c
[libc++] Fix constexpr-ness of std::tuple's constructor
ldionne Apr 30, 2021
2d28100
[lld-macho] Initial scaffolding for ARM32 support
int3 Apr 30, 2021
05c5363
[lld-macho] Parse & emit the N_ARM_THUMB_DEF symbol flag
int3 Apr 30, 2021
e01e9a2
[gn build] Port 2d28100bf2e4
llvmgnsyncbot Apr 30, 2021
82e99f5
[OpenMP] Fix second debug name from map clause
jdenny-ornl Apr 30, 2021
f0c9d1e
[tsan] Remove special SyncClock::kInvalidTid
vitalybuka Apr 30, 2021
9542721
Add support for llvm.assume intrinsic to the LoadStoreVectorizer pass
bogner Apr 30, 2021
bf61690
asan: fix a windows test
dvyukov Apr 30, 2021
2cd7868
[ValueTracking] Limit scan when checking poison UB (PR50155)
nikic Apr 30, 2021
fe230dc
[ValueTracking] Slightly clean up programUndefinedIfUndefOrPoison() (…
nikic Apr 30, 2021
7e43483
[AMDGPU] Remove set_gpr_idx instructions in conditional blocks
jayfoad Apr 30, 2021
4423a7a
[NewPM] Disable RelLookupTableConverter pass in LTO
gulfemsavrun Apr 30, 2021
c00fc18
[llvm-readobj] Recognize N_THUMB_DEF as a symbol flag
int3 Apr 30, 2021
3d27b5d
[EarlyIfConversion] Avoid producing selects with identical operands
jroelofs Apr 29, 2021
7d2562c
[AArch64][GlobalISel] Use a single MachineIRBuilder for most of isel.…
aemerson Apr 30, 2021
8be3af3
Revert "[EarlyIfConversion] Avoid producing selects with identical op…
jroelofs Apr 30, 2021
680c5d5
[libc++] Remove the line of stdout output from this generator. NFCI.
Quuxplusone Apr 30, 2021
86d1f59
[libc++] [test] Add a debug-mode CI.
Quuxplusone Apr 20, 2021
2af95a5
[X86] Promote 16-bit CTTZ_ZERO_UNDEF to 32-bit variant
davidbolvansky Apr 30, 2021
c05d1ee
[libcxx][iterator][ranges] adds `input_iterator` and `input_range`
cjdb Apr 11, 2021
7f21091
[PowerPC] modernize test via update_llc_test_checks.py. NFC
jroelofs Apr 30, 2021
421569b
[EarlyIfConversion] Avoid producing selects with identical operands
jroelofs Apr 29, 2021
a45fd43
[dfsan] Fix origin tracking for fast8
gbalats Apr 29, 2021
b11e4c9
Revert "[DebugInfo] Drop DBG_VALUE_LISTs with an excessive number of …
nickdesaulniers Apr 30, 2021
02c5ba8
Revert "[VP,Integer,#2] ExpandVectorPredication pass"
adrian-prantl Apr 30, 2021
7e9cf20
[libc++] s/begin.h/access.h/ in comments. NFCI.
Quuxplusone May 1, 2021
7994615
[gn build] Port 02c5ba867987
llvmgnsyncbot May 1, 2021
c3da07d
[PowerPC] Provide fastmath sqrt and div functions in altivec.h
nemanjai Apr 30, 2021
818b508
[ELF] Simplify the condition adding .got header
MaskRay May 1, 2021
bc91200
Correct tiny misspelling (readlef -> readelf).
kda Apr 29, 2021
bed58a4
[PowerPC] Add missing requirement to test case
nemanjai May 1, 2021
bfd60b3
[PowerPC] Add floating point overloads for vec_sldw
nemanjai May 1, 2021
8fc5f07
[clang][driver][darwin] use the deployment target version as the SDK …
hyp May 1, 2021
0a29219
[mlir][sparse] sparse tensor type encoding migration (new home, new b…
aartbik May 1, 2021
6946f0e
[libc++] [LIBCXX-DEBUG-FIXME] <span>, like <string_view>, has no use …
Quuxplusone Apr 21, 2021
4397b70
Revert "Re-reapply "[DebugInfo] Use variadic debug values to salvage …
nathanchance May 1, 2021
0e8f5e4
[libcxx] [test] Skip alloc counter checks for operations within the l…
mstorsjo Feb 26, 2021
172a801
[clang-tidy][NFC] Remove redudnant expr and qualType matchers from bu…
njames93 May 1, 2021
8d0dfa0
[libcxx] Reenable ranges for clang-cl
mstorsjo Apr 30, 2021
d56ef85
[scudo] Use require_constant_initialization
vitalybuka Apr 29, 2021
95aa116
[scudo][NFC] Fix clang-tidy warnings
vitalybuka May 1, 2021
879fe30
[InstCombine] Add eq-of-parts tests using or (NFC)
nikic May 1, 2021
d9856b1
[NFC][ARM] Regenerate arm64-atomic.ll test
LemonBoy May 1, 2021
83c540d
Revert "[NFC][ARM] Regenerate arm64-atomic.ll test"
LemonBoy May 1, 2021
0175999
[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee
yxsamliu Mar 29, 2020
8a5e0d9
[libc++] [test] Don't nasty-macro `__z` yet; we actually use that one.
Quuxplusone May 1, 2021
9cad090
[libc++] [test] Don't nasty-macro `__opt` yet; we actually use that one.
Quuxplusone May 1, 2021
5a42538
[NFC][ARM] Regenerate arm64-atomic.ll test
LemonBoy May 1, 2021
87f017d
[SCEV] Add tests for and/or loop guards (NFC)
nikic May 1, 2021
4751cad
[AArch64] Prevent spilling between ldxr/stxr pairs
LemonBoy May 1, 2021
ffa5a40
[IndVars] Remove redundant loop invariance check (NFC)
nikic May 1, 2021
cc58e89
[SCEV] Simplify backedge count clearing (NFC)
nikic May 1, 2021
be8ad4e
[Verifier] Slightly refactor code to reduce duplication, NFC.
lattner May 1, 2021
8518742
Fix type printing of array template args
reikdas May 1, 2021
2b93c9c
[X86] AMD Zen 3 Scheduler Model
LebedevRI May 1, 2021
a4c8952
Microoptimize dominance a bit - NFC.
lattner May 1, 2021
f36e6e1
[RISCV] Add missing frontend tests for vcompress intrinsics.
topperc May 1, 2021
db457e6
[lldb] [Process/FreeBSD] Fix arm64 build after RegisterInfoPOSIX_arm6…
mgorny Apr 29, 2021
7aafd10
[CVP] Add tests for mask not equal zero guard (NFC)
nikic May 1, 2021
db9d00c
[LVI] Handle mask not equal zero conditions
nikic May 1, 2021
f305006
[X32][CET] Fix size and alignment of .note.gnu.property section
hvdijk May 1, 2021
1fcf924
[Cuda] Internalize a struct and a global variable
MaskRay May 1, 2021
c58a6a6
[HIP] Fix device lib selection
yxsamliu Apr 30, 2021
603ae60
[InstCombine] Precommit tests for D101423 (NFC)
aqjune Apr 28, 2021
1977c53
[InstCombine] Fold overflow bit of [u|s]mul.with.overflow in a poison…
aqjune Apr 28, 2021
ff7f27f
[gn build] Port 1977c53b2ae4
llvmgnsyncbot May 2, 2021
64e768e
[ValueTracking] Improve impliesPoison to look into overflow intrinsics
aqjune May 2, 2021
0c1ff26
[mlir] [affine] add canonicalization for affine.vector_load, vector_s…
May 2, 2021
7257e6a
[ValueTracking] ctpop propagates poison
aqjune May 2, 2021
e639bcc
run update_test_checks.py for the tests in D101191 (NFC)
aqjune May 2, 2021
07a9df5
[NFC] Use getParamByValType instead of pointee type
aeubanks May 2, 2021
d4d1caa
Fix MSan crash after 1977c53b
aqjune May 2, 2021
773ae44
[libcxx][nfc] prefixes test type `input_iterator` with `cpp17_`
cjdb Apr 24, 2021
a2b5314
[MLIR] Handle llvm.icmp of pointers
wsmoses May 2, 2021
ecfe75e
[InstCombine] Precommit tests for D101375 (NFC)
aqjune Apr 27, 2021
39eb266
[InstCombine] Add a few more patterns for folding select of select
aqjune Apr 27, 2021
9f99a9f
[libc++][doc] Update the Format library status.
mordante May 2, 2021
7872029
[MLIR] Canonicalization of Integer Cast Operations
wsmoses May 2, 2021
ec2e3e3
[SCEV] Add test for non-unit stride with multiple exits (NFC)
nikic May 2, 2021
f4b5753
[libcxx][nfc] removes duplicate test file
cjdb May 2, 2021
cfe3b00
[RISCV] Reorder masked builtin operands. Use clang_builtin_alias for …
topperc May 1, 2021
942e068
[VPlan] Add VPBasicBlock::phis() helper (NFC).
fhahn May 2, 2021
99173fd
[NFC] Use Aliasee to determine Type and AddrSpace in GlobalAlias::cre…
aeubanks May 2, 2021
01d27fc
[OpenMP] Fix warnings due to redundant semicolons. NFC.
mstorsjo May 2, 2021
ba63cdb
[RISCV] Store SEW in RISCV vector pseudo instructions in log2 form.
topperc May 2, 2021
6430430
[TableGen] Use sign rotated VBR for OPC_EmitInteger.
topperc May 2, 2021
36a44df
[AArch64] Sets the preferred function alignment for Cortex-A53/A55.
stelios-arm Apr 30, 2021
15b5d1a
[ARM] Transfer memory operands for VLDn
davemgreen May 2, 2021
761d561
[Object] Fix e_machine description for EM_CR16 and add EM_MICROBLAZE
sperezglz May 3, 2021
94aaf3d
Reland "AMDGPU/llvm-readobj: Add missing tests for note parsing/displ…
kzhuravl Apr 30, 2021
9f51f1b
[ASAN][AMDGPU] Add support for accesses to global and constant addrsp…
rksharma-yymd May 3, 2021
43cbf2b
[clangd] Avoid including HeuristicResolver.h from ParsedAST.h
HighCommander4 Apr 26, 2021
cea736e
[clangd] Hide inlay hints capability behind a command-line flag
HighCommander4 Apr 26, 2021
1f1fb5e
[clangd] Fix build error in SemanticHighlighting.cpp
HighCommander4 May 3, 2021
3504e50
[clangd] Fix test failure in initialize-params.test
HighCommander4 May 3, 2021
ae845d6
[AMDGPU][OpenMP] Enable Libomptarget runtime tests
pdhaliwal-amd Apr 28, 2021
1f8963c
[clangd] Parameter hints for dependent calls
HighCommander4 Apr 19, 2021
32f901b
[flang] Use CFI_TYPE_LAST instead of CFI_type_struct
rovka Apr 30, 2021
aaab704
[flang] Fix handling of elem_len in CFI_establish
rovka Apr 30, 2021
5112bd6
[flang] Fix a bug in the character runtime
rovka Apr 27, 2021
c0c8548
[AMDGPU] Do not annotate features for graphics
Flakebi May 3, 2021
0e97e84
[libc] warns about missing linting only in full build mode
gchatelet May 3, 2021
91607dc
[doc] typo fixes
ChristianKuehnel May 3, 2021
cdeb4a8
[mlir] Allow lowering cmpi/cmpf with multidimensional vectors to LLVM
d0k Apr 29, 2021
d23e4f6
[RISCV] Add support for fmin/fmax vector reductions
frasercrmck Apr 29, 2021
53df522
[clang-tidy][NFC] Short circuit getting enum options suggestions.
njames93 May 3, 2021
d1bbe61
[ARM] Memory operands for MVE gathers/scatters
davemgreen May 3, 2021
69a3269
Support AArch64 PAC elf-core register read
omjavaid May 3, 2021
fe4c9b3
[clang] Remove libstdc++ friend template hack
urnathan Apr 27, 2021
876bf51
[clang-cl] Add parsing support for a bunch of new flags
zmodem Apr 28, 2021
530e074
Thread safety analysis: Replace flags in FactEntry by SourceKind (NFC)
aaronpuchert May 3, 2021
daca6ed
Thread safety analysis: Fix false negative on break
aaronpuchert May 3, 2021
ab7316f
[clang] Spell correct variable
urnathan May 3, 2021
1b24f35
[InstCombine] improve demanded bits analysis of left-shifted operand
rotateright May 3, 2021
1527a5e
[SystemZ][z/OS] Add the functions needed for handling EBCDIC I/O
abhina-sree May 3, 2021
895ba21
[gn build] Port 1527a5e4b483
llvmgnsyncbot May 3, 2021
2b7fa7f
[LV] Iterate over recipes in VPlan to fix PHI (NFC).
fhahn May 3, 2021
2055cc8
AMDGPU: XFAIL LLVM::note-amd-valid-v2.test for big endian
kzhuravl May 3, 2021
b5f6476
[SLP]Allow masked gathers only if allowed by target.
alexey-bataev Apr 26, 2021
2e4cc9a
Revert "[SLP]Allow masked gathers only if allowed by target."
alexey-bataev May 3, 2021
696becb
[Matrix] Remove bitcast when casting between matrices of the same size
SaurabhJha May 3, 2021
df280d1
[libc++] Acquire locks on Ranges work
ldionne Apr 30, 2021
aad3113
Partial revert of "Use std::foo_t rather than std::foo in LLVM." in g…
jroelofs Apr 29, 2021
27b651c
[InstCombine] cttz(zext(x)) -> zext(cttz(x)) if the 'ZeroIsUndef' par…
davidbolvansky May 3, 2021
fd18547
[SLP]Allow masked gathers only if allowed by target.
alexey-bataev May 3, 2021
c3d5f30
[clangd] Find implementors only when index is present.
usx95 May 3, 2021
3ed6a6f
[SystemZ][z/OS] Enforce prefix-less registers in SystemZAsmParser for…
aniprasad May 3, 2021
039bdcc
[MLIR] Canonicalize sub/add of a constant and another sub/add of a co…
wsmoses May 2, 2021
f9c8ebd
[ELF] Don't suggest alternative spelling of an empty name
MaskRay May 3, 2021
8d93d7f
[clang-format] Add options to AllowShortIfStatementsOnASingleLine to …
mkurdej May 3, 2021
d492532
[docs] Fix syntax typo.
mkurdej May 3, 2021
b2be167
[docs] Fix title overline.
mkurdej May 3, 2021
966435d
[AArch64] Fold CSEL x, x, cc -> x
davemgreen May 3, 2021
9d669e8
[docs] Bump the trunk major version to 13 and update copyright year.
mkurdej May 3, 2021
40f7834
[docs] Automatically update copyright year in libc++.
mkurdej May 3, 2021
d2a291a
[MLIR][Linalg] Lower `linalg.tiled_loop` to `scf` loops
frgossen May 3, 2021
31751ce
[clang-format] Fix build on gcc < 7 introduced in rG8d93d7ff.
mkurdej May 3, 2021
5fa9d41
[Support/Parallel] Add a special case for 0/1 items to llvm::parallel…
lattner May 1, 2021
b57d6fe
[mlir][Python] Add casting constructor to Type and Attribute.
stellaraccident May 2, 2021
9215357
[MLIR] Fix TestAffineDataCopy for test cases with no load ops
bondhugula May 2, 2021
9779b66
[docs][NewPM] Add section on analyses
aeubanks Apr 20, 2021
be8e280
[mlir][vector][NFC] split TransposeOp lowerning out of contractLowering
ThomasRaoux May 3, 2021
96a7900
[mlir] Fix multidimensional lowering from std.select to llvm.select
d0k May 3, 2021
a27ca15
[OpenMP] Fix non-determinism in clang task codegen
ggeorgakoudis May 3, 2021
89a94be
[AMDGPU] Change FLAT SADDR to VADDR form in moveToVALU
rampitec Apr 26, 2021
62e4dca
[libFuzzer] Fix off-by-one error in ApplyDictionaryEntry
fmeum Apr 30, 2021
ac51289
[libFuzzer] Deflake entropic exec-time test.
morehouse May 3, 2021
7417541
[mlir][vector] Add canonicalization for extract/insert -> shapecast
ThomasRaoux May 3, 2021
f44c76d
[mlir][vector] Extend vector transfer unrolling to support permutatio…
ThomasRaoux May 3, 2021
64a390c
Modules: Remove an extra early return, NFC
dexonsmith Apr 30, 2021
d98e5e0
[AIX] Remove unused vector registers from allocation order in the def…
ZarkoT May 3, 2021
4d6ebe8
[AMDGPU] Change FLAT Scratch SADDR to VADDR form in moveToVALU
rampitec Apr 30, 2021
d51275c
[mlir][spirv] Add support to convert std.splat op
ThomasRaoux May 3, 2021
1d29925
[DebuggerTuning] Move a comment to a more useful place.
pogo59 May 3, 2021
49e7be2
[libc++] Disentangle std::pointer_safety
ldionne Apr 13, 2021
9f3f6d7
Move MLIR python sources to mlir/python.
stellaraccident Apr 28, 2021
84f0bb6
[libc++] Fix template instantiation depth issues with std::tuple
ldionne May 3, 2021
39bbfb7
[libc++] Use the internal Lit shell to run the tests
ldionne Apr 30, 2020
e8f7241
[scudo] Don't track free/use stats for transfer batches.
hctim May 3, 2021
ca02fab
[AsmParser][SystemZ][z/OS] Implement HLASM location counter syntax ("…
aniprasad May 3, 2021
ec33916
[MLIR][Linalg] Lower `linalg.tiled_loop` in a separate pass
frgossen May 3, 2021
456efbc
[MLIR][Linalg] Avoid forward declaration in `Loops.cpp`
frgossen May 3, 2021
9621c1e
[mlir][linalg] Fix vectorization bug in vector transfer indexing map …
ThomasRaoux May 3, 2021
7531850
[CodeGen][ARM] Implement atomicrmw as pseudo operations at -O0
tmatheson-arm Mar 31, 2021
63f8226
[OpenMPIRBuilder] Add createOffloadMaptypes and createOffloadMapnames…
clementval May 3, 2021
fd15e2b
[mlir][Linalg] Use rank-reduced versions of subtensor and subtensor i…
May 3, 2021
15a4233
[ValueTracking] soften assert for invertible recurrence matching
rotateright May 3, 2021
cd460c4
[WebAssembly] Fixup order of ins variables for table instructions
pmatos May 3, 2021
ea817d7
[SimplifyCFG] Look for control flow changes instead of side effects.
teresajohnson Apr 28, 2021
fa3e262
[libcxx][iterator][ranges] adds `forward_iterator` and `forward_range`
cjdb Apr 11, 2021
9d86095
Revert "[CodeGen][ARM] Implement atomicrmw as pseudo operations at -O0"
tmatheson-arm May 3, 2021
2fec886
[sanitizer] Set IndentPPDirectives: AfterHash in .clang-format
MaskRay May 3, 2021
ab40c02
[MC][ELF] Work around R_MIPS_LO16 relocation handling problem
DimitryAndric May 3, 2021
e1babfc
Revert "[MC][ELF] Work around R_MIPS_LO16 relocation handling problem"
DimitryAndric May 3, 2021
90d18e1
[mlir][sparse] fixed typo: sparse -> sparse_tensor
aartbik May 3, 2021
9c5d86a
[libcxx][iterator][ranges] adds `bidirectional_iterator` and `bidirec…
cjdb Apr 12, 2021
a6e0939
[mlir][Linalg] Add a utility method to get reassociations maps for re…
May 3, 2021
1c1406f
[WebAssembly] Reenable end-to-end test in wasm-eh.cpp
aheejin May 3, 2021
08c0857
[InstCombine] cttz(sext(x)) -> cttz(zext(x))
davidbolvansky May 3, 2021
2d5d720
[debugserver] Include LLDB_VERSION_SUFFIX in debugserver version
JDevlieghere May 3, 2021
8a40bf6
[AArch64][SVE] More unpredicated ld1/st1 patterns for reg+reg address…
efriedma-quic Apr 15, 2021
1c0374e
[mlir] Add polynomial approximation for math::Log1p
cota May 3, 2021
404fa9a
[Utils] Add prof metadata to matched unnamed values
ggeorgakoudis May 3, 2021
88ca010
[InstCombine] Added tests for PR50094, NFC
davidbolvansky May 3, 2021
001ba65
[lld-macho] De-templatize mach_header operations
int3 May 3, 2021
183b0da
[lld-macho] Add ARM requirement to objc.s
int3 May 3, 2021
32b5004
Add some additional test cases inspired by PR50191
preames May 3, 2021
9982f33
[OpenMP] Refactor/Rework topology discovery code
jpeyton52 Apr 16, 2021
9b67096
[mlir] Linalg: add vector transfer lowering patterns to the contracti…
ezhulenev May 3, 2021
2d6aff8
One more test case inspired by PR50191
preames May 3, 2021
1828312
[Attributor] Add AAExecutionDomainInfo interface to OpenMPOpt
jhuber6 Apr 28, 2021
2df3426
[NewPM] Invalidate AAManager after populating GlobalsAA
aeubanks Apr 27, 2021
e38ccb7
Recommit "Generalize getInvertibleOperand recurrence handling slightly"
preames May 3, 2021
73332d7
[lld][WebAssembly] Do not merge comdat data segments
sbc100 May 1, 2021
7310403
[demangler] Initial support for the new Rust mangling scheme
tmiasko May 3, 2021
47ee47e
[gn build] Port 7310403e3cdf
llvmgnsyncbot May 4, 2021
a72499e
[libc] Introduce asctime, asctime_r to LLVM libc
rtenneti-google Mar 31, 2021
4ef1f90
[lld][WebAssembly] Convert more tests to asm format. NFC
sbc100 May 2, 2021
d14d84a
[NewPM] Only invalidate modified functions' analyses in CGSCC passes
aeubanks May 3, 2021
60ad0fd
Clarify the help for "breakpoint command add" and "watchpoint command…
jimingham May 4, 2021
012f01e
Precommit tests for D101720 (NFC)
aqjune May 2, 2021
24ce194
[InstCombine] generalize select + select/and/or folding using implied…
aqjune May 2, 2021
808fcdd
[lld][WebAssembly] Fix crash with `-pie` without `--allow-undefined`
sbc100 May 1, 2021
11326cb
[IndVarSimplify][NFC] Removed mayThrow from if-condition in predicate…
preames May 4, 2021
07ce5c9
[mlir][tosa] Add lowerings for tosa.equal and tosa.arithmetic_right_s…
NatashaKnk May 4, 2021
aa58281
[mlir] Fix bug in TransferOpReduceRank when all dims are broadcasts
matthias-springer May 4, 2021
2669aba
[clang][CodeGen] Use llvm::stable_sort for multi version resolver opt…
hyp May 4, 2021
959eec1
[NFC] Give better diagnose on clang-format not found error
May 4, 2021
27b426b
[lld-macho] Implement builtin section renaming
gkmhub Apr 25, 2021
ed51156
[ModuleUtils] NFC: Add unit tests for appendToUsedList
rksharma-yymd May 4, 2021
97f4789
[gn build] Port ed51156084dd
llvmgnsyncbot May 4, 2021
18883a3
[TTI] Replace ceil lambdas with divideCeil. NFCI
davemgreen May 4, 2021
46fa214
[RISCV] Lower splats of non-constant i1s as SETCCs
frasercrmck Apr 28, 2021
b83b232
Introduce -Wreserved-identifier
Dec 9, 2020
f800ac8
[clangd] Fix hover crash on broken code
kadircet May 3, 2021
6e2134c
Merge commit '2813acb' into merge/expand-vp
simoll Jul 12, 2021
ff3058e
[vp][generalmatching] undef_match::match_context
simoll Jul 12, 2021
e589e11
Merge commit 'f800ac8309417b78c084f2eabfd54d43a66b64a2' into feature/…
kaz7 Jul 12, 2021
7266262
[llvm] Unbreak no-assertion testing
davezarzycki May 4, 2021
595755f
[VE] Resolve merge conflicts related to C++ stdlib path
kaz7 Jul 12, 2021
3b6f030
[VE] Comment out function using VPLegalization
kaz7 Jul 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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions clang-tools-extra/clang-query/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ clang_target_link_libraries(clangQuery
clangBasic
clangDynamicASTMatchers
clangFrontend
clangTooling
clangSerialization
)

100 changes: 98 additions & 2 deletions clang-tools-extra/clang-query/Query.cpp
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Frontend/ASTUnit.h"
#include "clang/Frontend/TextDiagnostic.h"
#include "clang/Tooling/NodeIntrospection.h"
#include "llvm/Support/raw_ostream.h"

using namespace clang::ast_matchers;
@@ -66,6 +67,8 @@ bool HelpQuery::run(llvm::raw_ostream &OS, QuerySession &QS) const {
"Diagnostic location for bound nodes.\n"
" detailed-ast "
"Detailed AST output for bound nodes.\n"
" srcloc "
"Source locations and ranges for bound nodes.\n"
" dump "
"Detailed AST output for bound nodes (alias of detailed-ast).\n\n";
return true;
@@ -86,6 +89,90 @@ struct CollectBoundNodes : MatchFinder::MatchCallback {
}
};

void dumpLocations(llvm::raw_ostream &OS, DynTypedNode Node, ASTContext &Ctx,
const DiagnosticsEngine &Diags, SourceManager const &SM) {
auto Locs = clang::tooling::NodeIntrospection::GetLocations(Node);

auto PrintLocations = [](llvm::raw_ostream &OS, auto Iter, auto End) {
auto CommonEntry = Iter->first;
auto Scout = Iter;
SmallVector<std::string> LocationStrings;
while (Scout->first == CommonEntry) {
LocationStrings.push_back(
tooling::LocationCallFormatterCpp::format(*Iter->second));
if (Scout == End)
break;
++Scout;
if (Scout->first == CommonEntry)
++Iter;
}
llvm::sort(LocationStrings);
for (auto &LS : LocationStrings) {
OS << " * \"" << LS << "\"\n";
}
return Iter;
};

TextDiagnostic TD(OS, Ctx.getLangOpts(), &Diags.getDiagnosticOptions());

for (auto Iter = Locs.LocationAccessors.begin();
Iter != Locs.LocationAccessors.end(); ++Iter) {
if (!Iter->first.isValid())
continue;

TD.emitDiagnostic(FullSourceLoc(Iter->first, SM), DiagnosticsEngine::Note,
"source locations here", None, None);

Iter = PrintLocations(OS, Iter, Locs.LocationAccessors.end());
OS << '\n';
}

for (auto Iter = Locs.RangeAccessors.begin();
Iter != Locs.RangeAccessors.end(); ++Iter) {

if (!Iter->first.getBegin().isValid())
continue;

if (SM.getPresumedLineNumber(Iter->first.getBegin()) !=
SM.getPresumedLineNumber(Iter->first.getEnd()))
continue;

TD.emitDiagnostic(FullSourceLoc(Iter->first.getBegin(), SM),
DiagnosticsEngine::Note,
"source ranges here " + Iter->first.printToString(SM),
CharSourceRange::getTokenRange(Iter->first), None);

Iter = PrintLocations(OS, Iter, Locs.RangeAccessors.end());
}
for (auto Iter = Locs.RangeAccessors.begin();
Iter != Locs.RangeAccessors.end(); ++Iter) {

if (!Iter->first.getBegin().isValid())
continue;

if (SM.getPresumedLineNumber(Iter->first.getBegin()) ==
SM.getPresumedLineNumber(Iter->first.getEnd()))
continue;

TD.emitDiagnostic(
FullSourceLoc(Iter->first.getBegin(), SM), DiagnosticsEngine::Note,
"source range " + Iter->first.printToString(SM) + " starting here...",
CharSourceRange::getTokenRange(Iter->first), None);

auto ColNum = SM.getPresumedColumnNumber(Iter->first.getEnd());
auto LastLineLoc = Iter->first.getEnd().getLocWithOffset(-(ColNum - 1));

TD.emitDiagnostic(FullSourceLoc(Iter->first.getEnd(), SM),
DiagnosticsEngine::Note, "... ending here",
CharSourceRange::getTokenRange(
SourceRange(LastLineLoc, Iter->first.getEnd())),
None);

Iter = PrintLocations(OS, Iter, Locs.RangeAccessors.end());
}
OS << "\n";
}

} // namespace

bool MatchQuery::run(llvm::raw_ostream &OS, QuerySession &QS) const {
@@ -106,8 +193,10 @@ bool MatchQuery::run(llvm::raw_ostream &OS, QuerySession &QS) const {
return false;
}

AST->getASTContext().getParentMapContext().setTraversalKind(QS.TK);
Finder.matchAST(AST->getASTContext());
auto &Ctx = AST->getASTContext();
const auto &SM = Ctx.getSourceManager();
Ctx.getParentMapContext().setTraversalKind(QS.TK);
Finder.matchAST(Ctx);

if (QS.PrintMatcher) {
SmallVector<StringRef, 4> Lines;
@@ -159,6 +248,13 @@ bool MatchQuery::run(llvm::raw_ostream &OS, QuerySession &QS) const {
Dumper.Visit(BI->second);
OS << "\n";
}
if (QS.SrcLocOutput) {
OS << "\n \"" << BI->first << "\" Source locations\n";
OS << " " << std::string(19 + BI->first.size(), '-') << '\n';

dumpLocations(OS, BI->second, Ctx, AST->getDiagnostics(), SM);
OS << "\n";
}
}

if (MI->getMap().empty())
3 changes: 2 additions & 1 deletion clang-tools-extra/clang-query/Query.h
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
namespace clang {
namespace query {

enum OutputKind { OK_Diag, OK_Print, OK_DetailedAST };
enum OutputKind { OK_Diag, OK_Print, OK_DetailedAST, OK_SrcLoc };

enum QueryKind {
QK_Invalid,
@@ -149,6 +149,7 @@ struct SetExclusiveOutputQuery : Query {
QS.DiagOutput = false;
QS.DetailedASTOutput = false;
QS.PrintOutput = false;
QS.SrcLocOutput = false;
QS.*Var = true;
return true;
}
26 changes: 17 additions & 9 deletions clang-tools-extra/clang-query/QueryParser.cpp
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
#include "QuerySession.h"
#include "clang/ASTMatchers/Dynamic/Parser.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Tooling/NodeIntrospection.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include <set>
@@ -104,16 +105,19 @@ QueryRef QueryParser::parseSetBool(bool QuerySession::*Var) {

template <typename QueryType> QueryRef QueryParser::parseSetOutputKind() {
StringRef ValStr;
unsigned OutKind = LexOrCompleteWord<unsigned>(this, ValStr)
.Case("diag", OK_Diag)
.Case("print", OK_Print)
.Case("detailed-ast", OK_DetailedAST)
.Case("dump", OK_DetailedAST)
.Default(~0u);
bool HasIntrospection = tooling::NodeIntrospection::hasIntrospectionSupport();
unsigned OutKind =
LexOrCompleteWord<unsigned>(this, ValStr)
.Case("diag", OK_Diag)
.Case("print", OK_Print)
.Case("detailed-ast", OK_DetailedAST)
.Case("srcloc", OK_SrcLoc, /*IsCompletion=*/HasIntrospection)
.Case("dump", OK_DetailedAST)
.Default(~0u);
if (OutKind == ~0u) {
return new InvalidQuery(
"expected 'diag', 'print', 'detailed-ast' or 'dump', got '" + ValStr +
"'");
return new InvalidQuery("expected 'diag', 'print', 'detailed-ast'" +
StringRef(HasIntrospection ? ", 'srcloc'" : "") +
" or 'dump', got '" + ValStr + "'");
}

switch (OutKind) {
@@ -123,6 +127,10 @@ template <typename QueryType> QueryRef QueryParser::parseSetOutputKind() {
return new QueryType(&QuerySession::DiagOutput);
case OK_Print:
return new QueryType(&QuerySession::PrintOutput);
case OK_SrcLoc:
if (HasIntrospection)
return new QueryType(&QuerySession::SrcLocOutput);
return new InvalidQuery("'srcloc' output support is not available.");
}

llvm_unreachable("Invalid output kind");
5 changes: 3 additions & 2 deletions clang-tools-extra/clang-query/QuerySession.h
Original file line number Diff line number Diff line change
@@ -25,14 +25,15 @@ class QuerySession {
public:
QuerySession(llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs)
: ASTs(ASTs), PrintOutput(false), DiagOutput(true),
DetailedASTOutput(false), BindRoot(true), PrintMatcher(false),
Terminate(false), TK(TK_AsIs) {}
DetailedASTOutput(false), SrcLocOutput(false), BindRoot(true),
PrintMatcher(false), Terminate(false), TK(TK_AsIs) {}

llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs;

bool PrintOutput;
bool DiagOutput;
bool DetailedASTOutput;
bool SrcLocOutput;

bool BindRoot;
bool PrintMatcher;
5 changes: 3 additions & 2 deletions clang-tools-extra/clang-tidy/ClangTidyCheck.cpp
Original file line number Diff line number Diff line change
@@ -147,7 +147,7 @@ llvm::Optional<int64_t> ClangTidyCheck::OptionsView::getEnumInt(

StringRef Value = Iter->getValue().Value;
StringRef Closest;
unsigned EditDistance = -1;
unsigned EditDistance = 3;
for (const auto &NameAndEnum : Mapping) {
if (IgnoreCase) {
if (Value.equals_lower(NameAndEnum.second))
@@ -159,7 +159,8 @@ llvm::Optional<int64_t> ClangTidyCheck::OptionsView::getEnumInt(
EditDistance = 0;
continue;
}
unsigned Distance = Value.edit_distance(NameAndEnum.second);
unsigned Distance =
Value.edit_distance(NameAndEnum.second, true, EditDistance);
if (Distance < EditDistance) {
EditDistance = Distance;
Closest = NameAndEnum.second;
29 changes: 22 additions & 7 deletions clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp
Original file line number Diff line number Diff line change
@@ -158,6 +158,9 @@ void MacroParenthesesPPCallbacks::argument(const Token &MacroNameTok,
// Skip variable declaration.
bool VarDecl = possibleVarDecl(MI, MI->tokens_begin());

// Skip the goto argument with an arbitrary number of subsequent stars.
bool FoundGoto = false;

for (auto TI = MI->tokens_begin(), TE = MI->tokens_end(); TI != TE; ++TI) {
// First token.
if (TI == MI->tokens_begin())
@@ -179,9 +182,17 @@ void MacroParenthesesPPCallbacks::argument(const Token &MacroNameTok,
continue;
}

// There should not be extra parentheses for the goto argument.
if (Tok.is(tok::kw_goto)) {
FoundGoto = true;
continue;
}

// Only interested in identifiers.
if (!Tok.isOneOf(tok::identifier, tok::raw_identifier))
if (!Tok.isOneOf(tok::identifier, tok::raw_identifier)) {
FoundGoto = false;
continue;
}

// Only interested in macro arguments.
if (MI->getParameterNum(Tok.getIdentifierInfo()) < 0)
@@ -239,12 +250,16 @@ void MacroParenthesesPPCallbacks::argument(const Token &MacroNameTok,
if (MI->isVariadic())
continue;

Check->diag(Tok.getLocation(), "macro argument should be enclosed in "
"parentheses")
<< FixItHint::CreateInsertion(Tok.getLocation(), "(")
<< FixItHint::CreateInsertion(Tok.getLocation().getLocWithOffset(
PP->getSpelling(Tok).length()),
")");
if (!FoundGoto) {
Check->diag(Tok.getLocation(), "macro argument should be enclosed in "
"parentheses")
<< FixItHint::CreateInsertion(Tok.getLocation(), "(")
<< FixItHint::CreateInsertion(Tok.getLocation().getLocWithOffset(
PP->getSpelling(Tok).length()),
")");
}

FoundGoto = false;
}
}

Loading