Petr Hosek [Thu, 9 May 2019 06:09:35 +0000 (06:09 +0000)]
[NewPM] Setup Passes for KASan and KMSan
While ASan and MSan passes were already ported to new PM, the kernel
variants weren't setup in the pipeline which makes the KASan and KMSan
tests in Clang fail.
Differential Revision: https://reviews.llvm.org/D61664
llvm-svn: 360313
Richard Smith [Thu, 9 May 2019 04:40:57 +0000 (04:40 +0000)]
Fix up lldb after clang r360311.
Patch by Tyker!
Differential Revision: https://reviews.llvm.org/D60934
llvm-svn: 360312
Richard Smith [Thu, 9 May 2019 03:59:21 +0000 (03:59 +0000)]
[c++20] Add support for explicit(bool), as described in P0892R2.
Patch by Tyker!
Differential Revision: https://reviews.llvm.org/D60934
llvm-svn: 360311
Richard Smith [Thu, 9 May 2019 03:49:47 +0000 (03:49 +0000)]
[cxx_status] Mark support for std::is_constant_evaluated as done.
Eric implemented this in r359067.
llvm-svn: 360310
Richard Smith [Thu, 9 May 2019 03:45:57 +0000 (03:45 +0000)]
[cxx_dr_status] Update links to use wg21.link, and list "extension"
issues as "extension" rather than "not resolved".
llvm-svn: 360309
Richard Smith [Thu, 9 May 2019 03:31:27 +0000 (03:31 +0000)]
[c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose
template name is not visible to unqualified lookup.
In order to support this without a severe degradation in our ability to
diagnose typos in template names, this change significantly restructures
the way we handle template-id-shaped syntax for which lookup of the
template name finds nothing.
Instead of eagerly diagnosing an undeclared template name, we now form a
placeholder template-name representing a name that is known to not find
any templates. When the parser sees such a name, it attempts to
disambiguate whether we have a less-than comparison or a template-id.
Any diagnostics or typo-correction for the name are delayed until its
point of use.
The upshot should be a small improvement of our diagostic quality
overall: we now take more syntactic context into account when trying to
resolve an undeclared identifier on the left hand side of a '<'. In
fact, this works well enough that the backwards-compatible portion (for
an undeclared identifier rather than a lookup that finds functions but
no function templates) is enabled in all language modes.
llvm-svn: 360308
Alex Lorenz [Thu, 9 May 2019 02:46:20 +0000 (02:46 +0000)]
lit config: disable LSan for Apple clang compiler in addition to Apple LLVM
Apple clang is the canonical way to refer to the compiler shipped with Xcode.
llvm-svn: 360307
Eric Fiselier [Thu, 9 May 2019 02:34:37 +0000 (02:34 +0000)]
force the bots to cycle
llvm-svn: 360306
Fangrui Song [Thu, 9 May 2019 01:45:53 +0000 (01:45 +0000)]
[ELF] Initialize Target before it may be dereferenced by findAux when reporting "duplicate symbol" error
for (InputFile *F : Files)
Symtab->addFile<ELFT>(F); // if there is a duplicate symbol error
...
Target = getTarget();
When parsing .debug_info in the object file (for better diagnostics),
DWARF.cpp findAux may dereference the null pointer Target
auto *DR = dyn_cast<Defined>(&File->getRelocTargetSym(Rel));
if (!DR) {
// Broken debug info may point to a non-defined symbol,
// some asan object files may also contain R_X86_64_NONE
RelType Type = Rel.getType(Config->IsMips64EL);
if (Type != Target->NoneRel) /// Target is null
Move the assignment of Target to an earlier place to fix this.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D61712
llvm-svn: 360305
Jim Ingham [Thu, 9 May 2019 01:43:27 +0000 (01:43 +0000)]
Fix the output file dependency for Options.inc.
The script phase to do Options.td -> Options.inc was
wrong (missing the "include" directory) so the rule didn't
get run when Options.td changed.
llvm-svn: 360304
Leonard Chan [Thu, 9 May 2019 01:17:48 +0000 (01:17 +0000)]
[SelectionDAG] Expand ADD/SUBCARRY
This patch allows for expansion of ADDCARRY and SUBCARRY when the target does not support it.
Differential Revision: https://reviews.llvm.org/D61411
llvm-svn: 360303
Richard Smith [Thu, 9 May 2019 00:57:24 +0000 (00:57 +0000)]
When typo-correcting a function name, consider correcting to a type name
for a function-style cast.
llvm-svn: 360302
Eric Christopher [Wed, 8 May 2019 23:54:03 +0000 (23:54 +0000)]
Temporarily Revert "[DebugInfo] Terminate more location-list ranges at the end of blocks"
as it was causing significant compile time regressions.
This reverts commit r359426 while we come up with testcases and additional ideas.
llvm-svn: 360301
Stanislav Mekhanoshin [Wed, 8 May 2019 23:31:32 +0000 (23:31 +0000)]
[AMDGPU] gfx1010 tests. NFC.
Added tests which now pass after code commits.
llvm-svn: 360300
Jonathan Peyton [Wed, 8 May 2019 23:12:31 +0000 (23:12 +0000)]
[OpenMP] Workaround gfortran bugzilla build bug 41755
This patch provides workaround to allow gfortran to compile the
OpenMP Fortran modules.
From the gfortran manual:
https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gfortran/BOZ-literal-constants.html
"Note that initializing an INTEGER variable with a statement such as
DATA i/Z'
FFFFFFFF'/ will give an integer overflow error rather than the desired
result of -1 when i is a 32-bit integer on a system that supports 64-bit
integers. The -fno-range-check option can be used as a workaround for legacy
code that initializes integers in this manner."
Bug filed: https://bugs.llvm.org/show_bug.cgi?id=41755
Differential Revision: https://reviews.llvm.org/D61603
llvm-svn: 360299
Jonas Devlieghere [Wed, 8 May 2019 22:59:35 +0000 (22:59 +0000)]
[Reproducers] Fix reproducer unittest
I think the recent change to flush the SB API recording uncovered a real
issue on the Windows bot. Although I couldn't make much sense of the
error message "unknown file: error: SEH exception with code 0x3221225477
thrown in the test body.", it prompted me to look at the test. In the
unit test we were recording during replay, which is obviously not
correct. I think we didn't see this issue before because we flushed once
after the recording was done. This patch unsets the recording logic
during the replay part of the test.
Hopefully this fixed the Windows bot.
llvm-svn: 360298
Reid Kleckner [Wed, 8 May 2019 22:30:46 +0000 (22:30 +0000)]
Try to restore some clang test headers lost in r360291
I'm not sure why 'git llvm revert' removed them.
llvm-svn: 360297
Sanjay Patel [Wed, 8 May 2019 22:19:52 +0000 (22:19 +0000)]
[SelectionDAG] fold 'fneg undef' to undef
This is extracted from the original draft of D61419 with some additional tests.
We don't currently get this in IR (it's conservatively turned into a NaN),
but presumably that'll get updated as we add real IR support for 'fneg'
rather than 'fsub -0.0, x'.
The x86-32 run shows the following, and I haven't looked further to see why,
but that seems to be independent:
Legalizing: t1: f32 = undef
Trying to expand node
Creating fp constant: t4: f32 = ConstantFP<0.000000e+00>
Differential Revision: https://reviews.llvm.org/D61516
llvm-svn: 360296
Bob Haarman [Wed, 8 May 2019 22:11:02 +0000 (22:11 +0000)]
[lld-link] initialize targets and asmparsers before invoking lib
Summary:
When using lld-link to build static libraries containing object files
with module assembly, the program would crash with "Assertion `T &&
T->hasMCAsmParser()' failed". This change causes the code in lld-link
that initialized Targets, TargetInfos, and AsmParsers (which already
existed) to be run before entering the lib building path (which needs
it). This avoids the error (and is what llvm-lib and llvm-ar do, too).
Fixes PR41803.
Reviewers: ruiu, rnk, hans
Reviewed By: ruiu
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61699
llvm-svn: 360295
Matt Arsenault [Wed, 8 May 2019 22:10:04 +0000 (22:10 +0000)]
AMDGPU: Mark scheduler classes as final
llvm-svn: 360294
Matt Arsenault [Wed, 8 May 2019 22:09:57 +0000 (22:09 +0000)]
AMDGPU: Select VOP3 form of add
The VOP3 form should always be the preferred selection, to be shrunk
later. This should only be an optimization issue, but this partially
works around a problem from clobbering VCC when SIFixSGPRCopies
rewrites an SCC defining operation directly to VCC.
3 of the testcases are regressions from failing to fold the immediate
in cases it should. These can be avoided by improving the VCC liveness
handling in SIFoldOperands. Simply increasing the threshold to
computeRegisterLiveness works, although this is common enough that VCC
liveness should probably be tracked throughout the pass. The hack of
leaving behind an implicit_def instruction to avoid breaking iterator
wastes instruction count, which inhibits finding the VCC def in long
chains of adds. Doing this however exposes different, worse looking
regressions from poor scheduling behavior. This could probably be
avoided around by forcing the shrink of the addc here, but the
scheduler should probably be fixed.
The r600 add test needs to be split out because it asserts on the
arguments in the new test during the calling convention lowering.
llvm-svn: 360293
Greg Clayton [Wed, 8 May 2019 22:03:22 +0000 (22:03 +0000)]
Fix bug in ArchSpec::MergeFrom
Previous ArchSpec tests didn't catch this bug since we never tested just the OS being out of date. Fixed the bug and covered this with a test that would catch this.
This was found when trying to load a core file where the core file was an ELF file with just the e_machine for architeture and where the ELF header had no OS set in the OSABI field of the e_ident. It wasn't merging the architecture with the target architecture correctly.
Differential Revision: https://reviews.llvm.org/D61659
llvm-svn: 360292
Reid Kleckner [Wed, 8 May 2019 22:01:20 +0000 (22:01 +0000)]
Revert Include corecrt.h in stddef.h and vcruntime.h in stdarg.h to improve MS compatibility.
This reverts r360271 (git commit
a0933bd8ec1515167ea653f7ee788b8bbde27d51)
There are concerns on the review that this breaks EFI builds and that
the transitive includes (sal.h) are actually heavy enough that we might
care.
llvm-svn: 360291
Kostya Kortchinsky [Wed, 8 May 2019 21:54:02 +0000 (21:54 +0000)]
[scudo][standalone] Introduce the chunk header
Summary:
... and its related functions.
The structure and its functionalities are identical to existing ones.
The header stores information on a `scudo::Chunk` to be able to detect
inconsitencies or potential corruption attempts. It is checksummed for
that purpose.
Reviewers: morehouse, eugenis, vitalybuka, hctim
Reviewed By: vitalybuka
Subscribers: mgorny, delcypher, jfb, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D61654
llvm-svn: 360290
Thomas Preud'homme [Wed, 8 May 2019 21:47:36 +0000 (21:47 +0000)]
[FileCheck, NFC] Split defines.txt in two
Summary:
Split defines.txt into diagnostics test and functionality test. Also add
comments, remove the semicolon prefix and group RUN lines with their
CHECK directives.
Reviewers: jhenderson, probinson, arichardson
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61679
llvm-svn: 360289
Thomas Preud'homme [Wed, 8 May 2019 21:47:31 +0000 (21:47 +0000)]
[FileCheck] Fix code style of method comments
Summary:
Fix various issues in code style of method comments:
1) Move all heading comments to all non-static methods near their
declaration in the FileCheck.h header file.
2) Harmonize the action verb in doxygen comments for methods to always
be in third person
3) Use \returns instead of free text "return" and "returns".
4) Document a couple more parameters while at it.
Reviewers: jhenderson, probinson, arichardson
Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61445
llvm-svn: 360288
Stanislav Mekhanoshin [Wed, 8 May 2019 21:23:37 +0000 (21:23 +0000)]
[AMDGPU] gfx1010 exp modifications
Differential Revision: https://reviews.llvm.org/D61701
llvm-svn: 360287
Jonas Devlieghere [Wed, 8 May 2019 21:07:19 +0000 (21:07 +0000)]
[Reproducers] Flush files to disk periodically
Periodically flush some of the data to disk. Although not perfect, this
helps when the debugger crashes.
llvm-svn: 360286
Jonas Devlieghere [Wed, 8 May 2019 21:07:15 +0000 (21:07 +0000)]
[Reproducers] Fix unitialized pointer
The FileCollector pointer in the FileSystem class wasn't initialized to
nullptr during replay.
llvm-svn: 360285
Craig Topper [Wed, 8 May 2019 20:59:21 +0000 (20:59 +0000)]
[InstCombine] When turning sext into zext due to known bits, return the new ZExt instead of calling replaceinstuseswith
The worklist loop that we're returning back to should be able to do the repacement itself. This is how we normally do replacements.
My main motivation was that I observed that we weren't preserving the name of the result when we do this transform. The replacement code in the worklist loop will call takeName as part of the replacement.
Differential Revision: https://reviews.llvm.org/D61695
llvm-svn: 360284
Changpeng Fang [Wed, 8 May 2019 19:46:04 +0000 (19:46 +0000)]
AMDGPU: Fix a mis-placed bracket
Differential Revision:
https://reviews.llvm.org/D61430
llvm-svn: 360283
Craig Topper [Wed, 8 May 2019 19:20:53 +0000 (19:20 +0000)]
[X86] Add a non-ambiguous check prefix to lwp-intrinsics.ll for the case when only the feature is specified and not the CPUs.
Not sure why the script doesn't notice this. We just weren't checking the +lwp command in 32-bit mode in 2 of the test cases.
llvm-svn: 360282
Cameron McInally [Wed, 8 May 2019 19:06:03 +0000 (19:06 +0000)]
Precommit FNeg InstCombine tests
Differential Revision: https://reviews.llvm.org/D61685
llvm-svn: 360281
Warren Ristow [Wed, 8 May 2019 18:50:07 +0000 (18:50 +0000)]
[SCEV] Suppress hoisting insertion point of binops when unsafe
InsertBinop tries to move insertion-points out of loops for expressions
that are loop-invariant. This patch adds a new parameter, IsSafeToHost,
to guard that hoisting. This allows callers to suppress that hoisting
for unsafe situations, such as divisions that may have a zero
denominator.
This fixes PR38697.
Differential Revision: https://reviews.llvm.org/D55232
llvm-svn: 360280
Reid Kleckner [Wed, 8 May 2019 18:39:03 +0000 (18:39 +0000)]
Fix new reassociate-catchswitch.ll test
llvm-svn: 360279
Quentin Colombet [Wed, 8 May 2019 18:30:26 +0000 (18:30 +0000)]
[RegAllocFast] Scan physcial reg definitions before assigning virtual reg definitions
When assigning the definitions of an instruction we were updating
the available registers while walking the definitions. Some of
those definitions may be from physical registers and thus, they are
not available for other definitions to take, but by the time we see
that we may have already assign these registers to another
virtual register.
Fix that by walking through all the definitions and mark as unavailable
the physical register definitions, then do the virtual register assignments.
PR41790
llvm-svn: 360278
Artem Dergachev [Wed, 8 May 2019 18:12:12 +0000 (18:12 +0000)]
[clang-tidy] Update documentation on ReSharper integration.
It's now possible to set custom clang-tidy binary.
Patch by Alexander Zaitsev!
Differential Revision: https://reviews.llvm.org/D61475
llvm-svn: 360277
Alina Sbirlea [Wed, 8 May 2019 17:58:35 +0000 (17:58 +0000)]
[NewPassManager] Add tuning option: SLPVectorization [NFC].
Summary: Mirror tuning option from old pass manager in new pass manager.
Reviewers: chandlerc
Subscribers: mehdi_amini, jlebar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61616
llvm-svn: 360276
Sanjay Patel [Wed, 8 May 2019 17:53:18 +0000 (17:53 +0000)]
[InstSimplify] add tests for fcmp+minnum; NFC
llvm-svn: 360275
Philip Reames [Wed, 8 May 2019 17:28:38 +0000 (17:28 +0000)]
[Tests] Landing tests for D58632 to show diffs in review
llvm-svn: 360274
Craig Topper [Wed, 8 May 2019 17:27:08 +0000 (17:27 +0000)]
[FastISel][X86] Support FNeg instruction in target independent fast isel handling
This patch adds support for calling selectFNeg for FNeg instructions in addition to the fsub idiom
Differential Revision: https://reviews.llvm.org/D61624
llvm-svn: 360273
Kostya Serebryany [Wed, 8 May 2019 17:20:09 +0000 (17:20 +0000)]
[libFuzzer] DFT: when dumping coverage, also dump the total number of instrumented blocks in a function; update merge_data_flow.py to merge coverage
llvm-svn: 360272
Mike Rice [Wed, 8 May 2019 17:15:21 +0000 (17:15 +0000)]
Include corecrt.h in stddef.h and vcruntime.h in stdarg.h to improve MS
compatibility. This allows some applications developed with MSVC to
compile with clang without any extra changes.
Fixes: llvm.org/PR40789
Differential Revision: https://reviews.llvm.org/D61646
llvm-svn: 360271
Alina Sbirlea [Wed, 8 May 2019 17:05:36 +0000 (17:05 +0000)]
[MemorySSA] Teach LoopSimplify to preserve MemorySSA.
Summary:
Preserve MemorySSA in LoopSimplify, in the old pass manager, if the analysis is available.
Do not preserve it in the new pass manager.
Update tests.
Subscribers: nemanjai, jlebar, javed.absar, Prazek, kbarton, zzheng, jsji, llvm-commits, george.burgess.iv, chandlerc
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60833
llvm-svn: 360270
Jonas Devlieghere [Wed, 8 May 2019 16:31:47 +0000 (16:31 +0000)]
[Docs] list command: lldb run <args>
The run command is only an abbreviation for the more verbose process
launch -- <args> but it works just as with GDB and therefore should be
mentioned in the GDB to LLDB command map.
For educational purposes I've not listed it as the first option on the
LLDB side so that new LLDB user can, if they want, also know what the
"native" way is for LLDB.
Here's the help documentation for the run command in lldb which gives
proof:
> (lldb) help run
> Launch the executable in the debugger.
>
> Syntax: run [<run-args>]
>
> Command Options Usage:
> run [<run-args>]
>
> 'run' is an abbreviation for 'process launch -c /bin/sh --'
Patch by: Konrad Kleine
Differential revision: https://reviews.llvm.org/D61483
llvm-svn: 360269
Simon Pilgrim [Wed, 8 May 2019 16:29:39 +0000 (16:29 +0000)]
[AArch64] Remove scan-build "Value stored during its initialization is never read" warnings. NFCI.
llvm-svn: 360268
Simon Pilgrim [Wed, 8 May 2019 16:27:24 +0000 (16:27 +0000)]
[AArch64] Fix scan-build null/uninitialized pointer warnings. NFCI.
llvm-svn: 360267
Sam Clegg [Wed, 8 May 2019 16:20:05 +0000 (16:20 +0000)]
[WebAssembly] Handle command line options consistently with the ELF backend.
Differential Revision: https://reviews.llvm.org/D61645
llvm-svn: 360266
Gheorghe-Teodor Bercea [Wed, 8 May 2019 15:52:33 +0000 (15:52 +0000)]
[OpenMP][Clang] Support for target math functions
Summary:
In this patch we propose a temporary solution to resolving math functions for the NVPTX toolchain, temporary until OpenMP variant is supported by Clang.
We intercept the inclusion of math.h and cmath headers and if we are in the OpenMP-NVPTX case, we re-use CUDA's math function resolution mechanism.
Authors:
@gtbercea
@jdoerfert
Reviewers: hfinkel, caomhin, ABataev, tra
Reviewed By: hfinkel, ABataev, tra
Subscribers: JDevlieghere, mgorny, guansong, cfe-commits, jdoerfert
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61399
llvm-svn: 360265
Nico Weber [Wed, 8 May 2019 15:50:21 +0000 (15:50 +0000)]
[compiler-rt] Make builtins test pass when using i386 gcc as host compiler
Just-built-clang is used to compile the test, but the library is built
with gcc, so the usual 80-bit FPU vs 32-bit SSE mismatch makes the
floating computations not bitwise identical. Fixes PR32910, see there
for details.
This uses the same technique used in all the other *c3* tests, see in
particular mulsc3_test.c.
(It might be cleaner to add compareResultCF to fp_test.h to force the
floats into 32-bit in memory, but this is the less invasive fix.)
Differential Revision: https://reviews.llvm.org/D61684
llvm-svn: 360264
Simon Pilgrim [Wed, 8 May 2019 15:49:10 +0000 (15:49 +0000)]
[AMDGPU] Reapplied BFE canonicalization from D60462
This was committed in rL358887 but reverted in rL360066 due to a x86 regression, really it should be have been pre-committed instead of being part of the SimplifyDemandedBits bitcast patch.
llvm-svn: 360263
David Greene [Wed, 8 May 2019 15:44:24 +0000 (15:44 +0000)]
[Reassociation] Place moved instructions after landing pads
Reassociation's NegateValue moved instructions to the beginning of
blocks (after PHIs) without checking for exception handling pads.
It's possible for reassociation to move something into an exception
handling block so we need to make sure we don't move things too early
in the block. This change advances the insertion point past any
exception handling pads.
If the block we want to move into contains a catchswitch, we cannot
move into it. In that case just create a new neg as if we had not
found an existing neg to move.
Differential Revision: https://reviews.llvm.org/D61089
llvm-svn: 360262
Gabor Marton [Wed, 8 May 2019 15:23:48 +0000 (15:23 +0000)]
[ASTImporter] Fix inequivalence of unresolved exception spec
Summary:
Structural equivalence of methods can falsely report false when the
exception specifier is unresolved (i.e unevaluated or not instantiated).
(This caused one assertion during bitcoin ctu-analysis.)
Reviewers: a_sidorin, shafik, a.sidorin
Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61424
llvm-svn: 360261
Nikita Popov [Wed, 8 May 2019 14:50:01 +0000 (14:50 +0000)]
Revert "[ValueTracking] Improve isKnowNonZero for Ints"
This reverts commit
3b137a495686bd6018d115ea82fb8bb7718349fd.
As reported in https://reviews.llvm.org/D60846, this is causing
miscompiles.
llvm-svn: 360260
Petar Jovanovic [Wed, 8 May 2019 14:42:13 +0000 (14:42 +0000)]
[Support] Fix unit test for fs::is_local
Close the temporary file after the test is done using it.
If it is not closed and the file was created on NFS, it will cause the test
to fail. The problem happens in the cleanup process afterwards. It first
tries to delete the file but it is not really deleted. Afterwards, the
program fails to delete the directory containing the file, causing the whole
test to fail.
Patch by Milos Stojanovic.
llvm-svn: 360259
Anastasia Stulova [Wed, 8 May 2019 14:23:49 +0000 (14:23 +0000)]
[Sema][OpenCL] Make address space conversions a bit stricter.
The semantics for converting nested pointers between address
spaces are not very well defined. Some conversions which do not
really carry any meaning only produce warnings, and in some cases
warnings hide invalid conversions, such as 'global int*' to
'local float*'!
This patch changes the logic in checkPointerTypesForAssignment
and checkAddressSpaceCast to fail properly on implicit conversions
that should definitely not be permitted. We also dig deeper into the
pointer types and warn on explicit conversions where the address
space in a nested pointer changes, regardless of whether the address
space is compatible with the corresponding pointer nesting level
on the destination type.
Fixes PR39674!
Patch by ebevhan (Bevin Hansson)!
Differential Revision: https://reviews.llvm.org/D58236
llvm-svn: 360258
Owen Pan [Wed, 8 May 2019 14:11:12 +0000 (14:11 +0000)]
[clang-format] Fix the crash when formatting unsupported encodings
Fixes PR33946
Differential Revision: https://reviews.llvm.org/D61559
llvm-svn: 360257
Owen Pan [Wed, 8 May 2019 13:49:17 +0000 (13:49 +0000)]
[clang] Fix a bug that reports UTF32 (LE) files as UTF16 (LE) ones
Also fix a typo for the SCSU byte order mark.
Differential Revision: https://reviews.llvm.org/D61628
llvm-svn: 360256
Simon Pilgrim [Wed, 8 May 2019 13:47:17 +0000 (13:47 +0000)]
[ADT] SmallVector::set_size - fix Wdocumentation. NFCI.
Also fixes a Wshadow warning on MSVC.
llvm-svn: 360255
Aaron Ballman [Wed, 8 May 2019 13:42:44 +0000 (13:42 +0000)]
Allow test to pass after 2030.
Patch by Bernhard M. Wiedemann.
llvm-svn: 360254
Nico Weber [Wed, 8 May 2019 13:41:01 +0000 (13:41 +0000)]
gn build: Merge r360151
llvm-svn: 360253
James Henderson [Wed, 8 May 2019 13:30:48 +0000 (13:30 +0000)]
[NFC]Fix British English -> American English issues
llvm-svn: 360252
James Henderson [Wed, 8 May 2019 13:28:58 +0000 (13:28 +0000)]
[llvm-objcopy] Improve error message for unrecognised archive member
Prior to this patch, llvm-objcopy's error messages for archives with
unsupported members only mentioned the archive name, not the member
name, making them unhelpful. This change improves it by approximately
following GNU objcopy's error message syntax of
"<archive name>(<member name>): <problem>".
Reviewed by: grimar
Differential Revision: https://reviews.llvm.org/D61674
llvm-svn: 360251
Aaron Ballman [Wed, 8 May 2019 13:24:36 +0000 (13:24 +0000)]
Allow 'static' storage specifier on an out-of-line class member template declaration in MSVCCompat mode.
Patch by Soumi Manna.
llvm-svn: 360250
Nikolai Kosjar [Wed, 8 May 2019 13:19:29 +0000 (13:19 +0000)]
[libclang] PR41649: Remove pointless duplicate flag. NFC.
llvm-svn: 360249
Simon Pilgrim [Wed, 8 May 2019 13:02:32 +0000 (13:02 +0000)]
Fix whitespace mismatches. NFCI.
Tabs are not our friends.
llvm-svn: 360248
Dmitri Gribenko [Wed, 8 May 2019 12:02:31 +0000 (12:02 +0000)]
Documentation for bugprone-inaccurate-erase: added an example of a bug that this checker catches
Reviewers: alexfh
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61644
llvm-svn: 360247
Pavel Labath [Wed, 8 May 2019 11:43:05 +0000 (11:43 +0000)]
[DWARF] Centralize user_id <-> DWARFDIE conversions
Summary:
The logic for translating a user_id into a DWARFDIE was replicated in
several places. This removes that redundancy and settles on a single
implementation in SymbolFileDWARF.
The reason for choosing that instead of DIERef was that we were
always immediately converting the returned DIERef into a DWARFDIE
anyway, which meant that one had to specify the SymbolFileDWARF argument
twice (once to get the DIERef, and once to get the actual DIE). Also,
passing a higher-level object (SymbolFileDWARF) into a lower-level one
(DIERef) seemed like a less intuitive arrangement than doing things the
other way around.
Reviewers: JDevlieghere, clayborg, aprantl
Subscribers: tberghammer, jankratochvil, lldb-commits
Differential Revision: https://reviews.llvm.org/D61648
llvm-svn: 360246
Simon Pilgrim [Wed, 8 May 2019 11:22:10 +0000 (11:22 +0000)]
[LegalizeDAG] Assert non-power-of-2 load/store op splits are in range. NFCI.
Fixes static analyzer undefined/out-of-range shift warnings.
llvm-svn: 360245
Simon Pilgrim [Wed, 8 May 2019 11:02:46 +0000 (11:02 +0000)]
[Hexagon] Fix cppcheck reduce variable scope warnings. NFCI.
Also fixes a static analyzer "Value stored to 'S2' during its initialization is never read" warning.
llvm-svn: 360244
Andrea Di Biagio [Wed, 8 May 2019 11:00:43 +0000 (11:00 +0000)]
[MCA] Don't add a name to the default code region.
This is done in preparation for a patch that fixes PR41523.
llvm-svn: 360243
Tim Northover [Wed, 8 May 2019 10:59:08 +0000 (10:59 +0000)]
ARM: disallow SP as Rn for Thumb2 TST & TEQ instructions
Using SP in this position is unpredictable in ARMv7. CMP and CMN are not
affected, and of course v8 relaxes this requirement, but that's handled
elsewhere.
llvm-svn: 360242
Simon Pilgrim [Wed, 8 May 2019 10:52:26 +0000 (10:52 +0000)]
[VPlan] Fix "value never used" static analyzer warning. NFCI.
llvm-svn: 360241
Andrea Di Biagio [Wed, 8 May 2019 10:44:05 +0000 (10:44 +0000)]
[MCA] Slightly refactor CodeRegion.h. NFCI
Also, use a SmallVector instead of a std::vector for the code region.
llvm-svn: 360240
Simon Pilgrim [Wed, 8 May 2019 10:39:56 +0000 (10:39 +0000)]
R600InstrInfo.cpp - Add getTransSwizzle assert for the swizzle op index. NFCI.
Fixes static analyzer undefined value warning.
llvm-svn: 360239
Keno Fischer [Wed, 8 May 2019 10:36:04 +0000 (10:36 +0000)]
[polly][SCEV] Expand SCEV matcher cases for new smin/umin ops
These were added in rL360159, but I neglected to update polly at the
same time.
llvm-svn: 360238
Andrea Di Biagio [Wed, 8 May 2019 10:28:56 +0000 (10:28 +0000)]
[MCA] Remove dead assignment. NFC
llvm-svn: 360237
Simon Pilgrim [Wed, 8 May 2019 10:24:22 +0000 (10:24 +0000)]
[SIMode] Fix typo in Status constructor
As noted in https://www.viva64.com/en/b/0629/ (Snippet No. 36) and the scan-build CI reports (https://llvm.org/reports/scan-build/report-SIModeRegister.cpp-Status-1-1.html#EndPath), rL348754 introduced a typo in the Status constructor due to argument variable names shadowing the member variable names.
Differential Revision: https://reviews.llvm.org/D61595
llvm-svn: 360236
Simon Pilgrim [Wed, 8 May 2019 10:09:57 +0000 (10:09 +0000)]
[DebugInfo] Fix use-after-move warning. NFCI.
Don't rely on DWARFAbbreviationDeclarationSet::extract cleaning the struct up for reuse - the analyzers don't like it.
llvm-svn: 360235
Simon Pilgrim [Wed, 8 May 2019 10:07:34 +0000 (10:07 +0000)]
Fix cppcheck operator precedence warning. NFCI.
llvm-svn: 360234
James Henderson [Wed, 8 May 2019 09:49:35 +0000 (09:49 +0000)]
[llvm-objcopy] Add --prefix-alloc-sections
This patch adds support for --prefix-alloc-sections, which adds a prefix
to every allocated section names.
It adds a prefix after renaming section names by --rename-section as GNU
objcopy does.
Fixes PR41266: https://bugs.llvm.org/show_bug.cgi?id=41266
Differential Revision: https://reviews.llvm.org/D60042
Patch by Seiya Nuta.
llvm-svn: 360233
Florian Hahn [Wed, 8 May 2019 09:09:54 +0000 (09:09 +0000)]
[SCCP] Fix crash when trying to constant-fold terminators multiple times.
If we fold a branch/switch to an unconditional branch to another dead block we
replace the branch with unreachable, to avoid attempting to fold the
unconditional branch.
Reviewers: davide, efriedma, mssimpso, jdoerfert
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D61300
llvm-svn: 360232
Ilya Biryukov [Wed, 8 May 2019 08:52:18 +0000 (08:52 +0000)]
[clang-tidy] Do not show incorrect fix in modernize-make-unique
Summary:
The case when initialize_list hides behind an implicit case was not
handled before.
Reviewers: aaron.ballman
Reviewed By: aaron.ballman
Subscribers: xazax.hun, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61642
llvm-svn: 360231
Martin Storsjo [Wed, 8 May 2019 08:37:34 +0000 (08:37 +0000)]
[CMake] Install import libraries
Simplify the cmake logic to install both runtime and import
libraries (treated as ARCHIVE), as the later are needed to link
against llvm.
Patch by Julien Schueller!
Differential Revision: https://reviews.llvm.org/D61425
llvm-svn: 360230
QingShan Zhang [Wed, 8 May 2019 07:56:59 +0000 (07:56 +0000)]
[NFC][PowerPC] Add test for store combine optimization.
llvm-svn: 360229
QingShan Zhang [Wed, 8 May 2019 07:32:12 +0000 (07:32 +0000)]
[CodeGenPrepare] Don't split the store if it is volatile
We shouldn't split the store when it is volatile.
Differential Revision: https://reviews.llvm.org/D61169
llvm-svn: 360228
George Rimar [Wed, 8 May 2019 07:31:05 +0000 (07:31 +0000)]
[llvm-objcopy] - Fix for "Bug 41775 - SymbolTableSection::addSymbol - shadow variable names"
This is a fix for https://bugs.llvm.org/show_bug.cgi?id=41775,
Problem is in the final line:
Size += this->EntrySize;
I checked that we do not actually need it in this place,
since we always call removeSectionReferences which
calls removeSymbols which updates the Size.
But it worth to keep it, that allows to relax the dependencies.
Differential revision: https://reviews.llvm.org/D61636
llvm-svn: 360227
QingShan Zhang [Wed, 8 May 2019 07:21:37 +0000 (07:21 +0000)]
[NFC] Add a static function to do the endian check
Add a new function to do the endian check, as I will commit another patch later, which will also need the endian check.
Differential Revision: https://reviews.llvm.org/D61236
llvm-svn: 360226
Leonard Chan [Wed, 8 May 2019 05:59:25 +0000 (05:59 +0000)]
Fix for the greendragon bots.
Adds extra checks for ObjC GC and Ownership.
llvm-svn: 360225
Sam McCall [Wed, 8 May 2019 05:49:42 +0000 (05:49 +0000)]
[Sema] Correct typos in return statements so the return types of 'auto' functions are always deduced.
Summary:
e.g.
auto foo() {
return no_such_thing; // Return value is a TypoExpr
}
using T = decltype(foo()); // Uh-oh, undeduced auto.
Reviewers: rsmith
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61649
llvm-svn: 360224
Mircea Trofin [Wed, 8 May 2019 03:57:25 +0000 (03:57 +0000)]
[llvm] Avoid div by 0 when updating profile weights.
Reviewers: davidxl
Reviewed By: davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61661
llvm-svn: 360223
Dan Robertson [Wed, 8 May 2019 02:25:08 +0000 (02:25 +0000)]
[ValueTracking] Improve isKnowNonZero for Ints
Improve isKnownNonZero for integers in order to improve cttz
optimizations.
Differential Revision: https://reviews.llvm.org/D60846
llvm-svn: 360222
Lang Hames [Wed, 8 May 2019 02:11:07 +0000 (02:11 +0000)]
[Support] Add error handling to sys::Process::getPageSize().
This patch changes the return type of sys::Process::getPageSize to
Expected<unsigned> to account for the fact that the underlying syscalls used to
obtain the page size may fail (see below).
For clients who use the page size as an optimization only this patch adds a new
method, getPageSizeEstimate, which calls through to getPageSize but discards
any error returned and substitues a "reasonable" page size estimate estimate
instead. All existing LLVM clients are updated to call getPageSizeEstimate
rather than getPageSize.
On Unix, sys::Process::getPageSize is implemented in terms of getpagesize or
sysconf, depending on which macros are set. The sysconf call is documented to
return -1 on failure. On Darwin getpagesize is implemented in terms of sysconf
and may also fail (though the manpage documentation does not mention this).
These failures have been observed in practice when highly restrictive sandbox
permissions have been applied. Without this patch, the result is that
getPageSize returns -1, which wreaks havoc on any subsequent code that was
assuming a sane page size value.
<rdar://problem/
41654857>
Reviewers: dblaikie, echristo
Subscribers: kristina, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59107
llvm-svn: 360221
Nemanja Ivanovic [Wed, 8 May 2019 02:03:32 +0000 (02:03 +0000)]
Fix buildbot break after r360195
llvm-svn: 360220
Jonas Devlieghere [Wed, 8 May 2019 01:51:26 +0000 (01:51 +0000)]
[Docs] Fix incorrect heading and update titles.
This patch fixes two incorrect headings in source.rst which caused it to
show up on the homepage. I also updated the titles to have more sensible
links there.
llvm-svn: 360219
Jonas Devlieghere [Wed, 8 May 2019 01:38:12 +0000 (01:38 +0000)]
[Docs] Re-order homepage: Download -> Build -> Test
I also reformatted some paragraphs to 80 cols.
llvm-svn: 360218
Richard Smith [Wed, 8 May 2019 01:36:36 +0000 (01:36 +0000)]
Split ActOnCallExpr into an ActOnCallExpr to be called by the parser,
and a BuildCallExpr to be called internally within Sema to build /
rebuild calls.
llvm-svn: 360217
Jonas Devlieghere [Wed, 8 May 2019 01:23:47 +0000 (01:23 +0000)]
Propagate command interpreter errors from lldlbinit
This patch ensures that we propagate errors coming from the lldbinit
file trough the command/script interpreter. Before, if you did something
like command script import syntax_error.py, and the python file
contained a syntax error, lldb wouldn't tell you about it. This changes
with the current patch: errors are now propagated by default.
PS: Jim authored this change and I added testing.
Differential revision: https://reviews.llvm.org/D61579
llvm-svn: 360216
Kostya Serebryany [Wed, 8 May 2019 01:03:05 +0000 (01:03 +0000)]
[libFuzzer] extend the test for data flow tracer and coverage; also hopefully fix it on the bot
llvm-svn: 360215
Michael Liao [Wed, 8 May 2019 00:52:33 +0000 (00:52 +0000)]
[hip] Fix ambiguity from `>>>` of CUDA.
Summary:
- For template arguments ending with `>>>`, we should cease lookahead
and treat it as type-id firstly, so that deduction could work
properly.
Reviewers: tra, yaxunl
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61396
llvm-svn: 360214