1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
Commit Graph

183360 Commits

Author SHA1 Message Date
Johannes Doerfert
1b61fbc6f8 [Attributor] Use the AANoNull attribute directly in AADereferenceable
Summary:
Instead of constantly keeping track of the nonnull status with the
dereferenceable information we can simply query the nonnull attribute
whenever we need the information (debug + manifest).

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 368924
2019-08-14 21:31:32 +00:00
Amara Emerson
c97843653b [AArch64][GlobalISel] Custom selection for s8 load acquire.
Implement this single atomic load instruction so that we can compile stack
protector code.

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

llvm-svn: 368923
2019-08-14 21:30:30 +00:00
Johannes Doerfert
09f2ede5d5 [Attributor] Use liveness during the creation of AAReturnedValues
Summary:
As one of the first attributes, and one of the complex ones,
AAReturnedValues was not using liveness but we filtered the result after
the fact. This change adds liveness usage during the creation. The
algorithm is also improved and shorter.

The new algorithm will collect returned values over time using the
generic facilities that work with liveness already, e.g.,
genericValueTraversal which does not look at dead PHI node predecessors.
A test to show how this leads to better results is included.

Note: Unresolved calls and resolved calls are now tracked explicitly.

Reviewers: uenoku, sstefan1

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

llvm-svn: 368922
2019-08-14 21:29:37 +00:00
Johannes Doerfert
ae3448523f [Attributor] Do not update or manifest dead attributes
Summary:
If the associated context instruction is assumed dead we do not need to
update or manifest the state.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

llvm-svn: 368921
2019-08-14 21:25:08 +00:00
Johannes Doerfert
dd614fff10 [Attributor] Use IRPosition consistently
Summary:
The next attempt to clean up the Attributor interface before we grow it
further.

Before, we used a combination of two values (associated + anchor) and an
argument number (or -1) to determine a location. This was very fragile.
The new system uses exclusively IR positions and we restrict the
generation of IR positions to special constructor methods that verify
internal constraints we have. This will catch misuse early.

The auto-conversion, e.g., in getAAFor, is now performed through the
SubsumingPositionIterator. This iterator takes an IR position and allows
to visit all IR positions that "subsume" the given one, e.g., function
attributes "subsume" argument attributes of that function. For a
detailed breakdown see the class comment of SubsumingPositionIterator.

This patch also introduces the IRPosition::getAttrs() to extract IR
attributes at a certain position. The method knows how to look up in
different positions that are equivalent, e.g., the argument position for
call site arguments. We also introduce three new positions kinds such
that we have all IR positions where attributes can be placed and one for
"floating" values.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

llvm-svn: 368919
2019-08-14 21:18:01 +00:00
Diego Trevino Ferrer
1b3c98cfd0 [Bugpoint redesign] Added Pass to Remove Global Variables
Summary:
This pass tries to remove Global Variables, as well as their derived uses. For example if a variable `@x` is used by `%call1` and `%call2`, both these uses and the definition of `@x` are deleted. Moreover if `%call1` or `%call2` are used elsewhere those uses are also deleted, and so on recursively.

I'm still uncertain if this pass should remove derived uses, I'm open to suggestions.

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 368918
2019-08-14 21:01:19 +00:00
Diego Trevino Ferrer
339b24fbc2 [Bugpoint redesign] Reduced scope of variables in Delta implementation
Summary: This diff also changed the check in `Delta.cpp` to verify interesting-ness, so it exits when the input isn't interesting

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 368915
2019-08-14 20:34:12 +00:00
Sanjay Patel
08196b311b [x86] add tests for fadd reduction; NFC
More coverage for D66236.

llvm-svn: 368913
2019-08-14 20:21:30 +00:00
JF Bastien
43dd483d67 Use std::is_final directly
The workaround isn't needed anymore because all toolchains should support it.

llvm-svn: 368910
2019-08-14 20:13:49 +00:00
JF Bastien
e76fa39bfc SwapByteOrder.h: don't check for unsupported GCC versions
llvm-svn: 368909
2019-08-14 19:59:05 +00:00
JF Bastien
654d864eb6 MathExtras.h: don't check for unsupported GCC versions
llvm-svn: 368908
2019-08-14 19:57:21 +00:00
Erich Keane
8d0fafd361 Add support in CMake to statically link the C++ standard library.
It is sometimes useful to have the C++ standard library linked into the
assembly when compiling clang, particularly when distributing a compiler
onto systems that don't have a copy of stdlibc++ or libc++ installed.

This functionality should work with either GCC or Clang as the host
compiler, though statically linking libc++ (as may be required for
licensing purposes) is only possible if the host compiler is Clang with
a copy of libc++ available.

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

llvm-svn: 368907
2019-08-14 19:55:59 +00:00
Dinar Temirbulatov
3cdc6b371a [SLP][NFC] Use pointers to address to ScalarToTreeEntry elements, instead of indexes.
llvm-svn: 368906
2019-08-14 19:46:50 +00:00
Sanjay Patel
4e31bed4b9 [SDAG] move variable closer to use; NFC
llvm-svn: 368905
2019-08-14 19:46:15 +00:00
JF Bastien
1205ea06b0 Revert "Un-break the bots"
Looks like the problem was due to the cmake cache, Chris fixed in r368897.

llvm-svn: 368902
2019-08-14 19:19:41 +00:00
Matt Arsenault
d715459f02 AMDGPU: Reduce number of registers in test
Once the failure this is testing is fixed, this would fail due to
using too many registers.

llvm-svn: 368901
2019-08-14 19:09:48 +00:00
Jinsong Ji
fea8690194 [PowerPC][NFC] Remove duplicate tests in build-vector-test.ll
AllOnes has been split into build-vector-allones.ll.

llvm-svn: 368900
2019-08-14 19:06:59 +00:00
Jan Korous
3d69d6833d [Support][NFC] Fix error message for posix_spawn_file_actions_addopen failed call
Seems like a copy-paste from couple lines above.

llvm-svn: 368899
2019-08-14 18:30:18 +00:00
Philip Reames
08bf4cf650 [RLEV] Rewrite loop exit values for multiple exit loops w/o overall loop exit count
We already supported rewriting loop exit values for multiple exit loops, but if any of the loop exits were not computable, we gave up on all loop exit values. This patch generalizes the existing code to handle individual computable loop exits where possible.

As discussed in the review, this is a starting point for figuring out a better API.  The code is a bit ugly, but getting it in lets us test as we go.  

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

llvm-svn: 368898
2019-08-14 18:27:57 +00:00
Chris Bieneman
ed1783018c [CMake] Fix cache invalidation of LLVM_CXX_STD
This cleans up fallout from https://reviews.llvm.org/D66195.

llvm-svn: 368897
2019-08-14 18:26:37 +00:00
JF Bastien
b73bd7c308 Un-break the bots
Some bots can't find is_final despite it being in C++14. Leave the code as it was for now, fix it later when the bots are happy.

llvm-svn: 368896
2019-08-14 18:17:06 +00:00
Matt Arsenault
d04e499a2d InferAddressSpaces: Move target intrinsic handling to TTI
I'm planning on handling intrinsics that will benefit from checking
the address space enums. Don't bother moving the address collection
for now, since those won't need th enums.

llvm-svn: 368895
2019-08-14 18:13:00 +00:00
Matt Arsenault
fc2876f44c InferAddressSpaces: Remove unnecessary check for ConstantInt
The IR is invalid if this isn't a constant since immarg was added.

llvm-svn: 368893
2019-08-14 18:01:42 +00:00
JF Bastien
509783bebc Match if / elseif properly
My last commit fumbled it.

llvm-svn: 368892
2019-08-14 18:01:11 +00:00
Taewook Oh
310bb691c9 [DebugInfo] Consider debug label scope has an extra lexical block file
Summary: There are places where a case that debug label scope has an extra lexical block file is not considered properly. The modified test won't pass without this patch.

Reviewers: aprantl, HsiangKai

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 368891
2019-08-14 17:58:45 +00:00
JF Bastien
07529abaf2 Remove now useless C++1y flag
As of D66195 we support C++14 by default.

llvm-svn: 368890
2019-08-14 17:57:20 +00:00
JF Bastien
32badd7f9d Don't explicitly check for C++14
MSVC is weird about __cplusplus. The check I added in D66195 confuses it.

llvm-svn: 368889
2019-08-14 17:48:36 +00:00
Simon Pilgrim
ced1cd35f6 Fix cppcheck + MSVC analyzer uninitialized member variable warning. NFCI.
llvm-svn: 368888
2019-08-14 17:41:37 +00:00
JF Bastien
a8dac4e648 Move to C++14
Summary:
I just bumped the minimum compiler versions to support C++14 in D66188.

Following [our process](http://llvm.org/docs/DeveloperPolicy.html#toolchain) and [our previous agreement](http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html), I'm now officially bumping the C++ version to 14 and updating the documentation.

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, chandlerc, thakis, EricWF, jyknight, lhames, JDevlieghere

Tags: #llvm

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

llvm-svn: 368887
2019-08-14 17:39:07 +00:00
Roman Lebedev
81b39e4af9 [InstCombine][NFC] Tests for 'try to reuse constant from select in comparison'
https://rise4fun.com/Alive/THl

llvm-svn: 368886
2019-08-14 17:27:50 +00:00
David Bolvansky
804083e5eb [SLC] Dereferenceable annonation - handle valid null pointers
Reviewers: jdoerfert, reames

Reviewed By: jdoerfert

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 368884
2019-08-14 17:15:20 +00:00
Jonas Devlieghere
570b0503d9 [DebugLine] Improve path handling.
After switching over LLDB's line table parser to libDebugInfo, we
noticed two regressions on the Windows bot. The problem is that when
obtaining a file from the line table prologue, we append paths without
specifying a path style. This leads to incorrect results on Windows for
debug info containing Posix paths:

  0x0000000000201000: /tmp\b.c, is_start_of_statement = TRUE

This patch is an attempt to fix that by guessing the path style whenever
possible.

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

llvm-svn: 368879
2019-08-14 17:00:10 +00:00
Simon Pilgrim
dd2ad96c34 Fix cppcheck + MSVC analyzer uninitialized member variable warning. NFCI.
llvm-svn: 368877
2019-08-14 16:55:34 +00:00
David Bolvansky
a0ffbaff7f [BuildLibCalls] Noalias annotation
Summary: I think this is better solution than annotating callsites in IC/SLC.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: MaskRay, llvm-commits

Tags: #llvm

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

llvm-svn: 368875
2019-08-14 16:50:06 +00:00
Bill Wendling
d922b35caa Ignore indirect branches from callbr.
Summary:
We can't speculate around indirect branches: indirectbr and invoke. The
callbr instruction needs to be included here.

Reviewers: nickdesaulniers, manojgupta, chandlerc

Reviewed By: chandlerc

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 368873
2019-08-14 16:44:07 +00:00
Simon Atanasyan
9d588b736b [mips] Remove redundant case in the test. NFC
llvm-svn: 368870
2019-08-14 16:27:07 +00:00
Simon Atanasyan
a36e139f9f [mips] Split long lines in the test case file. NFC
llvm-svn: 368869
2019-08-14 16:27:00 +00:00
Thomas Lively
4d02289f13 [WebAssembly] Stop unrolling SIMD shifts since they are fixed in V8
Summary:
Fixes PR42973. Tests don't change because simd-arith.ll tests behavior
on unimplemented-simd128, which does not include any temporary
workarounds such as the one removed in this revision.

Reviewers: aheejin

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

Tags: #llvm

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

llvm-svn: 368868
2019-08-14 16:24:37 +00:00
Simon Pilgrim
aba2c2ca85 Fix cppcheck + MSVC analyzer uninitialized member variable warning. NFCI.
llvm-svn: 368865
2019-08-14 16:03:37 +00:00
Craig Topper
4c2673ab44 [X86] Use PSADBW for v8i8 addition reductions.
Improves the 8 byte case from PR42674.

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

llvm-svn: 368864
2019-08-14 15:57:29 +00:00
Craig Topper
9c7cd7edad [LangRef] Remove opening [ that was missing a closing ] from call/callbr/invoke syntax.
It looks like this bracket was added when the addrspace was added.
before it. So I think it can jut be removed.

llvm-svn: 368861
2019-08-14 15:10:37 +00:00
Xiangling Liao
ffd571a7ad [NFC][AIX] Change assertion
Address one left comment on https://reviews.llvm.org/D63547. A minor
change for assertion.

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

llvm-svn: 368860
2019-08-14 14:57:25 +00:00
Jinsong Ji
d95b5d0a4c [PowerPC][NFC] Add test for build all one vector with different types.
build-vector-tests.ll is far too big, split such type tests for single
buildvector into new file.

llvm-svn: 368859
2019-08-14 14:53:05 +00:00
Craig Topper
1e7d252842 [X86][CostModel] Adjust the costs of ZERO_EXTEND/SIGN_EXTEND with less than 128-bit inputs
Now that we legalize by widening, the element types here won't change. Previously these were modeled as the elements being widened and then the instruction might become an AND or SHL/ASHR pair. But now they'll become something like a ZERO_EXTEND_VECTOR_INREG/SIGN_EXTEND_VECTOR_INREG.

For AVX2, when the destination type is legal its clear the cost should be 1 since we have extend instructions that can produce 256 bit vectors from less than 128 bit vectors. I'm a little less sure about AVX1 costs, but I think the ones I changed were definitely too high, but they might still be too high.

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

llvm-svn: 368858
2019-08-14 14:52:39 +00:00
Craig Topper
d6f9816f48 [X86] Add llvm_unreachable to a switch that covers all expected values.
llvm-svn: 368857
2019-08-14 14:51:19 +00:00
Jinsong Ji
39b20e91fe [PowerPC][NFC] Consolidate duplicate XX3Form_SetZero and XX3Form_Zero.
Rename one to XX3Form_SameOp, remove the other one.

llvm-svn: 368856
2019-08-14 14:16:26 +00:00
Jason Liu
e40db75780 [AIX] Add call lowering for parameters that could pass onto FPRs
Summary:
This patch adds call lowering functionality to enable passing
parameters onto floating point registers when needed.

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

llvm-svn: 368855
2019-08-14 14:13:11 +00:00
Pavel Labath
623bce661a Revert "raw_ostream: add operator<< overload for std::error_code"
This reverts commit r368849, because it breaks some bots (e.g.
llvm-clang-x86_64-win-fast).

It turns out this is not as NFC as we had hoped, because operator== will
consider two std::error_codes to be distinct even though they both hold
"success" values if they have different categories.

llvm-svn: 368854
2019-08-14 13:59:04 +00:00
Pavel Labath
2c377876d9 raw_ostream: add operator<< overload for std::error_code
Summary:
The main motivation for this is unit tests, which contain a large macro
for pretty-printing std::error_code, and this macro is duplicated in
every file that needs to do this. However, the functionality may be
useful elsewhere too.

In this patch I have reimplemented the existing ASSERT_NO_ERROR macros
to reuse the new functionality, but I have kept the macro (as a
one-liner) as it is slightly more readable than ASSERT_EQ(...,
std::error_code()).

Reviewers: sammccall, ilya-biryukov

Subscribers: zturner, llvm-commits

Tags: #llvm

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

llvm-svn: 368849
2019-08-14 13:33:28 +00:00
Roman Lebedev
6b4958f0a3 [SimplifyCFG] Add "safe abs" test from CMSIS DSP 'abs_with_clamp()'
With -phi-node-folding-threshold=3
this branch would get flattened into select.

See https://reviews.llvm.org/D65148#1629010

llvm-svn: 368847
2019-08-14 13:10:59 +00:00