OSDN Git Service
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
Elvina Yakubova [Thu, 25 Jun 2020 13:53:23 +0000 (16:53 +0300)]
[Clang] Add support for -Wno-inline-namespace-reopened-noninline
This patch adds the option for disabling warn_inline_namespace_reopened_noninline
warning described here: https://bugs.llvm.org/show_bug.cgi?id=46106
Patch by Elvina Yakubova
Differential Revision: https://reviews.llvm.org/D81825
Andrew Wock [Mon, 22 Jun 2020 16:16:03 +0000 (12:16 -0400)]
[FPEnv] PowerPC-specific builtin constrained FP enablement
This change enables PowerPC compiler builtins to generate constrained
floating point operations when clang is indicated to do so.
A couple of possibly unexpected backend divergences between constrained
floating point and regular behavior are highlighted under the test tag
FIXME-CHECK. This may be something for those on the PPC backend to look
at.
Patch by: Drew Wock <drew.wock@sas.com>
Differential Revision: https://reviews.llvm.org/D82020
Eduardo Caldas [Mon, 22 Jun 2020 16:04:54 +0000 (16:04 +0000)]
Add `BoolLiteralExpression` to SyntaxTree
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82310
Sanjay Patel [Thu, 25 Jun 2020 15:28:04 +0000 (11:28 -0400)]
[InstCombine] fold fmul/fdiv with fabs operands
fabs(X) * fabs(Y) --> fabs(X * Y)
fabs(X) / fabs(Y) --> fabs(X / Y)
If both operands of fmul/fdiv are positive, then the result must be positive.
There's a NAN corner-case that prevents removing the more specific fold just
above this one:
fabs(X) * fabs(X) -> X * X
That fold works even with NAN because the sign-bit result of the multiply is
not specified if X is NAN.
We can't remove that and use the more general fold that is proposed here
because once we convert to this:
fabs (X * X)
...it is not legal to simplify the 'fabs' out of that expression when X is NAN.
That's because fabs() guarantees that the sign-bit is always cleared - even
for NAN values.
So this patch has the potential to lose information, but it seems unlikely if
we do the more specific fold ahead of this one.
Differential Revision: https://reviews.llvm.org/D82277
David Green [Thu, 25 Jun 2020 15:22:09 +0000 (16:22 +0100)]
[ARM] Fixup for signed comparison warning. NFC
Diego Caballero [Thu, 25 Jun 2020 15:06:19 +0000 (08:06 -0700)]
[mlir][EDSC] Add divis and diviu and vector.extractelement
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D82515
Simon Pilgrim [Thu, 25 Jun 2020 14:47:56 +0000 (15:47 +0100)]
Remove orphan AMDGPUAAResult::Aliases and AMDGPUAAResult::PathAliases declarations. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 14:45:05 +0000 (15:45 +0100)]
Remove orphan TypeBasedAAResult::PathAliases declaration. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 14:29:07 +0000 (15:29 +0100)]
GlobalsModRef.h - reduce CallGraph.h include to forward declarations. NFC.
Fix implicit include dependencies in source files.
Simon Pilgrim [Thu, 25 Jun 2020 13:53:34 +0000 (14:53 +0100)]
LoopAccessAnalysis.h - reduce AliasAnalysis.h include to forward declaration. NFC.
Fix implicit include dependencies in source files and replace legacy AliasAnalysis typedef with AAResults where necessary.
David Green [Thu, 25 Jun 2020 12:25:38 +0000 (13:25 +0100)]
[ARM] MVE VCVT lowering for f32->f16 truncs
This adds code to lower f32 to f16 fp_trunc's using a pair of MVE VCVT
instructions. Due to v4f16 not being legal, fp_round are often split up
fairly early. So this reconstructs the vcvt's from a buildvector of
fp_rounds from two vector inputs. Something like:
BUILDVECTOR(FP_ROUND(EXTRACT_ELT(X, 0),
FP_ROUND(EXTRACT_ELT(Y, 0),
FP_ROUND(EXTRACT_ELT(X, 1),
FP_ROUND(EXTRACT_ELT(Y, 1), ...)
It adds a VCVTN node to handle this, which like VMOVN or VQMOVN lowers
into the top/bottom lanes of an MVE instruction.
Differential Revision: https://reviews.llvm.org/D81139
Victor Campos [Wed, 24 Jun 2020 13:25:29 +0000 (14:25 +0100)]
[AArch64] Emit warning when disassembling unpredictable LDRAA and LDRAB
Summary:
LDRAA and LDRAB in their writeback variant should softfail when the same
register is used as result and base.
This patch adds a custom decoder that catches such case and emits a
warning when it occurs.
Differential Revision: https://reviews.llvm.org/D82541
Thomas Preud'homme [Tue, 5 May 2020 18:11:04 +0000 (19:11 +0100)]
[MC] Fix PR45805: infinite recursion in assembler
Give up folding an expression if the fragment of one of the operands
would require laying out a fragment already being laid out. This
prevents hitting an infinite recursion when a fill size expression
refers to a later fragment since computing the offset of that fragment
would require laying out the fill fragment and thus computing its size
expression.
Reviewed By: echristo
Differential Revision: https://reviews.llvm.org/D79570
Xing GUO [Thu, 25 Jun 2020 13:51:22 +0000 (21:51 +0800)]
[ObjectYAML][DWARF] Format codes. NFC.
Zarko Todorovski [Thu, 25 Jun 2020 13:40:44 +0000 (09:40 -0400)]
[NFC][PPC][AIX] Add stack frame layout diagram to PPCISelLowering.cpp
Summary:
This NFC patch adds a diagram of the AIX ABI stack frame layout.
Based on https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/assembler/idalangref_runtime_process.html
Reviewers: sfertile, cebowleratibm, hubert.reinterpretcast, Xiangling_L
Reviewed By: sfertile
Subscribers: wuzish, nemanjai, hiraditya, kbarton, llvm-commits
Tags: #powerpc, #llvm
Differential Revision: https://reviews.llvm.org/D82408
Sanjay Patel [Thu, 25 Jun 2020 13:34:11 +0000 (09:34 -0400)]
[PhaseOrdering] delete test for vectorization; NFC
As requested in D81416, I'm deleting the file that I added with:
rGdf79443
Pavel Labath [Thu, 25 Jun 2020 13:18:02 +0000 (15:18 +0200)]
[lldb] Rewrite Scalar::GetBytes
This function was modifying and returning pointers to static storage,
which meant that any two accesses to different Scalar objects could
potentially race (depending on which types the objects were storing and
the host endianness).
In the new version the user is responsible for providing a buffer into
which this method will store its binary representation. The main caller
(RegisterValue::GetBytes) already has one such buffer handy, so this did
not require any major rewrites.
To make that work, I've needed to mark the RegisterValue value buffer
mutable -- not an ideal solution, but definitely better than modifying
global storage. This could be further improved by changing
RegisterValue::GetBytes to take a buffer too.
Guillaume Chatelet [Thu, 25 Jun 2020 13:23:12 +0000 (13:23 +0000)]
[Alignment][NFC] Conform X86, ARM and AArch64 TargetTransformInfo backends to the public API
The main interface has been migrated to Align already but a few backends where broadening the type from Align to MaybeAlign.
This patch makes sure all implementations conform to the public API.
Differential Revision: https://reviews.llvm.org/D82465
Simon Pilgrim [Thu, 25 Jun 2020 13:06:04 +0000 (14:06 +0100)]
LiveIntervals.h.h - reduce AliasAnalysis.h include to forward declaration. NFC.
Fix implicit include dependencies in source files and replace legacy AliasAnalysis typedef with AAResults where necessary.
Simon Pilgrim [Thu, 25 Jun 2020 11:48:36 +0000 (12:48 +0100)]
Attributes.cpp - fix include sorting order. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 11:48:14 +0000 (12:48 +0100)]
IRBuilder.cpp - fix include sorting order. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 11:29:52 +0000 (12:29 +0100)]
CodeGenPrepare.cpp - remove unused IntrinsicsX86.h header. NFC.