Chandler Carruth [Wed, 23 Oct 2019 18:40:45 +0000 (11:40 -0700)]
Remove a no longer accurate sentence from the coding standards.
(And test my commit access. We're working on larger changes here.)
Louis Dionne [Wed, 23 Oct 2019 17:40:15 +0000 (10:40 -0700)]
[NFC] Strip trailing whitespace from libc++
Hans Wennborg [Wed, 23 Oct 2019 17:44:16 +0000 (19:44 +0200)]
Revert
4334892e7b "[DAGCombine][ARM] x ==/!= c -> (x - c) ==/!= 0 iff '-c' can be folded into the x node."
This broke various Windows builds, see comments on the Phabricator
review.
This also reverts the follow-up 20bf0cf.
> Summary:
> This fold, helps recover from the rest of the D62266 ARM regressions.
> https://rise4fun.com/Alive/TvpC
>
> Note that while the fold is quite flexible, i've restricted it
> to the single interesting pattern at the moment.
>
> Reviewers: efriedma, craig.topper, spatel, RKSimon, deadalnix
>
> Reviewed By: deadalnix
>
> Subscribers: javed.absar, kristof.beyls, llvm-commits
>
> Tags: #llvm
>
> Differential Revision: https://reviews.llvm.org/D62450
Raphael Isemann [Wed, 23 Oct 2019 15:32:53 +0000 (08:32 -0700)]
[lldb] Add nodebug attribute to import-std-module/sysroot test
Summary:
So far we rely on the default argument and the fact that we don't call this
inline function in our actual `main.cpp` to make sure that this function can only
be called if LLDB loads this header as a C++ module. This patch just adds
the nodebug attribute as yet another measure to make sure LLDB can't call this
function without the standard module loaded. Note that the test is already
requiring clang for the sysroot setup, so its fine that this is a Clang specific attribute.
Reviewers: friss, labath
Subscribers: JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68861
Kevin P. Neal [Wed, 23 Oct 2019 16:12:56 +0000 (12:12 -0400)]
Minor movement of one function with now-correct strictfp attribute to pass
against the latest version of D68233.
Sam McCall [Wed, 23 Oct 2019 09:11:18 +0000 (11:11 +0200)]
[clangd] abort if shutdown takes more than a minute.
Summary:
A certain class of bug (e.g. infloop on an AST worker thread) currently means
clangd never terminates, even if the editor shuts down the protocol and closes
our stdin, and the main thread recognizes that.
Instead, let's wait 60 seconds for threads to finish cleanly, and then crash
if they haven't.
(Obviously, we should still fix these bugs).
Reviewers: kadircet
Subscribers: MaskRay, jkorous, arphaman, jfb, usaxena95, cfe-commits, ilya-biryukov
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69329
Roman Lebedev [Wed, 23 Oct 2019 15:38:34 +0000 (18:38 +0300)]
[Analysis] Update Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll
I should have updated it in
1f665046fbf3b9d47a229714f689cd941f6f1216
but i didn't even realize those tests were there.
stevewan [Wed, 23 Oct 2019 15:11:37 +0000 (11:11 -0400)]
Fix non-portable GNU diff option
Summary: This is a fix to revision D68839 and rL375023. This patch substitutes POSIX option "-b" for the non-portable GNU option "--strip-trailing-cr".
Reviewers: daltenty, hubert.reinterpretcast
Reviewed By: daltenty
Subscribers: mehdi_amini, hiraditya, steven_wu, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69342
Roman Lebedev [Wed, 23 Oct 2019 15:05:05 +0000 (18:05 +0300)]
[LVI][NFC] Factor solveBlockValueSaturatingIntrinsic() out of solveBlockValueIntrinsic()
Now that there's SaturatingInst class, this is cleaner.
Roman Lebedev [Wed, 23 Oct 2019 13:56:04 +0000 (16:56 +0300)]
[LVI][CVP] LazyValueInfoImpl::solveBlockValueBinaryOp(): use no-wrap flags from `add` op
Summary:
This was suggested in https://reviews.llvm.org/D69277#1717210
In this form (this is what was suggested, right?), the results aren't staggering
(especially since given LVI cross-block focus)
this does catch some things (as per test-suite), but not too much:
| statistic | old | new | delta | % change |
| correlated-value-propagation.NumAddNSW | 4981 | 4982 | 1 | 0.0201% |
| correlated-value-propagation.NumAddNW | 12125 | 12126 | 1 | 0.0082% |
| correlated-value-propagation.NumCmps | 1199 | 1202 | 3 | 0.2502% |
| correlated-value-propagation.NumDeadCases | 112 | 111 | -1 | -0.8929% |
| correlated-value-propagation.NumMulNSW | 275 | 278 | 3 | 1.0909% |
| correlated-value-propagation.NumMulNUW | 1323 | 1326 | 3 | 0.2268% |
| correlated-value-propagation.NumMulNW | 1598 | 1604 | 6 | 0.3755% |
| correlated-value-propagation.NumNSW | 7158 | 7167 | 9 | 0.1257% |
| correlated-value-propagation.NumNUW | 13304 | 13310 | 6 | 0.0451% |
| correlated-value-propagation.NumNW | 20462 | 20477 | 15 | 0.0733% |
| correlated-value-propagation.NumOverflows | 4 | 7 | 3 | 75.0000% |
| correlated-value-propagation.NumPhis | 15366 | 15381 | 15 | 0.0976% |
| correlated-value-propagation.NumSExt | 6273 | 6277 | 4 | 0.0638% |
| correlated-value-propagation.NumShlNSW | 1172 | 1171 | -1 | -0.0853% |
| correlated-value-propagation.NumShlNUW | 2793 | 2794 | 1 | 0.0358% |
| correlated-value-propagation.NumSubNSW | 730 | 736 | 6 | 0.8219% |
| correlated-value-propagation.NumSubNUW | 2044 | 2046 | 2 | 0.0978% |
| correlated-value-propagation.NumSubNW | 2774 | 2782 | 8 | 0.2884% |
| instcount.NumAddInst | 277586 | 277569 | -17 | -0.0061% |
| instcount.NumAndInst | 66056 | 66054 | -2 | -0.0030% |
| instcount.NumBrInst | 709147 | 709146 | -1 | -0.0001% |
| instcount.NumCallInst | 528579 | 528576 | -3 | -0.0006% |
| instcount.NumExtractValueInst | 18307 | 18301 | -6 | -0.0328% |
| instcount.NumOrInst | 102660 | 102665 | 5 | 0.0049% |
| instcount.NumPHIInst | 318008 | 318007 | -1 | -0.0003% |
| instcount.NumSelectInst | 46373 | 46370 | -3 | -0.0065% |
| instcount.NumSExtInst | 79496 | 79488 | -8 | -0.0101% |
| instcount.NumShlInst | 40654 | 40657 | 3 | 0.0074% |
| instcount.NumTruncInst | 62251 | 62249 | -2 | -0.0032% |
| instcount.NumZExtInst | 68211 | 68221 | 10 | 0.0147% |
| instcount.TotalBlocks | 843910 | 843909 | -1 | -0.0001% |
| instcount.TotalInsts | 7387448 | 7387423 | -25 | -0.0003% |
Reviewers: nikic, reames
Reviewed By: nikic
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69321
Artem Dergachev [Wed, 23 Oct 2019 15:10:19 +0000 (08:10 -0700)]
[analyzer] Fix off-by-one in operator call parameter binding.
Member operator declarations and member operator expressions
have different numbering of parameters and arguments respectively:
one of them includes "this", the other does not.
Account for this inconsistency when figuring out whether
the parameter needs to be manually rebound from the Environment
to the Store when entering a stack frame of an operator call,
as opposed to being constructed with a constructor and as such
already having the necessary Store bindings.
Differential Revision: https://reviews.llvm.org/D69155
Casey Carter [Wed, 23 Oct 2019 15:08:18 +0000 (08:08 -0700)]
[libc++][NFC] Remove excess trailing newlines from most files
Testing git commit access.
Simon Atanasyan [Tue, 22 Oct 2019 18:20:52 +0000 (21:20 +0300)]
[mips] Use `expandLoadAddress` for JAL expansion
- Reduce code duplication
- Get partial support of JAL expansion for XGOT.
Simon Atanasyan [Fri, 18 Oct 2019 20:00:08 +0000 (23:00 +0300)]
[mips] Implement `la` macro expansion for N32 ABI
Simon Atanasyan [Wed, 16 Oct 2019 17:17:12 +0000 (20:17 +0300)]
[mips] Add tests to check `la / dla` expansion in XGOT cases. NFC
Simon Atanasyan [Wed, 16 Oct 2019 16:41:04 +0000 (19:41 +0300)]
[mips] Reformat `la / dla` expansion test cases. NFC
Simon Pilgrim [Wed, 23 Oct 2019 14:33:29 +0000 (07:33 -0700)]
[X86] combineX86ShufflesRecursively - assert the root mask is legal. NFCI.
Sam McCall [Wed, 23 Oct 2019 13:34:48 +0000 (15:34 +0200)]
Reland "[Support] Add a way to run a function on a detached thread""
This reverts commit
7bc7fe6b789d25d48d6dc71d533a411e9e981237.
The immediate callers have been fixed to pass nullopt where appropriate.
Kadir Cetinkaya [Wed, 23 Oct 2019 08:18:09 +0000 (10:18 +0200)]
[clangd] Propogate context in TUScheduler::run
Reviewers: sammccall
Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69328
Sam Elliott [Wed, 23 Oct 2019 13:10:43 +0000 (14:10 +0100)]
[Sanitizers] Add support for RISC-V 64-bit
Summary:
This has been tested with gcc trunk on openSUSE Tumbleweed on the HiFive Unleashed.
Patch by Andreas Schwab (schwab)
Reviewers: luismarques
Reviewed By: luismarques
Subscribers: mhorne, emaste, luismarques, asb, mgorny, fedor.sergeev, simoncook, kito-cheng, shiva0217, rogfer01, rkruppe, lenary, s.egerton, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D66870
Sam McCall [Wed, 23 Oct 2019 13:10:35 +0000 (15:10 +0200)]
Revert "[Support] Add a way to run a function on a detached thread"
This reverts commit
40668abca4d307e02b33345cfdb7271549ff48d0.
This causes clang tests to fail, as stacksize=0 is being explicitly passed and
is no longer a no-op.
Sam McCall [Wed, 23 Oct 2019 10:36:36 +0000 (12:36 +0200)]
[Support] Add a way to run a function on a detached thread
This roughly mimics `std::thread(...).detach()` except it allows to
customize the stack size. Required for https://reviews.llvm.org/D50993.
I've decided against reusing the existing `llvm_execute_on_thread` because
it's not obvious what to do with the ownership of the passed
function/arguments:
1. If we pass possibly owning functions data to `llvm_execute_on_thread`,
we'll lose the ability to pass small non-owning non-allocating functions
for the joining case (as it's used now). Is it important enough?
2. If we use the non-owning interface in the new use case, we'll force
clients to transfer ownership to the spawned thread manually, but
similar code would still have to exist inside
`llvm_execute_on_thread(_async)` anyway (as we can't just pass the same
non-owning pointer to pthreads and Windows implementations, and would be
forced to wrap it in some structure, and deal with its ownership.
Patch by Dmitry Kozhevnikov!
Differential Revision: https://reviews.llvm.org/D51103
Mirko Brkusanin [Wed, 23 Oct 2019 10:24:35 +0000 (12:24 +0200)]
[Mips] Use appropriate private label prefix based on Mips ABI
MipsMCAsmInfo was using '$' prefix for Mips32 and '.L' for Mips64
regardless of -target-abi option. By passing MCTargetOptions to MCAsmInfo
we can find out Mips ABI and pick appropriate prefix.
Tags: #llvm, #clang, #lldb
Differential Revision: https://reviews.llvm.org/D66795
David Stenberg [Wed, 23 Oct 2019 09:35:32 +0000 (11:35 +0200)]
[DebugInfo] Stop describing imms in TargetInstrInfo's describeLoadedValue() impl
Summary:
The default implementation of the describeLoadedValue() hook uses the
MoveImm property to determine if an instruction moves an immediate. If
an instruction has that property the function returns the second
operand, assuming that that is the immediate value the instruction
moves. As far as I can tell, the MoveImm property does not imply that
the second operand is the immediate value, nor that any other operand
necessarily holds the immediate value; it just means that the
instruction moves some immediate value.
One example where the second operand is not the immediate is SystemZ's
LZER instruction, which moves a zero immediate implicitly: $f0S = LZER.
That case triggered an out-of-bound assertion when getting the operand.
I have added a test case for that instruction.
Another example is ARM's MVN instruction, which holds the logical
bitwise NOT'd value of the immediate that is moved. For the following
reproducer:
extern void foo(int);
int main() { foo(-11); }
an incorrect call site value would be emitted:
$ clang --target=arm foo.c -O1 -g -Xclang -femit-debug-entry-values \
-c -o - | ./build/bin/llvm-dwarfdump - | \
grep -A2 call_site_parameter
0x00000058: DW_TAG_GNU_call_site_parameter
DW_AT_location (DW_OP_reg0 R0)
DW_AT_GNU_call_site_value (DW_OP_lit10)
Another example is the A2_combineii instruction on Hexagon which moves
two immediates to a super-register: $d0 = A2_combineii 20, 10.
Perhaps these are rare exceptions, and most MoveImm instructions hold
the immediate in the second operand, but in my opinion the default
implementation of the hook should only describe values that it can, by
some contract, guarantee are safe to describe, rather than leaving it up
to the targets to override the exceptions, as that can silently result
in incorrect call site values.
This patch adds X86's relevant move immediate instructions to the
target's hook implementation, so this commit should be a NFC for that
target. We need to do the same for ARM and AArch64.
Reviewers: djtodoro, NikolaPrica, aprantl, vsk
Reviewed By: vsk
Subscribers: kristof.beyls, hiraditya, llvm-commits
Tags: #debug-info, #llvm
Differential Revision: https://reviews.llvm.org/D69109
georgerim [Wed, 23 Oct 2019 09:22:52 +0000 (12:22 +0300)]
[lib/ObjectYAML] - Add a full stop to the comment. NFC.
A test commit.
Petar Avramovic [Wed, 23 Oct 2019 09:22:07 +0000 (11:22 +0200)]
[MIPS GlobalISel] Select MSA vector generic and builtin mul
Select vector G_MUL for MIPS32 with MSA. We have to set bank
for vector operands to fprb and selectImpl will do the rest.
Manual selection of G_MUL is now done for gprb only.
__builtin_msa_mulv_<format> will be transformed into G_MUL
in legalizeIntrinsic and selected in the same way.
Differential Revision: https://reviews.llvm.org/D69310
Petar Avramovic [Wed, 23 Oct 2019 09:15:25 +0000 (11:15 +0200)]
[MIPS GlobalISel] Select MSA vector generic and builtin sub
Select vector G_SUB for MIPS32 with MSA. We have to set bank
for vector operands to fprb and selectImpl will do the rest.
__builtin_msa_subv_<format> will be transformed into G_SUB
in legalizeIntrinsic and selected in the same way.
__builtin_msa_subvi_<format> will be directly selected into
SUBVI_<format> in legalizeIntrinsic.
Differential Revision: https://reviews.llvm.org/D69306
Roman Lebedev [Wed, 23 Oct 2019 08:58:50 +0000 (11:58 +0300)]
[TargetLowering] optimizeSetCCToComparisonWithZero(): add extra sanity checks (PR43769)
We should do the fold only if both constants are plain,
non-opaque constants, at least that is the DAG.FoldConstantArithmetic()
requirement.
And if the constant we are comparing with is zero - we shouldn't be
trying to do this fold in the first place.
Fixes https://bugs.llvm.org/show_bug.cgi?id=43769
Richard Smith [Wed, 23 Oct 2019 00:44:08 +0000 (17:44 -0700)]
[c++2a] Allow comparison functions to be explicitly defaulted.
This adds some initial syntactic checking that only the appropriate
function signatures can be defaulted. No implicit definitions are
generated yet.
Stephan T. Lavavej [Tue, 22 Oct 2019 22:19:40 +0000 (15:19 -0700)]
[libcxx][test][NFC] Fix comment typos.
(Testing git commit access.)
Louis Dionne [Tue, 22 Oct 2019 21:58:41 +0000 (14:58 -0700)]
[NFC] Strip trailing whitespace in test to test Github committing
Jinsong Ji [Tue, 22 Oct 2019 21:44:21 +0000 (21:44 +0000)]
[PowerPC][NFC] Remove deprecated Function Attrs comments #2
Kit Barton [Tue, 22 Oct 2019 21:45:28 +0000 (14:45 -0700)]
Fix broken sphinx link in CMake.rst.
Reviewers: delcypher, beanz
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69325
Jinsong Ji [Tue, 22 Oct 2019 21:28:15 +0000 (21:28 +0000)]
[PowerPC][NFC] Remove deprecated Function Attrs comments
LLVM GN Syncbot [Tue, 22 Oct 2019 21:32:11 +0000 (21:32 +0000)]
typo fix test commit
Hans Wennborg [Tue, 22 Oct 2019 20:39:01 +0000 (22:39 +0200)]
Revert r374202"[ObjC generics] Fix not inheriting type bounds in categories/extensions."
This introduced new errors, see below. Reverting until that can be investigated
properly.
#import <AVFoundation/AVFoundation.h>
void f(int width, int height) {
FourCharCode best_fourcc = kCMPixelFormat_422YpCbCr8_yuvs;
NSDictionary* videoSettingsDictionary = @{
(id)kCVPixelBufferPixelFormatTypeKey : @(best_fourcc),
};
}
$ clang++ -c /tmp/a.mm
/tmp/a.mm:6:5: error: cannot initialize a parameter of type
'KeyType<NSCopying> _Nonnull const' (aka 'const id') with an rvalue
of type 'id'
(id)kCVPixelBufferPixelFormatTypeKey : @(best_fourcc),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
> When a category/extension doesn't repeat a type bound, corresponding
> type parameter is substituted with `id` when used as a type argument. As
> a result, in the added test case it was causing errors like
>
> > type argument 'T' (aka 'id') does not satisfy the bound ('id<NSCopying>') of type parameter 'T'
>
> We are already checking that type parameters should be consistent
> everywhere (see `checkTypeParamListConsistency`) and update
> `ObjCTypeParamDecl` to have correct underlying type. And when we use the
> type parameter as a method return type or a method parameter type, it is
> substituted to the bounded type. But when we use the type parameter as a
> type argument, we check `ObjCTypeParamType` that ignores the updated
> underlying type and remains `id`.
>
> Fix by desugaring `ObjCTypeParamType` to the underlying type, the same
> way we are doing with `TypedefType`.
>
> rdar://problem/
54329242
>
> Reviewers: erik.pilkington, ahatanak
>
> Reviewed By: erik.pilkington
>
> Subscribers: jkorous, dexonsmith, ributzka, cfe-commits
>
> Differential Revision: https://reviews.llvm.org/D66696
Yaxun (Sam) Liu [Tue, 22 Oct 2019 20:15:04 +0000 (16:15 -0400)]
Fix name of warn_ignored_hip_only_option
Differential Revision: https://reviews.llvm.org/D69268
Evgenii Stepanov [Tue, 22 Oct 2019 20:29:57 +0000 (13:29 -0700)]
Revert "Fix lld detection in standalone compiler-rt."
Breaks sanitizer-android buildbot.
This reverts commit
d56203201f8a1f11abb913c4dfc0bf9c61432d1a.
Nico Weber [Tue, 22 Oct 2019 20:34:00 +0000 (16:34 -0400)]
fix a few typos to test git committing
Simon Cook [Tue, 22 Oct 2019 20:25:01 +0000 (21:25 +0100)]
[RISCV] Add support for -ffixed-xX flags
This adds support for reserving GPRs such that the compiler will not
choose a register for register allocation. The implementation follows
the same design as for AArch64; each reserved register becomes a target
feature and used for getting the reserved registers for a given
MachineFunction. The backend checks that it does not need to write to
any reserved register; if it does a relevant error is generated.
Differential Revision: https://reviews.llvm.org/D67185
Yaxun (Sam) Liu [Tue, 22 Oct 2019 17:41:25 +0000 (13:41 -0400)]
[HIP] Add option -fgpu-allow-device-init
Add this option to allow device side class type global variables
with non-trivial ctor/dtor. device side init/fini functions will
be emitted, which will be executed by HIP runtime when
the fat binary is loaded/unloaded.
This feature is to facilitate implementation of device side
sanitizer which requires global vars with non-trival ctors.
By default this option is disabled.
Differential Revision: https://reviews.llvm.org/D69268
Roman Lebedev [Tue, 22 Oct 2019 19:51:10 +0000 (22:51 +0300)]
[DAGCombine][ARM] x ==/!= c -> (x - c) ==/!= 0 iff '-c' can be folded into the x node.
Summary:
This fold, helps recover from the rest of the D62266 ARM regressions.
https://rise4fun.com/Alive/TvpC
Note that while the fold is quite flexible, i've restricted it
to the single interesting pattern at the moment.
Reviewers: efriedma, craig.topper, spatel, RKSimon, deadalnix
Reviewed By: deadalnix
Subscribers: javed.absar, kristof.beyls, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62450
Roman Lebedev [Tue, 22 Oct 2019 19:16:46 +0000 (22:16 +0300)]
[NFC][LVI][CVP] Tests where pre-specified `add` no-wrap flags could be used by LVI
There's `ConstantRange::addWithNoWrap()`, LVI could use it to further
constrain the range, if an `add` already has some no-wrap flags specified.
Stanislav Mekhanoshin [Tue, 22 Oct 2019 19:43:23 +0000 (12:43 -0700)]
[AMDGPU] Updated fold-vgpr-copy.mir test. NFC.
Michael Liao [Tue, 22 Oct 2019 16:11:25 +0000 (12:11 -0400)]
Relax assertions when there's really no entries. [NFC]
Kit Barton [Tue, 22 Oct 2019 18:39:15 +0000 (11:39 -0700)]
Test commit - add clarification to README regarding Darwin.
Stanislav Mekhanoshin [Tue, 22 Oct 2019 18:07:15 +0000 (11:07 -0700)]
[AMDGPU] Allow tied operand subreg folding
Turns out it makes sense, contrarily to what comment said.
Differential Revision: https://reviews.llvm.org/D69287
Nico Weber [Tue, 22 Oct 2019 16:54:00 +0000 (12:54 -0400)]
gn build: make sync build work with git revs now that svn is gone
Jonas Devlieghere [Tue, 22 Oct 2019 17:18:02 +0000 (10:18 -0700)]
[lldb] Adjust for the new class_rw_t layout.
The field holding the "ro" will now be a union. If the low bit is set,
then it isn't an ro and it needs to be dereferenced once more to get to
it. If the low bit isn't set, then it is a proper class_ro_t
No dedicated test is needed as this code path will trigger when running
the existing Objective-C tests under a current version of the runtime.
Tom Stellard [Tue, 22 Oct 2019 16:19:39 +0000 (09:19 -0700)]
Update git-llvm script to push to GitHub
Summary:
Note: This patch should not be pushed until SVN has become read-only.
It should be the first patch committed directly to GitHub.
This patch updates git-llvm to check for merge commits and then push
changes to GitHub if none are found. All logic related to SVN has been
removed.
Reviewers: jyknight
Subscribers: lenary, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67772
David Green [Tue, 22 Oct 2019 15:39:47 +0000 (15:39 +0000)]
[InstCombine] Signed saturation patterns
This adds an instcombine matcher for code that attempts to perform signed
saturating arithmetic by casting to a higher type. Unsigned cases are already
matched, this adds extra matches for the more complex signed cases, which
involves matching the min(max(add a b)) nodes with proper extends to ensure
legality.
Differential Revision: https://reviews.llvm.org/D68651
llvm-svn: 375505
Zoe Carver [Tue, 22 Oct 2019 15:16:49 +0000 (15:16 +0000)]
[libcxx] Remove shared_ptr::make_shared
Summary: This patch removes `shared_ptr::make_shared` as it is not part of the standard. This patch also adds __create_with_cntrl_block, which is a help function that can be used in std::allocate_shared and std::make_shared. This is the third patch (out of 4) from D66178.
Reviewers: EricWF, mclow.lists, ldionne
Subscribers: christof, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D68805
llvm-svn: 375504
David Green [Tue, 22 Oct 2019 14:49:40 +0000 (14:49 +0000)]
[InstCombine] Signed saturation tests. NFC
llvm-svn: 375503
Petar Avramovic [Tue, 22 Oct 2019 14:25:37 +0000 (14:25 +0000)]
[MIParser] Set RegClassOrRegBank during instruction parsing
MachineRegisterInfo::createGenericVirtualRegister sets
RegClassOrRegBank to static_cast<RegisterBank *>(nullptr).
MIParser on the other hand doesn't. When we attempt to constrain
Register Class on such VReg, additional COPY is generated.
This way we avoid COPY instructions showing in test that have MIR
input while they are not present with llvm-ir input that was used
to create given MIR for a -run-pass test.
Differential Revision: https://reviews.llvm.org/D68946
llvm-svn: 375502
Petar Avramovic [Tue, 22 Oct 2019 13:51:57 +0000 (13:51 +0000)]
[MIPS GlobalISel] Select MSA vector generic and builtin add
Select vector G_ADD for MIPS32 with MSA. We have to set bank
for vector operands to fprb and selectImpl will do the rest.
__builtin_msa_addv_<format> will be transformed into G_ADD
in legalizeIntrinsic and selected in the same way.
__builtin_msa_addvi_<format> will be directly selected into
ADDVI_<format> in legalizeIntrinsic. MIR tests for it have
unnecessary additional copies. Capture current state of tests
with run-pass=legalizer with a test in test/CodeGen/MIR/Mips.
Differential Revision: https://reviews.llvm.org/D68984
llvm-svn: 375501
Eugene Leviant [Tue, 22 Oct 2019 12:57:23 +0000 (12:57 +0000)]
[ThinLTO] Add code comment. NFC
llvm-svn: 375500
Guillaume Chatelet [Tue, 22 Oct 2019 12:55:32 +0000 (12:55 +0000)]
[Alignment][NFC] Convert StoreInst to MaybeAlign
Summary:
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
Reviewers: courbet
Subscribers: hiraditya, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69303
llvm-svn: 375499
Guillaume Chatelet [Tue, 22 Oct 2019 12:35:55 +0000 (12:35 +0000)]
[Alignment][NFC] Convert LoadInst to MaybeAlign
Summary:
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
Reviewers: courbet
Subscribers: hiraditya, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69302
llvm-svn: 375498
Nemanja Ivanovic [Tue, 22 Oct 2019 12:20:38 +0000 (12:20 +0000)]
[PowerPC] Turn on CR-Logical reducer pass
This re-commits r375152 which was pulled in r375233 because it broke
the EXPENSIVE_CHECKS bot on Windows.
The reason for the failure was a bug in the pass that the commit turned
on by default. This patch fixes that bug and turns the pass back on.
This patch has been verified on the buildbot that originally failed
thanks to Simon Pilgrim.
Differential revision: https://reviews.llvm.org/D52431
llvm-svn: 375497
Guillaume Chatelet [Tue, 22 Oct 2019 11:57:52 +0000 (11:57 +0000)]
[Alignment][NFC] Use MaybeAlign in AttrBuilder
Summary:
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
Reviewers: courbet
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69300
llvm-svn: 375496
Guillaume Chatelet [Tue, 22 Oct 2019 09:51:06 +0000 (09:51 +0000)]
[Alignment][NFC] Attributes use Align/MaybeAlign
Summary:
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
Reviewers: courbet
Subscribers: jholewinski, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69278
llvm-svn: 375495
Eugene Leviant [Tue, 22 Oct 2019 09:24:12 +0000 (09:24 +0000)]
[ThinLTO] Don't internalize during promotion
Differential revision: https://reviews.llvm.org/D69107
llvm-svn: 375493
George Rimar [Tue, 22 Oct 2019 08:52:45 +0000 (08:52 +0000)]
[LLVMDebugInfoPDB] - Use cantFail() instead of assert().
Currently injected-sources-native.test fails with "Expected<T>
value was in success state.
(Note: Expected<T> values in success mode must still be checked
prior to being destroyed)"
when llvm is compiled with LLVM_ENABLE_ABI_BREAKING_CHECKS in Release.
The problem is that getStringForID returns Expected<StringRef>
and Expected value must always be checked, even if it is in success state.
Checking with assert only helps in Debug and is wrong.
Differential revision: https://reviews.llvm.org/D69251
llvm-svn: 375492
Benjamin Kramer [Tue, 22 Oct 2019 08:44:34 +0000 (08:44 +0000)]
[FrontendTests] Try again to make test not write an output file
Setting the output stream to nulls seems to work.
llvm-svn: 375491
Rainer Orth [Tue, 22 Oct 2019 08:44:25 +0000 (08:44 +0000)]
[builtins][test] Avoid unportable mmap call in clear_cache_test.c
Within the last two weeks, the Builtins-*-sunos :: clear_cache_test.c started to FAIL
on Solaris. Running it under truss shows
mmap(0x00000000, 128, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, 0, 0) Err#22 EINVAL
_exit(1)
While there are several possible reasons mmap can return EINVAL on Solaris, it turns
out it's this one (from mmap(2)):
MAP_ANON was specified, but the file descriptor was not
-1.
And indeed even the Linux mmap(2) documents this as unportable:
MAP_ANONYMOUS
The mapping is not backed by any file; its contents are initial‐
ized to zero. The fd argument is ignored; however, some imple‐
mentations require fd to be -1 if MAP_ANONYMOUS (or MAP_ANON) is
specified, and portable applications should ensure this. The
This patch follows this advise. Tested on x86_64-pc-linux-gnu, amd64-pc-solaris2.11
and sparcv9-sun-solaris2.11.
Differential Revision: https://reviews.llvm.org/D68455
llvm-svn: 375490
Benjamin Kramer [Tue, 22 Oct 2019 08:37:15 +0000 (08:37 +0000)]
Revert "[FrontendTests] Don't actually run the full compiler, parsing is sufficient."
This reverts commit 375488.
llvm-svn: 375489
Benjamin Kramer [Tue, 22 Oct 2019 08:10:51 +0000 (08:10 +0000)]
[FrontendTests] Don't actually run the full compiler, parsing is sufficient.
llvm-svn: 375488
Benjamin Kramer [Tue, 22 Oct 2019 07:51:37 +0000 (07:51 +0000)]
[clang-fuzzer] Update proto fuzzer example for r375453.
llvm-svn: 375487
Martin Storsjo [Tue, 22 Oct 2019 06:36:27 +0000 (06:36 +0000)]
[CMake] [WinMsvc] Look for includes and libs in ${MSVC_BASE}/atlmfc
This is necessary if building with the DIA SDK enabled.
Differential Revision: https://reviews.llvm.org/D69240
llvm-svn: 375486
Martin Storsjo [Tue, 22 Oct 2019 06:36:21 +0000 (06:36 +0000)]
[CMake] Allow overriding MSVC_DIA_SDK_DIR via CMake
This eases using it in cross-msvc setups.
Differential Revision: https://reviews.llvm.org/D69239
llvm-svn: 375485
GN Sync Bot [Tue, 22 Oct 2019 05:09:35 +0000 (05:09 +0000)]
gn build: Merge r375483
llvm-svn: 375484
Kousik Kumar [Tue, 22 Oct 2019 05:05:18 +0000 (05:05 +0000)]
Refactor DependencyScanningTool to its own file
Summary:
There's no behavior change - just moving DependencyScanningTool to its own file
since this tool can be reused across both clang-scan-deps binary and an interface
exposed as part of libClang APIs.
Reviewers: arphaman, jkorous, Bigcheese, dexonsmith
Subscribers: mgorny, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69186
llvm-svn: 375483
Michael Liao [Tue, 22 Oct 2019 04:32:30 +0000 (04:32 +0000)]
Minor coding style fix. NFC.
llvm-svn: 375478
Lawrence D'Anna [Tue, 22 Oct 2019 04:00:37 +0000 (04:00 +0000)]
fix PythonDataObjectsTest.TestExceptions on windows
Looks like on windows googlemock regexes treat newlines differently
from on darwin. This patch fixes the regex in this test so it
will work on both.
Fixes: https://reviews.llvm.org/D69214
llvm-svn: 375477
Lawrence D'Anna [Tue, 22 Oct 2019 02:32:37 +0000 (02:32 +0000)]
remove multi-argument form of PythonObject::Reset()
Summary:
With this patch, only the no-argument form of `Reset()` remains in
PythonDataObjects. It also deletes PythonExceptionState in favor of
PythonException, because the only call-site of PythonExceptionState was
also using Reset, so I cleaned up both while I was there.
Reviewers: JDevlieghere, clayborg, labath, jingham
Reviewed By: labath
Subscribers: mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D69214
llvm-svn: 375475
Julian Lettner [Tue, 22 Oct 2019 01:13:30 +0000 (01:13 +0000)]
[lit] Move increase_process_limit to ParallelRun
Increasing the process limit only makes sense when we use multiple
processes.
llvm-svn: 375474
Evgeniy Stepanov [Mon, 21 Oct 2019 23:59:45 +0000 (23:59 +0000)]
Fix lld detection in standalone compiler-rt.
Summary:
Right now all hwasan tests on Android are silently disabled because they
require "has_lld" and standalone compiler-rt can not (and AFAIK was
never able to) set it.
Reviewers: pcc, dyung
Subscribers: dberris, mgorny, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D69196
llvm-svn: 375472
Evgeniy Stepanov [Mon, 21 Oct 2019 23:57:12 +0000 (23:57 +0000)]
[hwasan] Workaround unwinder issues in try-catch test.
Android links the unwinder library to every DSO. The problem is,
unwinder has global state, and hwasan implementation of personality
function wrapper happens to rub it the wrong way.
Switch the test to static libc++ as a temporary workaround.
llvm-svn: 375471
Simon Pilgrim [Mon, 21 Oct 2019 23:41:40 +0000 (23:41 +0000)]
[X86][BMI] Pull out schedule classes from bmi_andn<> and bmi_bls<>
Stop hardwiring classes
llvm-svn: 375470
Louis Dionne [Mon, 21 Oct 2019 23:38:32 +0000 (23:38 +0000)]
[NFC] Fix typos in CMake comment
llvm-svn: 375469
Joerg Sonnenberger [Mon, 21 Oct 2019 23:35:33 +0000 (23:35 +0000)]
Fix -fuse-init-array decision logic on NetBSD
For NetBSD 9 and later, it is the default. On older versions, only ARM
and AArch64 use it by default.
llvm-svn: 375468
Michael J. Spencer [Mon, 21 Oct 2019 22:51:13 +0000 (22:51 +0000)]
[Implicit Modules] Add -cc1 option -fmodules-strict-context-hash which includes search paths and diagnostics.
This is a recommit of r375322 and r375327 with a fix for the Windows test breakage.
llvm-svn: 375466
Adrian Prantl [Mon, 21 Oct 2019 22:48:27 +0000 (22:48 +0000)]
whitespace cleanup
llvm-svn: 375465
Adrian Prantl [Mon, 21 Oct 2019 22:46:53 +0000 (22:46 +0000)]
Factor out common test functionality into a helper class. (NFC)
llvm-svn: 375464
Simon Pilgrim [Mon, 21 Oct 2019 22:36:31 +0000 (22:36 +0000)]
[X86][SSE] Add OR(EXTRACTELT(X,0),OR(EXTRACTELT(X,1))) -> MOVMSK+CMP reduction combine
llvm-svn: 375463
Simon Pilgrim [Mon, 21 Oct 2019 22:36:07 +0000 (22:36 +0000)]
[X86][SSE] Add OR(EXTRACTELT(X,0),OR(EXTRACTELT(X,1))) movmsk v2X64 tests
llvm-svn: 375462
Lang Hames [Mon, 21 Oct 2019 22:29:29 +0000 (22:29 +0000)]
[examples] Add a dependency on ExecutionEngine to LLJITWithObjectCache example.
ExecutionEngine.cpp contains the anchor() for the ObjectCache base class, so we
need an explicit dependency on it.
Patch by Stephen Neuendorffer. Thanks Stephen!
llvm-svn: 375461
Austin Kerbow [Mon, 21 Oct 2019 22:18:26 +0000 (22:18 +0000)]
AMDGPU/GlobalISel: Legalize fast unsafe FDIV
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69231
llvm-svn: 375460
Jonas Devlieghere [Mon, 21 Oct 2019 22:16:28 +0000 (22:16 +0000)]
XFAIL TestLocalVariables.py on Windows
This test has been failing for a while on the Windows bot.
https://bugs.llvm.org/show_bug.cgi?id=43752
llvm-svn: 375459
Julian Lettner [Mon, 21 Oct 2019 21:57:18 +0000 (21:57 +0000)]
[lit] Simplify test scheduling via multiprocessing.Pool
llvm-svn: 375458
Matt Arsenault [Mon, 21 Oct 2019 21:49:44 +0000 (21:49 +0000)]
AMDGPU: Select basic interp directly from intrinsics
llvm-svn: 375457
Julian Lettner [Mon, 21 Oct 2019 21:41:59 +0000 (21:41 +0000)]
[lit] Remove redundancy from names and comments
llvm-svn: 375456
Roman Lebedev [Mon, 21 Oct 2019 21:31:19 +0000 (21:31 +0000)]
[CVP] No-wrap deduction for `shl`
Summary:
This is the last `OverflowingBinaryOperator` for which we don't deduce flags.
D69217 taught `ConstantRange::makeGuaranteedNoWrapRegion()` about it.
The effect is better than of the `mul` patch (D69203):
| statistic | old | new | delta | % change |
| correlated-value-propagation.NumAddNUW | 7145 | 7144 | -1 | -0.0140% |
| correlated-value-propagation.NumAddNW | 12126 | 12125 | -1 | -0.0082% |
| correlated-value-propagation.NumAnd | 443 | 446 | 3 | 0.6772% |
| correlated-value-propagation.NumNSW | 5986 | 7158 | 1172 | 19.5790% |
| correlated-value-propagation.NumNUW | 10512 | 13304 | 2792 | 26.5601% |
| correlated-value-propagation.NumNW | 16498 | 20462 | 3964 | 24.0272% |
| correlated-value-propagation.NumShlNSW | 0 | 1172 | 1172 | |
| correlated-value-propagation.NumShlNUW | 0 | 2793 | 2793 | |
| correlated-value-propagation.NumShlNW | 0 | 3965 | 3965 | |
| instcount.NumAShrInst | 13824 | 13790 | -34 | -0.2459% |
| instcount.NumAddInst | 277584 | 277586 | 2 | 0.0007% |
| instcount.NumAndInst | 66061 | 66056 | -5 | -0.0076% |
| instcount.NumBrInst | 709153 | 709147 | -6 | -0.0008% |
| instcount.NumICmpInst | 483709 | 483708 | -1 | -0.0002% |
| instcount.NumSExtInst | 79497 | 79496 | -1 | -0.0013% |
| instcount.NumShlInst | 40691 | 40654 | -37 | -0.0909% |
| instcount.NumSubInst | 61997 | 61996 | -1 | -0.0016% |
| instcount.NumZExtInst | 68208 | 68211 | 3 | 0.0044% |
| instcount.TotalBlocks | 843916 | 843910 | -6 | -0.0007% |
| instcount.TotalInsts | 7387528 | 7387448 | -80 | -0.0011% |
Reviewers: nikic, reames, sanjoy, timshen
Reviewed By: nikic
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69277
llvm-svn: 375455
Adrian Prantl [Mon, 21 Oct 2019 20:50:45 +0000 (20:50 +0000)]
Found more timeouts to unify.
llvm-svn: 375454
David Goldman [Mon, 21 Oct 2019 20:45:02 +0000 (20:45 +0000)]
[clang-fuzzer] Add new fuzzer target for Objective-C
Summary:
- Similar to that of `clang-fuzzer` itself but instead only
targets Objective-C source files via cc1
- Also adds an example corpus directory containing some
input for Objective-C
Subscribers: mgorny, jfb, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69171
llvm-svn: 375453
Quentin Colombet [Mon, 21 Oct 2019 20:39:58 +0000 (20:39 +0000)]
[GISel][CombinerHelper] Add a combine turning shuffle_vector into concat_vectors
Teach the CombinerHelper how to turn shuffle_vectors, that
concatenate vectors, into concat_vectors and add this combine
to the AArch64 pre-legalizer combiner.
Differential Revision: https://reviews.llvm.org/D69149
llvm-svn: 375452
Matt Arsenault [Mon, 21 Oct 2019 19:53:49 +0000 (19:53 +0000)]
AMDGPU: Use CopyToReg for interp intrinsic lowering
This doesn't use the default value, so doesn't benefit from the hack
to help optimize it.
llvm-svn: 375450
Matt Arsenault [Mon, 21 Oct 2019 19:53:46 +0000 (19:53 +0000)]
AMDGPU: Erase redundant redefs of m0 in SIFoldOperands
Only handle simple inter-block redefs of m0 to the same value. This
avoids interference from redefs of m0 in SILoadStoreOptimzer. I was
initially teaching that pass to ignore redefs of m0, but having them
not exist beforehand is much simpler.
This is in preparation for deleting the current special m0 handling in
SIFixSGPRCopies to allow the register coalescer to handle the
difficult cases.
llvm-svn: 375449
Matt Arsenault [Mon, 21 Oct 2019 19:42:29 +0000 (19:42 +0000)]
AMDGPU: Stop adding m0 implicit def to SGPR spills
r375293 removed the SGPR spilling with scalar stores path, so this is
no longer necessary. This also always had the defect of adding the def
even when this path wasn't in use.
llvm-svn: 375448
Matt Arsenault [Mon, 21 Oct 2019 19:42:26 +0000 (19:42 +0000)]
AMDGPU: Slightly restructure m0 init code
This will allow using another operation to produce the glue in a
future change.
llvm-svn: 375447