126641 Commits

Author SHA1 Message Date
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
Geoff Berry
5e79986028 [BlockPlacement] Add option to align all non-fall-through blocks.
Summary: This option is being added for testing purposes.

Reviewers: mcrosier

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258409 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 17:25:52 +00:00
Matthew Simpson
895661cc6d Revert "[SLP] Truncate expressions to minimum required bit width"
This reverts commit r258404.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258408 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 17:17:20 +00:00
Teresa Johnson
748f1f02fd Use early return to simplify code (NFC)
Follow on to r258405.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258407 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 17:16:53 +00:00
Vedant Kumar
94680bd2dd [GCOV] Avoid emitting profile arcs for module and skeleton CUs
Do not emit profile arc files and note files for module and skeleton
CU's.

Our users report seeing unexpected *.gcda and *.gcno files in their
projects when using gcov-style profiling with modules or frameworks.
The unwanted files come from these modules. This is not very helpful
for end-users. Further, we've seen reports of instrumented programs
crashing while writing these files out (due to I/O failures).

rdar://problem/22838296

Reviewed-by: aprantl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258406 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 17:04:42 +00:00
Teresa Johnson
490559682b [ThinLTO] Avoid unnecesary hash lookups during metadata linking (NFC)
Replace sequences of count() followed by operator[] with either
find() or insert(), depending on the context.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258405 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 16:46:40 +00:00
Matthew Simpson
9549f8f7fa [SLP] Truncate expressions to minimum required bit width
This change attempts to produce vectorized integer expressions in bit widths
that are narrower than their scalar counterparts. The need for demotion arises
especially on architectures in which the small integer types (e.g., i8 and i16)
are not legal for scalar operations but can still be used in vectors. Like
similar work done within the loop vectorizer, we rely on InstCombine to perform
the actual type-shrinking. We use the DemandedBits analysis and
ComputeNumSignBits from ValueTracking to determine the minimum required bit
width of an expression.

Differential revision: http://reviews.llvm.org/D15815

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258404 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 16:31:55 +00:00
Scott Egerton
5e2e572fda [mips] Allowed dla instructions on 32-bit architectures.
Summary:
This is now the same as the behaviour of the GNU assembler. This was done
as it is required in order to build the Linux kernel with the integrated
assembler enabled.

Reviewers: dsanders, vkalintiris

Subscribers: dsanders, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258400 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 15:11:01 +00:00
Teresa Johnson
6cd1ab976d Revert obsolete llvm-link -preserve-modules option/test
This testing mode is now obsolete with the change to linkInModule
to take a std::unique_ptr to Module.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258399 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 14:28:52 +00:00
Igor Breger
bf54802a5c AVX512: Masked move intrinsic implementation.
Implemented intrinsic for the follow instructions (reg move) : VMOVDQU8/16, VMOVDQA32/64, VMOVAPS/PD.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258398 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 14:18:11 +00:00
Michael Zuckerman
8bb1fe71a6 [AVX512] Adding VPERMT2B and VPERMI2B Intrinsics
Differential Revision: http://reviews.llvm.org/D16398


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258397 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 13:36:01 +00:00
Krzysztof Parzyszek
0102a600a6 PR26172: unnecessary indirection in HexagonCopyToCombine.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258395 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 12:45:17 +00:00
Marina Yatsina
5eb3cea247 [X86] - Removing warning on legal cases caused by commit r258132
There's an overloading of the "movsd" and "cmpsd" instructions, e.g. movsd can be either "Move Data from String to String" or "Move or Merge Scalar Double-Precision Floating-Point Value".
The former should produce warnings when parsing a memory operand that is not ESI/EDI, but the latter should not.

Fixed the code to produce warnings only after making sure we're dealing with the first case.

Expanded the tests of the produced warnings + fixed RUN line of the test so that it would check both stdout and stderr

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258393 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 11:37:06 +00:00
Manuel Jacob
6a93159d6a Change ConstantFoldInstOperands to take Instruction instead of opcode and type. NFC.
Summary:
The previous form, taking opcode and type, is moved to an internal
helper and the new form, taking an instruction, is a wrapper around this
helper.

Although this is a slight cleanup on its own, the main motivation is to
refactor the constant folding API to ease migration to opaque pointers.
This will be follow-up work.

Reviewers: eddyb

Subscribers: dblaikie, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258391 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 06:33:22 +00:00
Manuel Jacob
9b455a8a45 Introduce ConstantFoldCastOperand function and migrate some callers of ConstantFoldInstOperands to use it. NFC.
Summary:
Although this is a slight cleanup on its own, the main motivation is to
refactor the constant folding API to ease migration to opaque pointers.
This will be follow-up work.

Reviewers: eddyb

Subscribers: zzheng, dblaikie, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258390 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 06:31:08 +00:00
Manuel Jacob
80413414ac Introduce ConstantFoldBinaryOpOperands function and migrate some callers of ConstantFoldInstOperands to use it. NFC.
Summary:
Although this is a slight cleanup on its own, the main motivation is to
refactor the constant folding API to ease migration to opaque pointers.
This will be follow-up work.

Reviewers: eddyb

Subscribers: dblaikie, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258389 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 06:26:35 +00:00
Tom Stellard
72304925ab AMDGPU/SI: Pass whether to use the SI scheduler via Target Attribute
Summary:
Currently the SI scheduler can be selected via command line option,
but it turned out it would be better if it was selectable via a Target Attribute.

This patch adds "si-scheduler" attribute to the backend.

Reviewers: tstellarAMD, echristo

Subscribers: echristo, arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258386 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 04:28:34 +00:00
Xinliang David Li
37c2652ad9 re-submit test case (withright format-version)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 02:35:59 +00:00
Andrew Wilkins
9c6305e216 llvm-go: call llvm-config with components
Summary:
Add components back into calls to llvm-config,
which was accidentally removed in r258283.

Reviewers: pcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 02:33:39 +00:00
David Majnemer
c73f2d0de4 Rename MCLineEntry to MCDwarfLineEntry
MCLineEntry gives the impression that it is generic MC machinery.
However, it is specific to DWARF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 01:59:03 +00:00
Kostya Serebryany
7e85cfa5be [libFuzzer] don't use std::vector in one more hot path
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258380 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 01:52:14 +00:00
Andrew Wilkins
97b34f9488 [GlobalISel] make library an optional component
Summary:
Mark the LLVMGlobalISel library as optional in
LLVMBuild.txt, since the library is only built
if LLVM_BUILD_GLOBAL_ISEL is set. Without doing
this, llvm-config includes the library in the
list of components regardless of whether it's
built, and then will error out when asked for
the library names/paths.

Reviewers: qcolombet

Subscribers: joker.eph, llvm-commits, vkalintiris

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258379 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 01:41:03 +00:00
Quentin Colombet
bc54a22872 [GlobalISel] Move generic opcodes description to their own file.
Differential Revision: http://reviews.llvm.org/D16384


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258378 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 01:37:18 +00:00
Xinliang David Li
285f4d0184 Revert 258376 -- wrong version
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258377 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 01:21:00 +00:00
Xinliang David Li
8824b89ee3 [Coverage] Add a test case for comdat
The binary contains two (merged) covmap sections which
have duplicate CovMapRecords from comdat (template instantation).
This test makes sure the reader reads it properly. It also
tests that the coverage data from different instantiations
of the same template function are properly merged in show
output.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258376 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 00:57:42 +00:00
Mike Aizatsky
b1020e3809 [libfuzzer] use %p for printing addresses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258370 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 00:02:09 +00:00
Rafael Espindola
6fc68949bf Remove redundant argument.
It is already a member variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258369 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 00:00:53 +00:00
Reid Kleckner
deaeb15786 [readobj] Print CodeOffset first, it's easier to read
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258368 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 23:21:14 +00:00
Dan Gohman
66e9c101e3 [SelectionDAG] Fix constant offset folding to avoid commuting non-commutative operators.
This fixes a miscompile in MultiSource/Benchmarks/MiBench/consumer-lame
introduced in r258296.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258366 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 23:16:59 +00:00
Chad Rosier
f16748e99b MachineScheduler: Add a command line option to disable post scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258364 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 23:08:32 +00:00
Chad Rosier
1355bf7f21 MachineScheduler: Honor optnone functions in the pre-ra scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258363 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 22:38:25 +00:00
Rafael Espindola
74569533c9 Simplify the logic. NFC.
Found while reviewing the change for PR26152.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 22:38:23 +00:00
Manuel Jacob
397090c163 Run clang-format over ConstantFolding.h, fixing inconsistent indentation. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258361 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 22:27:06 +00:00
Sanjay Patel
a31f640cff don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258360 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 22:24:38 +00:00
David Blaikie
b54eef7a27 Orc: Simplify lambda by using std::set's initializer_list ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258359 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 22:24:26 +00:00
Lang Hames
8b56868097 [Orc] Try to turn Orc execution unit tests back on for Linux.
The fix in r258324 (plus r258354) should allow Orc execution tests to run on
Linux.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258358 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 22:16:14 +00:00
George Burgess IV
3e3c823bc5 Fix typo in an error string. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258357 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 22:15:23 +00:00