Joachim Protze [Thu, 5 Jul 2018 09:14:06 +0000 (09:14 +0000)]
Dropped non-supoorted "--no-as-needed" flag from OMPT tests for macOS
The flag "--no-as-needed" is not recognized by the linker on macOS making the following tests fail:
ompt/loadtool/tool_available/tool_available.c
ompt/loadtool/tool_not_available/tool_not_available.c
This patch removes this flag for macOS and adds it only for Linux and Windows.
I tested it on Ubuntu 16.04 and macOS HighSierra, with Clang/LLVM 6.0.1 and OpenMP trunk.
This solution was also discussed in the OpenMP-dev mailing list.
Patch provided by Simone Atzeni
Differential Revision: https://reviews.llvm.org/D48888
llvm-svn: 336327
Joachim Protze [Thu, 5 Jul 2018 09:14:01 +0000 (09:14 +0000)]
[OMPT] Add synchronization to threads_nested.c testcase
The testcase potentially fails when a thread is reused.
The added synchronization makes sure this does not happen.
Patch provided by Simon Convent
Differential Revision: https://reviews.llvm.org/D48932
llvm-svn: 336326
Ivan A. Kosarev [Thu, 5 Jul 2018 08:59:49 +0000 (08:59 +0000)]
[NEON] Fix combining of vldx_dup intrinsics with updating of base addresses
Resolves:
Unsupported ARM Neon intrinsics in Target-specific DAG combine
function for VLDDUP
https://bugs.llvm.org/show_bug.cgi?id=38031
Related diff: D48439
Differential Revision: https://reviews.llvm.org/D48920
llvm-svn: 336325
Sander de Smalen [Thu, 5 Jul 2018 08:52:03 +0000 (08:52 +0000)]
Reverting r336322 for now, as it causes an assert failure
in TableGen, for which there is already a patch in Phabricator
(D48937) that needs to be committed first.
llvm-svn: 336324
Mikael Holmen [Thu, 5 Jul 2018 08:42:16 +0000 (08:42 +0000)]
Partial revert of "NFC - Various typo fixes in tests"
This partially reverts r336268 since it causes buildbot failures.
Added FIXME at the places where the CHECKs are misspelled.
llvm-svn: 336323
Sander de Smalen [Thu, 5 Jul 2018 08:38:30 +0000 (08:38 +0000)]
[AArch64][SVE] Asm: Support for predicated FP rounding instructions.
This patch also adds instructions for predicated FP square-root and
reciprocal exponent.
The added instructions are:
- FRINTI Round to integral value (current FPCR rounding mode)
- FRINTX Round to integral value (current FPCR rounding mode, signalling inexact)
- FRINTA Round to integral value (to nearest, with ties away from zero)
- FRINTN Round to integral value (to nearest, with ties to even)
- FRINTZ Round to integral value (toward zero)
- FRINTM Round to integral value (toward minus Infinity)
- FRINTP Round to integral value (toward plus Infinity)
- FSQRT Floating-point square root
- FRECPX Floating-point reciprocal exponent
llvm-svn: 336322
Eric Liu [Thu, 5 Jul 2018 08:29:33 +0000 (08:29 +0000)]
[clangd] Log sema completion context kind and query scopes. NFC
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D48724
llvm-svn: 336321
Sam McCall [Thu, 5 Jul 2018 08:26:53 +0000 (08:26 +0000)]
Revert "[clangd] FileDistance: temporarily disable in CodeComplete, it's behaving badly"
The bad behavior seems to have been fixed by r336242 after all.
I thought it was persisting, but that was a different bug fixed by D48940
llvm-svn: 336320
Sjoerd Meijer [Thu, 5 Jul 2018 08:21:40 +0000 (08:21 +0000)]
[ARM] ParallelDSP: only support i16 loads for now
We were miscompiling i8 loads, so reject them as unsupported narrow operations
for now.
Differential Revision: https://reviews.llvm.org/D48944
llvm-svn: 336319
Eric Liu [Thu, 5 Jul 2018 08:14:04 +0000 (08:14 +0000)]
[clangd] Treat class constructor as in the same scope as the class in ranking.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D48933
llvm-svn: 336318
Sander de Smalen [Thu, 5 Jul 2018 07:54:10 +0000 (07:54 +0000)]
[AArch64][SVE] Asm: Support for signed/unsigned MIN/MAX/ABD
This patch implements the following varieties:
- Unpredicated signed max, e.g. smax z0.h, z1.h, #-128
- Unpredicated signed min, e.g. smin z0.h, z1.h, #-128
- Unpredicated unsigned max, e.g. umax z0.h, z1.h, #255
- Unpredicated unsigned min, e.g. umin z0.h, z1.h, #255
- Predicated signed max, e.g. smax z0.h, p0/m, z0.h, z1.h
- Predicated signed min, e.g. smin z0.h, p0/m, z0.h, z1.h
- Predicated signed abd, e.g. sabd z0.h, p0/m, z0.h, z1.h
- Predicated unsigned max, e.g. umax z0.h, p0/m, z0.h, z1.h
- Predicated unsigned min, e.g. umin z0.h, p0/m, z0.h, z1.h
- Predicated unsigned abd, e.g. uabd z0.h, p0/m, z0.h, z1.h
llvm-svn: 336317
Lei Huang [Thu, 5 Jul 2018 07:46:01 +0000 (07:46 +0000)]
[Power9] Optimize codgen for conversions of int to float128
Optimize code sequences for integer conversion to fp128 when the integer is a result of:
* float->int
* float->long
* double->int
* double->long
Differential Revision: https://reviews.llvm.org/D48429
llvm-svn: 336316
Craig Topper [Thu, 5 Jul 2018 06:52:55 +0000 (06:52 +0000)]
[X86] Remove X86 specific scalar FMA intrinsics and upgrade to tart independent FMA and extractelement/insertelement.
llvm-svn: 336315
Lei Huang [Thu, 5 Jul 2018 06:51:38 +0000 (06:51 +0000)]
[Power9][NFC] add back-end tests for passing homogeneous fp128 aggregates by value
Tests to verify that we are passing fp128 via VSX registers as per ABI.
These are related to clang commit rL336308.
Differential Revision: https://reviews.llvm.org/D48310
llvm-svn: 336314
Lei Huang [Thu, 5 Jul 2018 06:29:28 +0000 (06:29 +0000)]
[Power9] Add tests for passing float128 in VSX reg for non-homogenous aggregates
Add missing testcase for rL336310
llvm-svn: 336313
Serge Pavlov [Thu, 5 Jul 2018 06:24:29 +0000 (06:24 +0000)]
[demangler] Avoid alignment warning
The alignment specified by a constant for the field
`BumpPointerAllocator::InitialBuffer` exceeded the alignment
guaranteed by `malloc` and `new` on Windows. This change set
the alignment value to that of `long double`, which is defined
by the used platform.
It fixes https://bugs.llvm.org/show_bug.cgi?id=37944.
Differential Revision: https://reviews.llvm.org/D48889
llvm-svn: 336312
Serge Pavlov [Thu, 5 Jul 2018 06:22:39 +0000 (06:22 +0000)]
[demangler] Avoid alignment warning
The alignment specified by a constant for the field
`BumpPointerAllocator::InitialBuffer` exceeded the alignment
guaranteed by `malloc` and `new` on Windows. This change set
the alignment value to that of `long double`, which is defined
by the used platform.
It fixes https://bugs.llvm.org/show_bug.cgi?id=37944.
Differential Revision: https://reviews.llvm.org/D48889
llvm-svn: 336311
Lei Huang [Thu, 5 Jul 2018 06:21:37 +0000 (06:21 +0000)]
[Power9] Ensure float128 in non-homogenous aggregates are passed via VSX reg
Non-homogenous aggregates are passed in consecutive GPRs, in GPRs and in memory,
or in memory. This patch ensures that float128 members of non-homogenous
aggregates are passed via VSX registers.
This is done via custom lowering a bitcast of a build_pari(i64,i64) to float128
to a new PPCISD node, BUILD_FP128.
Differential Revision: https://reviews.llvm.org/D48308
llvm-svn: 336310
Sam McCall [Thu, 5 Jul 2018 06:20:41 +0000 (06:20 +0000)]
[clangd] Track origins of symbols (various indexes, Sema).
Summary: Surface it in the completion items C++ API, and when a flag is set.
Reviewers: ioeric
Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D48938
llvm-svn: 336309
Lei Huang [Thu, 5 Jul 2018 04:32:01 +0000 (04:32 +0000)]
[Power9] Update fp128 as a valid homogenous aggregate base type
Update clang to treat fp128 as a valid base type for homogeneous aggregate
passing and returning.
Differential Revision: https://reviews.llvm.org/D48044
llvm-svn: 336308
Lei Huang [Thu, 5 Jul 2018 04:18:37 +0000 (04:18 +0000)]
[Power9]Legalize and emit code for quad-precision convert from single-precision
Legalize and emit code for quad-precision floating point operation conversion of
single-precision value to quad-precision.
Differential Revision: https://reviews.llvm.org/D47569
llvm-svn: 336307
Lei Huang [Thu, 5 Jul 2018 04:10:15 +0000 (04:10 +0000)]
[Power9] Implement float128 parameter passing and return values
This patch enable parameter passing and return by value for float128 types.
Passing aggregate/union which contain float128 members will be submitted in
subsequent patches.
Differential Revision: https://reviews.llvm.org/D47552
llvm-svn: 336306
Craig Topper [Thu, 5 Jul 2018 03:01:29 +0000 (03:01 +0000)]
[X86] Remove some isel patterns for X86ISD::SELECTS that specifically looked for the v1i1 mask to have come from a scalar_to_vector from GR8.
We have patterns for SELECTS that top at v1i1 and we have a pattern for (v1i1 (scalar_to_vector GR8)). The patterns being removed here do the same thing as the two other patterns combined so there is no need for them.
llvm-svn: 336305
Craig Topper [Thu, 5 Jul 2018 02:52:56 +0000 (02:52 +0000)]
[X86] Add support for combining FMSUB/FNMADD/FNMSUB ISD nodes with an fneg input.
Previously we could only negate the FMADD opcodes. This used to be mostly ok when we lowered FMA intrinsics during lowering. But with the move to llvm.fma from target specific intrinsics, we can combine (fneg (fma)) to (fmsub) earlier. So if we start with (fneg (fma (fneg))) we would get stuck at (fmsub (fneg)).
This patch fixes that so we can also combine things like (fmsub (fneg)).
llvm-svn: 336304
Craig Topper [Thu, 5 Jul 2018 02:52:54 +0000 (02:52 +0000)]
[X86] Remove some of the packed FMA3 intrinsics since we no longer use them in clang.
There's a regression in here due to inability to combine fneg inputs of X86ISD::FMSUB/FNMSUB/FNMADD nodes.
More removals to come, but I wanted to stop and fix the regression that showed up in this first.
llvm-svn: 336303
Aaron Ballman [Thu, 5 Jul 2018 01:35:49 +0000 (01:35 +0000)]
Adding some documentation changes that were missed in r336301.
llvm-svn: 336302
Aaron Ballman [Thu, 5 Jul 2018 01:16:31 +0000 (01:16 +0000)]
Add the cert-msc51-cpp and cert-msc32-c checks.
These checks flag use of random number generators with poor seeds that would possibly lead to degraded random number generation.
Patch by Borsik Gábor
llvm-svn: 336301
Fangrui Song [Thu, 5 Jul 2018 00:33:03 +0000 (00:33 +0000)]
[Index] Remove unused index::IndexDataConsumer::_anchor()
It was supposed to serve as a key function, but it was invalid as it was not the first out-of-line non-pure virtual function.
llvm-svn: 336300
Lei Huang [Wed, 4 Jul 2018 21:59:16 +0000 (21:59 +0000)]
[Power9]Legalize and emit code for round & convert quad-precision values
Legalize and emit code for round & convert float128 to double precision and
single precision.
Differential Revision: https://reviews.llvm.org/D46997
llvm-svn: 336299
Aaron Ballman [Wed, 4 Jul 2018 21:22:28 +0000 (21:22 +0000)]
Silence an MSVC C4189 warning about a local variable being initialized but not used; NFC.
llvm-svn: 336298
Eric Fiselier [Wed, 4 Jul 2018 20:16:05 +0000 (20:16 +0000)]
Remove old workaround that is no longer needed
llvm-svn: 336297
Vladimir Stefanovic [Wed, 4 Jul 2018 19:26:31 +0000 (19:26 +0000)]
[mips] Warn when crc, ginv, virt flags are used with too old revision
CRC and GINV ASE require revision 6, Virtualization requires revision 5.
Print a warning when revision is older than required.
Differential Revision: https://reviews.llvm.org/D48843
llvm-svn: 336296
Stefan Pintilie [Wed, 4 Jul 2018 18:54:25 +0000 (18:54 +0000)]
[PowerPC] Replace the Post RA List Scheduler with the Machine Scheduler
We want to run the Machine Scheduler instead of the List Scheduler after RA.
Checked with a performance run on a Power 9 machine with SPEC 2006 and while
some benchmarks improved and others degraded the geomean was slightly improved
with the Machine Scheduler.
Differential Revision: https://reviews.llvm.org/D45265
llvm-svn: 336295
Jakub Kuderski [Wed, 4 Jul 2018 18:37:15 +0000 (18:37 +0000)]
[Dominators] Add DomTreeUpdater constructor from DT* and PDT*
Summary:
Previously, if a function accepts an optional DT pointer,
```
void Foo (.., DominatorTree * DT = nullptr) {
...
if(DT)
DomTreeUpdater(*DT, ...).insertEdge(A, B);
if(DT){
DomTreeUpdater DTU(*DT, ...);
... // Construct the update vector and applyUpdates
}
...
if(DT){
DomTreeUpdater DTU(*DT, ...);
... // Construct the update vector and applyUpdates
}
}
```
After this patch, it can be simplified as
```
void Foo (.., DominatorTree * DT = nullptr) {
DomTreeUpdater DTU(DT, ...);
...
DTU.insertEdge(A, B);
if(DT){
... // Construct the update vector and applyUpdates
}
...
if(DT){
... // Construct the update vector and applyUpdates
}
}
```
Patch by Chijun Sima <simachijun@gmail.com>.
Reviewers: kuhar, brzycki, dmgreen
Reviewed By: kuhar
Author: NutshellySima
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D48923
llvm-svn: 336294
Sanjay Patel [Wed, 4 Jul 2018 17:44:04 +0000 (17:44 +0000)]
[InstCombine] allow narrowing of min/max/abs
We have bailout hacks based on min/max in various places in instcombine
that shouldn't be necessary. The affected test was added for:
D48930
...which is a consequence of the improvement in:
D48584 (https://reviews.llvm.org/rL336172)
I'm assuming the visitTrunc bailout in this patch was added specifically
to avoid a change from SimplifyDemandedBits, so I'm just moving that
below the EvaluateInDifferentType optimization. A narrow min/max is still
a min/max.
llvm-svn: 336293
Roman Lebedev [Wed, 4 Jul 2018 17:32:44 +0000 (17:32 +0000)]
[X86][BtVer2][MCA][NFC] Add CMPEQ dependency-breaking one-idioms tests
Summary: As per `Agner's Microarchitecture doc
(21.8 AMD Bobcat and Jaguar pipeline - Dependency-breaking instructions)`,
these, like zero-idioms, are dependency-breaking,
although they produce ones and still consume resources.
FIXME: as discussed in D48877, llvm-mca handling is broken for these.
Reviewers: andreadb
Reviewed By: andreadb
Subscribers: gbedwell, RKSimon, llvm-commits
Differential Revision: https://reviews.llvm.org/D48876
llvm-svn: 336292
Simon Pilgrim [Wed, 4 Jul 2018 17:24:05 +0000 (17:24 +0000)]
Fix some irregular whitespace/indentation. NFCI.
llvm-svn: 336291
Jonas Devlieghere [Wed, 4 Jul 2018 17:14:52 +0000 (17:14 +0000)]
[lit] Don't require semicolon separator
This patch removes the requirement for a semicolon as a separator when
passing arguments to lit. It relies on the shlex module that is part of
Python to do simple lexical analysis, similar to what happens in a Unix
shell.
llvm-svn: 336290
Sanjay Patel [Wed, 4 Jul 2018 16:56:35 +0000 (16:56 +0000)]
[InstCombine] add value names to test; NFC
That makes it easier to mix and match lines into other tests.
llvm-svn: 336289
Siddharth Bhat [Wed, 4 Jul 2018 16:51:27 +0000 (16:51 +0000)]
[PPCGCodeGen] Change printf to outs() to prevent garbled output. [NFC]
Summary:
It appears that llvm uses unbuffered C++ streams. So, we should not
mix C and C++ stream operations, because that will give us mixed
up output.
Reviewers: efriedma, jdoerfert, Meinersbur, gareevroman, sebpop, zinob, huihuiz, pollydev, grosser, singam-sanjay, philip.pfaffe
Reviewed By: philip.pfaffe
Subscribers: nemanjai, kbarton
Differential Revision: https://reviews.llvm.org/D40126
llvm-svn: 336288
Dave Lee [Wed, 4 Jul 2018 16:11:43 +0000 (16:11 +0000)]
Fix and simplify lldb.command decorator
Summary:
This change fixes one issue with `lldb.command`, and also reduces the implementation.
The fix: a command function's docstring was not shown when running `help <command_name>`. This is because the docstring attached the source function is not propagated to the decorated function (`f.__call__`). By returning the original function, the docstring will be properly displayed by `help`.
Also with this change, the command name is assumed to be the function's name, but can still be explicitly defined as previously.
Additionally, the implementation was updated to:
* Remove inner class
* Remove use of `inspect` module
* Remove `*args` and `**kwargs`
Reviewers: clayborg
Reviewed By: clayborg
Subscribers: keith, xiaobai, lldb-commits
Differential Revision: https://reviews.llvm.org/D48658
llvm-svn: 336287
Volodymyr Turanskyy [Wed, 4 Jul 2018 16:11:15 +0000 (16:11 +0000)]
[ARM] [Assembler] Support negative immediates: cover few missing cases
Support for negative immediates was implemented in
https://reviews.llvm.org/rL298380, however few instruction options were missing.
This change adds negative immediates support and respective tests
for the following:
ADD
ADDS
ADDS.W
AND.W
ANDS
BIC.W
BICS
BICS.W
SUB
SUBS
SUBS.W
Differential Revision: https://reviews.llvm.org/D48649
llvm-svn: 336286
Yvan Roux [Wed, 4 Jul 2018 15:37:08 +0000 (15:37 +0000)]
[MachineOutliner] Fix typo in getOutliningCandidateInfo function name
getOutlininingCandidateInfo -> getOutliningCandidateInfo
Differential Revision: https://reviews.llvm.org/D48867
llvm-svn: 336285
Paul Semel [Wed, 4 Jul 2018 15:25:03 +0000 (15:25 +0000)]
[llvm-objdump] Add --file-headers (-f) option
llvm-svn: 336284
Alexander Kornienko [Wed, 4 Jul 2018 15:19:49 +0000 (15:19 +0000)]
[clang-tidy] Fix http://llvm.org/PR38055
llvm-svn: 336283
George Rimar [Wed, 4 Jul 2018 15:05:21 +0000 (15:05 +0000)]
[ELF] - Simplify. NFC.
Currently, there are only OutputSection and SymbolAssignment
commands possible at the first level under SECTIONS tag.
So, shouldSkip() contained dead "return true".
Patch simplifies the code.
llvm-svn: 336282
Tobias Grosser [Wed, 4 Jul 2018 14:53:36 +0000 (14:53 +0000)]
ScopInfo: simplify equivalence classes before storing them [NFCI]
This change has no impact on upstream Polly directly, but reduces output
noise for some internal isl versions we are testing. In general, storing
simpler and more canonical output is a good idea. Hence, it seems useful
to upstream this change.
llvm-svn: 336281
George Rimar [Wed, 4 Jul 2018 14:47:19 +0000 (14:47 +0000)]
[ELF] - Extend edata-etext.s test case.
We did not have a test that would test that
_etext address is equal to etext, _end == end and _edata == edata.
Because of that, the following line was never
executed when running our tests:
https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L928
Patch fixes that.
llvm-svn: 336280
Jonas Devlieghere [Wed, 4 Jul 2018 14:38:21 +0000 (14:38 +0000)]
[CMake] Remove redundant path component
Fixes spurious path component introduced in r336278. The variable is
cached so might require you to re-run CMake.
llvm-svn: 336279
Jonas Devlieghere [Wed, 4 Jul 2018 14:34:32 +0000 (14:34 +0000)]
[CMake] Use LLVM_RUNTIME_OUTPUT_INTDIR for LLDB exectuable
Apparently there's a difference between using LLVM_RUNTIME_OUTPUT_INTDIR
and LLVM_BINARY_DIR. The former will point to the current binary
directory (i.e. that where lldb is built) while the former will always
point to LLVM's. This was causing trouble for the swift build but should
be a transparent for upstream lldb.
llvm-svn: 336278
Simon Pilgrim [Wed, 4 Jul 2018 14:20:58 +0000 (14:20 +0000)]
[X86][SSE] Add v16i16 shl x,c -> pmullw test
llvm-svn: 336277
Andrew Ng [Wed, 4 Jul 2018 14:17:10 +0000 (14:17 +0000)]
[ThinLTO] Update ThinLTO cache file atimes when on Windows
ThinLTO cache file access times are used for expiration based pruning
and since Vista, file access times are not updated by Windows by
default:
https://blogs.technet.microsoft.com/filecab/2006/11/07/disabling-last-access-time-in-windows-vista-to-improve-ntfs-performance
This means on Windows, cache files are currently being pruned from
creation time. This change manually updates cache files that are
accessed by ThinLTO, when on Windows.
Patch by Owen Reynolds.
Differential Revision: https://reviews.llvm.org/D47266
llvm-svn: 336276
Rafael Stahl [Wed, 4 Jul 2018 14:12:58 +0000 (14:12 +0000)]
[analyzer][ctu] fix unsortable diagnostics
Summary: In the provided test case the PathDiagnostic compare function was not able to find a difference.
Reviewers: xazax.hun, NoQ, dcoughlin, george.karpenkov
Reviewed By: george.karpenkov
Subscribers: a_sidorin, szepet, rnkovacs, a.sidorin, mikhail.ramalho, cfe-commits
Differential Revision: https://reviews.llvm.org/D48474
llvm-svn: 336275
Sander de Smalen [Wed, 4 Jul 2018 14:05:33 +0000 (14:05 +0000)]
[AArch64][SVE] Asm: Support for reversed subtract (SUBR) instruction.
This patch adds both a vector and an immediate form, e.g.
- Vector form:
subr z0.h, p0/m, z0.h, z1.h
subtract active elements of z0 from z1, and store the result in z0.
- Immediate form:
subr z0.h, z0.h, #255
subtract elements of z0, and store the result in z0.
llvm-svn: 336274
George Rimar [Wed, 4 Jul 2018 14:04:59 +0000 (14:04 +0000)]
[ELF] - Cover handling of DW_AT_external with test.
The following check was uncovered with tests:
https://github.com/llvm-mirror/lld/blob/master/ELF/InputFiles.cpp#L159
Patch adds test to cover it.
llvm-svn: 336273
Jonas Devlieghere [Wed, 4 Jul 2018 13:59:25 +0000 (13:59 +0000)]
[CMake] Move some variables around
This improves consistency by creating a CMake variable for the dsymutil
path. The motivation is that for Swift, the dsymutil binary and the lldb
binary live in different directories and we need an option to configure
this from the build script.
llvm-svn: 336272
Simon Pilgrim [Wed, 4 Jul 2018 13:58:13 +0000 (13:58 +0000)]
[X86][SSE] Add SSE2 target to some shift tests
Show the difference in behaviour cf SSE41 (no PMULLD, PBLENDW etc.)
Raised by D48936
llvm-svn: 336271
George Rimar [Wed, 4 Jul 2018 13:36:45 +0000 (13:36 +0000)]
[ELF] - LTO: add test for createEmptyIndex.
We have a following comment for createEmptyIndex caller code:
// If LazyObjFile has not been added to link, emit empty index files.
// This is needed because this is what GNU gold plugin does and we have a
// distributed build system that depends on that behavior.
Though createEmptyIndex() itself
(https://github.com/llvm-mirror/lld/blob/master/ELF/LTO.cpp#L202)
is never called in our test cases.
Patch adds a test.
llvm-svn: 336270
Rafael Stahl [Wed, 4 Jul 2018 13:34:05 +0000 (13:34 +0000)]
[ASTImporter] import macro source locations
Summary: Implement full import of macro expansion info with spelling and expansion locations.
Reviewers: a.sidorin, klimek, martong, balazske, xazax.hun
Reviewed By: martong
Subscribers: thakis, xazax.hun, balazske, rnkovacs, cfe-commits
Differential Revision: https://reviews.llvm.org/D47698
llvm-svn: 336269
Gabor Buella [Wed, 4 Jul 2018 13:28:39 +0000 (13:28 +0000)]
NFC - Various typo fixes in tests
llvm-svn: 336268
Sander de Smalen [Wed, 4 Jul 2018 12:58:46 +0000 (12:58 +0000)]
[AArch64][SVE] Asm: Support for instructions to set/read FFR.
Includes instructions to read the First-Faulting Register (FFR):
- RDFFR (unpredicated)
rdffr p0.b
- RDFFR (predicated)
rdffr p0.b, p0/z
- RDFFRS (predicated, sets condition flags)
rdffr p0.b, p0/z
Includes instructions to set/write the FFR:
- SETFFR (no arguments, sets the FFR to all true)
setffr
- WRFFR (unpredicated)
wrffr p0.b
llvm-svn: 336267
Clement Courbet [Wed, 4 Jul 2018 12:31:00 +0000 (12:31 +0000)]
[llvm-exegesis] Remove dead comment.
llvm-svn: 336266
Sander de Smalen [Wed, 4 Jul 2018 12:13:17 +0000 (12:13 +0000)]
[AArch64][SVE] Asm: Support for FP conversion instructions.
The variants added are:
- fcvt (FP convert precision)
- scvtf (signed int -> FP)
- ucvtf (unsigned int -> FP)
- fcvtzs (FP -> signed int (round to zero))
- fcvtzu (FP -> unsigned int (round to zero))
For example:
fcvt z0.h, p0/m, z0.s (single- to half-precision FP)
scvtf z0.h, p0/m, z0.s (32-bit int to half-precision FP)
ucvtf z0.h, p0/m, z0.s (32-bit unsigned int to half-precision FP)
fcvtzs z0.s, p0/m, z0.h (half-precision FP to 32-bit int)
fcvtzu z0.s, p0/m, z0.h (half-precision FP to 32-bit unsigned int)
llvm-svn: 336265
Gabor Buella [Wed, 4 Jul 2018 11:29:21 +0000 (11:29 +0000)]
NFC - Fix type in builtins-ppc-p9vector.c test
llvm-svn: 336264
Gabor Buella [Wed, 4 Jul 2018 11:26:09 +0000 (11:26 +0000)]
NFC - Fix typo in test/CodeGenObjC/gnustep2-class.m
llvm-svn: 336263
Gabor Buella [Wed, 4 Jul 2018 11:21:44 +0000 (11:21 +0000)]
NFC - Fix typo in test/Layout/itanium-pack-and-align.cpp
llvm-svn: 336262
Eric Fiselier [Wed, 4 Jul 2018 11:14:18 +0000 (11:14 +0000)]
Add missing include for size_t
llvm-svn: 336261
Eric Liu [Wed, 4 Jul 2018 10:39:48 +0000 (10:39 +0000)]
[clangd] only ignore collected symbols if TU has uncompilable errors.
llvm-svn: 336260
George Rimar [Wed, 4 Jul 2018 10:38:12 +0000 (10:38 +0000)]
[ELF] - Add a test case for relocation pointing to deduplicated COMDAT.
ELF spec doesn't allow a relocation to point to a deduplicated
COMDAT section. Unfortunately this happens in practice (e.g. .eh_frame)
We have a code in MarkLive.cpp for that and it was uncovered by any test case:
https://github.com/llvm-mirror/lld/blob/master/ELF/MarkLive.cpp#L199
Patch adds a test.
llvm-svn: 336259
Max Kazantsev [Wed, 4 Jul 2018 10:32:02 +0000 (10:32 +0000)]
[NFC] Add test that shows that InstCombine can do better
llvm-svn: 336258
Kirill Bobyrev [Wed, 4 Jul 2018 10:18:03 +0000 (10:18 +0000)]
[clang-tools-extra] Cleanup documentation routine
The following issues are resolved:
* Doxygen didn't generate documentation for a bunch of existing tools
due to the absence of their directories in the doxygen configuration
file. This patch adds all relevant directories to the appropriate list.
* clang-tools-extra/docs/Doxyfile seems to be unused and irrelevant,
doxygen.cfg.in is passed to the CMake's Doxygen invocation, hence
Doxyfile is removed.
The validity of proposed changes was manually checked by building
doxygen-clang-tools and making sure that clangd and other tools are
present in Doxygen-generated docs of clang-tools-extra.
Reviewers: ioeric
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D47537
llvm-svn: 336257
Anastasis Grammenos [Wed, 4 Jul 2018 10:16:55 +0000 (10:16 +0000)]
[DebugInfo][LoopVectorize] Preserve DL in generated phi instruction
When creating `phi` instructions to resume at the scalar part of the loop,
copy the DebugLoc from the original phi over to the new one.
Differential Revision: https://reviews.llvm.org/D48769
llvm-svn: 336256
Eric Liu [Wed, 4 Jul 2018 10:01:18 +0000 (10:01 +0000)]
[SemaCodeComplete] Make sure visited contexts are passed to completion results handler.
Reviewers: ilya-biryukov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D48917
llvm-svn: 336255
Anastasis Grammenos [Wed, 4 Jul 2018 09:55:46 +0000 (09:55 +0000)]
[DebugInfo][InstCombine] Preserve DI after combining zext
When zext is EvaluatedInDifferentType, InstCombine
drops the dbg.value intrinsic. This patch tries to
preserve said DI, by inserting the zext's old DI in the
resulting instruction. (Only for integer type for now)
Differential Revision: https://reviews.llvm.org/D48331
llvm-svn: 336254
Eric Liu [Wed, 4 Jul 2018 09:54:23 +0000 (09:54 +0000)]
[clangd] Cleanup unittest: URIs. NFC.
llvm-svn: 336253
Eric Liu [Wed, 4 Jul 2018 09:43:35 +0000 (09:43 +0000)]
[clangd] Avoid collecting symbols from broken TUs in global-symbol-builder.
Summary:
For example, template parameter might not be resolved in a broken TU,
which can result in wrong USR/SymbolID.
Reviewers: ilya-biryukov
Subscribers: MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D48881
llvm-svn: 336252
Siddharth Bhat [Wed, 4 Jul 2018 09:40:55 +0000 (09:40 +0000)]
[Polly-ACC] Add isl_space.h to gpu_tree.c
Summary:
This patch adds <isl_space.h> to gpu_tree.c. This prevents a segfault
when allocating a new isl_space in the function create_sync_domain(), as
the compiler now knows that the return type is a pointer instead of
assuming the function returns an int.
This has been updated in upstream PPCG, so we should bump up our PPCG
version.
Initially discovered by Philip Pfaffe in Polly.
Reviewers: grosser, bollu, philip.pfaffe
Reviewed By: bollu
Subscribers: nemanjai, kbarton, llvm-commits
Differential Revision: https://reviews.llvm.org/D48883
Contributed-by: Alain Denzler <alaindenzler@gmail.com>
llvm-svn: 336251
Simon Pilgrim [Wed, 4 Jul 2018 09:12:48 +0000 (09:12 +0000)]
[X86][SSE] Blend any v8i16/v4i32 shift with 2 shift unique values (REAPPLIED)
We were only doing this for basic blends, despite shuffle lowering now being good enough to handle more complex blends. This means that the two v8i16 splat shifts are performed in parallel instead of serially as the general shift case.
Reapplied with a fixed (extra null tests) version of rL336113 after reversion in rL336189 - extra test case added at rL336247.
llvm-svn: 336250
Eric Liu [Wed, 4 Jul 2018 09:08:40 +0000 (09:08 +0000)]
Try to fix FileDistance test on windows.
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11510/steps/ninja%20check%201/logs/FAIL%3A%20Extra%20Tools%20Unit%20Tests%3A%3AFileDistanceTests.URI
llvm-svn: 336249
Sam McCall [Wed, 4 Jul 2018 09:01:04 +0000 (09:01 +0000)]
[clangd] FileDistance: temporarily disable in CodeComplete, it's behaving badly
llvm-svn: 336248
Simon Pilgrim [Wed, 4 Jul 2018 08:55:23 +0000 (08:55 +0000)]
[X86][SSE] Add reduced crash test case for r336113 - [X86][SSE] Blend any v8i16/v4i32 shift with 2 shift unique values
The patch was reverted at r336189 due to crashes
llvm-svn: 336247
Sam McCall [Wed, 4 Jul 2018 08:52:13 +0000 (08:52 +0000)]
[clangd] FileDistance: missing constexpr
llvm-svn: 336246
Sander de Smalen [Wed, 4 Jul 2018 08:50:49 +0000 (08:50 +0000)]
[AArch64][SVE] Asm: Support for SVE condition code aliases
SVE overloads the AArch64 PSTATE condition flags and introduces
a set of condition code aliases for the assembler. The
details are described in section 2.2 of the architecture
reference manual supplement for SVE.
In short:
SVE alias => AArch64 name
--------------------------
NONE => EQ
ANY => NE
NLAST => HS
LAST => LO
FIRST => MI
NFRST => PL
PMORE => HI
PLAST => LS
TCONT => GE
TSTOP => LT
Reviewers: rengolin, fhahn, SjoerdMeijer, samparker, javed.absar
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D48869
llvm-svn: 336245
Ilya Biryukov [Wed, 4 Jul 2018 08:50:12 +0000 (08:50 +0000)]
[Sema] Fix crash in getConstructorName.
Summary:
Can happen when getConstructorName is called on invalid decls,
specifically the ones that do not have the injected class name.
Reviewers: bkramer, rsmith
Reviewed By: rsmith
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D48880
llvm-svn: 336244
Gabor Buella [Wed, 4 Jul 2018 08:32:02 +0000 (08:32 +0000)]
NFC - typo fix in test/CodeGen/avx512f-builtins.c
llvm-svn: 336243
Sam McCall [Wed, 4 Jul 2018 08:27:28 +0000 (08:27 +0000)]
[clangd] FileDistance: don't add duplicate edges
llvm-svn: 336242
Max Kazantsev [Wed, 4 Jul 2018 08:01:26 +0000 (08:01 +0000)]
[ImplicitNullChecks] Check for rewrite of register used in 'test' instruction
The following code pattern:
mov %rax, %rcx
test %rax, %rax
%rax = ....
je throw_npe
mov(%rcx), %r9
mov(%rax), %r10
gets transformed into the following incorrect code after implicit null check pass:
mov %rax, %rcx
%rax = ....
faulting_load_op("movl (%rax), %r10", throw_npe)
mov(%rcx), %r9
For implicit null check pass, if the register that is checked for null value (ie, the register used in the 'test' instruction) is written into before the condition jump, we should avoid doing the optimization.
Patch by Surya Kumari Jangala!
Differential Revision: https://reviews.llvm.org/D48627
Reviewed By: skatkov
llvm-svn: 336241
Richard Smith [Wed, 4 Jul 2018 02:25:38 +0000 (02:25 +0000)]
PR33924: merge local declarations that have linkage of some kind within
merged function definitions; also merge functions with deduced return
types.
This seems like two independent fixes, but unfortunately they are hard
to separate because it's challenging to reliably test either one of them
without also testing the other.
A complication arises with deduced return type support: we need the type
of the function in order to know how to merge it, but we can't load the
actual type of the function because it might reference an entity
declared within the function (and we need to have already merged the
function to correctly merge that entity, which we would need to do to
determine if the function types match). So we instead compare the
declared function type when merging functions, and defer loading the
actual type of a function with a deduced type until we've finished
loading and merging the function.
This reverts r336175, reinstating r336021, with one change (for PR38015):
we look at the TypeSourceInfo of the first-so-far declaration of each
function when considering whether to merge two functions. This works
around a problem where the calling convention in the TypeSourceInfo for
subsequent redeclarations may not match if it was implicitly adjusted.
llvm-svn: 336240
Michael Kruse [Wed, 4 Jul 2018 01:37:11 +0000 (01:37 +0000)]
[Sema] Consider all format_arg attributes.
If a function has multiple format_arg attributes, clang only considers
the first it finds (because AttributeLists are in reverse order, not
necessarily the textually first) and ignores all others.
Loop over all FormatArgAttr to print warnings for all declared
format_arg attributes.
For instance, libintl's ngettext (select plural or singular version of
format string) has two __format_arg__ attributes.
Differential Revision: https://reviews.llvm.org/D48734
llvm-svn: 336239
George Karpenkov [Wed, 4 Jul 2018 00:37:45 +0000 (00:37 +0000)]
[libFuzzer] [NFC] Inline static variable to avoid the linker warning.
Differential Revision: https://reviews.llvm.org/D48650
llvm-svn: 336238
Fangrui Song [Tue, 3 Jul 2018 23:31:19 +0000 (23:31 +0000)]
[Support] Remove SaveOr which is no longer used
llvm-svn: 336237
Jacques Pienaar [Tue, 3 Jul 2018 22:57:51 +0000 (22:57 +0000)]
[lanai] Handle atomic load of i8 like regular load.
Loads and stores less than 64-bits are already atomic, this adds support for a special case thereof. This needs to be expanded.
llvm-svn: 336236
Alexander Polyakov [Tue, 3 Jul 2018 22:51:01 +0000 (22:51 +0000)]
Ammend "Fix MSVC2015 compilation failure after r336206 patch".
llvm-svn: 336235
Kostya Serebryany [Tue, 3 Jul 2018 22:33:09 +0000 (22:33 +0000)]
[libFuzzer] add one more value profile metric, under a flag (experimental)
llvm-svn: 336234
Erik Pilkington [Tue, 3 Jul 2018 22:15:36 +0000 (22:15 +0000)]
[Sema] Discarded statment should be an evaluatable context.
The constexpr evaluator was erroring out because these templates weren't
defined. Despite being used in a discarded statement, we still need to constexpr
evaluate them, which means that we need to instantiate them. Fixes PR37585.
Differential revision: https://reviews.llvm.org/D48322
llvm-svn: 336233
Fangrui Song [Tue, 3 Jul 2018 21:40:03 +0000 (21:40 +0000)]
[X86][AsmParser] Fix inconsistent declaration parameter name in r336218
llvm-svn: 336232
Richard Smith [Tue, 3 Jul 2018 21:34:13 +0000 (21:34 +0000)]
Factor out Clang's desired 8MB stack size constant from the various
places we hardcode it.
llvm-svn: 336231
Kostya Serebryany [Tue, 3 Jul 2018 21:22:44 +0000 (21:22 +0000)]
[libFuzzer] remove stale code, as suggested in https://reviews.llvm.org/D48800
llvm-svn: 336230
Kostya Serebryany [Tue, 3 Jul 2018 21:17:55 +0000 (21:17 +0000)]
[libFuzzer] add a tiny and surprisingly hard puzzle
llvm-svn: 336229
Benjamin Kramer [Tue, 3 Jul 2018 20:59:33 +0000 (20:59 +0000)]
[clangd] Replace UniqueFunction with llvm::unique_function.
One implementation of this ought to be enough for everyone.
llvm-svn: 336228