Jay Foad [Wed, 29 Apr 2020 17:40:17 +0000 (18:40 +0100)]
[AMDGPU] Remove WaitcntBrackets::MixedPendingEvents[]. NFC.
It's trivial to derive this information from other state.
Jay Foad [Wed, 29 Apr 2020 16:13:36 +0000 (17:13 +0100)]
[AMDGPU] Initialize gpr upper bounds to -1. NFC.
These upper bounds are inclusive, so -1 (rather than 0) is the natural
way to express an empty range.
Jay Foad [Wed, 29 Apr 2020 15:58:07 +0000 (16:58 +0100)]
[AMDGPU] Simplify MergeInfo calculations. NFC.
This makes the definition and uses of NewUB more symmetrical, and makes
it clear that ScoreLBs[T] does not change.
Jan Korous [Wed, 29 Apr 2020 18:44:40 +0000 (11:44 -0700)]
[FileCollector] move Root creation
If we don't handle the errors we can't rely on the directory being created early anyway.
Differential Revision: https://reviews.llvm.org/D78959
Christopher Tetreault [Wed, 29 Apr 2020 18:21:04 +0000 (11:21 -0700)]
[SVE] Upgrade VectorType tests to test new types
Reviewers: efriedma, sdesmalen, c-rhodes, ddunbar
Reviewed By: sdesmalen
Subscribers: huntergr, tschuett, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78831
Ulrich Weigand [Wed, 29 Apr 2020 17:59:50 +0000 (19:59 +0200)]
[SystemZ] Allow specifying plain register numbers in AsmParser
For compatibility with other assemblers on the platform, allow
using just plain integer register numbers in all places where a
register operand is expected.
Bug: llvm.org/PR45582
Ulrich Weigand [Wed, 29 Apr 2020 16:33:13 +0000 (18:33 +0200)]
[SystemZ] Simplify register parsing in AsmParser
Remove redundant Group and Regs arguments from parseRegister
and eliminate one of its overloaded versions.
Remove redundant Regs argument from parseAddress.
NFC intended.
Sanjay Patel [Wed, 29 Apr 2020 13:00:10 +0000 (09:00 -0400)]
[x86] add tests for awkward 'icmp eq i1'; NFC
Louis Dionne [Wed, 29 Apr 2020 18:19:27 +0000 (14:19 -0400)]
[libc++] Re-disable DSL test on Windows
This reverts commit
51a60ed14c4e, since the test still doesn't pass on
Windows. Marking the test as UNSUPORTED on Windows again until I've
figured out the problem.
Erich Keane [Fri, 24 Apr 2020 03:36:29 +0000 (20:36 -0700)]
Fix x86/x86_64 calling convention for _ExtInt
After speaking with Craig Topper about some recent defects, he pointed
out that _ExtInts should be passed indirectly if larger than the largest
int register, and like ints when smaller than that. This patch
implements that.
Note that this changed the way vaargs worked quite a bit, but they still
work.
Differential Revision: https://reviews.llvm.org/D78785
Martin Storsjö [Wed, 29 Apr 2020 18:00:20 +0000 (21:00 +0300)]
[lldb] Remove a redundant semicolon, fixing GCC warnings. NFC.
Martin Storsjö [Wed, 29 Apr 2020 07:34:08 +0000 (10:34 +0300)]
[clang] [MinGW] Add the compiler rt libdirs to the search path
This matches what is done for MSVC in
b8000c0ce84541c5b5535419234fb65ce77d6756. Since that commit, compiler
rt sanitizer libraries aren't linked to with absolute path on windows,
but using their basenames, requiring the libdirs to be passed to
the linker.
This fixes undefined behaviour sanitizer on MinGW after
b8000c0ce84541c5b5535419234fb65ce77d6756.
Differential Revision: https://reviews.llvm.org/D79076
Martin Storsjö [Mon, 27 Apr 2020 11:30:42 +0000 (14:30 +0300)]
[llvm-objcopy] [COFF] Fix a misconception about debug directory payloads
The debug directory payload is not located directly after the
debug directory entry itself, but can essentially be located anywhere
in the binary (even outside of mapped sections, although we don't
handle that case).
Differential Revision: https://reviews.llvm.org/D78921
Martin Storsjö [Mon, 27 Apr 2020 11:55:31 +0000 (14:55 +0300)]
[llvm-readobj] [COFF] Cope with debug directory payloads in unmapped areas
According to the spec, the payload for debug directories can be
in parts of the binary that aren't mapped at runtime - in these
cases, AddressOfRawData is just set to zero.
Differential Revision: https://reviews.llvm.org/D78920
Anh Tuyen Tran [Wed, 29 Apr 2020 17:20:37 +0000 (17:20 +0000)]
[VFDatabase] Scalar functions are vector functions with VF =1
Summary:
Return scalar function when VF==1. The new trivial mapping scalar --> scalar when VF==1 to prevent false positive for "isVectorizable" query.
Author: masoud.ataei (Masoud Ataei)
Reviewers: Whitney (Whitney Tsang), fhahn (Florian Hahn), pjeeva01 (Jeeva P.), fpetrogalli (Francesco Petrogalli), rengolin (Renato Golin)
Reviewed By: fpetrogalli (Francesco Petrogalli)
Subscribers: hiraditya (Aditya Kumar), llvm-commits, LLVM
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D78054
MaheshRavishankar [Wed, 29 Apr 2020 16:57:31 +0000 (09:57 -0700)]
[mlir][StandardToSPIRV] Handle conversion of cmpi operation with i1
type operands.
The instructions used to convert std.cmpi cannot have i1 types
according to SPIR-V specification. A different set of operations are
specified in the SPIR-V spec for comparing boolean types. Enhance the
StandardToSPIRV lowering to target these instructions when operands to
std.cmpi operation are of i1 type.
Differential Revision: https://reviews.llvm.org/D79049
Davide Italiano [Wed, 29 Apr 2020 16:58:07 +0000 (09:58 -0700)]
[MachineVerifier] Remove an unused function. NFCI.
Louis Dionne [Wed, 29 Apr 2020 16:52:59 +0000 (12:52 -0400)]
[libc++] NFC: Properly indent nested #ifs in platform_support.h
Jonas Devlieghere [Wed, 29 Apr 2020 16:51:24 +0000 (09:51 -0700)]
[debuginfo-tests] Update Python CMake variable
Louis Dionne [Wed, 29 Apr 2020 16:49:25 +0000 (12:49 -0400)]
[libc++] Re-disable parts of the failing RU locale tests on Apple
Instead of completely disabling the tests on Apple, which makes them
disabled on all platforms we test (and hence useless), this commit
disables only the assertions that actually fail. I also created a
bug report to track re-enabling them (https://llvm.org/PR45739).
Mircea Trofin [Wed, 29 Apr 2020 16:04:14 +0000 (09:04 -0700)]
[llvm][NFC] Removed addressed fixme; formatting.
Removed already-addressed fixme, and updated formatting of a few lines
that were triggering Harbormaster.
Louis Dionne [Wed, 29 Apr 2020 16:00:13 +0000 (12:00 -0400)]
[libc++] Try re-enabling long-disabled locale tests on Apple platforms
These two locale tests are disabled because they were said to "pass in
an uncontrolled manner on Apple platforms". This commit re-enables them
to see what that means, and whether that is still relevant on the
platforms we test.
Before this commit, the tests were either XFAILed or UNSUPPORTED on
Apple and Linux, which is pretty much all the systems we support. If
the tests truly don't work anywhere, they should be removed instead.
Hiroshi Yamauchi [Mon, 27 Apr 2020 17:55:55 +0000 (10:55 -0700)]
[PGO][PGSO] Prep for enabling non-cold code size opts under non-partial-profile sample PGO.
Summary:
- Distinguish between partial-profile and non-partial-profile sample PGO.
- Add a flag for partial-profile sample PGO.
- Tune the sample PGO cutoff.
- No default behavior change (yet).
Reviewers: davidxl
Subscribers: eraman, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78949
Simon Pilgrim [Wed, 29 Apr 2020 15:47:10 +0000 (16:47 +0100)]
[x86] Enable bypassing 64-bit division on generic x86-64
This is currently enabled for Intel big cores from Sandy Bridge onward, as well as Atom, Silvermont, and KNL, due to 64-bit division being so slow on these cores. AMD cores can do this in hardware (use 32-bit division based on input operand width), so it's not a win there. But since the majority of x86 CPUs benefit from this optimization, and since the potential upside is significantly greater than the downside, we should enable this for the generic x86-64 target.
Patch By: @atdt
Reviewed By: @craig.topper, @RKSimon
Differential Revision: https://reviews.llvm.org/D75567
Louis Dionne [Wed, 29 Apr 2020 15:52:02 +0000 (11:52 -0400)]
[libc++] Mark two timed_mutex tests as flaky
Nico Weber [Wed, 29 Apr 2020 15:51:10 +0000 (11:51 -0400)]
[gn build] (manually) port
ad97ccf6b26a
Victor Campos [Wed, 15 Apr 2020 15:51:00 +0000 (16:51 +0100)]
[AArch64] Remove inexistent system register ERXTS_EL1
Summary:
AArch64's system register ERXTS_EL1 is present in the backend as a
component of the Arm Reliability, Availability and Serviceability (RAS)
extension. However, it has been removed from the specification before
its final release.
This patch removes the register.
Reviewers: SjoerdMeijer, DavidSpickett
Reviewed By: DavidSpickett
Subscribers: DavidSpickett, kristof.beyls, hiraditya, danielkiss, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79007
Mircea Trofin [Tue, 28 Apr 2020 21:50:06 +0000 (14:50 -0700)]
[llvm][NFC] Change parameter type to more specific CallBase in IndirectCallPromotion
Reviewers: dblaikie, craig.topper, wmi
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79047
Louis Dionne [Wed, 29 Apr 2020 15:30:37 +0000 (11:30 -0400)]
[libc++] Try re-enabling DSL test on Windows
The issue we were seeing before should have been fixed by
178a0c80baab.
David Zarzycki [Wed, 29 Apr 2020 14:31:56 +0000 (10:31 -0400)]
[libclang] Shared libraries require PIC unless WIN32
Wen-Heng (Jack) Chung [Wed, 29 Apr 2020 15:12:19 +0000 (17:12 +0200)]
[mlir][std] allow subview take memrefs from non-zero addrspaces.
On certain targets std.subview should be able to take memrefs from non-zero
addrspaces. Improve lowering logic to llvm dialect and amend the tests.
Differential Revision: https://reviews.llvm.org/D79024
Simon Pilgrim [Wed, 29 Apr 2020 15:11:26 +0000 (16:11 +0100)]
Revert rG5c4b4a62256876 "PseudoSourceValue.h - reduce GlobalValue.h include to forward declaration. NFC."
Causes buildbot failures.
Wen-Heng (Jack) Chung [Wed, 29 Apr 2020 15:06:44 +0000 (17:06 +0200)]
[mlir][vector] let transfer_read and transfer_write take non-zero addrspace.
Enhance lowering logic and tests so vector.transfer_read and
vector.transfer_write take memrefs on non-zero addrspaces.
Differential Revision: https://reviews.llvm.org/D79023
Jay Foad [Wed, 29 Apr 2020 14:46:33 +0000 (15:46 +0100)]
[AMDGPU] Use a MapVector instead of a DenseMap and a std::vector. NFC.
Jay Foad [Wed, 29 Apr 2020 13:10:56 +0000 (14:10 +0100)]
[AMDGPU] Minor cleanups. NFC.
Kirill Bobyrev [Wed, 29 Apr 2020 14:59:32 +0000 (16:59 +0200)]
[clangd] Add CMake dependencies for Protobuf-generated files
Summary:
Dependencies ensure that Protobufs are generated before all libraries
depending on the headers are **built**, not linked.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D79085
Simon Pilgrim [Wed, 29 Apr 2020 14:05:59 +0000 (15:05 +0100)]
PseudoSourceValue.h - reduce GlobalValue.h include to forward declaration. NFC.
Fix MachineMemOperand.h implicit dependency on Type.h via PseudoSourceValue.h
Aaron Ballman [Wed, 29 Apr 2020 14:33:21 +0000 (10:33 -0400)]
Fixing typo (singed -> signed); NFC
Sean Fertile [Wed, 29 Apr 2020 13:27:54 +0000 (09:27 -0400)]
Revert "[ELF][PPC64] Don't perform toc-indirect to toc-relative relax... "
This reverts commit
03ffe5860549e97a0f2d8262b100e8910f61c528.
Full tile of reverted commit is:
[ELF][PPC64] Don't perform toc-indirect to toc-relative relaxation for
R_PPC64_TOC16_HA not followed by R_PPC64_TOC16_LO_DS
Breaks the multistage lld PowerPC buildbot.
Pavel Labath [Wed, 29 Apr 2020 14:14:41 +0000 (16:14 +0200)]
[lldb/DWARF] Fix a split-dwarf crash while parsing compile units
The cause of this crash is relatively simple -- we are using a
SymbolFileDWARFDwo to parse a (skeleton) dwarf unit. This cause the
CompileUnit to be created with the wrong ID, which later triggers an
assertion in SymbolFile::SetCompileUnitAtIndex. The fix is also simple
-- ensure we use the right symbol file for parsing.
However, a fairly elaborate setup is needed trigger this bug, because
ParseCompileUnit is normally called very early on (and with the right
symbol file object) during the process of accessing a compile unit.
The only way this can be triggered is if the DWARF unit is
"accidentally" pulled into scope during expression evaluation
This can happen if the "this" object used for the context of an
expression is in a namespace, and that namespace is also present in
other compile units
The included test recreates this setup.
Louis Dionne [Wed, 29 Apr 2020 13:56:52 +0000 (09:56 -0400)]
[libc++] Fix MacOS platform detection broken in Python 3
Since
88af3ddb1e8a, libc++ will prefer Python 3 when available. It is
available on Apple platforms, so subprocess.check_output will return
bytes instead of str. This lead to comparisons against str to be false,
and the MacOS platform not being detected properly.
Sam McCall [Tue, 28 Apr 2020 15:49:17 +0000 (17:49 +0200)]
[clangd] Move non-clang base pieces into separate support/ lib. NFCI
Summary:
This enforces layering, reduces a sprawling clangd/ directory, and makes life
easier for embedders.
Reviewers: kbobyrev
Subscribers: mgorny, ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, jfb, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D79014
Hans Wennborg [Wed, 29 Apr 2020 13:12:43 +0000 (15:12 +0200)]
Revert 6654719 "[CMake] Fix logic error: NOT LIBCLANG_BUILD_STATIC does not imply PIC"
It broke building libclang.dll in Windows builds configured with
LLVM_ENABLE_PIC=OFF. See discussion on the cfe-commits thread.
Sander de Smalen [Wed, 29 Apr 2020 10:59:57 +0000 (11:59 +0100)]
[SveEmitter] Add builtins for svmov_b and svnot_b.
These are custom expanded in CGBuiltin:
svmov_b_z(pg, op) <=> svand_b_z(pg, op, op)
svnot_b_z(pg, op) <=> sveor_b_z(pg, op, pg)
Reviewers: SjoerdMeijer, efriedma, ctetreau, rengolin
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D79039
Valeriy Savchenko [Wed, 29 Apr 2020 12:20:57 +0000 (15:20 +0300)]
[analyzer] Fix build error. NFC.
Move DenseMapInfo specialization to llvm namespace
Sam Parker [Wed, 29 Apr 2020 11:42:47 +0000 (12:42 +0100)]
[NFC][ARM] Modify cost model test
Sam Parker [Wed, 29 Apr 2020 11:36:05 +0000 (12:36 +0100)]
[NFC][ARM] Add two cost model tests
Simon Pilgrim [Wed, 29 Apr 2020 11:21:05 +0000 (12:21 +0100)]
Fix Wparentheses gcc warning. NFC.
It should be either a float(32) or an int(32).
Simon Pilgrim [Wed, 29 Apr 2020 10:39:13 +0000 (11:39 +0100)]
[TTI] Add DemandedElts to getScalarizationOverhead
The improvements to the x86 vector insert/extract element costs in D74976 resulted in the estimated costs for vector initialization and scalarization increasing higher than should be expected. This is particularly noticeable on pre-SSE4 targets where the available of legal INSERT_VECTOR_ELT ops is more limited.
This patch does 2 things:
1 - it implements X86TTIImpl::getScalarizationOverhead to more accurately represent the typical costs of a ISD::BUILD_VECTOR pattern.
2 - it adds a DemandedElts mask to getScalarizationOverhead to permit the SLP's BoUpSLP::getGatherCost to be rewritten to use it directly instead of accumulating raw vector insertion costs.
This fixes PR45418 where a v4i8 (zext'd to v4i32) was no longer vectorizing.
A future patch should extend X86TTIImpl::getScalarizationOverhead to tweak the EXTRACT_VECTOR_ELT scalarization costs as well.
Reviewed By: @craig.topper
Differential Revision: https://reviews.llvm.org/D78216
Sander de Smalen [Wed, 29 Apr 2020 10:36:41 +0000 (11:36 +0100)]
[SveEmitter] Add builtins for gather prefetches
Patch by Andrzej Warzynski
Reviewed By: efriedma
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78677
Florian Hahn [Wed, 29 Apr 2020 09:22:30 +0000 (10:22 +0100)]
Recommit "[VPlan] Add & use VPValue operands for VPWidenRecipe (NFC)."
The crash that caused the original revert has been fixed in
a3c964a278b4. I also added a reduced version of the crash reproducer.
This reverts the revert commit
2107af9ccfdfe67a90ea9ed4f3bfd7c72c4e29ac.
Uday Bondhugula [Wed, 29 Apr 2020 00:08:23 +0000 (05:38 +0530)]
[MLIR] Introduce op trait PolyhedralScope (revised)
(A previous version of this,
dd2c639c3cd397dfef941186fb85c82e4e918425, was
reverted.)
Introduce op trait PolyhedralScope for ops to define a new scope for
polyhedral optimization / affine dialect purposes, thus generalizing
such scopes beyond FuncOp. Ops to which this trait is attached will
define a new scope for the consideration of SSA values as valid symbols
for the purposes of polyhedral analysis and optimization. Update methods
that check for dim/symbol validity to work based on this trait.
Differential Revision: https://reviews.llvm.org/D79060
Valeriy Savchenko [Wed, 22 Apr 2020 15:15:03 +0000 (18:15 +0300)]
[analyzer] Track runtime types represented by Obj-C Class objects
Summary:
Objective-C Class objects can be used to do a dynamic dispatch on
class methods. The analyzer had a few places where we tried to overcome
the dynamic nature of it and still guess the actual function that
is being called. That was done mostly using some simple heuristics
covering the most widespread cases (e.g. [[self class] classmethod]).
This solution introduces a way to track types represented by Class
objects and work with that instead of direct AST matching.
rdar://problem/
50739539
Differential Revision: https://reviews.llvm.org/D78286
Florian Hahn [Wed, 29 Apr 2020 09:30:05 +0000 (10:30 +0100)]
[DSE,MSSA] Add multi-path tests with readnone throwing calls.
Jonas Devlieghere [Wed, 29 Apr 2020 08:23:49 +0000 (01:23 -0700)]
Revert "[lldb/Platform] Return a std::string from GetSDKPath"
This reverts commit
b14c37a29a5455853419f5fe0605f6023c51de89.
Jay Foad [Mon, 27 Apr 2020 16:15:33 +0000 (17:15 +0100)]
[AMDGPU] Remove some redundant variables. NFC.
Dmitri Gribenko [Wed, 29 Apr 2020 07:12:47 +0000 (09:12 +0200)]
Fixed a -Wunused-variable warning in no-assert builds
Vitaly Buka [Wed, 29 Apr 2020 06:56:07 +0000 (23:56 -0700)]
Revert "[tsan] Relax stack trace check"
Edited hwasan by mistake.
This reverts commit
a3b942edc8074dce139bac0643b568f840d7a6a0.
Vitaly Buka [Wed, 29 Apr 2020 06:51:03 +0000 (23:51 -0700)]
[tsan] Relax stack trace check
With GCC 8 stack is different.
Richard Smith [Wed, 29 Apr 2020 06:41:11 +0000 (23:41 -0700)]
Make -fno-char8_t disable the char8_t keyword, even in C++20.
This fixes a regression introduced in r354736, and makes our behavior
compatible with that of Clang 8 and GCC.
Richard Smith [Wed, 29 Apr 2020 06:22:53 +0000 (23:22 -0700)]
Fix up clangd after clang commit llvmorg-11-init-13375-g0a088ead85f.
It's not clear whether clangd should really consider #import to mark a
header as self-contained or not, but this change preserves the old (and
unit-tested) behavior.
Craig Topper [Wed, 29 Apr 2020 06:31:28 +0000 (23:31 -0700)]
[X86] Add initialize function for X86FixupSetCC so that it will show up in print-after-all.
David Blaikie [Wed, 29 Apr 2020 05:39:30 +0000 (22:39 -0700)]
Remove DeleteContainer* functions, now that all uses have been ported to unique_ptr
Kazuaki Ishizaki [Wed, 29 Apr 2020 05:47:35 +0000 (14:47 +0900)]
[mlir] NFC: fix trivial typo
Differential Revision: https://reviews.llvm.org/D79065
David Blaikie [Wed, 29 Apr 2020 04:03:57 +0000 (21:03 -0700)]
SymbolManager::SymbolDependencies: Use unique_ptr to simplify memory management
David Blaikie [Wed, 29 Apr 2020 03:54:57 +0000 (20:54 -0700)]
AnalysisDeclContext::ManagedAnalyses: Use unique_ptr to simplify memory management
David Blaikie [Wed, 29 Apr 2020 03:40:31 +0000 (20:40 -0700)]
CodeGenTypes::CGRecordLayouts: Use unique_ptr to simplify memory management
David Blaikie [Wed, 29 Apr 2020 03:18:01 +0000 (20:18 -0700)]
ASTContext::OMPTraitInfoVector: Use unique_ptr to simplify memory management
David Blaikie [Wed, 29 Apr 2020 02:14:58 +0000 (19:14 -0700)]
BugReporter::StrBugTypes: Use unique_ptr to simplify memory management
David Blaikie [Wed, 29 Apr 2020 01:59:40 +0000 (18:59 -0700)]
PragmaNamespace::Handlers: Use unique_ptr to simplify memory management
The API actually passes and returns ownership too, but the usage uis
complicated enough that I'm not going to unique_ptr-ify those add/remove
calls.
Chen Zheng [Wed, 29 Apr 2020 04:48:49 +0000 (00:48 -0400)]
[PowerPC-QPX] add more test for QPX madd/msub operands order - NFC
Nicolas Vasilache [Wed, 29 Apr 2020 04:30:31 +0000 (00:30 -0400)]
[mlir][EDSC] Retire OperationHandle
OperationHandle mostly existed to mirror the behavior of ValueHandle.
This has become unnecessary and can be retired.
Differential Revision: https://reviews.llvm.org/D78692
Muhammad Omair Javaid [Mon, 6 Apr 2020 11:28:01 +0000 (11:28 +0000)]
Fix LLDB elf core dump register access for ARM/AArch64
Summary:
This patch adds support to access AArch64 FP SIMD core dump registers and adds a test case to verify registers.
This patches fixes a bug where doing "register read --all" causes lldb to crash.
Reviewers: labath
Reviewed By: labath
Subscribers: kristof.beyls, danielkiss, lldb-commits
Differential Revision: https://reviews.llvm.org/D77793
Saleem Abdulrasool [Wed, 29 Apr 2020 03:49:51 +0000 (03:49 +0000)]
lldb: use the newer `find_package` if available
Now that the rest of LLVM prefers python3 over python2, the LLDB path
should follow suite. Add a fallback path to python2 for non-Windows
targets.
Muhammad Omair Javaid [Wed, 29 Apr 2020 02:48:45 +0000 (07:48 +0500)]
Extend max register size to accommodate AArch64 SVE vector regs
Summary: This patch increases maximum register size to 256 bytes to accommodate AArch64 SVE registers maximum possible size of 256 bytes.
Reviewers: labath, jankratochvil, rengolin
Reviewed By: labath
Subscribers: tschuett, kristof.beyls, danielkiss, lldb-commits
Differential Revision: https://reviews.llvm.org/D77044
Jonas Devlieghere [Wed, 29 Apr 2020 02:21:27 +0000 (19:21 -0700)]
[lldb/Host] Pass a StringRef to the FileSpec ctor
The FileSpec constructor takes a StringRef so there's no point in going
through a C string.
Jonas Devlieghere [Wed, 29 Apr 2020 02:20:06 +0000 (19:20 -0700)]
[lldb/Platform] Synchronize access to SDK String Map.
The SwiftASTContext queries this function in parallel and requires
synchronization.
Jonas Devlieghere [Wed, 29 Apr 2020 02:05:51 +0000 (19:05 -0700)]
[lldb/Platform] Return a std::string from GetSDKPath
Nothing guarantees that the objects in the StringMap remains at the same
address when the StringMap grows. Therefore we shouldn't return a
reference into the StringMap but return a copy of the string instead.
Xing GUO [Wed, 29 Apr 2020 02:16:06 +0000 (10:16 +0800)]
[dsymutil] Fix short options displayed in the help message.
This patch helps make the short options displayed in the help message be consistant with the description in https://llvm.org/docs/CommandGuide/dsymutil.html
Reviewed By: JDevlieghere, aprantl
Differential Revision: https://reviews.llvm.org/D78476
QingShan Zhang [Wed, 29 Apr 2020 01:35:30 +0000 (01:35 +0000)]
[DAGCombine] Checking the cost directly to improve the code readability
Call getNegatedExpression(Cost) and check the Cost to make the code more clear.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D78347
Nico Weber [Wed, 29 Apr 2020 01:43:38 +0000 (21:43 -0400)]
Reland "[gn build] (manually) merge c4c3883"
The Python3 change relanded yet again, so merge it yet again.
This reverts commit
f0019cdc47f59e94b9bc3291b83a9b4cec1bf62b.
This reverts commit
854a7db46c0a9750d9d9f932d5d49c3d64a85153.
Richard Smith [Wed, 29 Apr 2020 01:22:34 +0000 (18:22 -0700)]
Improve diagnostics for missing import / #include of module.
Fix a few bugs where we would fail to properly determine header to
module correspondence when determining whether to suggest a #include or
import, and suggest a #include more often in language modes where there
is no import syntax. Generally, if the target is in a header with
include guards or #pragma once, we should suggest either #including or
importing that header, and not importing a module that happens to
textually include it.
In passing, improve the notes we attach to the corresponding
diagnostics: calling an entity that we couldn't see "previous" is
confusing.
Saleem Abdulrasool [Wed, 29 Apr 2020 01:37:28 +0000 (01:37 +0000)]
Revert "Temporarily revert "build: use `find_package(Python3)` if available""
This reverts commit
35edd704e0fda09e8e634515c0b451d4a8b6b914.
Revert the revert and extend the patch further to account for the use of
the `PYTHONINTERP_FOUND`.
David Blaikie [Wed, 29 Apr 2020 01:05:28 +0000 (18:05 -0700)]
ASTWriter::FileDeclIDs: Use unique_ptr to simplify memory management
David Blaikie [Wed, 29 Apr 2020 00:58:53 +0000 (17:58 -0700)]
ASTUnit::FileDecls: Use unique_ptr to simplify memory management
LLVM GN Syncbot [Wed, 29 Apr 2020 00:53:06 +0000 (00:53 +0000)]
[gn build] Port
8683f5de535
Nico Weber [Wed, 29 Apr 2020 00:52:51 +0000 (20:52 -0400)]
[gn build] fix typo
Nico Weber [Wed, 29 Apr 2020 00:47:26 +0000 (20:47 -0400)]
Revert "[gn build] (manually) merge c4c3883"
This reverts commit
cbaa74a0981833537e88a8eeac9c9df0f528833c.
The Py3 change got (mostly, except compiler-rt) reverted again.
David Blaikie [Wed, 29 Apr 2020 00:45:07 +0000 (17:45 -0700)]
AllocatedCXCodeCompleteResults::DiagnosticWrappers: use unique_ptr to simplify memory management
David Blaikie [Tue, 28 Apr 2020 21:31:43 +0000 (14:31 -0700)]
WebAssemblyExceptionInfo::Exceptions: Use unique_ptr to simplify memory management
David Blaikie [Tue, 28 Apr 2020 19:47:06 +0000 (12:47 -0700)]
InstrCOPYReplacer::Converters: Use unique_ptr to own values to simplify memory management
Paula Toth [Wed, 29 Apr 2020 00:22:16 +0000 (17:22 -0700)]
[clang-tidy] Add check callee-namespace.
Summary:
This check will ensure that all calls to functions resolve to one inside the `__llvm_libc` namespace.
This is done to ensure that if we include a public header then we don't accidentally call into the a function within the global namespace.
Reviewers: aaron.ballman, njames93
Reviewed By: aaron.ballman
Subscribers: Eugene.Zelenko, mgorny, xazax.hun, cfe-commits, sivachandra
Tags: #clang-tools-extra, #libc-project, #clang
Differential Revision: https://reviews.llvm.org/D78890
Jez Ng [Tue, 28 Apr 2020 23:58:22 +0000 (16:58 -0700)]
[lld-macho][reland] Add support for emitting dylibs with a single symbol
This got reverted due to UBSAN errors in a diff lower in the stack,
which is being fixed in https://reviews.llvm.org/D79050. This diff is
otherwise identical to the original https://reviews.llvm.org/D76908
(which was committed in
9598778bd191 and reverted in
b52bc2653bbc).
Differential Revision: https://reviews.llvm.org/D79051
Jez Ng [Tue, 28 Apr 2020 23:58:19 +0000 (16:58 -0700)]
[lld-macho][reland] Add basic symbol table output
This diff implements basic support for writing a symbol table.
Attributes are loosely supported for extern symbols and not at all for
other types.
Initial version by Kellie Medlin <kelliem@fb.com>
Originally committed in
a3d95a50ee33 and reverted in
fbae153ca583 due to
UBSAN erroring over unaligned writes. That has been fixed in the
current diff with the following changes:
```
diff --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp
--- a/lld/MachO/SyntheticSections.cpp
+++ b/lld/MachO/SyntheticSections.cpp
@@ -133,6 +133,9 @@ SymtabSection::SymtabSection(StringTableSection &stringTableSection)
: stringTableSection(stringTableSection) {
segname = segment_names::linkEdit;
name = section_names::symbolTable;
+ // TODO: When we introduce the SyntheticSections superclass, we should make
+ // all synthetic sections aligned to WordSize by default.
+ align = WordSize;
}
size_t SymtabSection::getSize() const {
diff --git a/lld/MachO/Writer.cpp b/lld/MachO/Writer.cpp
--- a/lld/MachO/Writer.cpp
+++ b/lld/MachO/Writer.cpp
@@ -371,6 +371,7 @@ void Writer::assignAddresses(OutputSegment *seg) {
ArrayRef<InputSection *> sections = p.second;
for (InputSection *isec : sections) {
addr = alignTo(addr, isec->align);
+ // We must align the file offsets too to avoid misaligned writes of
+ // structs.
+ fileOff = alignTo(fileOff, isec->align);
isec->addr = addr;
addr += isec->getSize();
fileOff += isec->getFileSize();
@@ -396,6 +397,7 @@ void Writer::writeSections() {
uint64_t fileOff = seg->fileOff;
for (auto § : seg->getSections()) {
for (InputSection *isec : sect.second) {
+ fileOff = alignTo(fileOff, isec->align);
isec->writeTo(buf + fileOff);
fileOff += isec->getFileSize();
}
```
I don't think it's easy to write a test for alignment (that doesn't
involve brittly hard-coding file offsets), so there isn't one... but
UBSAN builds pass now.
Differential Revision: https://reviews.llvm.org/D79050
Sterling Augustine [Tue, 28 Apr 2020 22:19:58 +0000 (15:19 -0700)]
Make getCompileUnitForAddress public.
Summary:
Certain dwarf information (like the compilation directory), are only
accessible from the compile unit. Make it available for use.
Subscribers: aprantl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79048
Eric Christopher [Tue, 28 Apr 2020 23:41:22 +0000 (16:41 -0700)]
Temporarily revert "build: use `find_package(Python3)` if available"
as it seems to be causing multiple people problems with running tests
and building.
This reverts commit
c4c3883b00d3a6aa657a5e3e515c90c9ea1f81c6.
Stanislav Mekhanoshin [Thu, 23 Apr 2020 22:10:25 +0000 (15:10 -0700)]
[AMDGPU] Adapt GCNRegBankReassign for 16 bit subregs
It allows it not to crash and analyze 16 bit subregs if those
appear in the instructions. At the same time it does not attempt
to reassign these. It still can correctly identify register
banks to let larger registers to be reassigned.
More work will be needed here when real instructions will use
these registers and more tests as well.
Differential Revision: https://reviews.llvm.org/D78772
Paula Toth [Tue, 28 Apr 2020 23:14:37 +0000 (16:14 -0700)]
[libc] Add strlen to library entrypoints.
Reviewers: sivachandra, abrachet
Reviewed By: abrachet
Subscribers: mgorny, tschuett, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D79016
Sam McCall [Tue, 28 Apr 2020 22:55:13 +0000 (00:55 +0200)]
Reland "Add a facility to get system cache directory and use it in clangd"
This reverts commit
faf2dce1dd6ae25aa75d2685ac7bb27ec31e2ced.
Eric Christopher [Tue, 28 Apr 2020 22:48:56 +0000 (15:48 -0700)]
Temporarily revert "Add a facility to get system cache directory and use it in clangd"
This reverts commit
ad38f4b371bdca214e3a3cda9a76ec2213215c68.
As it broke building the unittests:
.../sources/llvm-project/llvm/unittests/Support/Path.cpp:334:5: error: use of undeclared identifier 'set'
set(Value);
^
1 error generated.