Commit Graph

307674 Commits

Author SHA1 Message Date
Aaron Ballman b95b6f42f9 Revert r351208 (which was a revert of r350892).
This corresponds to the fix to Clang in r351470.

llvm-svn: 351471
2019-01-17 20:21:44 +00:00
Aaron Ballman 65e96bdaca Revert r351209 (which was a revert of r350891) with a fix.
The test case had a parse error that was causing the condition string to be misreported. We now have better fallback code for error cases.

llvm-svn: 351470
2019-01-17 20:21:34 +00:00
Nico Weber 5f73474657 llvm build: Merge r351448
llvm-svn: 351469
2019-01-17 20:20:56 +00:00
Eugene Zelenko 390b3b34e0 [Documentation] Fix another link in docs/clang-tidy/Contributing.rst.
llvm-svn: 351468
2019-01-17 20:00:23 +00:00
Eugene Zelenko 76c77d9eaf [Documentation] Another attempt to fix link in docs/clang-tidy/Contributing.rst. Use HTTPS for links.
llvm-svn: 351467
2019-01-17 19:47:44 +00:00
Eugene Zelenko 6bea2f21ce [Documentation] Fix link in docs/clang-tidy/Contributing.rst.
llvm-svn: 351466
2019-01-17 19:35:39 +00:00
Wouter van Oortmerssen 73a0c240cf [WebAssembly] Fixing 2 more symbol offset related tests.
llvm-svn: 351465
2019-01-17 19:18:05 +00:00
Jonas Devlieghere 032ef2dc00 [Test] Fix debug-loc-0.mir with EXPENSIVE_CHECKS
The `llc` invocation was missing `-start-before=machine-cp`.

llvm-svn: 351464
2019-01-17 18:35:14 +00:00
Eugene Zelenko fb877cb9f2 [Documentation] Add a chapter about Clang-tidy integrations.
Patch by Marina Kalashina.

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

llvm-svn: 351463
2019-01-17 18:31:34 +00:00
Wouter van Oortmerssen 7ab15a79be [WebAssembly] Changed objdump output to offsets instead of indices.
Summary: This is to accommodate this change: https://reviews.llvm.org/D56684

Reviewers: sbc100

Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

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

llvm-svn: 351462
2019-01-17 18:30:35 +00:00
Erik Pilkington 2ff012df81 [CodeGenObjC] Use a constant value for non-fragile ivar offsets when possible
If a class inherits from NSObject and has an implementation, then we
can assume that ivar offsets won't need to be updated by the runtime.
This allows us to index into the object using a constant value and
avoid loading from the ivar offset variable.

This patch was adapted from one written by Pete Cooper.

rdar://problem/10132568

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

llvm-svn: 351461
2019-01-17 18:18:53 +00:00
Wouter van Oortmerssen f3b762a0b6 [WebAssembly] Fixed objdump not parsing function headers.
Summary:
objdump was interpreting the function header containing the locals
declaration as instructions. To parse these without injecting target
specific code in objdump, MCDisassembler::onSymbolStart was added to
be implemented by the WebAssembly implemention.

WasmObjectFile now returns a code offset for the "address" of a symbol,
rather than the index. This is also more in-line with what other
targets do.

Also ensured that the AsmParser correctly puts each function
in its own segment to enable this test case.

Reviewers: sbc100, dschuff

Subscribers: jgravelle-google, aheejin, sunfish, rupprecht, llvm-commits

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

llvm-svn: 351460
2019-01-17 18:14:09 +00:00
Alex Lorenz 194d00e142 [ObjC] Follow-up r350768 and allow the use of unavailable methods that are
declared in a parent class from within the @implementation context

This commit extends r350768 and allows the use of methods marked as unavailable
that are declared in a parent class/category from within the @implementation of
the class where the method is marked as unavailable.
This allows users to call init that's marked as unavailable even if they don't
define it.

rdar://47134898

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

llvm-svn: 351459
2019-01-17 18:12:45 +00:00
Rui Ueyama 4fce28ca6e Add a missing dependency to fix build.
llvm-svn: 351458
2019-01-17 17:55:47 +00:00
Vlad Tsyrklevich c93390b5c5 TLS: Respect visibility for thread_local variables on Darwin (PR40327)
Summary:
Teach clang to mark thread wrappers for thread_local variables with
hidden visibility when the original variable is marked with hidden
visibility. This is necessary on Darwin which exposes the thread wrapper
instead of the thread variable. The thread wrapper would previously
always be created with default visibility unless it had
linkonce*/weak_odr linkage.

Reviewers: rjmccall

Reviewed By: rjmccall

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

llvm-svn: 351457
2019-01-17 17:53:45 +00:00
Jonathan Metzman b795c31dff [libFuzzer][MSVC] Make attribute-use compatible with MSVC
Summary:
Replace attributes with macros that use equivalent declspecs
for MSVC.

Reviewers: vitalybuka

Reviewed By: vitalybuka

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

llvm-svn: 351456
2019-01-17 16:36:05 +00:00
Teresa Johnson 8d86f1ba47 Revert "[ThinLTO] Add summary entries for index-based WPD"
Mistaken commit of something still under review!

This reverts commit r351453.

llvm-svn: 351455
2019-01-17 16:05:04 +00:00
Teresa Johnson 0be9960f28 Add -dump-input=always to cfi-devirt test to debug flake
To help diagnose flaky bot failures in PR40351.

llvm-svn: 351454
2019-01-17 15:49:04 +00:00
Teresa Johnson 4fcf3b1621 [ThinLTO] Add summary entries for index-based WPD
Summary:
If LTOUnit splitting is disabled, the module summary analysis computes
the summary information necessary to perform single implementation
devirtualization during the thin link with the index and no IR. The
information collected from the regular LTO IR in the current hybrid WPD
algorithm is summarized, including:
1) For vtable definitions, record the function pointers and their offset
within the vtable initializer (subsumes the information collected from
IR by tryFindVirtualCallTargets).
2) A record for each type metadata summarizing the vtable definitions
decorated with that metadata (subsumes the TypeIdentiferMap collected
from IR).

Also added are the necessary bitcode records, and the corresponding
assembly support.

The index-based WPD will be sent as a follow-on.

Depends on D53890.

Reviewers: pcc

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

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

llvm-svn: 351453
2019-01-17 15:49:03 +00:00
James Henderson e50d9cb364 [llvm-readobj][ELF]Add demangling support
This change adds demangling support to the ELF side of llvm-readobj,
under the switch --demangle/-C.

The following places are demangled: symbol table dumps (static and
dynamic), relocation dumps (static and dynamic), addrsig dumps, call
graph profile dumps, and group section signature symbols.

Although GNU readelf doesn't support demangling, it is still a useful
feature to have, and brings it on a par with llvm-objdump's
capabilities.

This fixes https://bugs.llvm.org/show_bug.cgi?id=40054.

Reviewed by: grimar, rupprecht

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

llvm-svn: 351450
2019-01-17 15:34:12 +00:00
Anton Korobeynikov 81cff31ccf CodeGen: Cast llvm.flt.rounds result to match __builtin_flt_rounds
llvm.flt.rounds returns an i32, but the builtin expects an integer. 
On targets where integers are not 32-bits clang tries to bitcast the result, causing an assertion failure.

The patch enables newlib build for msp430.

Patch by Edward Jones!

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

llvm-svn: 351449
2019-01-17 15:21:55 +00:00
James Henderson ce5b5b486a Move demangling function from llvm-objdump to Demangle library
This allows it to be used in an upcoming llvm-readobj change.

A small change in internal behaviour of the function is to always call
the microsoftDemangle function if the string does not have an itanium
encoding prefix, rather than only if it starts with '?'. This is
harmless because the microsoftDemangle function does the same check
already.

Reviewed by: grimar, erik.pilkington

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

llvm-svn: 351448
2019-01-17 15:18:44 +00:00
Pavel Labath 7630e0bcbe Recommit "Teach the default symbol vendor to respect module.GetSymbolFileFileSpec()"
This reapplies commit r351330, which was reverted due to a failing test on
macos. The failure was because the SymbolVendor used on MacOS was stricter than
the default (or ELF) symbol vendor, and rejected the symbol file because it's
UUID did not match the object file.

This version of the patch adds a uuid load command to the test macho file to
make sure the UUIDs match.

llvm-svn: 351447
2019-01-17 15:07:35 +00:00
Hans Wennborg 35ab86df62 build_llvm_package.bat: Run more tests
llvm-svn: 351436
2019-01-17 13:11:15 +00:00
Pavel Labath bdbc14dc01 Recommit "Add a verbose mode to "image dump line-table" and use it to write a .debug_line test"
This reapplies r350802, which was reverted because of issues with
parsing posix-style paths on windows hosts (and vice-versa). These have
since been fixed in r351328, and lldb should now recognise the path
style used in a dwarf compile unit correctly.

llvm-svn: 351435
2019-01-17 13:11:04 +00:00
Max Kazantsev 61a8d3fb33 [LoopSimplifyCFG] Form LCSSA when a parent loop becomes a sibling
During the transforms in LoopSimplifyCFG, when we remove a dead exiting edge, the
parent loop may stop being reachable from the child loop, and therefore they become
siblings. If the former child loop had uses of some values from its former parent loop,
now such uses will require LCSSA Phis, even if they weren't needed before. So we must
form LCSSA for all loops that stopped being ancestors of the current loop in this case.

Differential Revision: https://reviews.llvm.org/D56144
Reviewed By: fedor.sergeev

llvm-svn: 351434
2019-01-17 12:51:10 +00:00
Max Kazantsev 8b134169f5 [LoopSimplifyCFG] Fix order of deletion of complex dead subloops
Function `DeleteDeadBlock` requires that all predecessors of a block
being deleted have already been deleted, with the exception of a
single-block loop. When we use it for removal of dead subloops that
contain more than one block, we may not fulfull this requirement and
fail an assertion.

This patch replaces invocation of `DeleteDeadBlock` with a generalized
version `DeleteDeadBlocks` that is able to deal with multiple dead blocks,
even if they contain some cycles.

Differential Revision: https://reviews.llvm.org/D56121
Reviewed By: fedor.sergeev

llvm-svn: 351433
2019-01-17 12:25:40 +00:00
Hans Wennborg 799b5dcbda Revert r351311 "[OMPT] Make sure that OMPT is enabled when accessing internals of the runtime"
and also the follow-up r351315.

The new test is failing on the buildbots.

> Make sure that OMPT is enabled in runtime entry points that access internals
> of the runtime. Else, return an appropiate value indicating an error or that
> the data is not available.
>
> Patch provided by @sconvent
>
> Reviewers: jlpeyton, omalyshe, hbae, Hahnfeld, joachim.protze
>
> Reviewed By: joachim.protze
>
> Tags: #openmp, #ompt
>
> Differential Revision: https://reviews.llvm.org/D47717

llvm-svn: 351431
2019-01-17 11:31:03 +00:00
Simon Pilgrim 6cc9c3cd75 [X86][SSE] Add PR40340 test case
llvm-svn: 351430
2019-01-17 11:20:23 +00:00
Simon Pilgrim 8260bf9db2 [X86] Add AVX512 test to insertps
Pre-commit for PR40340

llvm-svn: 351429
2019-01-17 11:11:15 +00:00
Matt Arsenault 43c8dd9f03 GlobalISel: Add comment to clarify G_BUILD_VECTOR
llvm-svn: 351428
2019-01-17 10:50:07 +00:00
Matt Arsenault 0cb08e448a Allow FP types for atomicrmw xchg
llvm-svn: 351427
2019-01-17 10:49:01 +00:00
Benjamin Kramer bd13c9787f [MC] Remove unused variable
llvm-svn: 351426
2019-01-17 10:25:18 +00:00
Diana Picus 639e0661ce Fix capitalization. NFC
llvm-svn: 351425
2019-01-17 10:11:59 +00:00
Diana Picus d5c2499aec [ARM GlobalISel] Allow calls to varargs functions
Allow varargs functions to be called, both in arm and thumb mode. This
boils down to choosing the correct calling convention, which we can
easily test by making sure arm_aapcscc is used instead of
arm_aapcs_vfpcc when the callee is variadic.

llvm-svn: 351424
2019-01-17 10:11:55 +00:00
Philip Pfaffe 88a13b9159 [NewPM] Add -fsanitize={memory,thread} handling to clang
Summary: This is the missing bit to drive thread and memory sanitizers through clang using the new PassManager.

Reviewers: chandlerc, fedor.sergeev, vitalybuka, leonardchan

Subscribers: bollu, llvm-commits

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

llvm-svn: 351423
2019-01-17 10:10:47 +00:00
Alex Bradbury 07f1c62371 [RISCV] Add codegen support for RV64A
In order to support codegen RV64A, this patch:
* Introduces masked atomics intrinsics for atomicrmw operations and cmpxchg
  that use the i64 type. These are ultimately lowered to masked operations
  using lr.w/sc.w, but we need to use these alternate intrinsics for RV64
  because i32 is not legal
* Modifies RISCVExpandPseudoInsts.cpp to handle PseudoAtomicLoadNand64 and
  PseudoCmpXchg64
* Modifies the AtomicExpandPass hooks in RISCVTargetLowering to sext/trunc as
  needed for RV64 and to select the i64 intrinsic IDs when necessary
* Adds appropriate patterns to RISCVInstrInfoA.td
* Updates test/CodeGen/RISCV/atomic-*.ll to show RV64A support

This ends up being a fairly mechanical change, as the logic for RV32A is
effectively reused.

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

llvm-svn: 351422
2019-01-17 10:04:39 +00:00
Sanjin Sijaric b694030647 [ARM64][Windows] Share unwind codes between epilogues
There are cases where we have multiple epilogues that have the exact same unwind
code sequence.  In that case, the epilogues can share the same unwind codes in
the .xdata section.  This should get us past the assert "SEH unwind data
splitting not yet implemented" in many cases.

We still need to add support for generating multiple .pdata/.xdata sections for
those functions that need to be split into fragments.

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

llvm-svn: 351421
2019-01-17 09:45:17 +00:00
George Rimar ce5cafe595 [llvm-objdump] - Fix comment. NFC.
Forgot to address this one.

llvm-svn: 351418
2019-01-17 09:14:33 +00:00
George Rimar 6ce6bfa435 [llvm-objdump] - Simplify the getRelocationValueString. NFCI.
This refactors the getRelocationValueString method.
It is a bit overcomplicated and it is possible to reduce it without
losing the functionality it seems.

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

llvm-svn: 351417
2019-01-17 09:13:17 +00:00
Max Kazantsev ee61308595 [NFC] Factor out some local vars
llvm-svn: 351416
2019-01-17 06:20:42 +00:00
Petr Hosek ba2a2fba05 [CMake][Fuchsia] Disable modules for the second stage build
This made the toolchain build 50% slower.

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

llvm-svn: 351415
2019-01-17 04:12:30 +00:00
Eric Fiselier 0e997efd53 [hurd] Fix unconditional use of PATH_MAX
Patch by Samuel Thibault

The GNU/Hurd system does not define an arbitrary PATH_MAX limitation, the POSIX 2001 realpath
extension can be used instead, and the size of symlinks can be determined.

Reviewed as https://reviews.llvm.org/D54677

llvm-svn: 351414
2019-01-17 02:59:28 +00:00
Thomas Lively cbda16eb8e [WebAssembly] Parse llvm.ident into producers section
llvm-svn: 351413
2019-01-17 02:29:55 +00:00
Thomas Lively 2a0868ff48 [WebAssembly] Merge producers section
llvm-svn: 351412
2019-01-17 02:29:41 +00:00
Vedant Kumar a9906c1e5e [MergeFunc] Prevent silent miscompile of vararg functions
The function merging pass miscompiles identical vararg functions. The
forwarding thunk it emits doesn't forward the full variable-length list
of arguments. Disable merging for vararg functions for now.

I've filed llvm.org/PR40345 to track the issue.

rdar://47326238

llvm-svn: 351411
2019-01-17 02:15:05 +00:00
Thomas Lively 3cfcc94c09 Revert "[WebAssembly] Parse llvm.ident into producers section"
This reverts commit eccdbba3a02a33e13b5262e92200a33e2ead873d.

llvm-svn: 351410
2019-01-17 00:39:49 +00:00
Thomas Lively d24ae47db6 Revert "[WebAssembly] Merge producers section"
This reverts commit 71eaf61c6c121c8c3bcaf3490557e92cf81599cb. One of
the lld tests was breaking, so revert this change until it is fixed.

llvm-svn: 351409
2019-01-17 00:34:44 +00:00
Craig Topper 015585abb2 [X86] Add custom emission for the avx512 scatter builtins to convert from scalar integer to vXi1 for the mask arguments to the intrinsics.
llvm-svn: 351408
2019-01-17 00:34:19 +00:00
Craig Topper bf37c81104 [X86] Remove GCCBuiltin from deprecated avx512 scatter intrinsics that use scalar integers for mask.
We will custom emit these builtins in clang using the new intrinsics that take a vXi1 mask.

llvm-svn: 351407
2019-01-17 00:34:04 +00:00