Richard Smith [Sat, 22 Oct 2016 01:32:19 +0000 (01:32 +0000)]
[c++1z] P0012R1: Implement a few remaining pieces: downgrade diagnostic for
mismatched dynamic exception specifications in expressions from an error to a
warning, since this is no longer ill-formed in C++1z.
Allow reference binding of a reference-to-non-noexcept function to a noexcept
function lvalue. As defect resolutions, also allow a conditional between
noexcept and non-noexcept function lvalues to produce a non-noexcept function
lvalue (rather than decaying to a function pointer), and allow function
template argument deduction to deduce a reference to non-noexcept function when
binding to a noexcept function type.
llvm-svn: 284905
Davide Italiano [Sat, 22 Oct 2016 01:21:24 +0000 (01:21 +0000)]
[CtorUtils] Modernize. No functional changes intended.
llvm-svn: 284904
Kostya Serebryany [Sat, 22 Oct 2016 01:07:38 +0000 (01:07 +0000)]
[libFuzzer] typo in a test
llvm-svn: 284903
Kostya Serebryany [Sat, 22 Oct 2016 00:05:44 +0000 (00:05 +0000)]
[libFuzzer] add a test for asan's strict_string_checks=1
llvm-svn: 284902
Kostya Serebryany [Fri, 21 Oct 2016 23:52:26 +0000 (23:52 +0000)]
[sanitizers] support strict_string_checks for strncmp
llvm-svn: 284901
Jason Molenda [Fri, 21 Oct 2016 23:45:07 +0000 (23:45 +0000)]
Add some additional logging to
DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress to debug
corefiles that may not be correctly formed.
<rdar://problem/
28884846>
llvm-svn: 284900
Manman Ren [Fri, 21 Oct 2016 23:35:03 +0000 (23:35 +0000)]
Module: correctly set the module file kind when emitting file_modified.
rdar://
28503343
Differential Revision: http://reviews.llvm.org/D25806
llvm-svn: 284899
David L. Jones [Fri, 21 Oct 2016 23:30:39 +0000 (23:30 +0000)]
Fix map insertion that is elided in release build.
The assert() macro doesn't actually execute its body in Release builds, so using
it to check cache invariants requires that the insertion be outside of the
assert() statement. This change does that, and also makes sure to return the
actual map contents.
llvm-svn: 284898
Manman Ren [Fri, 21 Oct 2016 23:27:37 +0000 (23:27 +0000)]
Module: improve the diagnostic message for include of non-modular header.
Emit the actual path to the non-modular include.
rdar://
28897010
llvm-svn: 284897
Sanjay Patel [Fri, 21 Oct 2016 23:02:31 +0000 (23:02 +0000)]
[x86] add test for missing vector SRA combine via computeKnownBits
llvm-svn: 284896
Richard Smith [Fri, 21 Oct 2016 23:01:55 +0000 (23:01 +0000)]
Remove unnecessary distinction between Ref_Compatible and
Ref_Compatible_With_Added_Qualification. We always treated these two values the
same way.
llvm-svn: 284895
Eugene Zelenko [Fri, 21 Oct 2016 22:35:58 +0000 (22:35 +0000)]
[Release notes] Mention removed Clang-tidy misc-pointer-and-integral-operation check
llvm-svn: 284894
Chris Bieneman [Fri, 21 Oct 2016 22:13:55 +0000 (22:13 +0000)]
[Test Suite] Allow overriding codesign identity
Summary: Not everyone names their code sign identity "lldb_codesign", so it is nice to allow this to be overridden.
Reviewers: zturner, tfiala
Subscribers: labath, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D25714
llvm-svn: 284893
Justin Lebar [Fri, 21 Oct 2016 22:10:23 +0000 (22:10 +0000)]
[ADT] Don't rely on string literals not being convertible to non-const char* in CachedHashString.
The build was breaking on some platforms because we assumed that
CachedHashString("foo") would match the CachedHashString(StringRef)
constructor rather than the CachedHashString(char*) constructor.
To fix this, provide a CachedHashString(const char*) constructor, and
add a dummy argument to the old CachedHashString(char*) constructor.
llvm-svn: 284892
Konstantin Zhuravlyov [Fri, 21 Oct 2016 22:10:03 +0000 (22:10 +0000)]
[AMDGPU] Perform uchar to float combine for ISD::SINT_TO_FP
This will prevent following regression when enabling i16 support (D18049):
test/CodeGen/AMDGPU/cvt_f32_ubyte.ll
Differential Revision: https://reviews.llvm.org/D25805
llvm-svn: 284891
Richard Smith [Fri, 21 Oct 2016 22:00:42 +0000 (22:00 +0000)]
DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules.
This has two significant effects:
1) Direct relational comparisons between null pointer constants (0 and nullopt)
and pointers are now ill-formed. This was always the case for C, and it
appears that C++ only ever permitted by accident. For instance, cases like
nullptr < &a
are now rejected.
2) Comparisons and conditional operators between differently-cv-qualified
pointer types now work, and produce a composite type that both source
pointer types can convert to (when possible). For instance, comparison
between 'int **' and 'const int **' is now valid, and uses an intermediate
type of 'const int *const *'.
Clang previously supported #2 as an extension.
We do not accept the cases in #1 as an extension. I've tested a fair amount of
code to check that this doesn't break it, but if it turns out that someone is
relying on this, we can easily add it back as an extension.
This is a re-commit of r284800.
llvm-svn: 284890
Richard Smith [Fri, 21 Oct 2016 21:50:28 +0000 (21:50 +0000)]
Remove 'misc-pointer-and-integral-operation' clang-tidy check. The only cases
it detects are ill-formed (some per C++ core issue 1512, others always have
been).
llvm-svn: 284888
Justin Lebar [Fri, 21 Oct 2016 21:45:01 +0000 (21:45 +0000)]
Switch SmallSetVector to use DenseSet when it overflows its inline space.
Summary:
SetVector already used DenseSet, but SmallSetVector used std::set. This
leads to surprising performance differences. Moreover, it means that
the set of key types accepted by SetVector and SmallSetVector are
quite different!
In order to make this change, we had to convert some callsites that used
SmallSetVector<std::string, N> to use SmallSetVector<CachedHashString, N>
instead.
Reviewers: timshen
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25648
llvm-svn: 284887
Richard Smith [Fri, 21 Oct 2016 21:37:18 +0000 (21:37 +0000)]
Fix typo (ordered comparison between pointer and 0).
llvm-svn: 284886
Malcolm Parsons [Fri, 21 Oct 2016 21:13:56 +0000 (21:13 +0000)]
[Sema] Store a SourceRange for multi-token builtin types
Summary:
clang-tidy's modernize-use-auto check uses the SourceRange of a
TypeLoc when replacing the type with auto.
This was producing the wrong result for multi-token builtin types
like long long:
-long long *ll = new long long();
+auto long *ll = new long long();
Reviewers: alexfh, hokein, rsmith, Prazek, aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25363
llvm-svn: 284885
Justin Bogner [Fri, 21 Oct 2016 21:01:12 +0000 (21:01 +0000)]
Support: Annotate Error and Expected<> with LLVM_NODISCARD
It's always a mistake to ignore return values with Error or Expected
types.
llvm-svn: 284884
Mandeep Singh Grang [Fri, 21 Oct 2016 21:00:11 +0000 (21:00 +0000)]
[polly] Change SmallPtrSet which is being iterated to SmallSetVector in ScopInfo.h
Summary: This will avoid non-deterministic iteration order.
Reviewers: grosser, jdoerfert, zinob, mgrang
Subscribers: #polly
Tags: #polly
Differential Revision: https://reviews.llvm.org/D25880
llvm-svn: 284883
Justin Lebar [Fri, 21 Oct 2016 20:50:47 +0000 (20:50 +0000)]
[CUDA] Simplify some repeated diagnostic expectations in CUDA tests.
Instead of repeating the diagnostic, use "expected-note N".
Test-only change.
llvm-svn: 284882
Tim Shen [Fri, 21 Oct 2016 20:41:47 +0000 (20:41 +0000)]
[libcxx] Support std::regex_constants::match_not_null
Summary: Fixes PR21597.
Reviewers: mclow.lists, EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25595
llvm-svn: 284881
Bob Haarman [Fri, 21 Oct 2016 20:38:37 +0000 (20:38 +0000)]
fixed typo in InstrProf.h; NFC
llvm-svn: 284880
Artem Belevich [Fri, 21 Oct 2016 20:34:05 +0000 (20:34 +0000)]
Declare H and H new/delete.
llvm-svn: 284879
Rafael Espindola [Fri, 21 Oct 2016 20:32:41 +0000 (20:32 +0000)]
Compact SymbolBody from 56 to 48 bytes.
llvm-svn: 284878
Vassil Vassilev [Fri, 21 Oct 2016 20:30:30 +0000 (20:30 +0000)]
Remove accidentally checked in assert.
Thanks to Manman for spotting this.
llvm-svn: 284877
Justin Lebar [Fri, 21 Oct 2016 20:28:00 +0000 (20:28 +0000)]
[ADT] Get rid of use of LLVM_NOEXCEPT in CachedHashString.h.
LLVM_NOEXCEPT is no longer necessary (yay).
llvm-svn: 284876
Tom Stellard [Fri, 21 Oct 2016 20:25:11 +0000 (20:25 +0000)]
AMDGPU/SI: Fix crash caused by r284267
Reviewers: arsenm, nhaehnle
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D25782
llvm-svn: 284875
Sanjay Patel [Fri, 21 Oct 2016 20:16:27 +0000 (20:16 +0000)]
[DAG] enhance computeKnownBits to handle SHL with vector splat constant
Also, use APInt to avoid crashing on types larger than vNi64.
llvm-svn: 284874
Justin Lebar [Fri, 21 Oct 2016 20:13:39 +0000 (20:13 +0000)]
[clang-tidy] Don't use a SmallSetVector of an enum.
Summary:
This doesn't work after converting SmallSetVector to use DenseSet.
Instead we can just use a SmallVector.
Reviewers: timshen
Subscribers: nemanjai, cfe-commits
Differential Revision: https://reviews.llvm.org/D25647
llvm-svn: 284873
Justin Lebar [Fri, 21 Oct 2016 20:10:51 +0000 (20:10 +0000)]
[ADT] Compare strings' hashes first before comparing their values.
Summary:
We already have the hashes in hand, and comparing hashes should be much
more discriminatory than comparing the StringRefs' sizes.
Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25705
llvm-svn: 284872
Justin Lebar [Fri, 21 Oct 2016 20:10:48 +0000 (20:10 +0000)]
[ADT] Add CachedHashString.
Summary:
This is like CachedHashStringRef, but owns its data.
This lets us use strings inside of DenseMaps.
Reviewers: timshen
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25645
llvm-svn: 284871
Justin Lebar [Fri, 21 Oct 2016 20:10:44 +0000 (20:10 +0000)]
[IR] Add DenseMapInfo<CallSite>.
Summary:
A CallSite is basically an Instruction*, and you can put Instruction*s
into DenseMaps, so you should be able to do the same with CallSites.
This is used in a later patch.
Reviewers: timshen
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25643
llvm-svn: 284870
Justin Lebar [Fri, 21 Oct 2016 20:08:52 +0000 (20:08 +0000)]
[CUDA] Use FunctionDeclAndLoc for the Sema::LocsWithCUDACallDiags hashtable.
Summary: NFC
Reviewers: rnk
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25797
llvm-svn: 284869
Li Huang [Fri, 21 Oct 2016 20:05:21 +0000 (20:05 +0000)]
[SCEV] Memoize visitMulExpr results in SCEVRewriteVisitor.
Summary:
When SCEVRewriteVisitor traverses the SCEV DAG, it may visit the same SCEV
multiple times if this SCEV is referenced by multiple other SCEVs. This has
exponential time complexity in the worst case. Memoizing the results will
avoid re-visiting the same SCEV. Add a map to save the results, and override
the visit function of SCEVVisitor. Now SCEVRewriteVisitor only visit each
SCEV once and thus returns the same result for the same input SCEV.
This patch fixes PR18606, PR18607.
Reviewers: Sanjoy Das, Mehdi Amini, Michael Zolotukhin
Differential Revision: https://reviews.llvm.org/D25810
llvm-svn: 284868
Kevin Enderby [Fri, 21 Oct 2016 20:03:14 +0000 (20:03 +0000)]
Fix a bug in the code of llvm-cxxdump in dumpArchive() when
iterating over an archive with object and non-object members that
would cause an Abort because to was not calling consumeError()
when the code was wanting to ignore a non-object file.
Found by Justin Bogner!
llvm-svn: 284867
Kostya Serebryany [Fri, 21 Oct 2016 20:01:45 +0000 (20:01 +0000)]
[libFuzzer] mention one more trophie
llvm-svn: 284866
Peter Collingbourne [Fri, 21 Oct 2016 19:59:26 +0000 (19:59 +0000)]
Analysis: Move llvm::getConstantRangeFromMetadata to IR library.
We're about to start using it there.
Differential Revision: https://reviews.llvm.org/D25877
llvm-svn: 284865
Peter Collingbourne [Fri, 21 Oct 2016 19:57:55 +0000 (19:57 +0000)]
X86: Improve BT instruction selection for 64-bit values.
If a 64-bit value is tested against a bit which is known to be in the range
[0..31) (modulo 64), we can use the 32-bit BT instruction, which has a slightly
shorter encoding.
Differential Revision: https://reviews.llvm.org/D25862
llvm-svn: 284864
Simon Pilgrim [Fri, 21 Oct 2016 19:54:38 +0000 (19:54 +0000)]
[X86][AVX512BWVL] Added support for lowering v16i16 shuffles to AVX512BWVL vpermw
llvm-svn: 284863
Rafael Espindola [Fri, 21 Oct 2016 19:49:42 +0000 (19:49 +0000)]
Use a CachedHashString for comdats too.
We were already using it in the larger sets/maps. This provides about
1% speedup in linking xul and chromium.
llvm-svn: 284862
Bob Haarman [Fri, 21 Oct 2016 19:43:19 +0000 (19:43 +0000)]
[pdb] added support for dumping globals stream
Summary: This adds support for dumping the globals stream from PDB files using llvm-pdbdump, similar to the support we have for the publics stream.
Reviewers: ruiu, zturner
Subscribers: beanz, mgorny, modocache
Differential Revision: https://reviews.llvm.org/D25801
llvm-svn: 284861
Simon Pilgrim [Fri, 21 Oct 2016 19:40:29 +0000 (19:40 +0000)]
[X86][AVX512BWVL] Added support for combining target v16i16 shuffles to AVX512BWVL vpermw
llvm-svn: 284860
Haojian Wu [Fri, 21 Oct 2016 19:26:43 +0000 (19:26 +0000)]
[clang-move] Support moving template class forward declarations.
llvm-svn: 284859
Simon Pilgrim [Fri, 21 Oct 2016 19:18:09 +0000 (19:18 +0000)]
[X86][AVX512] Added support for combining target shuffles to AVX512 vpermpd/vpermq/vpermps/vpermd/vpermw
llvm-svn: 284858
Krzysztof Parzyszek [Fri, 21 Oct 2016 19:12:13 +0000 (19:12 +0000)]
[RDF] Use RegisterId typedef more consistently, NFC
llvm-svn: 284857
Benjamin Kramer [Fri, 21 Oct 2016 18:55:07 +0000 (18:55 +0000)]
Remove move constructors that are identical to the generated default move ctor.
llvm-svn: 284856
Anna Thomas [Fri, 21 Oct 2016 18:43:16 +0000 (18:43 +0000)]
[StripGCRelocates] New pass to remove gc.relocates added by RS4GC
Summary:
Utility pass to remove gc.relocates created by rewrite statepoints for GC.
With respect to safepoint verification, the IR generated would be incorrect, and cannot run
as such.
This would be a single transformation on the final optimized IR.
The benefit of the pass is for easy analysis when the IRs are 'polluted' by too
many gc.relocates.
Added tests.
test run: All RS4GC tests with -verify option. Local downstream tests on large
IR files. This also works when the pointer being gc.relocated is another
gc.relocate.
Reviewers: sanjoy, reames
Subscribers: beanz, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D25096
llvm-svn: 284855
Chris Bieneman [Fri, 21 Oct 2016 18:38:44 +0000 (18:38 +0000)]
[CMake] Fix standalone build
not and FileCheck targets may not be defined in standalone builds.
llvm-svn: 284854
Kevin Enderby [Fri, 21 Oct 2016 18:22:35 +0000 (18:22 +0000)]
For llvm-objdump for Mach-O files add printing of
the ARM_THREAD_STATE in the same format as
otool-classic(1) on darwin.
Also remove an extra space in printing the initprot to make
the output match otool-classic(1) on darwin.
rdar://
28851457
llvm-svn: 284852
Jim Ingham [Fri, 21 Oct 2016 18:18:25 +0000 (18:18 +0000)]
Add the new stdcpp formatters to the Xcode project.
llvm-svn: 284851
Eli Friedman [Fri, 21 Oct 2016 18:08:02 +0000 (18:08 +0000)]
[SCEVAffinator] Make precise modular math more correct.
Integer math in LLVM IR is modular. Integer math in isl is
arbitrary-precision. Modeling LLVM IR math correctly in isl requires
either adding assumptions that math doesn't actually overflow, or
explicitly wrapping the math. However, expressions with the "nsw" flag
are special; we can pretend they're arbitrary-precision because it's
undefined behavior if the result wraps. SCEV expressions based on IR
instructions with an nsw flag also carry an nsw flag (roughly; actually,
the real rule is a bit more complicated, but the details don't matter
here).
Before this patch, SCEV flags were also overloaded with an additional
function: the ZExt code was mutating SCEV expressions as a hack to
indicate to checkForWrapping that we don't need to add assumptions to
the operand of a ZExt; it'll add explicit wrapping itself. This kind of
works... the problem is that if anything else ever touches that SCEV
expression, it'll get confused by the incorrect flags.
Instead, with this patch, we make the decision about whether to
explicitly wrap the math a bit earlier, basing the decision purely on
the SCEV expression itself, and not its users.
Differential Revision: https://reviews.llvm.org/D25287
llvm-svn: 284848
Enrico Granata [Fri, 21 Oct 2016 18:03:55 +0000 (18:03 +0000)]
I hadn't fixed all the instances of the old marker for scripted format strings; do so now
llvm-svn: 284847
Rui Ueyama [Fri, 21 Oct 2016 17:50:26 +0000 (17:50 +0000)]
Use FileCheck's -strict-whitespace option instead of sed.
llvm-svn: 284846
Mandeep Singh Grang [Fri, 21 Oct 2016 17:29:10 +0000 (17:29 +0000)]
[polly] Change SmallPtrSet which are being iterated into SmallSetVector
Summary: Otherwise the lack of an iteration order results in non-determinism in codegen.
Reviewers: _jdoerfert, zinob, grosser
Tags: #polly
Differential Revision: https://reviews.llvm.org/D25863
llvm-svn: 284845
Sanjay Patel [Fri, 21 Oct 2016 17:24:26 +0000 (17:24 +0000)]
[DAG] fold negation of sign-bit
0 - X --> 0, if the sub is NUW
0 - X --> 0, if X is 0 or the minimum signed value and the sub is NSW
0 - X --> X, if X is 0 or the minimum signed value
This is the DAG equivalent of:
https://reviews.llvm.org/rL284649
plus the fold for the NUW case which already existed in InstSimplify.
Note that we miss a vector fold because of a deficiency in the DAG version of
computeKnownBits().
llvm-svn: 284844
Artem Belevich [Fri, 21 Oct 2016 17:15:46 +0000 (17:15 +0000)]
Removed unused function argument. NFC.
Differential Revision: https://reviews.llvm.org/D25839
llvm-svn: 284843
Sanjay Patel [Fri, 21 Oct 2016 16:56:29 +0000 (16:56 +0000)]
[x86] add tests for potential negation folds
These are the backend equivalents for the tests added in r284627.
The patterns may emerge late, so we should have folds for these in the DAG too.
llvm-svn: 284842
Krzysztof Parzyszek [Fri, 21 Oct 2016 16:38:29 +0000 (16:38 +0000)]
[Hexagon] Handle spills of partially defined double vector registers
After register allocation it is possible to have a spill of a register
that is only partially defined. That in itself it fine, but creates a
problem for double vector registers. Stores of such registers are pseudo
instructions that are expanded into pairs of individual vector stores,
and in case of a partially defined source, one of the stores may use
an entirely undefined register. To avoid this, track the defined parts
and only generate actual stores for those.
llvm-svn: 284841
Derek Schuff [Fri, 21 Oct 2016 16:38:07 +0000 (16:38 +0000)]
[WebAssembly] Fix for 0xc call_indirect changes
Summary:
Need to reorder the operands to have the callee as the last argument.
Adds a pseudo-instruction, and a pass to lower it into a real
call_indirect.
This is the first of two options for how to fix the problem.
Reviewers: dschuff, sunfish
Subscribers: jfb, beanz, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D25708
llvm-svn: 284840
Abderrazek Zaafrani [Fri, 21 Oct 2016 16:28:27 +0000 (16:28 +0000)]
Set the vectorizer MaxInterleaveFactor for Exynos.
llvm-svn: 284839
Reid Kleckner [Fri, 21 Oct 2016 16:26:27 +0000 (16:26 +0000)]
Fix -Wunused-variable warning in libFuzzer
llvm-svn: 284838
Simon Pilgrim [Fri, 21 Oct 2016 16:22:16 +0000 (16:22 +0000)]
[X86][SSE] Regenerated sext/zext constant folding tests and added i686 tests
llvm-svn: 284837
Reid Kleckner [Fri, 21 Oct 2016 16:09:20 +0000 (16:09 +0000)]
Remove unnecessary x86 backend requirements from OpenMP tests
Clang can generate LLVM IR for x86 without a registered x86 backend.
llvm-svn: 284836
Simon Pilgrim [Fri, 21 Oct 2016 16:07:51 +0000 (16:07 +0000)]
[X86] Use DAG::getBuildVector helper wrapper where possible. NFCI.
llvm-svn: 284835
Konstantin Zhuravlyov [Fri, 21 Oct 2016 16:02:35 +0000 (16:02 +0000)]
[MachineMemOperand][AtomicSDNode] Remove getSuccessOrdering()
Differential Revision: https://reviews.llvm.org/D25786
llvm-svn: 284834
Simon Pilgrim [Fri, 21 Oct 2016 15:51:24 +0000 (15:51 +0000)]
[X86][SSE] Regenerated chained pmovsx store tests and added i686 tests
llvm-svn: 284833
Abderrazek Zaafrani [Fri, 21 Oct 2016 15:24:08 +0000 (15:24 +0000)]
Test commit
llvm-svn: 284832
Tamas Berghammer [Fri, 21 Oct 2016 15:05:03 +0000 (15:05 +0000)]
Fix incorrect header order introduced in rL284830
llvm-svn: 284831
Tamas Berghammer [Fri, 21 Oct 2016 15:02:44 +0000 (15:02 +0000)]
Add data formatter for libstdc++ unique_ptr
Differential revision: https://reviews.llvm.org/D25734
llvm-svn: 284830
Tamas Berghammer [Fri, 21 Oct 2016 15:02:38 +0000 (15:02 +0000)]
Add data formatter for libstdc++ tuple
Differential revision: https://reviews.llvm.org/D25733
llvm-svn: 284829
Tamas Berghammer [Fri, 21 Oct 2016 15:02:32 +0000 (15:02 +0000)]
Improve the libstdc++ smart pointer formatters
* Display the strong/weak count in the summary
* Display the pointed object as a synthetic member
* Create synthetic children for weak/strong count
Differential revision: https://reviews.llvm.org/D25726
llvm-svn: 284828
Artur Pilipenko [Fri, 21 Oct 2016 15:02:21 +0000 (15:02 +0000)]
[LVI] Fix a bug with a guard being the very first instruction in a BB not taken into account
While looking for guards use reverse iterator and scan up to rend() not to begin()
llvm-svn: 284827
Sanjay Patel [Fri, 21 Oct 2016 14:58:30 +0000 (14:58 +0000)]
fix variable names; NFCI
Because we're just 'or-ing' these 2 variables later in the code, I
don't think there's a logical bug here, but of course the string with
"no size" is the one that should have the size suffix stripped off.
llvm-svn: 284826
Artem Tamazov [Fri, 21 Oct 2016 14:49:22 +0000 (14:49 +0000)]
[AMDGPU][mc] Fix ds_min/max[_rtn]_f32 - extra source operand removed.
Fixes Bug 28215. Lit tests updated.
Differential Revision: https://reviews.llvm.org/D25837
llvm-svn: 284825
Sanjay Patel [Fri, 21 Oct 2016 14:36:58 +0000 (14:36 +0000)]
[DAG] use SDNode flags 'nsz' to enable fadd/fsub with zero folds
As discussed in D24815, let's start the process of killing off the broken fast-math global
state housed in TargetOptions and eliminate the need for function-level fast-math attributes.
Here we enable two similar folds that are possible when we don't care about signed-zero:
fadd nsz x, 0 --> x
fsub nsz 0, x --> -x
Note that although the test cases include a 'sin' function call, I'm side-stepping the
FMF-on-calls question (and lack of support in the DAG) for now. It's not needed for these
tests - isNegatibleForFree/GetNegatedExpression just look through a ISD::FSIN node.
Also, when we create an FNEG node and propagate the Flags of the FSUB to it, this doesn't
actually do anything today because Flags are silently dropped for any node that is not a
binary operator.
Differential Revision: https://reviews.llvm.org/D25297
llvm-svn: 284824
Simon Pilgrim [Fri, 21 Oct 2016 13:00:47 +0000 (13:00 +0000)]
[X86][AVX2] Begun generalizing lowering to VPERMD/VPERMPS in preparation for AVX512 support.
llvm-svn: 284823
Simon Pilgrim [Fri, 21 Oct 2016 12:51:16 +0000 (12:51 +0000)]
Wdocumentation fix
llvm-svn: 284822
Simon Pilgrim [Fri, 21 Oct 2016 12:14:24 +0000 (12:14 +0000)]
[X86][AVX512] Add mask/maskz writemask support to subvector broadcast shuffle decode comments
llvm-svn: 284821
Peter Smith [Fri, 21 Oct 2016 11:25:33 +0000 (11:25 +0000)]
[ELF] Add sh_link field to .ARM.exidx sections for relocatable links
When doing a relocatable link the .ARM.exidx sections with the
SHF_LINK_ORDER flag set need to set the sh_link field to the executable
section they describe. We find the appropriate OutputSection by
following the sh_link field of the .ARM.exidx InputSections.
The getOutputSectionName() function rules make sure that when there are
multiple .ARM.exidx InputSections in an OutputSection they all have the
same sh_link field.
Differential revision: https://reviews.llvm.org/D25825
llvm-svn: 284820
Pavel Labath [Fri, 21 Oct 2016 11:14:04 +0000 (11:14 +0000)]
Add TestMultipleHits.py
This tests that lldb handles the situation when a single instruction triggers
multiple watchpoint hits. It currently fails on arm due to what appears to be a
lldb-server bug (pr30758).
llvm-svn: 284819
John Brawn [Fri, 21 Oct 2016 11:08:48 +0000 (11:08 +0000)]
[LoopUnroll] Keep the loop test only on the first iteration of max-or-zero loops
When we have a loop with a known upper bound on the number of iterations, and
furthermore know that either the number of iterations will be either exactly
that upper bound or zero, then we can fully unroll up to that upper bound
keeping only the first loop test to check for the zero iteration case.
Most of the work here is in plumbing this 'max-or-zero' information from the
part of scalar evolution where it's detected through to loop unrolling. I've
also gone for the safe default of 'false' everywhere but howManyLessThans which
could probably be improved.
Differential Revision: https://reviews.llvm.org/D25682
llvm-svn: 284818
Pavel Labath [Fri, 21 Oct 2016 10:52:11 +0000 (10:52 +0000)]
Revert "Fix a race condition between "ephemeral watchpoint disable/enable" and continue in commands."
This reverts commit r284795, as it breaks watchpoint handling on arm (and
presumable all architectures that report watchpoint hits without executing the
tripping instruction).
There seems to be something fundamentally wrong with this patch: it uses
process_sp->AddPreResumeAction to re-enable the watchpoint, but the whole point
of the step-over-watchpoint logic (which AFAIK is the only user of this class) is
to disable the watchpoint *after* we resume to do the single step.
I have no idea how to fix this except by reverting the offending patch.
llvm-svn: 284817
Simon Pilgrim [Fri, 21 Oct 2016 10:50:52 +0000 (10:50 +0000)]
[X86][AVX] Add 32-bit target tests for vector lzcnt/tzcnt to demonstrate missed folding opportunities
llvm-svn: 284816
Benjamin Kramer [Fri, 21 Oct 2016 10:19:37 +0000 (10:19 +0000)]
Remove non-existing file from modulemap.
This picked up a builtin header if it happened to be available.
llvm-svn: 284815
Bjorn Pettersson [Fri, 21 Oct 2016 09:53:42 +0000 (09:53 +0000)]
[AArch64] Corrected spill size for DDD register class. NFCI
Summary:
The spill size was incorrectly set to 196 bits,
which isn't a multiple of 8. This problem was detected when
experimenting with asserts that the spill size should be a
multiple of the byte size.
New corrected value for the spill size is set to 192 bits.
Note that tablegen (RegisterInfoEmitter) will divide the
size set in the RegisterClass definition by 8. So this
change should not have any impact on the tablegen output
(trunc(192/8) == trunc(196/8) == 24 bytes).
Reviewers: t.p.northover
Subscribers: llvm-commits, aemerson, rengolin
Differential Revision: https://reviews.llvm.org/D25818
llvm-svn: 284814
Benjamin Kramer [Fri, 21 Oct 2016 09:51:41 +0000 (09:51 +0000)]
Fix WebAssembly test after r284757.
The change to MachineSink shuffles code around, disable it.
llvm-svn: 284813
Benjamin Kramer [Fri, 21 Oct 2016 09:15:57 +0000 (09:15 +0000)]
[Support] Fix AlignOf test on i386-linux.
On i386 alignof(double) = 8 is not the same as alignof(struct { double
}) = 4. This used to be not an issue because the old implementation
always measured alignment inside of structs. Wrap a dummy struct around
the test to avoid this issue.
llvm-svn: 284812
Renato Golin [Fri, 21 Oct 2016 08:03:49 +0000 (08:03 +0000)]
Revert "DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules."
This reverts commit r284800, as it failed all ARM/AArch64 bots.
llvm-svn: 284811
George Rimar [Fri, 21 Oct 2016 07:46:24 +0000 (07:46 +0000)]
[ELF] Add DebugInfoDWARF dependency
rL284708 introduces a link error when building with BUILD_SHARED_LIBS:
undefined reference to `llvm::DWARFContext::parseCompileUnits()'
undefined reference to `llvm::DWARFContextInMemory::DWARFContextInMemory(
llvm::object::ObjectFile const&,
llvm::LoadedObjectInfo const*)'
The functions are available in libDebugInfoDWARF, from llvm.
Patch by Visoiu Mistrih Francis
Differential revision: https://reviews.llvm.org/D25843
llvm-svn: 284810
Simon Atanasyan [Fri, 21 Oct 2016 07:22:30 +0000 (07:22 +0000)]
[ELF][MIPS] Put local GOT entries accessed via a 16-bit index first
Some MIPS relocations used to access GOT entries are able to manipulate
16-bit index. The other ones like R_MIPS_CALL_HI16/LO16 can handle
32-bit indexes. 16-bit relocations are generated by default. The 32-bit
relocations are generated by -mxgot flag passed to compiler. Usually
these relocation are not mixed in the same code but files like crt*.o
contain 16-bit relocations so even if all "user's" code compiled with
-mxgot flag a few 16-bit relocations might come to the linking phase.
Now LLD does not differentiate local GOT entries accessed via a 16-bit
and 32-bit indexes. That might lead to relocation's overflow if 16-bit
entries are allocated to far from the beginning of the GOT.
The patch introduces new "part" of MIPS GOT dedicated to the local GOT
entries accessed by 32-bit relocations. That allows to put local GOT
entries accessed via a 16-bit index first and escape relocation's overflow.
Differential revision: https://reviews.llvm.org/D25833
llvm-svn: 284809
Craig Topper [Fri, 21 Oct 2016 05:55:40 +0000 (05:55 +0000)]
[AVX-512] Add tests to show opportunities for commuting vpermi2/vpermt2 instructions.
Commuting will be added in a future commit.
llvm-svn: 284808
Martin Probst [Fri, 21 Oct 2016 05:11:38 +0000 (05:11 +0000)]
clang-format: [JS] Fix template string ASI.
Summary:
Previously, automatic semicolon insertion would add an unwrapped line
when a template string contained a line break.
var x = `foo${
bar}`;
Would be formatted with `bar...` on a separate line and no indent.
Reviewers: djasper
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D25675
llvm-svn: 284807
Rui Ueyama [Fri, 21 Oct 2016 04:52:13 +0000 (04:52 +0000)]
Simplify. NFC.
llvm-svn: 284806
Rui Ueyama [Fri, 21 Oct 2016 04:52:11 +0000 (04:52 +0000)]
Add comments.
llvm-svn: 284805
Rui Ueyama [Fri, 21 Oct 2016 04:32:46 +0000 (04:32 +0000)]
Simplify by merging a lambda with addSymbol. NFC.
llvm-svn: 284804
Rui Ueyama [Fri, 21 Oct 2016 03:23:23 +0000 (03:23 +0000)]
Do not create .shstrtab and use .strtab instead.
In-memory ELF object files created here are consumed immediately,
so as long as the generated files are syntactically correct, we don't
care about the details.
llvm-svn: 284803
Richard Smith [Fri, 21 Oct 2016 03:15:03 +0000 (03:15 +0000)]
Don't try to use !Previous.empty() as a proxy for "Is this a redeclaration?" --
we don't collapse that down to a single entry if it's not a redeclaration.
Instead, set the Redeclaration bit on the Declarator to indicate whether a
function is a redeclaration (which may not have been linked into the
redeclaration chain if it's a dependent context friend).
Fixes a rejects-valid; see testcase.
llvm-svn: 284802