Zachary Turner [Thu, 20 Apr 2017 15:57:58 +0000 (15:57 +0000)]
[BitVector] Add operator<<= and operator>>=.
Differential Revision: https://reviews.llvm.org/D32244
llvm-svn: 300848
Daniel Sanders [Thu, 20 Apr 2017 15:46:12 +0000 (15:46 +0000)]
[globalisel] Enable tracing the legalizer with --debug-only=legalize-mir
Reviewers: t.p.northover, ab, qcolombet, aditya_nandakumar, rovka, kristof.beyls
Reviewed By: kristof.beyls
Subscribers: dberris, igorb, llvm-commits
Differential Revision: https://reviews.llvm.org/D31750
llvm-svn: 300847
Kostya Kortchinsky [Thu, 20 Apr 2017 15:11:00 +0000 (15:11 +0000)]
[scudo] Minor changes and refactoring
Summary:
This is part of D31947 that is being split into several smaller changes.
This one deals with all the minor changes, more specifically:
- Rename some variables and functions to make their purpose clearer;
- Reorder some code;
- Mark the hot termination incurring checks as `UNLIKELY`; if they happen, the
program will die anyway;
- Add a `getScudoChunk` method;
- Add an `eraseHeader` method to ScudoChunk that will clear a header with 0s;
- Add a parameter to `allocate` to know if the allocated chunk should be filled
with zeros. This allows `calloc` to not have to call
`GetActuallyAllocatedSize`; more changes to get rid of this function on the
hot paths will follow;
- reallocate was missing a check to verify that the pointer is properly
aligned on `MinAlignment`;
- The `Stats` in the secondary have to be protected by a mutex as the `Add`
and `Sub` methods are actually not atomic;
- The software CRC32 function was moved to the header to allow for inlining.
Reviewers: dvyukov, alekseyshl, kcc
Reviewed By: dvyukov
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32242
llvm-svn: 300846
Davide Italiano [Thu, 20 Apr 2017 14:45:33 +0000 (14:45 +0000)]
[Utility] Placate another GCC warning.
Differential Revision: https://reviews.llvm.org/D32137
llvm-svn: 300845
Amaury Sechet [Thu, 20 Apr 2017 14:22:47 +0000 (14:22 +0000)]
Introduce LLVMDIBuilderRef
Summary:
This patch adds a definition of `LLVMDIBuilderRef` that represents an `llvm::DIBuilder`.
Authored by Harlan Haskins
Reviewers: deadalnix, aprantl, probinson, dblaikie, echristo, whitequark
Reviewed By: deadalnix, whitequark
Subscribers: CodaFi, loladiro
Differential Revision: https://reviews.llvm.org/D32122
llvm-svn: 300843
Amara Emerson [Thu, 20 Apr 2017 13:54:09 +0000 (13:54 +0000)]
[MVT][SVE] Scalable vector MVTs (3/3)
Adds MVT::ElementCount to represent the length of a
vector which may be scalable, then adds helper functions
that work with it.
Patch by Graham Hunter.
Differential Revision: https://reviews.llvm.org/D32019
llvm-svn: 300842
Krasimir Georgiev [Thu, 20 Apr 2017 13:37:27 +0000 (13:37 +0000)]
Delete unused IncompleteFormat variable, NFCi.
llvm-svn: 300841
Amara Emerson [Thu, 20 Apr 2017 13:36:58 +0000 (13:36 +0000)]
[MVT][SVE] Scalable vector MVTs (2/3)
Adds scalable vector machine value types, and updates
the switch statements required for tablegen.
Patch by Graham Hunter.
Differential Revision: https://reviews.llvm.org/D32018
llvm-svn: 300840
Petar Jovanovic [Thu, 20 Apr 2017 13:26:46 +0000 (13:26 +0000)]
[mips][msa] Mask vectors holding shift amounts
Masked vectors which hold shift amounts when creating the following nodes:
ISD::SHL, ISD::SRL or ISD::SRA.
Instructions that use said nodes, which have had their arguments altered are
sll, srl, sra, bneg, bclr and bset.
For said instructions, the shift amount or the bit position that is
specified in the corresponding vector elements will be interpreted as the
shift amount/bit position modulo the size of the element in bits.
The problem lies in compiling with -O2 enabled, where the instructions for
formats .w and .d are not generated, but are instead optimized away.
In this case, having shift amounts that are either negative or greater than
the element bit size results in generation of incorrect results when
constant folding.
We remedy this by masking the operands for the nodes mentioned above before
actually creating them, so that the final result is correct before placed
into the constant pool.
Patch by Stefan Maksimovic.
Differential Revision: https://reviews.llvm.org/D31331
llvm-svn: 300839
Amara Emerson [Thu, 20 Apr 2017 13:08:17 +0000 (13:08 +0000)]
[MVT][SVE] Scalable vector MVTs (1/3)
This patch adds a few helper functions to obtain new vector
value types based on existing ones without needing to care
about whether they are scalable or not.
I've confined their use to a few common locations right now,
and targets that don't have scalable vectors should never
need to care about these.
Patch by Graham Hunter.
Differential Revision: https://reviews.llvm.org/D32017
llvm-svn: 300838
Pavel Labath [Thu, 20 Apr 2017 12:30:30 +0000 (12:30 +0000)]
Skip TestLibCxxAtomic with gcc
older versions of libc++ (still used on some linux systems) are not
compatible with gcc.
llvm-svn: 300837
Pavel Labath [Thu, 20 Apr 2017 12:30:18 +0000 (12:30 +0000)]
Recompute ArchSpec core after MergeFrom
Summary:
MergeFrom was updating the architecture if the target triple did not
have it set. However, it was leaving the core field as invalid. This
resulted in assertion failures in core file tests as a missing core
meant we were unable to compute the address byte size properly.
Add a unit test for the new behaviour.
Reviewers: jingham, clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D32221
llvm-svn: 300836
Pavel Labath [Thu, 20 Apr 2017 11:28:07 +0000 (11:28 +0000)]
Make TestStaticVariables XFAIL more specific
The test fails because an older clang did not emit the required debug
info (I am not sure when this got added, but clang-3.7 certainly did not
work yet). The actual platform has nothing to do with this.
llvm-svn: 300834
Pavel Labath [Thu, 20 Apr 2017 11:27:58 +0000 (11:27 +0000)]
Add libc++ category the three more tests
I thought my previous commit got the last ones but somehow I missed
these. This also resurrects TestDataFormatterLibcxxSet, which got
commented out in r263859 as a part of some seemingly unrelated change.
llvm-svn: 300833
Alex Lorenz [Thu, 20 Apr 2017 10:43:22 +0000 (10:43 +0000)]
[index] Record class template specializations using a new 'SpecializationOf'
relationship
rdar://
31603531
Differential Revision: https://reviews.llvm.org/D32010
llvm-svn: 300832
John Brawn [Thu, 20 Apr 2017 10:18:13 +0000 (10:18 +0000)]
[ARM] Fix handling of mapping symbols when changing sections
ChangeSection incorrectly registers LastEMSInfo as belonging to the previous
section, not the current section. This happens to work when changing sections
using .section, as the previous section is set to the current section before
the call to ChangeSection, but not when using .popsection.
Differential Revision: https://reviews.llvm.org/D32225
llvm-svn: 300831
John Brawn [Thu, 20 Apr 2017 10:13:54 +0000 (10:13 +0000)]
[AArch64] Fix handling of zero immediate in fmov instructions
Currently fmov #0 with a vector destination is handle incorrectly and results in
fmov #-1.9375 being emitted but should instead give an error. This is due to the
way we cope with fmov #0 with a scalar destination being an alias of fmov zr, so
fix this by actually doing it through an alias.
Differential Revision: https://reviews.llvm.org/D31949
llvm-svn: 300830
Jonathan Coe [Thu, 20 Apr 2017 10:11:01 +0000 (10:11 +0000)]
Add Python 3 support to clang.cindex
Summary:
Introduce an interop string to convert from unicode to c-strings where needed.
Add missing conversions from _CXString to strings in function registrations.
Explicitly evaluate lists where Python 3's lazy iterators would not otherwise do so.
This is an improvement upon the reverted change proposed in https://reviews.llvm.org/D26082
Reviewers: compnerd, skalinichev, modocache, MathieuDuponchelle
Reviewed By: compnerd
Subscribers: cfe-commits
Tags: #clang-c
Differential Revision: https://reviews.llvm.org/D31568
llvm-svn: 300829
John Brawn [Thu, 20 Apr 2017 10:10:10 +0000 (10:10 +0000)]
[AArch64] Fix handling of integer fp immediates
When an integer is used as an fp immediate we're failing to check the return
value of getFP64Imm, so invalid values are silently permitted. Fix this by
merging together the integer and real handling.
llvm-svn: 300828
Diana Picus [Thu, 20 Apr 2017 09:38:25 +0000 (09:38 +0000)]
[ARM] Rename HW div feature to HW div Thumb. NFCI.
The hardware div feature refers only to Thumb, but because of its name
it is tempting to use it to check for hardware division in general,
which may cause problems in ARM mode. See https://reviews.llvm.org/D32005.
This patch adds "Thumb" to its name, to make its scope clear. One
notable place where I haven't made the change is in the feature flag
(used with -mattr), which is still hwdiv. Changing it would also require
changes in a lot of tests, including clang tests, and it doesn't seem
like it's worth the effort.
Differential Revision: https://reviews.llvm.org/D32160
llvm-svn: 300827
Alex Lorenz [Thu, 20 Apr 2017 09:35:02 +0000 (09:35 +0000)]
Add #pragma clang attribute support to the availability attribute
rdar://
31707804
llvm-svn: 300826
Vassil Vassilev [Thu, 20 Apr 2017 08:57:41 +0000 (08:57 +0000)]
PR19260: Teach doxygen to spell correctly the include paths.
Currently we have #include <Sema.h> in the doxygen page documenting Sema. The
patch changes it ot #include "clang/Sema/Sema.h" which is what we would spell if
we need to include it in a real codebase.
Patch by Yuka Takahashi (D32113)!
llvm-svn: 300825
Craig Topper [Thu, 20 Apr 2017 06:04:03 +0000 (06:04 +0000)]
[APInt] In slt/sgt(uint64_t), only call getMinSignedBits if the APInt is not a single word.
llvm-svn: 300824
Craig Topper [Thu, 20 Apr 2017 06:04:01 +0000 (06:04 +0000)]
[APInt] Call the slow case counting methods directly in isMask/isShiftedMask. We already handled the single word case. NFC
llvm-svn: 300823
Keith Wyss [Thu, 20 Apr 2017 05:59:26 +0000 (05:59 +0000)]
[XRay] [compiler-rt] - Fix standalone and non-deterministic test issue
Summary:
The thread order test fails sometimes my machine independently of standalone
build.
From testing both standalone and in-tree build, I see I configured it wrong.
The other hypothesis for an issue is that cold starts can interfere with whether
record unwriting happens. Once this happens more than once, we can naively
FileCheck on the wrong test output, which compounds the issue.
While "rm blah.* || true" will print to stderr if the glob can't expand, this is
mostly harmless and makes sure earlier failing tests don't sabotage us.
Example failure:
---
header:
version: 1
type: 1
constant-tsc: true
nonstop-tsc: true
cycle-frequency:
3800000000
records:
- { type: 0, func-id: 1, function: 'f1()', cpu: 9, thread: 21377, kind: function-enter, tsc:
2413745203147228 }
- { type: 0, func-id: 1, function: 'f1()', cpu: 9, thread: 21377, kind: function-exit, tsc:
2413745203304238 }
...
The CMAKE related change fixes the expectation that COMPILER_RT_STANDALONE_BUILD will be explicitly FALSE instead
of empty string when it is not "TRUE".
Reviewers: dberris
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32259
llvm-svn: 300822
Craig Topper [Thu, 20 Apr 2017 04:55:01 +0000 (04:55 +0000)]
[SelectionDAG] Fix another place that was passing a large value to APInt::lshrInPlace.
llvm-svn: 300821
Eric Fiselier [Thu, 20 Apr 2017 04:24:29 +0000 (04:24 +0000)]
Disable the filesystem library on Windows by default
llvm-svn: 300820
Craig Topper [Thu, 20 Apr 2017 04:23:43 +0000 (04:23 +0000)]
[SelectionDAG] Use getActiveBits() and countTrailingZeros() to avoid creating temporary APInts with lshr and trunc. NFCI
llvm-svn: 300819
Leslie Zhai [Thu, 20 Apr 2017 04:23:24 +0000 (04:23 +0000)]
[AVR] Add -mmcu option to the driver
A patch by Peter Wu!
Reviewers: jroelofs, xiangzhai
Reviewed By: jroelofs, dylanmckay, xiangzhai
Subscribers: dlj, dylanmckay, cfe-commits
Differential Revision: https://reviews.llvm.org/D29827
llvm-svn: 300818
Eric Fiselier [Thu, 20 Apr 2017 04:19:02 +0000 (04:19 +0000)]
Rename the static version of libc++ on Windows.
Previously both the static version of libc++ and the
import library for the DLL had the same name, 'c++.lib'.
This patch renames the static library on Windows to be `libc++.lib`
so it no longer conflicts. This naming convention is consistent with
other windows libraries.
llvm-svn: 300817
Craig Topper [Thu, 20 Apr 2017 03:49:18 +0000 (03:49 +0000)]
Recommit "[APInt] Add back the asserts that check that the APInt shift methods aren't called with values larger than BitWidth."
This includes a fix to clamp a right shift of larger than BitWidth in DAG combining.
llvm-svn: 300816
Dean Michael Berris [Thu, 20 Apr 2017 03:26:04 +0000 (03:26 +0000)]
[XRay][compiler-rt] Cleanup CFI/CFA annotations on trampolines
Summary:
This is a follow-up to D32202.
While the previous change (D32202) did fix the stack alignment issue, we
were still at a weird state in terms of the CFI/CFA directives (as the
offsets were wrong). This change cleans up the SAVE/RESTORE macros for
the trampoline, accounting the stack pointer adjustments with less
instructions and with some clearer math. We note that the offsets will
be different on the exit trampolines, because we don't typically 'call'
into this trampoline and we only ever jump into them (i.e. treated as a
tail call that's patched in at runtime).
Reviewers: eugenis, kpw, pelikan
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32214
llvm-svn: 300815
Richard Trieu [Thu, 20 Apr 2017 02:53:53 +0000 (02:53 +0000)]
[ODRHash] clean up test and add new examples. NFC
Use a macro to generate the struct with all decls. Previously, four identical
changes would be needed to update this test. This macro reduces that to one
location. Added two other tests for issues that triggered false positives
during testing.
llvm-svn: 300814
Craig Topper [Thu, 20 Apr 2017 02:46:21 +0000 (02:46 +0000)]
Revert r300811 "[APInt] Add back the asserts that check that the APInt shift methods aren't called with values larger than BitWidth."
This is failing a self host debug build.
llvm-svn: 300813
Craig Topper [Thu, 20 Apr 2017 02:11:27 +0000 (02:11 +0000)]
[APInt] Implement APInt::intersects without creating a temporary APInt in the multiword case
Summary: This is a simple question we should be able to answer without creating a temporary to hold the AND result. We can also get an early out as soon as we find a word that intersects.
Reviewers: RKSimon, hans, spatel, davide
Reviewed By: hans, davide
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32253
llvm-svn: 300812
Craig Topper [Thu, 20 Apr 2017 02:03:09 +0000 (02:03 +0000)]
[APInt] Add back the asserts that check that the APInt shift methods aren't called with values larger than BitWidth.
The underlying tcShiftRight/tcShiftLeft functions support the larger bit widths but the APInt interface shouldn't rely on that.
llvm-svn: 300811
Jason Molenda [Thu, 20 Apr 2017 02:02:25 +0000 (02:02 +0000)]
Add extra logging for when lldb is looking for kernels and kexts.
<rdar://problem/
26863256>
llvm-svn: 300810
Eric Fiselier [Thu, 20 Apr 2017 01:50:39 +0000 (01:50 +0000)]
Make linker errors verbose on Windows
llvm-svn: 300809
Eric Fiselier [Thu, 20 Apr 2017 01:45:15 +0000 (01:45 +0000)]
Fix dllimport on a class template
llvm-svn: 300808
Serge Pavlov [Thu, 20 Apr 2017 01:34:04 +0000 (01:34 +0000)]
Do not run frame verification if target does not use frame instructions
llvm-svn: 300807
Richard Smith [Thu, 20 Apr 2017 01:15:31 +0000 (01:15 +0000)]
PR32673: Don't wrap parameter packs in SubstTemplateTypeParmPackType nodes when forming implicit deduction guides.
Doing so thwarts template type deduction. Instead, substitute the pack directly
by picking "slice 0" of the resulting expansion.
llvm-svn: 300805
Shoaib Meenai [Thu, 20 Apr 2017 01:11:42 +0000 (01:11 +0000)]
[Sema] Use MSVC inner class behavior on Itanium
Windows Itanium aims to use MSVC export and import semantics. Inner
class members shouldn't be exported on a dllexport explicit
instantiation definition of the outer class, and they shouldn't be
imported on a dllimport explicit instantiation declaration of the outer
class (instead a local copy should be emitted). We were doing the first
but not the second, and this mismatch can lead to link errors. Fix the
behavior and add tests for both.
Differential Revision: https://reviews.llvm.org/D32213
llvm-svn: 300804
Richard Smith [Thu, 20 Apr 2017 01:02:29 +0000 (01:02 +0000)]
Add a triple to codegen test.
llvm-svn: 300803
Carlo Bertolli [Thu, 20 Apr 2017 00:39:39 +0000 (00:39 +0000)]
[OpenMP] Prepare sema to support combined constructs with omp distribute and omp for
https://reviews.llvm.org/D32237
This patch prepares sema with additional fields to support all those composite and combined constructs of OpenMP that include pragma 'distribute' and 'for', such as 'distribute parallel for'. It also extends the regression tests for 'distribute parallel for' and adds a new one.
llvm-svn: 300802
Ahmed Bougacha [Thu, 20 Apr 2017 00:16:13 +0000 (00:16 +0000)]
Revert "[libFuzzer] XFAIL fuzzer-oom.test on Darwin."
This reverts commit r300127.
r300759 implemented StopTheWorld for Darwin, so the test passes again.
llvm-svn: 300801
Kostya Serebryany [Wed, 19 Apr 2017 23:58:05 +0000 (23:58 +0000)]
[libFuzzer] extend help for -minimize_crash to cover ASAN_OPTIONS=dedup_token_length=3
llvm-svn: 300800
Craig Topper [Wed, 19 Apr 2017 23:57:51 +0000 (23:57 +0000)]
[APInt] Implement operator==(uint64_t) similar to ugt/ult(uint64_t) to remove one of the out of line EqualsSlowCase methods.
llvm-svn: 300799
Craig Topper [Wed, 19 Apr 2017 23:55:48 +0000 (23:55 +0000)]
[APInt] Don't call getActiveBits() in ult/ugt(uint64_t) if its a single word.
The compiled code already needs to check single/multi word for the countLeadingZeros call inside of getActiveBits, but it isn't able to optimize out the leadingZeros call in the single word case that can't produce a value larger than 64.
This shrank the opt binary by about 5-6k on my local x86-64 build.
llvm-svn: 300798
Sanjoy Das [Wed, 19 Apr 2017 23:55:03 +0000 (23:55 +0000)]
Statepoint Docs: fix incorrect uses of it's
llvm-svn: 300797
Craig Topper [Wed, 19 Apr 2017 23:52:59 +0000 (23:52 +0000)]
[APInt] Use ugt(uint64_t) for the compare in getLimitedValue(uint64_t) since the code is identical to it. NFC
llvm-svn: 300796
Reid Kleckner [Wed, 19 Apr 2017 23:45:45 +0000 (23:45 +0000)]
[DAE] Simplify attribute list creation, NFC
Removes a use of getSlotAttributes, which I intend to change.
llvm-svn: 300795
Kuba Mracek [Wed, 19 Apr 2017 23:44:33 +0000 (23:44 +0000)]
Revert r300789: There are Windows bot failures.
llvm-svn: 300794
Adrian Prantl [Wed, 19 Apr 2017 23:42:25 +0000 (23:42 +0000)]
Fix bug that caused DwarfExpression to drop DW_OP_deref from FI locations
- introduced in r300522 and found via the Swift LLDB testsuite.
The fix is to set the location kind to memory whenever an FrameIndex
location is emitted.
rdar://problem/
31707602
llvm-svn: 300793
Adrian Prantl [Wed, 19 Apr 2017 23:42:17 +0000 (23:42 +0000)]
Revert "Fix bug that caused DwarfExpression to drop DW_OP_deref from FI locations"
This reverts commit r300790.
llvm-svn: 300792
Kannan Narayanan [Wed, 19 Apr 2017 23:39:19 +0000 (23:39 +0000)]
Revert earlier change. ds permute operations affect lgkm counter.
Differential Revision: https://reviews.llvm.org/D32254
llvm-svn: 300791
Adrian Prantl [Wed, 19 Apr 2017 23:34:14 +0000 (23:34 +0000)]
Fix bug that caused DwarfExpression to drop DW_OP_deref from FI locations
- introduced in r300522 and found via the Swift LLDB testsuite.
The fix is to set the location kind to memory whenever an FrameIndex
location is emitted.
rdar://problem/
31707602
llvm-svn: 300790
Kuba Mracek [Wed, 19 Apr 2017 23:34:08 +0000 (23:34 +0000)]
[libFuzzer] Always build libFuzzer
There are two reasons why users might want to build libfuzzer:
- To fuzz LLVM itself
- To get the libFuzzer.a archive file, so that they can attach it to their code
This change always builds libfuzzer, and supports the second use case if the specified flag is set.
The point of this patch is to have something that can potentially be shipped with the compiler, and this also ensures that the version of libFuzzer is correct to use with that compiler.
Differential Revision: https://reviews.llvm.org/D32096
llvm-svn: 300789
Eric Fiselier [Wed, 19 Apr 2017 23:27:48 +0000 (23:27 +0000)]
change what branches Appveyor builds
llvm-svn: 300788
Reid Kleckner [Wed, 19 Apr 2017 23:26:44 +0000 (23:26 +0000)]
[GlobalOpt] Simplify attribute code stripping nest, NFC
llvm-svn: 300787
Eric Fiselier [Wed, 19 Apr 2017 23:26:21 +0000 (23:26 +0000)]
Add appveyor.yml config for a future Windows bot.
I'm currently trying to get a libc++ Windows builder working on appveyor.
This patch adds the configuration file needed to build libc++ on Appveyor.
Details of where the buildbot can be found will come later
llvm-svn: 300786
Jim Ingham [Wed, 19 Apr 2017 23:21:04 +0000 (23:21 +0000)]
Fix !N and !-N commands and add a test case.
<rdar://problem/
31713267>
llvm-svn: 300785
Reid Kleckner [Wed, 19 Apr 2017 23:17:47 +0000 (23:17 +0000)]
Simplify test for sret attribute in instcombine
This change is correct because the verifier requires that at most one
argument be marked 'sret'.
NFC, removes a use of AttributeList slot APIs.
llvm-svn: 300784
Galina Kistanova [Wed, 19 Apr 2017 23:16:14 +0000 (23:16 +0000)]
Temporarily revert r299221 to fix nondeterminism in ThinLTO builder.
llvm-svn: 300783
Philip Reames [Wed, 19 Apr 2017 23:16:13 +0000 (23:16 +0000)]
Refresh the statepoint docs a bit
The documentation had gotten a bit stale. The revised one are by no means perfect, but I tried to remove the obvious incorrect or misleading statements.
llvm-svn: 300782
Matthias Braun [Wed, 19 Apr 2017 23:10:43 +0000 (23:10 +0000)]
X86FrameLowering: Fix getFrameIndexReference() for 'fixed' objects
Debug information is calculated with getFrameIndexReference() which was
missing some logic for the fixed object cases (= parameters on the stack).
rdar://
24557797
Differential Revision: https://reviews.llvm.org/D32204
llvm-svn: 300781
Kostya Serebryany [Wed, 19 Apr 2017 23:05:53 +0000 (23:05 +0000)]
[sanitizer-coverage] remove more unused code
llvm-svn: 300780
Eugene Zelenko [Wed, 19 Apr 2017 23:02:10 +0000 (23:02 +0000)]
[Object] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 300779
Kostya Serebryany [Wed, 19 Apr 2017 22:42:11 +0000 (22:42 +0000)]
[sanitizer-coverage] remove some more stale code
llvm-svn: 300778
Evgeniy Stepanov [Wed, 19 Apr 2017 22:27:23 +0000 (22:27 +0000)]
Remove two unused variables (-Werror).
llvm-svn: 300777
Kostya Serebryany [Wed, 19 Apr 2017 22:25:30 +0000 (22:25 +0000)]
[sanitizer-coverage] trim down the docs
llvm-svn: 300776
Kostya Serebryany [Wed, 19 Apr 2017 22:24:03 +0000 (22:24 +0000)]
[sanitizer-coverage] remove run-time support for -fsanitize-coverage=indirect-calls
llvm-svn: 300775
Craig Topper [Wed, 19 Apr 2017 22:11:05 +0000 (22:11 +0000)]
[APInt] Cast more calls to add/sub/mul overflow functions to void. I missed the unittests in r300758.
llvm-svn: 300773
Sanjay Patel [Wed, 19 Apr 2017 22:00:00 +0000 (22:00 +0000)]
[DAG] add splat vector support for 'or' in SimplifyDemandedBits
I've changed one of the tests to not fold away, but we didn't and still don't do the transform
that the comment claims we do (and I don't know why we'd want to do that).
Follow-up to:
https://reviews.llvm.org/rL300725
https://reviews.llvm.org/rL300763
llvm-svn: 300772
Eric Fiselier [Wed, 19 Apr 2017 21:52:08 +0000 (21:52 +0000)]
Fix typo in Windows test configuration code
llvm-svn: 300770
Kostya Serebryany [Wed, 19 Apr 2017 21:48:09 +0000 (21:48 +0000)]
[sanitizer-coverage] remove stale code
llvm-svn: 300769
Kostya Serebryany [Wed, 19 Apr 2017 21:34:58 +0000 (21:34 +0000)]
[libFuzzer] remove -output_csv option. It duplicates the default output and got out of sync
llvm-svn: 300768
Kostya Serebryany [Wed, 19 Apr 2017 21:31:11 +0000 (21:31 +0000)]
[sanitizer-coverage] deprecate -fsanitize-coverage=trace-bb
llvm-svn: 300767
Kostya Serebryany [Wed, 19 Apr 2017 21:30:46 +0000 (21:30 +0000)]
[sanitizer-coverage] remove run-time support for -fsanitize-coverage=trace-bb
llvm-svn: 300766
Francis Ricci [Wed, 19 Apr 2017 21:25:06 +0000 (21:25 +0000)]
Fixup style from r300760
llvm-svn: 300765
Erich Keane [Wed, 19 Apr 2017 21:24:55 +0000 (21:24 +0000)]
Corrrect warn_unused_result attribute
The original idea was that if the attribute on an operator,
that the return-value unused-ness wouldn't matter. However,
all of the operators except postfix inc/dec return
references! References don't result in this warning
anyway, so those are already excluded.
Differential Revision: https://reviews.llvm.org/D32207
llvm-svn: 300764
Sanjay Patel [Wed, 19 Apr 2017 21:23:09 +0000 (21:23 +0000)]
[DAG] add splat vector support for 'xor' in SimplifyDemandedBits
This allows forming more 'not' ops, so we get improvements for ISAs that have and-not.
Follow-up to:
https://reviews.llvm.org/rL300725
llvm-svn: 300763
Richard Smith [Wed, 19 Apr 2017 21:15:45 +0000 (21:15 +0000)]
Fix assertion failure in codegen on non-template deduction guide.
llvm-svn: 300762
Matthias Braun [Wed, 19 Apr 2017 21:11:44 +0000 (21:11 +0000)]
ARMFrameLowering: Reserve emergency spill slot for large arguments
Re-commit after revert in r300668. Changed getMaxFPOffset() to a
more conservative heuristic instead of trying to be clever and missing
for some exotic calling conventions.
We need to reserve an emergency spill slot in cases with large argument
types that could overflow immediate offsets for FP relative address
calculations.
rdar://
31317893
Differential Revision: https://reviews.llvm.org/D31643
llvm-svn: 300761
Francis Ricci [Wed, 19 Apr 2017 21:11:08 +0000 (21:11 +0000)]
Make sure to scan mmap'd memory regions for root pointers on OS X
Summary:
In the general case, we only need to check for root regions inside
the memory map returned by procmaps. However, on Darwin,
we also need to check inside mmap'd regions, which aren't returned
in the list of modules we get from procmaps.
This patch refactors memory region scanning on darwin to reduce
code duplication with the kernel alloc once page scan.
Reviewers: kubamracek, alekseyshl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32190
llvm-svn: 300760
Francis Ricci [Wed, 19 Apr 2017 21:11:07 +0000 (21:11 +0000)]
Implement StopTheWorld for Darwin
Reviewers: kubamracek, alekseyshl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32189
llvm-svn: 300759
Craig Topper [Wed, 19 Apr 2017 21:09:45 +0000 (21:09 +0000)]
[APInt] Cast calls to add/sub/mul overflow methods to void if only their overflow bool out param is used.
This is preparation for a clang change to improve the [[nodiscard]] warning to not be ignored on methods that return a class marked [[nodiscard]] that are defined in the class itself. See D32207.
We should consider adding wrapper methods to APInt that return the overflow flag directly and discard the APInt result. This would eliminate the void casts and the need to create a bool before the call to pass to the out param.
llvm-svn: 300758
Simon Pilgrim [Wed, 19 Apr 2017 21:09:19 +0000 (21:09 +0000)]
[InstCombine] Add frem constant folding test (PR3316)
llvm-svn: 300757
Craig Topper [Wed, 19 Apr 2017 21:02:45 +0000 (21:02 +0000)]
[CodeGen] Use preincrement version of APInt::operator++ instead of postincrement to avoid creating and immediately discarding a temporary APInt.
This is preparation for a clang change to improve the [[nodiscard]] warning to not be ignored on methods that return a class marked [[nodiscard]] that are defined in the class itself. See D32207.
llvm-svn: 300756
Kostya Serebryany [Wed, 19 Apr 2017 20:57:13 +0000 (20:57 +0000)]
Fix a leak in tools/driver/cc1as_main.cpp
Summary: For some reason, the asan bot has recently started reporting this leak even though it existed for ages.
Reviewers: pcc
Reviewed By: pcc
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D32243
llvm-svn: 300755
Matt Arsenault [Wed, 19 Apr 2017 20:53:07 +0000 (20:53 +0000)]
AMDGPU: Custom lower illegal small select types
Promote them to i32 vectors to avoid unpacking and re-packing
the vectors.
llvm-svn: 300754
Dehao Chen [Wed, 19 Apr 2017 20:52:21 +0000 (20:52 +0000)]
Code style change as suggested in https://reviews.llvm.org/D32177 (NFC)
llvm-svn: 300753
Eli Friedman [Wed, 19 Apr 2017 20:50:57 +0000 (20:50 +0000)]
[ARM] Remove redundant computeKnownBits helper.
Move the BFI logic to computeKnownBitsForTargetNode, and delete
the redundant CMOV logic.
This is intended as a cleanup, but it's probably possible to construct
a case where moving the BFI logic allows more combines.
Differential Revision: https://reviews.llvm.org/D31795
llvm-svn: 300752
Aditya Nandakumar [Wed, 19 Apr 2017 20:48:50 +0000 (20:48 +0000)]
[GISEL]: Move getConstantVReg to Utils
NFCI
llvm-svn: 300751
Simon Pilgrim [Wed, 19 Apr 2017 20:47:58 +0000 (20:47 +0000)]
[InstCombine] Add frem constant folding test (PR32177)
llvm-svn: 300750
Eli Friedman [Wed, 19 Apr 2017 20:39:39 +0000 (20:39 +0000)]
[ARM] Use TableGen patterns to select vtbl. NFC.
Differential Revision: https://reviews.llvm.org/D32103
llvm-svn: 300749
Alex Shlyapnikov [Wed, 19 Apr 2017 20:39:09 +0000 (20:39 +0000)]
Turn symbolization on for ASan unit test.
Summary:
On PowerPC and ARM (possibly, need to verify), couple tests involving
pthread_exit fail due to leaks detected by LSan. pthread_exit tries
to perform unwinding that leads to dlopen'ing libgcc_s.so. dlopen
mallocs "libgcc_s.so" string which confuses LSan, it fails to
realize that this allocation happens in dynamic linker and should
be ignored.
Symbolized leak report is required to define a suppression for this
known problem.
Reviewers: eugenis
Subscribers: aemerson, rengolin, kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D32194
Turn symbolization on for PPC and Thumb only to do not slow down other platforms.
llvm-svn: 300748
Craig Topper [Wed, 19 Apr 2017 20:32:11 +0000 (20:32 +0000)]
[APInt] Use SignExtend64 instead of reinventing it. NFC
llvm-svn: 300747
Eli Friedman [Wed, 19 Apr 2017 20:19:58 +0000 (20:19 +0000)]
[SCEV] Make SCEV or modeling more aggressive.
Use haveNoCommonBitsSet to figure out whether an "or" instruction
is equivalent to addition. This handles more cases than just
checking for a constant on the RHS.
Differential Revision: https://reviews.llvm.org/D32239
llvm-svn: 300746
Kostya Serebryany [Wed, 19 Apr 2017 20:17:41 +0000 (20:17 +0000)]
[sanitizer-coverage] remove run-time support for the deprecated -fsanitize-coverage=8bit-counters
llvm-svn: 300745
Kostya Serebryany [Wed, 19 Apr 2017 20:15:58 +0000 (20:15 +0000)]
[sanitizer-coverage] deprecate -fsanitize-coverage=8bit-counters
llvm-svn: 300744