Commit Graph

140817 Commits

Author SHA1 Message Date
Sylvestre Ledru
8a6ccbeaaa As we released 3.9, from the 4.0 release notes, points to version 3.9 instead of 3.8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286719 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 10:39:09 +00:00
Craig Topper
7fc9a56e3b [AVX-512] Add unmasked version of shift by immediate and shift by single element in XMM.
Summary:
This is the first step towards being able to add the avx512 shift by immediate intrinsics to InstCombineCalls where we aleady support the sse2 and avx2 intrinsics. We need to the unmasked versions so we can avoid having to teach InstCombineCalls that it would need to insert selects sometimes. Instead we'll just add the selects around the new instrinsics in the frontend.

This change should also enable the shift by i32 intrinsics to take a non-constant shift value just like the avx2 and sse intrinsics. This will enable us to fix PR30691 once we update clang.

Next I'll switch clang to use the new builtins. Then we'll come back to the backend and remove/autoupgrade the old intrinsics. Then I'll work on the same series for variable shifts.

Reviewers: RKSimon, zvi, delena

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286711 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 05:28:24 +00:00
Craig Topper
328301f18d CODE_OWNERS: Take ownership of the X86 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286710 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 05:16:06 +00:00
Craig Topper
ddd7d89218 [AVX-512] Add support for lowering shuffles to VALIGND/VALIGNQ
Summary: VALIGND and VALIGNQ are similar to PALIGNR but instead of working on a 128-bit lane they work on the entire vector register. This change leverages the shuffle rotate detection code used for PALIGNR to detect these cases.

Reviewers: delena, RKSimon

Subscribers: Farhana, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286709 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 05:05:27 +00:00
Saleem Abdulrasool
0a923ad4d6 build: add a dependency on llvm-strings
Since we now have tests for llvm-strings, add a dependency on the tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286707 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 03:45:21 +00:00
Saleem Abdulrasool
421c744b29 llvm-strings: ensure that the last string is correctly printed
We would ignore the last string that appeared if the file ended with a printable
character.  Ensure that we get the last string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286706 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 03:39:21 +00:00
whitequark
18c0ee2638 [OCaml] Adapt to the new attribute C API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286705 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 03:38:30 +00:00
whitequark
b1cfc87891 [C API] Fix several null pointer dereferences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286704 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 03:38:23 +00:00
Kostya Serebryany
be3001891b [libFuzzer] one more trophy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 02:55:45 +00:00
Kostya Serebryany
8f3d5a342b [libFuzzer] use a valid ASCII string for a dummy seed corpus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286702 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 02:27:21 +00:00
Lang Hames
4258590d55 [ORC] Add a WrappedHandlerReturn type to map handler return types onto error
return types.

This class allows user provided handlers to return either error-wrapped types
or plain types. In the latter case, the plain type is wrapped with a success
value of Error or Expected<T> type to fit it into the rest of the serialization
machinery.

This patch allows us to remove the RPC unit-test workaround added in r286646.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286701 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 02:19:31 +00:00
Mehdi Amini
8524467ebd Improve git llvm push to suggest git pull when applying patch fails
Differential Revision: https://reviews.llvm.org/D26565

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286695 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 01:17:59 +00:00
Zachary Turner
3978213ab7 One more set of changes to fix formatv() on linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286692 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 00:35:58 +00:00
Zachary Turner
aec833265c Add missing #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286691 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 00:30:37 +00:00
Zachary Turner
672f0a3092 Fix another problem with formatv().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 00:28:10 +00:00
Kostya Serebryany
22480ffc37 [libFuzzer] use less stack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286689 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 00:24:35 +00:00
Rui Ueyama
2b728d14a4 Remove extra semicolon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286688 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 00:23:32 +00:00
Tom Stellard
da5a5c79fa AMDGPU/SI: Promote i16 = fp_[us]int f32 for VI
Summary: This fixes a regression caused by r286464.

Reviewers: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286687 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 00:19:11 +00:00
Zachary Turner
fb492897c3 Try to fix build after llvm::formatv() patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286686 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 00:18:42 +00:00
Zachary Turner
005ec66a75 Fix -Werror build with clang-cl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286683 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 23:58:11 +00:00
Zachary Turner
97dac2b41d [Support] Introduce llvm::formatv() function.
This introduces a new type-safe general purpose formatting
library.  It provides compile-time type safety, does not require
a format specifier (since the type is deduced), and provides
mechanisms for extending the format capability to user defined
types, and overriding the formatting behavior for existing types.

This patch additionally adds documentation for the API to the
LLVM programmer's manual.

Mailing List Thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/105836.html

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286682 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 23:57:40 +00:00
Rui Ueyama
cccd305c0d Define DbiStreamBuilder::addSectionContribs.
This patch defines a new function to add a SectionContribs stream
to a PDB file. Unlike SectionMap, SectionContribs contains a list
of input sections as opposed to output sections.

Note that this patch needs improving because currently we do not
set Module field in SectionContribs entries. In a follow-up patch,
I'll add Modules and then fix it after that.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286677 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 23:41:13 +00:00
Tom Stellard
6687aabcf5 AMDGPU/SI: Fix visit order assumption in SIFixSGPRCopies
Summary:
This pass was assuming that when a PHI instruction defined a register
used by another PHI instruction that the defining insstruction would
be legalized before the using instruction.

This assumption was causing the pass to not legalize some PHI nodes
within divergent flow-control.

This fixes a bug that was uncovered by r285762.

Reviewers: nhaehnle, arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286676 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 23:35:42 +00:00
Richard Trieu
d085da51ef Print correct directory in merge script.
When providing the project directory to the merge script, print it out in the
commit instructions instead of the default project directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286675 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 23:26:28 +00:00
Sanjay Patel
a8a96a9e94 [InstCombine] use dyn_cast rather isa+cast; NFC
Follow-up to r286664 cleanup as suggested by Eli. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286671 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 23:20:01 +00:00
Sanjay Patel
8d3ad734d2 [InstCombine] update test to use FileCheck; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286668 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 23:12:46 +00:00
Kostya Serebryany
04777c43f9 [libFuzzer] do not initialize parts of TracePC -- let them be initialized by the linker. Add no-msan attribute to the memcmp hook.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286665 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 23:06:53 +00:00
Sanjay Patel
9728332add [InstCombine] clean up foldSelectOpOp(); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286664 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 23:01:20 +00:00
Anna Zaks
1a26404f05 [tsan][llvm] Implement the function attribute to disable TSan checking at run time
This implements a function annotation that disables TSan checking for the
function at run time. The benefit over attribute((no_sanitize("thread")))
is that the accesses within the callees will also be suppressed.

The motivation for this attribute is a guarantee given by the objective C
language that the calls to the reference count decrement and object
deallocation will be synchronized. To model this properly, we would need
to intercept all ref count decrement calls (which are very common in ObjC
due to use of ARC) and also every single message send. Instead, we propose
to just ignore all accesses made from within dealloc at run time. The main
downside is that this still does not introduce any synchronization, which
means we might still report false positives if the code that relies on this
synchronization is not executed from within dealloc. However, we have not seen
this in practice so far and think these cases will be very rare.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286663 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 23:01:02 +00:00
Adam Nemet
7f0fc37d0d [LV] Stop saying "use -Rpass-analysis=loop-vectorize"
This is PR28376.

Unfortunately given the current structure of optimization diagnostics we
lack the capability to tell whether the user has
passed -Rpass-analysis=loop-vectorize since this is local to the
front-end (BackendConsumer::OptimizationRemarkHandler).

So rather than printing this even if the user has already
passed -Rpass-analysis, this patch just punts and stops recommending
this option.  I don't think that getting this right is worth the
complexity.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286662 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:51:46 +00:00
Lang Hames
e923c84436 [RPC] Add const qualifier to MemberFnWrapper to make buildbots happy.
This is a temporary fix: The right solution is to make sure addHandler can
support mutable lambdas. I'll add that in a follow-up patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286661 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:50:16 +00:00
Rui Ueyama
6d8b101b32 Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286657 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:41:47 +00:00
Matthias Braun
dc2310fcc5 Revert "(origin/master, origin/HEAD) MachineScheduler/ScheduleDAG: Add support to skipping a node."
Revert accidentally committed change.

This reverts commit r286655.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286656 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:39:50 +00:00
Matthias Braun
59a5edddc7 MachineScheduler/ScheduleDAG: Add support to skipping a node.
The DAG mutators in the scheduler cannot really remove DAG nodes as
additional anlysis information such as ScheduleDAGToplogicalSort are
already computed at this point and rely on a fixed number of DAG nodes.

Alleviate the missing removal with a new flag: Setting the new skip
flag on a node ignores it during scheduling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286655 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:37:34 +00:00
Matthias Braun
97c4b7addd ScheduleDAGInstrs: Move VRegUses to ScheduleDAGMILive; NFCI
Push VRegUses/collectVRegUses() down the class hierarchy towards its
only user ScheduleDAGMILive.

NFCI: The initialization of the map happens at a later point but that
should not matter.

This is in preparation to allow DAG mutators to merge nodes, which
relies on this map getting computed later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286654 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:37:31 +00:00
Matthias Braun
e9923d3f0a MachineScheduler: Dump EntrySU/ExitSU if possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286653 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:37:28 +00:00
Matthias Braun
9755e15462 ScheduleDAG: Identify EntrySU/ExitSU when dumping node ids
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286652 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:37:26 +00:00
Erik Eckstein
eec5bf79c3 FunctionComparator: don't rely on argument evaluation order.
This is a follow-up on the recent refactoring of the FunctionMerge pass.
It should fix a fail of the new FunctionComparator unittest whe compiling with MSVC.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286648 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:21:39 +00:00
Mehdi Amini
aa2b11dcf3 Fix static initialization order fiasco in MCTests
Reported by Kostya on llvm-dev, uncovered by an ASAN bot

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286647 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:18:42 +00:00
Lang Hames
823ac75ae6 [ORC] Temporarily fix the RPCUtils unit test by explicitly specifying a handler
return type.

This should be fixed permanently by having the RPCUtils header recognize the
ErrorSuccess type. I'll commit that in a follow up patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286646 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:16:10 +00:00
Piotr Padlewski
797e9cdb75 NFC ProgrammersManual fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286645 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:12:15 +00:00
Adrian Prantl
feb16c84dc Simplify code and address review comments (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286644 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 22:09:25 +00:00
Lang Hames
2322de66fe [Orc] Update the BuildingAJIT Chapter 5 server class for the recent RPC changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286642 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 21:55:25 +00:00
Adrian Prantl
cd5b334349 Fix a reference-to-temporary introduced in r286607.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286640 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 21:48:09 +00:00
Lang Hames
085827f843 [ORC] Re-apply 286620 with fixes for the ErrorSuccess class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286639 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 21:42:09 +00:00
Nemanja Ivanovic
13e440ebf9 [PowerPC] Add remaining vector permute builtins in altivec.h - LLVM portion
This patch corresponds to review:
https://reviews.llvm.org/D26480

Adds all the intrinsics used for various permute builtins that will
be added to altivec.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286638 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 21:42:01 +00:00
Evgeniy Stepanov
06f9b86145 [cfi] Fix weak functions handling.
When a function pointer is replaced with a jumptable pointer, special
case is needed to preserve the semantics of extern_weak functions.
Since a jumptable entry can not be extern_weak, we emulate that
behaviour by replacing all references to F (the extern_weak function)
with the following expression: F != nullptr ? JumpTablePtr : nullptr.

Extra special care is needed for global initializers, since most (or
probably all) backends can not lower an initializer that includes
this kind of constant expression. Initializers like that are replaced
with a global constructor (i.e. a runtime initializer).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286636 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 21:39:26 +00:00
Erik Eckstein
345d21cba1 Make the FunctionComparator of the MergeFunctions pass a stand-alone utility.
This is pure refactoring. NFC.

This change moves the FunctionComparator (together with the GlobalNumberState
utility) in to a separate file so that it can be used by other passes.
For example, the SwiftMergeFunctions pass in the Swift compiler:
https://github.com/apple/swift/blob/master/lib/LLVMPasses/LLVMMergeFunctions.cpp

Details of the change:

*) The big part is just moving code out of MergeFunctions.cpp into FunctionComparator.h/cpp
*) Make FunctionComparator member functions protected (instead of private)
   so that a derived comparator class can use them.

Following refactoring helps to share code between the base FunctionComparator
class and a derived class:

*) Add a beginCompare() function
*) Move some basic function property comparisons into a separate function compareSignature()
*) Do the GEP comparison inside cmpOperations() which now has a new
   needToCmpOperands reference parameter

https://reviews.llvm.org/D25385



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286632 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 21:15:13 +00:00
Rui Ueyama
6b8a0789f7 Fix -Wpessimizing-move warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286629 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 20:39:02 +00:00
Vyacheslav Klochkov
35cecc31aa Fixed the lost FastMathFlags for FCmp operations in SLPVectorizer.
Reviewer: Michael Zolotukhin.
Differential Revision: https://reviews.llvm.org/D26543


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286626 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 19:55:29 +00:00