Commit Graph

301317 Commits

Author SHA1 Message Date
Sjoerd Meijer 1a213a42d6 [ARM] Follow up of rL344671, attempt to pacify a buildbot
It was rightfully complaining about an unpretty logical expression.

llvm-svn: 344677
2018-10-17 07:51:24 +00:00
Sam McCall 4340cc7336 [clangd] Hide unused function. NFC
llvm-svn: 344676
2018-10-17 07:41:53 +00:00
Sam McCall 645203a8c5 [clangd] Rename and move trivial logger to Logger.cpp. NFC
llvm-svn: 344675
2018-10-17 07:39:32 +00:00
George Rimar 1d478900a0 [LLDB] - Add support for DW_RLE_start_end entries (.debug_rnglists)
DWARF5 describes DW_RLE_start_end as:

This is a form of bounded range entry that has two target address operands.
Each operand is the same size as used in DW_FORM_addr. These indicate
the starting and ending addresses, respectively, that define the address range
for which the following location is valid.

The patch implements the support.

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

llvm-svn: 344674
2018-10-17 07:37:26 +00:00
Sam McCall bf6a2fc329 [clangd] Simplify client capabilities parsing.
Summary:
Instead of parsing into structs that mirror LSP, simply parse into a flat struct
that contains the info we need.
This is an exception to our strategy with Protocol.h, which seems justified:
 - the structure here is very large and deeply nested
 - we care about almost none of it
 - we should never have to serialize client capabilities

Reviewers: kadircet

Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits

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

llvm-svn: 344673
2018-10-17 07:33:42 +00:00
Sam McCall dc8f3cf8b0 [clangd] Refactor JSON-over-stdin/stdout code into Transport abstraction. (re-land r344620)
Summary:
This paves the way for alternative transports (mac XPC, maybe messagepack?),
and also generally improves layering: testing ClangdLSPServer becomes less of
a pipe dream, we split up the JSONOutput monolith, etc.

This isn't a final state, much of what remains in JSONRPCDispatcher can go away,
handlers can call reply() on the transport directly, JSONOutput can be renamed
to StreamLogger and removed, etc. But this patch is sprawling already.

The main observable change (see tests) is that hitting EOF on input is now an
error: the client should send the 'exit' notification.
This is defensible: the protocol doesn't spell this case out. Reproducing the
current behavior for all combinations of shutdown/exit/EOF clutters interfaces.
We can iterate on this if desired.

Reviewers: jkorous, ioeric, hokein

Subscribers: mgorny, ilya-biryukov, MaskRay, arphaman, kadircet, cfe-commits

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

llvm-svn: 344672
2018-10-17 07:32:05 +00:00
Sjoerd Meijer ff3ab33ec8 [ARM][NFCI] Do not fuse VADD and VMUL, continued (1/2)
This is a follow up of rL342874, which stopped fusing muls and adds into VMLAs
for performance reasons on the Cortex-M4 and Cortex-M33.  This is a serie of 2
patches, that is trying to achieve the same for VFMA.  The second column in the
table below shows what we were generating before rL342874, the third column
what changed with rL342874, and the last column what we want to achieve with
these 2 patches:

 --------------------------------------------------------
 | Opt   |  < rL342874   |  >= rL342874   |             |
 |------------------------------------------------------|
 |-O3    |     vmla      |      vmul      |     vmul    |
 |       |               |      vadd      |     vadd    |
 |------------------------------------------------------|
 |-Ofast |     vfma      |      vfma      |     vmul    |
 |       |               |                |     vadd    |
 |------------------------------------------------------|
 |-Oz    |     vmla      |      vmla      |     vmla    |
 --------------------------------------------------------

This patch 1/2, is a cleanup of the spaghetti predicate logic on the different
VMLA and VFMA codegen rules, so that we can make the final functional change in
patch 2/2.  This also fixes a typo in the regression test added in rL342874.

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

llvm-svn: 344671
2018-10-17 07:26:35 +00:00
Dean Michael Berris e85af163bc [XRay][compiler-rt] Generational Buffer Management
Summary:
This change updates the buffer queue implementation to support using a
generation number to identify the lifetime of buffers. This first part
introduces the notion of the generation number, without changing the way
we handle the buffers yet.

What's missing here is the cleanup of the buffers. Ideally we'll keep
the two most recent generations. We need to ensure that before we do any
writes to the buffers, that we check the generation number(s) first.

Those changes will follow-on from this change.

Depends on D52588.

Reviewers: mboerger, eizan

Subscribers: llvm-commits, jfb

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

llvm-svn: 344670
2018-10-17 06:57:50 +00:00
Sylvestre Ledru c5f1d215a2 Document the behavior of option passing when using -DCLANG_ENABLE_BOOTSTRAP=On
Also document -DCLANG_BOOTSTRAP_PASSTHROUGH

Reviewers: ecbeckmann

Subscribers: llvm-commits

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

llvm-svn: 344669
2018-10-17 06:35:10 +00:00
Takuto Ikuta 8aa53700ff NFC: Remove trailing space from CodeGenModule.cpp
llvm-svn: 344668
2018-10-17 04:29:56 +00:00
Lang Hames b327b0e5e1 [BuildingAJIT] Update chapter 1 to use the ORCv2 APIs.
llvm-svn: 344667
2018-10-17 03:34:09 +00:00
Michal Gorny 0e75dc4188 [python] [tests] Disable on known-broken arches
Disable the Python binding tests on AArch64, Hexagon and SystemZ
following reports on test failures.  The first two yield different
results, possibly indicating test case problems.  The last one seems
to have broken FFI in Python.

While at it, refactor the code to make adding future test restrictions
easier.

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

llvm-svn: 344666
2018-10-17 03:05:39 +00:00
Yaxun Liu aae1e87f4b AMDGPU: add __builtin_amdgcn_update_dpp
Emit llvm.amdgcn.update.dpp for both __builtin_amdgcn_mov_dpp and
__builtin_amdgcn_update_dpp. The first argument to
llvm.amdgcn.update.dpp will be undef for __builtin_amdgcn_mov_dpp.

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

llvm-svn: 344665
2018-10-17 02:32:26 +00:00
George Karpenkov d2198a1bd0 [analyzer] [www] Minor improvements to the text in open_projects
llvm-svn: 344664
2018-10-17 01:15:53 +00:00
George Karpenkov d8aadf7824 [analyzer] [www] Updated a list of open projects
Differential Revision: https://reviews.llvm.org/D53024

llvm-svn: 344663
2018-10-17 01:06:20 +00:00
Teresa Johnson f2d4b1d902 New test requires x86-registered-target
New test added in r344658 also requires x86-registered-target.

llvm-svn: 344662
2018-10-17 00:59:14 +00:00
Louis Dionne 1b22150f76 [libcxx] Mark chrono literal unit tests as being unsupported on AppleClang 10
llvm-svn: 344661
2018-10-17 00:34:13 +00:00
Teresa Johnson cd00f564f8 [ThinLTO] Fix test to require asserts
New test added in r344658 requires asserts due to -stats.

While here, augment it to test new global variable importing
message as well.

llvm-svn: 344660
2018-10-17 00:19:21 +00:00
Leonard Chan 423957ad3a [Sanitizer][PassManager] Fix for failing ASan tests on arm-linux-gnueabihf
Forgot to initialize the legacy pass in it's constructor.

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

llvm-svn: 344659
2018-10-17 00:16:07 +00:00
Teresa Johnson d2c234a4cc [ThinLTO] Add importing stats to thin link
Summary:
Previously we could only get the number of imported functions and
variables from the backend. This adds stats to the thin link where the
importing is decided.

Reviewers: wmi

Subscribers: inglorion, dexonsmith, llvm-commits

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

llvm-svn: 344658
2018-10-16 23:49:50 +00:00
Jonathan Metzman 5eb8cba280 [SanitizerCoverage] Don't duplicate code to get section pointers
Summary:
Merge code used to get section start and section end pointers
for SanitizerCoverage constructors. This includes code that handles
getting the start pointers when targeting MSVC.

Reviewers: kcc, morehouse

Reviewed By: morehouse

Subscribers: kcc, hiraditya

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

llvm-svn: 344657
2018-10-16 23:43:57 +00:00
Julie Hockett 229c63b021 [clang-doc] Limit integration tests
Now that the clang-doc libraries are covered by unit tests, we don't
need to have extensive (and unmaintainable) integration tests. This
replaces the integration test suite with a smaller one that just tests
the tool itself and removes extraneous dumping logic from the tool
itself.

Includes tests that cover the parse->serialize->merge->generate
pipeline, as well as tests for the --public, --format, --doxygen, and
--output flags.

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

llvm-svn: 344655
2018-10-16 23:07:37 +00:00
Julie Hockett 7f87ca62a2 [clang-doc] Add unit tests for Markdown generation
Add unit tests for Markdown generation.

This is part of a move to convert clang-doc's tests to a more
maintainable unit test framework, with a smaller number of integration
tests to maintain and more granular failure feedback.

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

llvm-svn: 344654
2018-10-16 23:07:26 +00:00
Julie Hockett 55974d3b93 [clang-doc] Add unit tests for YAML generation
Adds unit tests for the YAML generator library.

This is part of a move to convert clang-doc's tests to a more
maintainable unit test framework, with a smaller number of integration
tests to maintain and more granular failure feedback.

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

llvm-svn: 344653
2018-10-16 23:07:16 +00:00
Julie Hockett 8fc72fcb31 [clang-doc] Add unit tests for merging
Adds unit tests for the merging logic in Respresentation.cpp.

This is part of a move to convert clang-doc's tests to a more
maintainable unit test framework, with a smaller number of integration
tests to maintain and more granular failure feedback.

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

llvm-svn: 344652
2018-10-16 23:07:04 +00:00
Julie Hockett f276624e87 [clang-doc] Add unit tests for bitcode
Adds unit tests for the BitcodeWriter and BitcodeReader libraries.

This is part of a move to convert clang-doc's tests to a more
maintainable unit test framework, with a smaller number of integration
tests to maintain and more granular failure feedback.

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

llvm-svn: 344651
2018-10-16 23:06:53 +00:00
Julie Hockett 68049b1a8e [clang-doc] Add unit tests for serialization
Adds unit tests for the Serialize library.

This is part of a move to convert clang-doc's tests to a more
maintainable unit test framework, with a smaller number of integration
tests to maintain and more granular failure feedback.

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

llvm-svn: 344650
2018-10-16 23:06:42 +00:00
Craig Topper e0a992918b [X86] Match (cmp (and (shr X, C), mask), 0) to BEXTR+TEST.
Without this we match the CMP+AND to a TEST and then match the SHR separately. I'm trusting analyzeCompare to remove the TEST during the peephole pass. Otherwise we need to check the flag users to see if they only use the Z flag.

This recovers a case lost by r344270.

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

llvm-svn: 344649
2018-10-16 22:29:36 +00:00
Adrian Prantl af67fe6aef Delete commented-out code.
llvm-svn: 344648
2018-10-16 22:01:49 +00:00
Jim Ingham b1ecc3cac2 Return a named error in the result object of an expression with no result
Before we returned an error that was not exposed in the SB API and no useful
error message.  This change returns eExpressionProducedNoResult and an
appropriate error string.

<rdar://problem/44539514>

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

llvm-svn: 344647
2018-10-16 21:58:40 +00:00
Jason Molenda d33f6e73e1 Fixed an issue that a bot found with my changes
in r344626 & recommitting.  Original commit msg:


Simplify LocateDSYMInVincinityOfExecutable by moving
some redundant code into a separate function, 
LookForDsymNextToExecutablePath, and having that function
also look for .dSYM.yaa files in addition to .dSYM
bundles.

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

<rdar://problem/40406580> 

llvm-svn: 344646
2018-10-16 21:49:31 +00:00
David Bolvansky 7c7760da7e [InstCombine] Cleanup libfunc attribute inferring
Reviewers: efriedma

Reviewed By: efriedma

Subscribers: llvm-commits

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

llvm-svn: 344645
2018-10-16 21:18:31 +00:00
Jan Kratochvil ea58c633e6 Code cleanup: Remove DWARFDebugInfoEntry::m_empty_children
It merges DWARFDebugInfoEntry's m_empty_children into m_has_children.
m_empty_children was implemented by rL144983.

As Greg confirmed m_has_children was used to represent what was in the DWARF in
the byte that follows the DW_TAG. m_empty_children was used for DIEs that said
they had children but actually only contain a single NULL tag. It is fine to
not differentiate between the two.

Also changed assert()->lldbassert() for m_abbr_idx 16-bit overflow check as
that could be a tough bug to catch if it ever happens.

I have checked all calls of HasChildren() that this change should not matter to
them. The code even wants to know if there are any children - it does not
matter how the children presence is coded in the binary.

Patch written based on suggestions by Greg Clayton.

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

llvm-svn: 344644
2018-10-16 20:49:15 +00:00
Lang Hames 8b94274f22 [ORC] Make the VModuleKey optional, propagate it via MaterializationUnit and
MaterializationResponsibility.

VModuleKeys are intended to enable selective removal of modules from a JIT
session, however for a wide variety of use cases selective removal is not
needed and introduces unnecessary overhead. As of this commit, the default
constructed VModuleKey value is reserved as a "do not track" value, and
becomes the default when adding a new module to the JIT.

This commit also changes the propagation of VModuleKeys. They were passed
alongside the MaterializationResponsibity instance in XXLayer::emit methods,
but are now propagated as part of the MaterializationResponsibility instance
itself (and as part of MaterializationUnit when stored in a JITDylib).
Associating VModuleKeys with MaterializationUnits in this way should allow
for a thread-safe module removal mechanism in the future, even when a module
is in the process of being compiled, by having the
MaterializationResponsibility object check in on its VModuleKey's state
before commiting its results to the JITDylib.

llvm-svn: 344643
2018-10-16 20:13:06 +00:00
Louis Dionne 4084df0040 [libcxx] Avoid repeating the definition of std:: namespaces
This reduces code duplication a tiny bit.

llvm-svn: 344642
2018-10-16 20:02:59 +00:00
Louis Dionne 7833b88ad8 [libcxx] Remove _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
That macro has been defined to _LIBCPP_HIDE_FROM_ABI_AFTER_V1 for many
weeks now, so we're actually replacing uses of it for uses of
_LIBCPP_HIDE_FROM_ABI_AFTER_V1 directly.

This should not change or break anything since the two macros are
100% equivalent, unless somebody is (incorrectly!) relying on
_LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY being defined.

llvm-svn: 344641
2018-10-16 19:26:23 +00:00
Krasimir Georgiev 547d824da6 Revert "[WebAssembly] LSDA info generation"
This reverts commit r344575.
Newly introduced test eh-lsda.ll.test fails with use-after-free under
ASAN build.

llvm-svn: 344639
2018-10-16 18:50:09 +00:00
Krasimir Georgiev ae4e75fd6e Revert "[clangd] Refactor JSON-over-stdin/stdout code into Transport abstraction."
This reverts commit r344620.
Breaks upstream bots.

llvm-svn: 344637
2018-10-16 18:44:41 +00:00
Jason Molenda b4285bcacc Revert r344626 while I address a testsuite failure from a bot.
llvm-svn: 344636
2018-10-16 18:25:46 +00:00
Jason Molenda 0128e7f540 Tiny testsuite tweaks. Don't run the apple simulator
tests when targetting a device.  Add an include to 
safe-to-call-func to work around a modules issue with
a certain combination of header files.  Add rules for
Darwin systems to ad-hoc codesign binaries that the
testsuite builds.

llvm-svn: 344635
2018-10-16 18:14:30 +00:00
Vedant Kumar 2493707818 Use a relaxed substring check for function names in a test
The TestTailCallFrameSBAPI.py test checks that function names in a
backtrace are equal to an expected value.

Use a relaxed substring check because function dislpay names are
platform-dependent. E.g we see "void sink(void)" on Windows, but "sink()" on
Darwin. This seems like a bug -- just work around it for now.

llvm-svn: 344634
2018-10-16 18:13:42 +00:00
Jason Molenda 696569d757 Don't run TestBreakpointIt.py on arm64 devices;
it is armv7 specific.

llvm-svn: 344633
2018-10-16 18:11:17 +00:00
Evandro Menezes c98decf864 [PATCH] [NFC][AArch64] Fix refactoring of macro fusion
Fix compiler error.

llvm-svn: 344632
2018-10-16 17:41:45 +00:00
Teresa Johnson 0bc6b7b81c [LTO] Call InitLLVM from llvm-lto2
Summary:
D45602 added this to most tools, including llvm-lto, but not to
llvm-lto2. Add it there and test that it works in both lto tools.

Reviewers: ruiu

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

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

llvm-svn: 344631
2018-10-16 17:37:45 +00:00
Yaxun Liu 9b6d9f2a62 Disable code object version 3 for HIP toolchain
AMDGPU backend will switch to code object version 3 by default.
Since HIP runtime is not ready, disable it until the runtime is ready.

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

llvm-svn: 344630
2018-10-16 17:36:23 +00:00
Leonard Chan 699b3b54da [Intrinsic] Signed Saturation Addition Intrinsic
Add an intrinsic that takes 2 integers and perform saturation addition on them.

This is a part of implementing fixed point arithmetic in clang where some of
the more complex operations will be implemented as intrinsics.

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

llvm-svn: 344629
2018-10-16 17:35:41 +00:00
Jason Molenda d3ff1ecfde For a built & test bot, add an environment variable PLATFORM_SDK_DIRECTORY,
which PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded
which examine for any additional SDK directories when it is
constructing its list.

<rdar://problem/42984340>
<rdar://problem/41351223>

llvm-svn: 344628
2018-10-16 17:31:33 +00:00
Marshall Clow 5b08c1742a Recommit <chrono> changes with a couple xtra tests marked to fail on apple's clang. Reviewed as D51762
llvm-svn: 344627
2018-10-16 17:27:54 +00:00
Jason Molenda 4503c514d9 Simplify LocateDSYMInVincinityOfExecutable by moving
some redundant code into a separate function, 
LookForDsymNextToExecutablePath, and having that function
also look for .dSYM.yaa files in addition to .dSYM
bundles.

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

<rdar://problem/40406580> 

llvm-svn: 344626
2018-10-16 17:26:04 +00:00
Evandro Menezes 46eadcff9c [NFC][ARM] Refactor macro fusion
Simplify code for wildcards.

llvm-svn: 344625
2018-10-16 17:19:51 +00:00