Simon Pilgrim [Fri, 26 Jun 2020 11:59:08 +0000 (12:59 +0100)]
Triple.h - reduce Twine.h include to forward declarations. NFC.
Move include down to a number of other files that had an implicit dependency on the Twine class.
David Zarzycki [Tue, 23 Jun 2020 09:43:51 +0000 (05:43 -0400)]
[clang driver] Move default module cache from system temporary directory
1) Shared writable directories like /tmp are a security problem.
2) Systems provide dedicated cache directories these days anyway.
3) This also refines LLVM's cache_directory() on Darwin platforms to use
the Darwin per-user cache directory.
Reviewers: compnerd, aprantl, jakehehrlich, espindola, respindola, ilya-biryukov, pcc, sammccall
Reviewed By: compnerd, sammccall
Subscribers: hiraditya, llvm-commits, cfe-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D82362
Bevin Hansson [Wed, 22 Jan 2020 13:53:11 +0000 (14:53 +0100)]
[AST] Fix certain consteval assignment and comma operator issues with fixed-point types.
Summary:
Assignment and comma operators for fixed-point types were being constevaled as other
binary operators, but they need special treatment.
Reviewers: rjmccall, leonardchan, bjope
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73189
Bevin Hansson [Wed, 22 Jan 2020 12:20:12 +0000 (13:20 +0100)]
[AST] Improve overflow diagnostics for fixed-point constant evaluation.
Summary:
Diagnostics for overflow were not being produced for fixed-point
evaluation. This patch refactors a bit of the evaluator and adds
a proper diagnostic for these cases.
Reviewers: rjmccall, leonardchan, bjope
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73188
Bevin Hansson [Wed, 22 Jan 2020 09:10:54 +0000 (10:10 +0100)]
[AST] Add fixed-point division constant evaluation.
Reviewers: rjmccall, leonardchan, bjope
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73187
Bevin Hansson [Tue, 21 Jan 2020 13:17:30 +0000 (14:17 +0100)]
[AST] Add fixed-point multiplication constant evaluation.
Reviewers: rjmccall, leonardchan, bjope
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73186
Bevin Hansson [Fri, 10 Jan 2020 12:54:58 +0000 (13:54 +0100)]
[AST] Add fixed-point subtraction constant evaluation.
Reviewers: rjmccall, leonardchan
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73185
Simon Pilgrim [Fri, 26 Jun 2020 10:46:52 +0000 (11:46 +0100)]
TargetSubtargetInfo.h - remove unnecessary forward declarations. NFC.
We have to include MCSubtargetInfo.h
Simon Pilgrim [Fri, 26 Jun 2020 10:32:57 +0000 (11:32 +0100)]
MemorySSAUpdater.h - remove unnecessary WeakVH forward declaration. NFC.
We have to include ValueHandle.h
Xing GUO [Fri, 26 Jun 2020 11:24:25 +0000 (19:24 +0800)]
[DWARFYAML][debug_info] Teach yaml2obj emit correct DWARF64 unit header.
This patch helps teach yaml2obj emit correct DWARF64 unit header of the .debug_info section.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D82621
Guillaume Chatelet [Fri, 26 Jun 2020 11:08:27 +0000 (11:08 +0000)]
[Alignment][NFC] Migrate TTI::getGatherScatterOpCost to Align
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Differential Revision: https://reviews.llvm.org/D82577
Guillaume Chatelet [Fri, 26 Jun 2020 11:00:53 +0000 (11:00 +0000)]
[Alignment][NFC] Migrate TTI::getInterleavedMemoryOpCost to Align
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Differential Revision: https://reviews.llvm.org/D82573
Raphael Isemann [Fri, 26 Jun 2020 10:55:42 +0000 (12:55 +0200)]
[lldb][NFC] Make TestDollarInVariable a non-inline test
Jay Foad [Fri, 26 Jun 2020 10:29:10 +0000 (11:29 +0100)]
[AMDGPU] Use std::pair to return two values. NFC.
Cullen Rhodes [Thu, 25 Jun 2020 16:01:00 +0000 (16:01 +0000)]
[AArch64][SVE2] Guard while intrinsics on scalar bfloat feature macro
Summary:
`svwhilerw_bf16` and `svwhilewr_bf16` intrinsics use the scalar
`bfloat16_t`
type which is predicated on `__ARM_FEATURE_BF16_SCALAR_ARITHMETIC`. This
patch changes the feature guard from `__ARM_FEATURE_SVE_BF16` to the
scalar bfloat feature macro.
The verify tests for `+bf16` are also removed in this patch. The purpose
of these checks was to match the SVE2 ACLE tests that look for an
implicit declaration warning if the feature isn't set. They worked when
the intrinsics were guarded on `__ARM_FEATURE_SVE_BF16` as the
`bfloat16_t`
was guarded on a different macro, but with both the type and intrinsic
guarded on the same macro an earlier error is triggered in the ACLE
regarding the type and we don't get a warning as we do for SVE2.
Reviewers: sdesmalen, fpetrogalli, kmclaughlin, rengolin, efriedma
Reviewed By: sdesmalen, fpetrogalli
Differential Revision: https://reviews.llvm.org/D82578
Guillaume Chatelet [Fri, 26 Jun 2020 10:14:16 +0000 (10:14 +0000)]
[Alignment][NFC] Migrate TTI::getMaskedMemoryOpCost to Align
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Differential Revision: https://reviews.llvm.org/D82569
Kerry McLaughlin [Fri, 26 Jun 2020 09:47:18 +0000 (10:47 +0100)]
[AArch64][SVE] Add bfloat16 support to store intrinsics
Summary:
Bfloat16 support added for the following intrinsics:
- ST1
- STNT1
Reviewers: sdesmalen, c-rhodes, fpetrogalli, efriedma, stuij, david-arm
Reviewed By: fpetrogalli
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D82448
Simon Pilgrim [Fri, 26 Jun 2020 09:48:40 +0000 (10:48 +0100)]
LoopVectorize.h - reduce AliasAnalysis.h include to forward declaration. NFC.
Replace legacy AliasAnalysis typedef with AAResults where necessary.
Pavel Labath [Tue, 23 Jun 2020 13:40:36 +0000 (15:40 +0200)]
[lldb/Unwind] Use eh_frame plan directly when it doesn't need to be augmented
Summary:
This fixes a bug in the logic for choosing the unwind plan. Based on the
comment in UnwindAssembly-x86, the intention was that a plan which
describes the function epilogue correctly does not need to be augmented
(and it should be used directly). However, the way this was implemented
(by returning false) meant that the higher level code
(FuncUnwinders::GetEHFrameAugmentedUnwindPlan) interpreted this as a
failure to produce _any_ plan and proceeded with other fallback options.
The fallback usually chosed for "asynchronous" plans was the
"instruction emulation" plan, which tended to fall over on certain
functions with multiple epilogues (that's a separate bug).
This patch simply changes the function to return true, which signals the
caller that the unmodified plan is ready to be used.
The attached test case demonstrates the case where we would previously
fall back to the instruction emulation plan, and unwind incorrectly --
the test asserts that the "augmented" eh_frame plan is used, and that
the unwind is correct.
Reviewers: jasonmolenda, jankratochvil
Subscribers: davide, echristo, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D82378
Pavel Labath [Fri, 26 Jun 2020 09:32:22 +0000 (11:32 +0200)]
[lldb] Rewrite Scalar::Promote
This function was implementing c-like promotion rules by switching on
the both types. C promotion rules are complicated, but they are not
*that* complicated -- they basically boil down to:
- wider types trump narrower ones
- unsigned trump signed
- floating point trumps integral
With a couple of helper functions, we can rewrite the function in terms
of these rules and greatly reduce the size and complexity of this
function.
Kerry McLaughlin [Fri, 26 Jun 2020 08:48:53 +0000 (09:48 +0100)]
[AArch64][SVE] Predicate bfloat16 load patterns with HasBF16
Reviewers: sdesmalen, c-rhodes, efriedma, fpetrogalli
Reviewed By: fpetrogalli
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82464
Cullen Rhodes [Wed, 24 Jun 2020 16:00:41 +0000 (16:00 +0000)]
[AArch64][SVE] Guard perm and select bfloat16 intrinsic patterns
Summary:
Permutation and selection bfloat16 intrinsic patterns should be guarded
on the feature flag `+bf16`. Missed in D82182 and D80850.
Reviewers: sdesmalen, fpetrogalli, kmclaughlin, efriedma
Reviewed By: fpetrogalli
Differential Revision: https://reviews.llvm.org/D82492
David Green [Fri, 26 Jun 2020 08:01:56 +0000 (09:01 +0100)]
[ARM] VCVTT fpround instruction selection
Similar to the recent patch for fpext, this adds vcvtb and vcvtt with
insert into vector instruction selection patterns for fptruncs. This
helps clear up a lot of register shuffling that we would otherwise do.
Differential Revision: https://reviews.llvm.org/D81637
Simon Pilgrim [Fri, 26 Jun 2020 08:57:41 +0000 (09:57 +0100)]
Constants.h - remove unnecessary forward declarations. NFC.
We have to include DerivedTypes.h
Simon Pilgrim [Thu, 25 Jun 2020 17:32:47 +0000 (18:32 +0100)]
MemoryLocation.h - reduce Instruction.h include to forward declaration. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 17:12:55 +0000 (18:12 +0100)]
LiveRangeEdit.h - reduce AliasAnalysis.h include to forward declaration. NFC.
Move include to LiveRangeEdit.cpp and replace legacy AliasAnalysis typedef with AAResults where necessary.
Simon Pilgrim [Thu, 25 Jun 2020 16:48:29 +0000 (17:48 +0100)]
Fix some clang-tidy namespace closing comments warnings. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 16:46:23 +0000 (17:46 +0100)]
VNCoercion.cpp - remove unused includes. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 16:28:41 +0000 (17:28 +0100)]
AggressiveInstCombineInternal.h - reduce unnecessary includes to forward declarations. NFC.
Kadir Cetinkaya [Fri, 26 Jun 2020 08:31:13 +0000 (10:31 +0200)]
[CodeComplete] Tweak code completion for `typename`.
Summary:
Currently, clangd always completes `typename` as `typename qualifier::name`, I think the current behavior is not useful when the code completion is triggered in `template <>`. So I tweak it to `typename identifier`.
Patch by @lh123 !
Reviewers: sammccall, kadircet
Reviewed By: kadircet
Subscribers: ilya-biryukov, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82373
Tres Popp [Fri, 26 Jun 2020 08:12:04 +0000 (10:12 +0200)]
Prevent unused error when assertions are disabled.
David Green [Fri, 26 Jun 2020 07:02:26 +0000 (08:02 +0100)]
[ARM] VCVTT instruction selection
We current extract and convert from a top lane of a f16 vector using a
VMOVX;VCVTB pair. We can simplify that to use a single VCVTT. The
pattern is mostly copied from a vector extract pattern, but produces a
VCVTTHS f32 directly.
This had to move some code around so that ARMInstrVFP had access to the
required pattern frags that were previously part of ARMInstrNEON.
Differential Revision: https://reviews.llvm.org/D81556
Tobias Gysi [Fri, 26 Jun 2020 07:47:01 +0000 (09:47 +0200)]
[mlir] parallel loop canonicalization
Summary:
The patch introduces a canonicalization pattern for parallel loops. The pattern removes single-iteration loop dimensions if the loop bounds and steps are constants.
Reviewers: herhut, ftynse
Reviewed By: herhut
Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, Kayjukh, jurahul, msifontes
Tags: #mlir
Differential Revision: https://reviews.llvm.org/D82191
David Sherwood [Fri, 26 Jun 2020 07:13:27 +0000 (08:13 +0100)]
Remove "rm -f" workaround in acle_sve_adda.c
Craig Topper [Fri, 26 Jun 2020 07:14:58 +0000 (00:14 -0700)]
[X86] Make XSAVEC/XSAVEOPT/XSAVES properly depend on XSAVE in both the frontend and the backend.
These features implicitly enabled XSAVE in the frontend, but not
the backend. Disabling XSAVE in the frontend disabled XSAVEOPT, but
not the other 2. Nothing happened in the backend.
David Sherwood [Mon, 22 Jun 2020 13:09:34 +0000 (14:09 +0100)]
[SVE] Fix scalable vector bug in DataLayout::getIntPtrType
Fixed an issue in DataLayout::getIntPtrType where we were assuming
the input type was always a fixed vector type, which isn't true.
Added a test that exposed the problem to:
Transforms/InstCombine/vector_gep1.ll
Differential Revision: https://reviews.llvm.org/D82294
Sjoerd Meijer [Fri, 26 Jun 2020 06:46:38 +0000 (07:46 +0100)]
[SelectionDAG] Lower @llvm.get.active.lane.mask to setcc
This lowers intrinsic @llvm.get.active.lane.mask to a setcc node, i.e. an icmp
ule, and creates vectors for its 2 arguments on which the comparison is
performed.
Differential Revision: https://reviews.llvm.org/D82292
Sjoerd Meijer [Mon, 22 Jun 2020 10:39:31 +0000 (11:39 +0100)]
[ARM] Don't revert get.active.lane.mask in ARM Tail-Predication pass
Don't revert intrinsic get.active.lane.mask here, this is moved to isel
legalization in D82292.
Differential Revision: https://reviews.llvm.org/D82105
Craig Topper [Fri, 26 Jun 2020 05:55:36 +0000 (22:55 -0700)]
[X86] Add CMPXCHG16B feature to amdfam10 in the frontend.
We already have this feature on it in the backend.
Siva Chandra Reddy [Thu, 25 Jun 2020 19:09:02 +0000 (12:09 -0700)]
[libc] Add the remaining long double flavors of nearest integer functions.
Specifically: ceill, floorl and roundl have been added.
Reviewers: asteinhauser
Differential Revision: https://reviews.llvm.org/D82591
Louis Dionne [Fri, 26 Jun 2020 05:23:43 +0000 (01:23 -0400)]
[libc++] Fix the runtimes build after making __config_site mandatory
The runtimes build includes libcxx/include/CMakeLists.txt directly instead
of going through the top-level CMake file. This not-very-hygienic inclusion
caused some variables like LIBCXX_BINARY_DIR not to be defined properly,
and the config_site generation logic to fail after landing
53623d4aa710.
This patch works around this issue by defining the missing variables.
However, the proper fix for this would be for the runtimes build to
always go through libc++'s top-level CMakeLists.txt. Doing otherwise
is unsupported.
Igor Kudrin [Mon, 22 Jun 2020 16:22:18 +0000 (23:22 +0700)]
[DebugInfo] Fix emitting offsets to CUs with -dwarf-sections-as-references=Enable.
The size of the field depends on the DWARF format, not the address size
of the target.
Differential Revision: https://reviews.llvm.org/D82311
Louis Dionne [Fri, 15 May 2020 18:54:27 +0000 (14:54 -0400)]
[libc++] Always generate a __config_site header
Before this patch, the __config_site header was only generated when at
least one __config_site macro needed to be defined. This lead to two
different code paths in how libc++ is configured, depending on whether
a __config_site header was generated or not. After this patch, the
__config_site is always generated, but it can be empty in case there
are no macros to define in it.
More context on why this change is important
--------------------------------------------
In addition to being confusing, this double-code-path situation lead to
broken code being checked in undetected in
2405bd689815, which introduced
the LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT CMake setting. Specifically,
the _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT <__config_site> macro was
supposed NOT to be defined unless LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
was specified explicitly on the CMake command line. Instead, what happened
is that it was defined to 0 if it wasn't specified explicitly and a
<__config_site> header was generated. And defining that macro to 0 had
the important effect of using the non-unique RTTI comparison implementation,
which changes the ABI.
This change in behavior wasn't noticed because the <__config_site> header
is not generated by default. However, the Apple configuration does cause
a <__config_site> header to be generated, which lead to the wrong RTTI
implementation being used, and to https://llvm.org/PR45549. We came close
to an ABI break in the dylib, but were saved due to a downstream-only
change that overrode the decision of the <__config_site> for the purpose
of RTTI comparisons in libc++abi. This is an incredible luck that we should
not rely on ever again.
While the problem itself was fixed with
2464d8135e2a by setting
LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT explicitly in the Apple
CMake cache and then in
d0fcdcd28f95 by making the setting less
brittle, the point still is that we should have had a single code
path from the beginning. Unlike most normal libraries, the macros
that configure libc++ are really complex, there's a lot of them and
they control important properties of the C++ runtime. There must be
a single code path for that, and it must be simple and robust.
Differential Revision: https://reviews.llvm.org/D80927
Yaxun (Sam) Liu [Wed, 24 Jun 2020 21:34:21 +0000 (17:34 -0400)]
[HIP] Add missing options for lto
Add -mcpu, -mattr, -mllvm, and -save-temps options for lto when necessary.
Differential Revision: https://reviews.llvm.org/D82506
Michael Liao [Fri, 26 Jun 2020 03:54:03 +0000 (23:54 -0400)]
[hip] Refine `clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu`
- Require target x86 being enabled as well.
Yaxun (Sam) Liu [Thu, 25 Jun 2020 14:03:31 +0000 (10:03 -0400)]
[NFC] Extract unifyTargetFeatures
Differential Revision: https://reviews.llvm.org/D82579
Amy Kwan [Thu, 25 Jun 2020 23:04:00 +0000 (18:04 -0500)]
[PowerPC][Power10] Implement centrifuge, vector gather every nth bit, vector evaluate Builtins in LLVM/Clang
This patch implements builtins for the following prototypes:
unsigned long long __builtin_cfuged (unsigned long long, unsigned long long);
vector unsigned long long vec_cfuge (vector unsigned long long, vector unsigned long long);
unsigned long long vec_gnb (vector unsigned __int128, const unsigned int);
vector unsigned char vec_ternarylogic (vector unsigned char, vector unsigned char, vector unsigned char, const unsigned int);
vector unsigned short vec_ternarylogic (vector unsigned short, vector unsigned short, vector unsigned short, const unsigned int);
vector unsigned int vec_ternarylogic (vector unsigned int, vector unsigned int, vector unsigned int, const unsigned int);
vector unsigned long long vec_ternarylogic (vector unsigned long long, vector unsigned long long, vector unsigned long long, const unsigned int);
vector unsigned __int128 vec_ternarylogic (vector unsigned __int128, vector unsigned __int128, vector unsigned __int128, const unsigned int);
Differential Revision: https://reviews.llvm.org/D80970
Michael Liao [Fri, 26 Jun 2020 02:29:27 +0000 (22:29 -0400)]
[hip] Re-enable `clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu`
- Require amdgpu target being enabled.
Michael Liao [Fri, 26 Jun 2020 02:04:20 +0000 (22:04 -0400)]
[hip] Disable test temporarily due to failures on build servers.
Fangrui Song [Fri, 26 Jun 2020 01:28:12 +0000 (18:28 -0700)]
[CMake] Add optional lldb dependency to DEBUGINFO_TEST_DEPS
if(TARGET asan) is still brittle as it depends on the order of
compiler-rt and debuginfo-tests in LLVM_ENABLE_PROJECTS.
Arthur Eubanks [Wed, 24 Jun 2020 23:41:24 +0000 (16:41 -0700)]
[NewPM][BasicAA] Rename basicaa -> basic-aa, add alias
Summary:
BasicAA under the new pass manager is called "basic-aa", which fits more
with the other AA names which almost always contain a dash.
Keep an alias from basicaa -> basic-aa.
Will change all references of "basicaa" to "basic-aa", then remove the
alias.
Makes check-llvm failures under NPM go from 2307 to 1867.
Reviewers: asbirlea, ychen
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82607
Sam McCall [Fri, 26 Jun 2020 01:02:28 +0000 (03:02 +0200)]
[clangd] Fix test compile with GCC (name conflict)
Fangrui Song [Fri, 26 Jun 2020 00:56:22 +0000 (17:56 -0700)]
[CMake] Add optional asan & safestack dependencies to DEBUGINFO_TEST_DEPS
Michael Liao [Tue, 16 Jun 2020 04:08:16 +0000 (00:08 -0400)]
[InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.
Summary:
- `ptrtoint` and `inttoptr` are defined as no-op casts if the integer
value as the same size as the pointer value. The pair of
`ptrtoint`/`inttoptr` is in fact a no-op cast sequence between
different address spaces. Teach `infer-address-spaces` to handle them
like a `bitcast`.
Reviewers: arsenm, chandlerc
Subscribers: jvesely, wdng, nhaehnle, hiraditya, kerbowa, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D81938
Fangrui Song [Fri, 26 Jun 2020 00:35:01 +0000 (17:35 -0700)]
[debuginfo-tests] Require "lldb" for some dexter tests
Amara Emerson [Fri, 26 Jun 2020 00:21:37 +0000 (17:21 -0700)]
[AArch64][GlobalISel] Fix extended shift addressing mode selection not handling sxth.
The complex pattern for extended shift offsets only allow sxtw as the extend,
not sxth. Our equivalent function to do this was not rejecting SXTH so we
were miscompiling. This was exposed by D81992.
Jonas Devlieghere [Fri, 26 Jun 2020 00:14:47 +0000 (17:14 -0700)]
[lldb/ScriptInterpreter] Fix Windows error C2371: 'pid_t': redefinition
pyconfig.h(194): error C2371: 'pid_t': redefinition; different basic types
PosixApi.h(82): note: see declaration of 'pid_t'
Fangrui Song [Thu, 25 Jun 2020 23:49:05 +0000 (16:49 -0700)]
[CMake] Add llvm-config to DEBUGINFO_TEST_DEPS
Fix `fatal: Could not run process ['/path/to/build/./bin/llvm-config', '--build-mode']`
when running check-debuginfo in a fresh build directory.
Mehdi Amini [Thu, 25 Jun 2020 23:49:07 +0000 (23:49 +0000)]
Remove references to the 4.0 release as a major breaking (NFC)
This is cleaning up comments (mostly in the bitcode handling) about
removing some backward compatibility aspect in the 4.0 release.
Historically, "4.0" was used during the development of the 3.x
versions as "this future major breaking change version". At the time
the major number was used to indicate the compatibility. When we
reached 3.9 we decided to change the numbering, instead of going to
3.10 we went to 4.0 but after changing the meaning of the major
number to not mean anything anymore with respect to bitcode backward
compatibility.
The current policy
(https://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility)
indicates only now:
The current LLVM version supports loading any bitcode since version 3.0.
Differential Revision: https://reviews.llvm.org/D82514
Steven Wu [Thu, 25 Jun 2020 23:44:13 +0000 (16:44 -0700)]
[compiler-rt] Add support for arm64 macOS
Summary: Allow compiler-rt to build for arm64 support on macOS.
Reviewers: arphaman, doug.gregor, dexonsmith
Reviewed By: arphaman, dexonsmith
Subscribers: dberris, mgorny, kristof.beyls, jkorous, ributzka, danielkiss, #sanitizers, llvm-commits
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D82610
Louis Dionne [Thu, 25 Jun 2020 23:27:32 +0000 (19:27 -0400)]
[libc++] Add missing <stddef.h> include to <wchar.h>
It is needed because <wchar.h> uses size_t.
Davide Italiano [Thu, 25 Jun 2020 23:23:59 +0000 (16:23 -0700)]
[test] XFail TestStepNoDebug based on arch rather than OS
Davide Italiano [Thu, 25 Jun 2020 23:22:52 +0000 (16:22 -0700)]
[test] XFail TestSigtrampUnwind based on arch rather than OS
Davide Italiano [Thu, 25 Jun 2020 23:21:23 +0000 (16:21 -0700)]
[lldb/test] XFAIL TestHWBreakMultiThread on arch rather platform.
Davide Italiano [Thu, 25 Jun 2020 23:19:32 +0000 (16:19 -0700)]
[lldb/test] Skip TestBreakpointThumbCodesection on arm64.
This test relies on thumb, which is a 32-bits feature only.
Dan Gohman [Fri, 12 Jun 2020 19:05:40 +0000 (12:05 -0700)]
[WebAssembly] Add warnings for -shared and -pie
The meaning of -shared and -pie are expected to be changed in the
future when Module Linking-style libraries are implemented. Begin
issuing warnings to give people a heads-up that they will be changing.
For compatibility with Emscripten, add a --experimental-pic flag which
disables these warnings.
Differential Revision: https://reviews.llvm.org/D81760
Wouter van Oortmerssen [Mon, 15 Jun 2020 22:31:10 +0000 (15:31 -0700)]
[WebAssembly] Adding 64-bit versions of __stack_pointer and other globals
We have 6 globals, all of which except for __table_base are 64-bit under wasm64.
Differential Revision: https://reviews.llvm.org/D82130
Fangrui Song [Thu, 25 Jun 2020 21:39:08 +0000 (14:39 -0700)]
Louis Dionne [Thu, 25 Jun 2020 21:33:31 +0000 (17:33 -0400)]
[libc++] Remove unnecessary LLVM_INCLUDE_BENCHMARKS option in the Apple build
Since we're using an empty top-level CMakeLists.txt instead of the CMakeLists.txt
inside llvm/, we don't need to specify LLVM_INCLUDE_BENCHMARKS anymore.
Jessica Paquette [Tue, 16 Jun 2020 22:57:28 +0000 (15:57 -0700)]
[AArch64][GlobalISel] Port buildvector -> dup pattern from AArch64ISelLowering
Given this:
```
%x:_(<n x sK>) = G_BUILD_VECTOR %lane, ...
...
%y:_(<n x sK>) = G_SHUFFLE_VECTOR %x(<n x sK>), %foo, shufflemask(0, 0, ...)
```
We can produce:
```
%y:_(<n x sK) = G_DUP %lane(sK)
```
Doesn't seem to be too common, but AArch64ISelLowering attempts to do this
before trying to produce a DUPLANE. Might as well port it.
Also make it so that when the splat has an undef mask, we try setting it to
0. SDAG does this, and it makes sure that when we get the build vector operand,
we actually get a source operand.
Differential Revision: https://reviews.llvm.org/D81979
Paul Walker [Sun, 21 Jun 2020 04:17:40 +0000 (05:17 +0100)]
[MVT] Add missing floating point types for 1024/2048-bit vectors.
Summary:
This patch adds entries for:
v64f16
v128f16
v64bf16
v128bf16
v32f64
Subscribers: dschuff, hiraditya, aheejin, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82466
Philip Reames [Thu, 25 Jun 2020 20:08:06 +0000 (13:08 -0700)]
Migrate a couple of codegen tests to gc-live format
LLVM GN Syncbot [Thu, 25 Jun 2020 21:03:06 +0000 (21:03 +0000)]
[gn build] Port
e9fb1506b83
Sam McCall [Tue, 23 Jun 2020 15:21:56 +0000 (17:21 +0200)]
[clangd] Config: Fragments and parsing from YAML
Summary:
This is a piece from the design in https://tinyurl.com/clangd-config
https://reviews.llvm.org/D82335 is a draft with all the bits linked together.
It doesn't do anything yet, it's just a library + tests.
It deliberately implements a minimal set of actual configuration options.
Reviewers: kadircet, adamcz
Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82386
David Green [Thu, 25 Jun 2020 20:02:02 +0000 (21:02 +0100)]
[ARM] Split FPExt loads
This extends PerformSplittingToWideningLoad to also handle FP_Ext, as
well as sign and zero extends. It uses an integer extending load
followed by a VCVTL on the bottom lanes to efficiently perform an fpext
on a smaller than legal type.
The existing code had to be rewritten a little to not just split the
node in two and let legalization handle it from there, but to actually
split into legal chunks.
Differential Revision: https://reviews.llvm.org/D81340
Louis Dionne [Thu, 25 Jun 2020 20:31:14 +0000 (16:31 -0400)]
[libc++] Remove deprecated _LIBCPP_ALTERNATE_STRING_LAYOUT macro
We use the _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT macro for that now instead.
I did leave a check behind to make sure that nobody was still using the old
macro name. I'll remove it a couple of months down the road.
Sanjay Patel [Thu, 25 Jun 2020 19:43:40 +0000 (15:43 -0400)]
[x86] add vector test for merged condition branching; NFC
Philip Reames [Thu, 25 Jun 2020 19:33:32 +0000 (12:33 -0700)]
Migrate a couple of codegen tests to gc-live format
David Green [Thu, 25 Jun 2020 18:49:27 +0000 (19:49 +0100)]
[ARM] MVE VCVT lowering for f16->f32 extends
This adds code to lower f16 to f32 fp_exts's using an MVE VCVT
instructions, similar to a recent similar patch for fp_trunc. Again it
goes through the lowering of a BUILD_VECTOR, but is slightly simpler
only having to deal with interleaved indices. It adds a VCVTL node to
lower to, similar to VCVTN.
Differential Revision: https://reviews.llvm.org/D81339
Craig Topper [Thu, 25 Jun 2020 18:45:09 +0000 (11:45 -0700)]
[X86] Don't imply -mprfchw when -m3dnow is specified. Enable prefetchw in the backend with 3dnow feature.
The PREFETCHW instruction was originally part of the 3DNow. But
it was given its own CPUID bit on later CPUs just before 3DNow
was deprecated.
We were setting the -mprfchw flag if -m3dnow was passed or the CPU
supported 3dnow unless -mno-prfchw was passed. But -march=native
on a CPU without the PRFCHW CPUID bit set will pass -mno-prfchw.
So -march=k8 will behave differently than -march=native on a K8
for example.
So remove this implicit setting from the frontend and instead
enable the backend to use PREFETCHW if 3dnow OR prfchw is enabled.
Also enable PRFCHW flag on amdfam10/barcelona which seems to be
where this CPUID bit was introduced. That CPU also supported
3dnow.
Hubert Tong [Thu, 25 Jun 2020 19:41:33 +0000 (15:41 -0400)]
[NFC][Support] Add unit of measure to comment for PeakMemory
Hubert Tong [Thu, 25 Jun 2020 19:41:17 +0000 (15:41 -0400)]
[NFC][Support] Make Unix/Program.inc separately compilable
To improve CI checks, make `Unix/Program.inc` separately compilable.
Hubert Tong [Thu, 25 Jun 2020 19:40:07 +0000 (15:40 -0400)]
[Support][AIX] Add declaration of wait4 to fix build
While `wait4` is not documented for AIX, it is available; however, even
on systems where it is available, the system headers do not always
provide a declaration of the function. This patch provides a declaration
of `wait4` for AIX.
Reviewed By: daltenty
Differential Revision: https://reviews.llvm.org/D82282
Arthur O'Dwyer [Thu, 25 Jun 2020 19:31:03 +0000 (15:31 -0400)]
[libc++] Fix some typos in the comment header for <regex>
No functional change because all the changed "code" is actually inside
comments.
Differential Revision: https://reviews.llvm.org/D82589
Anatoly Trosinenko [Thu, 25 Jun 2020 19:32:41 +0000 (22:32 +0300)]
[builtins] Move more float128-related helpers to GENERIC_TF_SOURCES list
There are two different _generic_ lists of source files in the compiler-rt/lib/builtins/CMakeLists.txt. Now there is no simple way to not use the tf-variants of helpers at all.
Since there exists a separate `GENERIC_TF_SOURCES` list, it seems quite natural to move all float128-related helpers there. If it is not possible for some reason, it would be useful to have an explanation of that reason somewhere near the `GENERIC_TF_SOURCES` definition.
Differential Revision: https://reviews.llvm.org/D81282
Jonas Devlieghere [Thu, 25 Jun 2020 19:19:00 +0000 (12:19 -0700)]
[lldb/ScriptInterpreter] Fix missing include on Windows
Hiroshi Yamauchi [Thu, 25 Jun 2020 17:49:55 +0000 (10:49 -0700)]
[HIP] Improve check patterns to avoid test failures in case string "opt", etc. happens to be in the command path.
Similarly to D82046.
Differential Revision: https://reviews.llvm.org/D82586
Han Zhu [Thu, 25 Jun 2020 18:58:35 +0000 (11:58 -0700)]
[openmp] Use config.test_extra_flags in archer and multiplex tests
Summary:
`config.test_extra_flags` is passed in from `lit.site.cfg.in` files, but they're not used in the LIT configs. This variable can be useful for distros which don't have the standard c/c++ headers in the default search paths. Since the tests run clang on c/c++ source code, we rely on `test_extra_flags` to pass in the necessary header files.
This is a similar setup that's also done in litomptarget https://github.com/llvm/llvm-project/blob/master/openmp/libomptarget/test/lit.cfg#L42 and openmp/runtime.
Reviewers: jdoerfert, jdenny, protze.joachim
Reviewed By: jdoerfert
Subscribers: yaxunl, guansong, sstefan1, openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D82516
Mehdi Chinoune [Thu, 25 Jun 2020 17:38:08 +0000 (18:38 +0100)]
[flang] Replace ATTRIBUTE_UNUSED with LLVM_ATTRIBUTE_UNUSED
ATTRIBUTE_UNUSED wasn't defined with MSVC.
Patch by: Mehdi Chinoune <chinoune.mehdi@hotmail.com>
Differential Revision: https://reviews.llvm.org/D78356
Louis Dionne [Thu, 25 Jun 2020 18:03:48 +0000 (14:03 -0400)]
[libc++abi] NFCI: Minor refactoring of abort_message()
Remove small code duplication and add comments explaining why we do things
in a given order.
Craig Topper [Thu, 25 Jun 2020 18:43:02 +0000 (11:43 -0700)]
Revert "[X86] Don't imply -mprfchw when -m3dnow is specified. Enable prefetchw in the backend with 3dnow feature."
This is failing on the bots.
This reverts commit
636d31a5c341ff2ca5eefd6075ff059eb60b5a80.
David Green [Thu, 25 Jun 2020 15:02:36 +0000 (16:02 +0100)]
[ARM] Add FP_ROUND handling to splitting MVE stores
This splits MVE vector stores of a fp_trunc in the same way that we do
for standard trunc's. It extends PerformSplittingToNarrowingStores to
handle fp_round, splitting the store into pieces and adding a VCVTNb to
perform the actual fp_round. The actual store is then converted to an
integer store so that it can truncate bottom lanes of the result.
Differential Revision: https://reviews.llvm.org/D81141
Xun Li [Mon, 22 Jun 2020 21:38:41 +0000 (14:38 -0700)]
[Coroutines] Handle dependent promise types for final_suspend non-throw check
Summary:
Check that the co_await promise.final_suspend() does not potentially throw again after we have resolved dependent types.
This takes care of the cases where promises types are templated.
Added test cases for this scenario and confirmed that the checks happen now.
Also run libcxx tests locally to make sure all tests pass.
Reviewers: Benabik, lewissbaker, junparser, modocache
Reviewed By: modocache
Subscribers: modocache, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82332
Craig Topper [Thu, 25 Jun 2020 17:08:03 +0000 (10:08 -0700)]
[X86] Don't imply -mprfchw when -m3dnow is specified. Enable prefetchw in the backend with 3dnow feature.
The PREFETCHW instruction was originally part of the 3DNow. But
it was given its own CPUID bit on later CPUs just before 3DNow
was deprecated.
We were setting the -mprfchw flag if -m3dnow was passed or the CPU
supported 3dnow unless -mno-prfchw was passed. But -march=native
on a CPU without the PRFCHW CPUID bit set will pass -mno-prfchw.
So -march=k8 will behave differently than -march=native on a K8
for example.
So remove this implicit setting from the frontend and instead
enable the backend to use PREFETCHW if 3dnow OR prfchw is enabled.
Also enable PRFCHW flag on amdfam10/barcelona which seems to be
where this CPUID bit was introduced. That CPU also supported
3dnow.
LLVM GN Syncbot [Thu, 25 Jun 2020 18:14:55 +0000 (18:14 +0000)]
[gn build] Port
9878996c708
Hiroshi Yamauchi [Thu, 25 Jun 2020 17:58:13 +0000 (10:58 -0700)]
Revert "[PGO] Extend the value profile buckets for mem op sizes."
This reverts commit
63a89693f09f6b24ce4f2350d828150bd9c4f3e8.
Due to a build failure like http://lab.llvm.org:8011/builders/sanitizer-windows/builds/65386/steps/annotate/logs/stdio
Kirill Naumov [Tue, 2 Jun 2020 19:22:41 +0000 (19:22 +0000)]
[InlineCost] GetElementPtr with constant operands
If the GEP instruction contanins only constants as its arguments,
then it should be recognized as a constant. For now, there was
also added a flag to turn off this simplification if it causes
any regressions ("disable-gep-const-evaluation") which is off
by default. Once I gather needed data of the effectiveness of
this simplification, the flag will be deleted.
Reviewers: apilipenko, davidxl, mtrofin
Reviewed By: mtrofin
Differential Revision: https://reviews.llvm.org/D81026
LLVM GN Syncbot [Thu, 25 Jun 2020 17:59:53 +0000 (17:59 +0000)]
[gn build] Port
63a89693f09
David Goldman [Mon, 22 Jun 2020 14:50:54 +0000 (10:50 -0400)]
[Sema][CodeComplete][ObjC] Don't split the first selector fragment
Summary:
Standardize the formatting of selector fragments to include the ':',
e.g. for `- (void)foobar:(int)foobar;`, report `{foobar:}` instead of
`{foobar}{:}`. This was normally the case except for a couple of places
where it was split.
This also improves integration with clangd since it relies upon the `:`
to identify ObjC selectors.
NOTE: It is possible to have selector fragments that are just `:` with
no text, we now handle this properly for the first fragment.
Reviewers: sammccall, doug.gregor
Subscribers: ilya-biryukov, dexonsmith, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82306
Jonas Devlieghere [Thu, 25 Jun 2020 17:51:59 +0000 (10:51 -0700)]
[lldb/Docs] Add more details to the issues with custom Python installs on macOS
Although this issue is not specific to macOS, Python (in)compatibility
comes up quite often and we've been linking users to this page. This
just adds more details for this particular scenario.
Differential revision: https://reviews.llvm.org/D82507