126677 Commits

Author SHA1 Message Date
Krzysztof Parzyszek
d6e0f7e30a [Hexagon] Use general purpose registers to spill pred/mod registers into
Patch by Tobias Edler Von Koch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258527 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 19:15:58 +00:00
Matt Arsenault
9c5e71ab85 AMDGPU: Fix getArchTypePrefix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258525 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 19:09:12 +00:00
Matt Arsenault
a75de8d6ed AMDGPU: Rename some r600 intrinsics to use correct TargetPrefix
These ones aren't directly emitted by mesa and inserted by a pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258523 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 19:00:09 +00:00
Matt Arsenault
21559cea5b AMDGPU: Remove unused R600 intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258522 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 18:52:14 +00:00
David Majnemer
c7ee533781 [WinEH] Make collectFuncletMembers non-recursive
Use a worklist for the pre-order DFS instead of using recursion.
No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258521 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 18:49:50 +00:00
Kevin Enderby
161c62450c Fix MachOObjectFile::getSymbolName() to not call report_fatal_error()
but to return object_error::parse_failed.  Then made the code in llvm-nm
do for Mach-O files what is done in the darwin native tools which is to
print "bad string index" for bad string indexes.  Updated the error message
in the llvm-objdump test, and added tests to show llvm-nm prints
"bad string index" and a test to print the actual bad string index value
which in this case is 0xfe000002 when printing the fields as raw hex.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258520 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 18:47:14 +00:00
Matt Arsenault
9d32832ffb AMDGPU: Change control flow intrinsics to use amdgcn prefix
These aren't supposed to be used outside of the backend,
so there aren't any users to worry about.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258516 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 18:42:55 +00:00
Matt Arsenault
b6f57b6672 AMDGPU: Don't use separate mulhu/mulhs Pats
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258515 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 18:42:49 +00:00
Matt Arsenault
3e81c4eb9a AMDGPU: Remove random TGSI intrinsic
I don't think this was ever used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258514 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 18:42:44 +00:00
Matt Arsenault
eb3f71fe95 AMDGPU: Remove AMDGPU.fract intrinsic
Mesa doesn't use this, and this is pattern matched already
from fsub x, (ffloor x)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258513 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 18:42:38 +00:00
Xinliang David Li
0f05a462e0 [PGO] add an interface needed by icall promotion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258509 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 18:13:34 +00:00
Craig Topper
a4f2978e0c [TableGen] Make a class member local to the function that populates it and consumes it later. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 05:59:43 +00:00
Craig Topper
43b79903fe [TableGen] Reorder fields in AsmWriterOperand to remove padding and reduce size. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258489 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 05:59:40 +00:00
Craig Topper
1c09f96ebe [TableGen] Remove the CGIOpNo from AsmWriterOperand as its not used for anything. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258488 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 05:59:37 +00:00
Xinliang David Li
860ed4e8ad [PGO] eliminate use of static variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258486 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 05:48:40 +00:00
JF Bastien
6c6db560a3 NFC WebAssembly: update links
I got a vanity URL, and moved the github waterfall repo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258484 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 04:21:49 +00:00
Dan Gohman
f2cde91200 [SelectionDAG] Fold more offsets into GlobalAddresses
This reapplies r258296 and r258366, and also fixes an existing bug in
SelectionDAG.cpp's isMemSrcFromString, neglecting to account for the
offset in a GlobalAddressSDNode, which is uncovered by those patches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258482 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 03:57:34 +00:00
Manuel Jacob
9690516835 Replace Type::getInt32Ty() and comparison by isIntegerTy(32). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258480 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 03:30:27 +00:00
Ivan Krasin
55b3567cb1 Revert r258473 as it's breaking the build with libc++
Reviewers: kcc

Differential Revision: http://reviews.llvm.org/D16441

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258479 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 03:21:52 +00:00
Eduard Burtescu
a269478394 [opaque pointer types] [NFC] DataLayout::getIndexedOffset: take source element type instead of pointer type and rename to getIndexedOffsetInType.
Summary:

Reviewers: mjacob, dblaikie

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16282

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258478 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 03:08:27 +00:00
Eduard Burtescu
f79a031360 [opaque pointer types] [NFC] FindAvailableLoadedValue: take LoadInst instead of just the pointer.
Reviewers: mjacob, dblaikie

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16422

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258477 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 01:51:51 +00:00
Eduard Burtescu
17a7116948 [opaque pointer types] [NFC] gep_type_{begin,end} now take source element type and address space.
Reviewers: mjacob, dblaikie

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16436

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258474 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 01:33:43 +00:00
Ivan Krasin
3e0fdb8944 Use std::piecewise_constant_distribution instead of ad-hoc binary search.
Summary:
Fix the issue with the most recently discovered unit receiving much less attention.

Note: I had to change the seed for one test to make it pass. Alternatively,
the number of runs could be increased. I believe that the average time of
'foo' discovery is not increased, just seed=1 was particularly convenient
for the previous PRNG scheme used.

Reviewers: aizatsky, kcc

Subscribers: llvm-commits, kcc

Differential Revision: http://reviews.llvm.org/D16419

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258473 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 01:32:34 +00:00
Eduard Burtescu
0aa1a483fe [opaque pointer types] [NFC] Add an explicit type argument to ConstantFoldLoadFromConstPtr.
Reviewers: mjacob, dblaikie

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16418

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258472 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 01:17:26 +00:00
Pirama Arumuga Nainar
fb7c14ad33 Do not lower VSETCC if operand is an f16 vector
Summary:
SETCC with f16 vectors has OperationAction set to Expand but still gets
lowered to FCM* intrinsics based on its result type.  This patch skips
lowering of VSETCC if the operand is an f16 vector.

v4 and v8 tests included.

Reviewers: ab, jmolloy

Subscribers: srhines, llvm-commits

Differential Revision: http://reviews.llvm.org/D15361

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258471 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 01:16:57 +00:00
Reid Kleckner
99fdb962e1 Revert "[SelectionDAG] Fold more offsets into GlobalAddresses"
This reverts r258296 and the follow up r258366. With this change, we
miscompiled the following program on Windows:
  #include <string>
  #include <iostream>
  static const char kData[] = "asdf jkl;";
  int main() {
    std::string s(kData + 3, sizeof(kData) - 3);
    std::cout << s << '\n';
  }

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258465 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 01:09:29 +00:00
Kostya Serebryany
75da488104 [libFuzzer] don't do expensive memmem if the result will not be used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258462 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 01:04:58 +00:00
Teresa Johnson
23d189b204 [ThinLTO] Do metadata linking during batch function importing
Summary:
Since we are currently not doing incremental importing there is
no need to link metadata as a postpass. The module linker will
only link in the imported subroutines due to the functionality
added by r256003.

(Note that the metadata postpass linking functionalitiy is still
used by llvm-link, and may be needed here in the future if a more
incremental strategy is adopted.)

Reviewers: joker.eph

Subscribers: joker.eph, llvm-commits

Differential Revision: http://reviews.llvm.org/D16424

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258458 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 00:15:53 +00:00
Eduard Burtescu
4750635dd8 [opaque pointer types] [NFC] Take advantage of get{Source,Result}ElementType when folding GEPs.
Summary:

Reviewers: mjacob, dblaikie

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16302

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258456 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 23:42:06 +00:00
Sanjay Patel
b3bc79d555 move function definitions so we don't need separate declarations ; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258455 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 23:38:43 +00:00
Sanjay Patel
fbc73a666e [LibCallSimplifier] refactor FP function signature checks ; NFCI
Use the helper function added in r258428.

The check should really be hoisted to the caller of all of these
optimize* functions, but that's another step.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258446 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 22:58:01 +00:00
Sanjay Patel
93b477f563 avoid variable shadowing; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258445 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 22:41:16 +00:00
Sanjay Patel
d288063a88 remove unnecessary variable; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258444 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 22:31:18 +00:00
Reid Kleckner
1264f61388 Avoid unnecessary stack realignment in musttail thunks with SSE2 enabled
The X86 musttail implementation finds register parameters to forward by
running the calling convention algorithm until a non-register location
is returned. However, assigning a vector memory location has the side
effect of increasing the function's stack alignment. We shouldn't
increase the stack alignment when we are only looking for register
parameters, so this change conditionalizes it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258442 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 22:23:22 +00:00
Simon Pilgrim
180abd8ba0 [X86][SSE] Improve i16 splatting shuffles
Better handling of the annoying pshuflw/pshufhw ops which only shuffle lower/upper halves of a vector.

Added vXi16 unary shuffle support for cases where i16 elements (from the same half of the source) are being splatted to the whole of one of the halves. This avoids the general lowering case which must shuffle the 32-bit elements first - meaning that we used to end up with unnecessary duplicate pshuflw/pshufhw shuffles.

Note this has the side effect of a lot of SSSE3 test cases no longer needing to use PSHUFB, as it falls below the 3 op combine threshold for when PSHUFB is typically worth it. I've raised PR26183 to discuss if the threshold should be changed and whether we need to make it more specific to the target CPU.

Differential Revision: http://reviews.llvm.org/D14901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258440 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 22:07:41 +00:00
Dimitry Andric
ad24fed421 In test-release.sh, only run uname -s once. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258439 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 22:07:17 +00:00
Lang Hames
1a9ebde7e0 [RuntimeDyld][AArch64] Add support for the MachO ARM64_RELOC_SUBTRACTOR reloc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258438 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 21:59:50 +00:00
Dimitry Andric
0ae89f95ca Let test-release.sh checkout subprojects directly into the target tree,
instead of using symlinks

Summary:
In the past I have run into several problems with the way
`test-release.sh` creates all the subproject directories as siblings,
and then uses symlinks to stitch them all together.  In some scenarios
this leads to clang not being able to find header files, etc.

This patch changes the script so it directly exports into the correct
target locations for each subproject.

Reviewers: hans

Subscribers: emaste, llvm-commits

Differential Revision: http://reviews.llvm.org/D16420

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258436 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 21:57:49 +00:00
David L Kreitzer
fad7d1588f Fix for two constant propagation problems in GVN with the assume intrinsic
instruction.

Patch by Yuanrui Zhang.

Differential Revision: http://reviews.llvm.org/D16100


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 21:32:35 +00:00
Kevin Enderby
d8116dc95f Fix MachOObjectFile::getSymbolSection() to not call report_fatal_error()
but to return object_error::parse_failed.  Then made the code in llvm-nm
do for Mach-O files what is done in the darwin native tools which is to
print "(?,?)" or just "s" for bad section indexes.  Also added a test to show
it prints the bad section index of "42" when printing the fields as raw hex.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258434 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 21:13:27 +00:00
Sanjay Patel
faf8f30ad7 [LibCallSimplifier] don't get fooled by a fake fmin()
This is similar to the bug/fix:
https://llvm.org/bugs/show_bug.cgi?id=26211
http://reviews.llvm.org/rL258325

The fmin() test case reveals another bug caused by sloppy
code duplication. It will crash without this patch because
fp128 is a valid floating-point type, but we would think
that we had matched a function that used doubles.

The new helper function can be used to replace similar
checks that are used in several other places in this file.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258428 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 20:19:54 +00:00
Rong Xu
0679d14d7e Fix buildbot failure due to r258420
Include the needed headfile to fix the buildbot failure due to r258420 [PGO] Passmanagerbuilder change that enable IR level PGO instrumentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258423 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 19:06:24 +00:00
David Majnemer
b54ca98bbe [InstCombine] Simplify (x >> y) <= x
This commit extends the patterns recognised by InstSimplify to also handle (x >> y) <= x in the same way as (x /u y) <= x.

The missing optimisation was found investigating why LLVM did not optimise away bound checks in a binary search: https://github.com/rust-lang/rust/pull/30917

Patch by Andrea Canciani!

Differential Revision: http://reviews.llvm.org/D16402

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258422 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 18:55:54 +00:00
Chad Rosier
f47eeb0247 Partially revert "Add command line options to force function/loop alignments."
This partially reverts r256571 in favor of the solution in r258409.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258421 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 18:49:15 +00:00
Rong Xu
f588a4e23f [PGO] Passmanagerbuilder change that enable IR level PGO instrumentation
This patch includes the passmanagerbuilder change that enables IR level PGO instrumentation. It adds two passmanagerbuilder options: -profile-generate=<profile_filename> and -profile-use=<profile_filename>. The new options are primarily for debug purpose.

Reviewers: davidxl, silvas

Differential Revision: http://reviews.llvm.org/D15828




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258420 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 18:28:59 +00:00
Adam Nemet
c0ed657c76 [TTI] Add getCacheLineSize
Summary:
And use it in PPCLoopDataPrefetch.cpp.

@hfinkel, please let me know if your preference would be to preserve the
ppc-loop-prefetch-cache-line option in order to be able to override the
value of TTI::getCacheLineSize for PPC.

Reviewers: hfinkel

Subscribers: hulx2000, mcrosier, mssimpso, hfinkel, llvm-commits

Differential Revision: http://reviews.llvm.org/D16306

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258419 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 18:28:36 +00:00
Rong Xu
435b8e89a2 [PGO] IR level instrumentation of indirect call value profiling
This patch adds the instrumentation for indirect call value profiling. It finds all the indirect call-sites and generates instrprof_value_profile intrinsic calls. A new opt level option -disable-vp is introduced to disable this instrumentation.

Reviewers: davidxl, betulb, vsk

Differential Revision: http://reviews.llvm.org/D16016


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258417 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 18:11:44 +00:00
Sanjay Patel
d0d71cf4bb make helper functions static; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258416 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 18:01:57 +00:00
Manuel Jacob
0718a758f5 Undo r258163 "Move part of an if condition into an assertion. NFC."
This undoes the change made in r258163.  The assertion fails if `Ptr` is of a
vector type.  The previous code doesn't look completely correct either, so I'll
investigate this more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258411 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 17:36:14 +00:00
Philip Reames
fb1664ee8e Fix a type in a comment
Thanks to Sean Silva for pointing it out.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258410 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 17:32:12 +00:00