Commit Graph

326751 Commits

Author SHA1 Message Date
Rainer Orth 0866dbfa1a test-release.sh: Don't use chrpath on Solaris
When trying to run test-release.sh on Solaris 11.4 for 9.0.0 rc4, I failed initially
because Solaris lacks chrpath.  This patch accounts for that and allowed the run to
continue.

Tested on amd64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

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

llvm-svn: 371741
2019-09-12 14:50:32 +00:00
James Henderson f145456fc4 [docs][llvm-strip] Remove unnecessary whitespace for consistency
llvm-svn: 371739
2019-09-12 14:24:04 +00:00
Raphael Isemann d23fab09a2 [lldb][NFC] Simplify makefiles also for breakpoint tests
These tests were temporarily missing when the big Makefile
simplification patch landed, so this just applies the same change
to these tests.

llvm-svn: 371738
2019-09-12 14:21:59 +00:00
Roman Lebedev 80a8a85758 [InstCombine][InstSimplify] Move constant-folding tests in result-of-usub-is-non-zero-and-no-overflow.ll
llvm-svn: 371737
2019-09-12 14:12:31 +00:00
Roman Lebedev b3e0937f0a [NFC][InstCombine][InstSimplify] Add test for "add-of-negative is non-zero and no overflow" (PR43259)
https://rise4fun.com/Alive/ska
https://rise4fun.com/Alive/9iX

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

llvm-svn: 371736
2019-09-12 14:12:20 +00:00
Sanjay Patel 3f5a808365 [ConstProp] allow folding for fma that produces NaN
Folding for fma/fmuladd was added here:
rL202914
...and as seen in existing/unchanged tests, that works to propagate NaN
if it's already an input, but we should fold an fma() that creates NaN too.

From IEEE-754-2008 7.2 "Invalid Operation", there are 2 clauses that apply
to fma, so I added tests for those patterns:

  c) fusedMultiplyAdd: fusedMultiplyAdd(0, ∞, c) or fusedMultiplyAdd(∞, 0, c)
     unless c is a quiet NaN; if c is a quiet NaN then it is implementation
     defined whether the invalid operation exception is signaled
  d) addition or subtraction or fusedMultiplyAdd: magnitude subtraction of
     infinities, such as: addition(+∞, −∞)

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

llvm-svn: 371735
2019-09-12 14:10:50 +00:00
Raphael Isemann 03a111dc46 [lldb] Remove duplicated breakpoint tests
After reverting the deletion of the functionalities/breakpoint tests,
we now have some tests twice in the test/ folder which breaks dotest:

* commands/breakpoint/basic
* functionalities/breakpoint/breakpoint_command

After looking over these tests, I think it makes sense to only
keep the original functionalities/ folder. The commands/breakpoint/basic
test are not exclusively testing the breakpoint command itself, so
they shouldn't be in commands/ in the first place. Note that these
folders have identical contents (beside small adjustments regarding
the Makefile which landed after the restructuring).

llvm-svn: 371734
2019-09-12 14:07:16 +00:00
Michal Gorny bfb5b0cb86 [clang] [unittest] Import LLVMTestingSupport if necessary
Add LLVMTestingSupport directory from LLVM_MAIN_SRC_DIR when building
clang stand-alone and LLVMTestingSupport library is not present.  This
is needed to fix stand-alone builds without clang-tools-extra.

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

llvm-svn: 371733
2019-09-12 13:06:12 +00:00
Nico Weber d0c8004890 lld-link: Fix tests that do not run on macOS after r371729.
llvm-svn: 371732
2019-09-12 12:35:34 +00:00
Dmitri Gribenko 20f45ed699 Removed some questionable default arguments from setters
Summary:
They can be confusing -- what does it mean to call a setter without a
value? Also, some setters, like `setPrintTemplateTree` had `false` as
the default value!

The callers are largely not using these default arguments anyway.

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 371731
2019-09-12 12:16:43 +00:00
Petar Avramovic ff6ac1eb5f [MIPS GlobalISel] Select indirect branch
Select G_BRINDIRECT for MIPS32.

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

llvm-svn: 371730
2019-09-12 11:44:36 +00:00
Nico Weber 3c44d595be lld-link: Make /linkrepro: take a filename, not a directory.
This makes lld-link behave like ld.lld. I don't see a reason for
the two drivers to have different behavior here.

While here, also make lld-link add a version.txt to the tar, like
ld.lld does.

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

llvm-svn: 371729
2019-09-12 11:44:13 +00:00
Petar Avramovic 646e1f7b7f [MIPS GlobalISel] Lower G_DYN_STACKALLOC
IRTranslator creates G_DYN_STACKALLOC instruction during expansion of
alloca when argument that tells number of elements to allocate on stack
is a virtual register. Use default lowering for MIPS32.

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

llvm-svn: 371728
2019-09-12 11:39:50 +00:00
Petar Avramovic 75e43a607c [MIPS GlobalISel] Select G_IMPLICIT_DEF
G_IMPLICIT_DEF is used for both integer and floating point implicit-def.
Handle G_IMPLICIT_DEF as ambiguous opcode in MipsRegisterBankInfo.
Select G_IMPLICIT_DEF for MIPS32.

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

llvm-svn: 371727
2019-09-12 11:32:38 +00:00
Jeremy Morse 0c1e0d52c2 Switch "windows" to "system-windows" in some XFAILs
The test failure mode appears to be due to the host machine rather than the
target. The PS4 buildbots are windows-hosted targeting x86_64-scei-ps4,
and are currently reporting these as unexpected failures:

  http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/28114

llvm-svn: 371726
2019-09-12 11:19:12 +00:00
Simon Pilgrim da59a6bf7d [DAGCombine] visitFDIV - Use isCheaperToUseNegatedFPOps helper for (fdiv (fneg X), (fneg Y)) -> (fdiv X, Y). NFCI.
Minor cleanup to use equivalent helper code.

llvm-svn: 371724
2019-09-12 11:03:09 +00:00
Dmitri Gribenko f2cb4a1842 Removed dead code from DiagnosticBuilder
llvm-svn: 371723
2019-09-12 10:39:53 +00:00
Tim Northover f1c2892912 AArch64: support arm64_32, an ILP32 slice for watchOS.
This is the main CodeGen patch to support the arm64_32 watchOS ABI in LLVM.
FastISel is mostly disabled for now since it would generate incorrect code for
ILP32.

llvm-svn: 371722
2019-09-12 10:22:23 +00:00
Tim Northover 98534843fb CodeGenPrep: add separate hook say when GEPs should be used for sinking. NFCI.
Up to now, we've decided whether to sink address calculations using GEPs or
normal arithmetic based on the useAA hook, but there are other reasons GEPs
might be preferred. So this patch splits the two questions, with a default
implementation falling back to useAA.

llvm-svn: 371721
2019-09-12 10:21:00 +00:00
Paul Hoad 719087bbb7 [clang-format] [PR43100] clang-format C# support does not add a space between "using" and paren
Summary:
Addresses https://bugs.llvm.org/show_bug.cgi?id=43100

Formatting using statement in C# with clang-format removes the space between using and paren even when SpaceBeforeParens is !

```
using(FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, bufferSize : 1))
```

this change simply overcomes this for when using C# settings in the .clang-format file

```
using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, bufferSize : 1))
```

All FormatTests pass..

```
[==========] 688 tests from 21 test cases ran. (88508 ms total)
[  PASSED  ] 688 tests.
```

Reviewers: djasper, klimek, owenpan

Reviewed By: owenpan

Subscribers: llvm-commits, cfe-commits

Tags: #clang

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

llvm-svn: 371720
2019-09-12 10:18:53 +00:00
Paul Hoad 3867a2d510 [clang-format] Add new style option IndentGotoLabels
Summary:
This option determines whether goto labels are indented according to scope. Setting this option to false causes goto labels to be flushed to the left.
This is mostly copied from [[ http://lists.llvm.org/pipermail/cfe-dev/2015-September/045014.html | this patch ]] submitted by Christian Neukirchen that didn't make its way into trunk.

```
     true:                                  false:
     int f() {                      vs.     int f() {
       if (foo()) {                           if (foo()) {
       label1:                              label1:
         bar();                                 bar();
       }                                      }
     label2:                                label2:
       return 1;                              return 1;
     }                                      }
```

Reviewers: klimek, MyDeveloperDay

Reviewed By: MyDeveloperDay

Subscribers: cfe-commits

Tags: #clang, #clang-tools-extra

Patch by: tetsuo-cpp

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

llvm-svn: 371719
2019-09-12 10:07:14 +00:00
Roman Lebedev f1286621eb [InstSimplify] simplifyUnsignedRangeCheck(): handle more cases (PR43251)
Summary:
I don't have a direct motivational case for this,
but it would be good to have this for completeness/symmetry.

This pattern is basically the motivational pattern from
https://bugs.llvm.org/show_bug.cgi?id=43251
but with different predicate that requires that the offset is non-zero.

The completeness bit comes from the fact that a similar pattern (offset != zero)
will be needed for https://bugs.llvm.org/show_bug.cgi?id=43259,
so it'd seem to be good to not overlook very similar patterns..

Proofs: https://rise4fun.com/Alive/21b

Also, there is something odd with `isKnownNonZero()`, if the non-zero
knowledge was specified as an assumption, it didn't pick it up (PR43267)

Reviewers: spatel, nikic, xbolva00

Reviewed By: spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 371718
2019-09-12 09:26:17 +00:00
Kai Luo cfaf2b6cfa [PowerPC][MCP][NFC] Pre-commit test cases for https://reviews.llvm.org/D65267
llvm-svn: 371717
2019-09-12 09:00:44 +00:00
Fangrui Song 786ce3fbd6 [ELF] Fix a common-page-size typo
llvm-svn: 371716
2019-09-12 08:59:17 +00:00
Fangrui Song 60ff4dd9cd [ELF] Support -z undefs
-z undefs is the inverse of -z defs. It allows unresolved references
from object files. This can be used to cancel --no-undefined or -z defs.

Reviewed By: ruiu

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

llvm-svn: 371715
2019-09-12 08:55:17 +00:00
Qiu Chaofan b7fb5d0f6f [DAGCombiner] Improve division estimation of floating points.
Current implementation of estimating divisions loses precision since it
estimates reciprocal first and does multiplication.  This patch is to re-order
arithmetic operations in the last iteration in DAGCombiner to improve the
accuracy.

Reviewed By: Sanjay Patel, Jinsong Ji

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

llvm-svn: 371713
2019-09-12 07:51:24 +00:00
Heejin Ahn 75f65fe8d3 [WebAssembly] Delete duplicate REQUIRES line
r371710 and r371711 committed the same line, so this deletes one of
them.

llvm-svn: 371712
2019-09-12 06:56:17 +00:00
Heejin Ahn c4712fda7c [WebAssembly] Make wasm-eh.cpp requires WebAssembly
D67208 added a new test line to wasm-eh.cpp that invokes the LLVM
backend and this test fails on bots that don't have WebAssembly target.
This makes wasm-eh.cpp explicitly require WebAssembly so this will be
skipped on those targets.

llvm-svn: 371711
2019-09-12 06:52:24 +00:00
David Zarzycki c167402183 [WebAssembly] Add REQUIRES to test
llvm-svn: 371710
2019-09-12 06:50:33 +00:00
Craig Topper b8dd075275 [LegalizeTypes] Remove code for softening a float type to itself.
This was previously used to turn fp128 operations into libcalls
on X86. This is now done through op legalization after r371672.

This restores much of this code to before r254653.

llvm-svn: 371709
2019-09-12 05:55:14 +00:00
Heejin Ahn e8b2b8868d [WebAssembly] Add -fwasm-exceptions for wasm EH
Summary:
This adds `-fwasm-exceptions` (in similar fashion with
`-fdwarf-exceptions` or `-fsjlj-exceptions`) that turns on everything
with wasm exception handling from the frontend to the backend.

We currently have `-mexception-handling` in clang frontend, but this is
only about the architecture capability and does not turn on other
necessary options such as the exception model in the backend. (This can
be turned on with `llc -exception-model=wasm`, but llc is not invoked
separately as a command line tool, so this option has to be transferred
from clang.)

Turning on `-fwasm-exceptions` in clang also turns on
`-mexception-handling` if not specified, and will error out if
`-mno-exception-handling` is specified.

Reviewers: dschuff, tlively, sbc100

Subscribers: aprantl, jgravelle-google, sunfish, cfe-commits

Tags: #clang

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

llvm-svn: 371708
2019-09-12 04:01:37 +00:00
Yevgeny Rouban bdfe84ad11 Make SwitchInstProfUpdateWrapper strict permanently
We have been using -switch-inst-prof-update-wrapper-strict
set to true by default for some time. It is time to remove
the safety stuff and make SwitchInstProfUpdateWrapper
intolerant to inconsistencies in !prof branch_weights
metadata of SwitchInst.

This patch gets rid of the Invalid state of
SwitchInstProfUpdateWrapper and the option
-switch-inst-prof-update-wrapper-strict. So there is only
two states: changed and unchanged.

Reviewers: davidx, nikic, eraman, reames, chandlerc
Reviewed By: davidx
Differential Revision: https://reviews.llvm.org/D67435

llvm-svn: 371707
2019-09-12 03:41:34 +00:00
Heejin Ahn 4f0245fd98 [clang-tidy] Fix build with -DBUILD_SHARED_LIB=ON
Summary: This fixes build failures with `-DBUILD_SHARED_LIB=ON` after D67419.

Reviewers: NoQ

Subscribers: mgorny, xazax.hun, cfe-commits

Tags: #clang

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

llvm-svn: 371706
2019-09-12 03:10:57 +00:00
Vitaly Buka 23bbeb52f3 [compiler-rt] cpplint of inc files in background
llvm-svn: 371705
2019-09-12 02:20:37 +00:00
Vitaly Buka d2af368aee [compiler-rt] Remove some cpplint filters
llvm-svn: 371704
2019-09-12 02:20:36 +00:00
Vitaly Buka 6e8c21857e [compiler-rt] Run cpplint only for check-sanitizer
llvm-svn: 371703
2019-09-12 01:35:11 +00:00
Vitaly Buka a3cd67c007 [compiler-rt] Better lint output for .inc files
llvm-svn: 371702
2019-09-12 01:35:09 +00:00
Nico Weber 52f6131cc7 gn build: Merge r371700
llvm-svn: 371701
2019-09-12 01:25:34 +00:00
David Blaikie 5adb3d2ac0 Reapply llvm-reduce: Add pass to reduce parameters""
Fixing a couple of asan-identified bugs
* use of an invalid "Use" iterator after the element was removed
* use of StringRef to Function name after the Function was erased

This reapplies r371567, which was reverted in r371580.

llvm-svn: 371700
2019-09-12 01:20:48 +00:00
Jan Korous b51a285c4c [clang-scan-deps] Add dependency targets
Differential Revision: https://reviews.llvm.org/D67475

llvm-svn: 371697
2019-09-12 00:48:45 +00:00
David Blaikie aaef97a55e PR43278: llvm-reduce: Use temporary file names (and ToolOutputFile) rather than unique ones - to ensure they're cleaned up
This modifies the tool somewhat to only create files when about to run
the "interestingness" test, and delete them immediately after - this
means some more files will be created sometimes (when "double checking"
work - which should probably be fixed/avoided anyway).

This now creates temporary files, rather than only unique ones, and also
uses ToolOutputFile (without ever calling "keep") to ensure the files
are deleted as soon as the interestingness test is run.

llvm-svn: 371696
2019-09-12 00:31:57 +00:00
Craig Topper 635d383fad [X86] Enable -mprefer-vector-width=256 by default for Skylake-avx512 and later Intel CPUs.
AVX512 instructions can cause a frequency drop on these CPUs. This
can negate the performance gains from using wider vectors. Enabling
prefer-vector-width=256 will prevent generation of zmm registers
unless explicit 512 bit operations are used in the original source
code.

I believe gcc and icc both do something similar to this by default.

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

llvm-svn: 371694
2019-09-11 23:54:36 +00:00
Amara Emerson 55d86f04c7 [AArch64][GlobalISel] Fall back on attempts to allocate split types on the stack.
First we were asserting that the ValNo of a VA was the wrong value. It doesn't actually
make a difference for us in CallLowering but fix that anyway to silence the assert.

The bigger issue was that after fixing the assert we were generating invalid MIR
because the merging/unmerging of values split across multiple registers wasn't
also implemented for memory locs. This happens when we run out of registers and
have to pass the split types like i128 -> i64 x 2 on the stack. This is do-able, but
for now just fall back.

llvm-svn: 371693
2019-09-11 23:53:23 +00:00
Jessica Paquette e297ad1bd9 [GlobalISel][AArch64] Check caller for swifterror params in tailcall eligibility
Before, we only checked the callee for swifterror. However, we should also be
checking the caller to see if it has a swifterror parameter.

Since we don't currently handle outgoing arguments, this didn't show up in the
swifterror.ll testcase.

Also, remove the swifterror checks from call-translator-tail-call.ll, since
they are covered by the existing swifterror testing. Better to have it all in
one place.

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

llvm-svn: 371692
2019-09-11 23:44:16 +00:00
Vitaly Buka 33f01663f7 [dfsan] Revert dfsan_set_label removal
It's part of interface, maybe it is used in external code.

llvm-svn: 371691
2019-09-11 23:43:23 +00:00
Jonas Devlieghere 4a491ec491 [Reproducer] Move the command loader into the reproducer (NFC)
This just moves the CommandLoader utility into the reproducer namespace
and makes it accessible outside the API layer. This is setting things up
for a bigger change.

llvm-svn: 371689
2019-09-11 23:27:12 +00:00
Jonas Devlieghere d9aec34b97 [NFC] Reformat SBDebugger before making changes
llvm-svn: 371688
2019-09-11 23:27:09 +00:00
Vitaly Buka c0fa632236 Remove NOLINTs from compiler-rt
llvm-svn: 371687
2019-09-11 23:19:48 +00:00
Jonas Devlieghere bcc24e46ba [Reproducer] Move GDB Remote Provider into Reproducer (NFC)
Originally the idea was for providers to be defined close to where they
are used. While this helped designing the providers in such a way that
they don't depend on each other, it also means that it's not possible to
access them from a central place. This proved to be a problem for some
providers and resulted in them living in the reproducer class.

The ProcessGDBRemote provider is the last remaining exception. This
patch makes things consistent and moves it into the reproducer like the
other providers.

llvm-svn: 371685
2019-09-11 23:15:12 +00:00
Reid Kleckner e78a7a0ecd [TableGen] Skip CRLF conversion when writing output
Doing the CRLF translation while writing the file defeats our
optimization to not update the file if it hasn't changed.

Fixes PR43271.

llvm-svn: 371683
2019-09-11 22:33:50 +00:00