platform/upstream/llvm.git
4 years ago[lit] Remove unnecessary tracking of test_index
Julian Lettner [Fri, 18 Oct 2019 17:31:48 +0000 (17:31 +0000)]
[lit] Remove unnecessary tracking of test_index

llvm-svn: 375263

4 years ago[lit] Only send back test result from worker process
Julian Lettner [Fri, 18 Oct 2019 17:31:45 +0000 (17:31 +0000)]
[lit] Only send back test result from worker process

Avoid sending back the whole run.Test object (which needs to be pickled)
from the worker process when we are only interested in the test result.

llvm-svn: 375262

4 years ago[Codegen] Link MIRParser into CodeGenTests to fix MachineSizeOptsTest building
Roman Lebedev [Fri, 18 Oct 2019 17:18:21 +0000 (17:18 +0000)]
[Codegen] Link MIRParser into CodeGenTests to fix MachineSizeOptsTest building

llvm-svn: 375261

4 years ago[NFC][CVP] Add @llvm.*.sat tests where we could prove both no-overflows
Roman Lebedev [Fri, 18 Oct 2019 17:18:12 +0000 (17:18 +0000)]
[NFC][CVP] Add @llvm.*.sat tests where we could prove both no-overflows

llvm-svn: 375260

4 years ago[Reproducer] Use ::rtrim() to remove trailing control characters.
Jonas Devlieghere [Fri, 18 Oct 2019 17:11:48 +0000 (17:11 +0000)]
[Reproducer] Use ::rtrim() to remove trailing control characters.

Pavel correctly pointed out that removing all control characters from
the working directory is overkill. It should be sufficient to just strip
the last ones.

llvm-svn: 375259

4 years ago[Format] Add format check for throwing negative numbers
Brian Gesiak [Fri, 18 Oct 2019 16:59:02 +0000 (16:59 +0000)]
[Format] Add format check for throwing negative numbers

Summary:
The code `throw -1;` is currently formatted by clang-format as
`throw - 1;`. This diff adds a fix for this edge case and a test to check
for this in the future.

For context, I am looking into a related bug in the clang-formatting of
coroutine keywords: `co_yield -1;` is also reformatted in this manner
as `co_yield - 1;`. A later diff will add these changes and tests for the
`co_yield` and `co_return` keywords.

Patch by Jonathan Thomas (jonathoma)!

Reviewers: modocache, sammccall, Quuxplusone

Reviewed By: sammccall

Subscribers: cfe-commits

Tags: #clang-format, #clang

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

llvm-svn: 375258

4 years ago[DOCS]Update list of implemented constructs, NFC.
Alexey Bataev [Fri, 18 Oct 2019 16:53:54 +0000 (16:53 +0000)]
[DOCS]Update list of implemented constructs, NFC.

llvm-svn: 375257

4 years agogn build: Merge r375254
GN Sync Bot [Fri, 18 Oct 2019 16:52:12 +0000 (16:52 +0000)]
gn build: Merge r375254

llvm-svn: 375256

4 years ago[OPENMP50]Add support for master taskloop simd.
Alexey Bataev [Fri, 18 Oct 2019 16:47:35 +0000 (16:47 +0000)]
[OPENMP50]Add support for master taskloop simd.

Added  trsing/semantics/codegen for combined construct master taskloop simd.

llvm-svn: 375255

4 years ago[PGO][PGSO] SizeOpts changes.
Hiroshi Yamauchi [Fri, 18 Oct 2019 16:46:01 +0000 (16:46 +0000)]
[PGO][PGSO] SizeOpts changes.

Summary:
(Split of off D67120)

SizeOpts/MachineSizeOpts changes for profile guided size optimization.

Reviewers: davidxl

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 375254

4 years ago[X86] combineX86ShufflesRecursively - pull out isTargetShuffleVariableMask. NFCI.
Simon Pilgrim [Fri, 18 Oct 2019 16:39:01 +0000 (16:39 +0000)]
[X86] combineX86ShufflesRecursively - pull out isTargetShuffleVariableMask. NFCI.

llvm-svn: 375253

4 years ago[IR] Reimplement FPMathOperator::classof as a whitelist.
Jay Foad [Fri, 18 Oct 2019 16:16:36 +0000 (16:16 +0000)]
[IR] Reimplement FPMathOperator::classof as a whitelist.

Summary:
This makes it much easier to verify that the implementation matches the
documentation. It uncovered a bug in the unit tests where we were
accidentally setting fast math flags on a load instruction.

Reviewers: spatel, wristow, arsenm, hfinkel, aemerson, efriedma, cameron.mcinally, mcberg2017, jmolloy

Subscribers: wdng, llvm-commits

Tags: #llvm

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

llvm-svn: 375252

4 years agoUpdate docs for fast-math flags.
Jay Foad [Fri, 18 Oct 2019 16:07:09 +0000 (16:07 +0000)]
Update docs for fast-math flags.

This adds fneg, phi and select to the list of operations that may use
fast-math flags.

llvm-svn: 375250

4 years ago[clang-format] fix regression recognizing casts in Obj-C calls
Krasimir Georgiev [Fri, 18 Oct 2019 15:21:06 +0000 (15:21 +0000)]
[clang-format] fix regression recognizing casts in Obj-C calls

Summary:
r373922 added checks for a few tokens that, following an `)` make it
unlikely that the `)` is the closing paren of a cast expression. The
specific check for `tok::l_square` there introduced a regression for
casts of Obj-C calls, like:
```
(cast)[func arg]
```
From the tests added in r373922, I believe the `tok::l_square` case is added to
capture the case where a non-cast `)` is directly followed by an
attribute specifier, like:
```
int f(int x) [[noreturn]];
```

I've specialized the code to look for such attribute specifier instead
of `tok::l_square` in general. Also, I added a regression test and moved
the test cases added in r373922 to an already existing place documenting
other instances of historically misidentified casts.

Reviewers: MyDeveloperDay

Reviewed By: MyDeveloperDay

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 375247

4 years ago[tooling] Relax an assert when multiple GPU targets are specified.
Michael Liao [Fri, 18 Oct 2019 15:03:34 +0000 (15:03 +0000)]
[tooling] Relax an assert when multiple GPU targets are specified.

llvm-svn: 375245

4 years agoProcessMinidump: Suppress reporting stop for signal '0'
Joseph Tremoulet [Fri, 18 Oct 2019 15:02:16 +0000 (15:02 +0000)]
ProcessMinidump: Suppress reporting stop for signal '0'

Summary:
The minidump exception stream can report an exception record with
signal 0.  If we try to create a stop reason with signal zero, processing
of the stop event won't find anything, and the debugger will hang.
So, simply early-out of RefreshStateAfterStop in this case.

Also set the UnixSignals object in DoLoadCore as is done for
ProcessElfCore.

Reviewers: labath, clayborg, jfb

Reviewed By: labath, clayborg

Subscribers: dexonsmith, lldb-commits

Tags: #lldb

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

llvm-svn: 375244

4 years agoLLDB: Use LLVM's type for minidump ExceptionStream [NFC]
Joseph Tremoulet [Fri, 18 Oct 2019 14:59:10 +0000 (14:59 +0000)]
LLDB: Use LLVM's type for minidump ExceptionStream [NFC]

Summary: The types defined for it in LLDB are now redundant with core types.

Reviewers: labath, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 375243

4 years agoUpdate MinidumpYAML to use minidump::Exception for exception stream
Joseph Tremoulet [Fri, 18 Oct 2019 14:56:19 +0000 (14:56 +0000)]
Update MinidumpYAML to use minidump::Exception for exception stream

Reviewers: labath, jhenderson, clayborg, MaskRay, grimar

Reviewed By: grimar

Subscribers: lldb-commits, grimar, MaskRay, hiraditya, llvm-commits

Tags: #llvm, #lldb

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

llvm-svn: 375242

4 years ago[AMDGPU][MC][GFX10] Added sdwa/dpp versions of v_cndmask_b32
Dmitry Preobrazhensky [Fri, 18 Oct 2019 14:49:53 +0000 (14:49 +0000)]
[AMDGPU][MC][GFX10] Added sdwa/dpp versions of v_cndmask_b32

See https://bugs.llvm.org/show_bug.cgi?id=43608

Reviewers: arsenm, rampitec

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

llvm-svn: 375241

4 years ago[DFAPacketizer] Fix large compile-time regression for VLIW targets
James Molloy [Fri, 18 Oct 2019 14:48:35 +0000 (14:48 +0000)]
[DFAPacketizer] Fix large compile-time regression for VLIW targets

D68992 / rL375086 refactored the packetizer and removed a bunch of logic. Unfortunately it creates an Automaton object whenever a DFAPacketizer is required. These objects have no longevity, and in particular on a debug build the population of the Automaton's transition map from the underlying table is very slow (because it is called ~10 times per MachineFunction, in the testcase I'm looking at).

This patch changes Automaton to wrap its underlying constant data in std::shared_ptr, which allows trivial copy construction. The DFAPacketizer creation function now creates a static archetypical Automaton and copies that whenever a new DFAPacketizer is required.

This takes a testcase down from ~20s to ~0.5s in debug mode.

llvm-svn: 375240

4 years agoAdd ExceptionStream to llvm::Object::minidump
Joseph Tremoulet [Fri, 18 Oct 2019 14:43:15 +0000 (14:43 +0000)]
Add ExceptionStream to llvm::Object::minidump

Summary:
This will allow updating MinidumpYAML and LLDB to use this common
definition.

Reviewers: labath, jhenderson, clayborg

Reviewed By: labath

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 375239

4 years ago[lld][coff] Add missing dependency to fix build.
Michael Liao [Fri, 18 Oct 2019 14:31:58 +0000 (14:31 +0000)]
[lld][coff] Add missing dependency to fix build.

llvm-svn: 375238

4 years agoOne more attempt to fix PS4 buildbot after r375219
Eugene Leviant [Fri, 18 Oct 2019 14:11:19 +0000 (14:11 +0000)]
One more attempt to fix PS4 buildbot after r375219

PS4 buildbot seems to be dropping variable names for some reason

llvm-svn: 375237

4 years agoAttempt to fix PS4 buildbot after r375219
Eugene Leviant [Fri, 18 Oct 2019 13:52:51 +0000 (13:52 +0000)]
Attempt to fix PS4 buildbot after r375219

llvm-svn: 375235

4 years agoAdd REQUIRES: x86 to more tests which need the x86 llvm target built
Pavel Labath [Fri, 18 Oct 2019 13:49:40 +0000 (13:49 +0000)]
Add REQUIRES: x86 to more tests which need the x86 llvm target built

llvm-svn: 375234

4 years agoRevert r375152 as it is causing failures on EXPENSIVE_CHECKS bot
Nemanja Ivanovic [Fri, 18 Oct 2019 13:38:46 +0000 (13:38 +0000)]
Revert r375152 as it is causing failures on EXPENSIVE_CHECKS bot

llvm-svn: 375233

4 years ago[SCEV] Removing deprecated comment in ScalarEvolutionExpander
Victor Campos [Fri, 18 Oct 2019 13:33:45 +0000 (13:33 +0000)]
[SCEV] Removing deprecated comment in ScalarEvolutionExpander

Removing a comment in the ScalarEvolutionExpander.cpp file that was about the
class SCEVSDivExpr, which has been long gone from LLVM.

llvm-svn: 375232

4 years ago[AMDGPU][MC][GFX9] Corrected parsing of v_cndmask_b32_sdwa
Dmitry Preobrazhensky [Fri, 18 Oct 2019 13:31:53 +0000 (13:31 +0000)]
[AMDGPU][MC][GFX9] Corrected parsing of v_cndmask_b32_sdwa

See https://bugs.llvm.org/show_bug.cgi?id=43607

Reviewers: arsenm, rampitec

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

llvm-svn: 375231

4 years ago[NFC][CVP] Count all the no-wraps we proved
Roman Lebedev [Fri, 18 Oct 2019 13:20:16 +0000 (13:20 +0000)]
[NFC][CVP] Count all the no-wraps we proved

Summary:
It looks like this is the only missing statistic in the CVP pass.
Since we prove NSW and NUW separately i'd think we should count them separately too.

Reviewers: nikic, spatel, reames

Reviewed By: spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 375230

4 years ago[AArch64] Adding support for PMMIR_EL1 register
Victor Campos [Fri, 18 Oct 2019 12:40:29 +0000 (12:40 +0000)]
[AArch64] Adding support for PMMIR_EL1 register

Summary:
The PMMIR_EL1 register is present in Armv8.4 with PMU extension.
This patch adds support for it.

Reviewers: t.p.northover, dnsampaio

Reviewed By: dnsampaio

Subscribers: kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 375228

4 years ago[clangd] Report declaration references in findExplicitReferences.
Haojian Wu [Fri, 18 Oct 2019 12:07:19 +0000 (12:07 +0000)]
[clangd] Report declaration references in findExplicitReferences.

Reviewers: ilya-biryukov

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

Tags: #clang

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

llvm-svn: 375226

4 years ago[ThinLTOCodeGenerator] Add support for index-based WPD
Eugene Leviant [Fri, 18 Oct 2019 11:58:21 +0000 (11:58 +0000)]
[ThinLTOCodeGenerator] Add support for index-based WPD

This is clang part of the patch. It adds -flto-unit flag for thin LTO
builds on Mac and PS4

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

llvm-svn: 375224

4 years ago[AArch64][SVE] Add SPLAT_VECTOR ISD Node
Graham Hunter [Fri, 18 Oct 2019 11:48:35 +0000 (11:48 +0000)]
[AArch64][SVE] Add SPLAT_VECTOR ISD Node

Adds a new ISD node to replicate a scalar value across all elements of
a vector. This is needed for scalable vectors, since BUILD_VECTOR cannot
be used.

Fixes up default type legalization for scalable vectors after the
new MVT type ranges were introduced.

At present I only use this node for scalable vectors. A DAGCombine has
been added to transform a BUILD_VECTOR into a SPLAT_VECTOR if all
elements are the same, but only if the default operation action of
Expand has been overridden by the target.

I've only added result promotion legalization for scalable vector
i8/i16/i32/i64 types in AArch64 for now.

Reviewers: t.p.northover, javed.absar, greened, cameron.mcinally, jmolloy

Reviewed By: jmolloy

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

llvm-svn: 375222

4 years agoSystemInitializerCommon fix compilation on linux
Pavel Labath [Fri, 18 Oct 2019 11:47:23 +0000 (11:47 +0000)]
SystemInitializerCommon fix compilation on linux

C++ defines two overloads of std::iscntrl. One in <cctype> and one in
<locale>. On linux we seem to include both which makes the std::erase_if
call ambiguous.

Wrap std::iscntrl call in a lambda to ensure regular overload
resolution.

llvm-svn: 375221

4 years ago[Arm][libsanitizer] Fix arm libsanitizer failure with bleeding edge glibc
Sjoerd Meijer [Fri, 18 Oct 2019 11:01:45 +0000 (11:01 +0000)]
[Arm][libsanitizer] Fix arm libsanitizer failure with bleeding edge glibc

Glibc has recently introduced changed to the mode field in ipc_perm in commit
2f959dfe849e0646e27403f2e4091536496ac0f0. For Arm this means that the mode
field no longer has the same size.

This causes an assert failure against libsanitizer's internal copy of ipc_perm.
Since this change can't be easily detected I am adding arm to the list of
targets that are excluded from this check.

Patch by: Tamar Christina

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

llvm-svn: 375220

4 years ago[ThinLTOCodeGenerator] Add support for index-based WPD
Eugene Leviant [Fri, 18 Oct 2019 10:54:14 +0000 (10:54 +0000)]
[ThinLTOCodeGenerator] Add support for index-based WPD

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

llvm-svn: 375219

4 years ago[LLD] [COFF] Try to report source locations for duplicate symbols
Martin Storsjo [Fri, 18 Oct 2019 10:43:15 +0000 (10:43 +0000)]
[LLD] [COFF] Try to report source locations for duplicate symbols

This fixes the second part of PR42407.

For files with dwarf debug info, it manually loads and iterates
.debug_info to find the declared location of variables, to allow
reporting them. (This matches the corresponding code in the ELF
linker.)

For functions, it uses the existing getFileLineDwarf which uses
LLVMSymbolizer for translating addresses to file lines.

In object files with codeview debug info, only the source location
of duplicate functions is printed. (And even there, only for the
first input file. The getFileLineCodeView function requires the
object file to be fully loaded and initialized to properly resolve
source locations, but duplicate symbols are reported at a stage when
the second object file isn't fully loaded yet.)

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

llvm-svn: 375218

4 years ago[AArch64] Don't combine callee-save and local stack adjustment when optimizing for...
David Green [Fri, 18 Oct 2019 10:35:46 +0000 (10:35 +0000)]
[AArch64] Don't combine callee-save and local stack adjustment when optimizing for size

For arm64, D18619 introduced the ability to combine bumping the stack pointer
upfront in case it needs to be bumped for both the callee-save area as well as
the local stack area.

That diff already remarks that "This change can cause an increase in
instructions", but argues that even when that happens, it should be still be a
performance benefit because the number of micro-ops is reduced.

We have observed that this code-size increase can be significant in practice.
This diff disables combining stack bumping for methods that are marked as
optimize-for-size.

Example of a prologue with the behavior before this diff (combining stack bumping when possible):
  sub        sp, sp, #0x40
  stp        d9, d8, [sp, #0x10]
  stp        x20, x19, [sp, #0x20]
  stp        x29, x30, [sp, #0x30]
  add        x29, sp, #0x30
  [... compute x8 somehow ...]
  stp        x0, x8, [sp]

And after this  diff, if the method is marked as optimize-for-size:
  stp        d9, d8, [sp, #-0x30]!
  stp        x20, x19, [sp, #0x10]
  stp        x29, x30, [sp, #0x20]
  add        x29, sp, #0x20
  [... compute x8 somehow ...]
  stp        x0, x8, [sp, #-0x10]!

Note that without combining the stack bump there are two auto-decrements,
nicely folded into the stp instructions, whereas otherwise there is a single
sub sp, ... instruction, but not folded.

Patch by Nikolai Tillmann!

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

llvm-svn: 375217

4 years ago[X86] Regenerate memcmp tests and add X64-AVX512 common prefix
Simon Pilgrim [Fri, 18 Oct 2019 09:59:51 +0000 (09:59 +0000)]
[X86] Regenerate memcmp tests and add X64-AVX512 common prefix

Should help make the changes in D69157 clearer

llvm-svn: 375215

4 years agoFix MSVC "not all control paths return a value" warning. NFCI.
Simon Pilgrim [Fri, 18 Oct 2019 09:59:40 +0000 (09:59 +0000)]
Fix MSVC "not all control paths return a value" warning. NFCI.

llvm-svn: 375214

4 years agoFix MSVC "result of 32-bit shift implicitly converted to 64 bits" warnings. NFCI.
Simon Pilgrim [Fri, 18 Oct 2019 09:59:31 +0000 (09:59 +0000)]
Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warnings. NFCI.

llvm-svn: 375213

4 years ago[Codegen] Alter the default promotion for saturating adds and subs
David Green [Fri, 18 Oct 2019 09:47:48 +0000 (09:47 +0000)]
[Codegen] Alter the default promotion for saturating adds and subs

The default promotion for the add_sat/sub_sat nodes currently does:
    ANY_EXTEND iN to iM
    SHL by M-N
    [US][ADD|SUB]SAT
    L/ASHR by M-N

If the promoted add_sat or sub_sat node is not legal, this can produce code
that effectively does a lot of shifting (and requiring large constants to be
materialised) just to use the overflow flag. It is simpler to just do the
saturation manually, using the higher bitwidth addition and a min/max against
the saturating bounds. That is what this patch attempts to do.

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

llvm-svn: 375211

4 years ago[AArch64][SVE] Implement unpack intrinsics
Kerry McLaughlin [Fri, 18 Oct 2019 09:40:16 +0000 (09:40 +0000)]
[AArch64][SVE] Implement unpack intrinsics

Summary:
Implements the following intrinsics:
  - int_aarch64_sve_sunpkhi
  - int_aarch64_sve_sunpklo
  - int_aarch64_sve_uunpkhi
  - int_aarch64_sve_uunpklo

This patch also adds AArch64ISD nodes for UNPK instead of implementing
the intrinsics directly, as they are required for a future patch which
implements the sign/zero extension of legal vectors.

This patch includes tests for the Subdivide2Argument type added by D67549

Reviewers: sdesmalen, SjoerdMeijer, greened, rengolin, rovka

Reviewed By: greened

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

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

llvm-svn: 375210

4 years ago[InstCombine] Fix miscompile bug in canEvaluateShuffled
Bjorn Pettersson [Fri, 18 Oct 2019 07:42:02 +0000 (07:42 +0000)]
[InstCombine] Fix miscompile bug in canEvaluateShuffled

Summary:
Add restrictions in canEvaluateShuffled to prevent that we for example
transform

  %0 = insertelement <2 x i16> undef, i16 %a, i32 0
  %1 = srem <2 x i16> %0, <i16 2, i16 1>
  %2 = shufflevector <2 x i16> %1, <2 x i16> undef, <2 x i32> <i32 undef, i32 0>

into

   %1 = insertelement <2 x i16> undef, i16 %a, i32 1
   %2 = srem <2 x i16> %1, <i16 undef, i16 2>

as having an undef denominator makes the srem undefined (for all
vector elements).

Fixes: https://bugs.llvm.org/show_bug.cgi?id=43689

Reviewers: spatel, lebedev.ri

Reviewed By: spatel, lebedev.ri

Subscribers: lebedev.ri, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 375208

4 years ago[InstCombine] Pre-commit of test case showing miscompile bug in canEvaluateShuffled
Bjorn Pettersson [Fri, 18 Oct 2019 07:41:53 +0000 (07:41 +0000)]
[InstCombine] Pre-commit of test case showing miscompile bug in canEvaluateShuffled

Adding the reproducer from  https://bugs.llvm.org/show_bug.cgi?id=43689,
showing that instcombine is doing a bad transform. It transforms

  %0 = insertelement <2 x i16> undef, i16 %a, i32 0
  %1 = srem <2 x i16> %0, <i16 2, i16 1>
  %2 = shufflevector <2 x i16> %1, <2 x i16> undef, <2 x i32> <i32 undef, i32 0>

into

   %1 = insertelement <2 x i16> undef, i16 %a, i32 1
   %2 = srem <2 x i16> %1, <i16 undef, i16 2>

The undef denominator makes the whole srem undefined.

llvm-svn: 375207

4 years agoUpdate release notes
Rui Ueyama [Fri, 18 Oct 2019 06:11:16 +0000 (06:11 +0000)]
Update release notes

llvm-svn: 375206

4 years ago[WebAssembly] -pthread implies -target-feature +sign-ext
Thomas Lively [Fri, 18 Oct 2019 04:34:26 +0000 (04:34 +0000)]
[WebAssembly] -pthread implies -target-feature +sign-ext

Summary:
The sign extension proposal was motivated by a desire to not have
separate sign-extending atomic operations, so it is meant to be
enabled when threads are used.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, jfb, cfe-commits

Tags: #clang

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

llvm-svn: 375199

4 years ago[X86] Emit KTEST when possible
David Zarzycki [Fri, 18 Oct 2019 03:45:52 +0000 (03:45 +0000)]
[X86] Emit KTEST when possible

https://reviews.llvm.org/D69111

llvm-svn: 375197

4 years ago[lit] Move resolving of XFAIL result codes out of Test.setResult
Julian Lettner [Fri, 18 Oct 2019 00:50:37 +0000 (00:50 +0000)]
[lit] Move resolving of XFAIL result codes out of Test.setResult

This will allow us to serialize just the result object instead of the
whole lit.Test object back from the worker to the main lit process.

llvm-svn: 375195

4 years ago[lit] worker.py: Improve code for executing a single test
Julian Lettner [Fri, 18 Oct 2019 00:50:34 +0000 (00:50 +0000)]
[lit] worker.py: Improve code for executing a single test

llvm-svn: 375194

4 years ago[ScopBuilder] Fix bug 38358 by preserving correct order of ScopStmts.
Michael Kruse [Thu, 17 Oct 2019 23:55:35 +0000 (23:55 +0000)]
[ScopBuilder] Fix bug 38358 by preserving correct order of ScopStmts.

ScopBuilder::buildEqivClassBlockStmts creates ScopStmts for instruction
groups in basic block and inserts these ScopStmts into Scop::StmtMap,
however, as described in llvm.org/PR38358, comment #5, StmtScops are
inserted into vector ScopStmt[BB] in wrong order.  As a result,
ScopBuilder::buildSchedule creates wrong order sequence node.

Looking closer to code, it's clear there is no equivalent classes with
interleaving isOrderedInstruction(memory access) instructions after
joinOrderedInstructions.  Afterwards, ScopStmts need to be created and
inserted in the original order of memory access instructions, however,
at the moment ScopStmts are inserted in the order of leader instructions
which are probably not memory access instructions.

The fix is simple with a standalone loop scanning
isOrderedInstruction(memory access) instructions in basic block and
inserting elements into LeaderToInstList one by one.  The patch also
removes double reversing operations which are now unnecessary.

New test preserve-equiv-class-order-in-basic_block.ll is also added.

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

llvm-svn: 375192

4 years ago[IndVars] Factor out some common code into a utility function
Philip Reames [Thu, 17 Oct 2019 23:49:46 +0000 (23:49 +0000)]
[IndVars] Factor out some common code into a utility function

As requested in review of D69009

llvm-svn: 375191

4 years ago[Test] Precommit test for D69006
Philip Reames [Thu, 17 Oct 2019 23:32:35 +0000 (23:32 +0000)]
[Test] Precommit test for D69006

llvm-svn: 375190

4 years ago[analyzer] exploded-graph-rewriter: Fix typo in r375186. Unbreaks tests.
Artem Dergachev [Thu, 17 Oct 2019 23:27:35 +0000 (23:27 +0000)]
[analyzer] exploded-graph-rewriter: Fix typo in r375186. Unbreaks tests.

llvm-svn: 375189

4 years ago[lldb][NFC] Fix typo in DWARFASTParserClang.cpp
Raphael Isemann [Thu, 17 Oct 2019 23:11:32 +0000 (23:11 +0000)]
[lldb][NFC] Fix typo in DWARFASTParserClang.cpp

llvm-svn: 375187

4 years ago[analyzer] Assign truly stable identifiers to exploded nodes.
Artem Dergachev [Thu, 17 Oct 2019 23:10:09 +0000 (23:10 +0000)]
[analyzer] Assign truly stable identifiers to exploded nodes.

ExplodedGraph nodes will now have a numeric identifier stored in them
which will keep track of the order in which the nodes were created
and it will be fully deterministic both accross runs and across machines.

This is extremely useful for debugging as it allows reliably setting
conditional breakpoints by node IDs.

llvm-svn: 375186

4 years ago[analyzer] Display cast kinds in program point dumps.
Artem Dergachev [Thu, 17 Oct 2019 23:10:05 +0000 (23:10 +0000)]
[analyzer] Display cast kinds in program point dumps.

Because cast expressions have their own hierarchy, it's extremely useful
to have some information about what kind of casts are we dealing with.

llvm-svn: 375185

4 years ago[analyzer] exploded-graph-rewriter: Make node headers a bit lighter.
Artem Dergachev [Thu, 17 Oct 2019 23:10:02 +0000 (23:10 +0000)]
[analyzer] exploded-graph-rewriter: Make node headers a bit lighter.

The 50% grey color is too dark on some monitors.

llvm-svn: 375184

4 years agoDebugInfo: Move loclist base address from DwarfFile to DebugLocStream
David Blaikie [Thu, 17 Oct 2019 23:02:19 +0000 (23:02 +0000)]
DebugInfo: Move loclist base address from DwarfFile to DebugLocStream

There's no need to have more than one of these (there can be two
DwarfFiles - one for the .o, one for the .dwo - but only one loc/loclist
section (either in the .o or the .dwo) & certainly one per
DebugLocStream, which is currently singular in DwarfDebug)

llvm-svn: 375183

4 years agoeliminate one form of PythonObject::Reset()
Lawrence D'Anna [Thu, 17 Oct 2019 22:22:09 +0000 (22:22 +0000)]
eliminate one form of PythonObject::Reset()

Summary:
I'd like to eliminate all forms of Reset() and all public constructors
on these objects, so the only way to make them is with Take<> and Retain<>
and the only way to copy or move them is with actual c++ copy, move, or
assignment.

This is a simple place to start.

Reviewers: JDevlieghere, clayborg, labath, jingham

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 375182

4 years agoclean up the implementation of PythonCallable::GetNumArguments
Lawrence D'Anna [Thu, 17 Oct 2019 22:22:06 +0000 (22:22 +0000)]
clean up the implementation of PythonCallable::GetNumArguments

Summary:
The current implementation of PythonCallable::GetNumArguments
is not exception safe, has weird semantics, and is just plain
incorrect for some kinds of functions.

Python 3.3 introduces inspect.signature, which lets us easily
query for function signatures in a sane and documented way.

This patch leaves the old implementation in place for < 3.3,
but uses inspect.signature for modern pythons.   It also leaves
the old weird semantics in place, but with FIXMEs grousing about
it.   We should update the callers and fix the semantics in a
subsequent patch.    It also adds some tests.

Reviewers: JDevlieghere, clayborg, labath, jingham

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 375181

4 years agoDebugInfo: Remove unused parameter (from DwarfDebug.cpp:emitListsTableHeaderStart)
David Blaikie [Thu, 17 Oct 2019 22:11:40 +0000 (22:11 +0000)]
DebugInfo: Remove unused parameter (from DwarfDebug.cpp:emitListsTableHeaderStart)

llvm-svn: 375180

4 years ago[ARM] Fix arm_neon.h with -flax-vector-conversions=none, part 3
Eli Friedman [Thu, 17 Oct 2019 21:57:28 +0000 (21:57 +0000)]
[ARM] Fix arm_neon.h with -flax-vector-conversions=none, part 3

It's completely impossible to check that I've actually found all the
issues, due to the use of macros in arm_neon.h, but hopefully this time
it'll take more than a few hours for someone to find another issue.

I have no idea why, but apparently there's a rule that some, but not
all, builtins which should take an fp16 vector actually take an int8
vector as an argument.  Fix this, and add test coverage.

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

llvm-svn: 375179

4 years agoReland [llvm-objdump] Use a counter for llvm-objdump -h instead of the section index.
Jordan Rupprecht [Thu, 17 Oct 2019 21:55:43 +0000 (21:55 +0000)]
Reland [llvm-objdump] Use a counter for llvm-objdump -h instead of the section index.

This relands r374931 (reverted in r375088). It fixes 32-bit builds by using the right format string specifier for uint64_t (PRIu64) instead of `%d`.

Original description:

When listing the index in `llvm-objdump -h`, use a zero-based counter instead of the actual section index (e.g. shdr->sh_index for ELF).

While this is effectively a noop for now (except one unit test for XCOFF), the index values will change in a future patch that filters certain sections out (e.g. symbol tables). See D68669 for more context. Note: the test case in `test/tools/llvm-objdump/X86/section-index.s` already covers the case of incrementing the section index counter when sections are skipped.

Reviewers: grimar, jhenderson, espindola

Reviewed By: grimar

Subscribers: emaste, sbc100, arichardson, aheejin, arphaman, seiya, llvm-commits, MaskRay

Tags: #llvm

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

llvm-svn: 375178

4 years ago[clang-offload-wrapper][NFC] Use captured name of the entry type in LIT test
Sergey Dmitriev [Thu, 17 Oct 2019 21:55:39 +0000 (21:55 +0000)]
[clang-offload-wrapper][NFC] Use captured name of the entry type in LIT test

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

llvm-svn: 375177

4 years ago[Error] Make llvm::cantFail include the original error messages
Don Hinton [Thu, 17 Oct 2019 21:54:15 +0000 (21:54 +0000)]
[Error] Make llvm::cantFail include the original error messages

Summary:
The current implementation eats the current errors and just outputs
the message parameter passed to llvm::cantFail.  This change appends
the original error message(s), so the user can see exactly why
cantFail failed.  New logic is conditional on NDEBUG.

Reviewed By: lhames

Tags: #llvm

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

llvm-svn: 375176

4 years ago[AMDGPU] drop getIsFP td helper
Stanislav Mekhanoshin [Thu, 17 Oct 2019 21:46:56 +0000 (21:46 +0000)]
[AMDGPU] drop getIsFP td helper

We already have isFloatType helper, and they are out of sync.
Drop one and merge the type list.

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

llvm-svn: 375175

4 years ago(NFC) Delete variable made unused by llvm-svn: 375160
Sterling Augustine [Thu, 17 Oct 2019 21:40:12 +0000 (21:40 +0000)]
(NFC) Delete variable made unused by llvm-svn: 375160

Reviewers: aprantl

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 375174

4 years ago[lldb] X-fail tests that use constructors in expressions on Windows
Raphael Isemann [Thu, 17 Oct 2019 21:27:26 +0000 (21:27 +0000)]
[lldb] X-fail tests that use constructors in expressions on Windows

These tests were testing a bug related to constructors. It seems that
on Windows the expression command can't construct objects (or at least,
call their constructor explicitly which is required for the tests), so
this is just x-failing them until Windows actually supports constructor calls.

llvm-svn: 375173

4 years ago[test] Add a .clang-format file for the shell test.
Jonas Devlieghere [Thu, 17 Oct 2019 21:23:35 +0000 (21:23 +0000)]
[test] Add a .clang-format file for the shell test.

The API tests have a .clang-format file that disables formatting
altogether. While this is needed for some tests, it also leads to
inconsistency between test files. The shell tests suffer from a similar
problem: a test with a source-file extension (.c, .cpp) will get
formatted, potentially breaking up lines and leading to invalid RUN
commands.

Rather than completely disabling formatting here, I propose to not
enforce a line limit instead. That way tests will be consistent, but you
can still have long run commands (as is not uncommon in LLVM either) and
use breakpoints with patters that extend beyond 80 cols.

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

llvm-svn: 375172

4 years ago[lit] Move computation of deadline up into base class
Julian Lettner [Thu, 17 Oct 2019 21:12:45 +0000 (21:12 +0000)]
[lit] Move computation of deadline up into base class

llvm-svn: 375171

4 years agoAdapt Windows test to API change.
Adrian Prantl [Thu, 17 Oct 2019 20:51:55 +0000 (20:51 +0000)]
Adapt Windows test to API change.

llvm-svn: 375170

4 years ago[llvm-objcopy] Add support for shell wildcards
Jordan Rupprecht [Thu, 17 Oct 2019 20:51:00 +0000 (20:51 +0000)]
[llvm-objcopy] Add support for shell wildcards

Summary: GNU objcopy accepts the --wildcard flag to allow wildcard matching on symbol-related flags. (Note: it's implicitly true for section flags).

The basic syntax is to allow *, ?, \, and [] which work similarly to how they work in a shell. Additionally, starting a wildcard with ! causes that wildcard to prevent it from matching a flag.

Use an updated GlobPattern in libSupport to handle these patterns. It does not fully match the `fnmatch` used by GNU objcopy since named character classes (e.g. `[[:digit:]]`) are not supported, but this should support most existing use cases (mostly just `*` is what's used anyway).

Reviewers: jhenderson, MaskRay, evgeny777, espindola, alexshap

Reviewed By: MaskRay

Subscribers: nickdesaulniers, emaste, arichardson, hiraditya, jakehehrlich, abrachet, seiya, llvm-commits

Tags: #llvm

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

llvm-svn: 375169

4 years ago[OPENMP]Dow not emit warnings for uninitialized loop counters.
Alexey Bataev [Thu, 17 Oct 2019 20:35:08 +0000 (20:35 +0000)]
[OPENMP]Dow not emit warnings for uninitialized loop counters.

In OpenMP constructs all counters are initialized and we should not emit
warnings about uninitialized privatized loop control variables.

llvm-svn: 375167

4 years agolibhwasan initialisation include kernel syscall ABI relaxation
Evgeniy Stepanov [Thu, 17 Oct 2019 20:32:54 +0000 (20:32 +0000)]
libhwasan initialisation include kernel syscall ABI relaxation

Summary:
Until now AArch64 development has been on patched kernels that have an always
on relaxed syscall ABI where tagged pointers are accepted.
The patches that have gone into the mainline kernel rely on each process opting
in to this relaxed ABI.

This commit adds code to choose that ABI into __hwasan_init.

The idea has already been agreed with one of the hwasan developers
(http://lists.llvm.org/pipermail/llvm-dev/2019-September/135328.html).

The patch ignores failures of `EINVAL` for Android, since there are older versions of the Android kernel that don't require this `prctl` or even have the relevant values.  Avoiding EINVAL will let the library run on them.

I've tested this on an AArch64 VM running a kernel that requires this
prctl, having compiled both with clang and gcc.

Patch by Matthew Malcomson.

Reviewers: eugenis, kcc, pcc

Reviewed By: eugenis

Subscribers: srhines, kristof.beyls, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 375166

4 years agoReland "[lit] Synthesize artificial deadline"
Julian Lettner [Thu, 17 Oct 2019 20:22:32 +0000 (20:22 +0000)]
Reland "[lit] Synthesize artificial deadline"

We always want to use a deadline when calling `result.await`.  Let's
synthesize an artificial deadline (now plus one year) to simplify code
and do less busy waiting.

Thanks to Reid Kleckner for diagnosing that a deadline for of "positive
infinity" does not work with Python 3 anymore.  See commit:
4ff1e34b606d9a9fcfd8b8b5449a558315af94e5

I tested this patch with Python 2 and Python 3.

llvm-svn: 375165

4 years agoRevert "[LLDB] [test] Use %clang_cl instead of build.py in a few tests"
Martin Storsjo [Thu, 17 Oct 2019 20:14:19 +0000 (20:14 +0000)]
Revert "[LLDB] [test] Use %clang_cl instead of build.py in a few tests"

This reverts SVN r375156, as it seems to have broken tests when run
on macOS: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/2706/console

llvm-svn: 375163

4 years ago[Builtins] Downgrade duplicate source file warning from a fatal error to a warning.
Dan Liew [Thu, 17 Oct 2019 20:14:04 +0000 (20:14 +0000)]
[Builtins] Downgrade duplicate source file warning from a fatal error to a warning.

This is a follow up to r375150 to unbreak the `clang-ppc64be-linux` bot.
The commit caused running the tests to fail due to

```
llvm-lit:
/home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/projects/compiler-rt/test/builtins/Unit/lit.cfg.py:116:
fatal: builtins_source_features contains duplicates:
['librt_has_divtc3']
```

This commit should be reverted once the build system bug for powerpc is
fixed.

llvm-svn: 375162

4 years agoModernize the rest of the Find.* API (NFC)
Adrian Prantl [Thu, 17 Oct 2019 19:56:40 +0000 (19:56 +0000)]
Modernize the rest of the Find.* API (NFC)

This patch removes the size_t return value and the append parameter
from the remainder of the Find.* functions in LLDB's internal API. As
in the previous patches, this is motivated by the fact that these
parameters aren't really used, and in the case of the append parameter
were frequently implemented incorrectly.

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

llvm-svn: 375160

4 years ago[x86] add test for setcc to shift transform; NFC
Sanjay Patel [Thu, 17 Oct 2019 19:32:24 +0000 (19:32 +0000)]
[x86] add test for setcc to shift transform; NFC

llvm-svn: 375158

4 years ago[cmake] Pass external project source directories to sub-configures
Shoaib Meenai [Thu, 17 Oct 2019 19:24:58 +0000 (19:24 +0000)]
[cmake] Pass external project source directories to sub-configures

We're passing LLVM_EXTERNAL_PROJECTS to cross-compilation configures, so
we also need to pass the source directories of those projects, otherwise
configuration can fail from not finding them.

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

llvm-svn: 375157

4 years ago[LLDB] [test] Use %clang_cl instead of build.py in a few tests
Martin Storsjo [Thu, 17 Oct 2019 19:22:50 +0000 (19:22 +0000)]
[LLDB] [test] Use %clang_cl instead of build.py in a few tests

This allows explicitly specifying the intended target architecture,
for tests that aren't supposed to be executed, and that don't
require MSVC headers or libraries to be available.

(These tests already implicitly assumed to be built for x86; one
didn't specify anything, assuming x86_64, while the other specified
--arch=32, which only picks the 32 bit variant of the default target
architecture).

Join two comment lines in disassembly.cpp, to keep row numbers
checked in the test unchanged.

This fixes running check-lldb on arm linux.

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

llvm-svn: 375156

4 years ago[Object] Fix the return type of getOffset/getSize
Alexander Shaposhnikov [Thu, 17 Oct 2019 18:48:07 +0000 (18:48 +0000)]
[Object] Fix the return type of getOffset/getSize

Header64.offset/Header64.size are uint64_t, thus we should not
truncate them to unit32_t. Moreover, there are a number of places
where we sum the offset and the size (e.g. in various checks in MachOUniversal.cpp),
the truncation causes issues since the offset/size can perfectly fit into uint32_t,
while the sum overflows.

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

Test plan: make check-all

llvm-svn: 375154

4 years ago[NFC][InstCombine] Some more preparatory cleanup for dropRedundantMaskingOfLeftShiftI...
Roman Lebedev [Thu, 17 Oct 2019 18:30:03 +0000 (18:30 +0000)]
[NFC][InstCombine] Some more preparatory cleanup for dropRedundantMaskingOfLeftShiftInput()

llvm-svn: 375153

4 years ago[PowerPC] Turn on CR-Logical reducer pass
Nemanja Ivanovic [Thu, 17 Oct 2019 18:24:28 +0000 (18:24 +0000)]
[PowerPC] Turn on CR-Logical reducer pass

Quite a while ago, we implemented a pass that will reduce the number of
CR-logical operations we emit. It does so by converting a CR-logical operation
into a branch. We have kept this off by default because it seemed to cause a
significant regression with one benchmark.
However, that regression turned out to be due to a completely unrelated
reason - AADB introducing a self-copy that is a priority-setting nop and it was
just exacerbated by this pass.

Now that we understand the reason for the only degradation, we can turn this
pass on by default. We have long since fixed the cause for the degradation.

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

llvm-svn: 375152

4 years ago[lldb] Don't emit artificial constructor declarations as global functions
Raphael Isemann [Thu, 17 Oct 2019 18:16:50 +0000 (18:16 +0000)]
[lldb] Don't emit artificial constructor declarations as global functions

Summary:
When we have a artificial constructor DIE, we currently create from that a global function with the name of that class.
That ends up causing a bunch of funny errors such as "must use 'struct' tag to refer to type 'Foo' in this scope" when
doing `Foo f`. Also causes that constructing a class via `Foo()` actually just calls that global function.

The fix is that when we have an artificial method decl, we always treat it as handled even if we don't create a CXXMethodDecl
for it (which we never do for artificial methods at the moment).

Fixes rdar://55757491 and probably some other radars.

Reviewers: aprantl, vsk, shafik

Reviewed By: aprantl

Subscribers: jingham, shafik, labath, JDevlieghere, lldb-commits

Tags: #lldb

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

llvm-svn: 375151

4 years ago[Builtins] Provide a mechanism to selectively disable tests based on whether an imple...
Dan Liew [Thu, 17 Oct 2019 18:12:49 +0000 (18:12 +0000)]
[Builtins] Provide a mechanism to selectively disable tests based on whether an implementation is provided by a builtin library.

Summary:
If a platform removes some builtin implementations (e.g. via the
Darwin-excludes mechanism) then this can lead to test failures because
the test expects an implementation to be available.

To solve this lit features are added for each configuration based
on which sources are included in the builtin library. The features
are of the form `librt_has_<name>` where `<name>` is the name of the
source file with the file extension removed. This handles C and
assembly sources.

With the lit features in place it is possible to make certain tests
require them.

Example:

```
REQUIRES: librt_has_comparedf2
```

All top-level tests in `test/builtins/Unit` (i.e. not under
`arm`, `ppc`, and `riscv`) have been annotated with the appropriate
`REQUIRES: librt_has_*` statement.

rdar://problem/55520987

Reviewers: beanz, steven_wu, arphaman, dexonsmith, phosek, thakis

Subscribers: mgorny, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 375150

4 years agoReapply r375051: [support] GlobPattern: add support for `\` and `[!...]`, and allow...
Jordan Rupprecht [Thu, 17 Oct 2019 18:09:05 +0000 (18:09 +0000)]
Reapply r375051: [support] GlobPattern: add support for `\` and `[!...]`, and allow `]` in more places

Reland r375051 (reverted in r375052) after fixing lld tests on Windows in r375126 and r375131.

Original description: Update GlobPattern in libSupport to handle a few more cases. It does not fully match the `fnmatch` used by GNU objcopy since named character classes (e.g. `[[:digit:]]`) are not supported, but this should support most existing use cases (mostly just `*` is what's used anyway).

This will be used to implement the `--wildcard` flag in llvm-objcopy to be more compatible with GNU objcopy.

This is split off of D66613 to land the libSupport changes separately. The llvm-objcopy part will land soon.

Reviewers: jhenderson, MaskRay, evgeny777, espindola, alexshap

Reviewed By: MaskRay

Subscribers: nickdesaulniers, emaste, arichardson, hiraditya, jakehehrlich, abrachet, seiya, llvm-commits

Tags: #llvm

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

llvm-svn: 375149

4 years agoNFC: Fix variable only used in asserts by propagating the value.
Sterling Augustine [Thu, 17 Oct 2019 18:08:16 +0000 (18:08 +0000)]
NFC: Fix variable only used in asserts by propagating the value.

Summary:
This fixes builds with assertions disabled that would otherwise
fail with unused variable warnings

Subscribers: nemanjai, hiraditya, kbarton, MaskRay, jsji, llvm-commits

Tags: #llvm

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

llvm-svn: 375148

4 years ago[asan] Update Windows test expectations for LLVM's MS demangler
Reid Kleckner [Thu, 17 Oct 2019 17:59:11 +0000 (17:59 +0000)]
[asan] Update Windows test expectations for LLVM's MS demangler

After r375041 llvm-symbolizer uses it for demangling instead of
UnDecorateSymbolName. LLVM puts spaces after commas while Microsoft does
not.

llvm-svn: 375147

4 years ago[Reproducer] Surface error if setting the cwd fails
Jonas Devlieghere [Thu, 17 Oct 2019 17:58:44 +0000 (17:58 +0000)]
[Reproducer] Surface error if setting the cwd fails

Make sure that we surface an error if setting the current working
directory fails during replay.

llvm-svn: 375146

4 years agoDisable TestProcessList on windows
Walter Erquinigo [Thu, 17 Oct 2019 17:53:44 +0000 (17:53 +0000)]
Disable TestProcessList on windows

Summary: `platform process list -v` on windows doesn't show all the process arguments, making this test useless for that platform

Reviewers: stella.stamenova

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 375144

4 years agoRevert [lit] Synthesize artificial deadline
Reid Kleckner [Thu, 17 Oct 2019 17:44:35 +0000 (17:44 +0000)]
Revert [lit] Synthesize artificial deadline

Python on Windows raises this OverflowError:
      gotit = waiter.acquire(True, timeout)
  OverflowError: timestamp too large to convert to C _PyTime_t

So it seems this API behave the same way on every OS.

Also reverts the dependent commit a660dc590a5e8dafa1ba6ed56447ede151d17bd9.

llvm-svn: 375143

4 years ago[PowerPC] add tests for popcount with zext; NFC
Sanjay Patel [Thu, 17 Oct 2019 17:44:04 +0000 (17:44 +0000)]
[PowerPC] add tests for popcount with zext; NFC

llvm-svn: 375142

4 years ago[IndVars] Split loop predication out of optimizeLoopExits [NFC]
Philip Reames [Thu, 17 Oct 2019 17:29:07 +0000 (17:29 +0000)]
[IndVars] Split loop predication out of optimizeLoopExits [NFC]

In the process of writing D69009, I realized we have two distinct sets of invariants within this single function, and basically no shared logic.  The optimize loop exit transforms (including the new one in D69009) only care about *analyzeable* exits.  Loop predication, on the other hand, has to reason about *all* exits.  At the moment, we have the property (due to the requirement for an exact btc) that all exits are analyzeable, but that will likely change in the future as we add widenable condition support.

llvm-svn: 375138

4 years ago[codeview] Workaround for PR43479, don't re-emit instr labels
Reid Kleckner [Thu, 17 Oct 2019 17:28:31 +0000 (17:28 +0000)]
[codeview] Workaround for PR43479, don't re-emit instr labels

Summary:
In the long run we should come up with another mechanism for marking
call instructions as heap allocation sites, and remove this workaround.
For now, we've had two bug reports about this, so let's apply this
workaround. SLH (the other client of instruction labels) probably has
the same bug, but the solution there is more likely to be to mark the
call instruction as not duplicatable, which doesn't work for debug info.

Reviewers: akhuang

Subscribers: aprantl, hiraditya, aganea, chandlerc, llvm-commits

Tags: #llvm

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

llvm-svn: 375137

4 years agoRevert [Sanitizers] Add support for RISC-V 64-bit
Sam Elliott [Thu, 17 Oct 2019 17:24:28 +0000 (17:24 +0000)]
Revert [Sanitizers] Add support for RISC-V 64-bit

This reverts r375132 (git commit 00bbe990c5d4472d5413479a539b3d6edbb3ca7a)

llvm-svn: 375136

4 years ago[NFC][InstCombine] Tests for "fold variable mask before variable shift-of-trunc"...
Roman Lebedev [Thu, 17 Oct 2019 17:20:12 +0000 (17:20 +0000)]
[NFC][InstCombine] Tests for "fold variable mask before variable shift-of-trunc" (PR42563)

https://bugs.llvm.org/show_bug.cgi?id=42563

llvm-svn: 375135

4 years ago[OPENMP]Improve use of the global tid parameter.
Alexey Bataev [Thu, 17 Oct 2019 17:12:03 +0000 (17:12 +0000)]
[OPENMP]Improve use of the global tid parameter.

If we can determined, that the global tid parameter can be used in the
function, better to use it rather than calling __kmpc_global_thread_num
function.

llvm-svn: 375134

4 years ago[IndVars] Factor out a helper function for readability [NFC]
Philip Reames [Thu, 17 Oct 2019 16:55:34 +0000 (16:55 +0000)]
[IndVars] Factor out a helper function for readability [NFC]

llvm-svn: 375133