Raphael Isemann [Thu, 10 Oct 2019 08:30:10 +0000 (08:30 +0000)]
[lldb][NFC] Use unique_ptr in DiagnosticManager to express ownership
llvm-svn: 374289
Sjoerd Meijer [Thu, 10 Oct 2019 08:27:14 +0000 (08:27 +0000)]
Recommit "[Clang] Pragma vectorize_width() implies vectorize(enable)"
This was further discussed at the llvm dev list:
http://lists.llvm.org/pipermail/llvm-dev/2019-October/135602.html
I think the brief summary of that is that this change is an improvement,
this is the behaviour that we expect and promise in ours docs, and also
as a result there are cases where we now emit diagnostics whereas before
pragmas were silently ignored. Two areas where we can improve: 1) the
diagnostic message itself, and 2) and in some cases (e.g. -Os and -Oz)
the vectoriser is (quite understandably) not triggering.
Original commit message:
Specifying the vectorization width was supposed to implicitly enable
vectorization, except that it wasn't really doing this. It was only
setting the vectorize.width metadata, but not vectorize.enable.
This should fix PR27643.
llvm-svn: 374288
Simon Tatham [Thu, 10 Oct 2019 08:25:34 +0000 (08:25 +0000)]
[update_cc_test_checks] Support 'clang | opt | FileCheck'
Some clang lit tests use a pipeline of the form
// RUN: %clang [args] -O0 %s | opt [specific optimizations] | FileCheck %s
to make the expected test output depend on as few optimization phases
as possible, for stability. But when you write a RUN line of this
form, you lose the ability to use update_cc_test_checks.py to
automatically generate the expected output, because it only supports
two-stage pipelines consisting of '%clang | FileCheck' (or %clang_cc1).
This change extends the set of supported RUN lines so that pipelines
with an invocation of `opt` in the middle can still be automatically
handled.
To implement it, I've adjusted `get_function_body()` so that it can
cope with an arbitrary sequence of intermediate pipeline commands. But
the code that decides which RUN lines to consider is more
conservative: it only adds clang | opt | FileCheck to the set of
supported lines, because I didn't want to accidentally include some
other kind of line that doesn't output IR at all.
(Also in this commit is the minimal change to make this script work at
all, after r373912 added an extra parameter to `add_ir_checks`.)
Reviewers: MaskRay, xbolva00
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68406
llvm-svn: 374287
Gauthier Harnisch [Thu, 10 Oct 2019 07:13:20 +0000 (07:13 +0000)]
[clang] prevent crash for nonnull attribut in constant context (Bug 43601)
Summary:
bug : https://bugs.llvm.org/show_bug.cgi?id=43601
Reviewers: rnk
Reviewed By: rnk
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68716
llvm-svn: 374285
Matt Arsenault [Thu, 10 Oct 2019 07:11:33 +0000 (07:11 +0000)]
AMDGPU: Use SGPR_128 instead of SReg_128 for vregs
SGPR_128 only includes the real allocatable SGPRs, and SReg_128 adds
the additional non-allocatable TTMP registers. There's no point in
allocating SReg_128 vregs. This shrinks the size of the classes
regalloc needs to consider, which is usually good.
llvm-svn: 374284
Craig Topper [Thu, 10 Oct 2019 06:25:00 +0000 (06:25 +0000)]
[X86] Add test case for trunc_packus_v16i32_v16i8 with avx512vl+avx512bw and prefer-vector-width=256 and min-legal-vector-width=256. NFC
llvm-svn: 374283
Johannes Doerfert [Thu, 10 Oct 2019 05:34:21 +0000 (05:34 +0000)]
[Attributor][NFC] clang format
llvm-svn: 374281
Johannes Doerfert [Thu, 10 Oct 2019 05:33:21 +0000 (05:33 +0000)]
[Attributor] Handle `null` differently in capture and alias logic
Summary:
`null` in the default address space (=AS 0) cannot be captured nor can
it alias anything. We make this clear now as it can be important for
callbacks and other cases later on. In addition, this patch improves the
debug output for noalias deduction.
Reviewers: sstefan1, uenoku
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68624
llvm-svn: 374280
Fangrui Song [Thu, 10 Oct 2019 05:25:39 +0000 (05:25 +0000)]
[WebAssembly] Wrap definitions in namespace lld { namespace wasm {. NFC
Similar to D68323, but for wasm.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D68759
llvm-svn: 374279
GN Sync Bot [Thu, 10 Oct 2019 04:29:49 +0000 (04:29 +0000)]
gn build: Merge r374277
llvm-svn: 374278
Cyndy Ishida [Thu, 10 Oct 2019 04:24:44 +0000 (04:24 +0000)]
Reland "[TextAPI] Introduce TBDv4"
Original Patch broke for compilations w/ gcc and exposed asan fail.
This reland repairs those bugs.
Differential Revision: https://reviews.llvm.org/D67529
llvm-svn: 374277
Michael Liao [Thu, 10 Oct 2019 04:16:52 +0000 (04:16 +0000)]
[ast] Fix indentation. NFC.
llvm-svn: 374276
Sam Clegg [Thu, 10 Oct 2019 03:23:06 +0000 (03:23 +0000)]
[lld][WebAssembly] Refactor markLive.cpp. NFC
This pattern matches the ELF implementation add if also useful as
part of a planned change where running `mark` more than once is needed.
Differential Revision: https://reviews.llvm.org/D68749
llvm-svn: 374275
Michael Liao [Thu, 10 Oct 2019 03:14:51 +0000 (03:14 +0000)]
[sema] Revise `getCurrentMangleNumberContext` interface. NFC.
- Prefer returning mulitple values using a tuple instead of
additional pointers/references.
llvm-svn: 374274
Chen Zheng [Thu, 10 Oct 2019 03:00:15 +0000 (03:00 +0000)]
[PowerPC] add testcase for ppc loop instr form prep - NFC
llvm-svn: 374273
Nico Weber [Thu, 10 Oct 2019 02:48:47 +0000 (02:48 +0000)]
gn build: (manually) merge r374271
llvm-svn: 374272
Yitzhak Mandelbaum [Thu, 10 Oct 2019 02:34:47 +0000 (02:34 +0000)]
[libTooling] Move Transformer files to their own directory/library.
Summary:
The Transformer library has been growing inside of
lib/Tooling/Refactoring. However, it's not really related to anything else in
that directory. This revision moves all Transformer-related files into their own
include & lib directories. A followup revision will (temporarily) add
forwarding headers to help any users migrate their code to the new location.
Reviewers: gribozavr
Subscribers: mgorny, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68637
llvm-svn: 374271
Nico Weber [Thu, 10 Oct 2019 02:04:56 +0000 (02:04 +0000)]
dummy comment typo fix commit to cycle the bots
llvm-svn: 374270
Reid Kleckner [Thu, 10 Oct 2019 01:14:22 +0000 (01:14 +0000)]
Re-land [mangle] Fix mangling where an extra mangle context is required.
This reverts r374268 (git commit
c34385d07c7d59447bf836b740f032235391d121)
I think I reverted this by mistake, so I'm relanding it. While my bisect
found this revision, I think the crashes I'm seeing locally must be
environmental. Maybe the version of clang I'm using miscompiles tot
clang.
llvm-svn: 374269
Reid Kleckner [Thu, 10 Oct 2019 01:10:01 +0000 (01:10 +0000)]
Revert [mangle] Fix mangling where an extra mangle context is required.
This reverts r374200 (git commit
fd18e94697c987d5f24e25aa4e27adaffff3cce4)
Causes crashes just compiling `int main() {}` on my machine.
llvm-svn: 374268
Reid Kleckner [Thu, 10 Oct 2019 01:06:01 +0000 (01:06 +0000)]
[codeview] Try to avoid emitting .cv_loc with line zero
Summary:
Visual Studio doesn't like it while stepping. It kicks you out of the
source view of the file being stepped through and tries to fall back to
the disassembly view.
Fixes PR43530
The fix is incomplete, because it's possible to have a basic block with
no source locations at all. In this case, we don't emit a .cv_loc, but
that will result in wrong stepping behavior in the debugger if the
layout predecessor of the location-less BB has an unrelated source
location. We could try harder to find a valid location that dominates or
post-dominates the current BB, but in general it's a dataflow problem,
and one still might not exist. I left a FIXME about this.
As an alternative, we might want to consider having the middle-end check
if its emitting codeview and get it to stop using line zero.
Reviewers: akhuang
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68747
llvm-svn: 374267
Reid Kleckner [Thu, 10 Oct 2019 00:54:33 +0000 (00:54 +0000)]
Use -fdebug-compilation-dir to form absolute paths in coverage mappings
This allows users to explicitly request relative paths with
`-fdebug-compilation-dir .`.
Fixes PR43614
Reviewers: vsk, arphaman
Differential Revision: https://reviews.llvm.org/D68733
llvm-svn: 374266
Julian Lettner [Thu, 10 Oct 2019 00:33:04 +0000 (00:33 +0000)]
[ASan] Do not misrepresent high value address dereferences as null dereferences
Dereferences with addresses above the 48-bit hardware addressable range
produce "invalid instruction" (instead of "invalid access") hardware
exceptions (there is no hardware address decoding logic for those bits),
and the address provided by this exception is the address of the
instruction (not the faulting address). The kernel maps the "invalid
instruction" to SEGV, but fails to provide the real fault address.
Because of this ASan lies and says that those cases are null
dereferences. This downgrades the severity of a found bug in terms of
security. In the ASan signal handler, we can not provide the real
faulting address, but at least we can try not to lie.
rdar://
50366151
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D68676
llvm-svn: 374265
Jason Molenda [Thu, 10 Oct 2019 00:12:05 +0000 (00:12 +0000)]
Change debugserver to use the brk #0 for breakpoints.
debugserver had been using an instruction that would work
for armv7 or aarch64 processes, but we don't have armv7 code
running on arm64 devices any more so this is unnecessary.
<rdar://problem/
56133118>
llvm-svn: 374264
Yaxun Liu [Wed, 9 Oct 2019 23:54:10 +0000 (23:54 +0000)]
[CUDA][HIP] Fix host/device check with -fopenmp
CUDA/HIP program may be compiled with -fopenmp. In this case, -fopenmp is only passed to host compilation
to take advantages of multi-threads computation.
CUDA/HIP and OpenMP both use Sema::DeviceCallGraph to store functions to be analyzed and remove them
once they decide the function is sure to be emitted. CUDA/HIP and OpenMP have different functions to determine
if a function is sure to be emitted.
To check host/device correctly for CUDA/HIP when -fopenmp is enabled, there needs a unified logic to determine
whether a function is to be emitted. The logic needs to be aware of both CUDA and OpenMP logic.
Differential Revision: https://reviews.llvm.org/D67837
llvm-svn: 374263
Frederic Riss [Wed, 9 Oct 2019 23:52:31 +0000 (23:52 +0000)]
TestMTCSimple.py: allow the test to run on Darwin embedded platforms
The test needed some updates to run using a different UI toolkit
and with a different libMTC, but it should run fine on a device.
llvm-svn: 374262
Philip Reames [Wed, 9 Oct 2019 23:43:33 +0000 (23:43 +0000)]
Conservatively add volatility and atomic checks in a few places
As background, starting in D66309, I'm working on support unordered atomics analogous to volatile flags on normal LoadSDNode/StoreSDNodes for X86.
As part of that, I spent some time going through usages of LoadSDNode and StoreSDNode looking for cases where we might have missed a volatility check or need an atomic check. I couldn't find any cases that clearly miscompile - i.e. no test cases - but a couple of pieces in code loop suspicious though I can't figure out how to exercise them.
This patch adds defensive checks and asserts in the places my manual audit found. If anyone has any ideas on how to either a) disprove any of the checks, or b) hit the bug they might be fixing, I welcome suggestions.
Differential Revision: https://reviews.llvm.org/D68419
llvm-svn: 374261
GN Sync Bot [Wed, 9 Oct 2019 23:10:49 +0000 (23:10 +0000)]
gn build: Merge r374245
llvm-svn: 374260
Thomas Lively [Wed, 9 Oct 2019 23:06:38 +0000 (23:06 +0000)]
[WebAssembly] Fix tests missed in rL374235
llvm-svn: 374259
Matt Morehouse [Wed, 9 Oct 2019 22:57:07 +0000 (22:57 +0000)]
[sanitizer_common] Remove OnPrint from Go build.
Summary: Go now uses __sanitizer_on_print instead.
Reviewers: vitalybuka, dvyukov
Reviewed By: vitalybuka
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68621
llvm-svn: 374258
Matt Arsenault [Wed, 9 Oct 2019 22:51:42 +0000 (22:51 +0000)]
AMDGPU: Don't fold copies to physregs
In a future patch, this will help cleanup m0 handling.
The register coalescer handles copies from a register that
materializes an immediate, but doesn't handle move immediates
itself. The virtual register uses will often be allocated to the same
register, so there end up being no real copy.
llvm-svn: 374257
Frederic Riss [Wed, 9 Oct 2019 22:47:28 +0000 (22:47 +0000)]
TestIndirectSymbols: Modernize the Makefile
This old test used a completely hand-rolled Makefile. Modernize so that
it's able to cross-compile. And XFAIL the test as it fails on embedded
targets...
llvm-svn: 374256
Matt Arsenault [Wed, 9 Oct 2019 22:44:49 +0000 (22:44 +0000)]
AMDGPU/GlobalISel: Fix crash on wide constant load with VGPR pointer
This was ignoring the register bank of the input pointer, and
isUniformMMO seems overly aggressive.
This will now conservatively assume a VGPR in cases where the incoming
bank hasn't been determined yet (i.e. is from a loop phi).
llvm-svn: 374255
Matt Arsenault [Wed, 9 Oct 2019 22:44:48 +0000 (22:44 +0000)]
AMDGPU: Relax register classes used
llvm-svn: 374254
Matt Arsenault [Wed, 9 Oct 2019 22:44:47 +0000 (22:44 +0000)]
AMDGPU: Fix typos
llvm-svn: 374253
Matt Arsenault [Wed, 9 Oct 2019 22:44:43 +0000 (22:44 +0000)]
GlobalISel: Implement fewerElementsVector for G_BUILD_VECTOR
Turn it into a G_CONCAT_VECTORS of G_BUILD_VECTOR.
llvm-svn: 374252
Frederic Riss [Wed, 9 Oct 2019 22:35:56 +0000 (22:35 +0000)]
Makefile.rules: add missing CODESIGN call
When building an executable and a shared library at the same time (yes,
Makefile.rules is setup to do this!) the executable was not codesigned.
llvm-svn: 374251
Haibo Huang [Wed, 9 Oct 2019 22:34:55 +0000 (22:34 +0000)]
[lldb] Put site-packages into a sub dir of CMAKE_CFG_INTDIR
Summary: Fixes issue like D68719
Reviewers: tatyana-krasnukha
Subscribers: mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68728
llvm-svn: 374250
Nico Weber [Wed, 9 Oct 2019 22:22:36 +0000 (22:22 +0000)]
gn build: (manually) merge r374219
llvm-svn: 374249
Casey Carter [Wed, 9 Oct 2019 22:19:17 +0000 (22:19 +0000)]
[libc++][test] Miscellaneous MSVC cleanups
* Silence unused-local-typedef warnings: `map.cons/assign_initializer_list.pass.cpp` (and the `set.cons` variant) uses a local typedef only within `LIBCPP_ASSERT`s, so clang diagnoses it as unused when testing non-libc++.
* Add missing include: `c.math/abs.pass.cpp` uses `std::numeric_limits` but failed to `#include <limits>`.
* Don't test non-type: A "recent" change to `meta.trans.other/underlying_type.pass.cpp` unconditionally tests the type `F` which is conditionally defined.
* Use `hash<long long>` instead of `hash<short>` with `int` in `unordered_meow` deduction guide tests to avoid truncation warnings.
* Convert `3.14` explicitly in `midpoint.float.pass` since MSVC incorrectly diagnoses `float meow = 3.14;` as truncating.
Differential Revision: https://reviews.llvm.org/D68681
llvm-svn: 374248
Greg Clayton [Wed, 9 Oct 2019 22:16:12 +0000 (22:16 +0000)]
Set eRegisterKindEHFrame register numbers for 32 bit ARM register contexts in minidumps
Stack unwinding was sometimes failing when trying to unwind stacks in 32 bit ARM. I discovered this was because the EH frame register numbers were not set. This patch fixes this issue and adds a unit test to verify this doesn't regress.
Differential Revision: https://reviews.llvm.org/D68088
llvm-svn: 374246
Marcello Maggioni [Wed, 9 Oct 2019 22:10:10 +0000 (22:10 +0000)]
[GISel] Refactor and split PatternMatchTest. NFC
Split the ConstantFold part into a separate file and
make it use the fixture GISelMITest.
llvm-svn: 374245
Jonas Devlieghere [Wed, 9 Oct 2019 22:09:57 +0000 (22:09 +0000)]
[CMake] Use the correct lit.cfg.py
llvm-svn: 374244
Evandro Menezes [Wed, 9 Oct 2019 22:03:23 +0000 (22:03 +0000)]
[InstCombine] Fix PR43617
Check for `nullptr` before inspecting composite function.
llvm-svn: 374243
Greg Clayton [Wed, 9 Oct 2019 22:03:15 +0000 (22:03 +0000)]
Fix a crasher due to an assert when two files have the same UUID but different paths.
Summary: The PlaceholderObjectFile has an assert in SetLoadAddress that fires if "m_base == value" is not true. To avoid this, we create check that the base address matches, and if it doesn't we clear the module that was found using the UUID so that we create a new PlaceholderObjectFile. Added a test to cover this issue.
Reviewers: labath, aadsm, dvlahovski
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68106
llvm-svn: 374242
Stanislav Mekhanoshin [Wed, 9 Oct 2019 22:02:58 +0000 (22:02 +0000)]
[AMDGPU] Fixed dpp combine of VOP1
If original instruction did not have source modifiers they were
not added to the new DPP instruction as well, even if needed.
Differential Revision: https://reviews.llvm.org/D68729
llvm-svn: 374241
Cameron McInally [Wed, 9 Oct 2019 21:52:15 +0000 (21:52 +0000)]
[IRBuilder] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator
Also update Clang to call Builder.CreateFNeg(...) for UnaryMinus.
Differential Revision: https://reviews.llvm.org/D61675
llvm-svn: 374240
Lawrence D'Anna [Wed, 9 Oct 2019 21:50:52 +0000 (21:50 +0000)]
remove a smattering of isolated, unnecessary uses of FILE*
Summary:
There a a few call sites that use FILE* which are easy to
fix without disrupting anything else.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: JDevlieghere, labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68444
llvm-svn: 374239
Lawrence D'Anna [Wed, 9 Oct 2019 21:50:49 +0000 (21:50 +0000)]
SBFile support in SBCommandReturnObject
Summary:
This patch add SBFile interfaces to SBCommandReturnObject, and
removes the internal callers of its FILE* interfaces.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: JDevlieghere
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68434
llvm-svn: 374238
Lawrence D'Anna [Wed, 9 Oct 2019 21:50:46 +0000 (21:50 +0000)]
SBFile: add a bunch of tests that should eventually work.
Summary:
It's really annoying and confusing to have to keep referring
back to earlier versions of this SBFile work to find the
tests that need to be added for each patch, and not duplicate
them with new tests.
This patch just imports all my tests. A bunch of them don't
work yet, so they are marked to be skipped. They'll be
unmarked as I fix them.
One of these tests will actually trip an assert in the SWIG
code now instead of just failing, so I'm fixing that here too.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: JDevlieghere, labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68433
llvm-svn: 374237
Jonas Devlieghere [Wed, 9 Oct 2019 21:47:49 +0000 (21:47 +0000)]
[Reproducer] Add convenience methods IsCapturing and IsReplaying.
Add convenience methods to the Reproducer class for when you don't need
access to the generator and the loader.
llvm-svn: 374236
Thomas Lively [Wed, 9 Oct 2019 21:42:08 +0000 (21:42 +0000)]
[WebAssembly] Make returns variadic
Summary:
This is necessary and sufficient to get simple cases of multiple
return working with multivalue enabled. More complex cases will
require block and loop signatures to be generalized to potentially be
type indices as well.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68684
llvm-svn: 374235
Frederic Riss [Wed, 9 Oct 2019 21:41:02 +0000 (21:41 +0000)]
TestHelloWorld: Make compatible with remote testing
The synchronization token handling was not remote-friendly.
llvm-svn: 374234
Wei Mi [Wed, 9 Oct 2019 21:36:03 +0000 (21:36 +0000)]
[SampleFDO] Add indexing for function profiles so they can be loaded on demand
in ExtBinary format
Currently for Text, Binary and ExtBinary format profiles, when we compile a
module with samplefdo, even if there is no function showing up in the profile,
we have to load all the function profiles from the profile input. That is a
waste of compile time.
CompactBinary format profile has already had the support of loading function
profiles on demand. In this patch, we add the support to load profile on
demand for ExtBinary format. It will work no matter the sections in ExtBinary
format profile are compressed or not. Experiment shows it reduces the time to
compile a server benchmark by 30%.
When profile remapping and loading function profiles on demand are both used,
extra work needs to be done so that the loading on demand process will take
the name remapping into consideration. It will be addressed in a follow-up
patch.
Differential Revision: https://reviews.llvm.org/D68601
llvm-svn: 374233
David Blaikie [Wed, 9 Oct 2019 21:25:28 +0000 (21:25 +0000)]
llvm-dwarfdump: Support multiple debug_loclists contributions
Also fixing the incorrect "offset" field being computed/printed for each
location list.
llvm-svn: 374232
Cameron Desrochers [Wed, 9 Oct 2019 21:15:48 +0000 (21:15 +0000)]
[LLDB] Fix for regression of test 'TestDataFormatterInvalidStdUniquePtr.py' introduced in r374195
Differential Revision: https://reviews.llvm.org/D68641
llvm-svn: 374231
DeForest Richards [Wed, 9 Oct 2019 21:09:09 +0000 (21:09 +0000)]
[Docs] Adds section for Additional Topics on Reference page
Adds a new section for Additional Topics on the Reference documentation page. Also moves Support Library topic to User Guides page.
llvm-svn: 374230
Jonas Devlieghere [Wed, 9 Oct 2019 21:06:03 +0000 (21:06 +0000)]
[LLDB] Remove standalone build dep on llvm-strip
When building standalone, since llvm-strip is a symlink, it is created
using add_custom_command/add_custom_target which cannot be exported, and
thus cannot be depended on by lldb.
Patch by: Gwen Mittertreiner
Differential revision: https://reviews.llvm.org/D68614
llvm-svn: 374229
Jake Ehrlich [Wed, 9 Oct 2019 21:01:50 +0000 (21:01 +0000)]
[libFuzzer] Fix Alarm callback in fuchsia.
This patch adds an #if macro to skip the InFuzzingThread() comparison
for fuchsia, similar to what it is done for Windows and NetBSD.
In fuchsia, the alarm callback runs in a separate thread[0], making it fail
the comparison InFuzzingThread(), breaking the -timeout flag.
[0]:
https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp#L323
Author: charco (aka Marco Vanotti)
Differential Revision: https://reviews.llvm.org/D68166
llvm-svn: 374228
Jim Ingham [Wed, 9 Oct 2019 20:56:43 +0000 (20:56 +0000)]
Revert "[lldb] Calculate relative path for symbol links"
This reverts commit
958091c209d0a92e38b9cb27fb77a0ff7da11853.
This commit incorrectly sets the _lldb.so symlink (at least it does when
building in Stefans' two build directory mode, where you build llvm with
cmake/ninja and lldb with cmake/Xcode, using a cmake generated project.
The _lldb.so link is SUPPOSED to point to:
bin/LLDB.framework/Versions/A/LLDB
but instead it points to
bin/LLDB
which is where LLDB was staged to before constructing the framework. This
causes all sorts of problems when we then build the lldb driver into bin -
remember that MacOS is a case-preserving but case insensitive filesystem -
so when we later go to dlopen _lldb.so, we dlopen the main executable instead.
llvm-svn: 374226
Lawrence D'Anna [Wed, 9 Oct 2019 20:56:17 +0000 (20:56 +0000)]
allow arbitrary python streams to be converted to SBFile
Summary:
This patch adds SWIG typemaps that can convert arbitrary python
file objects into lldb_private::File.
A SBFile may be initialized from a python file using the
constructor. There are also alternate, tagged constructors
that allow python files to be borrowed, and for the caller
to control whether or not the python I/O methods will be
called even when a file descriptor is available.I
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: zturner, amccarth, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68188
llvm-svn: 374225
Alexey Bataev [Wed, 9 Oct 2019 20:54:06 +0000 (20:54 +0000)]
[OPENMP50]Fix scoring of contexts with and without user provided scores.
The context selector with user provided score must have higher score
than the context selector without user provided score.
llvm-svn: 374224
Vitaly Buka [Wed, 9 Oct 2019 20:52:39 +0000 (20:52 +0000)]
[sanitizer, NFC] Fix grammar in comment
llvm-svn: 374223
Vitaly Buka [Wed, 9 Oct 2019 20:48:54 +0000 (20:48 +0000)]
[System Model] [TTI] Define AMDGPUTTIImpl::getST and AMDGPUTTIImpl::getTLI
To fix "infinite recursion" warning.
llvm-svn: 374222
Vitaly Buka [Wed, 9 Oct 2019 20:48:52 +0000 (20:48 +0000)]
[System Model] [TTI] Fix virtual destructor warning
llvm-svn: 374221
Vitaly Buka [Wed, 9 Oct 2019 20:48:50 +0000 (20:48 +0000)]
[sanitizer] Disable signal_trap_handler on s390
llvm-svn: 374220
Sergey Dmitriev [Wed, 9 Oct 2019 20:42:58 +0000 (20:42 +0000)]
[Clang][OpenMP Offload] Add new tool for wrapping offload device binaries
This patch removes the remaining part of the OpenMP offload linker scripts which was used for inserting device binaries into the output linked binary. Device binaries are now inserted into the host binary with a help of the wrapper bit-code file which contains device binaries as data. Wrapper bit-code file is dynamically created by the clang driver with a help of new tool clang-offload-wrapper which takes device binaries as input and produces bit-code file with required contents. Wrapper bit-code is then compiled to an object and resulting object is appended to the host linking by the clang driver.
This is the second part of the patch for eliminating OpenMP linker script (please see https://reviews.llvm.org/D64943).
Differential Revision: https://reviews.llvm.org/D68166
llvm-svn: 374219
Frederic Riss [Wed, 9 Oct 2019 20:39:04 +0000 (20:39 +0000)]
Skip Apple simulator test for all remote testing scenarios.
The test makes no sense to run remotely, period. The architecture of
the target is not the discriminant here.
llvm-svn: 374217
Jonas Devlieghere [Wed, 9 Oct 2019 20:36:29 +0000 (20:36 +0000)]
[CMake] Fix add_lldb_test_dependency
This function would ignore all but the first argument. Now it correctly
adds every dependency by iterating over its arguments.
llvm-svn: 374216
Jonas Devlieghere [Wed, 9 Oct 2019 20:30:54 +0000 (20:30 +0000)]
[utils] Update lldb-dotest for new test layout
The path to dotest.py changed after the test directory reorganization.
llvm-svn: 374215
DeForest Richards [Wed, 9 Oct 2019 20:26:13 +0000 (20:26 +0000)]
[Docs] Adds Documentation links to sidebar
Adds links to Getting Started/Tutorials, User Guides, and Reference documentation pages to sidebar. Also adds a new section for LLVM IR on the Reference documentation page.
llvm-svn: 374214
Vitaly Buka [Wed, 9 Oct 2019 20:22:14 +0000 (20:22 +0000)]
[sanitizer] Make signal_name a C test
llvm-svn: 374213
Vedant Kumar [Wed, 9 Oct 2019 20:21:33 +0000 (20:21 +0000)]
[test] Skip entry value test when clang < 10.0.0
clang-9 emitted the wrong opcode for entry values on Darwin.
rdar://
56119661
llvm-svn: 374212
Vitaly Buka [Wed, 9 Oct 2019 20:18:27 +0000 (20:18 +0000)]
[sanitizer] Use raise() in test and cover more signals
llvm-svn: 374211
Sanjay Patel [Wed, 9 Oct 2019 20:14:17 +0000 (20:14 +0000)]
[ConstProp] add tests for extractelement with undef index; NFC
llvm-svn: 374210
Evandro Menezes [Wed, 9 Oct 2019 20:00:43 +0000 (20:00 +0000)]
[AMDGPU] Use math constants defined in MathExtras (NFC)
Use the the new math constants in `MathExtras.h`.
Differential revision: https://reviews.llvm.org/D68285
llvm-svn: 374208
Evandro Menezes [Wed, 9 Oct 2019 19:58:01 +0000 (19:58 +0000)]
[Support] Add mathematical constants
Add own version of the mathematical constants from the upcoming C++20 `std::numbers`.
Differential revision: https://reviews.llvm.org/D68257
llvm-svn: 374207
David Greene [Wed, 9 Oct 2019 19:51:48 +0000 (19:51 +0000)]
[System Model] [TTI] Update cache and prefetch TTI interfaces
Re-apply
9fdfb045ae8b/r365676 with fixes for PPC and Hexagon. This involved
moving defaults from TargetTransformInfoImplBase to MCSubtargetInfo.
Rework the TTI cache and software prefetching APIs to prepare for the
introduction of a general system model. Changes include:
- Marking existing interfaces const and/or override as appropriate
- Adding comments
- Adding BasicTTIImpl interfaces that delegate to a subtarget
implementation
- Moving the default TargetTransformInfoImplBase implementation to a default
MCSubtarget implementation
Only a handful of targets use these interfaces currently: AArch64, Hexagon, PPC
and SystemZ. AArch64 already has a custom subtarget implementation, so its
custom TTI implementation is migrated to use the new facilities in BasicTTIImpl
to invoke its custom subtarget implementation. The custom TTI implementations
continue to exist for the other targets with this change. They are not moved
over to subtarget-based implementations.
The end goal is to have the default subtarget implementation defer to the system
model defined by the target. With this change, the default MCSubtargetInfo
implementation essentially returns the defaults TargetTransformInfoImplBase used
to return. Existing users of TTI defaults will hit the defaults now in
MCSubtargetInfo. Targets that define their own custom TTI implementations won't
use the BasicTTIImpl implementations that route to the subtarget.
Once system models are in place for the targets that use these interfaces, their
custom TTI implementations can be removed.
Differential Revision: https://reviews.llvm.org/D63614
llvm-svn: 374205
Volodymyr Sapsai [Wed, 9 Oct 2019 19:29:13 +0000 (19:29 +0000)]
[ObjC generics] Fix not inheriting type bounds in categories/extensions.
When a category/extension doesn't repeat a type bound, corresponding
type parameter is substituted with `id` when used as a type argument. As
a result, in the added test case it was causing errors like
> type argument 'T' (aka 'id') does not satisfy the bound ('id<NSCopying>') of type parameter 'T'
We are already checking that type parameters should be consistent
everywhere (see `checkTypeParamListConsistency`) and update
`ObjCTypeParamDecl` to have correct underlying type. And when we use the
type parameter as a method return type or a method parameter type, it is
substituted to the bounded type. But when we use the type parameter as a
type argument, we check `ObjCTypeParamType` that ignores the updated
underlying type and remains `id`.
Fix by desugaring `ObjCTypeParamType` to the underlying type, the same
way we are doing with `TypedefType`.
rdar://problem/
54329242
Reviewers: erik.pilkington, ahatanak
Reviewed By: erik.pilkington
Subscribers: jkorous, dexonsmith, ributzka, cfe-commits
Differential Revision: https://reviews.llvm.org/D66696
llvm-svn: 374202
Jonas Devlieghere [Wed, 9 Oct 2019 19:22:02 +0000 (19:22 +0000)]
Re-land "[test] Split LLDB tests into API, Shell & Unit"
The original patch got reverted because it broke `check-lldb` on a clean
build. This fixes that.
llvm-svn: 374201
Michael Liao [Wed, 9 Oct 2019 19:08:52 +0000 (19:08 +0000)]
[mangle] Fix mangling where an extra mangle context is required.
Summary:
- [Itanium C++ ABI][1], for certain contexts like default parameter and
etc., mangling numbering will be local to the particular argument in
which it appears.
- However, for these cases, the mangle numbering context is allocated per
expression evaluation stack entry. That causes, for example, two
lambdas defined/used understand the same default parameter are
numbered as the same value and, in turn, one of them is not generated
at all.
- In this patch, an extra mangle numbering context map is maintained in
the AST context to map taht extra declaration context to its numbering
context. So that, 2 different lambdas defined/used in the same default
parameter are numbered differently.
[1]: https://itanium-cxx-abi.github.io/cxx-abi/abi.html
Reviewers: rsmith, eli.friedman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68715
llvm-svn: 374200
Yaxun Liu [Wed, 9 Oct 2019 18:46:43 +0000 (18:46 +0000)]
[HIP] Fix -save-temps
Currently clang does not save some of the intermediate file generated during device compilation for HIP when -save-temps is specified.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D68665
llvm-svn: 374198
Lawrence D'Anna [Wed, 9 Oct 2019 18:43:03 +0000 (18:43 +0000)]
protect libedit and LLDB gui from receiving null FILE* streams
Summary:
We now have valid files that will return NULL from GetStream().
libedit and the LLDB gui are the only places left that need FILE*
streams. Both are doing curses-like user interaction that only
make sense with a real terminal anyway, so there is no need to convert
them off of their use of FILE*. But we should check for null streams
before enabling these features.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: JDevlieghere, labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68677
llvm-svn: 374197
David Blaikie [Wed, 9 Oct 2019 18:37:13 +0000 (18:37 +0000)]
DebugInfo: Shot in the dark attempt to fix ubsan error from r374122
(specifying an underlying type for the enum might also be suitable - but
this seems better/as good, since there's a clear expectation this can
contain values other than the actual enumerators of this enum)
llvm-svn: 374196
Cameron Desrochers [Wed, 9 Oct 2019 18:27:33 +0000 (18:27 +0000)]
[LLDB] Fix for synthetic children memory leak
The lifetime of a ValueObject and all its derivative ValueObjects (children, clones, etc.) is managed by a ClusterManager. These objects are only destroyed when every shared pointer to any of the managed objects in the cluster is destroyed. This means that no object in the cluster can store a shared pointer to another object in the cluster without creating a memory leak of the entire cluster. However, some of the synthetic children front-end implementations do exactly this; this patch fixes that.
Differential Revision: https://reviews.llvm.org/D68641
llvm-svn: 374195
Julian Lettner [Wed, 9 Oct 2019 18:23:30 +0000 (18:23 +0000)]
[lit] Refactor ProgressDisplay
Move progress display to separate file. Simplify some code paths.
Decouple from other components via progress callback. Remove unused
`_Display` class.
Reviewed By: serge-sans-paille
Differential Revision: https://reviews.llvm.org/D68525
llvm-svn: 374194
Antonio Afonso [Wed, 9 Oct 2019 18:02:59 +0000 (18:02 +0000)]
Update breakpad lit test to be independent of the unnamed symbol number
llvm-svn: 374192
Eli Friedman [Wed, 9 Oct 2019 17:57:59 +0000 (17:57 +0000)]
[ARM] Fix arm_neon.h with -flax-vector-conversions=none
Really, we were already 99% of the way there; just needed a couple minor
fixes that affected 64-bit-only builtins. Based on D61717.
Note that the change to builtin_str changes the type of a few
__builtin_neon_* intrinsics that had the "wrong" type.
Fixes https://bugs.llvm.org/show_bug.cgi?id=43341
Differential Revision: https://reviews.llvm.org/D68683
llvm-svn: 374191
Sanjay Patel [Wed, 9 Oct 2019 17:52:26 +0000 (17:52 +0000)]
[InstCombine] add another test for gep inbounds; NFC
llvm-svn: 374190
Thomas Lively [Wed, 9 Oct 2019 17:45:47 +0000 (17:45 +0000)]
[WebAssembly] Add builtin and intrinsic for v8x16.swizzle
Summary:
This clang builtin and corresponding LLVM intrinsic are necessary to
expose the exact semantics of the underlying WebAssembly instruction
to users. LLVM produces a poison value if the dynamic swizzle indices
are greater than the vector size, but the WebAssembly instruction sets
the corresponding output lane to zero. Users who depend on this
behavior can safely use this builtin.
Depends on D68527.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D68531
llvm-svn: 374189
Thomas Lively [Wed, 9 Oct 2019 17:39:19 +0000 (17:39 +0000)]
[WebAssembly] v8x16.swizzle and rewrite BUILD_VECTOR lowering
Summary:
Adds the new v8x16.swizzle SIMD instruction as specified at
https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#swizzling-using-variable-indices.
In addition to adding swizzles as a candidate lowering in
LowerBUILD_VECTOR, also rewrites and simplifies the lowering to
minimize the number of replace_lanes necessary rather than trying to
minimize code size. This leads to more uses of v128.const instead of
splats, which is expected to increase performance.
The new code will be easier to tune once V8 implements all the vector
construction operations, and it will also be easier to add new
candidate instructions in the future if necessary.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68527
llvm-svn: 374188
Adrian Prantl [Wed, 9 Oct 2019 17:35:43 +0000 (17:35 +0000)]
Revert [test] Split LLDB tests into API, Shell & Unit
as it appears to have broken check-lldb.
This reverts r374184 (git commit
22314179f0660c172514b397060fd8f34b586e82)
llvm-svn: 374187
Kevin P. Neal [Wed, 9 Oct 2019 17:24:56 +0000 (17:24 +0000)]
[FPEnv][NFC] Change test to conform to strictfp attribute rules.
In particular, the function definition is not marked strictfp despite
containing a function marked strictfp. Also, if any function call is marked
strictfp then all function calls in that function must be marked.
This change to move the one strictfp call to a new properly marked function
meets all the new rules.
Tested with a stricter version of D68233.
Reviewed by: spatel
Approved by: spatel
Differential Revision: https://reviews.llvm.org/D68713
llvm-svn: 374186
Adrian Prantl [Wed, 9 Oct 2019 16:55:27 +0000 (16:55 +0000)]
Remove obsolete parameter.
llvm-svn: 374185
Jonas Devlieghere [Wed, 9 Oct 2019 16:38:47 +0000 (16:38 +0000)]
[test] Split LLDB tests into API, Shell & Unit
LLDB has three major testing strategies: unit tests, tests that exercise
the SB API though dotest.py and what we currently call lit tests. The
later is rather confusing as we're now using lit as the driver for all
three types of tests. As most of this grew organically, the directory
structure in the LLDB repository doesn't really make this clear.
The 'lit' tests are part of the root and among these tests there's a
Unit and Suite folder for the unit and dotest-tests. This layout makes
it impossible to run just the lit tests.
This patch changes the directory layout to match the 3 testing
strategies, each with their own directory and their own configuration
file. This means there are now 3 directories under lit with 3
corresponding targets:
- API (check-lldb-api): Test exercising the SB API.
- Shell (check-lldb-shell): Test exercising command line utilities.
- Unit (check-lldb-unit): Unit tests.
Finally, there's still the `check-lldb` target that runs all three test
suites.
Finally, this also renames the lit folder to `test` to match the LLVM
repository layout.
Differential revision: https://reviews.llvm.org/D68606
llvm-svn: 374184
Sanjay Patel [Wed, 9 Oct 2019 16:32:49 +0000 (16:32 +0000)]
[SLP] respect target register width for GEP vectorization (PR43578)
We failed to account for the target register width (max vector factor)
when vectorizing starting from GEPs. This causes vectorization to
proceed to obviously illegal widths as in:
https://bugs.llvm.org/show_bug.cgi?id=43578
For x86, this also means that SLP can produce rogue AVX or AVX512
code even when the user specifies a narrower vector width.
The AArch64 test in ext-trunc.ll appears to be better using the
narrower width. I'm not exactly sure what getelementptr.ll is trying
to do, but it's testing with "-slp-threshold=-18", so I'm not worried
about those diffs. The x86 test is an over-reduction from SPEC h264;
this patch appears to restore the perf loss caused by SLP when using
-march=haswell.
Differential Revision: https://reviews.llvm.org/D68667
llvm-svn: 374183
Momchil Velikov [Wed, 9 Oct 2019 16:31:50 +0000 (16:31 +0000)]
[AArch64] Ensure no tagged memory is left in the unallocated portion of the
stack
This patch makes sure that if we tag some memory, we untag that memory before
the function returns/throws via any exit, reachable from the tag operation. For
that we place the untag operation either at:
a) the lifetime end call for the alloca, if that call post-dominates the
lifetime start call (where the tag operation is placed), or it (the
lifetime end call) dominates all reachable exits, otherwise
b) at the reachable exits
Differential Revision: https://reviews.llvm.org/D68469
llvm-svn: 374182
Jason Liu [Wed, 9 Oct 2019 16:24:25 +0000 (16:24 +0000)]
[NFC] Remove files got accidentally upload in llvm-svn 374179
llvm-svn: 374181
Adrian Prantl [Wed, 9 Oct 2019 16:22:14 +0000 (16:22 +0000)]
Remove the is_mangled flag from Mangled and Symbol
Testing whether a name is mangled or not is extremely cheap and can be
done by looking at the first two characters. Mangled knows how to do
it. On the flip side, many call sites that currently pass in an
is_mangled determination do not know how to correctly do it (for
example, they leave out Swift mangling prefixes).
This patch removes this entry point and just forced Mangled to
determine the mangledness of a string itself.
Differential Revision: https://reviews.llvm.org/D68674
llvm-svn: 374180
Jason Liu [Wed, 9 Oct 2019 16:19:39 +0000 (16:19 +0000)]
[AIX][XCOFF][NFC] Change the SectionLen field name of CSect Auxiliary entry to SectionOrLength.
Summary:
According the the XCOFF document,
If
Then
XTY_SD
x_scnlen contains the csect length.
XTY_LD
x_scnlen contains the symbol table index of the containing csect.
XTY_CM
x_scnlen contains the csect length.
XTY_ER
x_scnlen contains 0.
Change the SectionLen member name to SectionOrLength is more reasonable.
Authored By: DiggerLin
Reviewed By: hubert.reinterpretcast
Differential Revision: https://reviews.llvm.org/D68650
llvm-svn: 374179