Commit Graph

317798 Commits

Author SHA1 Message Date
Haojian Wu 5feead5752 Fix an unused-variable error.
llvm-svn: 362005
2019-05-29 18:36:54 +00:00
Thomas Lively 5458cd4027 [WebAssembly] Support VPtr sanitizer for Emscripten
Summary:
After https://github.com/emscripten-core/emscripten/pull/8651, Emscripten
supports the full UBSan runtime. This includes the VPtr sanitizer.

This diff allows clang to generate code that uses the VPtr sanitizer for
Emscripten.

Patch by Guanzhong Chen

Reviewers: tlively, aheejin

Reviewed By: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62559

llvm-svn: 362004
2019-05-29 18:31:50 +00:00
Csaba Dabis dea605e090 [analyzer] print() JSONify: CFG implementation
Summary: -

Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

Reviewed By: NoQ

Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho,
             donat.nagy, dkrupp

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62496

llvm-svn: 362003
2019-05-29 18:29:31 +00:00
Csaba Dabis 02be650617 [analyzer] print() JSONify: Decl revision
Summary: -

Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

Reviewed By: NoQ

Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho,
             donat.nagy, dkrupp

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62495

llvm-svn: 362002
2019-05-29 18:21:14 +00:00
Aakanksha Patil d5443f8c21 AMDGPU: Return address lowering
The patch computes the return address for the current function.

Differential revision: https://reviews.llvm.org/D59666

llvm-svn: 362001
2019-05-29 18:20:11 +00:00
Csaba Dabis 9ee26c8d5f [analyzer][AST] print() JSONify: Stmt implementation
Summary:
This patch also adds a function called `JsonFormat()` which:
- Flattens the string so removes the new-lines.
- Escapes double quotes.

Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

Reviewed By: NoQ

Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho,
             donat.nagy, dkrupp

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62494

llvm-svn: 362000
2019-05-29 18:17:18 +00:00
Alex Langford 03e1a82f52 [Target] Introduce Process::GetLanguageRuntimes
Summary:
Currently there's not really a good way to iterate over the language runtimes a
process has. This is sometimes desirable (as seen in my change to Thread).
Additionally, there's not really a good reason to iterate over every available
language, but rather only over languages for which we have a plugin loaded.

Reviewers: JDevlieghere, davide, jingham

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D62562

llvm-svn: 361999
2019-05-29 18:08:22 +00:00
Stella Stamenova 83c28abdb2 lit: modernize the lit configuration for the lit tests
Summary: This also normalizes the config feature that represents the windows platform to "system-windows" as opposed to having both "windows" and "system-windows"

Reviewers: asmith, probinson

Subscribers: delcypher, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61798

llvm-svn: 361998
2019-05-29 18:07:39 +00:00
Csaba Dabis 13e491cca5 [analyzer] print() JSONify: getNodeLabel implementation
Summary: This patch also rewrites the ProgramPoint printing.

Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

Reviewed By: NoQ

Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho,
             donat.nagy, dkrupp

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62346

llvm-svn: 361997
2019-05-29 18:05:53 +00:00
Ilya Biryukov f6faa382f3 [Index] Compute correct symbol kind for variable templates
Summary:
The index library itself seems to never pass variable templates as
input, however clangd does.

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: jkorous, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62579

llvm-svn: 361996
2019-05-29 17:49:30 +00:00
Greg Clayton 5a0e13c4d6 Fixed source header [NFC]
llvm-svn: 361995
2019-05-29 17:25:03 +00:00
Michael Liao 4b7a713acc [CUDA][HIP] Skip setting `externally_initialized` for static device variables.
Summary:
- By declaring device variables as `static`, we assume they won't be
  addressable from the host side. Thus, no `externally_initialized` is
  required.

Reviewers: yaxunl

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62603

llvm-svn: 361994
2019-05-29 17:23:27 +00:00
Eugene Leviant c98b288b03 Yet another attempt to fix buildbot after r361949
Looks like %p format specifier of createStringError behaves
differently on different platforms

llvm-svn: 361993
2019-05-29 17:14:48 +00:00
Erich Keane d2143c3708 Add curley brackets to case statement that declares a variable.
llvm-svn: 361992
2019-05-29 17:04:48 +00:00
Craig Topper e3a76fa1e2 [X86] Fix machineverifier error on avx512f-256-set0.mir
Previously the pass ran the entire llc pipeline which caused the IR to be recodegened.

This commit restricts it to just running the postrapseudos pass and checking the results of that instead of the final assembly.

llvm-svn: 361991
2019-05-29 17:02:27 +00:00
Matt Arsenault f80c4241b3 CallSiteSplitting: Respect convergent and noduplicate
llvm-svn: 361990
2019-05-29 16:59:48 +00:00
Teresa Johnson 5b2088d1fa [ThinLTO] Use original alias visibility when importing
Summary:
When we import an alias, we do so by making a clone of the aliasee. Just
as this clone uses the original alias name and linkage, it should also
use the same visibility (not the aliasee's visibility). Otherwise,
linker behavior is affected (e.g. if the aliasee was hidden, but the
alias is not, the resulting imported clone should not be hidden,
otherwise the linker will make the final symbol hidden which is
incorrect).

Reviewers: wmi

Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62535

llvm-svn: 361989
2019-05-29 16:50:46 +00:00
Cameron McInally 98a797c224 [NFC][InstCombine] Add a unary FNeg test to fsub.ll.
llvm-svn: 361988
2019-05-29 16:50:14 +00:00
Antonio Afonso 78337420cd Add more information to the log timer dump
Summary:
The `log timer dump` is showing the time of the function itself minus any function that is called from this one that also happens to be timed. However, this is really not obvious and it also makes it hard to understand the time spent in total and also which children are actually taking the time.
To get a better reading of the timer dump I added the total, children (which I named child) and also the hit count. I used these timers to figure out a performance issue and only after adding this things were more clear to me.

It looks like this:
```
(lldb) log timer dump
35.447713617 sec (total: 35.449s; child: 0.001s; count: 1374) for void SymbolFileDWARF::Index()
29.717921481 sec (total: 29.718s; child: 0.000s; count: 8230500) for const lldb_private::ConstString &lldb_private::Mangled::GetDemangledName(lldb::LanguageType) const
21.049508865 sec (total: 24.683s; child: 3.633s; count: 1399) for void lldb_private::Symtab::InitNameIndexes()
...
```

Reviewers: clayborg, teemperor, labath, espindola, xiaobai

Reviewed By: labath, xiaobai

Subscribers: emaste, mgorny, arichardson, eraman, MaskRay, jdoerfert, labath, davide, teemperor, aprantl, erik.pilkington, jfb, abidh, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D61235

llvm-svn: 361987
2019-05-29 16:31:32 +00:00
Francois Ferrand c5227a1f53 [clang-format] Allow configuring list of function-like macros that resolve to a type
Summary:
Adds a `TypenameMacros` configuration option that causes certain identifiers to be handled in a way similar to `typeof()`.

This is enough to:
- Prevent misinterpreting declarations of pointers to such types as expressions (`STACK_OF(int) * foo` -> `STACK_OF(int) *foo`),
- Avoid surprising line breaks in variable/struct field declarations (`STACK_OF(int)\nfoo;` -> `STACK_OF(int) foo;`, see https://bugs.llvm.org/show_bug.cgi?id=30353).

Reviewers: Typz, krasimir, djasper

Reviewed By: Typz

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D57184

llvm-svn: 361986
2019-05-29 16:30:47 +00:00
Kevin P. Neal 308b7139b1 Partial revert of revert of r361827: Add constrained intrinsic tests for powerpc64le.
The powerpc64-"nonle" tests are removed. They fail because of a bug that
Drew is currently working on that affects multiple targets.

Submitted by:	Drew Wock <drew.wock@sas.com>
Reviewed by:	Hal Finkel, Kevin P. Neal
Approved by:	Hal Finkel
Differential Revision:	http://reviews.llvm.org/D62388

llvm-svn: 361985
2019-05-29 16:29:31 +00:00
Francois Ferrand 0a729261e2 [NFC] clang-format: Use LLVM style in NamespaceEndCommentsFixerTest
As pointed out in https://reviews.llvm.org/D37813#inline-555026, the
code which is formatted does not match LLVM formatting style.

Technically this is not a problem since these tests bypass most of the
formatter, but it can be misleading.

llvm-svn: 361984
2019-05-29 16:22:43 +00:00
Csaba Dabis df0a42127c [analyzer] print() JSONify: Program state implementation
Summary: -

Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

Reviewed By: NoQ

Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy,
             dkrupp

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62087

llvm-svn: 361983
2019-05-29 16:22:21 +00:00
Csaba Dabis b7ca72a113 [analyzer] print() JSONify: Checker messages implementation
Summary: -

Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

Reviewed By: NoQ

Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy,
             dkrupp

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62086

llvm-svn: 361982
2019-05-29 16:02:33 +00:00
Louis Dionne a2a1ec27d0 [NFC][libcxx] Remove trailing whitespace
It's incredibly annoying when trying to create diffs

llvm-svn: 361981
2019-05-29 16:01:36 +00:00
Csaba Dabis 35e54eb31e [analyzer] print() JSONify: Constructing objects implementation
Summary: -

Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

Reviewed By: NoQ

Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy,
             dkrupp

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62085

llvm-svn: 361980
2019-05-29 15:58:26 +00:00
Csaba Dabis 32981637ce [analyzer] print() JSONify: Type information implementation
Summary: -

Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

Reviewed By: NoQ

Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy,
             dkrupp

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62083

llvm-svn: 361979
2019-05-29 15:53:12 +00:00
Csaba Dabis 5df5eb8816 [analyzer] print() JSONify: Constraints implementation
Summary: -

Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

Reviewed By: NoQ

Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy,
             dkrupp

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62082

llvm-svn: 361978
2019-05-29 15:43:26 +00:00
Sam Clegg 56e970d45d [WebAssembly] Move direct call tracking from member to local. NFC.
This data structure is only needed temporarily while symbols are being
created.

This is a followup on rL361678.

Differential Revision: https://reviews.llvm.org/D62548

llvm-svn: 361977
2019-05-29 15:41:08 +00:00
Csaba Dabis 9ce3746604 [analyzer] print() JSONify: Environment implementation
Summary: -

Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

Reviewed By: NoQ

Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy,
             dkrupp

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62081

llvm-svn: 361976
2019-05-29 15:36:58 +00:00
Sam Clegg d506b0a484 [WebAssembly] Fix signatures of undefined function in LTO object which are not called directly.
We recently added special handling for function that are not called
directly but failed to add testing for the LTO case.

See https://reviews.llvm.org/D62153

Differential Revision: https://reviews.llvm.org/D62561

llvm-svn: 361975
2019-05-29 15:36:42 +00:00
Ilya Biryukov 2fa3188075 [CodeComplete] Add semicolon when completing patterns for 'static_assert' and 'typedef
This is a trivial follow-up to r360042, which added semicolons to other
pattern completions, so sending without review.

llvm-svn: 361974
2019-05-29 15:32:17 +00:00
Cameron McInally 28f384a7c7 [NFC][InstCombine] Add unary FNeg tests to fpcast.ll and fpextend.ll
llvm-svn: 361973
2019-05-29 15:29:35 +00:00
Csaba Dabis 124cba0b81 [analyzer] print() JSONify: Store implementation
Summary: -

Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

Reviewed By: NoQ

Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy,
             dkrupp

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61912

llvm-svn: 361972
2019-05-29 15:25:19 +00:00
Cameron McInally 4ebbc4d73a [NFC][InstCombine] Add unary FNeg tests to fsub.ll known-never-nan.ll
llvm-svn: 361971
2019-05-29 15:21:28 +00:00
Marshall Clow 6b03a1b423 Add additional constraints on midpoint(pointer, pointer). Fixes PR#42037.
llvm-svn: 361970
2019-05-29 15:17:55 +00:00
Ilya Biryukov c450874cb8 [clangd] Map typedefs to the same LSP completion kind as VSCode
For consistency and, more importantly, to get a nicer icon for those in VSCode.

llvm-svn: 361969
2019-05-29 15:10:19 +00:00
Sam McCall 4f09d9fcfa Qualify use of llvm::empty that's ambiguous with std::empty
llvm-svn: 361968
2019-05-29 15:02:16 +00:00
Simon Atanasyan c7f0b33fa5 [mips] Check argument for __builtin_msa_ctcmsa / __builtin_msa_cfcmsa
The `__builtin_msa_ctcmsa` and `__builtin_msa_cfcmsa` builtins are mapped
to the `ctcmsa` and `cfcmsa` instructions respectively. While MSA
control registers have indexes in 0..7 range, the instructions accept
register index in 0..31 range [1].

[1] MIPS Architecture for Programmers Volume IV-j:
    The MIPS64 SIMD Architecture Module
https://www.mips.com/?do-download=the-mips64-simd-architecture-module

llvm-svn: 361967
2019-05-29 14:59:32 +00:00
Simon Atanasyan 909c8c2b0d [mips] Use reg-exp in tests to tolerate register indexes changing. NFC
llvm-svn: 361966
2019-05-29 14:59:07 +00:00
Simon Atanasyan 188162118f [mips] Iterate over MSACtrlRegClass to reserve all MSA control registers. NFC
llvm-svn: 361965
2019-05-29 14:58:56 +00:00
Simon Atanasyan af7bf2f687 [mips] Use range-based for loops. NFC
llvm-svn: 361964
2019-05-29 14:58:50 +00:00
Simon Pilgrim 64345f280b Revert rL361944 from llvm/trunk :
[ADT] add iterator_range::empty()
........
Breaks windows buildbots

llvm-svn: 361963
2019-05-29 14:39:37 +00:00
Fangrui Song 898aaf1cb8 Clean up DWARFDebugInfoEntry
llvm-svn: 361962
2019-05-29 14:36:11 +00:00
Nico Weber 268dfaf153 gn build: Merge r361953
llvm-svn: 361961
2019-05-29 14:15:35 +00:00
Haojian Wu 228b130a4b [clangd] Fix buildbot error.
llvm-svn: 361960
2019-05-29 14:11:53 +00:00
Nico Weber e3b1f5d22c clang-cl: Fix mangling of catchable types with names longer than 4kiB
The mangling used to contain the MD5 name of both the RTTI type
descriptor and the name of the copy ctor in MSVC2013, but it changed
to just the former in 2015. It looks like it changed back to the old
mangling in VS2017 version 15.7 and onwards, including VS2019 (version
16.0). VS2017 version 15.0 still has the VS2015 mangling. Versions
between 15.0 and 15.7 are't on godbolt. I found 15.4 (_MSC_VER 1911)
locally and that uses the 15.0 mangling still, but I didn't find 15.5 or
15.6, so I'm not sure where exactly it changed back.

Differential Revision: https://reviews.llvm.org/D62490

llvm-svn: 361959
2019-05-29 13:48:19 +00:00
Sjoerd Meijer 24c5629625 [ARM] Split predicates out into their own .td file
The new ARMPredicates.td is included from ARM.td, early enough that
the predicate definitions are already in scope when ARMSchedule.td is
included. This will make it possible to refer to them in
UnsupportedFeatures fields of scheduling models.

NFC: the chunk of Tablegen being moved here is copied and pasted
verbatim.

Patch by: Simon Tatham

Differential Revision: https://reviews.llvm.org/D60693

llvm-svn: 361958
2019-05-29 13:41:57 +00:00
Matt Arsenault 36e7254441 SpeculateAroundPHIs: Respect convergent
llvm-svn: 361957
2019-05-29 13:14:39 +00:00
Matt Arsenault 9ffd8b5a6f AMDGPU/GlobalISel: Remove unnecesssary REQUIREs
This has been a mandatory part of the build for a while.

llvm-svn: 361956
2019-05-29 13:14:35 +00:00