Commit Graph

332870 Commits

Author SHA1 Message Date
Fangrui Song fe955e6c70 TargetPassConfig: const char * -> const char []
The latter has better codegen in non-optimized builds, which do not run
ipsccp.
2019-11-26 11:25:00 -08:00
Craig Topper cfce8f2cfb [X86] Add strict fp support for operations of X87 instructions
This is the following patch of D68854.

This patch adds basic operations of X87 instructions, including +, -, *, / , fp extensions and fp truncations.

Patch by Chen Liu(LiuChen3)

Differential Revision: https://reviews.llvm.org/D68857
2019-11-26 10:59:41 -08:00
Craig Topper b8cb73dd38 [X86] Pre-commit test modifications for D68857. NFC
Patch by Chen Liu(LiuChen3)

Differential Revision: https://reviews.llvm.org/D70706
2019-11-26 10:33:19 -08:00
Fangrui Song cd9c915d2a [Object][RISCV][test] Improve DebugInfo/RISCV/relax-debug-frame.ll
Reviewed By: luismarques

Differential Revision: https://reviews.llvm.org/D70578
2019-11-26 09:16:55 -08:00
Fangrui Song 54a366f515 [ELF] Add a corrector for case mismatch problems
Reviewed By: grimar, peter.smith

Differential Revision: https://reviews.llvm.org/D70506
2019-11-26 09:11:56 -08:00
Fangrui Song a2fc964417 [ELF] Replace SymbolTable::forEachSymbol with iterator_range symbols()
D62381 introduced forEachSymbol(). It seems that many call sites cannot
be parallelized because the body shared some states. Replace
forEachSymbol with iterator_range<filter_iterator<...>> symbols() to
simplify code and improve debuggability (std::function calls take some
frames).

It also allows us to use early return to simplify code added in D69650.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D70505
2019-11-26 09:09:32 -08:00
Alexey Bataev 49a2b2a3d2 [OPENMP]Remove tab in message, NFC. 2019-11-26 11:37:36 -05:00
Alexey Bataev 87c3f4a5e0 [OPENMP]Simplify printing of declare variant attribute, NFC. 2019-11-26 11:35:12 -05:00
David Green 4965779f17 [ARM] Clean up the load and store code. NFC
Some of these patterns have grown quite organically. I've tried to
organise them a little here, moving all the PatFlags together and giving
them a more consistent naming scheme, to allow some of the later
patterns to be merged into a single multiclass.

Differential Revision: https://reviews.llvm.org/D70178
2019-11-26 16:21:01 +00:00
David Green b5315ae8ff [Codegen][ARM] Add addressing modes from masked loads and stores
MVE has a basic symmetry between it's normal loads/store operations and
the masked variants. This means that masked loads and stores can use
pre-inc and post-inc addressing modes, just like the standard loads and
stores already do.

To enable that, this patch adds all the relevant infrastructure for
treating masked loads/stores addressing modes in the same way as normal
loads/stores.

This involves:
- Adding an AddressingMode to MaskedLoadStoreSDNode, along with an extra
   Offset operand that is added after the PtrBase.
- Extending the IndexedModeActions from 8bits to 16bits to store the
   legality of masked operations as well as normal ones. This array is
   fairly small, so doubling the size still won't make it very large.
   Offset masked loads can then be controlled with
   setIndexedMaskedLoadAction, similar to standard loads.
- The same methods that combine to indexed loads, such as
   CombineToPostIndexedLoadStore, are adjusted to handle masked loads in
   the same way.
- The ARM backend is then adjusted to make use of these indexed masked
   loads/stores.
- The X86 backend is adjusted to hopefully be no functional changes.

Differential Revision: https://reviews.llvm.org/D70176
2019-11-26 16:21:01 +00:00
David Green 549db744bd [ARM] Lots of MVE offset masked load and store tests. NFC 2019-11-26 16:21:01 +00:00
stozer 184d72a7c6 [DebugInfo] Disallow fragmenting DIExpressions with shift operators
DIExpressions with shift operators should not be fragmented for the same
reason as arithmetic operators: carry over cannot be expressed from one
fragment to the other, so an invalid result would be produced.

Differential Revision: https://reviews.llvm.org/D70601
2019-11-26 16:12:22 +00:00
jasonliu 7707d8aa9d [XCOFF][AIX] Check linkage on the function, and two fixes for comments
This is a follow up commit to address post-commit comment in D70443

Differential revision: https://reviews.llvm.org/D70443
2019-11-26 16:09:31 +00:00
vpykhtin 008e65a7bf [AMDGPU] Fix emitIfBreak CF lowering: use temp reg to make register coalescer life easier.
Differential revision: https://reviews.llvm.org/D70405
2019-11-26 18:59:37 +03:00
Alexey Bataev a913e872d6 [OPENMP]Fix PR44133: crash on lambda reductions in templates.
Need to perform the instantiation of the combiner/initializer even if
the resulting type is not dependent, if the construct is defined in
templates in some cases.
2019-11-26 10:55:54 -05:00
Michał Górny 3cd9a8b7dc [lldb] [test] Un-XFAIL lldb-server tests fixed on NetBSD 2019-11-26 16:46:21 +01:00
Alexander Kornienko aa0e92e1f7 [clang-tidy] Use range-for for check registration. NFC
Actually, just testing GitHub commit rights.
2019-11-26 16:34:23 +01:00
Luís Marques 6fd4c42fa8 [LegalizeTypes][RISCV] Soften FCOPYSIGN operand
Summary: Adds support for softening FCOPYSIGN operands.
Adds RISC-V tests that exercise the new softening code.

Reviewers: asb, lenary, efriedma
Reviewed By: efriedma
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70679
2019-11-26 15:22:55 +00:00
Luís Marques d7be3eab5c [RISCV] Handle fcopysign(f32, f64) and fcopysign(f64, f32)
Summary: Adds tablegen patterns to explicitly handle fcopysign where the
magnitude and sign arguments have different types, due to the sign value casts
being removed the by DAGCombiner. Support for RV32IF follows in a separate
commit. Adds tests for all relevant scenarios except RV32IF.

Reviewers: lenary
Reviewed By: lenary
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70678
2019-11-26 14:26:31 +00:00
Georgii Rymar d88f67bdca [llvm-readobj/llvm-readelf] - Reimplement dumping of the SHT_GNU_verdef section.
Currently we have following issues:
1) We have 2 different implementations with a different behaviors for GNU/LLVM styles.
2) Errors are either not handled at all or we call report_fatal_error with not helpfull messages.
3) There is no test coverage even for those errors that are reported.

This patch reimplements parsing of the SHT_GNU_verdef section entries
in a single place, adds a few error messages and test coverage.

Differential revision: https://reviews.llvm.org/D70495
2019-11-26 17:15:39 +03:00
Pavel Labath 5871cba861 [lldb] Avoid snprintf in PlatformRemoteDarwinDevice
This quashes a -Wformat-truncation warning.
2019-11-26 15:16:26 +01:00
Sanjay Patel 2bd252ea89 [InferFuncAttributes][Attributor] add tests for 'dereferenceable'; NFC
Pulling a couple of extra tests out of
D64258
before abandoning in favor of
D70714
2019-11-26 09:09:13 -05:00
Raphael Isemann 16144d2b21 [lldb][NFC] Modernize string handling in DWARFASTParserClang::ParseTypeModifier 2019-11-26 15:04:54 +01:00
Pavel Labath 290e43ddb6 [lldb] Use llvm::format in AppleObjCRuntimeV2.cpp
Crushing a "sprintf" buffer is null warning.
2019-11-26 15:04:13 +01:00
Georgii Rymar 64225aea8f [llvm-readobj][test] - Cleanup the many-sections.s test case.
It removes 2 precompiled binaries used which are now
can be crafted with the use of yaml2obj.

Differential revision: https://reviews.llvm.org/D70711
2019-11-26 16:56:48 +03:00
Pavel Labath 12284e54b4 [lldb] fix a -Wcast-qual warning 2019-11-26 14:49:16 +01:00
Pavel Labath 6612fabc47 [lldb] remove a superfluous semicolon 2019-11-26 14:49:16 +01:00
Dávid Bolvanský 4eacc32672 Partially reland "[Diagnostics] Put "deprecated copy" warnings into -Wdeprecated-copy""
But do not enable it under -Wextra until libcxx issue is solved.
2019-11-26 14:41:34 +01:00
Pavel Labath 957d9a0335 [lldb] remove unsigned Stream::operator<< overloads
Summary:
I recently re-discovered that the unsinged stream operators of the
lldb_private::Stream class have a surprising behavior in that they print
the number in hex. This is all the more confusing because the "signed"
versions of those operators behave normally.

Now that, thanks to Raphael, each Stream class has a llvm::raw_ostream
wrapper, I think we should delete most of our formatting capabilities
and just delegate to that. This patch tests the water by just deleting
the operators with the most surprising behavior.

Most of the code using these operators was printing user_id_t values. It
wasn't fully consistent about prefixing them with "0x", but I've tried
to consistenly print it without that prefix, to make it more obviously
different from pointer values.

Reviewers: teemperor, JDevlieghere, jdoerfert

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70241
2019-11-26 14:24:28 +01:00
Pavel Labath 9b06897009 [lldb/symbolvendorelf] Copy more sections from separate debug files
Include the fancier DWARF5 sections too.
2019-11-26 14:19:46 +01:00
Raphael Isemann cdfecb82ee [lldb][NFC] Remove no longer unused variable in DWARFASTParserClang::ParseTypeFromDWARF 2019-11-26 14:17:06 +01:00
Georgii Rymar 91827ebf5e [yaml2obj] - Fix BB after «[yaml2obj] - Teach tool to describe SHT_GNU_verdef section with a "Content" property.»
Fixed a temporary file name.

BB: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-ubuntu/builds/669
2019-11-26 16:05:38 +03:00
Raphael Isemann 0181338dda [lldb][NFC] Simplify structure parsing code in DWARFASTParserClang::ParseTypeFromDWARF
This way it looks more like the code around it. The assert is also gone as it just
checks that the variables we declare directly above were not initialized by anyone.
That made more sense when this was one large function.
2019-11-26 14:01:12 +01:00
Pavel Labath 4023bd05fc [lldb] Add boilerplate to recognize the .debug_rnglists.dwo section 2019-11-26 13:58:26 +01:00
Raphael Isemann 30fc94be23 [lldb][NFC] Extract type modifier parsing from DWARFASTParserClang::ParseTypeFromDWARF
Part of the work to split up this monolithic parsing function.
2019-11-26 13:53:06 +01:00
Haojian Wu 8805316172 [clangd] Speed up when building rename edit.
Summary:
We used to scan the code everytime when computing the LSP position to the offset
(respect the LSP encoding). Now we only scan the source code once.

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D70441
2019-11-26 13:47:47 +01:00
Kirill Bobyrev c547c22f18
[NFC] ASSERT_EQ before accessing items in containers
As discussed offline, something different from `EXPECT_EQ` should be
used to check if the container contains enough items before accessing
them so that other tests can still be run even if the assertion fails as
opposed to having `EXPECT_EQ` failing and then aborting the run due to
the errors caused by out-of-bounds memory access.

Reviewed by: ilya-biryukov

Differential Revision: https://reviews.llvm.org/D70528
2019-11-26 13:45:04 +01:00
Georgii Rymar f69ac55d60 [yaml2obj] - Teach tool to describe SHT_GNU_verdef section with a "Content" property.
There is no way to set raw content for SHT_GNU_verdef section.
This patch implements it.

Differential revision: https://reviews.llvm.org/D70710
2019-11-26 15:35:05 +03:00
AndreyChurbanov 5f8b8d2820 [openmp] Recognise ARMv7ve machine arch.
Patch by raj.khem (Khem Raj)

Differential Revision: https://reviews.llvm.org/D68543
2019-11-26 14:37:24 +03:00
Alexey Lapshin e73f78acd3 [X86][MC] no error diagnostic for out-of-range jrcxz/jecxz/jcxz
Fix for PR24072:

X86 instructions jrcxz/jecxz/jcxz performs short jumps if rcx/ecx/cx register is 0
The maximum relative offset for a forward short jump is 127 Bytes (0x7F).
The maximum relative offset for a backward short jump is 128 Bytes (0x80).

Gnu assembler warns when the distance of the jump exceeds the maximum but llvm-as does not.

Patch by Konstantin Belochapka and Alexey Lapshin

Differential Revision: https://reviews.llvm.org/D70652
2019-11-26 14:32:17 +03:00
Raphael Isemann 8f2b57d257 [lldb][NFC] Extract enum parsing from DWARFASTParserClang::ParseTypeFromDWARF
Part of the work to split up this monolithic parsing function.
2019-11-26 12:30:06 +01:00
Raphael Isemann 94939650b6 [lldb][NFCI] Extract subroutine parsing from DWARFASTParserClang::ParseTypeFromDWARF
Part of the work to split up this monolithic parsing function.

Should be NFC but due to the kafkaesque control flow in this case statement this might
have some unintended side effects.
2019-11-26 12:14:40 +01:00
Raphael Isemann e8013ef53a [lldb][NFC] Extract array type parsing from DWARFASTParserClang::ParseTypeFromDWARF
Part of the work to split up this monolithic parsing function.
2019-11-26 11:46:25 +01:00
Sven van Haastregt e54c83ec4d [OpenCL] Add work-group and miscellaneous vector builtin functions
Add the work-group and miscellaneous vector builtin functions from the
OpenCL C specification.

Patch by Pierre Gondois and Sven van Haastregt.
2019-11-26 10:44:49 +00:00
Kerry McLaughlin 4a649ad21a [AArch64][SVE] Implement floating-point conversion intrinsics
Summary:
Adds intrinsics for the following:
  - fcvt
  - fcvtzs & fcvtzu
  - scvtf & ucvtf
  - fcvtlt, fcvtnt
  - fcvtx & fcvtxnt

Reviewers: huntergr, sdesmalen, dancgr, mgudim, efriedma

Reviewed By: sdesmalen

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cameron.mcinally, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70180
2019-11-26 10:31:47 +00:00
Sam Parker 28166816b0 [ARM][ReachingDefs] Remove dead code in loloops.
Add some more helper functions to ReachingDefs to query the uses of
a given MachineInstr and also to query whether two MachineInstrs use
the same def of a register.

For Arm, while tail-predicating, these helpers are used in the
low-overhead loops to remove the dead code that calculates the number
of loop iterations.

Differential Revision: https://reviews.llvm.org/D70240
2019-11-26 10:27:46 +00:00
Jonas Paulsson 3ec193fb52 [SystemZ] Don't build a PPA instruction with an immediate 0 operand.
The improvement in the machine verifier for operand types (D63973) discovered
a bad operand in a test using a PPA instruction. It was an immediate 0 where
a register was expected.

This patch fixes this (NFC) by now making the PPA second register operand
NoRegister instead of a zero immediate in the MIR.

Review: Ulrich Weigand
https://reviews.llvm.org/D70501
2019-11-26 11:21:01 +01:00
Sam Parker cced971fd3 [ARM][ReachingDefs] RDA in LoLoops
Add several new methods to ReachingDefAnalysis:
- getReachingMIDef, instead of returning an integer, return the
  MachineInstr that produces the def.
- getInstFromId, return a MachineInstr for which the given integer
  corresponds to.
- hasSameReachingDef, return whether two MachineInstr use the same
  def of a register.
- isRegUsedAfter, return whether a register is used after a given
  MachineInstr.

These methods have been used in ARMLowOverhead to replace searching
for uses/defs.

Differential Revision: https://reviews.llvm.org/D70009
2019-11-26 10:13:46 +00:00
Raphael Isemann 7047a3a729 [lldb][NFC] Extract pointer to member type parsing from DWARFASTParserClang::ParseTypeFromDWARF
Part of the work to split up this monolithic parsing function.
2019-11-26 11:07:59 +01:00
Dávid Bolvanský 0e32fbd223 [InstCombine] Fixed std::min on some bots. NFCI 2019-11-26 11:06:31 +01:00