OSDN Git Service
Craig Topper [Wed, 31 Aug 2016 05:37:50 +0000 (05:37 +0000)]
[AVX-512] Add test cases for masked floating point logic operations with bitcasts between the logic ops and the select. We don't currently select masked operations for these cases.
Test cases taken from optimized clang output after trying to convert the masked floating point logical op intrinsics to native IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280194
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 31 Aug 2016 05:37:47 +0000 (05:37 +0000)]
[X86] Regenerate a test using update_llc_test_checks.py.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280193
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Wed, 31 Aug 2016 05:20:08 +0000 (05:20 +0000)]
[XRay] Support multiple return instructions in a single basic block
Add a .mir test to catch this case, and fix the xray-instrumentation
pass to handle it appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280192
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 31 Aug 2016 03:22:32 +0000 (03:22 +0000)]
[Loads] Properly populate the visited set in isDereferenceableAndAlignedPointer
There were paths where we wouldn't populate the visited set, causing us
to recurse forever if an SSA variable was defined in terms of itself.
This fixes PR30210.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280191
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 31 Aug 2016 00:52:03 +0000 (00:52 +0000)]
[PowerPC] Don't spill the frame pointer twice
When a function contains something, such as inline asm, which explicitly
clobbers the register used as the frame pointer, don't spill it twice. If we
need a frame pointer, it will be saved/restored in the prologue/epilogue code.
Explicitly spilling it again will reuse the same spill slot used by the
prologue/epilogue code, thus clobbering the saved value. The same applies
to the base-pointer or PIC-base register.
Partially fixes PR26856. Thanks to Ulrich for his analysis and the small
inline-asm reproducer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280188
91177308-0d34-0410-b5e6-
96231b3b80d8
Gor Nishanov [Wed, 31 Aug 2016 00:35:41 +0000 (00:35 +0000)]
[Coroutines] Part 10: Add coroutine promise support.
Summary:
1) CoroEarly now lowers llvm.coro.promise intrinsic that allows to obtain
a coroutine promise pointer from a coroutine frame and vice versa.
2) CoroFrame now interprets Promise argument of llvm.coro.begin to
place CoroutinPromise alloca at a deterministic offset from the coroutine frame.
Now, the coroutine promise example from docs\Coroutines.rst compiles and produces expected result (see test/Transform/Coroutines/ex4.ll).
Reviewers: majnemer
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23993
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280184
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 31 Aug 2016 00:19:35 +0000 (00:19 +0000)]
[InstCombine] clean up InsertRangeTest; NFCI
It's much less code and easier to read if we don't duplicate
everything between the 'Inside' and not 'Inside' cases.
As noted with the FIXME, the goal is to make this vector-friendly
in a follow-up patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280183
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 31 Aug 2016 00:09:44 +0000 (00:09 +0000)]
[llvm-cov] Drop redundant "No." suffix in a column title
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280181
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 30 Aug 2016 23:53:59 +0000 (23:53 +0000)]
[LoadStoreVectorizer] Change VectorSet to Vector to match head and tail positions. Resolves PR29148.
Summary:
LSV was using two vector sets (heads and tails) to track pairs of adjiacent position to vectorize.
A recent optimization is trying to obtain the longest chain to vectorize and assumes the positions
in heads(H) and tails(T) match, which is not the case is there are multiple tails for the same head.
e.g.:
i1: store a[0]
i2: store a[1]
i3: store a[1]
Leads to:
H: i1
T: i2 i3
Instead of:
H: i1 i1
T: i2 i3
So the positions for instructions that follow i3 will have different indexes in H/T.
This patch resolves PR29148.
This issue also surfaced the fact that if the chain is too long, and TLI
returns a "not-fast" answer, the whole chain will be abandoned for
vectorization, even though a smaller one would be beneficial.
Added a testcase and FIXME for this.
Reviewers: tstellarAMD, arsenm, jlebar
Subscribers: mzolotukhin, wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D24057
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280179
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 30 Aug 2016 23:16:59 +0000 (23:16 +0000)]
[InstCombine] add tests to show type limitations of InsertRangeTest and callers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280175
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 30 Aug 2016 21:48:14 +0000 (21:48 +0000)]
[codeview] Remove redundant TypeTable lookup
As written, the code should assert if this lookup would have ever
succeeded. Without looking through composite types, the type graph
should be acyclic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280168
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 30 Aug 2016 21:48:06 +0000 (21:48 +0000)]
Add a test file, macho-invalid-dysymtab-extreloff-nextrel,
I forgot to do an svn add on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280167
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Aug 2016 21:29:48 +0000 (21:29 +0000)]
[ORC][RPC] Fix some bugs in the callB primitive.
Still no unit test due to synchronization bugs on s390. These issues were
discovered in an out-of-tree utility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280163
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 30 Aug 2016 21:29:21 +0000 (21:29 +0000)]
[CMake] Ensure that compiler-rt is added first
This will enable other runtime projects to detect the presence of sanitizer runtimes by referring to the sanitizer targets directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280162
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 30 Aug 2016 21:28:30 +0000 (21:28 +0000)]
Next set of additional error checks for invalid Mach-O files for bad LC_DYSYMTAB’s.
This contains the missing checks for LC_DYSYMTAB load command fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280161
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 30 Aug 2016 21:21:07 +0000 (21:21 +0000)]
llvm-readobj: speculative fix for MSVC
Use the typedef rather than using to type alias the typename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280158
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 30 Aug 2016 20:51:25 +0000 (20:51 +0000)]
GlobalISel: combine extracts & sequences created for legalization
Legalization ends up creating many G_SEQUENCE/G_EXTRACT pairs which leads to
inefficient codegen (even for -O0), so add a quick pass over the function to
remove them again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280155
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 30 Aug 2016 20:50:08 +0000 (20:50 +0000)]
AMDGPU: Relax SGPR asm constraint register class
s should be SReg_32 to be as general as possible. This can avoid a copy
from m0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280154
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Tue, 30 Aug 2016 20:49:07 +0000 (20:49 +0000)]
[libfuzzer] simplified unit truncation; do not write trunc items to disc
Differential Revision: https://reviews.llvm.org/D24049
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280153
91177308-0d34-0410-b5e6-
96231b3b80d8
Hemant Kulkarni [Tue, 30 Aug 2016 20:42:46 +0000 (20:42 +0000)]
Revert "ELFDumper: Unversioned symbols must not have trailing @"
This reverts commit
8df7a877949e8782a3a28e3ecdb0770c1e444056.
Fixing other repositories and adding changes together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280152
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 30 Aug 2016 20:22:21 +0000 (20:22 +0000)]
[LoopVectorizer] Predicate instructions in blocks with several incoming edges
We don't need to limit predication to blocks that have a single incoming
edge, we just need to use the right mask.
This fixes PR30172.
Differential Revision: https://reviews.llvm.org/D24009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280148
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 30 Aug 2016 20:20:24 +0000 (20:20 +0000)]
[COFFObjectFile] Ignore broken symbol table
When binaries are compressed by UPX, information about symbol table
offset and symbol count remain unchanged (but became invalid due to
compression).
This causes failure in the constructor and the rest of the binary cannot
be processed.
Instead, reset symbol related information (symbol/string table pointers,
sizes) - this should disable the related iterators and functions while
the rest of the binary can still be processed.
Patch by Bandzi Michal!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280147
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Tue, 30 Aug 2016 19:58:48 +0000 (19:58 +0000)]
IntrArgMemOnly is only defined (and current AA machinery only sanely supports) pointer arguments, and these intrinsics have vector of pointer arguments. Remove ArgMemOnly until we either have the machinery, define a new attribute, or something similar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280143
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Aug 2016 19:56:15 +0000 (19:56 +0000)]
Re-instate recent RPC updates (r280016, r280017, r280027, r280051) with a
workaround for the limitations of MSVC 2013's std::future class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280141
91177308-0d34-0410-b5e6-
96231b3b80d8
Hemant Kulkarni [Tue, 30 Aug 2016 19:50:02 +0000 (19:50 +0000)]
ELFDumper: Unversioned symbols must not have trailing @
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280140
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 30 Aug 2016 19:11:11 +0000 (19:11 +0000)]
CodeGen: Fixup for r280128, since GCC isn't as permissive as Clang
Fixes the bots, e.g.:
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver/builds/10055
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280135
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 30 Aug 2016 18:52:46 +0000 (18:52 +0000)]
GlobalISel: forbid physical registers on generic MIs.
We're intending to move to a world where the type of a register is determined
by its (unique) def. This is incompatible with physregs, which are untyped.
It also means the other passes don't have to worry quite so much about
register-class compatibility and inserting COPYs appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280132
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 30 Aug 2016 18:52:02 +0000 (18:52 +0000)]
llvm-readobj: add support for printing GNU Notes
Add support for printing the GNU Notes. This allows an easy way to view the
build id for a binary built with the build id. Currently, this only handles the
GNU notes, though it would be easy to extend for other note types (default,
FreeBSD, NetBSD, etc). Only the GNU style is supported currently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280131
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 30 Aug 2016 18:51:59 +0000 (18:51 +0000)]
Support: add some more ELF constants
Add constants for additional GNU note types and the GNU Notes OS type id. This
is needed to support printing the notes in ELF binaries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280130
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 30 Aug 2016 18:45:32 +0000 (18:45 +0000)]
Fix unit test after function name change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280129
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 30 Aug 2016 18:40:47 +0000 (18:40 +0000)]
ADT: Split ilist_node_traits into alloc and callback, NFC
Many lists want to override only allocation semantics, or callbacks for
iplist. Split these up to prevent code duplication.
- Specialize ilist_alloc_traits to change the implementations of
deleteNode() and createNode().
- One common desire is to do nothing deleteNode() and disable
createNode(). Specialize ilist_alloc_traits to inherit from
ilist_noalloc_traits for that behaviour.
- Specialize ilist_callback_traits to use the addNodeToList(),
removeNodeFromList(), and transferNodesFromList() callbacks.
As a drive-by, add some coverage to the callback-related unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280128
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 30 Aug 2016 18:19:18 +0000 (18:19 +0000)]
Rename ArrayRef::keep_front / keep_back to take_front / take_back.
The name decided on was take_, but I only updated it for StringRef
and forgot to do it for ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280126
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Tue, 30 Aug 2016 18:18:54 +0000 (18:18 +0000)]
TailDuplication: Extract Indirect-Branch block limit as option. NFC
The existing code hard-coded a limit of 20 instructions for duplication
when a block ended with an indirect branch. Extract this as an option.
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280125
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 30 Aug 2016 18:00:45 +0000 (18:00 +0000)]
ADT: Guarantee transferNodesFromList is only called on transfers
Guarantee that ilist_traits<T>::transferNodesFromList is only called
when nodes are actually changing lists.
I also moved all the callbacks to occur *first*, before the operation.
This is the only choice for iplist<T>::merge, so we might as well be
consistent. I expect this to have no effect in practice, although it
simplifies the logic in both iplist<T>::transfer and iplist<T>::insert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280122
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 30 Aug 2016 17:38:28 +0000 (17:38 +0000)]
Appease buildbots after r280114.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280117
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 30 Aug 2016 17:34:58 +0000 (17:34 +0000)]
IR: Appease MSVC after r280107 with an & or two
Fixes the bot:
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/15192
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280116
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 30 Aug 2016 17:31:34 +0000 (17:31 +0000)]
[InstCombine] replace divide-by-constant checks with asserts; NFC
These folds already have tests for scalar and vector types, except
for the vector div-by-0 case, so I'm adding tests for that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280115
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 30 Aug 2016 17:29:59 +0000 (17:29 +0000)]
Add StringRef::take_front and StringRef::take_back
Reviewed By: majnemer, rnk
Differential Revision: https://reviews.llvm.org/D23965
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280114
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 30 Aug 2016 17:29:46 +0000 (17:29 +0000)]
Add StringRef::contains()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280113
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 30 Aug 2016 17:10:49 +0000 (17:10 +0000)]
[InstCombine] clean up foldICmpDivConstant; NFCI
1. Fix comments to match variable names
2. Remove redundant CmpRHS variable
3. Add FIXME to replace some checks with asserts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280112
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 30 Aug 2016 17:01:05 +0000 (17:01 +0000)]
ADT: Clean up docs and formatting for ilist_traits, NFC
This is a prep commit before splitting up ilist_node_traits and
updating/simplifying call sites.
- Move to top of file (I considered moving to a different file,
llvm/ADT/ilist_traits.h, but it's really not much code).
- Clang-format.
- Convert comments to doxygen, clean them up, and add TODOs for what I'm
doing next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280109
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 30 Aug 2016 16:23:55 +0000 (16:23 +0000)]
ADT: Split out simple_ilist, a simple intrusive list
Split out a new, low-level intrusive list type with clear semantics.
Unlike iplist (and ilist), all operations on simple_ilist are intrusive,
and simple_ilist never takes ownership of its nodes. This enables an
intuitive API that has the right defaults for intrusive lists.
- insert() takes references (not pointers!) to nodes (in iplist/ilist,
passing a reference will cause the node to be copied).
- erase() takes only iterators (like std::list), and does not destroy
the nodes.
- remove() takes only references and has the same behaviour as erase().
- clear() does not destroy the nodes.
- The destructor does not destroy the nodes.
- New API {erase,remove,clear}AndDispose() take an extra Disposer
functor for callsites that want to call some disposal routine (e.g.,
std::default_delete).
This list is not currently configurable, and has no callbacks.
The initial motivation was to fix iplist<>::sort to work correctly (even
with callbacks in ilist_traits<>). iplist<> uses simple_ilist<>::sort
directly. The new test in unittests/IR/ModuleTest.cpp crashes without
this commit.
Fixing sort() via a low-level layer provided a good opportunity to:
- Unit test the low-level functionality thoroughly.
- Modernize the API, largely inspired by other intrusive list
implementations.
Here's a sketch of a longer-term plan:
- Create BumpPtrList<>, a non-intrusive list implemented using
simple_ilist<>, and use it for the Token list in
lib/Support/YAMLParser.cpp. This will factor out the only real use of
createNode().
- Evolve the iplist<> and ilist<> APIs in the direction of
simple_ilist<>, making allocation/deallocation explicit at call sites
(similar to simple_ilist<>::eraseAndDispose()).
- Factor out remaining calls to createNode() and deleteNode() and remove
the customization from ilist_traits<>.
- Transition uses of iplist<>/ilist<> that don't need callbacks over to
simple_ilist<>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280107
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 30 Aug 2016 15:47:13 +0000 (15:47 +0000)]
Fixup r279618, instantiate *AnalysisManagerProxy<*AnalysisManager,LazyCallGraph::SCC>, instead of *AnalysisManagerProxy<*AnalysisManager,LazyCallGraph::SCC,LazyCallGraph&>, for PassID.
Or they were not instantiated as expected;
llvm::InnerAnalysisManagerProxy<llvm::AnalysisManager<llvm::Function>, llvm::LazyCallGraph::SCC>::PassID
llvm::InnerAnalysisManagerProxy<llvm::AnalysisManager<llvm::Function>, llvm::LazyCallGraph::SCC>::PassID
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280105
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Tue, 30 Aug 2016 15:20:31 +0000 (15:20 +0000)]
[AMDGPU] Refactor SOP instructions TD files.
Differential revision: https://reviews.llvm.org/D23617
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280101
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 30 Aug 2016 15:12:58 +0000 (15:12 +0000)]
Revert "[ORC][RPC] Make the future type of an Orc RPC call Error/Expected rather than"
This reverts commit r280016, and the followups of r280017, r280027,
r280051, r280058, and r280059.
MSVC's implementation of std::promise does not get along with
llvm::Error. It uses its promised value too much like a normal value
type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280100
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 30 Aug 2016 14:52:05 +0000 (14:52 +0000)]
[libFuzzer] fix a bug when running a single unit of N bytes with -max_len=M, M<N, caused a buffer overflow
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280098
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 30 Aug 2016 14:39:33 +0000 (14:39 +0000)]
[libFuzzer] stop using bits for memcmp's value profile -- seems to blow up the corpus too much
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280096
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Tue, 30 Aug 2016 14:15:43 +0000 (14:15 +0000)]
[MC] Move parser helper functions from Asmparser to MCAsmParser
NFC Intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280092
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 30 Aug 2016 13:58:35 +0000 (13:58 +0000)]
[Reassociate] Add additional debug output. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280090
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 30 Aug 2016 11:50:21 +0000 (11:50 +0000)]
SILoadStoreOptimizer.cpp: Fix a warning in r279991. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280075
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 30 Aug 2016 10:56:08 +0000 (10:56 +0000)]
[SimplifyCFG] Properly CSE metadata in SinkThenElseCodeToEnd
This was missing, meaning the metadata in sunk instructions was potentially bogus and could cause miscompiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280072
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 30 Aug 2016 10:48:31 +0000 (10:48 +0000)]
docs: mention that clobbering output regs in inline asm is illegal.
I've found this out the hard way; LLVM will not normally catch this
error (unless -verify-machineinstrs is passed), and under certain
very specific circumstances (such as register scavenger running
under pressure) this would result in an opaque crash in codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280071
91177308-0d34-0410-b5e6-
96231b3b80d8
Ying Yi [Tue, 30 Aug 2016 07:01:37 +0000 (07:01 +0000)]
[llvm-cov] Use the native path in the coverage report.
The coverage reports contain the source or binary file paths. On Windows,
the file path might contain the seperators of both '/' and '\'. This patch
uses the native path in the coverage reports. For example, on Windows,
all '/' are converted to '\'.
Differential Revision: https://reviews.llvm.org/D23922
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280061
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Aug 2016 06:00:21 +0000 (06:00 +0000)]
[Support][Error] Suppress warning about unused result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280059
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Aug 2016 05:32:41 +0000 (05:32 +0000)]
[Support] Add a conditionally defined default constructor (available on MSVC
only) for Expected<T> so that it can interoperate with MSVC's std::future
implementation.
MSVC 2013's std::future implementation requires the wrapped type to be default
constructible.
Hopefully this will fix the bot breakage in
http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/9937 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280058
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Tue, 30 Aug 2016 03:16:16 +0000 (03:16 +0000)]
Replace incorrect "#ifdef DEBUG" with "#ifndef NDEBUG".
The former is simply wrong -- the code will either never be used or will
always be used, rather than being dependent upon whether it's built with
debug assertions enabled.
The macro DEBUG isn't ever set by the llvm build system. But, the macro
DEBUG(X) is defined (unconditionally) if you happen to include
llvm/Support/Debug.h.
The code in Value.h which was erroneously protected by the #ifdef DEBUG
didn't even compile -- you can't cast<> from an LLVMOpaqueValue
directly. Fortunately, it was never invoked, as Core.cpp included
Value.h before Debug.h.
The conditionalized code in AArch64CollectLOH.cpp was previously always
used, as it includes Debug.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280056
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 30 Aug 2016 03:05:50 +0000 (03:05 +0000)]
[libFuzzer] use bits instead of bytes for memcmp/strcmp value profile -- the fuzzer reaches the goal much faster, at least on the simple puzzles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280054
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Tue, 30 Aug 2016 02:36:48 +0000 (02:36 +0000)]
[RewriteStatepointsForGC] Update comment for same PHI node check. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280052
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Aug 2016 01:57:06 +0000 (01:57 +0000)]
[ORC][RPC] Reword 'async' to 'non-blocking' to better reflect call primitive
behaviors, and add a callB (blacking call) primitive.
callB is a blocking call primitive for threaded code where the RPC responses are
being processed on a separate thread. (For single threaded code callST should
continue to be used instead).
No unit test yet: Last time I commited a threaded unit test it deadlocked on
one of the s390x builders. I'll try to re-enable that test first, and add a new
test if I can sort out the deadlock issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280051
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Aug 2016 01:43:38 +0000 (01:43 +0000)]
[PowerPC] Force entry alignment in .got2
Implement Bill's suggested fix for 32-bit targets for PR22711 (for the
alignment of each entry). As pointed out in the bug report, we could just force
the section alignment, since we only add pointer-sized things currently, but
this fix is somewhat more future-proof.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280049
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 30 Aug 2016 01:38:59 +0000 (01:38 +0000)]
Fix coding style; NFC
Avoid variables starting with lowercase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280048
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 30 Aug 2016 01:37:58 +0000 (01:37 +0000)]
ADT: Explode include/llvm/ADT/{ilist,ilist_node}.h, NFC
I'm working on a lower-level intrusive list that can be used
stand-alone, and splitting the files up a bit will make the code easier
to organize. Explode the ilist headers in advance to improve blame
lists in the future.
- Move ilist_node_base from ilist_node.h to ilist_node_base.h.
- Move ilist_base from ilist.h to ilist_base.h.
- Move ilist_iterator from ilist.h to ilist_iterator.h.
- Move ilist_node_access from ilist.h to ilist_node.h to support
ilist_iterator.
- Update unit tests to #include smaller headers.
- Clang-format the moved things.
I noticed in transit that there is a simplify_type specialization for
ilist_iterator. Since there is no longer an implicit conversion from
ilist<T>::iterator to T*, this doesn't make sense (effectively it's a
form of implicit conversion). For now I've added a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280047
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 30 Aug 2016 01:30:14 +0000 (01:30 +0000)]
[libFuzzer] use trace-div and trace-gep for guided fuzzing, add tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280046
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 30 Aug 2016 01:12:10 +0000 (01:12 +0000)]
[sanitizer-coverage] add two more modes of instrumentation: trace-div and trace-gep, mostly usaful for value-profile-based fuzzing; llvm part
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280043
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Aug 2016 00:59:23 +0000 (00:59 +0000)]
[PowerPC] Add support for -mlongcall
The "long call" option forces the use of the indirect calling sequence for all
calls (even those that don't really need it). GCC provides this option; This is
helpful, under certain circumstances, for building very-large binaries, and
some other specialized use cases.
Fixes PR19098.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280040
91177308-0d34-0410-b5e6-
96231b3b80d8
Piotr Padlewski [Tue, 30 Aug 2016 00:46:26 +0000 (00:46 +0000)]
NFC: add early exit in ModuleSummaryAnalysis
Summary:
Changed this code because it was not very readable.
The one question that I got after changing it is, should we
count calls to intrinsics? We don't add them to caller summary,
so maybe we shouldn't also count them?
Reviewers: tejohnson, eraman, mehdi_amini
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23949
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280036
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Aug 2016 00:22:22 +0000 (00:22 +0000)]
[PowerPC] Add triple to test/CodeGen/PowerPC/atomic-2.ll for ppc64le
Otherwise, running the test on Darwin systems will not work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280034
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 30 Aug 2016 00:18:43 +0000 (00:18 +0000)]
Rename unittests/ADT/ilistTestTemp.cpp => IListTest.cpp
And rename the tests inside from ilistTest to IListTest. This makes the
file sort properly in the CMakeLists.txt (previously, sorting would
throw it down to the end of the list) and is consistent with the tests
I've added more recently.
Why use IListNodeBaseTest.cpp (and a test name of IListNodeBaseTest)?
- ilist_node_base_test is the obvious thing, since this is testing
ilist_node_base. However, gtest disallows underscores in test names.
- ilist_node_baseTest fails for the same reason.
- ilistNodeBaseTest is weird, because it isn't in our usual
TitleCaseTest form that we use for tests, and it also doesn't have the
name of the tested class in it.
- IlistNodeBaseTest matches TitleCaseTest, but "Ilist" is hard to read,
and really "ilist" is an abbreviation for "IntrusiveList" so the
lowercase "list" is strange.
- That left IListNodeBaseTest.
Note: I made this move in two stages, with a temporary filename of
ilistTestTemp in between in r279524. This was in the hopes of avoiding
problems on Git and SVN clients on case-insensitive filesystems,
particularly on buildbots with incremental checkouts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280033
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 30 Aug 2016 00:13:12 +0000 (00:13 +0000)]
ADT: Give ilist<T>::reverse_iterator a handle to the current node
Reverse iterators to doubly-linked lists can be simpler (and cheaper)
than std::reverse_iterator. Make it so.
In particular, change ilist<T>::reverse_iterator so that it is *never*
invalidated unless the node it references is deleted. This matches the
guarantees of ilist<T>::iterator.
(Note: MachineBasicBlock::iterator is *not* an ilist iterator, but a
MachineInstrBundleIterator<MachineInstr>. This commit does not change
MachineBasicBlock::reverse_iterator, but it does update
MachineBasicBlock::reverse_instr_iterator. See note at end of commit
message for details on bundle iterators.)
Given the list (with the Sentinel showing twice for simplicity):
[Sentinel] <-> A <-> B <-> [Sentinel]
the following is now true:
1. begin() represents A.
2. begin() holds the pointer for A.
3. end() represents [Sentinel].
4. end() holds the poitner for [Sentinel].
5. rbegin() represents B.
6. rbegin() holds the pointer for B.
7. rend() represents [Sentinel].
8. rend() holds the pointer for [Sentinel].
The changes are #6 and #8. Here are some properties from the old
scheme (which used std::reverse_iterator):
- rbegin() held the pointer for [Sentinel] and rend() held the pointer
for A;
- operator*() cost two dereferences instead of one;
- converting from a valid iterator to its valid reverse_iterator
involved a confusing increment; and
- "RI++->erase()" left RI invalid. The unintuitive replacement was
"RI->erase(), RE = end()".
With vector-like data structures these properties are hard to avoid
(since past-the-beginning is not a valid pointer), and don't impose a
real cost (since there's still only one dereference, and all iterators
are invalidated on erase). But with lists, this was a poor design.
Specifically, the following code (which obviously works with normal
iterators) now works with ilist::reverse_iterator as well:
for (auto RI = L.rbegin(), RE = L.rend(); RI != RE;)
fooThatMightRemoveArgFromList(*RI++);
Converting between iterator and reverse_iterator for the same node uses
the getReverse() function.
reverse_iterator iterator::getReverse();
iterator reverse_iterator::getReverse();
Why doesn't iterator <=> reverse_iterator conversion use constructors?
In order to catch and update old code, reverse_iterator does not even
have an explicit conversion from iterator. It wouldn't be safe because
there would be no reasonable way to catch all the bugs from the changed
semantic (see the changes at call sites that are part of this patch).
Old code used this API:
std::reverse_iterator::reverse_iterator(iterator);
iterator std::reverse_iterator::base();
Here's how to update from old code to new (that incorporates the
semantic change), assuming I is an ilist<>::iterator and RI is an
ilist<>::reverse_iterator:
[Old] ==> [New]
reverse_iterator(I) (--I).getReverse()
reverse_iterator(I) ++I.getReverse()
--reverse_iterator(I) I.getReverse()
reverse_iterator(++I) I.getReverse()
RI.base() (--RI).getReverse()
RI.base() ++RI.getReverse()
--RI.base() RI.getReverse()
(++RI).base() RI.getReverse()
delete &*RI, RE = end() delete &*RI++
RI->erase(), RE = end() RI++->erase()
=======================================
Note: bundle iterators are out of scope
=======================================
MachineBasicBlock::iterator, also known as
MachineInstrBundleIterator<MachineInstr>, is a wrapper to represent
MachineInstr bundles. The idea is that each operator++ takes you to the
beginning of the next bundle. Implementing a sane reverse iterator for
this is harder than ilist. Here are the options:
- Use std::reverse_iterator<MBB::i>. Store a handle to the beginning of
the next bundle. A call to operator*() runs a loop (usually
operator--() will be called 1 time, for unbundled instructions).
Increment/decrement just works. This is the status quo.
- Store a handle to the final node in the bundle. A call to operator*()
still runs a loop, but it iterates one time fewer (usually
operator--() will be called 0 times, for unbundled instructions).
Increment/decrement just works.
- Make the ilist_sentinel<MachineInstr> *always* store that it's the
sentinel (instead of just in asserts mode). Then the bundle iterator
can sniff the sentinel bit in operator++().
I initially tried implementing the end() option as part of this commit,
but updating iterator/reverse_iterator conversion call sites was
error-prone. I have a WIP series of patches that implements the final
option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280032
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Vesely [Mon, 29 Aug 2016 23:21:46 +0000 (23:21 +0000)]
AMDGPU/R600: Cleanup DAGCombine
Move SDLoc initialization to comon place.
fall back to AMDGPU version in one place
Differential Revision: https://reviews.llvm.org/D23900
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280030
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 29 Aug 2016 23:10:20 +0000 (23:10 +0000)]
[ORC] Fix unit-test breakage from r280016.
Void functions returning error now boolean convert to 'false' if they succeed.
Unit tests updated to reflect this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280027
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Mon, 29 Aug 2016 22:49:05 +0000 (22:49 +0000)]
Fix typo in comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280025
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Mon, 29 Aug 2016 22:46:56 +0000 (22:46 +0000)]
[ThinLTO] Indirect call promotion fixes for promoted local functions
Summary:
Fix a couple issues limiting the application of indirect call promotion
in ThinLTO mode:
- Invoke indirect call promotion before globalopt, since it may
eliminate imported functions which appear unreferenced.
- Invoke indirect call promotion with InLTO=true so that the PGOFuncName
metadata is used to get the name for locals which would have been
renamed during promotion.
Reviewers: davidxl, mehdi_amini
Subscribers: Prazek, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D24004
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280024
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 29 Aug 2016 22:25:36 +0000 (22:25 +0000)]
[PowerPC] Fix i8/i16 atomics for little-Endian targets without partword atomics
For little-Endian PowerPC, we generally target only P8 and later by default.
However, generic (older) 64-bit configurations are still an option, and in that
case, partword atomics are not available (e.g. stbcx.). To lower i8/i16 atomics
without true i8/i16 atomic operations, we emulate using i32 atomics in
combination with a bunch of shifting and masking, etc. The amount by which to
shift in little-Endian mode is different from the amount in big-Endian mode (it
is inverted -- meaning we can leave off the xor when computing the amount).
Fixes PR22923.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280022
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 29 Aug 2016 22:09:51 +0000 (22:09 +0000)]
[SLP] Return a boolean value for these static helpers. NFC.
Differential Revision: https://reviews.llvm.org/D24008
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280020
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Vesely [Mon, 29 Aug 2016 22:05:06 +0000 (22:05 +0000)]
AMDGPU/R600: Remove MergeVectorStores from legalization
This is handled by DAGCombiner in a more generic way
Differential Revision: https://reviews.llvm.org/D23970
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280019
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 29 Aug 2016 21:57:52 +0000 (21:57 +0000)]
[ORC][RPC] Fix typo in RPC comments: call primitives on void functions return
future<Error>, not future<bool>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280017
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 29 Aug 2016 21:56:30 +0000 (21:56 +0000)]
[ORC][RPC] Make the future type of an Orc RPC call Error/Expected rather than
Optional.
For void functions the return type of a nonblocking call changes from
Expected<future<Optional<bool>>> to Expected<future<Error>>, and for functions
returning T the return type changes from Expected<future<Optional<T>>> to
Expected<future<Expected<T>>>.
Inner results need to be checked (since the RPC connection may have dropped
out before a result came back) and Error/Expected provide stronger checking
requirements. It also allows us drop the crufty 'optionalToError' function and
just collapse Errors in the single-threaded call primitives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280016
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 29 Aug 2016 21:26:32 +0000 (21:26 +0000)]
[CMake] Make LLVMConfig.cmake variable names match in-tree names
With the runtimes build we're trying to use LLVMConfig.cmake as a way of providing LLVM_* variables that are needed to behave as if the project is building in tree. To make this work we need to rename two variables by dropping the "S" from the end. This makes the variables match the in-tree names.
This renames:
LLVM_INCLUDE_DIRS -> LLVM_INCLUDE_DIR
LLVM_LIBRARY_DIRS -> LLVM_LIBRARY_DIR
The versions ending in S are not used in-tree anywhere. This also cleans up LLVM_LIBRARY_DIR being set to the same value with and without the "S".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280013
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 29 Aug 2016 21:00:00 +0000 (21:00 +0000)]
GlobalISel: use multi-dimensional arrays for legalize actions.
Instead of putting all possible requests into a single table, we can perform
the extremely dense lookup based on opcode and type-index in constant time
using multi-dimensional array-like things.
This roughly halves the time spent doing legalization, which was dominated by
queries against the Actions table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280011
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Mon, 29 Aug 2016 20:45:51 +0000 (20:45 +0000)]
Fix a thinko in r278189.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280008
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Mon, 29 Aug 2016 20:42:07 +0000 (20:42 +0000)]
AMDGPU: fix mismatch tags, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280006
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Mon, 29 Aug 2016 20:42:03 +0000 (20:42 +0000)]
ExecutionEngine: fix a bug in the movt/movw relocator
According to the arm arm specifications, 4 bytes are needed for a shift instead
of 8, this was causing the movt instruction to write to a different register
sometimes.
Patch by Walter Erquinigo!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280005
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 29 Aug 2016 20:18:52 +0000 (20:18 +0000)]
[CMake] Builtins build needs LLVM_*_OUTPUT_INTDIR variables
This allows the builtins archives to build into the correct subdirectory under the binary dir. Addresses the issue discussed in D24001.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280002
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Mon, 29 Aug 2016 20:14:04 +0000 (20:14 +0000)]
[LV] Move insertelement sequence after scalar definitions
After r279649 when getting a vector value from VectorLoopValueMap, we create an
insertelement sequence on-demand if the value has been scalarized instead of
vectorized. We previously inserted this insertelement sequence before the
value's first vector user. However, this insert location is problematic if that
user is the phi node of a first-order recurrence. With this patch, we move the
insertelement sequence after the last scalar instruction we created when
scalarizing the value. Thus, the value's vector definition in the new loop will
immediately follow its scalar definitions. This should fix PR30183.
Reference: https://llvm.org/bugs/show_bug.cgi?id=30183
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280001
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 29 Aug 2016 19:50:15 +0000 (19:50 +0000)]
Propagate TBAA info in SelectionDAG::getIndexedLoad
Patch by Pranav Bhandarkar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279998
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Katzman [Mon, 29 Aug 2016 19:42:57 +0000 (19:42 +0000)]
[Myriad]: add missing 'mcpu' values
Should have been done with r276646.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279996
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 29 Aug 2016 19:42:52 +0000 (19:42 +0000)]
AMDGPU/SI: Implement a custom MachineSchedStrategy
Summary:
GCNSchedStrategy re-uses most of GenericScheduler, it's just uses
a different method to compute the excess and critical register
pressure limits.
It's not enabled by default, to enable it you need to pass -misched=gcn
to llc.
Shader DB stats:
32464 shaders in 17874 tests
Totals:
SGPRS:
1542846 ->
1643125 (6.50 %)
VGPRS:
1005595 -> 904653 (-10.04 %)
Spilled SGPRs: 29929 -> 27745 (-7.30 %)
Spilled VGPRs: 334 -> 352 (5.39 %)
Scratch VGPRs: 1612 -> 1624 (0.74 %) dwords per thread
Code Size:
36688188 ->
37034900 (0.95 %) bytes
LDS: 1913 -> 1913 (0.00 %) blocks
Max Waves: 254101 -> 265125 (4.34 %)
Wait states: 0 -> 0 (0.00 %)
Totals from affected shaders:
SGPRS:
1338220 ->
1438499 (7.49 %)
VGPRS: 886221 -> 785279 (-11.39 %)
Spilled SGPRs: 29869 -> 27685 (-7.31 %)
Spilled VGPRs: 334 -> 352 (5.39 %)
Scratch VGPRs: 1612 -> 1624 (0.74 %) dwords per thread
Code Size:
34315716 ->
34662428 (1.01 %) bytes
LDS: 1551 -> 1551 (0.00 %) blocks
Max Waves: 188127 -> 199151 (5.86 %)
Wait states: 0 -> 0 (0.00 %)
Reviewers: arsenm, mareko, nhaehnle, MatzeB, atrick
Subscribers: arsenm, kzhuravl, llvm-commits
Differential Revision: https://reviews.llvm.org/D23688
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279995
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Mon, 29 Aug 2016 19:28:34 +0000 (19:28 +0000)]
[asan] Enable new stack poisoning with store instruction by default
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23968
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279993
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 29 Aug 2016 19:27:20 +0000 (19:27 +0000)]
GlobalISel: switch to SmallVector for pending legalizations.
std::queue was doing far to many heap allocations to be healthy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279992
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 29 Aug 2016 19:15:22 +0000 (19:15 +0000)]
AMDGPU/SI: Improve SILoadStoreOptimizer and run it before the scheduler
Summary:
The SILoadStoreOptimizer can now look ahead more then one instruction when
looking for instructions to merge, which greatly improves the number of
loads/stores that we are able to merge.
Moving the pass before scheduling avoids increasing register pressure after
the scheduler, so that the scheduler's register pressure estimates will be
more accurate. It also gives more consistent results, since it is no longer
affected by minor scheduling changes.
Reviewers: arsenm
Subscribers: arsenm, kzhuravl, llvm-commits
Differential Revision: https://reviews.llvm.org/D23814
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279991
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 29 Aug 2016 19:12:20 +0000 (19:12 +0000)]
ASan: remove variable only used in assertions build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279990
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 29 Aug 2016 19:07:16 +0000 (19:07 +0000)]
GlobalISel: legalize frem to a libcall on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279988
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 29 Aug 2016 19:07:08 +0000 (19:07 +0000)]
GlobalISel: rework CallLowering so that it can be used for libcalls too.
There should be no functional change here, I'm just making the implementation
of "frem" (to libcall) legalization easier for a followup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279987
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 29 Aug 2016 19:01:48 +0000 (19:01 +0000)]
AMDGPU/R600: Fix fixups used for constant arrays
Fixes bug 29289
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279986
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Mon, 29 Aug 2016 18:27:12 +0000 (18:27 +0000)]
IfConversion: Fix branch predication bug.
This bug shows up with diamonds that share unpredicable, unanalyzable branches.
There's an included test case from Hexagon. What was happening was that we were
attempting to predicate the branch instruction despite the fact that it was
checked to be the same. Now for unanalyzable branches we skip over the branch
instructions when predicating the block.
Differential Revision: https://reviews.llvm.org/D23939
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279985
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Mon, 29 Aug 2016 18:17:21 +0000 (18:17 +0000)]
Use store operation to poison allocas for lifetime analysis.
Summary:
Calling __asan_poison_stack_memory and __asan_unpoison_stack_memory for small
variables is too expensive.
Code is disabled by default and can be enabled by -asan-experimental-poisoning.
PR27453
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23947
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279984
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Mon, 29 Aug 2016 17:41:29 +0000 (17:41 +0000)]
[asan] Separate calculation of ShadowBytes from calculating ASanStackFrameLayout
Summary: No functional changes, just refactoring to make D23947 simpler.
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23954
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279982
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 29 Aug 2016 17:14:08 +0000 (17:14 +0000)]
[SimplifyCFG] Hoisting invalidates metadata
We forgot to remove optimization metadata when performing hosting during
FoldTwoEntryPHINode.
This fixes PR29163.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279980
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 29 Aug 2016 16:35:43 +0000 (16:35 +0000)]
Make vec_fabs.ll pass with MSVC 2013
We should revert this change once we drop support for MSVC 2013.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279979
91177308-0d34-0410-b5e6-
96231b3b80d8