Commit Graph

317001 Commits

Author SHA1 Message Date
Richard Smith 32591ca4e2 Fix test to put its outputs into the temp directory.
llvm-svn: 361297
2019-05-21 19:41:19 +00:00
Alexandre Ganea 047e65db77 [DebugInfo] Don't emit checksums when compiling a preprocessed CPP
Fixes PR41215

Differential Revision: https://reviews.llvm.org/D60283

llvm-svn: 361296
2019-05-21 19:40:28 +00:00
Alexandre Ganea b07176666b Fix LLDB warnings when compiling with Clang 8.0
Differential Revision: https://reviews.llvm.org/D62021

llvm-svn: 361295
2019-05-21 19:35:06 +00:00
Gheorghe-Teodor Bercea 9e9c918259 [OpenMP][libomptarget] Enable requires flags for target libraries.
Summary:
Target link variables are currently implemented by creating a copy of the variables on the device side and unified memory never gets exploited.

When the prgram uses the:

```
#pragma omp requires unified_shared_memory
```

directive in conjunction with a declare target link, the linked variable is no longer allocated on the device and the host version is used instead.

This behavior is overridden by performing an explicit mapping.

A Clang side patch is required.

Reviewers: ABataev, AlexEichenberger, grokos, Hahnfeld

Reviewed By: AlexEichenberger, grokos, Hahnfeld

Subscribers: Hahnfeld, jfb, guansong, jdoerfert, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D60223

llvm-svn: 361294
2019-05-21 19:35:02 +00:00
Stanislav Mekhanoshin 44d17ca02e Fix register coalescer failure to prune value
Register coalescer fails for the test in the patch with the assertion in
JoinVals::ConflictResolution `DefMI != nullptr'. It attempts to join
live intervals for two adjacent instructions and erase the copy:

    %2:vreg_256 = COPY %1
    %3:vreg_256 = COPY killed %1

The LI needs to be adjusted to kill subrange for the erased instruction
and extend the subrange of the original def. That was done for the main
interval only but not for the subrange. As a result subrange had a VNI
pointing to the erased slot resulting in the above failure.

Differential Revision: https://reviews.llvm.org/D62162

llvm-svn: 361293
2019-05-21 19:32:41 +00:00
Leonard Chan 9bb96980aa Fix for sphinx bot warning
llvm-svn: 361292
2019-05-21 19:30:25 +00:00
Don Hinton b61f2b6c87 [cmake] Don't use VERSION_GREATER_EQUAL in cmake versions prior to 3.72.
llvm-svn: 361291
2019-05-21 19:25:54 +00:00
Michael Kruse 467069688d [DeLICM] Use polly::singleton to allow empty result.
isl_map_from_union_map cannot determine the map's space if the union_map
is empty. polly::singleton was designed for this case. We pass the
expected map space to avoid crashing in isl_map_from_union_map.

This fixes an issue found by the aosp buildbot. Thanks to Eli Friedman
for the reproducer.

llvm-svn: 361290
2019-05-21 19:18:26 +00:00
Leonard Chan 0bada7ce6c [Intrinsic] Signed Fixed Point Saturation Multiplication Intrinsic
Add an intrinsic that takes 2 signed integers with the scale of them provided
as the third argument and performs fixed point multiplication on them. The
result is saturated and clamped between the largest and smallest representable
values of the first 2 operands.

This is a part of implementing fixed point arithmetic in clang where some of
the more complex operations will be implemented as intrinsics.

Differential Revision: https://reviews.llvm.org/D55720

llvm-svn: 361289
2019-05-21 19:17:19 +00:00
Craig Topper ed6df47bae [X86] Remove an unneeded ZERO_EXTEND creation from LowerINTRINSIC_W_CHAIN. NFC
We were trying to ZERO_EXTEND from an i8 X86ISD::SETCC to i8 again.

llvm-svn: 361288
2019-05-21 19:03:45 +00:00
Sanjay Patel 10f6b39899 [SelectionDAG] fold insert subvector of undef into undef
DAGCombiner simplifies this more liberally as:
  // If inserting an UNDEF, just return the original vector.
  if (N1.isUndef())
    return N0;

So there's no way to make this visible in output AFAIK, but
doing this at node creation time should be slightly more efficient.

llvm-svn: 361287
2019-05-21 18:53:53 +00:00
Don Hinton 76e5a1d3c3 [cmake] Try to make cmake happy and fix bots.
llvm-svn: 361286
2019-05-21 18:51:21 +00:00
Yitzhak Mandelbaum f0d9cfa591 [LibTooling] Address post-commit feedback for r361152
Fixes a redundant dependency and moves another to its proper place.

Reviewers: thakis

Subscribers: mgorny, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62201

llvm-svn: 361285
2019-05-21 18:48:58 +00:00
Sanjay Patel 51dc59d090 [SelectionDAG] remove redundant code; NFCI
getNode() squashes concatenation of undefs via FoldCONCAT_VECTORS():
  // Concat of UNDEFs is UNDEF.
  if (llvm::all_of(Ops, [](SDValue Op) { return Op.isUndef(); }))
    return DAG.getUNDEF(VT);

llvm-svn: 361284
2019-05-21 18:28:22 +00:00
Alexey Bataev 6b21c4a4ee [OPENMP]Use the attributes for dso locality when building for device.
Currently, we ignore all dso locality attributes/info when building for
the device and thus all symblos are externally visible and can be
preemted at the runtime. It may lead to incorrect results. We need to
follow the same logic, compiler uses for static/pie builds.

llvm-svn: 361283
2019-05-21 18:20:08 +00:00
Don Hinton c1b6b9a177 [cmake] Bug in r361281: make include optional and fix typo which might make a difference on some systems.
llvm-svn: 361282
2019-05-21 18:15:01 +00:00
Clement Courbet 122c6e6f36 [MergeICmps] Make sorting strongly stable on the rhs.
Summary:
Because the sort order was not strongly stable on the RHS, whether the
chain could merge would depend on the order of the blocks in the Phi.

EXPENSIVE_CHECKS would shuffle the blocks before sorting, resulting in
non-deterministic merging.

Reviewers: gchatelet

Subscribers: hiraditya, llvm-commits, RKSimon

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62193

llvm-svn: 361281
2019-05-21 17:58:42 +00:00
Don Hinton bd467cfe4b [cmake] Add custom command to touch archives on Darwin so ninja won't rebuild them.
Summary:
clang and newer versions of ninja use high-resolutions timestamps, but
older versions of libtool on Darwin don't, so the archive will often
get an older timestamp than the last object that was added or updated.
To fix this, we add a custom command to touch the archive after it's
been built so that ninja won't rebuild it unnecessarily the next time
it's run.

Reviewed By: beanz

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62172

llvm-svn: 361280
2019-05-21 17:56:45 +00:00
Nick Desaulniers 92febc6498 [Bugpoint] fix use-after-move. NFC
Summary:
This was flagged in https://www.viva64.com/en/b/0629/ under "Snippet No.
6".

Note that author also states:
"Note that the loop doesn't actually execute at all."

This is not true, but the author can be forgiven; there's two distinct
variables with very similar identifiers:

MiscompiledFunctions
MisCompFunctions

Reviewers: echristo, srhines, RKSimon

Reviewed By: RKSimon

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62113

llvm-svn: 361279
2019-05-21 17:55:26 +00:00
Louis Dionne e97b5f5cf3 [clang][Darwin] Refactor header search path logic into the driver
Summary:
This commit moves the logic for determining system, resource and C++
header search paths from CC1 to the driver. This refactor has already
been made for several platforms, but Darwin had been left behind.

This refactor tries to implement the previous search path logic with
perfect accuracy. In particular, the order of all include paths inside
CC1 and all paths that were skipped because nonexistent are conserved
after the refactor. This change was also tested against a code base
of significant size and revealed no problems.

Reviewers: jfb, arphaman

Subscribers: nemanjai, javed.absar, kbarton, christof, jkorous, dexonsmith, jsji, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61963

llvm-svn: 361278
2019-05-21 17:48:04 +00:00
Jan Kratochvil b7a1932144 Remove `SymbolFileDWARF *` when there is already `DWARFUnit *`
In D61502#1503247 @clayborg suggested that SymbolFileDWARF *dwarf2Data is
really redundant in all the calls with also having DWARFUnit *cu. So remove it.

One `SymbolFileDWARF *` nullptr check
(DWARFDebugInfoEntry::GetDIENamesAndRanges) could be removed, other two nullptr
checks (DWARFDebugInfoEntry::GetName and DWARFDebugInfoEntry::AppendTypeName)
need to stay in place (now for `DWARFUnit *`).

Differential Revision: https://reviews.llvm.org/D62011

llvm-svn: 361277
2019-05-21 17:38:56 +00:00
Jonas Devlieghere b43dfaa6c0 [Dsymutil] Remove redundant argument (NFC)
The dwarf streamer already holds a copy of the link options, so there's
no need to pass them as an argument.

llvm-svn: 361276
2019-05-21 17:31:51 +00:00
Chris Bieneman fb2a076511 [CMake] One more stab at fixing BUILD_SHARED_LIBS
If clang's libraries are build SHARED, we need to grab their `PRIVATE_LINK_LIBRARIES` properties and add those to clang_shared's interface.

llvm-svn: 361275
2019-05-21 17:30:59 +00:00
Aaron Ballman 31ca49be47 Do not use the incorrect attribute spelling list index when translating a no_sanitize_foo attribute into a no_sanitize("foo") attribute.
This fixes a crash when AST pretty printing declarations marked with no_sanitize_memory.

llvm-svn: 361274
2019-05-21 17:24:49 +00:00
Sam Clegg c0a4f45bcb Revert "[WebAssembly] Add __start_/_stop_ symbols for data sections"
This reverts commit 7804dbddcc.

This change broke a bunch of tests of the WebAssembly waterfall.
Will hopefully reland with increased test coverage.

llvm-svn: 361273
2019-05-21 17:16:33 +00:00
Chris Bieneman da60a16bc7 [docs] Add new document on building distributions
Summary:
This document is an attempt to provide a guide for best practices for using the LLVM build system to generate distributable LLVM-based tools.

Most of the document is geared toward distributions of LLVM-based toolchains, but much of it also applies to distributing other LLVM-based tools and libraries.

Reviewers: tstellar, phosek, jroelofs, hans, sylvestre.ledru

Reviewed By: tstellar

Subscribers: smeenai, dschuff, arphaman, winksaville, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62040

llvm-svn: 361272
2019-05-21 16:29:31 +00:00
Chris Bieneman dbc2a12c73 Fix BUILD_SHARED_LIBS for clang which broke in D61909
llvm_add_library ignores `BUILD_SHARED_LIBS` `STATIC` is explicitly specified. This restores the `BUILD_SHARED_LIBS` behavior to the clang build.

llvm-svn: 361271
2019-05-21 15:56:17 +00:00
Simon Pilgrim 4b82e50315 [X86][SSE] computeKnownBitsForTargetNode - add X86ISD::ANDNP support
Fixes PACKSS-PSHUFB shuffle regressions mentioned on D61692

llvm-svn: 361270
2019-05-21 15:20:24 +00:00
Alexey Bataev 8c5555c39a [OPENMP][NVPTX]Mark more functions as always_inline for better
performance.

Internally generated functions must be marked as always_inlines in most
cases. Patch marks some extra reduction function + outlined parallel
functions as always_inline for better performance, but only if the
optimization is requested.

llvm-svn: 361269
2019-05-21 15:11:58 +00:00
Sanjay Patel 78c3f58122 [DAGCombiner] prevent unsafe reassociation of FP ops
There are no FP callers of DAGCombiner::reassociateOps() currently,
but we can add a fast-math check to make sure this API is not being
misused.

This was noted as a potential risk (and that risk might increase) with:
D62191

llvm-svn: 361268
2019-05-21 14:47:38 +00:00
Nico Weber a7b9e98fd8 gn build: Merge r361264
llvm-svn: 361267
2019-05-21 14:41:27 +00:00
Fangrui Song 5ea0d06e81 [ELF] Deleted unused ComdatGroups member variable left by D61854
llvm-svn: 361266
2019-05-21 14:40:38 +00:00
Aaron Ballman 86abee8185 Add support for dumping AST comment nodes to JSON.
llvm-svn: 361265
2019-05-21 14:38:29 +00:00
Ilya Biryukov 6c0531222a [Syntax] Rename TokensTest to SyntaxTests. NFC
To be more consistent with conventions used in the codebase. The new
name will be a better fit when more bits of the syntax library land.

llvm-svn: 361264
2019-05-21 14:37:41 +00:00
Clement Courbet 8361a10493 Revert r361257 "[MergeICmps][NFC] Make BCEAtom move-only."
Broke some bots.

llvm-svn: 361263
2019-05-21 14:24:46 +00:00
Nico Weber 440dd6df33 gn build: Run `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format`
llvm-svn: 361262
2019-05-21 14:22:38 +00:00
Javed Absar 603a2bac05 [ARM][CMSE] Add commandline option and feature macro
Defines macro ARM_FEATURE_CMSE to 1 for v8-M targets and introduces
-mcmse option which for v8-M targets sets ARM_FEATURE_CMSE to 3.
A diagnostic is produced when the option is given on architectures
without support for Security Extensions.
Reviewed By: dmgreen, snidertm
Differential Revision: https://reviews.llvm.org/D59879

llvm-svn: 361261
2019-05-21 14:21:26 +00:00
Nico Weber e289e98837 gn build: Merge r361252
llvm-svn: 361260
2019-05-21 14:20:46 +00:00
Nico Weber 8287b973f0 gn build: Merge r361233
llvm-svn: 361259
2019-05-21 14:10:55 +00:00
Sam McCall 0321b370f2 [clangd] Turn no-parse-completion on by when preamble isn't ready. Add flag to force it.
Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62135

llvm-svn: 361258
2019-05-21 13:40:31 +00:00
Clement Courbet 8fa970c2d8 [MergeICmps][NFC] Make BCEAtom move-only.
And handle for self-move. This is required so that llvm::sort can work
with EXPENSIVE_CHECKS, as it will do a random shuffle of the input
which can result in self-moves.

llvm-svn: 361257
2019-05-21 13:34:12 +00:00
Paul Robinson 35a2196bd1 Fix typo in r361251.
llvm-svn: 361256
2019-05-21 13:23:32 +00:00
Tatyana Krasnukha e0cc56e038 [lldb-mi] Include full path in the -data-disassemble response
Differential Revision: https://reviews.llvm.org/D59015

Patch by Anton Kolesov <Anton.Kolesov@synopsys.com>

llvm-svn: 361255
2019-05-21 13:22:46 +00:00
Roman Lebedev d8db224ecb [NFC][X86][AArch64] Shift amount masking: tests that show that 'neg' doesn't last
Meaning if we were to produce 'neg' in dagcombine, we will get an
endless cycle; some inverse transform would need to be guarded somehow.

Also, the 'and (sub 0, x), 31' variant is sticky,
doesn't get optimized in any way.

https://bugs.llvm.org/show_bug.cgi?id=41952

llvm-svn: 361254
2019-05-21 13:04:56 +00:00
Florian Hahn f9b28e53c7 [ScheduleDAGInstrs] Compute topological ordering on demand.
In most cases, the topological ordering does not get changed in
ScheduleDAGInstrs. We can compute the ordering on demand, similar to
D60125.

This drastically cuts down the number of times we need to compute the
topological ordering, e.g. for SPEC2006, SPEC2k and MultiSource, we get
the following stats for -O3 -flto on X86 (showing the top reductions,
with small absolute values filtered). The smallest reduction is -50%.

Slightly positive impact on compile-time (-0.1 % geomean speedup for
test-suite + SPEC & co, with -O1 on X86)

Tests: 243
Metric: pre-RA-sched.NumTopoInits

Program                                        base       patch  diff
 test-suite...ngs-C/fixoutput/fixoutput.test   115.00      3.00   -97.4%
 test-suite...ks/Prolangs-C/cdecl/cdecl.test   957.00     26.00   -97.3%
 test-suite...math/automotive-basicmath.test   107.00      3.00   -97.2%
 test-suite...rolangs-C++/deriv2/deriv2.test   144.00      6.00   -95.8%
 test-suite...lowfish/security-blowfish.test   410.00     18.00   -95.6%
 test-suite...frame_layout/frame_layout.test   441.00     23.00   -94.8%
 test-suite...rolangs-C++/employ/employ.test   159.00     11.00   -93.1%
 test-suite...s/Ptrdist/anagram/anagram.test   157.00     11.00   -93.0%
 test-suite...s-C/unix-smail/unix-smail.test   829.00     59.00   -92.9%
 test-suite...chmarks/Olden/power/power.test   154.00     11.00   -92.9%
 test-suite...T95/147.vortex/147.vortex.test   19876.00  1434.00  -92.8%
 test-suite...000/255.vortex/255.vortex.test   19881.00  1435.00  -92.8%
 test-suite...ce/Applications/Burg/burg.test   2203.00   168.00   -92.4%
 test-suite...urce/Applications/hbd/hbd.test   1067.00    85.00   -92.0%
 test-suite...ternal/HMMER/hmmcalibrate.test   3145.00   251.00   -92.0%
 test-suite.../Applications/spiff/spiff.test   1037.00    84.00   -91.9%
 test-suite...SPEC/CINT95/130.li/130.li.test   5913.00   487.00   -91.8%
 test-suite.../CINT95/134.perl/134.perl.test   12532.00  1041.00  -91.7%
 test-suite...ce/Benchmarks/Olden/bh/bh.test   220.00     19.00   -91.4%
 test-suite :: External/Nurbs/nurbs.test       2304.00   206.00   -91.1%
 test-suite...arks/VersaBench/dbms/dbms.test   773.00     75.00   -90.3%
 test-suite...ce/Applications/siod/siod.test   9043.00   878.00   -90.3%
 test-suite...pplications/treecc/treecc.test   4510.00   438.00   -90.3%
 test-suite...T2006/456.hmmer/456.hmmer.test   7093.00   697.00   -90.2%
 test-suite...s-C/Pathfinder/PathFinder.test   882.00     87.00   -90.1%
 test-suite.../CINT2000/176.gcc/176.gcc.test   64978.00  6721.00  -89.7%
 test-suite...cations/hexxagon/hexxagon.test   657.00     69.00   -89.5%
 test-suite...fice-ispell/office-ispell.test   2712.00   285.00   -89.5%
 test-suite.../CINT2006/403.gcc/403.gcc.test   139613.00 14992.00 -89.3%
 test-suite...lications/ClamAV/clamscan.test   25880.00  2785.00  -89.2%

Reviewers: MatzeB, atrick, efriedma, niravd

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D60839

llvm-svn: 361253
2019-05-21 13:04:53 +00:00
Sam McCall a1b5780ec1 [clangd] Add tweak to convert normal to raw string literal, when it contains escapes.
Reviewers: ilya-biryukov

Subscribers: mgorny, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62151

llvm-svn: 361252
2019-05-21 13:04:24 +00:00
Paul Robinson 0a16ba856b [DebugInfo] Fix tests missed by r362148
llvm-svn: 361251
2019-05-21 12:48:46 +00:00
Paul Robinson 9d5351cab6 De-Window-ize a test
llvm-svn: 361250
2019-05-21 12:08:42 +00:00
Rui Ueyama d3f27f2bf4 Fix test failure.
I forgot to submit a last-minute change to the last patch.

llvm-svn: 361249
2019-05-21 12:01:16 +00:00
Paul Robinson 9c56326934 [DebugInfo] Handle '# line "file"' correctly for asm source.
This provides the correct file path for the original source, rather
than the preprocessed source.

Part of the fix for PR41839.

Differential Revision: https://reviews.llvm.org/D62074

llvm-svn: 361248
2019-05-21 11:59:03 +00:00