platform/upstream/llvm.git
5 years ago[MIPS GlobalISel] Improve reg bank handling in MipsInstructionSelector
Petar Avramovic [Fri, 1 Nov 2019 12:24:07 +0000 (13:24 +0100)]
[MIPS GlobalISel] Improve reg bank handling in MipsInstructionSelector

Introduce helper methods and refactor pieces of code related to
register banks in MipsInstructionSelector.
Add a few detailed asserts in order to get a better overview
of LLT, register bank combinations that are supported at the moment
and reduce need to look at other files.

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

5 years ago[LegacyPM] Fix pass structure dumping
evgeny [Fri, 1 Nov 2019 11:43:51 +0000 (14:43 +0300)]
[LegacyPM] Fix pass structure dumping

If module pass uses on-demand function analyses then structure is being
displayed incorrectly because FunctionPassManagerImpl can't dump contained
FPPassManager instances.

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

5 years ago[NFC][llvm-readobj] Split getSectionIndexName function into two
James Henderson [Fri, 1 Nov 2019 10:27:00 +0000 (10:27 +0000)]
[NFC][llvm-readobj] Split getSectionIndexName function into two

getSectionIndexName was trying to fetch two things at once, which led to
a somewhat tricky to understand interface involving passing output
parameters in, and also made it hard to return Errors further up the
stack.

This change is in preparation for changing the error handling.

Additionally, update a related test now that yaml2obj supports
SHT_SYMTAB_SHNDX properly (see d3963051c490), and add missing LLVM-style
coverage for symbols with shndx SHN_XINDEX. This test (after fixing)
caught a mistake in my first attempt at this patch, hence I'm including
it as part of this patch.

Reviewed by: grimar, MaskRay

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

5 years ago[NFC][llvm-readobj] Pull common code into a helper
James Henderson [Fri, 1 Nov 2019 10:16:40 +0000 (10:16 +0000)]
[NFC][llvm-readobj] Pull common code into a helper

This will make planned changes to this code easier to make.

Reviewed by: MaskRay, grimar

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

5 years ago[AArch64][SVE] Implement several floating-point arithmetic intrinsics
Kerry McLaughlin [Fri, 1 Nov 2019 10:40:36 +0000 (10:40 +0000)]
[AArch64][SVE] Implement several floating-point arithmetic intrinsics

Summary:
Adds intrinsics for the following:
  - fabd, fadd, fsub & fsubr
  - fmul, fmulx, fdiv & fdivr
  - fmax, fmaxnm, fmin & fminnm
  - fscale & ftsmul

Reviewers: huntergr, sdesmalen, dancgr

Reviewed By: sdesmalen

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

Tags: #llvm

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

5 years ago[GlobalISel] Match table opt: fix a bug in matching num of operands
Roman Tereshin [Thu, 31 Oct 2019 03:58:46 +0000 (20:58 -0700)]
[GlobalISel] Match table opt: fix a bug in matching num of operands

If there is a dag node with a variable number of operands that has at
least N operands (for some non-negative N), and multiple patterns with
that node with different number of operands, we would drop the number of
operands check in patterns with N operands, presumably because it's
guaranteed in such case that none of the per-operand checks will access
the operand list out-of-bounds.

Except semantically the check is about having exactly N operands, not at
least N operands, and a backend might rely on it to disambiguate
different patterns.

In this patch we change the condition on emitting the number of operands
check from "the instruction is not guaranteed to have at least as many
operands as are checked by the pattern being matched" to "the
instruction is not guaranteed to have a specific number of operands".

We're relying (still) on the rest of the CodeGenPatterns mechanics to
validate that the pattern itself doesn't try to access more operands
than there is in the instruction in cases when the instruction does have
fixed number of operands, and on the machine verifier to validate at
runtime that particular MIs like that satisfy the constraint as well.

Reviewers: dsanders, qcolombet

Reviewed By: qcolombet

Subscribers: arsenm, rovka, Petar.Avramovic, llvm-commits

Tags: #llvm

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

5 years ago[compiler-rt] [profile] Fix building for MinGW after d889d1efefe9f
Martin Storsjö [Fri, 1 Nov 2019 07:20:51 +0000 (09:20 +0200)]
[compiler-rt] [profile] Fix building for MinGW after d889d1efefe9f

This commit added use of a Windows API in InstrProfilingPort.h.
When _MSC_VER is defined (for MSVC), windows.h is already included
earlier in the same header (for atomics), but MinGW, the gcc
atomics builtins are used instead. Therefore explicitly include
windows.h here, where the API is used.

5 years agoAMDGPU: Add default denormal mode to MachineFunctionInfo
Matt Arsenault [Mon, 28 Oct 2019 06:38:52 +0000 (23:38 -0700)]
AMDGPU: Add default denormal mode to MachineFunctionInfo

The default FP mode should really be a property of a specific
function, and not a subtarget. Introduce the necessary fields to the
SIMachineFunctionInfo to help move towards this goal.

5 years ago[X86] Reland: Enable YMM memcmp with AVX1
David Zarzycki [Thu, 31 Oct 2019 10:30:53 +0000 (12:30 +0200)]
[X86] Reland: Enable YMM memcmp with AVX1

Update TargetTransformInfo to allow AVX1 to use YMM registers for memcmp.

This is a follow up to D68632 which enabled XOR compares which made this possible.

This also updates the memcmp-optsize.ll test unlike the first patch.

https://reviews.llvm.org/D69658

5 years ago[utils] Reflow asm check generation to tolerate blank lines
Simon Atanasyan [Wed, 30 Oct 2019 16:52:16 +0000 (19:52 +0300)]
[utils] Reflow asm check generation to tolerate blank lines

This change introduces two fixes. The second fix allows to generate
a test to check the first fix.

- Output `CHECK-EMPTY` prefix for an empty line in ASM output. Before that
  fix `update_llc_test_checks.py` incorrectly emits `CHECK-NEXT: <space>`
  prefix.
- Fix the `ASM_FUNCTION_MIPS_RE` regex to stop on a real function
  epilogue not on an inline assembler prologue and include inline
  assembler code into a test.

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

5 years agoDAG: Add DAG argument to isFPExtFoldable
Matt Arsenault [Mon, 28 Oct 2019 23:06:34 +0000 (16:06 -0700)]
DAG: Add DAG argument to isFPExtFoldable

For AMDGPU this is dependent on the FP mode, which should eventually
not be a property of the subtarget.

5 years ago[WebAssembly] SIMD integer min and max instructions
Thomas Lively [Thu, 31 Oct 2019 23:49:47 +0000 (16:49 -0700)]
[WebAssembly] SIMD integer min and max instructions

Summary:
Introduces a clang builtins and LLVM intrinsics representing integer
min/max instructions. These instructions have not been merged to the
SIMD spec proposal yet, so they are currently opt-in only via builtins
and not produced by general pattern matching. If these instructions
are accepted into the spec proposal the builtins and intrinsics will
be replaced with normal pattern matching.

Defined in https://github.com/WebAssembly/simd/pull/27.

Reviewers: aheejin

Reviewed By: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

5 years agoFix update_mir_test_checks after 3598b8100
Matt Arsenault [Fri, 1 Nov 2019 03:08:28 +0000 (20:08 -0700)]
Fix update_mir_test_checks after 3598b8100

5 years agoclang: Fix assert on void pointer arithmetic with address_space
Matt Arsenault [Thu, 31 Oct 2019 15:41:37 +0000 (08:41 -0700)]
clang: Fix assert on void pointer arithmetic with address_space

This attempted to always use the default address space void pointer
type instead of preserving the source address space.

5 years agoReland "[WebAssembly] Handle multiple loads of splatted loads"
Thomas Lively [Fri, 1 Nov 2019 03:01:02 +0000 (20:01 -0700)]
Reland "[WebAssembly] Handle multiple loads of splatted loads"

This reverts commit 92a25fbf11da51c8e3573b81a877d3b226990c07 and fixes
the ambiguous method call that was causing build failures.

5 years ago[clang][driver] Add ProfileData to LLVM_LINK_COMPONENTS
Heejin Ahn [Fri, 1 Nov 2019 02:48:13 +0000 (19:48 -0700)]
[clang][driver] Add ProfileData to LLVM_LINK_COMPONENTS

Summary:
After D68351 we need this to make builds with `-DBUILD_SHARED_LIB=ON`
work.

Reviewers: tlively

Subscribers: mgorny, cfe-commits

Tags: #clang

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

5 years ago[CodeGen] Fix invalid llvm.linker.options about pragma detect_mismatch
Yaxun (Sam) Liu [Thu, 31 Oct 2019 19:47:21 +0000 (15:47 -0400)]
[CodeGen] Fix invalid llvm.linker.options about pragma detect_mismatch

When a target does not support pragma detect_mismatch, an llvm.linker.options
metadata with an empty entry is created, which causes diagnostic in backend
since backend expects name/value pair in llvm.linker.options entries.

This patch fixes that.

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

5 years ago[nfc][omptarget] Use builtin var abstraction. Second pass at D69476
JonChesterfield [Fri, 1 Nov 2019 02:21:12 +0000 (02:21 +0000)]
[nfc][omptarget] Use builtin var abstraction. Second pass at D69476

Summary:
[nfc][omptarget] Use builtin var abstraction. Second pass at D69476

Use the wrappers in support.h for cuda builtin variables at all call sites.
Localises use of cuda and removes WARPSIZE==32 assumption in debug.h.

Reviewers: ABataev, jdoerfert, grokos

Reviewed By: jdoerfert

Subscribers: openmp-commits

Tags: #openmp

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

5 years ago[profile] Fifth speculative fix for Android after D68351
Vedant Kumar [Fri, 1 Nov 2019 00:03:51 +0000 (17:03 -0700)]
[profile] Fifth speculative fix for Android after D68351

Use the printf macros from inttypes.h to sidestep -Wformat issues:

/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingFile.c:425:14: error: format specifies type 'long long' but the argument has type 'off_t' (aka 'long') [-Werror,-Wformat]
             CurrentFileOffset, PageSize);
             ^~~~~~~~~~~~~~~~~
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingPort.h:114:50: note: expanded from macro 'PROF_ERR'
  fprintf(stderr, "LLVM Profile Error: " Format, __VA_ARGS__);
                                         ~~~~~~  ^~~~~~~~~~~
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingFile.c:461:41: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat]
        strerror(errno), CountersBegin, PageAlignedCountersLength, Fileno,
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingPort.h:114:50: note: expanded from macro 'PROF_ERR'
  fprintf(stderr, "LLVM Profile Error: " Format, __VA_ARGS__);
                                         ~~~~~~  ^~~~~~~~~~~
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingFile.c:462:9: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat]
        FileOffsetToCounters);
        ^~~~~~~~~~~~~~~~~~~~
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingPort.h:114:50: note: expanded from macro 'PROF_ERR'
  fprintf(stderr, "LLVM Profile Error: " Format, __VA_ARGS__);

5 years agoRevert "[WebAssembly] Handle multiple loads of splatted loads"
Vlad Tsyrklevich [Thu, 31 Oct 2019 23:50:36 +0000 (16:50 -0700)]
Revert "[WebAssembly] Handle multiple loads of splatted loads"

This reverts commit 2ab1b8c1ec452fb743f6cc5051e75a01039cabfe, it is
causing build failures on numerous bots, including
sanitizer-x86_64-linux-bootstrap-ubsan. My previous revert was for the
wrong commit.

5 years ago[profile] Fourth fix for toolchains without zlib after D68351
Vedant Kumar [Thu, 31 Oct 2019 23:45:39 +0000 (16:45 -0700)]
[profile] Fourth fix for toolchains without zlib after D68351

Fix llvm/test/tools/llvm-profdata/nocompress.test, which I missed when
authoring D68351 because my toolchain is configured with zlib support.

5 years agoRevert "[WebAssembly] Expand setcc of v2i64"
Vlad Tsyrklevich [Thu, 31 Oct 2019 23:32:38 +0000 (16:32 -0700)]
Revert "[WebAssembly] Expand setcc of v2i64"

This reverts commit 11850a6305c5778b180243eb06aefe86762dd4ce, it was
causing build failures on numerous bots, including
sanitizer-x86_64-linux-bootstrap-ubsan.

5 years ago[profile] Third speculative fix for Windows after D68351
Vedant Kumar [Thu, 31 Oct 2019 23:35:57 +0000 (16:35 -0700)]
[profile] Third speculative fix for Windows after D68351

_putenv on Windows takes 1 argument, whereas setenv elsewhere takes 3.
Just treat the two platforms differently.

http://lab.llvm.org:8011/builders/sanitizer-windows/builds/53547

5 years ago[profile] Second speculative fix for Windows
Vedant Kumar [Thu, 31 Oct 2019 23:25:24 +0000 (16:25 -0700)]
[profile] Second speculative fix for Windows

VLAs in C appear to not work on Windows, so use COMPILER_RT_ALLOCA:

C:\b\slave\sanitizer-windows\llvm-project\compiler-rt\lib\profile\InstrProfilingWriter.c(264): error C2057: expected constant expression
C:\b\slave\sanitizer-windows\llvm-project\compiler-rt\lib\profile\InstrProfilingWriter.c(264): error C2466: cannot allocate an array of constant size 0
C:\b\slave\sanitizer-windows\llvm-project\compiler-rt\lib\profile\InstrProfilingWriter.c(264): error C2133: 'Zeroes': unknown size

5 years ago[profile] Speculative fix for Windows after D68351
Vedant Kumar [Thu, 31 Oct 2019 23:22:07 +0000 (16:22 -0700)]
[profile] Speculative fix for Windows after D68351

setenv() appears to not be available on Windows:

http://lab.llvm.org:8011/builders/sanitizer-windows/builds/53545/steps/stage%201%20build/logs/stdio

5 years agogn build: Merge e72e59e9028
LLVM GN Syncbot [Thu, 31 Oct 2019 23:15:09 +0000 (23:15 +0000)]
gn build: Merge e72e59e9028

5 years agoRevert "[X86] add mayRaiseFPException flag and FPCW registers for X87 instructions"
Nico Weber [Thu, 31 Oct 2019 23:14:42 +0000 (19:14 -0400)]
Revert "[X86] add mayRaiseFPException flag and FPCW registers for X87 instructions"

This reverts commit a678677da498a45f59c16ee74fea438e34a801ce.
It broke CodeGen/ms-inline-asm.c on most bots.

5 years ago[profile] Add a mode to continuously sync counter updates to a file
Vedant Kumar [Thu, 19 Sep 2019 18:56:43 +0000 (11:56 -0700)]
[profile] Add a mode to continuously sync counter updates to a file

Add support for continuously syncing profile counter updates to a file.

The motivation for this is that programs do not always exit cleanly. On
iOS, for example, programs are usually killed via a signal from the OS.
Running atexit() handlers after catching a signal is unreliable, so some
method for progressively writing out profile data is necessary.

The approach taken here is to mmap() the `__llvm_prf_cnts` section onto
a raw profile. To do this, the linker must page-align the counter and
data sections, and the runtime must ensure that counters are mapped to a
page-aligned offset within a raw profile.

Continuous mode is (for the moment) incompatible with the online merging
mode. This limitation is lifted in https://reviews.llvm.org/D69586.

Continuous mode is also (for the moment) incompatible with value
profiling, as I'm not sure whether there is interest in this and the
implementation may be tricky.

As I have not been able to test extensively on non-Darwin platforms,
only Darwin support is included for the moment. However, continuous mode
may "just work" without modification on Linux and some UNIX-likes. AIUI
the default value for the GNU linker's `--section-alignment` flag is set
to the page size on many systems. This appears to be true for LLD as
well, as its `no_nmagic` option is on by default. Continuous mode will
not "just work" on Fuchsia or Windows, as it's not possible to mmap() a
section on these platforms. There is a proposal to add a layer of
indirection to the profile instrumentation to support these platforms.

rdar://54210980

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

5 years ago[profile] Clean up stale raw profiles in instrprof-write-file.c
Vedant Kumar [Wed, 2 Oct 2019 01:14:54 +0000 (18:14 -0700)]
[profile] Clean up stale raw profiles in instrprof-write-file.c

5 years agoFix a few typos in SourceLevelDebugging.rst
Adrian Prantl [Thu, 31 Oct 2019 23:03:18 +0000 (16:03 -0700)]
Fix a few typos in SourceLevelDebugging.rst

5 years ago[Remarks] Fix error message check in unit test
Francis Visoiu Mistrih [Thu, 31 Oct 2019 22:50:00 +0000 (15:50 -0700)]
[Remarks] Fix error message check in unit test

Always compare using lowercase to support multiple platforms.

5 years agogn build: Add support for cross-compiling the builtins and profile runtimes for Andro...
Peter Collingbourne [Thu, 31 Oct 2019 22:15:54 +0000 (15:15 -0700)]
gn build: Add support for cross-compiling the builtins and profile runtimes for Android aarch64 and arm.

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

5 years ago[Remarks] Add support for linking remarks
Francis Visoiu Mistrih [Tue, 10 Sep 2019 22:48:55 +0000 (15:48 -0700)]
[Remarks] Add support for linking remarks

Remarks are usually emitted per-TU, and for generating a standalone
remark file that can be shipped with the linked binary we need some kind
of tool to merge everything together.

The remarks::RemarkLinker class takes care of this and:

* Deduplicates remarks
* Filters remarks with no debug location
* Merges string tables from all the entries

As an output, it provides an iterator range that can be used to
serialize the remarks to a file.

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

5 years agoQuote path to Python 3 executable in case it contains spaces
Reid Kleckner [Thu, 31 Oct 2019 22:23:45 +0000 (15:23 -0700)]
Quote path to Python 3 executable in case it contains spaces

5 years agoFix undefined variable bug in debuginfotests lit.cfg.py
Reid Kleckner [Thu, 31 Oct 2019 22:18:54 +0000 (15:18 -0700)]
Fix undefined variable bug in debuginfotests lit.cfg.py

5 years ago[LV] Add test case that was supposed to go with D67948
Craig Topper [Thu, 31 Oct 2019 22:10:39 +0000 (15:10 -0700)]
[LV] Add test case that was supposed to go with D67948

I forgot to git add it when I committed for Evgeniy.

5 years ago[X86] add mayRaiseFPException flag and FPCW registers for X87 instructions
Craig Topper [Thu, 31 Oct 2019 21:48:38 +0000 (14:48 -0700)]
[X86] add mayRaiseFPException flag and FPCW registers for X87 instructions

This patch adds flag "mayRaiseFPException" , FPCW and FPSW for X87 instructions which could raise
float exception.

Patch by LiuChen. With a couple small fixes from me.

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

5 years ago[WebAssembly] Handle multiple loads of splatted loads
Thomas Lively [Wed, 30 Oct 2019 20:22:13 +0000 (13:22 -0700)]
[WebAssembly] Handle multiple loads of splatted loads

Summary:
Fixes an ISel failure when a splatted load is used more than once. The
failure was due to the hacks we were doing in ISel lowering to
preserve the original load as the operand of a LOAD_SPLAT node. The
fix is to properly lower the splatted use of the load to a separate
LOAD_SPLAT node.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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

5 years ago[mca] Fix test case (NFC)
Evandro Menezes [Thu, 31 Oct 2019 21:42:55 +0000 (16:42 -0500)]
[mca] Fix test case (NFC)

Fix test case for Darwin builds.

5 years ago[scudo][standalone] Fix Secondary bug w/ freelist
Kostya Kortchinsky [Thu, 31 Oct 2019 17:31:49 +0000 (10:31 -0700)]
[scudo][standalone] Fix Secondary bug w/ freelist

Summary:
cferris@ found an issue due to the new Secondary free list behavior
and unfortunately it's completely my fault. The issue is twofold:

- I lost track of the (major) fact that the Combined assumes that
  all chunks returned by the Secondary are zero'd out apprioriately
  when dealing with `ZeroContents`. With the introduction of the
  freelist, it's no longer the case as there can be a small portion
  of memory between the header and the next page boundary that is
  left untouched (the rest is zero'd via release). So the next time
  that block is returned, it's not fully zero'd out.
- There was no test that would exercise that behavior :(

There are several ways to fix this, the one I chose makes the most
sense to me: we pass `ZeroContents` to the Secondary's `allocate`
and it zero's out the block if requested and it's coming from the
freelist. The prevents an extraneous `memset` in case the block
comes from `map`. Another possbility could have been to `memset`
in `deallocate`, but it's probably overzealous as all secondary
blocks don't need to be zero'd out.

Add a test that would have found the issue prior to fix.

Reviewers: morehouse, hctim, cferris, pcc, eugenis, vitalybuka

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

5 years agoRefactor getDeclAtPosition() to use SelectionTree + targetDecl()
Nathan Ridge [Thu, 17 Oct 2019 22:48:39 +0000 (18:48 -0400)]
Refactor getDeclAtPosition() to use SelectionTree + targetDecl()

Summary: This fixes issue #163, among other improvements to go-to-definition.

Reviewers: sammccall

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

Tags: #clang

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

5 years ago[CVP] Add tests for icmp on local ranges; NFC
Nikita Popov [Thu, 31 Oct 2019 20:52:08 +0000 (21:52 +0100)]
[CVP] Add tests for icmp on local ranges; NFC

We currently don't simplify these, because getPredicateAt() does
not use block values.

5 years ago[LVI] Regenerate test checks; NFC
Nikita Popov [Mon, 29 Apr 2019 19:12:38 +0000 (21:12 +0200)]
[LVI] Regenerate test checks; NFC

5 years ago[WebAssembly] Expand setcc of v2i64
Thomas Lively [Wed, 30 Oct 2019 05:31:22 +0000 (22:31 -0700)]
[WebAssembly] Expand setcc of v2i64

Summary:
The SIMD spec does not include i64x2 comparisons, so they need to be
expanded. Using setOperationAction to expand them also causes f64x2
comparisons to be expanded, so setCondCodeAction needs to be used
instead. But since there are no legal condition codes, the legalizer
does not know how to expand the comparisons. We therefore manually
unroll the operation, taking care to fill each lane with -1 or 0
rather than 1 or 0 for consistency with the other vector comparisons.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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

5 years ago[clang][ScanDeps] Fix issue with multiple commands with the same input.
Michael Spencer [Wed, 30 Oct 2019 21:04:11 +0000 (14:04 -0700)]
[clang][ScanDeps] Fix issue with multiple commands with the same input.

Previously, given a CompilationDatabase with two commands for the same
source file we would report that file twice with the union of the
dependencies for each command both times.

This was due to the way `ClangTool` runs actions given an input source
file (see the comment in `DependencyScanningTool.cpp`). This commit adds
a `SingleCommandCompilationDatabase` that is created with each
`CompileCommand` in the original CDB, which is then used for each
`ClangTool` invocation. This gives us a single run of
`DependencyScanningAction` per `CompileCommand`.

I looked at using `AllTUsToolExecutor` which is a parallel tool
executor, but I'm not sure it's suitable for `clang-scan-deps` as it
does a lot more sharing of state than `AllTUsToolExecutor` expects.

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

5 years agoRemove unneeded template alias, causes issues with some MSVC version
Reid Kleckner [Thu, 31 Oct 2019 21:18:38 +0000 (14:18 -0700)]
Remove unneeded template alias, causes issues with some MSVC version

I built locally with the latest MSVC in c++14 and c++17, but it does not
complain for me. Osman Zakir on llvm-dev reports that they run into
compile errors here.

In any case, it seems prefereable to reuse clang's LLVM.h header to
bring in llvm::Optional and Expected.

5 years ago[update_cc_test_checks.py] Pass the builtin include dir to clang
Alex Richardson [Thu, 31 Oct 2019 21:18:32 +0000 (21:18 +0000)]
[update_cc_test_checks.py] Pass the builtin include dir to clang

Summary:
This is required to update tests that make use of builtin headers. To fix
this use the same command expansion as lit does for %clang_cc1. I tested
this by updating clang/test/CodeGen/arm-mve-intrinsics/scalar-shifts.c.
%clang_cc1 will now expand to `clang -cc1 -internal-isystem
$LLVM_BUILD/lib/clang/$VERSION/include -nostdsysteminc`.

Reviewers: MaskRay

Reviewed By: MaskRay

Subscribers: kristof.beyls, dmgreen, llvm-commits

Tags: #llvm

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

5 years ago[compiler-rt] Use xcrun instead of xcodebuild to find the SDK directory
Alex Richardson [Thu, 31 Oct 2019 21:17:55 +0000 (21:17 +0000)]
[compiler-rt] Use xcrun instead of xcodebuild to find the SDK directory

Summary:
xcodebuild does not work unless XCode is installed whereas xcrun also work
when only the Command Line Tools are installed. Unlike the check for the
version (D69610), this did not cause an erro for me since the fallback to
/usr/include for the OSX sysroot worked.

Reviewers: yln, delcypher

Reviewed By: yln

Subscribers: dberris, mgorny, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

5 years agoFix compiler-rt build on macOS without XCode
Alex Richardson [Thu, 31 Oct 2019 21:17:23 +0000 (21:17 +0000)]
Fix compiler-rt build on macOS without XCode

Summary:
Starting with 8a5bfbe6db2824642bf9a1d27a24c5b6132b244f (D68292) this file
unconditionally uses xcodebuild to get the SDK version. On my system this
always fails with
`xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance`

Reviewers: delcypher, yln

Reviewed By: delcypher, yln

Subscribers: dberris, mgorny, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

5 years agoFix typeo in CPU_TYPE_ARM64_32 for older SDKs.
Jason Molenda [Thu, 31 Oct 2019 21:13:57 +0000 (14:13 -0700)]
Fix typeo in CPU_TYPE_ARM64_32 for older SDKs.

5 years agogn build: s/target_/current_/g in compiler-rt/lib/{builtins,profile}.
Peter Collingbourne [Thu, 31 Oct 2019 21:03:17 +0000 (14:03 -0700)]
gn build: s/target_/current_/g in compiler-rt/lib/{builtins,profile}.

Fixes stage2 cross compilation.

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

5 years ago[PGO][PGSO] Fix -DBUILD_SHARED_LIBS=on builds after D69580/llvmorg-10-init-8797-g0d98...
Fangrui Song [Thu, 31 Oct 2019 20:58:52 +0000 (13:58 -0700)]
[PGO][PGSO] Fix -DBUILD_SHARED_LIBS=on builds after D69580/llvmorg-10-init-8797-g0d987e411ac

Move TargetLoweringBase::isSuitableForJumpTable from
llvm/CodeGen/TargetLowering.h to .cpp, to avoid the undefined reference
from all LLVM${Target}ISelLowering.cpp.

Another fix is to add a dependency on TransformUtils to all
lib/Target/$Target/LLVMBuild.txt, but that is too disruptive.

5 years ago[asan] Fix lint failure in asan_interface.h
Evgenii Stepanov [Thu, 31 Oct 2019 20:58:55 +0000 (13:58 -0700)]
[asan] Fix lint failure in asan_interface.h

5 years ago[asan] Provide an interface to update an allocation stack trace.
Evgenii Stepanov [Sat, 19 Oct 2019 00:17:48 +0000 (17:17 -0700)]
[asan] Provide an interface to update an allocation stack trace.

Summary:
Sometimes an allocation stack trace is not very informative. Provide a
way to replace it with a stack trace of the user's choice.

Reviewers: pcc, kcc

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

5 years ago[X86] Remove FSIN/FCOS isel patterns and the pseudo instructions that they selected...
Craig Topper [Thu, 31 Oct 2019 20:37:57 +0000 (13:37 -0700)]
[X86] Remove FSIN/FCOS isel patterns and the pseudo instructions that they selected for the FP stackifier.

We always expand these to libcalls so get rid of the last vestiges
of using the instructions.

5 years agoRevert "gn build: (manually) merge ec66603ac7"
Nico Weber [Thu, 31 Oct 2019 20:30:01 +0000 (16:30 -0400)]
Revert "gn build: (manually) merge ec66603ac7"

This reverts commit df899f2272330ef42739500b2f7f25d17d2c8dcb.
Looks like ec66603ac7 was reverted recently.

5 years agogn build: (manually) merge ec66603ac7
Nico Weber [Thu, 31 Oct 2019 20:28:50 +0000 (16:28 -0400)]
gn build: (manually) merge ec66603ac7

5 years ago[AArch64] Update for Exynos
Evandro Menezes [Wed, 30 Oct 2019 21:56:21 +0000 (16:56 -0500)]
[AArch64] Update for Exynos

Fix the costs of `add` and `orr` with an immediate operand.

5 years ago[PGO][PGSO] TargetLowering/TargetTransformationInfo/SwitchLoweringUtils part.
Hiroshi Yamauchi [Tue, 29 Oct 2019 18:30:30 +0000 (11:30 -0700)]
[PGO][PGSO] TargetLowering/TargetTransformationInfo/SwitchLoweringUtils part.

Summary:
(Split of off D67120)

TargetLowering/TargetTransformationInfo/SwitchLoweringUtils changes for profile
guided size optimization.

Reviewers: davidxl

Subscribers: eraman, hiraditya, haicheng, llvm-commits

Tags: #llvm

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

5 years ago[Attributor] Really use the executed-context
Johannes Doerfert [Wed, 30 Oct 2019 22:21:53 +0000 (17:21 -0500)]
[Attributor] Really use the executed-context

Before we did not follow casts and geps when we looked at the users of a
pointer in the pointers must-be-executed-context. This caused us to fail
to determine if it was accessed for sure. With this change we follow
such users now.

The above extension exposed problems in getKnownNonNullAndDerefBytesForUse
which did not always check what the base pointer was. We also did not
handle negative offsets as conservative as we have to without explicit
loop handling. Finally, we should not derive a huge number if we access
a pointer that was traversed backwards first.

The problems exposed by this functional change are already tested in the
existing test cases as is the functional change.

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

5 years ago[SLP] Vectorize jumbled stores.
Alexey Bataev [Thu, 31 Oct 2019 13:46:27 +0000 (09:46 -0400)]
[SLP] Vectorize jumbled stores.

Summary:
Patch adds support for vectorization of the jumbled stores. The value
operands are vectorized and then shuffled in the right order before
store.

Reviewers: RKSimon, spatel, hfinkel, mkuper

Subscribers: llvm-commits

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

5 years ago[Attributor] Make AANonNull perform context sensitive queries
Johannes Doerfert [Tue, 29 Oct 2019 16:46:00 +0000 (11:46 -0500)]
[Attributor] Make AANonNull perform context sensitive queries

Summary:
In order to get context sensitivity from isKnownNonZero we need to
provide a context instruction *and* a dominator tree. The latter is
passed now to which actually allows to remove some initialization code.

Tests taken from PR43833.

Reviewers: uenoku, sstefan1

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

5 years ago[ValueTracking] Allow context-sensitive nullness check for non-pointers
Johannes Doerfert [Tue, 29 Oct 2019 16:49:57 +0000 (11:49 -0500)]
[ValueTracking] Allow context-sensitive nullness check for non-pointers

Same as D60846 but with a fix for the problem encountered there which
was a missing context adjustment in the handling of PHI nodes.

The test that caused D60846 to be reverted was added in e15ab8f277c7.

Reviewers: nikic, nlopes, mkazantsev,spatel, dlrobertson, uabelho, hakzsam

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

5 years agoRevert rG0e252ae19ff8d99a59d64442c38eeafa5825d441 : [X86] Enable YMM memcmp with...
Simon Pilgrim [Thu, 31 Oct 2019 19:04:52 +0000 (19:04 +0000)]
Revert rG0e252ae19ff8d99a59d64442c38eeafa5825d441 : [X86] Enable YMM memcmp with AVX1

Breaks build bots

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

5 years ago[Symbol] Change ClangASTContext::GetCXXClassName return type
Alex Langford [Wed, 30 Oct 2019 19:50:05 +0000 (12:50 -0700)]
[Symbol] Change ClangASTContext::GetCXXClassName return type

Summary:
Instead of filling out a std::string and returning a bool to indicate
success, returning a std::string directly and testing to see if it's
empty seems like a cleaner solution overall.

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

5 years ago[InstCombine] Add the test that triggered the D60846 revert
Johannes Doerfert [Thu, 31 Oct 2019 18:46:43 +0000 (13:46 -0500)]
[InstCombine] Add the test that triggered the D60846 revert

This is in preparation of D69571.

5 years ago[Utils][FIX] Unbreak update_XXX_test_checks after 3598b810029d
Johannes Doerfert [Thu, 31 Oct 2019 18:37:34 +0000 (13:37 -0500)]
[Utils][FIX] Unbreak update_XXX_test_checks after 3598b810029d

The users of build_function_body_dictionary and add_checks need to be
adjusted after the changes in UpdateTestChecks/common.py.

5 years ago[lit] Extract Display.print_header function
Julian Lettner [Mon, 25 Feb 2019 07:37:44 +0000 (23:37 -0800)]
[lit] Extract Display.print_header function

5 years ago[lit] Always print newline before test time/summary
Julian Lettner [Mon, 25 Feb 2019 07:07:29 +0000 (23:07 -0800)]
[lit] Always print newline before test time/summary

Slightly decreases the time I need to parse the test summary.

5 years ago[lit] Fix internal env calling other internal commands
Joel E. Denny [Wed, 30 Oct 2019 18:22:16 +0000 (14:22 -0400)]
[lit] Fix internal env calling other internal commands

Without this patch, when using lit's internal shell, if `env` on a lit
RUN line calls `cd`, `mkdir`, or any of the other in-process shell
builtins that lit implements, lit accidentally searches for the latter
as an external executable.

This patch puts such builtins in a map so that boilerplate for them
need be implemented only once.  This patch moves that handling after
processing of `env` so that `env` calling such a builtin can be
detected.  Finally, because such calls appear to be useless, this
patch takes the safe approach of diagnosing them rather than
supporting them.

Reviewed By: probinson, mgorny, rnk

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

5 years agoXFAIL dexter tests on Darwin.
Adrian Prantl [Thu, 31 Oct 2019 18:22:19 +0000 (11:22 -0700)]
XFAIL dexter tests on Darwin.

These fail parsing command line arguments.

5 years ago[X86] Enable YMM memcmp with AVX1
David Zarzycki [Thu, 31 Oct 2019 10:30:53 +0000 (12:30 +0200)]
[X86] Enable YMM memcmp with AVX1

Update TargetTransformInfo to allow AVX1 to use YMM registers for memcmp.

This is a follow up to D68632 which enabled XOR compares which made this possible.

https://reviews.llvm.org/D69658

5 years ago[InstCombine] add fast-math-flags for better test coverage; NFC
Sanjay Patel [Thu, 31 Oct 2019 17:25:41 +0000 (13:25 -0400)]
[InstCombine] add fast-math-flags for better test coverage; NFC

In all cases, we currently unintentionally drop the FMF on the new select.

5 years agoRevert rG57ee0435bd47f23f3939f402914c231b4f65ca5e - [TII] Use optional destination...
Simon Pilgrim [Thu, 31 Oct 2019 17:58:15 +0000 (17:58 +0000)]
Revert rG57ee0435bd47f23f3939f402914c231b4f65ca5e - [TII] Use optional destination and source pair as a return value; NFC

This is breaking MSVC builds: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/20375

5 years agoSort HWASAN_RTL_SOURCES alphabetically (NFC).
Evgenii Stepanov [Thu, 31 Oct 2019 17:56:12 +0000 (10:56 -0700)]
Sort HWASAN_RTL_SOURCES alphabetically (NFC).

5 years ago[IPCP] Bail on extractvalue's with more than 1 index.
Craig Topper [Thu, 31 Oct 2019 16:45:03 +0000 (09:45 -0700)]
[IPCP] Bail on extractvalue's with more than 1 index.

The replacement code only looks at the first index of the
extractvalue. If there are additional indices we'll end
up doing a bad replacement.

This only happens if the function returns a nested struct. Not
sure if clang ever generates such code. The original report came
from ispc.

Fixes PR43857

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

5 years agoFix initialization-order-fiasco error in "Add a heap alloc site marker field to the...
Amy Huang [Thu, 31 Oct 2019 17:48:52 +0000 (10:48 -0700)]
Fix initialization-order-fiasco error in "Add a heap alloc site marker field to the ExtraInfo in MachineInstrs"

5 years ago[AArch64] Select saturating Neon instructions
David Green [Thu, 31 Oct 2019 15:22:24 +0000 (15:22 +0000)]
[AArch64] Select saturating Neon instructions

This adds some extra patterns to select AArch64 Neon SQADD, UQADD, SQSUB
and UQSUB from the existing target independent sadd_sat, uadd_sat,
ssub_sat and usub_sat nodes.

It does not attempt to replace the existing int_aarch64_neon_uqadd
intrinsic nodes as they are apparently used for both scalar and vector,
and need to be legal on scalar types for some of the patterns to work.
The int_aarch64_neon_uqadd on scalar would move the two integers into
floating point registers, perform a Neon uqadd and move the value back.
I don't believe this is good idea for uadd_sat to do the same as the
scalar alternative is simpler (an adds with a csinv). For signed it may
be smaller, but I'm not sure about it being better.

So this just adds some extra patterns for the existing vector
instructions, matching on the _sat nodes.

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

5 years ago[lit] Rename ProgressDisplay -> Display
Julian Lettner [Mon, 25 Feb 2019 06:45:02 +0000 (22:45 -0800)]
[lit] Rename ProgressDisplay -> Display

5 years ago[msan] Blacklist __gxx_personality_v0.
Evgenii Stepanov [Tue, 29 Oct 2019 22:04:43 +0000 (15:04 -0700)]
[msan] Blacklist __gxx_personality_v0.

Summary:
Fixes https://bugs.llvm.org/show_bug.cgi?id=31877.
Fixes https://github.com/google/sanitizers/issues/1155.

Enables exceptions in msan/tsan buid of libcxx, and in msan tests.

-fdepfile-entry stuff is a workaround for
https://reviews.llvm.org/D69290 (default blacklist missing from -MMD
output).

Reviewers: pcc, dvyukov

Subscribers: mgorny, christof, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

5 years ago[FIX] Make LSan happy by *not* leaking memory
Johannes Doerfert [Thu, 31 Oct 2019 17:06:21 +0000 (12:06 -0500)]
[FIX] Make LSan happy by *not* leaking memory

I left a memory leak in a printer pass which made LSan sad so I remove
the memory leak now to make LSan happy.

Reported and tested by vlad.tsyrklevich.

5 years ago[nfc][libomptarget] Reorganise support header
JonChesterfield [Thu, 31 Oct 2019 17:14:17 +0000 (17:14 +0000)]
[nfc][libomptarget] Reorganise support header

Summary:
[nfc][libomptarget] Reorganise support header

All functions defined in support implementation are now declared in support.h
Reordered functions in support implementation to match the sequence in support.h
Added include guards to support.h
Added #include interface to support.h to provide kmp_Ident declaration
Move supporti.h to support.cu and s/INLINE/EXTERN/g
Add remaining includes to support.cu

A minor side effect is to change the name mangling of the support functions to
extern "C". If this matters another macro along the lines of INLINE/EXTERN
can be added - perhaps DEVICE as that's the obvious implementation.

Reviewers: jdoerfert, ABataev, grokos

Reviewed By: jdoerfert

Subscribers: mgorny, jfb, openmp-commits

Tags: #openmp

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

5 years ago[InstCombine] simplify fcmp+select canonicalization; NFCI
Sanjay Patel [Thu, 31 Oct 2019 17:10:34 +0000 (13:10 -0400)]
[InstCombine] simplify fcmp+select canonicalization; NFCI

We had 2 blocks of code that are nearly identical. Existing
regression tests should cover both of the patterns.

5 years agoReapply "Import Dexter to debuginfo-tests""
Jeremy Morse [Thu, 31 Oct 2019 16:51:53 +0000 (16:51 +0000)]
Reapply "Import Dexter to debuginfo-tests""

This reverts commit cb935f345683194e42e6e883d79c5a16479acd74.

Discussion in D68708 advises that green dragon is being briskly
refurbished, and it's good to have this patch up testing it.

5 years ago[lldb] [test/API] Fix testcases symlink
Michał Górny [Thu, 31 Oct 2019 16:43:18 +0000 (17:43 +0100)]
[lldb] [test/API] Fix testcases symlink

5 years agoUpstream diff from swift-lldb.
Adrian Prantl [Thu, 31 Oct 2019 16:19:55 +0000 (09:19 -0700)]
Upstream diff from swift-lldb.

This is very likely untested, but it looks like an obviously correct change.

5 years agoRevert "Import Dexter to debuginfo-tests"
Jeremy Morse [Thu, 31 Oct 2019 16:22:10 +0000 (16:22 +0000)]
Revert "Import Dexter to debuginfo-tests"

This reverts commit f78c236efda85af1e526ac35ed535ef4786450e3.

Green dragon breakage was observed; I'll take a look at why.

5 years agoFix missing memcpy, memmove and memset tail calls
Sanne Wouda [Thu, 31 Oct 2019 14:55:57 +0000 (14:55 +0000)]
Fix missing memcpy, memmove and memset tail calls

Summary:
If a wrapper around one of the mem* stdlib functions bitcasts the returned
pointer value before returning it (e.g. to a wchar_t*), LLVM does not emit a
tail call.

Add a check for this scenario so that we emit a tail call.

Reviewers: wmi, mkuper, ramred01, dmgreen

Reviewed By: wmi, dmgreen

Subscribers: hiraditya, sanwou01, javed.absar, lebedev.ri, llvm-commits

Tags: #llvm

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

5 years ago[llvm-objcopy] --add-symbol: address post-commit reviews of D69093
Fangrui Song [Thu, 31 Oct 2019 16:12:06 +0000 (09:12 -0700)]
[llvm-objcopy] --add-symbol: address post-commit reviews of D69093

* Improve comments.
* Reorder the assignment to Obj.SectionNames before the symbol table
  creation code. Add a test.

Reviewed By: grimar

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

5 years ago[InstCombine] regenerate test checks; NFC
Sanjay Patel [Thu, 31 Oct 2019 14:35:58 +0000 (10:35 -0400)]
[InstCombine] regenerate test checks; NFC

5 years ago[clang-format] Fix SpacesInSquareBrackets for Lambdas with Initial "&ref" Parameter
Mitchell Balan [Thu, 31 Oct 2019 15:07:36 +0000 (11:07 -0400)]
[clang-format] Fix SpacesInSquareBrackets for Lambdas with Initial "&ref" Parameter

Summary:
This fixes an edge case in the `SpacesInSquareBrackets` option where an initial `&ref` lambda parameter is not padded with an initial space.

`int foo = [&bar ]() {}` is fixed to give `int foo = [ &bar ]() {}`

Reviewers: MyDeveloperDay, klimek, sammccall

Reviewed by: MyDeveloperDay

Subscribers: cfe-commits

Tags: #clang, #clang-format

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

5 years agoDAG: Add new control for ISD::FMAD formation
Matt Arsenault [Mon, 28 Oct 2019 18:00:12 +0000 (11:00 -0700)]
DAG: Add new control for ISD::FMAD formation

For AMDGPU this depends on whether denormals are enabled in the
default FP mode for the function. Currently this is treated as a
subtarget feature, so FMAD is selectively legal based on that. I want
to move this out of the subtarget features so this can be controlled
with a denormal mode attribute. Additionally, this will allow folding
based on a future ftz fast math flag.

5 years agoAMDGPU: Simplify getAddressSpace calls
Matt Arsenault [Thu, 31 Oct 2019 05:42:45 +0000 (22:42 -0700)]
AMDGPU: Simplify getAddressSpace calls

These can be directly taken from the GlobalValue instead of going
through the type.

5 years ago[TII] Use optional destination and source pair as a return value; NFC
Djordje Todorovic [Thu, 31 Oct 2019 13:48:32 +0000 (14:48 +0100)]
[TII] Use optional destination and source pair as a return value; NFC

Refactor usage of isCopyInstrImpl, isCopyInstr and isAddImmediate methods
to return optional machine operand pair of destination and source
registers.

Patch by Nikola Prica

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

5 years ago[MachineOutliner][NFC] Fix FileCheck regex in two of test-cases
David Tellenbach [Thu, 31 Oct 2019 14:19:15 +0000 (14:19 +0000)]
[MachineOutliner][NFC] Fix FileCheck regex in two of test-cases

5 years agoImport Dexter to debuginfo-tests
Jeremy Morse [Thu, 31 Oct 2019 13:41:24 +0000 (13:41 +0000)]
Import Dexter to debuginfo-tests

Dexter (Debug Experience Tester) is a test-driver for our debug info
integration tests, reading a set of debug experience expectations and
comparing them with the actual behaviour of a program under a debugger.
More about Dexter can be found in the RFC:

  http://lists.llvm.org/pipermail/llvm-dev/2019-October/135773.html

and the phab review in D68708. Not all the debuginfo tests have been
transformed into Dexter tests, and we look forwards to doing that
incrementally.

This commit mostly aims to flush out buildbots that are running
debuginfo-tests but don't have python 3 installed, possibly
green-dragon and some windows bots.

5 years ago[test][DebugInfo] Add the test for ARM call site parameters
Djordje Todorovic [Thu, 31 Oct 2019 12:52:26 +0000 (13:52 +0100)]
[test][DebugInfo] Add the test for ARM call site parameters

This is addition to D67556.

Patch by Nikola Prica

5 years agogn build: (manually) merge cd24a00 more
Nico Weber [Thu, 31 Oct 2019 13:12:53 +0000 (09:12 -0400)]
gn build: (manually) merge cd24a00 more

5 years ago[InstCombine] Canonicalize uadd.with.overflow to uadd.sat
David Green [Thu, 31 Oct 2019 12:42:36 +0000 (12:42 +0000)]
[InstCombine] Canonicalize uadd.with.overflow to uadd.sat

This adds some patterns to transform uadd.with.overflow to uadd.sat
(with usub.with.overflow to usub.sat too). The patterns selects from
UINTMAX (or 0 for subs) depending on whether the operation overflowed.

Signed patterns are a little more involved (they can wrap in two
directions), but can be added here in a followup patch too.

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

5 years agoRevert "[DebugInfo] MachineSink: Insert undef DBG_VALUEs when sinking instructions"
Jeremy Morse [Thu, 31 Oct 2019 12:34:17 +0000 (12:34 +0000)]
Revert "[DebugInfo] MachineSink: Insert undef DBG_VALUEs when sinking instructions"

This reverts commit ee50590e1684c197bc4336984795e48bf53c7a4e.

PR43855 reports a performance regression from this commit, which I'll
look into.