Tim Northover [Wed, 29 May 2019 19:13:29 +0000 (19:13 +0000)]
LLVM IR: update Clang tests for byval being a typed attribute.
Since byval is now a typed attribute it gets sorted slightly differently by
LLVM when the order of attributes is being canonicalized. This updates the few
Clang tests that depend on the old order.
llvm-svn: 362013
Tim Northover [Wed, 29 May 2019 19:12:48 +0000 (19:12 +0000)]
IR: add optional type to 'byval' function parameters
When we switch to opaque pointer types we will need some way to describe
how many bytes a 'byval' parameter should occupy on the stack. This adds
a (for now) optional extra type parameter.
If present, the type must match the pointee type of the argument.
Note to front-end maintainers: if this causes test failures, it's probably
because the "byval" attribute is printed after attributes without any parameter
after this change.
llvm-svn: 362012
Csaba Dabis [Wed, 29 May 2019 18:58:41 +0000 (18:58 +0000)]
[analyzer] print() JSONify chain: Generic stmt_id
Summary: Some environment create less statements so make them generic.
llvm-svn: 362011
Nico Weber [Wed, 29 May 2019 18:54:28 +0000 (18:54 +0000)]
mac: Make ubsan test config look more like asan test config
In particular, don't call get_target_flags_for_arch() since that
will cause an error in some situations:
If DARWIN_iossim_ARCHS=i386;x86_64, DARWIN_osx_ARCHS=x86_64, and
DARWIN_iossym_SYSROOT isn't set (due to the simulator sysroot not being
available), then config-ix.cmake won't add i386 to COMPILER_RT_SUPPORTED_ARCH
but ubsan's test/CMakeLists.txt would call get_target_flags_for_arch()
with i386, which would then run into the error in
get_target_flags_for_arch().
Having these conditions isn't ideal. The background here is that we
configure our mac-hosted trunk bots all the same (so they all have the
same DARWIN_*_archs, and we don't easily know if a mac host bot is
targeting mac or ios at the place where we call cmake), but only the
ios-targeting bots have ios sysroots available.
This will hopefully unbreak that use case without impacting anything
else -- and it makes ubsan and asan test setup more alike.
llvm-svn: 362010
Artem Dergachev [Wed, 29 May 2019 18:49:31 +0000 (18:49 +0000)]
[analyzer] SATestBuild.py: Use driver for analyzing single-file tests.
Don't bother coming up with a -cc1 run-line ourselves.
This, in particular, gets rid of a macOS-specific code path.
llvm-svn: 362009
Csaba Dabis [Wed, 29 May 2019 18:38:52 +0000 (18:38 +0000)]
[analyzer] print() JSONify: SVal implementation
Summary: -
Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus
Reviewed By: NoQ
Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho,
Szelethus, donat.nagy, dkrupp
Tags: #clang
Differential Revision: https://reviews.llvm.org/D62497
llvm-svn: 362008
Chris Bieneman [Wed, 29 May 2019 18:37:49 +0000 (18:37 +0000)]
[CMake] [Runtimes] Set *_STANDALONE_BUILD
Summary:
The runtimes use `*_STANDALONE_BUILD=OFF` to signify that clang is an in-tree target. This is not the case with the runtime builds, so we really need this set to `ON`.
In order to resolve the issues phosek was having with checks, we should use checks that don't link. We can use compiler-rt's `try_compile_only` as a basis for that.
This patch is *required* to be able to run the runtime libraries check-* targets.
Reviewers: smeenai, phosek, compnerd
Reviewed By: phosek
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62410
llvm-svn: 362007
Nikita Popov [Wed, 29 May 2019 18:37:13 +0000 (18:37 +0000)]
[InstCombine] Optimize always overflowing signed saturating add/sub
Based on the overflow direction information added in D62463, we can
now fold always overflowing signed saturating add/sub to signed min/max.
Differential Revision: https://reviews.llvm.org/D62544
llvm-svn: 362006
Haojian Wu [Wed, 29 May 2019 18:36:54 +0000 (18:36 +0000)]
Fix an unused-variable error.
llvm-svn: 362005
Thomas Lively [Wed, 29 May 2019 18:31:50 +0000 (18:31 +0000)]
[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
Csaba Dabis [Wed, 29 May 2019 18:29:31 +0000 (18:29 +0000)]
[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
Csaba Dabis [Wed, 29 May 2019 18:21:14 +0000 (18:21 +0000)]
[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
Aakanksha Patil [Wed, 29 May 2019 18:20:11 +0000 (18:20 +0000)]
AMDGPU: Return address lowering
The patch computes the return address for the current function.
Differential revision: https://reviews.llvm.org/D59666
llvm-svn: 362001
Csaba Dabis [Wed, 29 May 2019 18:17:18 +0000 (18:17 +0000)]
[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
Alex Langford [Wed, 29 May 2019 18:08:22 +0000 (18:08 +0000)]
[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
Stella Stamenova [Wed, 29 May 2019 18:07:39 +0000 (18:07 +0000)]
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
Csaba Dabis [Wed, 29 May 2019 18:05:53 +0000 (18:05 +0000)]
[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
Ilya Biryukov [Wed, 29 May 2019 17:49:30 +0000 (17:49 +0000)]
[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
Greg Clayton [Wed, 29 May 2019 17:25:03 +0000 (17:25 +0000)]
Fixed source header [NFC]
llvm-svn: 361995
Michael Liao [Wed, 29 May 2019 17:23:27 +0000 (17:23 +0000)]
[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
Eugene Leviant [Wed, 29 May 2019 17:14:48 +0000 (17:14 +0000)]
Yet another attempt to fix buildbot after r361949
Looks like %p format specifier of createStringError behaves
differently on different platforms
llvm-svn: 361993
Erich Keane [Wed, 29 May 2019 17:04:48 +0000 (17:04 +0000)]
Add curley brackets to case statement that declares a variable.
llvm-svn: 361992
Craig Topper [Wed, 29 May 2019 17:02:27 +0000 (17:02 +0000)]
[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
Matt Arsenault [Wed, 29 May 2019 16:59:48 +0000 (16:59 +0000)]
CallSiteSplitting: Respect convergent and noduplicate
llvm-svn: 361990
Teresa Johnson [Wed, 29 May 2019 16:50:46 +0000 (16:50 +0000)]
[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
Cameron McInally [Wed, 29 May 2019 16:50:14 +0000 (16:50 +0000)]
[NFC][InstCombine] Add a unary FNeg test to fsub.ll.
llvm-svn: 361988
Antonio Afonso [Wed, 29 May 2019 16:31:32 +0000 (16:31 +0000)]
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
Francois Ferrand [Wed, 29 May 2019 16:30:47 +0000 (16:30 +0000)]
[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
Kevin P. Neal [Wed, 29 May 2019 16:29:31 +0000 (16:29 +0000)]
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
Francois Ferrand [Wed, 29 May 2019 16:22:43 +0000 (16:22 +0000)]
[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
Csaba Dabis [Wed, 29 May 2019 16:22:21 +0000 (16:22 +0000)]
[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
Csaba Dabis [Wed, 29 May 2019 16:02:33 +0000 (16:02 +0000)]
[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
Louis Dionne [Wed, 29 May 2019 16:01:36 +0000 (16:01 +0000)]
[NFC][libcxx] Remove trailing whitespace
It's incredibly annoying when trying to create diffs
llvm-svn: 361981
Csaba Dabis [Wed, 29 May 2019 15:58:26 +0000 (15:58 +0000)]
[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
Csaba Dabis [Wed, 29 May 2019 15:53:12 +0000 (15:53 +0000)]
[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
Csaba Dabis [Wed, 29 May 2019 15:43:26 +0000 (15:43 +0000)]
[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
Sam Clegg [Wed, 29 May 2019 15:41:08 +0000 (15:41 +0000)]
[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
Csaba Dabis [Wed, 29 May 2019 15:36:58 +0000 (15:36 +0000)]
[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
Sam Clegg [Wed, 29 May 2019 15:36:42 +0000 (15:36 +0000)]
[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
Ilya Biryukov [Wed, 29 May 2019 15:32:17 +0000 (15:32 +0000)]
[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
Cameron McInally [Wed, 29 May 2019 15:29:35 +0000 (15:29 +0000)]
[NFC][InstCombine] Add unary FNeg tests to fpcast.ll and fpextend.ll
llvm-svn: 361973
Csaba Dabis [Wed, 29 May 2019 15:25:19 +0000 (15:25 +0000)]
[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
Cameron McInally [Wed, 29 May 2019 15:21:28 +0000 (15:21 +0000)]
[NFC][InstCombine] Add unary FNeg tests to fsub.ll known-never-nan.ll
llvm-svn: 361971
Marshall Clow [Wed, 29 May 2019 15:17:55 +0000 (15:17 +0000)]
Add additional constraints on midpoint(pointer, pointer). Fixes PR#42037.
llvm-svn: 361970
Ilya Biryukov [Wed, 29 May 2019 15:10:19 +0000 (15:10 +0000)]
[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
Sam McCall [Wed, 29 May 2019 15:02:16 +0000 (15:02 +0000)]
Qualify use of llvm::empty that's ambiguous with std::empty
llvm-svn: 361968
Simon Atanasyan [Wed, 29 May 2019 14:59:32 +0000 (14:59 +0000)]
[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
Simon Atanasyan [Wed, 29 May 2019 14:59:07 +0000 (14:59 +0000)]
[mips] Use reg-exp in tests to tolerate register indexes changing. NFC
llvm-svn: 361966
Simon Atanasyan [Wed, 29 May 2019 14:58:56 +0000 (14:58 +0000)]
[mips] Iterate over MSACtrlRegClass to reserve all MSA control registers. NFC
llvm-svn: 361965
Simon Atanasyan [Wed, 29 May 2019 14:58:50 +0000 (14:58 +0000)]
[mips] Use range-based for loops. NFC
llvm-svn: 361964
Simon Pilgrim [Wed, 29 May 2019 14:39:37 +0000 (14:39 +0000)]
Revert rL361944 from llvm/trunk :
[ADT] add iterator_range::empty()
........
Breaks windows buildbots
llvm-svn: 361963
Fangrui Song [Wed, 29 May 2019 14:36:11 +0000 (14:36 +0000)]
Clean up DWARFDebugInfoEntry
llvm-svn: 361962
Nico Weber [Wed, 29 May 2019 14:15:35 +0000 (14:15 +0000)]
gn build: Merge r361953
llvm-svn: 361961
Haojian Wu [Wed, 29 May 2019 14:11:53 +0000 (14:11 +0000)]
[clangd] Fix buildbot error.
llvm-svn: 361960
Nico Weber [Wed, 29 May 2019 13:48:19 +0000 (13:48 +0000)]
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
Sjoerd Meijer [Wed, 29 May 2019 13:41:57 +0000 (13:41 +0000)]
[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
Matt Arsenault [Wed, 29 May 2019 13:14:39 +0000 (13:14 +0000)]
SpeculateAroundPHIs: Respect convergent
llvm-svn: 361957
Matt Arsenault [Wed, 29 May 2019 13:14:35 +0000 (13:14 +0000)]
AMDGPU/GlobalISel: Remove unnecesssary REQUIREs
This has been a mandatory part of the build for a while.
llvm-svn: 361956
Yitzhak Mandelbaum [Wed, 29 May 2019 12:40:36 +0000 (12:40 +0000)]
[LibTooling] Add `before` and `after` selectors for selecting point-ranges relative to nodes.
Summary:
The `before` and `after` selectors allow users to specify a zero-length range --
a point -- at the relevant location in an AST-node's source. Point ranges can
be useful, for example, to insert a change using an API that takes a range to be
modified (e.g. `tooling::change()`).
Reviewers: ilya-biryukov
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D62419
llvm-svn: 361955
Eugene Leviant [Wed, 29 May 2019 12:26:23 +0000 (12:26 +0000)]
Attempt to fix buildbot after r361949
llvm-svn: 361954
Graham Hunter [Wed, 29 May 2019 12:22:54 +0000 (12:22 +0000)]
[SVE][IR] Scalable Vector IR Type
* Adds a 'scalable' flag to VectorType
* Adds an 'ElementCount' class to VectorType to pass (possibly scalable) vector lengths, with overloaded operators.
* Modifies existing helper functions to use ElementCount
* Adds support for serializing/deserializing to/from both textual and bitcode IR formats
* Extends the verifier to reject global variables of scalable types
* Updates documentation
See the latest version of the RFC here: http://lists.llvm.org/pipermail/llvm-dev/2018-July/124396.html
Reviewers: rengolin, lattner, echristo, chandlerc, hfinkel, rkruppe, samparker, SjoerdMeijer, greened, sebpop
Reviewed By: hfinkel, sebpop
Differential Revision: https://reviews.llvm.org/D32530
llvm-svn: 361953
Haojian Wu [Wed, 29 May 2019 12:08:11 +0000 (12:08 +0000)]
[clangd] Remove the whitelist std symbols in CanonicalIncludes.
Summary: These symbols have been included via StdSymbolMap.inc.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D62527
llvm-svn: 361952
Haojian Wu [Wed, 29 May 2019 12:03:41 +0000 (12:03 +0000)]
[clangd] Another improvement for std include mapping.
Summary:
Improve the way of checking a symbol name is in the first cell. The previous way
is not very robost for cases where a cell lists multiple symbols (e.g. int8_t).
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D62575
llvm-svn: 361951
Andrea Di Biagio [Wed, 29 May 2019 11:38:27 +0000 (11:38 +0000)]
[MCA] Refactor class LSUnit. NFCI
This should be the last bit of refactoring in preparation for a patch that would
finally fix PR37494.
This patch introduces the concept of memory dependency groups (class
MemoryGroup) and "Load/Store Unit token" (LSUToken) to track the status of a
memory operation.
A MemoryGroup is a node of a memory dependency graph. It is used internally to
classify memory operations based on the memory operations they depend on. Let I
and J be two memory operations, we say that I and J equivalent (for the purpose
of mapping instructions to memory dependency groups) if the set of memory
operations they depend depend on is identical.
MemoryGroups are identified by so-called LSUToken (a unique group identifier
assigned by the LSUnit to every group). When an instruction I is dispatched to
the LSUnit, the LSUnit maps I to a group, and then returns a LSUToken.
LSUTokens are used by class Scheduler to track memory dependencies.
This patch simplifies the LSUnit interface and moves most of the implementation
details to its base class (LSUnitBase). There is no user visible change to the
output.
llvm-svn: 361950
Eugene Leviant [Wed, 29 May 2019 11:37:16 +0000 (11:37 +0000)]
[llvm-objcopy] Implement IHEX writer
Differential revision: https://reviews.llvm.org/D60270
llvm-svn: 361949
Pavel Labath [Wed, 29 May 2019 11:28:35 +0000 (11:28 +0000)]
Revert "D11003: Tolerate DWARF compile unit without filename."
Summary:
This code is modifying a support file list after it has been created.
This makes it hard to share the file list between type units and
compile units in DWARF. It's not a total showstopper, but supporting
this while also sharing the lists would make things more complicated.
Given that this was added to support a project which never fully
materialised, and that even back then there were some concerns about the
correctness of this approach (according to D11003#200772 the compile
unit name is not guaranteed to be the first one in the support file
list), I think we should just delete this workaround.
Reviewers: clayborg, tberghammer, dsrbecky
Subscribers: aprantl, lldb-commits
Differential Revision: https://reviews.llvm.org/D62517
llvm-svn: 361948
Stefan Granitz [Wed, 29 May 2019 11:28:11 +0000 (11:28 +0000)]
[CMake] Remove lldb-server from LLDB.framework
Summary: The LLDB test suite doesn't need lldb-server in the framework bundle anymore.
Reviewers: JDevlieghere, jasonmolenda, xiaobai
Reviewed By: JDevlieghere
Subscribers: mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D62474
llvm-svn: 361947
Stefan Granitz [Wed, 29 May 2019 11:26:06 +0000 (11:26 +0000)]
[CMake] LLDB.framework tools handling
Summary:
Modify the way LLDB.framework tools are collected. This allows for better fine-tuning of the install behavior downstream. Each target calls `lldb_add_to_framework()` individually. When entering the function, the target exists and we can tweak its very own post-build and install steps. This was not possible with the old `LLDB_FRAMEWORK_TOOLS` approach.
No function change otherwise.
This is a reduced follow-up from the proposal in D61952.
Reviewers: xiaobai, compnerd, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: clayborg, friss, ki.stfu, mgorny, lldb-commits, labath, #lldb
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D62472
llvm-svn: 361946
George Rimar [Wed, 29 May 2019 11:01:07 +0000 (11:01 +0000)]
[llvm-readobj] - Repair the test case.
I forgot to change the test tag in r361932.
Now it is fixed.
llvm-svn: 361945
Sam McCall [Wed, 29 May 2019 10:39:01 +0000 (10:39 +0000)]
[ADT] add iterator_range::empty()
llvm-svn: 361944
George Rimar [Wed, 29 May 2019 10:31:46 +0000 (10:31 +0000)]
[llvm-readelf] - Allow dumping of the .dynamic section even if there is no PT_DYNAMIC header.
It is now possible after D61937 was landed and was discussed
in it's review comments. It is not consistent with GNU, which
does not output .dynamic section content in this case for
no visible reason.
Differential revision: https://reviews.llvm.org/D62179
llvm-svn: 361943
Eugene Leviant [Wed, 29 May 2019 10:13:41 +0000 (10:13 +0000)]
[HWASAN] Remove unused code
Differential revision: https://reviews.llvm.org/D62489
llvm-svn: 361942
Ilya Biryukov [Wed, 29 May 2019 10:11:14 +0000 (10:11 +0000)]
[Index] Correctly set symbol kind of IndirectFieldDecl
Summary: The kind has been 'unknown' before, now it is 'field'.
Reviewers: kadircet
Reviewed By: kadircet
Subscribers: jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D62573
llvm-svn: 361941
Ilya Biryukov [Wed, 29 May 2019 10:01:00 +0000 (10:01 +0000)]
[clangd] Represent Hover result using FormattedString
Reviewers: sammccall, kadircet
Reviewed By: kadircet
Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61601
llvm-svn: 361940
Pavel Labath [Wed, 29 May 2019 09:32:59 +0000 (09:32 +0000)]
DWARFASTParserClang: Unify compilation unit language handling
Summary:
The function was not being consistent in how it retrieved the language
of the current compile unit. Sometimes it did so from the lldb CU
object, and sometimes from the DWARF die. This patch unifies the
handling on the latter. The reason for choosing the DWARF method is
because I'd eventually like to stop creating lldb CUs for dwarf type
units (and so this code needs to would need to work without them).
Reviewers: clayborg, JDevlieghere, aprantl
Subscribers: jdoerfert, lldb-commits
Differential Revision: https://reviews.llvm.org/D62481
llvm-svn: 361939
Pavel Labath [Wed, 29 May 2019 09:22:36 +0000 (09:22 +0000)]
DWARF: Fix address range support in mixed 4+5 scenario
Summary:
debug_ranges got renamed to debug_rnglists in DWARF 5. Prior to this
patch lldb was just picking the first section it could find in the file,
and using that for all address ranges lookups. This is not correct in
case the file contains a mixture of compile units with various standard
versions (not a completely unlikely scenario).
In this patch I make lldb support reading from both sections
simulaneously, and decide the correct section to use based on the
version number of the compile unit. SymbolFileDWARF::DebugRanges is
split into GetDebugRanges and GetDebugRngLists (the first one is renamed
mainly so we can catch all incorrect usages).
I tried to structure the code similarly to how llvm handles this logic
(hence DWARFUnit::FindRnglistFromOffset/Index), but the implementations
are still relatively far from each other.
Reviewers: JDevlieghere, aprantl, clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D62302
llvm-svn: 361938
Douglas Yung [Wed, 29 May 2019 09:20:01 +0000 (09:20 +0000)]
Fix test added in r361903 to work on Windows.
llvm-svn: 361937
Cullen Rhodes [Wed, 29 May 2019 09:03:27 +0000 (09:03 +0000)]
[AArch64][SVE2] Asm: support SVE Bitwise Logical - Unpredicated Group
Summary:
Patch adds support for the following instructions:
* EOR3, BSL, BCAX, BSL1N, BSL2N, NBSL, XAR
Aliases for types .B/.H/.S for EOR3 and BCAX have been added, the
preferred disassembly is .D.
The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest
Reviewed By: SjoerdMeijer
Differential Revision: https://reviews.llvm.org/D62387
llvm-svn: 361936
Cullen Rhodes [Wed, 29 May 2019 08:53:06 +0000 (08:53 +0000)]
[AArch64][SVE2] Asm: support Floating Point Widening Multiply-Add
Summary:
Patch adds support for the indexed and unpredicated vectors forms of the
FMLALB, FMLALT, FMLSLB and FMLSLT instructions.
The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest
Reviewed By: chill
Differential Revision: https://reviews.llvm.org/D62386
llvm-svn: 361935
Pengfei Wang [Wed, 29 May 2019 08:42:35 +0000 (08:42 +0000)]
[X86] Fix i386 struct and union parameter alignment
According to i386 System V ABI 2.1: Structures and unions assume the
alignment of their most strictly aligned component. But current
implementation always takes them as 4-byte aligned which will result
in incorrect code, e.g:
1 #include <immintrin.h>
2 typedef union {
3 int d[4];
4 __m128 m;
5 } M128;
6 extern void foo(int, ...);
7 void test(void)
8 {
9 M128 a;
10 foo(1, a);
11 foo(1, a.m);
12 }
The first call (line 10) takes the second arg as 4-byte aligned while
the second call (line 11) takes the second arg as 16-byte aligned.
There is oxymoron for the alignment of the 2 calls because they should
be the same.
This patch fixes the bug by following i386 System V ABI and apply it to
Linux only since other System V OS (e.g Darwin, PS4 and FreeBSD) don't
want to spend any effort dealing with the ramifications of ABI breaks
at present.
Patch by Wei Xiao (wxiao3)
Differential Revision: https://reviews.llvm.org/D60748
llvm-svn: 361934
Cullen Rhodes [Wed, 29 May 2019 08:40:33 +0000 (08:40 +0000)]
[AArch64][SVE2] Asm: support SVE2 Floating Point Pairwise Group
Summary:
Patch adds support for the following instructions:
SVE2 floating-point pairwise operations:
* FADDP, FMAXNMP, FMINNMP, FMAXP, FMINP
The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest
Reviewed By: chill
Differential Revision: https://reviews.llvm.org/D62383
llvm-svn: 361933
George Rimar [Wed, 29 May 2019 08:28:47 +0000 (08:28 +0000)]
[llvm-readobj/llvm-readelf] - Simplify the elf-versioninfo.test test case.
This removes 2 precompiled objects from the test case and replaces
them with a single YAML. That allowed to simplify and clean up the test,
remove excessive checks.
Differential revision: https://reviews.llvm.org/D62529
llvm-svn: 361932
Michal Gorny [Wed, 29 May 2019 07:20:30 +0000 (07:20 +0000)]
[libunwind] [test] Fix inferring source paths
Fix two issues that caused libcxx source path not to be inferred
correctly when not specified explicitly:
1. get_lit_conf() uses default value only if the lit variable is set
to None. Due to the mehod of substituting lit.site.cfg, they were
"" rather than None when unset, effectively causing the default never
to apply. Instead, use 'or' construct to use the default whenever
get_lit_conf() returns a false value.
2. If os.path.join() is given a component starting with '/', it takes
it to be an absolute path and ignores everything preceding it.
Remove the slash to correctly append subdirectory.
With these two fixes, libunwind tests start working on NetBSD buildbot
again.
Differential Revision: https://reviews.llvm.org/D62005
llvm-svn: 361931
Zi Xuan Wu [Wed, 29 May 2019 07:09:54 +0000 (07:09 +0000)]
revert rC361928: [PowerPC] [Clang] Port SSE intrinsics to PowerPC
Because test fails in other targets rather than PowerPC
llvm-svn: 361930
Fangrui Song [Wed, 29 May 2019 06:18:34 +0000 (06:18 +0000)]
[llvm-readobj] -u: don't crash when dumping SHT_ARM_EXIDX if .symtab doesn't exist
Reviewed By: kongyi
Differential Revision: https://reviews.llvm.org/D62567
llvm-svn: 361929
Zi Xuan Wu [Wed, 29 May 2019 05:17:03 +0000 (05:17 +0000)]
[PowerPC] [Clang] Port SSE intrinsics to PowerPC
Port xmmintrin.h which include Intel SSE intrinsics implementation to PowerPC platform (using Altivec).
The new headers containing those implemenations are located into a directory named ppc_wrappers
which has higher priority when the platform is PowerPC on Linux. They are mainly developed by Steven Munroe,
with contributions from Paul Clarke, Bill Schmidt, Jinsong Ji and Zixuan Wu.
Patched by: Qiu Chaofan <qiucf@cn.ibm.com>
Reviewed By: Jinsong Ji
Differential Revision: https://reviews.llvm.org/D62121
llvm-svn: 361928
Richard Trieu [Wed, 29 May 2019 04:09:32 +0000 (04:09 +0000)]
Inline a variable into debug section to fix unused variable warning.
llvm-svn: 361927
Peter Collingbourne [Wed, 29 May 2019 04:06:01 +0000 (04:06 +0000)]
ELF: Don't reuse a thunk in a different loadable partition.
There's no guarantee that the other partition will be loaded, so it
can't be reused.
Differential Revision: https://reviews.llvm.org/D62365
llvm-svn: 361926
Peter Collingbourne [Wed, 29 May 2019 03:55:20 +0000 (03:55 +0000)]
ELF: Add basic partition data structures and behaviours.
This change causes us to read partition specifications from partition
specification sections and split output sections into partitions according
to their reachability from partition entry points.
This is only the first step towards a full implementation of partitions. Later
changes will add additional synthetic sections to each partition so that
they can be loaded independently.
Differential Revision: https://reviews.llvm.org/D60353
llvm-svn: 361925
Richard Trieu [Wed, 29 May 2019 03:43:01 +0000 (03:43 +0000)]
Inline value into debug statement to avoid unused variable warning.
llvm-svn: 361924
Peter Collingbourne [Wed, 29 May 2019 03:29:01 +0000 (03:29 +0000)]
Add IR support, ELF section and user documentation for partitioning feature.
The partitioning feature was proposed here:
http://lists.llvm.org/pipermail/llvm-dev/2019-February/130583.html
This is mostly just documentation. The feature itself will be contributed
in subsequent patches.
Differential Revision: https://reviews.llvm.org/D60242
llvm-svn: 361923
Peter Collingbourne [Wed, 29 May 2019 03:28:51 +0000 (03:28 +0000)]
IR: Give the TypeAllocator a more generic name and start using it for section names as well. NFCI.
This prepares us to start using it for partition names.
llvm-svn: 361922
Eric Fiselier [Wed, 29 May 2019 03:15:36 +0000 (03:15 +0000)]
Make __has_builtin work with __builtin_LINE and friends.
The source location builtins are implemented as keywords, but
__has_builtin should still report true for them.
This patch also fixes a test failure on systemz where the alignment
of string literals is 2 not 1.
llvm-svn: 361920
Jinsong Ji [Wed, 29 May 2019 03:02:59 +0000 (03:02 +0000)]
Support resource tracking with InstrSchedModel
The current design use DFA to do resource tracking in SMS,
and DFA only support InstrItins, and also has scaling limitation.
This patch extend SMS to allow Subtarget to use ProcResource in
InstrSchedModel instead.
Differential Revision: https://reviews.llvm.org/D62163
llvm-svn: 361919
Pengfei Wang [Wed, 29 May 2019 02:49:59 +0000 (02:49 +0000)]
Revert "[X86] Use 'llvm_unreachable' instead of nullptr in unreachable code to"
This reverts commit
c1b3716614bc0a107e6f41a7d3d503baefad8a5b.
llvm-svn: 361918
Eric Fiselier [Wed, 29 May 2019 02:38:19 +0000 (02:38 +0000)]
Fix build breakage on 32-bit machines
llvm-svn: 361917
Eric Fiselier [Wed, 29 May 2019 02:33:11 +0000 (02:33 +0000)]
Update private_typeinfo's `is_equal` implementation after r361913
The libc++ typeinfo implementation is being improved to better
handle non-merged type names.
This patch takes advantage of that more correct behavior by delegating
to std::type_infos default operator== instead of doing pointer equality
ourselves.
However, libc++ still expects unique RTTI by default, and so we
should still fall back to strcmp when explicitly requested.
llvm-svn: 361916
Saleem Abdulrasool [Wed, 29 May 2019 02:26:29 +0000 (02:26 +0000)]
build: only search for the needed python type
Windows has different types of runtime libraries which are ABI
incompatible with one another. This requires that the debug build of
lldb link against the debug build of python. Adjust the python search
to search for only the required type of python. This permits building a
release build of lldb against just the release build of python.
llvm-svn: 361915
Stephane Moore [Wed, 29 May 2019 02:23:32 +0000 (02:23 +0000)]
Rollback "Revise the google-objc-global-variable-declaration check to match the style guide." 💥
The change introduced new test failures.
Phabricator URL of original commit: https://reviews.llvm.org/rG12e3726fadb0b2a4d8aeed0a2817b5159f9d029d
llvm-svn: 361914
Eric Fiselier [Wed, 29 May 2019 02:21:37 +0000 (02:21 +0000)]
Rework std::type_info definition to support systems without fully
merged type info names.
Previously std::type_info always expected type info string to be unique.
But this isn't always the case. Like when -Bsymbolic is passed to the
linker or due to llvm.org/PR37398.
This patch adds the LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT CMake
option which, when specified, overrides the default configuration for
the library.
The current defaults still assume unique names even though this isn't
strictly correct for ELF binaries. We should consider changing the
default in a follow up commit.
llvm-svn: 361913