Skip to content

LLVM pulldown #981

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 3,521 commits into from
Dec 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3521 commits
Select commit Hold shift + click to select a range
27ae925
Skip generating C++ for "DeclareOpInterfaceMethods" in op interface gen.
jingpu Dec 13, 2019
7ac42fa
Refactor various canonicalization patterns as in-place folds.
River707 Dec 13, 2019
200beb8
Apply a level of sugaring to the linalg.generic EDSC - NFC
nicolasvasilache Dec 14, 2019
3ef15a8
Reconcile struct and class for NestedPatternMatchers - NFC
nicolasvasilache Dec 14, 2019
2d22b1e
Add verifyCompatibleShape function overload with shapes
smit-hinsu Dec 14, 2019
97af932
Splat op doc - fix misformat / update tablegen op desc. comment
bondhugula Dec 14, 2019
44fc7d7
Remove LLVM dependency on mlir::Module and instead check Traits.
tpopp Dec 16, 2019
0684aa9
Make memref promotion during std->LLVM lowering the default calling c…
ftynse Dec 16, 2019
73ec37c
Adds ExtractSlicesOp to the VectorOps dialect.
andydavis1 Dec 16, 2019
cd5dab8
[VectorOps] Add [insert/extract]element definition together with lowe…
aartbik Dec 16, 2019
c290e99
Remove unused variable (fix warning) NFC
joker-eph Dec 16, 2019
3ae56c4
[Linalg] Expose subview promotion as a declarative pattern
tetuante Dec 16, 2019
ed749b7
Make "LowerToCFG" an operation pass
ftynse Dec 16, 2019
ab610e8
Insert signature-converted blocks into a region with a parent operation.
River707 Dec 16, 2019
6273fa0
Plug gpu.func into the GPU lowering pipelines
ftynse Dec 16, 2019
11e9287
Add InsertSlicesOp to the VectorOps dialect.
andydavis1 Dec 16, 2019
3c179b6
Add edsc::ops for pointwise, conv and dilated_conv
nicolasvasilache Dec 16, 2019
659150b
[spirv] Re-enable nested loop (de)serialization test
antiagainst Dec 16, 2019
a0557ea
Fix (de)serialization generation for SPV_ScopeAttr, SPV_MemorySemanti…
Dec 16, 2019
80ec474
Add atomic operations to SPIR-V dialect.
Dec 16, 2019
4e825c5
Update vector op unrolling transformation to generate ExtractSlicesOp…
andydavis1 Dec 17, 2019
8d68fe6
Replace code with equivalent satisfiesLLVMModule() function call.
tpopp Dec 17, 2019
038ad1d
Add pattern rewrite which splits a vector TransferReadOp into slices …
andydavis1 Dec 17, 2019
6e581e2
Integrate from upstream at revision e4fce659a759.
a-googler Dec 17, 2019
f44cf23
Add a new utility class TypeSwitch to ADT.
River707 Dec 17, 2019
9f45a22
fix a typo in OpDefinitions doc
jinmingjian Dec 17, 2019
d1fb285
Add pattern rewrite to forward vector tuple elements to their users.
andydavis1 Dec 17, 2019
651eaa0
Homogenize the description of the MemRef conversion to the LLVM dialect
ftynse Dec 17, 2019
0bdc72d
StdToLLVM conversion: drop getMemRefElementType utility function
ftynse Dec 17, 2019
62f498d
ConversionToLLVMDialect doc: update the syntax for LLVM types
ftynse Dec 17, 2019
42b3fe8
Make it possible to override the lowering of MemRef to the LLVM diale…
ftynse Dec 17, 2019
319cca3
Add missing virtual inliner interface method in SPIR-V dialect.
Dec 17, 2019
6fa3bd5
Add pattern rewrite which splits a vector TransferWriteOp into slices…
andydavis1 Dec 17, 2019
74278dd
NFC: Use TypeSwitch to simplify existing code.
River707 Dec 17, 2019
5a0d480
NFC: Use this-> to appease GCC bug related to template lambda.
River707 Dec 18, 2019
c6c6a74
Add support for float and string attributes to the C API and python b…
a-googler Dec 18, 2019
40ef46f
Harden the requirements to memory attribution types in gpu.func
ftynse Dec 18, 2019
abcf5ff
Fix line break in LangRef
jpienaar Dec 18, 2019
24ab836
Move function template definition to the header file. NFC
ftynse Dec 18, 2019
4562e38
NFC: Remove unnecessary 'llvm::' prefix from uses of llvm symbols dec…
River707 Dec 18, 2019
47034c4
Introduce prefetch op: affine -> std -> llvm intrinsic
bondhugula Dec 18, 2019
2666b97
NFC: Cleanup non-conforming usages of namespaces.
River707 Dec 18, 2019
d7e2cc9
Update code block designations
jpienaar Dec 18, 2019
29807ff
Add support for providing a default implementation for an interface m…
River707 Dec 18, 2019
c169852
NFC: Remove forbidden include of <iostream>
River707 Dec 18, 2019
d9b500d
[VectorOps] Add vector.print definition, with lowering support
aartbik Dec 18, 2019
6054610
Added LLVM ops and lowering phases from standard dialect for FAbs, FC…
dfki-mako Dec 18, 2019
7b3adda
Move the specializations of VectorTransferRewriter::matchAndRewrite b…
River707 Dec 18, 2019
553f794
Add a couple useful LLVM_DEBUG's to the inliner.
silvasean Dec 18, 2019
a1e84db
[VectorOps] Replace iostream with stdio in support lib for vector.print
aartbik Dec 18, 2019
50f9be6
Add runtime utils support for print_memref_i8
nicolasvasilache Dec 19, 2019
efadb6b
Detemplatize ModuleTranslation::lookupValues
ftynse Dec 19, 2019
15f800f
[VectorOps] minor cleanup: vector dialect "subscripts" are i32
aartbik Dec 19, 2019
1bcd8ef
LLVMFuncOp: implement addEntryBlock
ftynse Dec 19, 2019
1d798b1
[VectorOps] Add vector ReshapeOp to the VectorOps dialect.
andydavis1 Dec 19, 2019
6685282
Restructure and update Linalg ODS and documentation - NFC
nicolasvasilache Dec 19, 2019
8020ad3
[VectorOps] Update vector transfer_read/write ops to operatate on mem…
andydavis1 Dec 20, 2019
b6d54a1
Unique trait list during ODS Operator trait construction
jpienaar Dec 20, 2019
7811ad3
Allow dialect to create friendly names for region arguments
Dec 20, 2019
42d46b4
Add gpu.shuffle op.
chsigg Dec 20, 2019
e5691c5
fix isValidDim for block arg case
bondhugula Dec 20, 2019
67c019d
[VectorOps] remove redundant returns from invalid ops test
aartbik Dec 20, 2019
1d47564
[VectorOps] unify vector dialect "subscripts"
aartbik Dec 20, 2019
ee71ca1
NFC: Move the classes related to Pass options into a new header file …
River707 Dec 21, 2019
dcc14f0
Make Type and Attribute classes trivially copyable
ftynse Dec 21, 2019
22954a0
Add integer bit-shift operations to the standard dialect.
ombre5733 Dec 22, 2019
35807bc
NFC: Introduce new ValuePtr/ValueRef typedefs to simplify the transit…
River707 Dec 23, 2019
7a9ebe9
[msan] Intercept qsort, qsort_r.
eugenis Dec 19, 2019
caa48a6
[msan] Check qsort input.
eugenis Dec 20, 2019
0d3f782
[FPEnv][X86] More strict int <-> FP conversion fixes
uweigand Dec 23, 2019
4b64e03
ASTContext: fix declaration of ParsedTargetAttr [-Wmismatched-tags] a…
MaskRay Dec 23, 2019
5762648
[Docs] Fix sphinx build errors.
fhahn Dec 23, 2019
187f66b
[lldb/CMake] Always set a value for find_package when finding optiona…
bulbazord Dec 23, 2019
e5a743c
Add implementations of POSIX mmap and munmap functions.
Dec 5, 2019
9a77c20
[InstCombine] add tests for not(select ...); NFC
rotateright Dec 23, 2019
25cf5d9
[InstCombine] add test for copysign; NFC
rotateright Dec 23, 2019
56222a0
Adjust License.txt file to use the LLVM license
joker-eph Dec 23, 2019
f603a50
ReImplement the Value classes as value-typed objects wrapping an inte…
River707 Dec 23, 2019
268365a
Automated rollback of commit f603a50109107b447b835dac11f0eb541288393e
a-googler Dec 23, 2019
ab46543
Resubmit: ReImplement the Value classes as value-typed objects wrappi…
River707 Dec 23, 2019
a5d5d29
Update SPIR-V.md
antiagainst Dec 23, 2019
5d5bd2e
Change the `notifyRootUpdated` API to be transaction based.
River707 Dec 23, 2019
379613d
[CFG] Fix an assertion failure with static initializers
Xazax-hun Dec 23, 2019
e62a695
NFC: Replace ValuePtr with Value and remove it now that Value is valu…
River707 Dec 23, 2019
21610e6
Refactor the way that pass options are specified.
River707 Dec 23, 2019
ac6dce1
Remove pybind11-based bindings
joker-eph Dec 24, 2019
ebcb36d
Revert "[lldb] Don't process symlinks deep inside DWARFUnit"
JDevlieghere Dec 24, 2019
5b4a01d
Adjust some MLIR paths and docs
joker-eph Dec 24, 2019
6f635f9
[DWARF] Check that all fields of a Unit Header are read.
igorkudrin Dec 20, 2019
0f0d0ed
Import MLIR into the LLVM tree
joker-eph Dec 24, 2019
199700a
DebugInfo: Support dumping any exprloc as an expression
dwblaikie Dec 22, 2019
1399281
NFC: Rename printOptionValue to printValue to fix MSVC build.
River707 Dec 24, 2019
4b0563f
test: correct flags for Windows
compnerd Dec 24, 2019
01b98e6
[SelectionDAG] Don't repeatedly add a node to the worklist in Compute…
MaskRay Dec 24, 2019
e0d855b
[SelectionDAG] Change SelectionDAGISel::{funcInfo,SDB} to use unique_ptr
MaskRay Dec 24, 2019
0a72515
[DebugInfo] Fix v4 macinfo for dwo files.
SouraVX Dec 24, 2019
7f047c4
Add `mlir` to -DLLVM_ALL_PROJECTS CMake option
joker-eph Dec 24, 2019
a28b65b
[docs] fix typo in Lexicon.rst
ftynse Dec 23, 2019
c6a5534
Remove static MLIR doc ; they are already on the website
joker-eph Dec 24, 2019
301cb91
[llvm-readobj] - Remove an excessive helper for printing dynamic tags.
Dec 23, 2019
34766da
Add the Apache2 with LLVM exceptions license to MLIR
joker-eph Dec 24, 2019
83c7a42
DebugInfo: Add {} to address -Wdangling-else warning.
dwblaikie Dec 24, 2019
fccac1e
DebugInfo: Correct the form of DW_AT_macro_info in .dwo files (sec_of…
dwblaikie Dec 24, 2019
42dba63
[TypePromotion] Make TypeSize a class member
sparker-arm Dec 24, 2019
002e072
[clang] [ast] CXXRecordDecl::getVisibleConversionFunctions() could be…
whisperity Dec 24, 2019
2e9bfa1
Revert "[Support] Extend TimeProfiler to support multiple threads"
rgal Dec 24, 2019
c96c606
clang-doc remove trailing whitespaces
sylvestre Dec 24, 2019
8131c04
doc: Document that extra-arg/extra-arg-before can be used several times
sylvestre Dec 24, 2019
4657a39
[lldb][NFC] Remove ClangExternalASTSourceCommon
Teemperor Dec 23, 2019
95b69a7
mlir README.md: Fix the syntax
sylvestre Dec 24, 2019
2026d7b
VariableName doc: fix the link to the mozilla doc
sylvestre Dec 24, 2019
0293b5d
[NFC] Remove some dead code from CGBuiltin.cpp.
kpneal Dec 24, 2019
9035fa6
AMDGPU/GlobalISel: Lower llvm.amdgcn.else
arsenm Dec 20, 2019
e351256
GlobalISel: Define equivalent node for G_INTRINSIC_TRUNC
arsenm Dec 24, 2019
df5c215
AMDGPU/GlobalISel: Legalize some 16-bit round instructions
arsenm Dec 24, 2019
c16b3ec
Fix false positive in magic number checker.
0x8000-0000 Dec 24, 2019
f58f391
Fix readability-const-return-type identifying the wrong `const` token
mirsky-work Dec 24, 2019
a12ac70
[lldb][NFC] Move ClangASTContext::m_scratch_ast_source_up to the appr…
Teemperor Dec 24, 2019
9b61641
GlobalISel: Fix naming variables "brank" instead of "bank"
arsenm Dec 22, 2019
1aa763a
GlobalISel: Define equivalent node for G_INTRINSIC_ROUND
arsenm Dec 24, 2019
0d47399
GlobalISel: Update syntax in debug printing
arsenm Dec 21, 2019
93dc40d
[OPENMP50]Basic support for conditional lastprivate.
alexey-bataev Dec 20, 2019
3cb934c
[OPENMP][DOCS]Update status of OpenMP 5.0 features, NFC.
alexey-bataev Dec 24, 2019
a21becc
[X86] Add STRICT versions of CVTTP2SI, CVTTP2UI, CMPM, and CMPP.
topperc Dec 24, 2019
64c6bb3
test: ensure that we dead-strip in the linker
compnerd Dec 24, 2019
020ca0c
[mlir] Fix -Wunneeded-internal-declaration
MaskRay Dec 24, 2019
c06e531
[X86] Use 128-bit vector instructions for f32/f64->i64 conversions on…
topperc Dec 24, 2019
fc356dc
[compiler-rt] Adapt stop-the-world for ptrace changes in NetBSD-9.99.30
krytarowski Dec 24, 2019
4b8232d
[compiler-rt] Adapt for ptrace(2) changes in NetBSD-9.99.30
krytarowski Dec 24, 2019
ab8a7a2
[lldb] Adapt for NetBSD-9.99.30 ptrace(2) API changes
krytarowski Dec 24, 2019
1f054d6
AMDGPU/GlobalISel: Fix mapping and selection of llvm.amdgcn.div.fixup
arsenm Dec 20, 2019
3732f4e
[OPENMP]Add extra checks and initialization for clause modifier.
alexey-bataev Dec 24, 2019
502a77f
Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"…
MaskRay Dec 24, 2019
eb16435
Migrate function attribute "no-frame-pointer-elim-non-leaf" to "frame…
MaskRay Dec 25, 2019
a36ddf0
Migrate function attribute "no-frame-pointer-elim"="false" to "frame-…
MaskRay Dec 25, 2019
9f6b13e
[Support] Fix behavior of StringRef::count with overlapping occurrenc…
jdoerfert Dec 24, 2019
c853c73
[Thumb][test] Fix CodeGen/Thumb/PR17309.ll after llvmorg-10-init-160…
MaskRay Dec 25, 2019
1ac7c50
[WinEH] Delete addFnAttr("no-frame-pointer-elim") which seems no long…
MaskRay Dec 25, 2019
583ef13
[MCJIT] Migrate function attribute "no-frame-pointer-elim" to "frame-…
MaskRay Dec 25, 2019
58f324a
[Attributor] Function level undefined behavior attribute
jdoerfert Dec 25, 2019
5732f56
[Attributor] UB Attribute now handles all instructions that access me…
jdoerfert Dec 25, 2019
52b5fe5
[compiler-rt] [netbsd] Define _RTLD_SOURCE to fix build
krytarowski Dec 25, 2019
27dc4c3
[X86FixupSetCC] Use MachineInstr::readRegister/definesRegister to che…
topperc Dec 25, 2019
1d5d074
[Attributor] Reach optimistic fixpoint in AAValueSimplify when the v…
uenoku Dec 25, 2019
1497a43
[MLIR][NFC] Insert const_cast to avoid warning
uenoku Dec 25, 2019
8304781
Add missing strict_fp_to_int
MoringLiu Dec 25, 2019
604d7fb
[llvm-readobj/llvm-readelf][test] - Add testing for EI_OSABI and EI_A…
Dec 20, 2019
1a2d2b4
[llvm-readobj] - Merge `gnu-symbols.test` to `symbols.test` and cleanup.
Dec 19, 2019
80c45e4
[AMDGPU][MC][DOC] Updated AMD GPU assembler syntax description.
dpreobra Dec 25, 2019
aff6c9d
[compiler-rt] [netbsd] Correct the fallback definition of PT_LWPNEXT
krytarowski Dec 25, 2019
ba1cdba
[llvm-nm] Display STT_GNU_IFUNC as 'i'
MaskRay Dec 22, 2019
2498d88
[X86] Merge together some common code in LowerFP_TO_INT now that we h…
topperc Dec 25, 2019
caf460d
[lldb][NFC] Use StringRef in ClangASTContext::GetBuiltinTypeForDWARFE…
Teemperor Dec 25, 2019
4af5b23
[X86FixupSetCC] Remember the preceding eflags defining instruction wh…
topperc Dec 25, 2019
c5b4a23
[X86] Use zero vector to extend to 512-bits for strict_fp_to_uint v2i…
topperc Dec 25, 2019
f9c3c5d
[OpenMP][IR-Builder] Introduce the finalization stack
jdoerfert Dec 25, 2019
2e6c15d
Make lazyload_metadata.ll resilient to the addition of new metadata k…
Dec 19, 2019
e4add97
[OpenMP][IR-Builder] Introduce "pragma omp parallel" code generation
jdoerfert Dec 25, 2019
cb6e84f
test commit
dgherzka Dec 26, 2019
b082a29
Revert "test commit"
dgherzka Dec 26, 2019
472bded
[X86] Enable STRICT_SINT_TO_FP/STRICT_UINT_TO_FP on X86 backend
phoebewang Dec 24, 2019
6cf6f7d
Revert "Make lazyload_metadata.ll resilient to the addition of new me…
dgherzka Dec 26, 2019
6d88b7d
[PowerPC] Modify the hasSideEffects of MTLR and MFLR from 1 to 0
zhangkangcool Dec 26, 2019
d1f41b2
[NFC][LoopFusion] Fix printing of the guard branch.
Dec 26, 2019
e973783
[NFC][PowerPC] Add a function tryAndWithMask to handle all the cases
Dec 26, 2019
6599d00
[Bitstream] Delete skipAbbreviatedField which duplicates readAbbrevia…
MaskRay Dec 26, 2019
1b57749
[PowerPC] stop folding if result rlwinm mask is wrap while original r…
Dec 26, 2019
d2a8e14
Fix the MLIR Vim syntax file: the keyword group was missing
chelxom Dec 20, 2019
073cdb2
[clang][test] Minor fixes in testcase absolute-paths-symlinks.c
ka-ka Dec 26, 2019
b036f55
[lldb] Remove some calls to GetASTContext
Teemperor Dec 25, 2019
54c5224
[compiler-rt] Disable QSORT interception on watchOS and tvOS.
fhahn Dec 26, 2019
37339d1
[lldb][NFC] Use ClangASTContext in AppleObjCRuntime interfaces
Teemperor Dec 26, 2019
f57b35a
[lldb][tests] Posix function strdup requires macro _POSIX_C_SOURCE
tkrasnukha Nov 29, 2019
a58bd0e
[lldb][tests] Platform triple can be None
tkrasnukha Dec 10, 2019
04359f4
[lldb][NFC] Simplify if-return
tkrasnukha Dec 11, 2019
b7c45ac
[lldb][NFC] Add "lldb-vscode" to all_categories
tkrasnukha Dec 11, 2019
b0469ee
[lldb][NFC] Move lock scope where it should begin
tkrasnukha Dec 26, 2019
e2d3eb0
[lldb] Specify unsigned underlying type for an enumeration explicitly
tkrasnukha Dec 26, 2019
db1fa62
[lldb][test] Don't include "test_common.h" in the debug macros test
tkrasnukha Dec 26, 2019
e308a0c
[libcxx] Fix a typo in config.py
broadwaylamb Dec 26, 2019
287307a
Partially revert "Add initial tests for update_{llc_,cc_,}test_checks…
rnk Dec 26, 2019
de60c26
[X86] Add avx512f and avx512dq+vl command lines to the vector strictf…
topperc Dec 26, 2019
7f07195
[X86] Add test cases for v2i64->v2f32 strict_sint_to_fp/strict_uint_t…
topperc Dec 26, 2019
4e6b0dd
[X86] Add custom lowering for v2i64->v2f32 strict_sint_to_fp/strict_u…
topperc Dec 26, 2019
c91bf72
[X86] Merge the SINT_TO_FP/UINT_TO_FP handlers in ReplaceNodeResults …
topperc Dec 26, 2019
6c5d1f4
[OpenMP][NFCI] Use the libFrontend ProcBindKind in Clang
jdoerfert Dec 26, 2019
ffd5740
[BPF] Enable relocation location for load/store/shifts
yonghong-song Dec 19, 2019
cb5eb13
[Attributor] Add helper to change an instruction to `unreachable` inst
uenoku Dec 26, 2019
1edd965
[ELF] Support input section description .gnu.version* in /DISCARD/
MaskRay Dec 22, 2019
cdd25a4
[DebugInfo][SelectionDAG] Change order while transferring SDDbgValue …
chbessonova Dec 5, 2019
be4704b
Make lazyload_metadata.ll resilient to the addition of new metadata k…
dgherzka Dec 26, 2019
6a3ecf4
Allow newlines in AST Matchers in clang-query files
steveire Dec 18, 2019
831b636
Revert "Allow newlines in AST Matchers in clang-query files"
steveire Dec 26, 2019
04926e6
Revert "[msan] Check qsort input."
eugenis Dec 26, 2019
522ee29
Allow newlines in AST Matchers in clang-query files
steveire Dec 18, 2019
bb01387
[X86] Add custom widening for v2f64->v2i32 strict_fp_to_uint with avx…
topperc Dec 26, 2019
1417558
[ELF] Improve the condition to create .interp
MaskRay Jun 3, 2019
90ff34e
[X86] Add custom widening for v2i32->v2f64 strict_uint_to_fp with AVX…
topperc Dec 26, 2019
b52cb56
Add a clang-tidy configuration file for MLIR, it is using camelBack f…
joker-eph Dec 26, 2019
019a92b
[ELF][test] Fix dynamic-linker.s
MaskRay Dec 26, 2019
ad1f7a8
Revert "Make lazyload_metadata.ll resilient to the addition of new me…
rnk Dec 26, 2019
f953882
[X86] Custom widen 128/256-bit vXi32 uint_to_fp on avx512f targets wi…
topperc Dec 26, 2019
4e5d134
Make lazyload_metadata.ll resilient to the addition of new metadata k…
dgherzka Dec 26, 2019
2369560
Fix -Wunused-lambda-capture warnings.
echristo Dec 26, 2019
1584e2f
Remove SrcVT only used in an assert and propagate query.
echristo Dec 26, 2019
78f714f
[compiler-rt] [netbsd] Add support for versioned statvfs interceptors
krytarowski Dec 27, 2019
1a7b69f
add custom operation for strict fpextend/fpround
MoringLiu Dec 26, 2019
5ca97d0
Revert "Allow newlines in AST Matchers in clang-query files" + 1
eugenis Dec 27, 2019
30617e4
Remove unused static function.
echristo Dec 27, 2019
3009cee
Fix a -Wcovered-switch-default warning by moving the unreachable out …
echristo Dec 27, 2019
3d18ce7
Remove an unused static function.
echristo Dec 27, 2019
e1838a1
Fix a -Wcovered-switch-default warning by moving the unreachable out …
echristo Dec 27, 2019
8f9304f
Temporarily Revert "[compiler-rt] [netbsd] Add support for versioned …
echristo Dec 27, 2019
371038e
Add an __attribute__((unused)) to populateWithGenerated since it might
echristo Dec 27, 2019
bc20254
[X86] Add test cases for v2i32->v2f32 strict_sint_to_fp/strict_uint_t…
topperc Dec 27, 2019
a5d266b
[X86] Add custom legalization for strict_uint_to_fp v2i32->v2f32.
topperc Dec 27, 2019
e647ff0
[X86] Add tests for constrained float intrinsics on i686-pc-windows-m…
topperc Dec 27, 2019
53ee806
[X86][FPEnv] Promote some float strictfp operations to double on i686…
topperc Dec 27, 2019
c4a97b6
[X86] Fix -Wmisleading-indentation after D71892
MaskRay Dec 27, 2019
50fb395
[X86] Custom widen strict v2f32->v2i32 by padding with zeroes.
topperc Dec 27, 2019
ecbaf15
[X86] Custom widen 128/256-bit vXi32 fp_to_uint on avx512f targets wi…
topperc Dec 27, 2019
7a73346
Delete llvm.{sig,}{setjmp,longjmp} remnant after r136821
MaskRay Dec 27, 2019
14e1100
[clangd] Fix crash in hover
ilya-biryukov Dec 27, 2019
e7a296a
[llvm-readobj][llvm-objdump][test] - Improve dynamic section testing.
Dec 26, 2019
20aab49
[X86] Custom widen v2i32->v2f32 strict_sint_to_fp to avoid scalarizat…
topperc Dec 27, 2019
931946b
[X86] Add v2i32->v2f32 non-strict sint_to_fp/uint_to_fp tests. NFC
topperc Dec 27, 2019
fca4736
[X86] Allow v2i32->v2f32 strict and non-strict uint_to_fp to be widen…
topperc Dec 27, 2019
e2d9f4e
[clangd] Reformat `HoverTests.cpp` NFC
ilya-biryukov Dec 27, 2019
cda94d3
[mlir] Floating constants for import-llvm
ftynse Dec 27, 2019
be775a0
[MLIR] [NFC] fix unused var warning
bondhugula Dec 27, 2019
2e5a755
[mlir] fix typo in a comment
wyzero Dec 23, 2019
e25e3d7
[lldb] Silent random xpass on aarch64-linux buildbot
omjavaid Dec 27, 2019
869d17d
[OpenCL] Pretty print __private addr space
Dec 27, 2019
a37e958
AMDGPU: Use correct DebugLoc
arsenm Dec 27, 2019
ed9a56b
AMDGPU/GlobalISel: Select some 128-bit load/stores
arsenm Dec 25, 2019
e088846
AMDGPU/GlobalISel: Fix extra result register in fdiv64 lowering
arsenm Dec 25, 2019
69d85f8
[MLIR][spirv] Fix links in docs after repo migration
antiagainst Dec 27, 2019
3356e26
[OpenMP] Implementation of OMPT reduction callbacks
jprotze Dec 27, 2019
7d548f2
Merge from 'sycl' to 'sycl-web' (#2)
Dec 27, 2019
2abda66
[NFC][DA] Remove duplicate code in checkSrcSubscript and checkDstSubs…
Dec 27, 2019
f072233
Allow newlines in AST Matchers in clang-query files
steveire Dec 18, 2019
3e5a028
Merge from 'master' to 'sycl-web' (#156)
bader Dec 27, 2019
dc2c9b0
[Matrix] Propagate and use shape info for binary operators.
fhahn Dec 27, 2019
134ef0f
[OpenCL] Fix inconsistency between opencl and c11 atomic fetch max/min
yxsamliu Dec 19, 2019
752220e
[OpenCL] Fixed printing of __private in AMDGPU test
Dec 27, 2019
b35c585
[ConstantRange] Respect destination bitwidth for cast results.
fhahn Dec 27, 2019
84afd9c
[compiler-rt] [netbsd] Add support for versioned statvfs interceptors
krytarowski Dec 27, 2019
780d306
[VFS] Don't run symlink test on Windows, it may pass or fail
rnk Dec 27, 2019
1275a55
Merge from 'master' to 'sycl-web' (#2)
bader Dec 27, 2019
cd51318
Merge from 'sycl' to 'sycl-web' (#1)
Dec 30, 2019
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
  •  
  •  
  •  
21 changes: 18 additions & 3 deletions clang-tools-extra/clang-query/Query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,24 @@ bool MatchQuery::run(llvm::raw_ostream &OS, QuerySession &QS) const {
Finder.matchAST(AST->getASTContext());

if (QS.PrintMatcher) {
std::string prefixText = "Matcher: ";
OS << "\n " << prefixText << Source << "\n";
OS << " " << std::string(prefixText.size() + Source.size(), '=') << '\n';
SmallVector<StringRef, 4> Lines;
Source.split(Lines, "\n");
auto FirstLine = Lines[0];
Lines.erase(Lines.begin(), Lines.begin() + 1);
while (!Lines.empty() && Lines.back().empty()) {
Lines.resize(Lines.size() - 1);
}
unsigned MaxLength = FirstLine.size();
std::string PrefixText = "Matcher: ";
OS << "\n " << PrefixText << FirstLine;

for (auto Line : Lines) {
OS << "\n" << std::string(PrefixText.size() + 2, ' ') << Line;
MaxLength = std::max<int>(MaxLength, Line.rtrim().size());
}

OS << "\n"
<< " " << std::string(PrefixText.size() + MaxLength, '=') << "\n\n";
}

for (auto MI = Matches.begin(), ME = Matches.end(); MI != ME; ++MI) {
Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clang-query/Query.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ struct Query : llvm::RefCountedBase<Query> {
/// \return false if an error occurs, otherwise return true.
virtual bool run(llvm::raw_ostream &OS, QuerySession &QS) const = 0;

StringRef RemainingContent;
const QueryKind Kind;
};

Expand Down
54 changes: 42 additions & 12 deletions clang-tools-extra/clang-query/QueryParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,23 @@ namespace query {
// is found before End, return StringRef(). Begin is adjusted to exclude the
// lexed region.
StringRef QueryParser::lexWord() {
Line = Line.ltrim();
Line = Line.drop_while([](char c) {
// Don't trim newlines.
return StringRef(" \t\v\f\r").contains(c);
});

if (Line.empty())
// Even though the Line is empty, it contains a pointer and
// a (zero) length. The pointer is used in the LexOrCompleteWord
// code completion.
return Line;

if (Line.front() == '#') {
Line = {};
return StringRef();
}
StringRef Word;
if (Line.front() == '#')
Word = Line.substr(0, 1);
else
Word = Line.take_until(isWhitespace);

StringRef Word = Line.take_until(isWhitespace);
Line = Line.drop_front(Word.size());
return Word;
}
Expand Down Expand Up @@ -125,9 +128,25 @@ template <typename QueryType> QueryRef QueryParser::parseSetOutputKind() {
}

QueryRef QueryParser::endQuery(QueryRef Q) {
const StringRef Extra = Line;
if (!lexWord().empty())
return new InvalidQuery("unexpected extra input: '" + Extra + "'");
StringRef Extra = Line;
StringRef ExtraTrimmed = Extra.drop_while(
[](char c) { return StringRef(" \t\v\f\r").contains(c); });

if ((!ExtraTrimmed.empty() && ExtraTrimmed[0] == '\n') ||
(ExtraTrimmed.size() >= 2 && ExtraTrimmed[0] == '\r' &&
ExtraTrimmed[1] == '\n'))
Q->RemainingContent = Extra;
else {
StringRef TrailingWord = lexWord();
if (!TrailingWord.empty() && TrailingWord.front() == '#') {
Line = Line.drop_until([](char c) { return c == '\n'; });
Line = Line.drop_while([](char c) { return c == '\n'; });
return endQuery(Q);
}
if (!TrailingWord.empty()) {
return new InvalidQuery("unexpected extra input: '" + Extra + "'");
}
}
return Q;
}

Expand Down Expand Up @@ -193,7 +212,11 @@ QueryRef QueryParser::doParse() {
switch (QKind) {
case PQK_Comment:
case PQK_NoOp:
return new NoOpQuery;
Line = Line.drop_until([](char c) { return c == '\n'; });
Line = Line.drop_while([](char c) { return c == '\n'; });
if (Line.empty())
return new NoOpQuery;
return doParse();

case PQK_Help:
return endQuery(new HelpQuery);
Expand All @@ -217,7 +240,9 @@ QueryRef QueryParser::doParse() {
return makeInvalidQueryFromDiagnostics(Diag);
}

return new LetQuery(Name, Value);
auto *Q = new LetQuery(Name, Value);
Q->RemainingContent = Line;
return Q;
}

case PQK_Match: {
Expand All @@ -226,12 +251,17 @@ QueryRef QueryParser::doParse() {

Diagnostics Diag;
auto MatcherSource = Line.trim();
auto OrigMatcherSource = MatcherSource;
Optional<DynTypedMatcher> Matcher = Parser::parseMatcherExpression(
MatcherSource, nullptr, &QS.NamedValues, &Diag);
if (!Matcher) {
return makeInvalidQueryFromDiagnostics(Diag);
}
return new MatchQuery(MatcherSource, *Matcher);
auto ActualSource = OrigMatcherSource.slice(0, OrigMatcherSource.size() -
MatcherSource.size());
auto *Q = new MatchQuery(ActualSource, *Matcher);
Q->RemainingContent = MatcherSource;
return Q;
}

case PQK_Set: {
Expand Down
11 changes: 7 additions & 4 deletions clang-tools-extra/clang-query/tool/ClangQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,16 @@ bool runCommandsInFile(const char *ExeName, std::string const &FileName,
llvm::errs() << ExeName << ": cannot open " << FileName << "\n";
return 1;
}
while (Input.good()) {
std::string Line;
std::getline(Input, Line);

QueryRef Q = QueryParser::parse(Line, QS);
std::string FileContent((std::istreambuf_iterator<char>(Input)),
std::istreambuf_iterator<char>());

StringRef FileContentRef(FileContent);
while (!FileContentRef.empty()) {
QueryRef Q = QueryParser::parse(FileContentRef, QS);
if (!Q->run(llvm::outs(), QS))
return true;
FileContentRef = Q->RemainingContent;
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ findConstToRemove(const FunctionDecl *Def,
if (FileRange.isInvalid())
return None;

return utils::lexer::getConstQualifyingToken(FileRange, *Result.Context,
*Result.SourceManager);
return utils::lexer::getQualifyingToken(
tok::kw_const, FileRange, *Result.Context, *Result.SourceManager);
}

namespace {
Expand Down
18 changes: 15 additions & 3 deletions clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static bool isUsedToInitializeAConstant(const MatchFinder::MatchResult &Result,
return AsDecl->isImplicit();
}

if (Node.get<EnumConstantDecl>() != nullptr)
if (Node.get<EnumConstantDecl>())
return true;

return llvm::any_of(Result.Context->getParents(Node),
Expand Down Expand Up @@ -125,8 +125,20 @@ bool MagicNumbersCheck::isConstant(const MatchFinder::MatchResult &Result,
if (isUsedToInitializeAConstant(Result, Parent))
return true;

// Ignore this instance, because this match reports the location
// where the template is defined, not where it is instantiated.
// Ignore this instance, because this matches an
// expanded class enumeration value.
if (Parent.get<CStyleCastExpr>() &&
llvm::any_of(
Result.Context->getParents(Parent),
[](const DynTypedNode &GrandParent) {
return GrandParent.get<SubstNonTypeTemplateParmExpr>() !=
nullptr;
}))
return true;

// Ignore this instance, because this match reports the
// location where the template is defined, not where it
// is instantiated.
if (Parent.get<SubstNonTypeTemplateParmExpr>())
return true;

Expand Down
33 changes: 22 additions & 11 deletions clang-tools-extra/clang-tidy/utils/LexerUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,20 @@ bool rangeContainsExpansionsOrDirectives(SourceRange Range,
return false;
}

llvm::Optional<Token> getConstQualifyingToken(CharSourceRange Range,
const ASTContext &Context,
const SourceManager &SM) {
llvm::Optional<Token> getQualifyingToken(tok::TokenKind TK,
CharSourceRange Range,
const ASTContext &Context,
const SourceManager &SM) {
assert((TK == tok::kw_const || TK == tok::kw_volatile ||
TK == tok::kw_restrict) &&
"TK is not a qualifier keyword");
std::pair<FileID, unsigned> LocInfo = SM.getDecomposedLoc(Range.getBegin());
StringRef File = SM.getBufferData(LocInfo.first);
Lexer RawLexer(SM.getLocForStartOfFile(LocInfo.first), Context.getLangOpts(),
File.begin(), File.data() + LocInfo.second, File.end());
llvm::Optional<Token> FirstConstTok;
Token LastTokInRange;
llvm::Optional<Token> LastMatchBeforeTemplate;
llvm::Optional<Token> LastMatchAfterTemplate;
bool SawTemplate = false;
Token Tok;
while (!RawLexer.LexFromRawLexer(Tok) &&
Range.getEnd() != Tok.getLocation() &&
Expand All @@ -121,13 +126,19 @@ llvm::Optional<Token> getConstQualifyingToken(CharSourceRange Range,
Tok.setIdentifierInfo(&Info);
Tok.setKind(Info.getTokenID());
}
if (Tok.is(tok::kw_const) && !FirstConstTok)
FirstConstTok = Tok;
LastTokInRange = Tok;
if (Tok.is(tok::less))
SawTemplate = true;
else if (Tok.isOneOf(tok::greater, tok::greatergreater))
LastMatchAfterTemplate = None;
else if (Tok.is(TK)) {
if (SawTemplate)
LastMatchAfterTemplate = Tok;
else
LastMatchBeforeTemplate = Tok;
}
}
// If the last token in the range is a `const`, then it const qualifies the
// type. Otherwise, the first `const` token, if any, is the qualifier.
return LastTokInRange.is(tok::kw_const) ? LastTokInRange : FirstConstTok;
return LastMatchAfterTemplate != None ? LastMatchAfterTemplate
: LastMatchBeforeTemplate;
}
} // namespace lexer
} // namespace utils
Expand Down
14 changes: 8 additions & 6 deletions clang-tools-extra/clang-tidy/utils/LexerUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,15 @@ bool rangeContainsExpansionsOrDirectives(SourceRange Range,
const SourceManager &SM,
const LangOptions &LangOpts);

/// Assuming that ``Range`` spans a const-qualified type, returns the ``const``
/// token in ``Range`` that is responsible for const qualification. ``Range``
/// must be valid with respect to ``SM``. Returns ``None`` if no ``const``
/// Assuming that ``Range`` spans a CVR-qualified type, returns the
/// token in ``Range`` that is responsible for the qualification. ``Range``
/// must be valid with respect to ``SM``. Returns ``None`` if no qualifying
/// tokens are found.
llvm::Optional<Token> getConstQualifyingToken(CharSourceRange Range,
const ASTContext &Context,
const SourceManager &SM);
/// \note: doesn't support member function qualifiers.
llvm::Optional<Token> getQualifyingToken(tok::TokenKind TK,
CharSourceRange Range,
const ASTContext &Context,
const SourceManager &SM);

} // namespace lexer
} // namespace utils
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clangd/Hover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const NamedDecl *getDeclForComment(const NamedDecl *D) {
return VTSD->getTemplateInstantiationPattern();
if (auto *FD = D->getAsFunction())
if (FD->isTemplateInstantiation())
return FD->getTemplateSpecializationInfo()->getTemplate();
return FD->getTemplateInstantiationPattern();
return D;
}

Expand Down
18 changes: 18 additions & 0 deletions clang-tools-extra/clangd/unittests/HoverTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1455,6 +1455,24 @@ TEST(Hover, All) {
HI.Kind = index::SymbolKind::Struct;
HI.Documentation = "auto on alias";
}},
{
R"cpp(// should not crash.
template <class T> struct cls {
int method();
};

auto test = cls<int>().[[m^ethod]]();
)cpp",
[](HoverInfo &HI) {
HI.Definition = "int method()";
HI.Kind = index::SymbolKind::InstanceMethod;
HI.NamespaceScope = "";
HI.LocalScope = "cls<int>::";
HI.Name = "method";
HI.Parameters.emplace();
HI.ReturnType = "int";
HI.Type = "int ()";
}},
};

// Create a tiny index, so tests above can verify documentation is fetched.
Expand Down
4 changes: 4 additions & 0 deletions clang-tools-extra/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ Improvements to clang-tidy
The check now supports the ``IgnoreBitFieldsWidths`` option to suppress
the warning for numbers used to specify bit field widths.

The check was updated to eliminate some false positives (such as using
class enumeration as non-type template parameters, or the synthetically
computed lengh of a static user string literal.)

- New :doc:`readability-make-member-function-const
<clang-tidy/checks/readability-make-member-function-const>` check.

Expand Down
8 changes: 5 additions & 3 deletions clang-tools-extra/docs/clang-doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Clang-Doc
.. toctree::
:maxdepth: 1

:program:`clang-doc` is a tool for generating C and C++ documentation from
source code and comments.
:program:`clang-doc` is a tool for generating C and C++ documentation from
source code and comments.

The tool is in a very early development stage, so you might encounter bugs and
crashes. Submitting reports with information about how to reproduce the issue
Expand All @@ -21,7 +21,7 @@ Use

:program:`clang-doc` is a `LibTooling
<https://clang.llvm.org/docs/LibTooling.html>`_-based tool, and so requires a
compile command database for your project (for an example of how to do this
compile command database for your project (for an example of how to do this
see `How To Setup Tooling For LLVM
<https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html>`_).

Expand Down Expand Up @@ -81,7 +81,9 @@ Options

--doxygen - Use only doxygen-style comments to generate docs.
--extra-arg=<string> - Additional argument to append to the compiler command line
Can be used several times.
--extra-arg-before=<string> - Additional argument to prepend to the compiler command line
Can be used several times.
--format=<value> - Format for outputted docs.
=yaml - Documentation in YAML format.
=md - Documentation in MD format.
Expand Down
2 changes: 2 additions & 0 deletions clang-tools-extra/docs/clang-rename.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ That way you can avoid spelling out all the names as command line arguments:

-export-fixes=<filename> - YAML file to store suggested fixes in.
-extra-arg=<string> - Additional argument to append to the compiler command line
Can be used several times.
-extra-arg-before=<string> - Additional argument to prepend to the compiler command line
Can be used several times.
-force - Ignore nonexistent qualified names.
-i - Overwrite edited <file>s.
-input=<string> - YAML file to load oldname-newname pairs from.
Expand Down
2 changes: 2 additions & 0 deletions clang-tools-extra/docs/clang-tidy/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ An overview of all the command-line options:
stored fixes can be applied to the input source
code with clang-apply-replacements.
--extra-arg=<string> - Additional argument to append to the compiler command line
Can be used several times.
--extra-arg-before=<string> - Additional argument to prepend to the compiler command line
Can be used several times.
--fix -
Apply suggested fixes. Without -fix-errors
clang-tidy will bail out if any compilation
Expand Down
Loading