Nemanja Ivanovic [Fri, 10 May 2019 16:03:22 +0000 (16:03 +0000)]
Pull r360426 as it is breaking the build bots.
llvm-svn: 360437
Robert Lougher [Fri, 10 May 2019 15:55:06 +0000 (15:55 +0000)]
[X86] Avoid SFB - Fix inconsistent codegen with/without debug info
Fixes https://bugs.llvm.org/show_bug.cgi?id=40969
The functions findPotentiallyBlockedCopies and buildCopy are currently not
accounting for the presence of debug instructions. In the former this results
in the optimization not being trigerred, and in the latter results in
inconsistent codegen.
This patch enables the optimization to be performed in a debug build and
ensures the codegen is consistent with non-debug builds.
Patch by Chris Dawson.
Differential Revision: https://reviews.llvm.org/D61680
llvm-svn: 360436
Simon Pilgrim [Fri, 10 May 2019 15:46:04 +0000 (15:46 +0000)]
[X86][SSE] Add getHopForBuildVector vector splitting
If we only use the lower xmm of a ymm hop, then extract the xmm's (for free), perform the xmm hop and then insert back into a ymm (for free).
Fixes some of the regressions noted in D61782
llvm-svn: 360435
Nemanja Ivanovic [Fri, 10 May 2019 15:44:56 +0000 (15:44 +0000)]
Another attempt to fix the build bot breaks after r360426
The test case checks were produced by the update_test_checks.py
scripts and I assumed that is sufficient. However, the behaviour
is different with different default target triples. Specify the
triple explicitly in the test case.
If this doesn't clean up the build bot breaks, I'll remove the test
case until I can get to the bottom of why the behaviour on build bots
is different from my machine.
llvm-svn: 360434
Nemanja Ivanovic [Fri, 10 May 2019 15:11:40 +0000 (15:11 +0000)]
Fix build break after r360426
llvm-svn: 360433
Pavel Labath [Fri, 10 May 2019 15:05:26 +0000 (15:05 +0000)]
minidump: Don't eagerly resolve module paths read from the minidump
This can cause us to return paths to files on the local filesystem even
if we don't end up using that file (for instance because the file is not
a real module).
llvm-svn: 360432
Michael Liao [Fri, 10 May 2019 14:57:42 +0000 (14:57 +0000)]
[InferAddressSpaces] Enhance the handling of cosntexpr.
Summary:
- Constant expressions may not be added in strict postorder as the
forward instruction scan order. Thus, for a constant express (CE0), if
its operand (CE1) is used in an previous instruction, they are not in
postorder. However, different from
`cloneInstructionWithNewAddressSpace`,
`cloneConstantExprWithNewAddressSpace` doesn't bookkeep uninferred
instructions for later resolving. That results in failure of inferring
constant address.
- This patch adds the support to infer constant expression operand
recursively, since there won't be loop, if that operand is another
constant expression.
Reviewers: arsenm
Subscribers: jholewinski, jvesely, wdng, nhaehnle, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61760
llvm-svn: 360431
Nico Weber [Fri, 10 May 2019 14:15:13 +0000 (14:15 +0000)]
Fix some gcc warnings in compiler-rt
- Several "warning: extra ';' [-Wpedantic]"
- One "C++ style comments are not allowed in ISO C90 [enabled by default]"
in a file that uses C style comments everywhere but in one place
llvm-svn: 360430
Lei Huang [Fri, 10 May 2019 14:04:06 +0000 (14:04 +0000)]
[PowerPC] custom lower `v2f64 fpext v2f32`
Reduces scalarization overhead via custom lowering of v2f64 fpext v2f32.
eg. For the following IR
%0 = load <2 x float>, <2 x float>* %Ptr, align 8
%1 = fpext <2 x float> %0 to <2 x double>
ret <2 x double> %1
Pre custom lowering:
ld r3, 0(r3)
mtvsrd f0, r3
xxswapd vs34, vs0
xscvspdpn f0, vs0
xxsldwi vs1, vs34, vs34, 3
xscvspdpn f1, vs1
xxmrghd vs34, vs0, vs1
After custom lowering:
lfd f0, 0(r3)
xxmrghw vs0, vs0, vs0
xvcvspdp vs34, vs0
Differential Revision: https://reviews.llvm.org/D57857
llvm-svn: 360429
Nikolai Kosjar [Fri, 10 May 2019 13:58:34 +0000 (13:58 +0000)]
[libclang] Forward isInline for NamespaceDecl to libclang
llvm-svn: 360428
Nico Weber [Fri, 10 May 2019 13:56:56 +0000 (13:56 +0000)]
Add name comments for bools passed to getObjCEncodingForTypeImpl()
No behavior change. Medium term, probably want to use a bitmask instead
of 8 distinct bool parameters, but let's make the call sites easier to
read first.
llvm-svn: 360427
Nemanja Ivanovic [Fri, 10 May 2019 13:47:00 +0000 (13:47 +0000)]
[Pass Pipeline][NFC] Add a test prior to committing D61726
This patch just adds a test case to show the differences in code emitted
by opt before and after https://reviews.llvm.org/D61726.
llvm-svn: 360426
Paul Robinson [Fri, 10 May 2019 13:40:17 +0000 (13:40 +0000)]
Replace lit feature keyword 'non-ms-sdk' with 'ms-sdk'; eliminate
'non-ps4-sdk' and use just 'ps4'.
llvm-svn: 360425
Cameron McInally [Fri, 10 May 2019 13:18:57 +0000 (13:18 +0000)]
Pre-commit InstCombine::visitFNeg(...) test.
llvm-svn: 360424
Michal Gorny [Fri, 10 May 2019 13:12:36 +0000 (13:12 +0000)]
[lldb] [lit] Fix clobbers in x86_64 register test
llvm-svn: 360423
James Henderson [Fri, 10 May 2019 12:58:52 +0000 (12:58 +0000)]
[llvm-objcopy] Add additional testing for various cases
This patch adds a number of tests to test various cases not covered by
existing tests. All of them work correctly, with no need to change
llvm-objcopy itself, although some do indicate possible areas for
improvement.
Reviewed by: MaskRay
Differential Revision: https://reviews.llvm.org/D61727
llvm-svn: 360422
Tim Northover [Fri, 10 May 2019 11:23:04 +0000 (11:23 +0000)]
SelectionDAG: accommodate atomic floating stores.
We were applying a pointer truncation to floating types, which crashed LLVM.
That is Not A Good Thing(TM).
llvm-svn: 360421
Fangrui Song [Fri, 10 May 2019 10:47:30 +0000 (10:47 +0000)]
[Object] Fix macho-invalid.test
llvm-svn: 360420
Simon Pilgrim [Fri, 10 May 2019 10:36:37 +0000 (10:36 +0000)]
Fix Wdocumentation warning. NFCI.
llvm-svn: 360419
Nikolai Kosjar [Fri, 10 May 2019 10:25:35 +0000 (10:25 +0000)]
[Preamble] Stop circular inclusion of main file when building preamble
If a header file was processed for the second time, we could end up with a
wrong conditional stack and skipped ranges:
In the particular example, if the header guard is evaluated the second time and
it is decided to skip the conditional block, the corresponding "#endif" is
never seen since the preamble does not include it and we end up in the
Tok.is(tok::eof) case with a wrong conditional stack.
Detect the circular inclusion, emit a diagnostic and stop processing the
inclusion.
llvm-svn: 360418
Simon Pilgrim [Fri, 10 May 2019 10:22:13 +0000 (10:22 +0000)]
[cmake] Remove MSVC C4800 override
Remove C4800 : ''type' : forcing value to bool 'true' or 'false' (performance warning)' from the list of forced disabled warnings.
I'm not seeing any regressions in VS2017/VS2019 llvm/clang builds from removing this.
Differential Revision: https://reviews.llvm.org/D61730
llvm-svn: 360417
Fangrui Song [Fri, 10 May 2019 10:19:08 +0000 (10:19 +0000)]
[Object] Move ELF specific ObjectFile::getBuildAttributes to ELFObjectFileBase
Change the return type from std::error_code to Error and make the
function protected.
llvm-svn: 360416
Jeremy Morse [Fri, 10 May 2019 10:03:41 +0000 (10:03 +0000)]
[DebugInfo] Use zero linenos for debug intrinsics when promoting dbg.declare
In certain circumstances, optimizations pick line numbers from debug
intrinsic instructions as the new location for altered instructions. This
is problematic because the line number of a debugging intrinsic is
meaningless (it doesn't produce any machine instruction), only the scope
information is valid. The result can be the line number of a variable
declaration "leaking" into real code from debugging intrinsics, making the
line table un-necessarily jumpy, and potentially different with / without
variable locations.
Fix this by using zero line numbers when promoting dbg.declare intrinsics
into dbg.values: this is safe for debug intrinsics as their line numbers
are meaningless, and reduces the scope for damage / misleading stepping
when optimizations pick locations from the wrong place.
Differential Revision: https://reviews.llvm.org/D59272
llvm-svn: 360415
Fangrui Song [Fri, 10 May 2019 09:59:04 +0000 (09:59 +0000)]
[Object] Change SymbolicFile::printSymbolName to use Error
llvm-svn: 360414
Simon Pilgrim [Fri, 10 May 2019 09:54:42 +0000 (09:54 +0000)]
[cmake] Remove MSVC C4355 override
Remove C4355 : ''this' : used in base member initializer list' from the list of forced disabled warnings.
I'm not seeing any regressions in VS2017/VS2019 llvm/clang builds from removing this.
Differential Revision: https://reviews.llvm.org/D61757
llvm-svn: 360413
Pavel Labath [Fri, 10 May 2019 09:36:11 +0000 (09:36 +0000)]
Minidump: use ThreadList parsing code from llvm/Object
llvm-svn: 360412
Krasimir Georgiev [Fri, 10 May 2019 09:15:11 +0000 (09:15 +0000)]
Revert "Revert "[clang-format] Keep protobuf "package" statement on one line""
Summary:
Top-level "package" and "import" statements should generally be kept on
one line, for all languages.
----
This reverts commit rL356912.
The regression from rL356835 was fixed via rC358275.
Reviewers: krasimir, sammccall, MyDeveloperDay, xinz, dchai, klimek
Reviewed By: krasimir, xinz, dchai
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D60661
llvm-svn: 360411
Eric Christopher [Fri, 10 May 2019 07:58:47 +0000 (07:58 +0000)]
Remove an unnecessary header from SROA.h.
llvm-svn: 360410
Pavel Labath [Fri, 10 May 2019 07:54:37 +0000 (07:54 +0000)]
FuncUnwinders: Add a new "SymbolFile" unwind plan
Summary:
some unwind formats are specific to a single symbol file and so it does
not make sense for their parsing code live in the general Symbol library
(as is the case with eh_frame for instance). This is the case for the
unwind information in breakpad files, but the same will probably be true
for PDB unwind info (once we are able to parse that).
This patch adds the ability to fetch an unwind plan provided by a symbol
file plugin, as discussed in the RFC at
<http://lists.llvm.org/pipermail/lldb-dev/2019-February/014703.html>.
I've kept the set of changes to a minimum, as there is no way to test
them until we have a symbol file which implements this API -- that is
comming in a follow-up patch, which will also implicitly test this
change.
The interesting part here is the introduction of the
"RegisterInfoResolver" interface. The reason for this is that breakpad
needs to be able to resolve register names (which are present as strings
in the file) into register enums so that it can construct the unwind
plan. This is normally done via the RegisterContext class, handing this
over to the SymbolFile plugin would mean that it has full access to the
debugged process, which is not something we want it to have. So instead,
I create a facade, which only provides the ability to query register
names, and hide the RegisterContext behind the facade.
Also note that this only adds the ability to dump the unwind plan
created by the symbol file plugin -- the plan is not used for unwinding
yet -- this will be added in a third patch, which will add additional
tests which makes sure the unwinding works as a whole.
Reviewers: jasonmolenda, clayborg
Subscribers: markmentovai, amccarth, lldb-commits
Differential Revision: https://reviews.llvm.org/D61732
llvm-svn: 360409
Fangrui Song [Fri, 10 May 2019 06:59:50 +0000 (06:59 +0000)]
Delete write-only HasQualifiers after rC360370
llvm-svn: 360408
Pavel Labath [Fri, 10 May 2019 06:57:25 +0000 (06:57 +0000)]
Revert "Disable the step over skipping calls feature since buildbots are not happy."
While this fixed the windows bot failures, it also broke all other bots.
Upon closer inspection, it turns out that the windows bots were "broken"
because two tests were unexpectedly passing -- i.e., the original patch
(r360375) actually improved our stepping support on windows.
So instead, I remove the relevant XFAILs.
This reverts commit r360397.
llvm-svn: 360407
Dmitri Gribenko [Fri, 10 May 2019 06:39:20 +0000 (06:39 +0000)]
Added an assert in `isConstantInitializer`: initializer lists must be in semantic form
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61485
llvm-svn: 360406
Fangrui Song [Fri, 10 May 2019 05:51:00 +0000 (05:51 +0000)]
[PPC64] Define getThunkSectionSpacing() based on the range of R_PPC64_REL24
Suggested by Sean Fertile and Peter Smith.
Thunk section spacing decrease the total number of thunks. I measured a
decrease of 1% or less in some large programs, with no perceivable
slowdown in link time. Override getThunkSectionSpacing() to enable it.
0x2000000 is the farthest point R_PPC64_REL24 can reach. I tried several
numbers and found 0x2000000 works the best. Numbers near 0x2000000 work
as well but let's just use the simpler number.
As demonstrated by the updated tests, this essentially changes placement
of most thunks to the end of the output section. We leverage this
property to fix PR40740 reported by Alfredo Dal'Ava JĂșnior:
The output section .init consists of input sections from several object
files (crti.o crtbegin.o crtend.o crtn.o). Sections other than the last
one do not have a terminator. With this patch, we create the thunk after
the last .init input section and thus fix the issue. This is not
foolproof but works quite well for such sections (with no terminator) in
practice.
Reviewed By: ruiu, sfertile
Differential Revision: https://reviews.llvm.org/D61720
llvm-svn: 360405
Akira Hatanaka [Fri, 10 May 2019 02:16:37 +0000 (02:16 +0000)]
Assume `__cxa_allocate_exception` returns an under-aligned memory on
Darwin if the version of libc++abi isn't new enough to include the fix
in r319123
This patch resurrects r264998, which was committed to work around a bug
in libc++abi that was causing _cxa_allocate_exception to return a memory
that wasn't double-word aligned.
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-
20160328/154332.html
In addition, this patch makes clang issue a warning if the type of the
thrown object requires an alignment that is larger than the minimum
guaranteed by the target C++ runtime.
rdar://problem/
49864414
Differential Revision: https://reviews.llvm.org/D61667
llvm-svn: 360404
Fangrui Song [Fri, 10 May 2019 02:08:21 +0000 (02:08 +0000)]
Change -gz and -Wa,--compress-debug-sections to use gABI compression (SHF_COMPRESSED)
Since July 15, 2015 (binutils-gdb commit
19a7fe52ae3d0971e67a134bcb1648899e21ae1c, included in 2.26), gas
--compress-debug-sections=zlib (gcc -gz) means zlib-gabi:
SHF_COMPRESSED. Before that it meant zlib-gnu (.zdebug).
clang's -gz was introduced in rC306115 (Jun 2017) to indicate zlib-gnu. It
is 2019 now and it is not unreasonable to assume users of the new
feature to have new linkers (ld.bfd/gold >= 2.26, lld >= rLLD273661).
Change clang's default accordingly to improve standard conformance.
zlib-gnu becomes out of fashion and gets poorer toolchain support.
Its mangled names confuse tools and are more likely to cause problems.
Reviewed By: compnerd
Differential Revision: https://reviews.llvm.org/D61689
llvm-svn: 360403
Sam Clegg [Fri, 10 May 2019 01:52:08 +0000 (01:52 +0000)]
[WebAssembly] Don't assume that strongly defined symbols are DSO-local
The current PIC model for WebAssembly is more like ELF in that it
allows symbol interposition.
This means that more functions end up being addressed via the GOT
and fewer directly added to the wasm table.
One effect is a reduction in the number of wasm table entries similar
to the previous attempt in https://reviews.llvm.org/D61539 which was
reverted.
Differential Revision: https://reviews.llvm.org/D61772
llvm-svn: 360402
Sam Clegg [Fri, 10 May 2019 01:45:34 +0000 (01:45 +0000)]
[WebAssembly] Remove friend18.C from list of known gcc torture test failures. NFC.
Differential Revision: https://reviews.llvm.org/D61775
llvm-svn: 360401
Kostya Serebryany [Fri, 10 May 2019 01:34:26 +0000 (01:34 +0000)]
[libFuzzer] code refactoring; NFC
llvm-svn: 360400
Kostya Serebryany [Fri, 10 May 2019 00:59:32 +0000 (00:59 +0000)]
[libFuzzer] small refactoring in the driver; dummy implementation of collect_data_flow; attempt to fix the windows bot
llvm-svn: 360399
Jonas Devlieghere [Fri, 10 May 2019 00:23:02 +0000 (00:23 +0000)]
[Docs] Fix table formatting in Pytho reference
llvm-svn: 360398
Greg Clayton [Fri, 10 May 2019 00:13:03 +0000 (00:13 +0000)]
Disable the step over skipping calls feature since buildbots are not happy.
llvm-svn: 360397
Mircea Trofin [Fri, 10 May 2019 00:12:51 +0000 (00:12 +0000)]
[llvm] X86DiscriminateMemOps: insert debug info when missing
Reviewers: davidxl
Reviewed By: davidxl
Subscribers: aprantl, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61735
llvm-svn: 360396
Stanislav Mekhanoshin [Fri, 10 May 2019 00:09:01 +0000 (00:09 +0000)]
[AMDGPU] Pattern for v_xor3_b32
This also allows three op patterns to use increased constant bus
limit of GFX10.
Differential Revision: https://reviews.llvm.org/D61763
llvm-svn: 360395
Petr Hosek [Thu, 9 May 2019 23:42:58 +0000 (23:42 +0000)]
[compiler-rt] Migrate to _zx_clock_get_new/_zx_clock_get_monotonic
This is part of the soft-transition to the new _zx_clock_get signature.
Differential Revision: https://reviews.llvm.org/D61768
llvm-svn: 360394
Philip Reames [Thu, 9 May 2019 23:23:42 +0000 (23:23 +0000)]
[X86] Improve lowering of idemptotent RMW operations
The current lowering uses an mfence. mfences are substaintially higher latency than the locked operations originally requested, but we do want to avoid contention on the original cache line. As such, use a locked instruction on a cache line assumed to be thread local.
Differential Revision: https://reviews.llvm.org/D58632
llvm-svn: 360393
Lang Hames [Thu, 9 May 2019 23:17:41 +0000 (23:17 +0000)]
[JITLink] Fixed a signedness bug when processing X86_64_RELOC_SUBTRACTOR.
Subtractor relocation addends are signed, so we need to read them via signed
int pointers. Accidentally treating 32-bit addends as unsigned leads to
out-of-range errors when we try to add very large (>INT32_MAX) bogus addends.
llvm-svn: 360392
Philip Reames [Thu, 9 May 2019 23:13:09 +0000 (23:13 +0000)]
Compile time tweak for libcall lookup
If we have a large module which is mostly intrinsics, we hammer the lib call lookup path from CodeGenPrepare. Adding a fastpath reduces compile by 15% for one such example.
The problem is really more general than intrinsics - a module with lots of non-intrinsics non-libcall calls has the same problem - but we might as well avoid an easy case quickly.
llvm-svn: 360391
Matt Morehouse [Thu, 9 May 2019 22:48:46 +0000 (22:48 +0000)]
[libFuzzer] Unpoison parameters before calling user callback.
Summary:
Fixes an MSan false positive when compiling with
-fsanitize=memory,fuzzer.
See https://github.com/google/oss-fuzz/issues/2369 for more details.
Reviewers: kcc
Reviewed By: kcc
Subscribers: llvm-commits, metzman, eugenis
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61753
llvm-svn: 360390
Leonard Chan [Thu, 9 May 2019 22:48:30 +0000 (22:48 +0000)]
[NFC][compiler-rt][builtins] Tidy and match comments for floating point operations
Differential Revision: https://reviews.llvm.org/D61762
llvm-svn: 360389
Julian Lettner [Thu, 9 May 2019 22:47:19 +0000 (22:47 +0000)]
[TSan][libdispatch] Enable test that supposedly deadlocks on bot
Re-enable test that was disabled because it deadlocks when running on
the bot, but was never enabled again. Can't reproduce deadlock locally
so trying to investigate by re-enabling test.
llvm-svn: 360388
Richard Smith [Thu, 9 May 2019 22:22:48 +0000 (22:22 +0000)]
Remember to decay arrays to pointers before checking whether the
left-hand side of an -> operator is a pointer to class type.
llvm-svn: 360387
Jonas Devlieghere [Thu, 9 May 2019 22:14:14 +0000 (22:14 +0000)]
[Docs] Port python reference page
I somehow forgot to port over this page from the old website. Thank you
Jim for the heads up!
llvm-svn: 360386
Kostya Serebryany [Thu, 9 May 2019 22:09:25 +0000 (22:09 +0000)]
[libFuzzer] perform more agressive value profiling in memcmp
llvm-svn: 360385
Lang Hames [Thu, 9 May 2019 22:03:58 +0000 (22:03 +0000)]
[ORC] Simplify logic for updating edges when should-discard atoms are pruned.
llvm-svn: 360384
Lang Hames [Thu, 9 May 2019 22:03:57 +0000 (22:03 +0000)]
[JITLink] Improve/fix some JITLink debugging output.
Adds full edge details (rather than just edge targets) when out-of-range errors
are generated. Also fixes a bug where debugging output accessed an invalidated
DenseMap iterator by moving the debugging output above the invalidation point.
llvm-svn: 360383
Lang Hames [Thu, 9 May 2019 22:03:53 +0000 (22:03 +0000)]
[ORC] Fix a formatting bug.
llvm-svn: 360382
Bill Wendling [Thu, 9 May 2019 21:57:44 +0000 (21:57 +0000)]
Add ".dword" directive
Summary:
The ".dword" directive is a synonym for ".xword" and is used used
by klibc, a minimalistic libc subset for initramfs.
Reviewers: t.p.northover, nickdesaulniers
Reviewed By: nickdesaulniers
Subscribers: nickdesaulniers, javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61719
llvm-svn: 360381
Caroline Tice [Thu, 9 May 2019 21:53:33 +0000 (21:53 +0000)]
llvm-dwarfdump: Add dwo parsing to --statistics.
Add check for, and parsing of, .dwo files to Statistics.cpp; create a new getNon
SkeletonUnitDie function for DWARFUnit.h
Reviewers: dblaikie
Differential Revision: https://review.llvm.org/D61755
llvm-svn: 360380
Matt Morehouse [Thu, 9 May 2019 21:50:57 +0000 (21:50 +0000)]
[MSan] Introduce __msan_unpoison_param().
Summary:
This allows libFuzzer to unpoison parameter shadow before calling
LLVMFuzzerTestOneInput to eliminate the false positives described
in https://github.com/google/oss-fuzz/issues/2369.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: llvm-commits, metzman, kcc
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61751
llvm-svn: 360379
Kostya Serebryany [Thu, 9 May 2019 21:29:45 +0000 (21:29 +0000)]
[libFuzzer] implement -focus_function=auto, to be used with Data Flow Traces
llvm-svn: 360378
David Blaikie [Thu, 9 May 2019 21:23:40 +0000 (21:23 +0000)]
DebugInfo/DWARF: Minor expression simplification
llvm-svn: 360377
Reid Kleckner [Thu, 9 May 2019 21:21:22 +0000 (21:21 +0000)]
[COFF] Simplify Chunk::writeTo and remove OutputSectionOff, NFC
Summary:
Prior to this change, every implementation of writeTo would add
OutputSectionOff to the output section buffer start before writing data.
Instead, do this math in the caller, so that it can be written once
instead of many times.
The output section offset is always equivalent to the difference between
the chunk RVA and the output section RVA, so we can replace the one
remaining usage of OutputSectionOff with that subtraction.
This doesn't change the size of SectionChunk because of alignment
requirements, but I will rearrange the fields in a follow-up change to
accomplish that.
Reviewers: ruiu, aganea
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61696
llvm-svn: 360376
Greg Clayton [Thu, 9 May 2019 20:39:34 +0000 (20:39 +0000)]
Improve step over performance by not stopping at branches that are function calls and stepping into and them out of each one
Currently when we single step over a source line, we run and stop at every branch in the source line range. We can reduce the number of times we stop when stepping over by figuring out if any of these branches are function calls, and if so, ignore these branches. Since we are stepping over we can safely ignore these calls since they will return to the next instruction. Currently the step logic would stop at those branches (1st stop), single step into the branch (2nd stop), and then set a breakpoint at the return address (3rd stop), and then continue.
Differential Revision: https://reviews.llvm.org/D58678
llvm-svn: 360375
Alex Lorenz [Thu, 9 May 2019 20:35:41 +0000 (20:35 +0000)]
NFC, make XFAIL work on macOS correctly for test/Driver/XRay/xray-instrument-os.c
The test 'test/Driver/XRay/xray-instrument-os.c' is supposed to XFAIL on -darwin triples.
However, LLVM can be configured to be built with a -macos triple instead, which is equivalent
to -darwin. This commit updates the XFAIL condition to also XFAIL with a -macos host triple.
llvm-svn: 360374
Stella Stamenova [Thu, 9 May 2019 20:22:02 +0000 (20:22 +0000)]
Use UNSUPPORTED: windows in shtest-timeout.py. Apparently system-windows does not cover all cases either and the case it doesn't cover affects one of the buildbots.
llvm-svn: 360373
Kostya Serebryany [Thu, 9 May 2019 20:20:36 +0000 (20:20 +0000)]
[libFuzzer] simplify value-profile-mem.test a little bit
llvm-svn: 360372
Stella Stamenova [Thu, 9 May 2019 19:49:26 +0000 (19:49 +0000)]
Fix TestVSCode_attach on Linux
The test is failing sometimes because the debugger is failing to attach for lack of permissions. The fix is to call lldb_enable_attach inside the inferior main function
llvm-svn: 360371
Richard Smith [Thu, 9 May 2019 19:45:49 +0000 (19:45 +0000)]
DR1872: don't allow any calls to virtual functions in constant
evaluation.
Not even in cases where we would not actually perform virtual dispatch.
llvm-svn: 360370
Richard Smith [Thu, 9 May 2019 19:45:46 +0000 (19:45 +0000)]
Simplify tracking of end of consumed decl-specifier sequence.
Patch by Tyker!
Differential Revision: https://reviews.llvm.org/D60934
llvm-svn: 360369
Stella Stamenova [Thu, 9 May 2019 19:40:21 +0000 (19:40 +0000)]
Use UNSUPPORTED: system-windows instead of REQUIRES: nowindows or UNSUPPORTED: windows. nowindows is not currently defined and windows does not cover all cases. system-windows is also consistent with how other platforms are used.
llvm-svn: 360368
Sam Clegg [Thu, 9 May 2019 19:34:32 +0000 (19:34 +0000)]
Revert "[WebAssembly] Don't generate unused table entries."
This reverts commit
b33fdb7768e5de5fbeb23f65d8d455e7ca88b021.
This change apparently broke am emscripten test.
llvm-svn: 360367
Cameron McInally [Thu, 9 May 2019 19:28:52 +0000 (19:28 +0000)]
[CodeGen] Add comment about FSUB <-> FNEG xforms
Differential Revision: https://reviews.llvm.org/D61741
llvm-svn: 360366
Alexey Bataev [Thu, 9 May 2019 18:44:53 +0000 (18:44 +0000)]
[OPENMP]Fix PR41767: diagnose DSA for variables in clauses with default(none).
If the combined directive has default(none) clause and has clauses for
inner directive that reference some variables, for which data-sharing
attributes are not specified, the error messages should be emitted for
such variables.
llvm-svn: 360365
Stanislav Mekhanoshin [Thu, 9 May 2019 18:38:55 +0000 (18:38 +0000)]
[AMDGPU] gfx1010 v_interp_* instructions
Differential Revision: https://reviews.llvm.org/D61703
llvm-svn: 360364
Akira Hatanaka [Thu, 9 May 2019 18:32:16 +0000 (18:32 +0000)]
Specify target triple to fix the tests I committed in r360359 that are
still failing.
llvm-svn: 360363
Alexey Bataev [Thu, 9 May 2019 18:14:57 +0000 (18:14 +0000)]
[OPENMP]Fix PR41768: check DSA for globals with default(none) clauses.
If the default(none) was specified for the construct, we might miss
diagnostic for the globals without explicitly specified data-sharing
attributes. Patch fixes this problem.
llvm-svn: 360362
Akira Hatanaka [Thu, 9 May 2019 18:05:17 +0000 (18:05 +0000)]
Specify ObjC runtime to fix the tests I committed in r360359 that are
failing.
llvm-svn: 360361
Simon Pilgrim [Thu, 9 May 2019 17:45:01 +0000 (17:45 +0000)]
[X86][SSE] Fold add(shuffle(),shuffle()) to hadd on 'slow' targets (PR39920)
As reported on PR39920, "slow horizontal ops" targets tend to internally expand to 2*shuffle+add/sub - so if we can reduce 2*shuffle+add/sub to a hadd/sub then we should do it - similar port usage but reduced instruction count.
This works out in most cases, although the "PR22377" regression in vector-shuffle-combining.ll is annoying - going from 2*shuffle+add+shuffle to hadd+2*shuffle - I've opened PR41813 to cover this.
Differential Revision: https://reviews.llvm.org/D61308
llvm-svn: 360360
Akira Hatanaka [Thu, 9 May 2019 17:43:52 +0000 (17:43 +0000)]
[CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make
private symbols in the __DATA segment internal.
This prevents the linker from removing the symbol names. Keeping the
symbols visible enables tools to collect various information about the
symbols, for example, tools that discover whether or not a symbol gets
dirtied.
rdar://problem/
48887111
Differential Revision: https://reviews.llvm.org/D61454
llvm-svn: 360359
Dmitri Gribenko [Thu, 9 May 2019 17:08:10 +0000 (17:08 +0000)]
check_clang_tidy.py now passes `-format-style=none` to clang_tidy
Summary:
If the test does not specify a formatting style, force "none"; otherwise
autodetection logic can discover a ".clang-tidy" file that is not
related to the test.
Reviewers: alexfh
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61739
llvm-svn: 360358
Florian Hahn [Thu, 9 May 2019 17:05:52 +0000 (17:05 +0000)]
[DAGCombiner] Limit number of nodes explored as store candidates.
To find the candidates to merge stores we iterate over all nodes in a chain
for each store, which leads to quadratic compile times for large basic blocks
with a large number of stores.
Reviewers: niravd, spatel, craig.topper
Reviewed By: niravd
Differential Revision: https://reviews.llvm.org/D61511
llvm-svn: 360357
Paul Robinson [Thu, 9 May 2019 17:01:03 +0000 (17:01 +0000)]
Re-enable lit test shtest-timeout.py on non-Windows.
It was disabled incorrectly, which meant it wasn't running anywhere.
llvm-svn: 360356
Jorge Gorbe Moya [Thu, 9 May 2019 16:47:07 +0000 (16:47 +0000)]
[lldb] build.py: fix behavior when passing --compiler=/path/to/compiler
All the other paths in the find_toolchain function return a tuple
(detected_toolchain_type, compiler_path), but when the parameter to
--compiler is not one of the predefined names it only returns the
detected toolchain type, which causes an error when trying to unpack the
result.
This patch changes it to return also the compiler path passed as a
parameter.
Differential Revision: https://reviews.llvm.org/D61713
llvm-svn: 360355
Stefan Granitz [Thu, 9 May 2019 16:40:57 +0000 (16:40 +0000)]
[JITLoaderGDB] Set eTypeJIT for objects read from JIT descriptors
Summary:
First part of a fix for JITed code debugging. This has been a regression from 5.0 to 6.0 and it's is still reproducible on current master: https://bugs.llvm.org/show_bug.cgi?id=36209
The address of the breakpoint site is corrupt: the 0x4 value we end up with, looks like an offset on a zero base address. When we parse the ELF section headers from the JIT descriptor, the load address for the text section we find in `header.sh_addr` is correct.
The bug manifests in `VMAddressProvider::GetVMRange(const ELFSectionHeader &)` (follow it from `ObjectFileELF::CreateSections()`). Here we think the object type was `eTypeObjectFile` and unleash some extra logic [1] which essentially overwrites the address with a zero value.
The object type is deduced from the ELF header's `e_type` in `ObjectFileELF::CalculateType()`. It never returns `eTypeJIT`, because the ELF header has no representation for it [2]. Instead the in-memory ELF object states `ET_REL`, which leads to `eTypeObjectFile`. This is what we get from `lli` at least since 3.x. (Might it be better to write `ET_EXEC` on the JIT side instead? In fact, relocations were already applied at this point, so "Relocatable" is not quite exact.)
So, this patch proposes to set `eTypeJIT` explicitly whenever we read from a JIT descriptor. In `ObjectFileELF::CreateSections()` we can then call `GetType()`, which returns the explicit value or otherwise falls back to `CalculateType()`.
LLDB then sets the breakpoint successfully. Next step: debug info.
```
Process 1056 stopped
* thread #1, name = 'lli', stop reason = breakpoint 1.2
frame #0: 0x00007ffff7ff7000 JIT(0x3ba2030)`jitbp()
JIT(0x3ba2030)`jitbp:
-> 0x7ffff7ff7000 <+0>: pushq %rbp
0x7ffff7ff7001 <+1>: movq %rsp, %rbp
0x7ffff7ff7004 <+4>: movabsq $0x7ffff7ff6000, %rdi ; imm = 0x7FFFF7FF6000
0x7ffff7ff700e <+14>: movabsq $0x7ffff6697e80, %rcx ; imm = 0x7FFFF6697E80
```
[1] It was first introduced with https://reviews.llvm.org/D38142#change-lF6csxV8HdlL, which has also been the original breaking change. The code has changed a lot since then.
[2] ELF object types: https://github.com/llvm/llvm-project/blob/
2d2277f5/llvm/include/llvm/BinaryFormat/ELF.h#L110
Reviewers: labath, JDevlieghere, bkoropoff, clayborg, espindola, alexshap, stella.stamenova
Reviewed By: labath, clayborg
Subscribers: probinson, emaste, aprantl, arichardson, MaskRay, AlexDenisov, yurydelendik, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D61611
llvm-svn: 360354
Stanislav Mekhanoshin [Thu, 9 May 2019 16:34:13 +0000 (16:34 +0000)]
[AMDGPU] gfx1010 changes for PAL metadata
Differential Revision: https://reviews.llvm.org/D61704
llvm-svn: 360353
Simon Pilgrim [Thu, 9 May 2019 15:58:16 +0000 (15:58 +0000)]
[llvm-cxxfilt] Fix -Wshadow warning. NFCI.
Local variable Decorated was shadowing the global variable Decorated
llvm-svn: 360352
Andrea Di Biagio [Thu, 9 May 2019 15:18:09 +0000 (15:18 +0000)]
[MCA] Add support for nested and overlapping region markers
This patch fixes PR41523
https://bugs.llvm.org/show_bug.cgi?id=41523
Regions can now nest/overlap provided that they have different names.
Anonymous regions cannot overlap.
Region end markers must specify the region name. The only exception is for when
there is only one user-defined region; in that particular case, the region end
marker doesn't need to specify a name.
Incorrect region end markers are no longer ignored. Instead, the tool reports an
error and we exit with an error code.
Added test cases to verify the new diagnostic error messages.
Updated the llvm-mca docs to reflect this feature change.
Differential Revision: https://reviews.llvm.org/D61676
llvm-svn: 360351
Pavel Labath [Thu, 9 May 2019 15:13:53 +0000 (15:13 +0000)]
MinidumpYAML: add support for the ThreadList stream
Summary:
The implementation is a pretty straightforward extension of the pattern
used for (de)serializing the ModuleList stream. Since there are other
streams which use the same format (MemoryList and MemoryList64, at
least). I tried to generalize the code a bit so that adding future
streams of this type can be done with less code.
Reviewers: amccarth, jhenderson, clayborg
Subscribers: markmentovai, lldb-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61423
llvm-svn: 360350
Kadir Cetinkaya [Thu, 9 May 2019 15:07:53 +0000 (15:07 +0000)]
[clangd] Bump index version and get rid of wrong assertion
Summary:
After rL360344, BackgroundIndex expects symbols with zero refcounts.
Therefore existing index files are no longer valid.
Assertion regarding finding target of a reference was wrong, since
background-index might still be going on or we might've loaded only some part of
the shards and might be missing the declaring shards for the symbol.
Reviewers: ilya-biryukov
Subscribers: MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61734
llvm-svn: 360349
Aaron Ballman [Thu, 9 May 2019 15:06:41 +0000 (15:06 +0000)]
Revert r360345 and r360346, as they are not passing the testbots.
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/48063/steps/test/logs/stdio
llvm-svn: 360348
David Stuttard [Thu, 9 May 2019 15:02:10 +0000 (15:02 +0000)]
[CodeGenPrepare] Limit recursion depth for collectBitParts
Summary:
Seeing some issues for windows debug pathological cases with collectBitParts
recursion (1525 levels of recursion!)
Setting the limit to 64 as this should be sufficient - passes all lit cases
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61728
Change-Id: I7f44cdc6c1badf1c2ccbf1b0c4b6afe27ecb39a1
llvm-svn: 360347
Aaron Ballman [Thu, 9 May 2019 15:00:38 +0000 (15:00 +0000)]
Fixing a link in the release notes to appease the Sphinx bot.
llvm-svn: 360346
Aaron Ballman [Thu, 9 May 2019 14:48:17 +0000 (14:48 +0000)]
Add the modernize-use-trailing-return check to rewrite function signatures to use trailing return types.
Patch by Bernhard Manfred Gruber.
llvm-svn: 360345
Kadir Cetinkaya [Thu, 9 May 2019 14:22:07 +0000 (14:22 +0000)]
[clangd] Count number of references while merging RefSlabs inside FileIndex
Summary:
For counting number of references clangd was relying on merging every
duplication of a symbol. Unfortunately this does not apply to FileIndex(and one
of its users' BackgroundIndex), since we get rid of duplication by simply
dropping symbols coming from non-canonical locations. So only one or two(coming
from canonical declaration header and defined source file, if exists)
replications of the same symbol reaches merging step.
This patch changes reference counting logic to rather count number of different
RefSlabs a given SymbolID exists.
Reviewers: ilya-biryukov
Subscribers: ioeric, MaskRay, jkorous, mgrang, arphaman, jdoerfert, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D59481
llvm-svn: 360344
Nico Weber [Thu, 9 May 2019 14:14:21 +0000 (14:14 +0000)]
gn build: Merge r960255
llvm-svn: 360343
Anastasia Stulova [Thu, 9 May 2019 13:55:44 +0000 (13:55 +0000)]
[OpenCL] Make global ctor init function a kernel
We need to be able to enqueue internal function that initializes
global constructors on the host side. Therefore it has to be
converted to a kernel.
This change factors out common logic for adding kernel metadata
and moves it from CodeGenFunction to CodeGenModule in order to
make it accessible for the extra use case.
Differential revision: https://reviews.llvm.org/D61488
llvm-svn: 360342
Roman Lebedev [Thu, 9 May 2019 13:54:51 +0000 (13:54 +0000)]
[X86] AMD Piledriver (BdVer2): major cleanup (mainly inverse throughput)
I've started this cleanup more several times now, but got sidetracked
elsewhere, e.g. by llvm-exegesis problems. Not this time, finally!
This is mainly cleaning up the inverse throughput values,
and a few latencies/uops, based on the llvm-exegesis measured values.
Though this is not complete by any means,
there's certainly more cleanup to be done.
The performance numbers (i've only checked by RawSpeed benchmark) aren't
really surprising - overall this *slightly* (< -1%) improves perf.
llvm-svn: 360341
Sanjay Patel [Thu, 9 May 2019 13:43:22 +0000 (13:43 +0000)]
[LoopVectorizer] fix test file to not run the entire -O3 pipeline
This test file has a long history of edits from changes outside
of vectorization, and it would happen again with the proposal in
D61726.
End-to-end testing shouldn't be happening in a test file that is
specifically checking for vector masked load/store ops.
Larger-scale testing goes in PhaseOrdering or the test-suite.
I've hopefully preserved the intent by taking what was completely
unoptimized IR in some tests and passing that through the -O1
pipeline. That becomes the input IR, and now we just run the loop
vectorizer and verify that the vector masked ops are produced as
expected.
llvm-svn: 360340
Fangrui Song [Thu, 9 May 2019 12:43:37 +0000 (12:43 +0000)]
[llvm-nm] Fix handling of symbol types 't' 'd' 'r'
This restores part of r359311 that was reverted by r359830.
Rewrite the symbol types to fix several issues.
Notable difference is that the type of __init_array_start changes from
't' to 'd'.
GNU nm used to mark ELF symbols relative to .init_array as 't'
https://sourceware.org/bugzilla/show_bug.cgi?id=24505 (before 2.33)
because ".init" is the prefix. The bug was copied by r287803.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D61551
llvm-svn: 360339
Nemanja Ivanovic [Thu, 9 May 2019 12:26:39 +0000 (12:26 +0000)]
[PowerPC][NFC] Add test for D60506 to show differences in code-gen
Differential revision: https://reviews.llvm.org/D61723
llvm-svn: 360338