Gabor Horvath [Thu, 18 Aug 2016 08:43:26 +0000 (08:43 +0000)]
[analyzer] Added valist related checkers.
Differential Revision: https://reviews.llvm.org/D15227
llvm-svn: 279041
Pavel Labath [Thu, 18 Aug 2016 08:30:03 +0000 (08:30 +0000)]
gdb-remote: Centralize thread specific packet handling
Summary:
Before this, each function had a copy of the code which handled appending of the thread suffix to
the packet (or using $Hg instead). I have moved that code into a single function and made
everyone else use that. The function takes the partial packet as a StreamString rvalue reference,
to avoid a copy and to remind the users that the packet will have undeterminate contents after
the call.
This also fixes the incorrect formatting of the QRestoreRegisterState packet in case thread
suffix is not supported.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D23604
llvm-svn: 279040
Pavel Labath [Thu, 18 Aug 2016 08:21:42 +0000 (08:21 +0000)]
Fix tests for the gdb-remote memory read packets
Part of TestGDBRemoteMemoryRead has been disabled since r259379 because it was incompatible with
python3. This changes the test to use the lldb-server test framework, which is a more appropriate
method of testing raw stub behaviour anyway (and should avoid the whole python 3 issue).
llvm-svn: 279039
Pavel Labath [Thu, 18 Aug 2016 08:21:38 +0000 (08:21 +0000)]
Fix parsing of complicated C++ names
Summary:
CPlusPlusLanguage::MethodName was not correctly parsing templated functions whose demangled name
included the return type -- the space before the function name was included in the "context" and
the context itself was not terminated correctly due to a misuse of the substr function (second
argument is length, not the end position). Fix that and add a regression test.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D23608
llvm-svn: 279038
Gabor Horvath [Thu, 18 Aug 2016 07:54:50 +0000 (07:54 +0000)]
[analyzer] Small cleanups when checkers retrieving statements from exploded
nodes.
Differential Revision: https://reviews.llvm.org/D23550
llvm-svn: 279037
Eugene Leviant [Thu, 18 Aug 2016 07:27:37 +0000 (07:27 +0000)]
[ELF] Don't add input sections twice when linker script is used
llvm-svn: 279036
Vedant Kumar [Thu, 18 Aug 2016 06:43:07 +0000 (06:43 +0000)]
[Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds
llvm/Config/config.h has intentionally been excluded from llvm
installations (see: llvm/CMakeLists.txt). Un-break out-of-tree builds
post-r278882 by switching to llvm-config.h, which is exported.
Suggested by Will Dietz!
llvm-svn: 279035
Richard Smith [Thu, 18 Aug 2016 06:15:19 +0000 (06:15 +0000)]
Remove debugging aids from this test and fix its expectations.
llvm-svn: 279034
Petr Hosek [Thu, 18 Aug 2016 04:34:27 +0000 (04:34 +0000)]
[ELF] Linkerscript: support assignment outside SECTIONS
We only support assignments inside SECTIONS, but this does not match
the behavior of GNU linker which also allows them outside SECTIONS.
The only restriction on assignments outside SECTIONS is that they
cannot reference . (they have to be absolute expressions).
Differential Revision: https://reviews.llvm.org/D23598
llvm-svn: 279033
George Burgess IV [Thu, 18 Aug 2016 02:56:05 +0000 (02:56 +0000)]
[Docs] More MemorySSA doc updates!
Thanks again to Michael Kuperstein for the feedback.
llvm-svn: 279032
Matthias Braun [Thu, 18 Aug 2016 02:21:54 +0000 (02:21 +0000)]
Testcase for r279022
llvm-svn: 279031
Kostya Serebryany [Thu, 18 Aug 2016 02:04:03 +0000 (02:04 +0000)]
[asan] trying to fix the windows bot
llvm-svn: 279030
Lang Hames [Thu, 18 Aug 2016 01:33:28 +0000 (01:33 +0000)]
Revert r279016 -- it breaks win32-elf JIT tests.
llvm-svn: 279029
Kostya Serebryany [Thu, 18 Aug 2016 01:26:36 +0000 (01:26 +0000)]
[sanitizer-coverag] update the docs in __sanitizer_cov_trace_cmp
llvm-svn: 279028
Kostya Serebryany [Thu, 18 Aug 2016 01:25:28 +0000 (01:25 +0000)]
[sanitizer-coverage/libFuzzer] instrument comparisons with __sanitizer_cov_trace_cmp[1248] instead of __sanitizer_cov_trace_cmp, don't pass the comparison type to save a bit performance. Use these new callbacks in libFuzzer
llvm-svn: 279027
Kostya Serebryany [Thu, 18 Aug 2016 01:23:27 +0000 (01:23 +0000)]
[sanitizer-coverage] add __sanitizer_cov_trace_cmp[1248] to the sanitizer-coverage interface
llvm-svn: 279026
Teresa Johnson [Thu, 18 Aug 2016 01:18:15 +0000 (01:18 +0000)]
Fix bot failure due to new test
I had updated the output file name but not the corresponding nm based check
before submitting as r279023. This should fix the bot failures
llvm-svn: 279025
Richard Smith [Thu, 18 Aug 2016 01:16:55 +0000 (01:16 +0000)]
PR28438: Update the information on an identifier with local definitions before
trying to write out its macro graph, in case we imported a module that added
another module macro between the most recent local definition and the end of
the module.
llvm-svn: 279024
Teresa Johnson [Thu, 18 Aug 2016 01:08:50 +0000 (01:08 +0000)]
[ThinLTO] Keep common symbols in ThinLTO modules
Summary:
Skip the merging of common symbols for ThinLTO modules, they will be
merged by the final native object link. Trying to merge the symbols and
add to a combined module will incorrectly enable the common symbol to be
internalized in the ThinLTO module. Additionally, we will not want to
create a combined module for ThinLTO distributed builds.
This fixes failures in 7 cpu2006 benchmarks from the new LTO API in
ThinLTO mode.
Reviewers: mehdi_amini
Subscribers: pcc, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23637
llvm-svn: 279023
Matthias Braun [Thu, 18 Aug 2016 00:59:32 +0000 (00:59 +0000)]
TailDuplicator: Fix crash after r278974
Some inputs would after r278974 without this fix (see
http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_build/2733/console
for an example)
llvm-svn: 279022
Mehdi Amini [Thu, 18 Aug 2016 00:59:24 +0000 (00:59 +0000)]
[LTO] Promote before performing weak resolution
Summary:
This was reversed compared to ThinLTOCodeGenerator for some reason,
and lead to an increased code-size on my tests. I figured that the
weak resolution may internalize a linkonce function, which will be
promoted immediately (and renamed), before being internalized again.
Reviewers: tejohnson
Subscribers: pcc, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23632
llvm-svn: 279021
Vitaly Buka [Thu, 18 Aug 2016 00:56:58 +0000 (00:56 +0000)]
[asan] Add support of lifetime poisoning into ComputeASanStackFrameLayout
Summary:
We are going to combine poisoning of red zones and scope poisoning.
PR27453
Reviewers: kcc, eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23623
llvm-svn: 279020
Vitaly Buka [Thu, 18 Aug 2016 00:56:11 +0000 (00:56 +0000)]
[asan] Add __asan_set_shadow_*
Summary:
We are poisoning small allocas using store instruction from instrumented code.
For larger allocas we'd like to insert function calls instead of multiple stores.
PR27453
Reviewers: kcc, eugenis
Subscribers: llvm-commits, kubabrecka
Differential Revision: https://reviews.llvm.org/D23616
llvm-svn: 279019
Lang Hames [Thu, 18 Aug 2016 00:22:34 +0000 (00:22 +0000)]
[RuntimeDyld] Strip leading '_' from symbols on 32-bit windows in
RTDyldMemoryManager::getSymbolAddressInProcess()
This should allow JIT'd code for win32 to find in-process symbols. See
http://llvm.org/PR28699 .
Patch by James Holderness. Thanks James!
llvm-svn: 279016
Mehdi Amini [Thu, 18 Aug 2016 00:12:33 +0000 (00:12 +0000)]
[LTO] Change addSaveTemps API: do not add dot to the supplied prefix path
Summary:
It does not play well with directories (end up with a bunch of hidden
files).
Also, do not strip the 0 suffix for the first task, especially since
0 can be used by ThinLTO as well now.
Reviewers: tejohnson
Subscribers: mehdi_amini, pcc, llvm-commits
Differential Revision: https://reviews.llvm.org/D23612
llvm-svn: 279014
Petr Hosek [Wed, 17 Aug 2016 23:59:58 +0000 (23:59 +0000)]
[ELF] Allow specifying the stack size
This option can be used to specify the stack size of the
PT_GNU_STACK segment.
Differential Revision: https://reviews.llvm.org/D23538
llvm-svn: 279013
Duncan P. N. Exon Smith [Wed, 17 Aug 2016 23:47:56 +0000 (23:47 +0000)]
ADT: Tidy up ilist_traits static asserts, NFC
Change the ilist traits to use decltype instead of sizeof, and add
HasObsoleteCustomization so that additions to this list don't need to be
added in two places.
I suspect this will now work with MSVC, since the trait tested in
r278991 seems to work. If for some reason it continues to fail on
Windows I'll follow up by adding back the #ifndef _MSC_VER.
llvm-svn: 279012
Dominic Chen [Wed, 17 Aug 2016 23:42:27 +0000 (23:42 +0000)]
[WebAssembly] Handle debug information and virtual registers without crashing (reland r278967)
Summary: Currently, enabling debug information when compiling for WebAssembly crashes the backend. This commit fixes these by skipping debug values in backend passes.
Reviewers: jfb, aprantl, dschuff, echristo
Subscribers: llvm-commits, dschuff, jfb, MatzeB, dexonsmith, yurydelendik, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23635
llvm-svn: 279011
Vitaly Buka [Wed, 17 Aug 2016 23:38:08 +0000 (23:38 +0000)]
[asan] Remove "Stack partial redzone" from report
Summary: This value is never used.
Reviewers: kcc, eugenis
Subscribers: llvm-commits, kubabrecka
Differential Revision: https://reviews.llvm.org/D23631
llvm-svn: 279010
Eugene Zelenko [Wed, 17 Aug 2016 23:36:22 +0000 (23:36 +0000)]
[Release notes] Mention Emacs integration in Include-fixer.
llvm-svn: 279009
Marshall Clow [Wed, 17 Aug 2016 23:24:02 +0000 (23:24 +0000)]
make the associative containers do the right thing for propogate_on_container_assignment. Fixes bug #29001. Tests are only for <map> right now - more complete tests will come when we revamp our allocator testing structure.
llvm-svn: 279008
George Burgess IV [Wed, 17 Aug 2016 23:21:56 +0000 (23:21 +0000)]
[Docs] Update MemorySSA doc to address more feedback.
Primarily, this clarifies wording in a few places, and adds "\ "s to
make the formatting of things like "``Foo`` s" better.
Thanks to Michael Kuperstein for the comments.
llvm-svn: 279007
Eugene Zelenko [Wed, 17 Aug 2016 23:20:00 +0000 (23:20 +0000)]
[Documentation] Remove duplicated checks groups descriptions from clang-tidy/index.rst.
Differential revision: https://reviews.llvm.org/D23596
llvm-svn: 279006
Adrian Prantl [Wed, 17 Aug 2016 23:14:00 +0000 (23:14 +0000)]
Print the module format in clang -module-file-info.
llvm-svn: 279005
Adrian Prantl [Wed, 17 Aug 2016 23:13:53 +0000 (23:13 +0000)]
Support object-file-wrapped modules in clang -module-file-info.
rdar://problem/
24504815
llvm-svn: 279004
Kelvin Li [Wed, 17 Aug 2016 23:13:03 +0000 (23:13 +0000)]
[OpenMP] Sema and parsing for 'teams distribute simd’ pragma
This patch is to implement sema and parsing for 'teams distribute simd’ pragma.
This patch is originated by Carlo Bertolli.
Differential Revision: https://reviews.llvm.org/D23528
llvm-svn: 279003
Kostya Serebryany [Wed, 17 Aug 2016 23:09:57 +0000 (23:09 +0000)]
[libFuzzer] force proper popcnt instruction
llvm-svn: 279002
Adrian McCarthy [Wed, 17 Aug 2016 23:01:03 +0000 (23:01 +0000)]
Make llvm-pdbdump print column info when available
llvm-pdbdump already had code to retrieve column information in the line tables, but it wasn't using it.
Most Microsoft PDBs don't seem to have column info, so this wasn't missed. But Clang includes column info by default (at least for now), and being able to see that is useful for ensuring we get the column info correct.
Differential Revision: https://reviews.llvm.org/D23629
llvm-svn: 279001
Pete Cooper [Wed, 17 Aug 2016 22:52:39 +0000 (22:52 +0000)]
Actually enable new test for const RangeAdapter. Missing from r278991
llvm-svn: 279000
Hans Wennborg [Wed, 17 Aug 2016 22:50:18 +0000 (22:50 +0000)]
SCEV: Don't assert about non-SCEV-able value in isSCEVExprNeverPoison() (PR28932)
Differential Revision: https://reviews.llvm.org/D23594
llvm-svn: 278999
Haicheng Wu [Wed, 17 Aug 2016 22:42:58 +0000 (22:42 +0000)]
[LoopUnroll] Move a simple check earlier. NFC.
Move the check of CallInst earlier to skip expensive recursive operations.
Differential Revision: https://reviews.llvm.org/D23611
llvm-svn: 278998
Tim Shen [Wed, 17 Aug 2016 22:20:07 +0000 (22:20 +0000)]
[LV] Move LoopBodyTraits to a better place, and add comment for simplifying LoopBlocksTraversal. NFC.
Summary: I later (after r278573) found that LoopIterator.h has some overlapping with LoopBodyTraits. It's good to use LoopBodyTraits because a *Traits struct is algorithm independent.
Reviewers: anemet, nadav, mkuper
Subscribers: mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D23529
llvm-svn: 278996
Sanjay Patel [Wed, 17 Aug 2016 22:18:57 +0000 (22:18 +0000)]
[InstCombine] add test for missing vector icmp fold
Also, add a scalar test to demonstrate one of the intermediate folds that
is necessary to accomplish the existing, multi-step test. And simplify
the vector tests to only check the final piece of that multi-step transform.
llvm-svn: 278995
Chris Lattner [Wed, 17 Aug 2016 22:17:03 +0000 (22:17 +0000)]
wordsmith the "new targets" section a bit.
llvm-svn: 278994
Tim Shen [Wed, 17 Aug 2016 22:12:49 +0000 (22:12 +0000)]
[RegionIterator] clang-format some pieces. NFC.
llvm-svn: 278992
Pete Cooper [Wed, 17 Aug 2016 22:06:59 +0000 (22:06 +0000)]
Fix reverse to work on const rbegin()/rend().
Duncan found that reverse worked on mutable rbegin(), but the has_rbegin
trait didn't work with a const method. See http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20160815/382890.html
for more details.
Turns out this was already solved in clang with has_getDecl. Copied that and made it work for rbegin.
This includes the tests Duncan attached to that thread, including the traits test.
llvm-svn: 278991
Chris Bieneman [Wed, 17 Aug 2016 21:54:30 +0000 (21:54 +0000)]
[Darwin] Stop linking libclang_rt.eprintf.a
Summary:
The eprintf library was added before the general OS X builtins library existed as a place to store one builtin function. Since we have for several years had an actual mandated builtin library for OS X > 10.5, we should just merge eprintf into the main library.
This change will resolve PR28855.
As a follow up I'll also patch compiler-rt to not generate the eprintf library anymore.
Reviewers: ddunbar, bob.wilson
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D23531
llvm-svn: 278988
Chris Bieneman [Wed, 17 Aug 2016 21:51:38 +0000 (21:51 +0000)]
[CMake] Adding toolchain targets to PGO and Apple CMake caches
The Xcode toolchain targets are useful on OS X hosts because you can construct and install multiple toolchians that can be used seamlessly.
llvm-svn: 278987
Kostya Serebryany [Wed, 17 Aug 2016 21:50:54 +0000 (21:50 +0000)]
[libFuzzer] given 0 and 255 more preference when inserting repeated bytes
llvm-svn: 278986
Chris Bieneman [Wed, 17 Aug 2016 21:46:04 +0000 (21:46 +0000)]
[macho2yaml] Don't write empty linkedit data
Since I stopped writing empty export tries it causes LinkEdit to potentially be completely empty which results in invalid yaml being generated.
To prevent this we skip linkedit data if it is empty.
llvm-svn: 278985
Richard Smith [Wed, 17 Aug 2016 21:42:10 +0000 (21:42 +0000)]
Add test missed from r278983.
llvm-svn: 278984
Richard Smith [Wed, 17 Aug 2016 21:41:45 +0000 (21:41 +0000)]
PR18417: Increase -ftemplate-depth to the value 1024 recommended by the C++
standard's Annex B. We now attempt to increase the process's stack rlimit to
8MiB on startup, which appears to be enough to allow this to work reliably.
(And if it turns out not to be, we can investigate increasing it further.)
llvm-svn: 278983
Kostya Serebryany [Wed, 17 Aug 2016 21:30:30 +0000 (21:30 +0000)]
[libFuzzer] one more mutation: ChangeBinaryInteger; also fix the breakage from r278970
llvm-svn: 278982
Kyle Butt [Wed, 17 Aug 2016 21:07:35 +0000 (21:07 +0000)]
Tail Duplication: Accept explicit threshold for duplicating.
This will allow tail duplication and tail merging during layout to have a
shared threshold to make sure that they don't overlap. No observable change
intended.
llvm-svn: 278981
Kyle Butt [Wed, 17 Aug 2016 21:07:33 +0000 (21:07 +0000)]
TailDuplicator: Use optForSize instead of hasFnAttribute.
This will cause minsize functions to have the same threshold as optsize
functions, but otherwise should have no effects.
llvm-svn: 278980
Zachary Turner [Wed, 17 Aug 2016 21:01:13 +0000 (21:01 +0000)]
Revert "Add a test for clang-tidy using the clang-cl driver."
This reverts commit
fd1908ce445eba4544d64cc68b3c03249e4bf614.
This should be the correct CL to revert. The clang-side patch
that enabled this functionality was reverted, so this test needs
to be reverted until it gets fixed.
llvm-svn: 278979
Zachary Turner [Wed, 17 Aug 2016 20:58:14 +0000 (20:58 +0000)]
Revert "Revert "[Include-fixer] Install executables and support scripts""
This reverts commit
2aff596257e1c45fa54baae823ecbe61a785174e.
I'm having a bad day apparently. I reverted the wrong CL. This
puts it back.
llvm-svn: 278978
Zachary Turner [Wed, 17 Aug 2016 20:56:47 +0000 (20:56 +0000)]
Revert "[Include-fixer] Install executables and support scripts"
This reverts commit
b725a314a9b7f746c37f70909ec3c4dcb6d9f6b5.
The patch that made this test work needed to be reverted, so this
test needs to be reverted as well.
llvm-svn: 278977
Zachary Turner [Wed, 17 Aug 2016 20:55:35 +0000 (20:55 +0000)]
Revert "[Tooling] Parse compilation database command lines on Windows."
This reverts commit
27a874790fc79f6391ad3703d7c790f51ac6ae1f.
After the introduction of windows command line parsing, some unit tests
began failing that expect to test gnu style command line quirks. The
fix is mechanical but time consuming, so revert this for now.
llvm-svn: 278976
Kostya Serebryany [Wed, 17 Aug 2016 20:45:23 +0000 (20:45 +0000)]
[libFuzzer] when printing the reproducer input, also print the base input and the mutation sequence
llvm-svn: 278975
Duncan P. N. Exon Smith [Wed, 17 Aug 2016 20:44:33 +0000 (20:44 +0000)]
ADT: Remove UB in ilist (and use a circular linked list)
This removes the undefined behaviour (UB) in ilist/ilist_node/etc.,
mainly by removing (gutting) the ilist_sentinel_traits customization
point and canonicalizing on a single, efficient memory layout. This
fixes PR26753.
The new ilist is a doubly-linked circular list.
- ilist_node_base has two ilist_node_base*: Next and Prev. Size-of: two
pointers.
- ilist_node<T> (size-of: two pointers) is a type-safe wrapper around
ilist_node_base.
- ilist_iterator<T> (size-of: two pointers) operates on an
ilist_node<T>*, and downcasts to T* on dereference.
- ilist_sentinel<T> (size-of: two pointers) is a wrapper around
ilist_node<T> that has some extra API for list management.
- ilist<T> (size-of: two pointers) has an ilist_sentinel<T>, whose
address is returned for end().
The new memory layout matches ilist_half_embedded_sentinel_traits<T>
exactly. The Head pointer that previously lived in ilist<T> is
effectively glued to the ilist_half_node<T> that lived in
ilist_half_embedded_sentinel_traits<T>, becoming the Next and Prev in
the ilist_sentinel_node<T>, respectively. sizeof(ilist<T>) is now the
size of two pointers, and there is never any additional storage for a
sentinel.
This is a much simpler design for a doubly-linked list, removing most of
the corner cases of list manipulation (add, remove, etc.). In follow-up
commits, I intend to move as many algorithms as possible into a
non-templated base class (ilist_base) to reduce code size.
Moreover, this fixes the UB in ilist_iterator/getNext/getPrev
operations. Previously, ilist_iterator<T> operated on a T*, even when
the sentinel was not of type T (i.e., ilist_embedded_sentinel_traits and
ilist_half_embedded_sentinel_traits). This added UB to all operations
involving end(). Now, ilist_iterator<T> operates on an ilist_node<T>*,
and only downcasts when the full type is guaranteed to be T*.
What did we lose? There used to be a crash (in some configurations) on
++end(). Curiously (via UB), ++end() would return begin() for users of
ilist_half_embedded_sentinel_traits<T>, but otherwise ++end() would
cause a nice dependable nullptr dereference, crashing instead of a
possible infinite loop. Options:
1. Lose that behaviour.
2. Keep it, by stealing a bit from Prev in asserts builds.
3. Crash on dereference instead, using the same technique.
Hans convinced me (because of the number of problems this and r278532
exposed on Windows) that we really need some assertion here, at least in
the short term. I've opted for #3 since I think it catches more bugs.
I added only a couple of unit tests to root out specific bugs I hit
during bring-up, but otherwise this is tested implicitly via the
extensive usage throughout LLVM.
Planned follow-ups:
- Remove ilist_*sentinel_traits<T>. Here I've just gutted them to
prevent build failures in sub-projects. Once I stop referring to them
in sub-projects, I'll come back and delete them.
- Add ilist_base and move algorithms there.
- Check and fix move construction and assignment.
Eventually, there are other interesting directions:
- Rewrite reverse iterators, so that rbegin().getNodePtr()==&*rbegin().
This allows much simpler logic when erasing elements during a reverse
traversal.
- Remove ilist_traits::createNode, by deleting the remaining API that
creates nodes. Intrusive lists shouldn't be creating nodes
themselves.
- Remove ilist_traits::deleteNode, by (1) asserting that lists are empty
on destruction and (2) changing API that calls it to take a Deleter
functor (intrusive lists shouldn't be in the memory management
business).
- Reconfigure the remaining callback traits (addNodeToList, etc.) to be
higher-level, pulling out a simple_ilist<T> that is much easier to
read and understand.
- Allow tags (e.g., ilist_node<T,tag1> and ilist_node<T,tag2>) so that T
can be a member of multiple intrusive lists.
llvm-svn: 278974
Duncan P. N. Exon Smith [Wed, 17 Aug 2016 20:41:50 +0000 (20:41 +0000)]
Revert "[WebAssembly] Handle debug information and virtual registers without crashing"
This reverts commit r278967, since the new test is failing when you
don't build the WebAssembly target (most people, since it's
off-by-default).
llvm-svn: 278973
Yaxun Liu [Wed, 17 Aug 2016 20:39:49 +0000 (20:39 +0000)]
[OpenCL] AMDGPU: add support of cl_khr_subgroups
Patch by Aaron En Ye Shi.
Differential Revision: https://reviews.llvm.org/D23573
llvm-svn: 278972
Renato Golin [Wed, 17 Aug 2016 20:38:09 +0000 (20:38 +0000)]
[docs] Adding "new target" rules to dev policy
Making explicit our current policy to accept new targets as experimental and
later official. Every new target should follow these rules to be added,
and kept relevant in the upstream tree.
llvm-svn: 278971
Justin Bogner [Wed, 17 Aug 2016 20:30:52 +0000 (20:30 +0000)]
Replace a few more "fall through" comments with LLVM_FALLTHROUGH
Follow up to r278902. I had missed "fall through", with a space.
llvm-svn: 278970
Tim Northover [Wed, 17 Aug 2016 20:25:25 +0000 (20:25 +0000)]
GlobalISel: support irtranslation of icmp instructions.
llvm-svn: 278969
Zachary Turner [Wed, 17 Aug 2016 20:14:10 +0000 (20:14 +0000)]
Add a test for clang-tidy using the clang-cl driver.
Reviewed By: alexfh
Differential Revision: https://reviews.llvm.org/D23480
llvm-svn: 278968
Dominic Chen [Wed, 17 Aug 2016 20:11:03 +0000 (20:11 +0000)]
[WebAssembly] Handle debug information and virtual registers without crashing
Summary: Currently, enabling debug information when compiling for WebAssembly crashes the backend. This commit fixes these by skipping debug values in backend passes.
Reviewers: jfb, aprantl, dschuff, echristo
Subscribers: mehdi_amini, yurydelendik, dexonsmith, MatzeB, jfb, dschuff, llvm-commits
Differential Revision: https://reviews.llvm.org/D21808
llvm-svn: 278967
Tim Shen [Wed, 17 Aug 2016 20:07:29 +0000 (20:07 +0000)]
[GraphWriter] Change GraphWriter to use NodeRef in GraphTraits
Summary:
This is part of the "NodeType* -> NodeRef" migration. Notice that since
GraphWriter prints object address as identity, I added a static_assert on
NodeRef to be a pointer type.
Reviewers: dblaikie
Subscribers: llvm-commits, MatzeB
Differential Revision: https://reviews.llvm.org/D23580
llvm-svn: 278966
Matt Arsenault [Wed, 17 Aug 2016 20:07:16 +0000 (20:07 +0000)]
AMDGPU: Remove dead option
llvm-svn: 278965
Zachary Turner [Wed, 17 Aug 2016 20:04:35 +0000 (20:04 +0000)]
[Tooling] Parse compilation database command lines on Windows.
When a compilation database is used on Windows, the command lines cannot
be parsed using the standard GNU style syntax. LLVM provides functions for
parsing Windows style command lines, so use them where appropriate.
After this patch, clang-tidy runs correctly on Windows.
Reviewed by: alexfh
Differential Revision: https://reviews.llvm.org/D23455
llvm-svn: 278964
Tim Shen [Wed, 17 Aug 2016 20:02:38 +0000 (20:02 +0000)]
[GraphWriter] Change GraphWriter to use NodeRef in GraphTraits
Summary: Corresponding LLVM patch: D23580
Reviewers: dblaikie
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D23581
llvm-svn: 278963
Jan Vesely [Wed, 17 Aug 2016 20:02:11 +0000 (20:02 +0000)]
Implement vstore_half{,n}
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 278962
Tim Shen [Wed, 17 Aug 2016 20:01:58 +0000 (20:01 +0000)]
[GenericDomTree] Change GenericDomTree to use NodeRef in GraphTraits. NFC.
Summary:
Looking at the implementation, GenericDomTree has more specific
requirements on NodeRef, e.g. NodeRefObject->getParent() should compile,
and NodeRef should be a pointer. We can remove the pointer requirement,
but it seems to have little gain, given the limited use cases.
Also changed GraphTraits<Inverse<Inverse<T>> to be more accurate.
Reviewers: dblaikie, chandlerc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23593
llvm-svn: 278961
Sanjay Patel [Wed, 17 Aug 2016 19:56:10 +0000 (19:56 +0000)]
[InstCombine] minimize tests and autogenerate checks
llvm-svn: 278960
Filipe Cabecinhas [Wed, 17 Aug 2016 19:52:12 +0000 (19:52 +0000)]
Split DescribeAddressIfGlobal between a function that gets all the information, and one that prints it.
Summary:
Replacement for part of D23518
This deals with global variable addresses.
(This commit is written on top of D23605, but can be applied by itself)
Reviewers: kcc, samsonov
Subscribers: kubabrecka, llvm-commits
Differential Revision: https://reviews.llvm.org/D23607
llvm-svn: 278959
Filipe Cabecinhas [Wed, 17 Aug 2016 19:52:06 +0000 (19:52 +0000)]
Split DescribeAddressIfStack between a function that gets all the information, and one that prints it.
Summary:
Replacement for part of D23518
This deals with stack addresses.
Reviewers: kcc, samsonov
Subscribers: kubabrecka, llvm-commits
Differential Revision: https://reviews.llvm.org/D23605
llvm-svn: 278958
Sanjay Patel [Wed, 17 Aug 2016 19:45:18 +0000 (19:45 +0000)]
[InstCombine] more clean up of foldICmpXorConstant(); NFCI
Use m_APInt for the xor constant, but this is all still guarded by the initial
ConstantInt check, so no vector types should make it in here.
llvm-svn: 278957
Akira Hatanaka [Wed, 17 Aug 2016 19:42:22 +0000 (19:42 +0000)]
[CodeGen][ObjC] Fix infinite recursion in getObjCEncodingForTypeImpl.
Check that ExpandStructures is true before visiting the list of ivars.
rdar://problem/
27135221
Differential revision: https://reviews.llvm.org/D22929
llvm-svn: 278956
Sanjay Patel [Wed, 17 Aug 2016 19:23:42 +0000 (19:23 +0000)]
[InstCombine] clean up foldICmpXorConstant(); NFCI
1. Change variable names
2. Use local variables to reduce code
3. Early exit to reduce indent
llvm-svn: 278955
Marina Yatsina [Wed, 17 Aug 2016 19:07:40 +0000 (19:07 +0000)]
Fix for PR29010
This is a fix for https://llvm.org/bugs/show_bug.cgi?id=29010
Root cause of the bug is that the register class of the machine instruction operand does not fully reflect if this registers that can be allocated.
Both for i386 and x86_64 the operand's register class is VR128RegClass and thus contains xmm0-xmm15, though in i386 we can only use xmm0-xmm8.
In order to get the actual allocable registers of the class we need to use RegisterClassInfo.
Differential Revision: https://reviews.llvm.org/D23613
llvm-svn: 278954
Rui Ueyama [Wed, 17 Aug 2016 18:59:16 +0000 (18:59 +0000)]
Merge readAt and readAlign.
Now that they are identical.
llvm-svn: 278953
Adrian Prantl [Wed, 17 Aug 2016 18:27:24 +0000 (18:27 +0000)]
Module debug info: Fix a bug in handling record decls without fields.
The previous condition would erroneously mark all CXXRecordDecls
that didn't have any fields as being defined in a clang module.
This patch fixes the condition to only apply to explicit template
instantiations.
<rdar://problem/
27771823>
llvm-svn: 278952
Andrey Churbanov [Wed, 17 Aug 2016 18:18:21 +0000 (18:18 +0000)]
cleanup: fixed names of dummy arguments of Fortran interfaces declarations, no functional changes done
llvm-svn: 278951
Kostya Serebryany [Wed, 17 Aug 2016 18:10:42 +0000 (18:10 +0000)]
[libFuzzer] more mutations
llvm-svn: 278950
Eugene Zelenko [Wed, 17 Aug 2016 17:27:56 +0000 (17:27 +0000)]
[Include-fixer] Install executables and support scripts
Differential revision: https://reviews.llvm.org/D23045
llvm-svn: 278949
Adrian Prantl [Wed, 17 Aug 2016 16:55:56 +0000 (16:55 +0000)]
Move tests to the appropriate subdirectory.
llvm-svn: 278948
Omair Javaid [Wed, 17 Aug 2016 16:45:34 +0000 (16:45 +0000)]
Correct makefile.rules to use arm/aarch64 target specific AR and OBJCOPY
Differential revision: https://reviews.llvm.org/D20386
llvm-svn: 278947
Adrian Prantl [Wed, 17 Aug 2016 16:42:15 +0000 (16:42 +0000)]
Simplify condition. (NFC)
llvm-svn: 278946
Sanjay Patel [Wed, 17 Aug 2016 16:38:57 +0000 (16:38 +0000)]
[InstCombine] use m_APInt to allow icmp (or X, Y), C folds for splat constant vectors
This is a sibling of:
https://reviews.llvm.org/rL278859
https://reviews.llvm.org/rL278935
llvm-svn: 278945
Sanjay Patel [Wed, 17 Aug 2016 16:30:43 +0000 (16:30 +0000)]
[InstCombine] clean up foldICmpOrConstant(); NFCI
1. Change variable names
2. Use local variables to reduce code
3. Use ? instead of if/else
4. Use the APInt variable instead of 'RHS' so the removal of the FIXME code will be direct
llvm-svn: 278944
Sanjay Patel [Wed, 17 Aug 2016 16:23:15 +0000 (16:23 +0000)]
[InstCombine] add tests for missing vector icmp folds
llvm-svn: 278943
Adrian Prantl [Wed, 17 Aug 2016 16:20:32 +0000 (16:20 +0000)]
Debug info: Mark noreturn functions with DIFlagNoReturn.
This affects functions with the C++11 [[ noreturn ]] and C11 _Noreturn
specifiers.
Patch by Victor Leschuk!
https://reviews.llvm.org/D23168
llvm-svn: 278942
Artem Dergachev [Wed, 17 Aug 2016 16:02:45 +0000 (16:02 +0000)]
[analyzer] Add a checker for loss of sign or precision in integral casts.
This new checker tries to find execution paths on which implicit integral casts
cause definite loss of information: a certainly-negative integer is converted
to an unsigned integer, or an integer is definitely truncated to fit into
a smaller type.
Being implicit, such casts are likely to produce unexpected results.
Patch by Daniel Marjamäki!
Differential Revision: https://reviews.llvm.org/D13126
llvm-svn: 278941
Adrian Prantl [Wed, 17 Aug 2016 16:02:43 +0000 (16:02 +0000)]
Support the DW_AT_noreturn DWARF flag.
This is used to mark functions with the C++11 [[ noreturn ]] or C11 _Noreturn
attributes.
Patch by Victor Leschuk!
https://reviews.llvm.org/D23167
llvm-svn: 278940
Chad Rosier [Wed, 17 Aug 2016 15:54:39 +0000 (15:54 +0000)]
Revert "Reassociate: Reprocess RedoInsts after each inst".
This reverts commit r258830, which introduced a bug described in PR28367.
PR28367
llvm-svn: 278938
Artem Dergachev [Wed, 17 Aug 2016 15:37:52 +0000 (15:37 +0000)]
[analyzer] Add LocationContext information to SymbolMetadata.
Like SymbolConjured, SymbolMetadata also needs to be uniquely
identified by the moment of its birth.
Such moments are coded by the (Statement, LocationContext, Block count) triples.
Each such triple represents the moment of analyzing a statement with a certain
call backtrace, with corresponding CFG block having been entered a given amount
of times during analysis of the current code body.
The LocationContext information was accidentally omitted for SymbolMetadata,
which leads to reincarnation of SymbolMetadata upon re-entering a code body
with a different backtrace; the new symbol is incorrectly unified with
the old symbol, which leads to unsound assumptions.
Patch by Alexey Sidorin!
Differential Revision: https://reviews.llvm.org/D21978
llvm-svn: 278937
Michael Kruse [Wed, 17 Aug 2016 15:24:45 +0000 (15:24 +0000)]
Update ISL to isl-0.17.1-200-gd8de4ea.
This version fixes a bug in set coalescing.
llvm-svn: 278936
Sanjay Patel [Wed, 17 Aug 2016 15:24:30 +0000 (15:24 +0000)]
[InstCombine] use m_APInt to allow icmp (add X, Y), C folds for splat constant vectors
This is a sibling of:
https://reviews.llvm.org/rL278859
llvm-svn: 278935
Martin Bohme [Wed, 17 Aug 2016 15:00:22 +0000 (15:00 +0000)]
Adapt to TraverseLambdaCapture interface change from D23204
Summary:
Depends on D23204.
This is intended to be submitted immediately after D23204 lands.
Reviewers: jdennett, alexfh
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D23543
llvm-svn: 278934