Commit Graph

331834 Commits

Author SHA1 Message Date
Simon Pilgrim edfc94e296 GCOVProfiling - fix uninitialized variable warnings + make getFuncChecksum() const. NFCI. 2019-11-14 14:21:18 +00:00
Simon Pilgrim 39c0829a55 WholeProgramDevirt - fix uninitialized variable warnings. NFCI. 2019-11-14 14:21:18 +00:00
Simon Pilgrim f784ad8ff3 Fix uninitialized variable warning. NFCI. 2019-11-14 14:21:17 +00:00
Simon Pilgrim 8c09e472d5 Fix uninitialized variable warning. NFCI. 2019-11-14 14:21:17 +00:00
Simon Pilgrim ba229113a9 SROA - fix uninitialized variable warnings. NFCI. 2019-11-14 14:21:17 +00:00
Simon Pilgrim b5f94adbf3 Fix uninitialized variable warnings. NFCI. 2019-11-14 14:21:16 +00:00
Simon Pilgrim 6039e54ce5 Hexagon - fix uninitialized variable warnings. NFCI. 2019-11-14 14:21:16 +00:00
Simon Pilgrim 9242b99451 MSP430 - fix uninitialized variable warnings. NFCI. 2019-11-14 14:21:16 +00:00
Louis Dionne 1466335cf4 [libc++][P1872] span should have size_type, not index_type.
Thanks to Marek Kurdej for the patch.

Differential Revision: https://reviews.llvm.org/D70206
2019-11-14 09:07:05 -05:00
Louis Dionne 8b77a3a0f4 [libc++] [P1612] Add missing feature-test macro __cpp_lib_endian.
Thanks to Marek Kurdej for the patch.

Differential Revision: https://reviews.llvm.org/D70221
2019-11-14 08:55:19 -05:00
Kerry McLaughlin f9dd03b135 [AArch64][SVE] Implement floating-point comparison & reduction intrinsics
Summary:
Adds intrinsics for the following:
 - fadda & faddv
 - fminv, fmaxv, fminnmv & fmaxnmv
 - facge & facgt
 - fcmp[eq|ge|gt|ne|uo]

Reviewers: sdesmalen, huntergr, dancgr, mgudim

Reviewed By: sdesmalen

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cameron.mcinally, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69858
2019-11-14 13:47:08 +00:00
Ilya Biryukov 5a9547b007 [clangd] Simplify the code in Index::refs
Summary:
While here, also fix potential UB in MergeIndex.

Thanks Kadir for finding this!

Reviewers: hokein

Reviewed By: hokein

Subscribers: merge_guards_bot, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D70225
2019-11-14 14:43:29 +01:00
Sjoerd Meijer cb47b87830 [LV] PreferPredicateOverEpilog respecting predicate loop hint
The vectoriser queries TTI->preferPredicateOverEpilogue to determine if
tail-folding is preferred for a loop, but it was not respecting loop hint
'predicate' that can disable this, which has now been added. This showed that
we were incorrectly initialising loop hint 'vectorize.predicate.enable' with 0
(i.e. FK_Disabled) but this should have been FK_Undefined, which has been
fixed.

Differential Revision: https://reviews.llvm.org/D70125
2019-11-14 13:10:44 +00:00
Paweł Bylica 1c247dd028
[DAGCombiner] Drop redundant DAG method param. NFC 2019-11-14 14:02:53 +01:00
Paweł Bylica 9b89bda517
[DAGCombiner] Use TLI field already available. NFC 2019-11-14 14:02:52 +01:00
Raphael Isemann 7e6294c056 Modernize llvm::Error handling in ExternalASTMerger 2019-11-14 13:58:32 +01:00
JonChesterfield 32dfbd131d [libomptarget][nfc] Use cuda variable wrappers from support.h
Summary:
[libomptarget][nfc] Use cuda variable wrappers from support.h
Reimplementation of D69693, after the revert of D69885

Use the wrappers in support.h for cuda builtin variables at all call sites.
Localises use of cuda and removes WARPSIZE==32 assumption in debug.h.

Reviewers: ABataev, jdoerfert, grokos

Reviewed By: jdoerfert

Subscribers: openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D70186
2019-11-14 12:45:09 +00:00
Miloš Stojanović 4787c6e2f3 [mips][NFC] Remove old FIXME comment
This was fixed in rL229595 but this comment was missed.

Differential Revision: https://reviews.llvm.org/D70231
2019-11-14 13:14:31 +01:00
Kerry McLaughlin cd83d9ff5c [AArch64][SVE] Implement remaining floating-point arithmetic intrinsics
Summary:
Adds intrinsics for the following:
  - fabs & fneg
  - fexpa
  - frint[a|i|m|n|p|x|z]
  - frecpe, frecps & frecpx
  - fsqrt, frsqrte & frsqrts

Reviewers: huntergr, sdesmalen, dancgr, mgudim

Reviewed By: sdesmalen

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cameron.mcinally, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69800
2019-11-14 11:59:00 +00:00
Kerry McLaughlin f7848fd8f7 [AArch64][SVE] Implement additional floating-point arithmetic intrinsics
Summary:
Adds intrinsics for the following:
  - ftssel
  - fcadd, fcmla
  - fmla, fmls, fnmla, fnmls
  - fmad, fmsb, fnmad, fnmsb

Reviewers: sdesmalen, huntergr, dancgr, mgudim

Reviewed By: sdesmalen

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cameron.mcinally, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69707
2019-11-14 11:35:50 +00:00
Diana Picus e03a06b348 Fix typos in docs. NFC 2019-11-14 12:11:57 +01:00
QingShan Zhang bcb6829ee6 [NFC] Add one test for PowerPC to verify the sext_inreg for vector type. 2019-11-14 10:57:05 +00:00
Kevin Petit e73177ea5f Fix use of add_llvm_tool in projects that build no targets
Projects that set LLVM_TARGETS_TO_BUILD to an empty list
can't use add_llvm_tool (and probably other macros).

Here's the error that this change fixes:

list sub-command REMOVE_ITEM requires two or more arguments.

https://reviews.llvm.org/D70167

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-11-14 10:53:46 +00:00
Daniil Suchkov 4c9d0da838 Revert "[InstCombine] Fold PHIs with equal incoming pointers"
This reverts commit a2f6ae9abf.
It is reverted due to clang-cmake-armv7-selfhost buildbot failure.
2019-11-14 17:42:01 +07:00
Raphael Isemann 8715ffdf1a [lldb] Fix that trailing backslashes in source lines break the Clang highlighter
Summary:
Clang's raw Lexer doesn't produce any tokens for trailing backslashes in a line. This doesn't work with
LLDB's Clang highlighter which builds the source code to display from the list of tokens the Lexer returns.
This causes that lines with trailing backslashes are lacking the backslash and the following newline when
rendering source code in LLDB.

This patch removes the trailing newline from the current line we are highlighting. This way Clang doesn't
drop the backslash token and we just restore the newline after tokenising.

Fixes rdar://57091487

Reviewers: JDevlieghere, labath

Reviewed By: JDevlieghere, labath

Subscribers: labath, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70177
2019-11-14 11:11:20 +01:00
Daniil Suchkov a2f6ae9abf [InstCombine] Fold PHIs with equal incoming pointers
This is a resubmission of bbb29738b5 that
was reverted due to clang tests failures. It includes the fix and
additional IR tests for the missed case.

Summary:
In case when all incoming values of a PHI are equal pointers, this
transformation inserts a definition of such a pointer right after
definition of the base pointer and replaces with this value both PHI and
all it's incoming pointers. Primary goal of this transformation is
canonicalization of this pattern in order to enable optimizations that
can't handle PHIs. Non-inbounds pointers aren't currently supported.

Reviewers: spatel, RKSimon, lebedev.ri, apilipenko

Reviewed By: apilipenko

Tags: #llvm

Subscribers: hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D68128
2019-11-14 17:04:32 +07:00
Djordje Todorovic 2eb0862ed8 [AArch64][DebugInfo] Fix incorrect call site param value produced by MOVZXi
This resolves the problem with the truncation of the immediate operand.

Differential Revision: https://reviews.llvm.org/D70168
2019-11-14 11:02:35 +01:00
Anna Welker e78083929d [NFC] Fix typo in ARMBaseRegisterInfo 2019-11-14 09:56:18 +00:00
evgeny a2292cc537 [ThinLTO] Add correctness check for RO/WO variable import
This patch adds an assertion check for exported read/write-only
variables to be also in import list for module. If they aren't
we may face linker errors, because read/write-only variables are
internalized in their source modules. The patch also changes
export lists to store ValueInfo instead of GUID for performance
considerations.

Differential revision: https://reviews.llvm.org/D70128
2019-11-14 12:24:05 +03:00
Pavel Labath eafe0cf5fa DWARFDebugLoclists: stricter base address handling
Summary:
This removes the use of zero as a base address in section-based dumping.
Although this will often be true for (unlinked) object files with a
single compile unit, it is not true in general. This means that
section-based dumping will not be able to resolve entries referencing
the base address (DW_LLE_offset_pair) -- it wasn't able to do that
correctly before either, but now it will be more explicit about it. One
exception to that is if the location list contains an explicit
DW_LLE_base_address entry -- in this case the dumper will pick it up,
and resolve subsequent entries normally.

The patch also removes the fallback to zero in the "inline" dumping in
case the compile unit does not contain a base address.

Reviewers: dblaikie, probinson, JDevlieghere, aprantl, SouraVX

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70115
2019-11-14 10:01:48 +01:00
Raphael Isemann ea2ba51b0b [lldb][NFC] Simplify IOHandler constructor/destructor setup
We only need a default constructor because of DISALLOW_COPY_AND_ASSIGN,
but the non-virtual destructor isn't needed.
2019-11-14 09:59:00 +01:00
Muhammad Omair Javaid f9f30f2ecb [LLDB] Fix whitespace/tabs mismatch in lldbsuite Makefile.rules
This patch fixes whitespace/tabs mismatch in
lldb/packages/Python/lldbsuite/test/make/Makefile.rules

Legacy make files always used tabs though modern make version can
work with white-spaces I have chosen the legacy just to be safe.

Signed-off-by: Muhammad Omair Javaid <omair.javaid@linaro.org>

Differential Revision: https://reviews.llvm.org/D70154
2019-11-14 13:53:58 +05:00
Puyan Lotfi 4873319f97 [clang][IFS][test] Reverting driver-test.c to what it was prior to e782192d5e
My mistake. Changes I had in this test were for code changes that are
not landed yet. I am reverting driver-test.c back to what it was
originally.
2019-11-14 03:39:16 -05:00
Puyan Lotfi c72aef999c [clang][IFS][test] Removing -shared, fixing triple: driver-test.c/windows.cpp.
Removing -shared as it is not used on a lot of targets in order to green failing
bots with this change. Also, tiding up the windows.cpp test as the
triple compile out can look slightly different that what you specified
on a windows bot.
2019-11-14 02:43:40 -05:00
Puyan Lotfi e782192d5e [clang][IFS][test][NFC] Tightening up clang-ifs tests to use -cc1 more often.
Unless the test is explicitly testing a driver feature if clang
interface stubs I have changed the tests to use %clang_cc1. This should
make some changes I plan to make to the driver job pipeline cause fewer
test changes and breakages.
2019-11-14 02:25:22 -05:00
Dimitry Andric 3db6783d8a Check result of emitStrLen before passing it to CreateGEP
Summary:
This fixes PR43081, where the transformation of `strchr(p, 0) -> p +
strlen(p)` can cause a segfault, if `-fno-builtin-strlen` is used.  In
that case, `emitStrLen` returns nullptr, which CreateGEP is not designed
to handle.  Also add the minimized code from the PR as a test case.

Reviewers: xbolva00, spatel, jdoerfert, efriedma

Reviewed By: efriedma

Subscribers: lebedev.ri, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D70143
2019-11-14 08:04:36 +01:00
Simon Atanasyan feee1d58dc [mips] Use local variable to escape repetitive calls of `getOpcode`. NFC 2019-11-14 09:29:31 +03:00
Simon Atanasyan c2292502d8 [mips] Use isInt<> call instead of explicit range checking. NFC 2019-11-14 09:29:31 +03:00
Tom Stellard 5d035c5d8f [cmake] Prevent building with BUILD_SHARED_LIBS and LLVM_LINK_LLVM_DYLIB
Summary: This doesn't work, so error early if someone tries it.

Reviewers: beanz, smeenai, compnerd, phosek

Reviewed By: beanz

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70160
2019-11-13 21:29:31 -08:00
Francesco Petrogalli 91c5928c36 [ModuleUtils] Clean up header file. [NFC]
Summary:
1. Remove unused forward declaration.
2. Remove unnecessary `\defgroup` in docygen documentation.

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70218
2019-11-14 04:36:45 +00:00
Rui Ueyama 000ff301e7 Warn on /align if used without /driver
/align is not supposed to be used without /driver, so it makes sense
to warn if only /align is passed. MSVC link.exe warns on this too.

Differential Revision: https://reviews.llvm.org/D70163
2019-11-14 13:13:07 +09:00
Rui Ueyama f95ed69641 Implement /driver, /driver:wdm and /driver:uponly
This patch implements /driver, /driver:wdm and /driver:uponly as
described in
https://docs.microsoft.com/en-us/cpp/build/reference/driver-windows-nt-kernel-mode-driver?view=vs-2019.

Differential Revision: https://reviews.llvm.org/D70162
2019-11-14 13:07:56 +09:00
Heejin Ahn 70ee430c6e [WebAssembly] -fwasm-exceptions enables reference-types
Summary:
This adds `-mreference-types` and `-mno-reference-types` flags to clang
and make `-fwasm-exceptions` enables reference types feature in clang
and the backend.

Reviewers: tlively

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69832
2019-11-13 19:44:11 -08:00
Heejin Ahn 3306fe10fa [unittests] Add InitializePasses.h includes
Summary:
After D70211, Pass.h does not include InitializePasses.h anymore, so
these files need to include InitializePasses.h directly.

Reviewers: rnk

Subscribers: MatzeB, mehdi_amini, zzheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70217
2019-11-13 19:42:58 -08:00
Jonas Devlieghere fa6984a3de [LLDB] Don't install the pretty stack trace handler twice.
I noticed that currently we are printing LLVM's pretty stack trace
twice. The reason is that we're calling PrintStackTraceOnErrorSignal in
addition to InitLLVM, which besides some other useful things, also
register LLVM's pretty stack trace handler.

Differential revision: https://reviews.llvm.org/D70216
2019-11-13 17:35:58 -08:00
Reid Kleckner 1dfede3122 Move CodeGenFileType enum to Support/CodeGen.h
Avoids the need to include TargetMachine.h from various places just for
an enum. Various other enums live here, such as the optimization level,
TLS model, etc. Data suggests that this change probably doesn't matter,
but it seems nice to have anyway.
2019-11-13 16:39:34 -08:00
Stanislav Mekhanoshin 4fa44f989e [AMDGPU] Fixed dpp test. NFC. 2019-11-13 16:38:54 -08:00
Tom Stellard 80ed7f8397 [cmake] Remove confusing condition argument from else() NFC
Summary:
This makes it look like an elseif and also the variable referenced
in the condition was removed from this function in r366622.

Reviewers: dsanders, beanz, smeenai, compnerd, phosek

Reviewed By: beanz

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70159
2019-11-13 16:37:04 -08:00
Reid Kleckner 5565d365f2 Revert "Forward declare Optional<T> in STLExtras.h"
This reverts commit a36f316390.

I did not intend to push this with the InitializePasses.h change.
2019-11-13 16:36:21 -08:00
Reid Kleckner 05da2fe521 Sink all InitializePasses.h includes
This file lists every pass in LLVM, and is included by Pass.h, which is
very popular. Every time we add, remove, or rename a pass in LLVM, it
caused lots of recompilation.

I found this fact by looking at this table, which is sorted by the
number of times a file was changed over the last 100,000 git commits
multiplied by the number of object files that depend on it in the
current checkout:
  recompiles    touches affected_files  header
  342380        95      3604    llvm/include/llvm/ADT/STLExtras.h
  314730        234     1345    llvm/include/llvm/InitializePasses.h
  307036        118     2602    llvm/include/llvm/ADT/APInt.h
  213049        59      3611    llvm/include/llvm/Support/MathExtras.h
  170422        47      3626    llvm/include/llvm/Support/Compiler.h
  162225        45      3605    llvm/include/llvm/ADT/Optional.h
  158319        63      2513    llvm/include/llvm/ADT/Triple.h
  140322        39      3598    llvm/include/llvm/ADT/StringRef.h
  137647        59      2333    llvm/include/llvm/Support/Error.h
  131619        73      1803    llvm/include/llvm/Support/FileSystem.h

Before this change, touching InitializePasses.h would cause 1345 files
to recompile. After this change, touching it only causes 550 compiles in
an incremental rebuild.

Reviewers: bkramer, asbirlea, bollu, jdoerfert

Differential Revision: https://reviews.llvm.org/D70211
2019-11-13 16:34:37 -08:00