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
Xun Li [Tue, 23 Jun 2020 22:06:18 +0000 (15:06 -0700)]
[Coroutines] Special handle __builtin_coro_resume for final_suspend nothrow check
Summary:
In https://reviews.llvm.org/D82029 we added the conformance check that the expression co_await promise.final_suspend() should not potentially throw.
As part of this expression, in cases when the await_suspend() method of the final suspend awaiter returns a handle, __builtin_coro_resume could be called on the handle to immediately resume that coroutine.
__builtin_coro_resume is not declared with noexcept and it shouldn't. We need to special check this case here.
Reviewers: modocache, lewissbaker, junparser
Reviewed By: lewissbaker
Subscribers: modocache, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82415
Hiroshi Yamauchi [Tue, 2 Jun 2020 19:10:15 +0000 (12:10 -0700)]
[PGO] Extend the value profile buckets for mem op sizes.
Extend the memop value profile buckets to be more flexible (could accommodate a
mix of individual values and ranges) and to cover more value ranges (from 11 to
22 buckets).
Disabled behind a flag (to be enabled separately) and the existing code to be
removed later.
Differential Revision: https://reviews.llvm.org/D81682
Raphael Isemann [Thu, 25 Jun 2020 15:51:43 +0000 (17:51 +0200)]
[lldb][NFC] Use expect_expr in TestDollarInVariable
Eduardo Caldas [Mon, 22 Jun 2020 17:35:38 +0000 (17:35 +0000)]
Add `FloatingLiteral` to SyntaxTree
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82318
Eduardo Caldas [Thu, 25 Jun 2020 16:25:42 +0000 (16:25 +0000)]
Add StringLiteral to SyntaxTree
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82360
Eduardo Caldas [Thu, 25 Jun 2020 16:10:19 +0000 (16:10 +0000)]
Add `CharLiteral` to SyntaxTree
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82312
Yuanfang Chen [Thu, 25 Jun 2020 17:02:50 +0000 (10:02 -0700)]
[NewPM] Move debugging log printing after PassInstrumentation before-pass-callbacks
For passes got skipped, this is confusing because the log said it is `running pass`
but it is skipped later.
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D82511
Nick Desaulniers [Thu, 25 Jun 2020 16:53:11 +0000 (09:53 -0700)]
[Clang][SourceManager] optimize getFileIDLocal()
Summary:
A recent Linux kernel commit exposed a performance cliff in Clang. Calls
to SourceManager::getFileIDLocal() when there's a cache miss against
LastFileIDLookup can be relatively expensive, as getFileIDLocal() tries
a few linear probes, then falls back to binary search. The use of
SourceManager::isOffsetInFileID() is also relatively expensive (both
isOffsetInFileID and getFileIDLocal dominated a trace of the performance
cliff case).
As a FIXME notes (and as @kadircet helpfully noted in review of D80681),
there's a few optimizations we can do here since we've already
identified that an offset is local (as opposed to "loaded").
This patch was forked off of D80681, which additionally did this and
modified some caching behavior, as we expect this change to be less
controversial.
In terms of optimizations, we've already determined that the SLocOffset
parameter to SourceManager::getFileIDLocal() is local in the caller
SourceManager::getFileIDSlow(). Also, there's an early continue in the
binary search loop in getFileIDLocal() that are duplicated in
isOffsetInFileID() as pointed out by @kadircet.
Take advantage of these to optimize the binary search patch, and remove
the FIXME.
Reviewers: kadircet
Reviewed By: kadircet
Subscribers: cfe-commits, kadircet, srhines
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82497
Jonas Devlieghere [Thu, 25 Jun 2020 16:55:19 +0000 (09:55 -0700)]
[lldb/Lua] Redirect Lua stdout/stderr to the CommandReturnObject
Redirect the output of stdout and stderr to the CommandReturnObject for
one line commands.
Differential revision: https://reviews.llvm.org/D82412
Jonas Devlieghere [Thu, 25 Jun 2020 16:51:55 +0000 (09:51 -0700)]
[lldb/ScriptInterpreter] Let the IORedirect factory handle IO being disabled.
Have one factory method that decides how to initialize the
ScriptInterpreterIORedirect object based on whether IO is enabled or
disabled.
Zequan Wu [Mon, 15 Jun 2020 23:29:36 +0000 (16:29 -0700)]
[llvm-readobj][COFF] add .llvm.call-graph-profile section dump
Summary: Dumping contents of `.llvm.call-graph-profile` section of COFF in the same format as ELF.
Reviewers: jhenderson, MaskRay, hans
Reviewed By: jhenderson
Subscribers: grimar, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81894
Daniel Grumberg [Thu, 25 Jun 2020 16:47:41 +0000 (17:47 +0100)]
Ensure that default value for -triple is correctly normalizedvalues
This fixes the build failure at http://lab.llvm.org:8011/builders/llvm-clang-win-x-aarch64/builds/240/steps/test-check-clang/logs/FAIL%3A%20Clang-Unit%3A%3ACC1CommandLineGenerationTest.CanGenerateCC1CommandLineSeparateRequiredAbsent
Nithin Vadukkumchery Rajendrakumar [Thu, 25 Jun 2020 01:30:41 +0000 (18:30 -0700)]
[analyzer] Enable constructor support in evalCall event.
Pass EvalCallOptions via runCheckersForEvalCall into defaultEvalCall.
Update the AnalysisOrderChecker to support evalCall for testing.
Differential Revision: https://reviews.llvm.org/D82256
Jonas Devlieghere [Thu, 25 Jun 2020 16:43:17 +0000 (09:43 -0700)]
[lldb/ScriptInterpreter] Extract IO redirection logic
This patch takes the IO redirection logic from ScriptInterpreterPython
and moves it into the interpreter library so that it can be used by
other script interpreters. I've turned it into a RAII object so that we
don't have to worry about cleaning up in the calling code.
Differential revision: https://reviews.llvm.org/D82396
Joel E. Denny [Thu, 25 Jun 2020 16:33:20 +0000 (12:33 -0400)]
[FileCheck][NFC] Remove redundant DumpInputDefault
Reviewed By: mehdi_amini, jhenderson
Differential Revision: https://reviews.llvm.org/D82480
Francesco Petrogalli [Tue, 23 Jun 2020 22:06:13 +0000 (22:06 +0000)]
[sve][acle] Add some C intrinsics for brain float types.
Summary:
The following intrinsics has been added:
svuint16_t svcnt[_bf16]_m(svuint16_t inactive, svbool_t pg, svbfloat16_t op)
svuint16_t svcnt[_bf16]_x(svbool_t pg, svbfloat16_t op)
svuint16_t svcnt[_bf16]_z(svbool_t pg, svbfloat16_t op)
svbfloat16_t svtbl[_bf16](svbfloat16_t data, svuint16_t indices)
svbfloat16_t svtbl2[_bf16](svbfloat16x2_t data, svuint16_t indices)
svbfloat16_t svtbx[_bf16](svbfloat16_t fallback, svbfloat16_t data, svuint16_t indices)
Reviewers: c-rhodes, kmclaughlin, efriedma, sdesmalen, ctetreau
Subscribers: tschuett, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D82429
Seija Kijin [Thu, 25 Jun 2020 16:29:50 +0000 (09:29 -0700)]
Change while to do-while
Differential Revision: https://reviews.llvm.org/D70603
Louis Dionne [Thu, 25 Jun 2020 16:02:43 +0000 (12:02 -0400)]
[libunwind] Allow specifying custom Lit config files
This is the libunwind counterpart of
0c66af970c80.
Louis Dionne [Thu, 25 Jun 2020 15:46:00 +0000 (11:46 -0400)]
[libc++abi] Allow specifying custom Lit config files
This is the libc++abi counterpart of
0c66af970c80.
Simon Pilgrim [Thu, 25 Jun 2020 15:37:06 +0000 (16:37 +0100)]
GVN.h - reduce AliasAnalysis.h include to forward declaration. NFC.
Cleanup MemoryDependenceAnalysis.h as well - GVN.h was also implicitly including AliasAnalysis.h via this.
Fix implicit include dependencies in source files and replace legacy AliasAnalysis typedef with AAResults where necessary.
Arthur Eubanks [Tue, 23 Jun 2020 23:11:59 +0000 (16:11 -0700)]
[NewPM] Separate out alias analysis passes in opt
Summary:
This somewhat matches the --aa-pipeline option, which separates out any
AA analyses to make sure they run before other passes.
Makes check-llvm failures under new PM go from 2356 -> 2303.
AA passes are not handled by PassBuilder::parsePassPipeline() but rather
PassBuilder::parseAAPipeline(), which is why this fixes some failures.
Reviewers: asbirlea, hans, ychen, leonardchan
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82488