Yonghong Song [Fri, 22 Nov 2019 08:20:10 +0000 (00:20 -0800)]
[BPF] Fix a recursion bug in BPF Peephole ZEXT optimization
Commit
a0841dfe8594 ("[BPF] Fix a bug in peephole optimization")
fixed a bug in peephole optimization. Recursion is introduced
to handle COPY and PHI instructions.
Unfortunately, multiple PHI instructions may form a cycle
and this will cause infinite recursion, eventual segfault.
For Commit
a0841dfe8594, I indeed tried a few loops to ensure
that I won't see the recursion, but I did not try with
complex control flows, which, as demonstrated with the test case
in this patch, may introduce PHI cycles.
This patch fixed the issue by introducing a set to remember
visited PHI instructions. This way, cycles can be properly
detected and handled.
Differential Revision: https://reviews.llvm.org/D70586
jasonliu [Fri, 22 Nov 2019 15:36:46 +0000 (15:36 +0000)]
[XCOFF][AIX] Read-only data section object file generation
Summary:
This patch is a follow up on read-only assembly patch D70182.
It intends to enable object file generation for the read-only data section on AIX.
Reviewers: DiggerLin, daltenty
Differential Revision: https://reviews.llvm.org/D70455
Kousik Kumar [Sun, 3 Nov 2019 04:42:17 +0000 (21:42 -0700)]
Add support to find out resource dir and add it as compilation args
Summary:
If -resource-dir is not specified as part of the compilation command, then by default
clang-scan-deps picks up a directory relative to its own path as resource-directory.
This is probably not the right behavior - since resource directory should be picked relative
to the path of the clang-compiler in the compilation command.
This patch adds support for it along with a cache to store the resource-dir paths based on
compiler paths.
Notes:
1. "-resource-dir" is a behavior that's specific to clang, gcc does not have that flag. That's why if I'm not able to find a resource-dir, I quietly ignore it.
2. Should I also use the mtime of the compiler in the cache? I think its not strictly necessary since we assume the filesystem is immutable.
3. From my testing, this does not regress performance.
4. Will try to get this tested on Windows.
But basically the problem that this patch is trying to solve is, clients might not always want to specify
"-resource-dir" in their compile commands, so scan-deps must auto-infer it correctly.
Reviewers: arphaman, Bigcheese, jkorous, dexonsmith, klimek
Reviewed By: Bigcheese
Subscribers: MaskRay, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69122
protze@itc.rwth-aachen.de [Fri, 22 Nov 2019 14:25:22 +0000 (15:25 +0100)]
[OpenMP][Tool] disable archer tests in standalone build
Will be enabled after Build-Bots are fixed
Clement Courbet [Fri, 22 Nov 2019 08:07:55 +0000 (09:07 +0100)]
Reland "[DAGCombiner] Allow zextended load combines."
Check that the generated type is simple.
Juneyoung Lee [Fri, 22 Nov 2019 12:45:55 +0000 (21:45 +0900)]
[Test] Fix freeze ocaml test failure
protze@itc.rwth-aachen.de [Fri, 22 Nov 2019 13:29:19 +0000 (14:29 +0100)]
[OpenMP][Tool] Fix cmake variable in lit.site.cfg.in
As noted in D45890
Pankaj Gode [Fri, 22 Nov 2019 13:10:47 +0000 (18:40 +0530)]
[WIP][Attributor] AAReachability Attribute
Summary: Working towards Johannes's suggestion for fixme, in Attributor's Noalias attribute deduction.
(ii) Check whether the value is captured in the scope using AANoCapture.
FIXME: This is conservative though, it is better to look at CFG and
// check only uses possibly executed before this call site.
A Reachability abstract attribute answers the question "does execution at point A potentially reach point B". If this question is answered with false for all other uses of the value that might be captured, we know it is not *yet* captured and can continue with the noalias deduction. Currently, information AAReachability provides is completely pessimistic.
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: uenoku, sstefan1, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D70233
Roman Lebedev [Fri, 22 Nov 2019 12:22:42 +0000 (15:22 +0300)]
[Codegen] TargetLowering::prepareUREMEqFold(): `x u% C1 ==/!= C2` (PR35479)
Summary:
The current lowering is:
```
Name: (X % C1) == C2 -> X * C3 <= C4 || false
Pre: (C2 == 0 || C1 u<= C2) && (C1 u>> countTrailingZeros(C1)) * C3 == 1
%zz = and i8 C3, 0 ; trick alive into making C3 avaliable in precondition
%o0 = urem i8 %x, C1
%r = icmp eq i8 %o0, C2
=>
%zz = and i8 C3, 0 ; and silence it from complaining about said reg
%C4 = -1 /u C1
%n0 = mul i8 %x, C3
%n1 = lshr i8 %n0, countTrailingZeros(C1) ; rotate right
%n2 = shl i8 %n0, ((8-countTrailingZeros(C1)) %u 8) ; rotate right
%n3 = or i8 %n1, %n2 ; rotate right
%is_tautologically_false = icmp ule i8 C1, C2
%C4_fixed = select i1 %is_tautologically_false, i8 -1, i8 %C4
%res = icmp ule i8 %n3, %C4_fixed
%r = xor i1 %res, %is_tautologically_false
```
https://rise4fun.com/Alive/2xC
https://rise4fun.com/Alive/jpb5
However, we can support non-tautological cases `C1 u> C2` too.
Said handling consists of two parts:
* `C2 u<= (-1 %u C1)`. It just works. We only have to change `(X % C1) == C2` into `((X - C2) % C1) == 0`
```
Name: (X % C1) == C2 -> (X - C2) * C3 <= C4 iff C2 u<= (-1 %u C1)
Pre: (C1 u>> countTrailingZeros(C1)) * C3 == 1 && C2 u<= (-1 %u C1)
%zz = and i8 C3, 0 ; trick alive into making C3 avaliable in precondition
%o0 = urem i8 %x, C1
%r = icmp eq i8 %o0, C2
=>
%zz = and i8 C3, 0 ; and silence it from complaining about said reg
%C4 = (-1 /u C1)
%n0 = sub i8 %x, C2
%n1 = mul i8 %n0, C3
%n2 = lshr i8 %n1, countTrailingZeros(C1) ; rotate right
%n3 = shl i8 %n1, ((8-countTrailingZeros(C1)) %u 8) ; rotate right
%n4 = or i8 %n2, %n3 ; rotate right
%is_tautologically_false = icmp ule i8 C1, C2
%C4_fixed = select i1 %is_tautologically_false, i8 -1, i8 %C4
%res = icmp ule i8 %n4, %C4_fixed
%r = xor i1 %res, %is_tautologically_false
```
https://rise4fun.com/Alive/m4P
https://rise4fun.com/Alive/SKrx
* `C2 u> (-1 %u C1)`. We also have to change `(X % C1) == C2` into `((X - C2) % C1) == 0`,
and we have to decrement C4:
```
Name: (X % C1) == C2 -> (X - C2) * C3 <= C4 iff C2 u> (-1 %u C1)
Pre: (C1 u>> countTrailingZeros(C1)) * C3 == 1 && C2 u> (-1 %u C1)
%zz = and i8 C3, 0 ; trick alive into making C3 avaliable in precondition
%o0 = urem i8 %x, C1
%r = icmp eq i8 %o0, C2
=>
%zz = and i8 C3, 0 ; and silence it from complaining about said reg
%C4 = (-1 /u C1)-1
%n0 = sub i8 %x, C2
%n1 = mul i8 %n0, C3
%n2 = lshr i8 %n1, countTrailingZeros(C1) ; rotate right
%n3 = shl i8 %n1, ((8-countTrailingZeros(C1)) %u 8) ; rotate right
%n4 = or i8 %n2, %n3 ; rotate right
%is_tautologically_false = icmp ule i8 C1, C2
%C4_fixed = select i1 %is_tautologically_false, i8 -1, i8 %C4
%res = icmp ule i8 %n4, %C4_fixed
%r = xor i1 %res, %is_tautologically_false
```
https://rise4fun.com/Alive/d40
https://rise4fun.com/Alive/8cF
I believe this concludes `x u% C1 ==/!= C2` lowering.
In fact, clang is may now be better in this regard than gcc:
as it can be seen from `@t32_6_4` test, we do lower `x % 6 == 4`
via this pattern, while gcc does not: https://godbolt.org/z/XNU2z9
And all the general alive proofs say this is legal.
And manual checking agrees: https://rise4fun.com/Alive/WA2
Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=35479 | PR35479 ]].
Reviewers: RKSimon, craig.topper, spatel
Reviewed By: RKSimon
Subscribers: nick, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70053
Roman Lebedev [Fri, 22 Nov 2019 12:16:03 +0000 (15:16 +0300)]
[Codegen] TargetLowering::prepareUREMEqFold(): `x u% C1 ==/!= C2` with tautological C1 u<= C2 (PR35479)
Summary:
This is a preparatory cleanup before i add more
of this fold to deal with comparisons with non-zero.
In essence, the current lowering is:
```
Name: (X % C1) == 0 -> X * C3 <= C4
Pre: (C1 u>> countTrailingZeros(C1)) * C3 == 1
%zz = and i8 C3, 0 ; trick alive into making C3 avaliable in precondition
%o0 = urem i8 %x, C1
%r = icmp eq i8 %o0, 0
=>
%zz = and i8 C3, 0 ; and silence it from complaining about said reg
%C4 = -1 /u C1
%n0 = mul i8 %x, C3
%n1 = lshr i8 %n0, countTrailingZeros(C1) ; rotate right
%n2 = shl i8 %n0, ((8-countTrailingZeros(C1)) %u 8) ; rotate right
%n3 = or i8 %n1, %n2 ; rotate right
%r = icmp ule i8 %n3, %C4
```
https://rise4fun.com/Alive/oqd
It kinda just works, really no weird edge-cases.
But it isn't all that great for when comparing with non-zero.
In particular, given `(X % C1) == C2`, there will be problems
in the always-false tautological case where `C2 u>= C1`:
https://rise4fun.com/Alive/pH3
That case is tautological, always-false:
```
Name: (X % Y) u>= Y
%o0 = urem i8 %x, %y
%r = icmp uge i8 %o0, %y
=>
%r = false
```
https://rise4fun.com/Alive/ofu
While we can't/shouldn't get such tautological case normally,
we do deal with non-splat vectors, so unless we want to give up
in this case, we need to fixup/short-circuit such lanes.
There are two lowering variants:
1. We can blend between whatever computed result and the correct tautological result
```
Name: (X % C1) == C2 -> X * C3 <= C4 || false
Pre: (C2 == 0 || C1 u<= C2) && (C1 u>> countTrailingZeros(C1)) * C3 == 1
%zz = and i8 C3, 0 ; trick alive into making C3 avaliable in precondition
%o0 = urem i8 %x, C1
%r = icmp eq i8 %o0, C2
=>
%zz = and i8 C3, 0 ; and silence it from complaining about said reg
%C4 = -1 /u C1
%n0 = mul i8 %x, C3
%n1 = lshr i8 %n0, countTrailingZeros(C1) ; rotate right
%n2 = shl i8 %n0, ((8-countTrailingZeros(C1)) %u 8) ; rotate right
%n3 = or i8 %n1, %n2 ; rotate right
%is_tautologically_false = icmp ule i8 C1, C2
%res = icmp ule i8 %n3, %C4
%r = select i1 %is_tautologically_false, i1 0, i1 %res
```
https://rise4fun.com/Alive/PjT5
https://rise4fun.com/Alive/1KV
2. We can invert the comparison result
```
Name: (X % C1) == C2 -> X * C3 <= C4 || false
Pre: (C2 == 0 || C1 u<= C2) && (C1 u>> countTrailingZeros(C1)) * C3 == 1
%zz = and i8 C3, 0 ; trick alive into making C3 avaliable in precondition
%o0 = urem i8 %x, C1
%r = icmp eq i8 %o0, C2
=>
%zz = and i8 C3, 0 ; and silence it from complaining about said reg
%C4 = -1 /u C1
%n0 = mul i8 %x, C3
%n1 = lshr i8 %n0, countTrailingZeros(C1) ; rotate right
%n2 = shl i8 %n0, ((8-countTrailingZeros(C1)) %u 8) ; rotate right
%n3 = or i8 %n1, %n2 ; rotate right
%is_tautologically_false = icmp ule i8 C1, C2
%C4_fixed = select i1 %is_tautologically_false, i8 -1, i8 %C4
%res = icmp ule i8 %n3, %C4_fixed
%r = xor i1 %res, %is_tautologically_false
```
https://rise4fun.com/Alive/2xC
https://rise4fun.com/Alive/jpb5
3. We can expand into `and`/`or`:
https://rise4fun.com/Alive/WGn
https://rise4fun.com/Alive/lcb5
Blend-one is likely better since we avoid having to load the
replacement from constant pool. `xor` is second best since
it's still pretty general. I'm not adding `and`/`or` variants.
Reviewers: RKSimon, craig.topper, spatel
Reviewed By: RKSimon
Subscribers: nick, hiraditya, xbolva00, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70051
Michał Górny [Fri, 22 Nov 2019 12:03:16 +0000 (13:03 +0100)]
[lldb] [test] XFAIL TestExpressionEvaluation on NetBSD
Simon Pilgrim [Fri, 22 Nov 2019 11:57:08 +0000 (11:57 +0000)]
[X86] Updated strict fp scalar tests and add fp80 tests for D68857
Kirill Bobyrev [Fri, 22 Nov 2019 11:48:06 +0000 (12:48 +0100)]
[clangd] Show lambda signature for lambda autocompletions
The original bug report can be found
[here](https://github.com/clangd/clangd/issues/85)
Given the following code:
```c++
void function() {
auto Lambda = [](int a, double &b) {return 1.f;};
La^
}
```
Triggering the completion at `^` would show `(lambda)` before this patch
and would show signature `(int a, double &b) const`, build a snippet etc
with this patch.
Reviewers: sammccall
Reviewed by: sammccall
Differential revision: https://reviews.llvm.org/D70445
Martin Svensson [Fri, 22 Nov 2019 10:18:47 +0000 (11:18 +0100)]
[lldb] Fix exception breakpoint not being resolved when set on dummy target
Summary: Ensure that breakpoint ivar is properly set in exception breakpoint resolver so that exception breakpoints set on dummy targets are resolved once real targets are created and run.
Reviewers: jingham
Reviewed By: jingham
Subscribers: teemperor, JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D69880
Pankaj Gode [Fri, 22 Nov 2019 09:16:43 +0000 (14:46 +0530)]
Test commit.
Pavel Labath [Fri, 8 Nov 2019 14:33:54 +0000 (15:33 +0100)]
[DWARFVerifier] Use the new location list api
Summary:
Instead of going to the debug_loc section directly, use new
DWARFDie::getLocations instead. This means that the code will now
automatically support debug_loclists sections.
This is the last usage of the old debug_loc methods, and they can now be
removed.
Reviewers: dblaikie, JDevlieghere, aprantl, SouraVX
Subscribers: hiraditya, probinson, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70534
QingShan Zhang [Fri, 22 Nov 2019 08:55:13 +0000 (08:55 +0000)]
[PowerPC] Implement the vector extend sign instruction pattern match
Power9 has instructions to implement the semantics of SIGN_EXTEND_INREG for vector type.
Mark it as legal and add the match pattern.
Differential Revision: https://reviews.llvm.org/D69601
LLVM GN Syncbot [Fri, 22 Nov 2019 08:12:49 +0000 (08:12 +0000)]
gn build: Merge
f7170d17a84
LLVM GN Syncbot [Fri, 22 Nov 2019 08:12:48 +0000 (08:12 +0000)]
gn build: Merge
aa981c1802d
LLVM GN Syncbot [Fri, 22 Nov 2019 08:12:48 +0000 (08:12 +0000)]
gn build: Merge
95fe54931fd
Nico Weber [Fri, 22 Nov 2019 08:12:25 +0000 (03:12 -0500)]
gn build: (manually) merge dep from
f65cfff6
Clement Courbet [Fri, 22 Nov 2019 08:00:16 +0000 (09:00 +0100)]
Revert "[DAGCombiner] Allow zextended load combines."
Breaks some bots.
Clement Courbet [Mon, 18 Nov 2019 12:22:10 +0000 (13:22 +0100)]
[clang-tidy] new performance-no-automatic-move check.
Summary: The check flags constructs that prevent automatic move of local variables.
Reviewers: aaron.ballman
Subscribers: mgorny, xazax.hun, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70390
Clement Courbet [Tue, 19 Nov 2019 15:24:43 +0000 (16:24 +0100)]
[DAGCombiner] Allow zextended load combines.
Summary: or(zext(load8(base)), zext(load8(base+1)) -> zext(load16 base)
Reviewers: apilipenko, RKSimon
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70487
Raphael Isemann [Fri, 22 Nov 2019 07:34:04 +0000 (08:34 +0100)]
[lldb] Don't enable expression log in TestEmptyStdModule.py
Thanks for pointing this out Jason!
Artem Dergachev [Fri, 22 Nov 2019 05:53:50 +0000 (21:53 -0800)]
[CFG] Fix a flaky crash in CFGBlock::getLastCondition().
Using an end iterator of an empty CFG block was causing
a garbage pointer dereference.
Differential Revision: https://reviews.llvm.org/D69962
Amy Kwan [Fri, 22 Nov 2019 05:06:33 +0000 (23:06 -0600)]
[CMake] Fix LLVM build non-determinism on RHEL
On RHEL, the OS tooling (ar, ranlib) is not deterministic by default.
Therefore, we cannot get bit-for-bit identical builds.
The goal of this patch is that it adds the flags required to force determinism.
Differential Revision: https://reviews.llvm.org/D64817
czhengsz [Fri, 22 Nov 2019 05:00:33 +0000 (00:00 -0500)]
[PowerPC] combine rlwinm+rlwinm to rlwinm
combine
x3 = rlwinm x3, 27, 5, 31
x3 = rlwinm x3, 19, 0, 12
to
x3 = rlwinm x3, 14, 0, 12
Reviewed by: steven.zhang
Differential Revision: https://reviews.llvm.org/D70374
Wang, Pengfei [Fri, 22 Nov 2019 04:24:38 +0000 (12:24 +0800)]
[X86] Add option 'disable-strictnode-mutation' for tests that respect
strict fp semantics. NFCI.
Zakk Chen [Thu, 21 Nov 2019 09:12:48 +0000 (01:12 -0800)]
[RISCV] Support mutilib in baremetal environment
1. Currently only support the set of multilibs same to riscv-gnu-toolchain.
2. Fix testcase typo causes fail on Windows.
3. Fix testcases to set empty sysroot.
Reviewers: espindola, asb, kito-cheng, lenary
Reviewed By: lenary
Differential Revision: https://reviews.llvm.org/D67508
Duncan P. N. Exon Smith [Fri, 22 Nov 2019 02:49:05 +0000 (18:49 -0800)]
clang/Modules: Move Serialization/Module.{h,cpp} to ModuleFile, NFC
Remove some cognitive load by renaming clang/Serialization/Module.h to
clang/Serialization/ModuleFile.h, since it declares the ModuleFile
class. This also makes editing a bit easier, since the basename of the
file no long conflicts with clang/Basic/Module.h, which declares the
Module class. Also move lib/Serialization/Module.cpp to
lib/Serialization/ModuleFile.cpp.
Artem Dergachev [Fri, 22 Nov 2019 02:13:48 +0000 (18:13 -0800)]
[analyzer] Fix Objective-C accessor body farms after
2073dd2d.
Fix a canonicalization problem for the newly added property accessor stubs that
was causing a wrong decl to be used for 'self' in the accessor's body farm.
Fix a crash when constructing a body farm for accessors of a property
that is declared and @synthesize'd in different (but related) interfaces.
Differential Revision: https://reviews.llvm.org/D70158
Artem Dergachev [Fri, 22 Nov 2019 02:12:26 +0000 (18:12 -0800)]
[analyzer] NFC: Don't clean up range constraints twice.
Slightly improves static analysis speed.
Differential Revision: https://reviews.llvm.org/D70150
Craig Topper [Fri, 22 Nov 2019 02:15:53 +0000 (18:15 -0800)]
[X86] Add test cases for most of the constrained fp libcalls with fp128.
Add explicit setOperation actions for some to match their none
strict counterparts. This isn't required, but makes the code
self documenting that we didn't forget about strict fp. I've
used LibCall instead of Expand since that's more explicitly what
we want.
Only lrint/llrint/lround/llround are missing now.
Craig Topper [Fri, 22 Nov 2019 01:06:41 +0000 (17:06 -0800)]
[X86] Mark fp128 FMA as LibCall instead of Expand. Add STRICT_FMA as well.
The Expand code would fall back to LibCall, but this makes it
more explicit.
Artem Dergachev [Fri, 22 Nov 2019 02:05:19 +0000 (18:05 -0800)]
[CFG] Add a test for a flaky crash in CFGBlock::getLastCondition().
Push the test separately ahead of time in order to find out whether
our Memory Sanitizer bots will be able to find the problem.
If not, I'll add a much more expensive test that repeats the current
test multiple times in order to show up on normal buildbots.
I really apologize for the potential temporary inconvenience!
I'll commit the fix as soon as I get the signal.
Differential Revision: https://reviews.llvm.org/D69962
Pengfei Wang [Fri, 22 Nov 2019 01:17:19 +0000 (17:17 -0800)]
[FPEnv] Add an option to disable strict float node mutating to an normal
float node
This patch add an option 'disable-strictnode-mutation' to prevent strict
node mutating to an normal node.
So we can make sure that the patch which sets strict-node as legal works
correctly.
Patch by Chen Liu(LiuChen3)
Differential Revision: https://reviews.llvm.org/D70226
Alina Sbirlea [Fri, 22 Nov 2019 00:58:37 +0000 (16:58 -0800)]
[LoopInstSimplify] Move MemorySSA verification under flag.
The verification inside loop passes should be done under the
VerifyMemorySSA flag (enabled by EXPESIVE_CHECKS or explicitly with
opt), in order to not add to compile time during regular builds.
Marco Vanotti [Tue, 29 Oct 2019 22:38:51 +0000 (15:38 -0700)]
[libFuzzer] don't use /dev/null for DiscardOuput in Fuchsia.
Summary:
This commit moves the `DiscardOutput` function in FuzzerIO to
FuzzerUtil, so fuchsia can have its own specialized version.
In fuchsia, accessing `/dev/null` is not supported, and there's nothing
similar to a file that discards everything that is written to it. The
way of doing something similar in fuchsia is by using `fdio_null_create`
and binding that to a file descriptor with `fdio_bind_to_fd`.
This change should fix one of the issues with the `-close_fd_mask` flag
in libfuzzer, in which closing stdout was not working due to
`fopen("/dev/null", "w")` returning `NULL`.
Reviewers: kcc, aarongreen
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D69593
Nathan Ridge [Tue, 24 Sep 2019 22:17:55 +0000 (18:17 -0400)]
[clangd] Inactive regions support as an extension to semantic highlighting
Differential Revision: https://reviews.llvm.org/D67536
Craig Topper [Thu, 21 Nov 2019 23:53:01 +0000 (15:53 -0800)]
[LegalizeDAG][X86] Add support for turning STRICT_FADD/SUB/MUL/DIV into libcalls. Use it for fp128 on x86-64.
This requires a minor hack for f32/f64 strict fadd/fsub to avoid
turning those into libcalls.
Craig Topper [Thu, 21 Nov 2019 22:24:32 +0000 (14:24 -0800)]
[X86] Mark vector STRICT_FADD/STRICT_FSUB as Legal and add mutation to X86ISelDAGToDAG
The prevents LegalizeVectorOps from scalarizing them. We'll need
to remove the X86 mutation code when we add isel patterns.
Craig Topper [Thu, 21 Nov 2019 21:03:14 +0000 (13:03 -0800)]
[X86] Remove regcall calling convention from fp-strict-scalar.ll. Add 32-bit and 64-bit check prefixes.
The regcall was making 32-bit mode pass things in xmm registers
which made 32-bit and 64-bit more similar. But I have upcoming
patches that require them to be separated anyway.
Alexander Shaposhnikov [Thu, 21 Nov 2019 02:16:11 +0000 (18:16 -0800)]
[llvm-lipo] Add support for -extract
This diff adds support for -extract.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D70522
Petr Hosek [Wed, 20 Nov 2019 03:56:54 +0000 (19:56 -0800)]
[Clang] Enable RISC-V support for Fuchsia
We don't have a full sysroot yet, so for now we only include compiler
support and compiler-rt builtins, the rest of the runtimes will get
enabled later.
Differential Revision: https://reviews.llvm.org/D70477
Marco Vanotti [Tue, 29 Oct 2019 15:48:46 +0000 (08:48 -0700)]
[libFuzzer] Fix unwinding for Fuchsia
Summary:
This commit fixes part of the issues with stack unwinding in fuchsia for
arm64 and x86_64. It consists of multiple fixes:
(1) The cfa_offset calculation was wrong, instead of pointing to the
previous stack pointer, it was pointing to the current one. It worked in
most of the cases because the crashing functions already had a
prologue and had their cfa information relative to another register. The
fix consists on adding a constant that can be used to calculate the
crashing function's stack pointer, and base all the cfi information
relative to that offset.
(2) (arm64) Due to errors with the syntax for the dwarf information, most
of the `OP_NUM` macros were not working. The problem was that they were
referred to as `r##NUM` (like `r14`), when it should have been `x##num`
(like `x14`), or even without the x.
(3) (arm64) The link register was being considered a part of the main
registers (`r30`), when in the real struct it has its own field. Given
that the link register is in the same spot in the struct as r[30] would be,
and that C++ doesn't care about anything, the calculation was still correct.
(4) (x86_64) The stack doesn't need to be aligned to 16 bytes when we
jump to the trampoline function, but it needs to be before performing
call instructions. Encoding that logic in cfi information was tricky, so
we decided to make the cfa information relative to `rbp` and align `rsp`.
Note that this could have been done using another register directly,
but it seems cleaner to make a new fake stack frame.
There are some other minor changes like adding a `brk 1` instruction in
arm64 to make sure that we never return to the crash trampoline (similar to
what we do in x86_64).
Sadly this commit does not fix unwinding for all use cases for arm64.
Crashing functions that do not add information related to the return column in
their cfi information will fail to unwind due to a bug in libunwinder.
Reviewers: mcgrathr, jakehehrlich, phosek, kcc, aarongreen
Subscribers: aprantl, kristof.beyls, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D69579
Philip Reames [Thu, 21 Nov 2019 23:26:58 +0000 (15:26 -0800)]
[LoopPred] Robustly handle partially unswitched loops
We may end up with a case where we have a widenable branch above the loop, but not all widenable branches within the loop have been removed. Since a widenable branch inhibit SCEVs ability to reason about exit counts (by design), we have a tradeoff between effectiveness of this optimization and allowing future widening of the branches within the loop. LoopPred is thought to be one of the most important optimizations for range check elimination, so let's pay the cost.
Adrian Prantl [Thu, 21 Nov 2019 23:40:50 +0000 (15:40 -0800)]
Early-exitify ClangASTContext::AddObjCClassProperty() (NFC)
Luís Marques [Thu, 21 Nov 2019 23:33:01 +0000 (23:33 +0000)]
[Object][RISCV] Resolve R_RISCV_32_PCREL
Summary: Add support for resolving `R_RISCV_32_PCREL` relocations. Those aren't
actually resolved AFAIK, but support is still needed to avoid llvm-dwarfdump
errors. The use of these relocations was introduced in D66419 but the
corresponding resolving wasn't added then. The test adds a check that should
catch future unresolved relocations.
Reviewers: asb, lenary
Reviewed By: asb
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70204
David Tellenbach [Thu, 21 Nov 2019 23:09:50 +0000 (00:09 +0100)]
[AArch64] [FrameLowering] Allow conditional insertion of CFI instruction
Summary:
The insertion of most CFI instructions during AArch64 frame lowering can
be disabled (e.g. using the function attribute `nounwind`).
This patch enables conditional insertion for one more CFI instruction.
Reviewers: t.p.northover, ostannard
Reviewed By: ostannard
Subscribers: kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70129
Marco Vanotti [Thu, 10 Oct 2019 05:47:30 +0000 (22:47 -0700)]
[libFuzzer] Fix fd check in DupAndCloseStderr.
Summary:
This commit fixes the check in the return value from the `DuplicateFile`
function, which returns a new file descriptor. `DuplicateFile` can
return 0 if that file descriptor is available (for example, if stdin has
already been closed).
In particular, this could cause a bug with the `-close_fd_mask` flag in
some platforms: just call the fuzzer with stdin closed and the
`-close_fd_mask=2` flag, and stderr will not be muted.
Example fuzzer:
```
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) {
fprintf(stderr, "STDERR\n");
fprintf(stdout, "STDOUT\n");
return 0;
}
```
Invocation (muting both stderr and stdout):
```
./test -close_fd_mask=3 -runs=1 0<&-
INFO: Seed:
1155116940
INFO: Loaded 1 modules (1 inline 8-bit counters): 1 [0x48b020, 0x48b021),
INFO: Loaded 1 PC tables (1 PCs): 1 [0x478dc8,0x478dd8),
INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
STDERR
INFO: A corpus is not provided, starting from an empty corpus
STDERR
Done 2 runs in 0 second(s)
```
Reviewers: mcgrathr, jakehehrlich, phosek, kcc, aarongreen
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D68775
Julian Lettner [Wed, 20 Nov 2019 20:25:05 +0000 (12:25 -0800)]
[TSan] Make `mach_vm_allocate.c` test less flaky
rdar://
57365733
Philip Reames [Thu, 21 Nov 2019 23:06:01 +0000 (15:06 -0800)]
Further cleanup manipulation of widenable branches [NFC]
This is a follow on to
aaea24802bf5. In post commit discussion, Artur and I realized we could cleanup the code using Uses; this patch does so.
Joel E. Denny [Wed, 20 Nov 2019 22:12:29 +0000 (17:12 -0500)]
[FileCheck] Make FILECHECK_OPTS useful for its test suite
Without this patch, `FILECHECK_OPTS` isn't propagated to FileCheck's
test suite so that `FILECHECK_OPTS` doesn't inadvertently affect test
results by affecting the output of FileCheck calls under test. As a
result, `FILECHECK_OPTS` is useless for debugging FileCheck's test
suite.
In `llvm/test/FileCheck/lit.local.cfg`, this patch provides a new
subsitution, `%ProtectFileCheckOutput`, to address this problem for
both `FILECHECK_OPTS` and the deprecated
`FILECHECK_DUMP_INPUT_ON_FAILURE`. The rest of the patch uses
`%ProtectFileCheckOutput` throughout the test suite
Fixes PR40284.
Reviewed By: probinson, thopre
Differential Revision: https://reviews.llvm.org/D65121
Luís Marques [Thu, 21 Nov 2019 22:52:51 +0000 (22:52 +0000)]
[Object][RISCV] Fix R_RISCV_SET6 and R_RISCV_SUB6 relocations resolution
Summary: These relocations had a suspicious resolution logic, given their name.
This patch makes the resolution match the LLD one, which makes more sense.
Reviewers: asb, lenary, HsiangKai, jrtc27
Reviewed By: HsiangKai
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70396
Hiroshi Yamauchi [Mon, 11 Nov 2019 18:59:36 +0000 (10:59 -0800)]
[PGO][PGSO] DAG.shouldOptForSize part.
Summary:
(Split of off D67120)
SelectionDAG::shouldOptForSize changes for profile guided size optimization.
Reviewers: davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70095
Vedant Kumar [Thu, 21 Nov 2019 21:53:10 +0000 (13:53 -0800)]
Clang-trunk Generates Wrong Debug values with -O1
Bit-Tracking Dead Code Elimination (bdce) do not mark dbg.value as undef after
deleting instruction. which shows invalid state of variable in debugger. This
patches fixes this by marking the dbg.value as undef which depends on dead
instruction.
This fixes https://bugs.llvm.org/show_bug.cgi?id=41925
Patch by kamlesh kumar!
Differential Revision: https://reviews.llvm.org/D70040
Alexey Bataev [Thu, 21 Nov 2019 21:36:49 +0000 (16:36 -0500)]
[OPENMP]Remove unused template parameter, NFC.
Jonas Devlieghere [Thu, 21 Nov 2019 21:36:36 +0000 (13:36 -0800)]
[Driver] Fix newline at the end of help output
Print a regular newline at the end of the help output. The current
string literal seems to throw off shells.
Jonas Devlieghere [Thu, 21 Nov 2019 21:34:01 +0000 (13:34 -0800)]
[Reproducer] Make 'reproducer xcrash' behave the same during capture & replay
There's no point in preventing this command from running during replay.
We should simulate the same crash as during capture.
Jonas Devlieghere [Thu, 21 Nov 2019 21:25:43 +0000 (13:25 -0800)]
[Reproducer] Instruct users to replay reproducer
Improve the message printed when LLDB crashes by asking the user to
replay the reproducer before attaching it to a bugreport..
********************
Crash reproducer for lldb version 10.0.0 (git@github.com:llvm/llvm-project.git revision ...)
clang revision ...
llvm revision ...
Reproducer written to '/path/to/reproducer'
Before attaching the reproducer to a bug report:
- Look at the directory to ensure you're willing to share its content.
- Make sure the reproducer works by replaying the reproducer.
Replay the reproducer with the following command:
./bin/lldb -replay /path/to/reproducer
********************
Jonas Devlieghere [Thu, 21 Nov 2019 21:09:40 +0000 (13:09 -0800)]
[test] Mark TestEditline as skipped with ASan.
As discussed in https://reviews.llvm.org/D70324.
Kazu Hirata [Thu, 21 Nov 2019 16:27:17 +0000 (08:27 -0800)]
[JumpThreading] Refactor ThreadEdge
Summary:
This patch moves various checks from ThreadEdge to new function
TryThreadEdge The rational behind this is that I'd like to use
ThreadEdge without its checks in my upcoming patch.
This patch preserves lightweight checks as assertions in ThreadEdge.
ThreadEdge does not repeat the cost check, however.
Reviewers: wmi
Subscribers: hiraditya, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70338
Craig Topper [Thu, 21 Nov 2019 19:27:04 +0000 (11:27 -0800)]
[X86] Change legalization action for f128 fadd/fsub/fmul/fdiv from Custom to LibCall.
The custom code just emits a libcall, but we can do the same
with generic code. The only difference is that the generic code
can form tail calls where the custom code couldn't. This is
responsible for the test changes.
This avoids needing to modify the Custom handling for strict fp.
Craig Topper [Thu, 21 Nov 2019 19:12:35 +0000 (11:12 -0800)]
[X86] Add test case for f128 fma. NFC
This should be turned into a libcall to fmal. We already do it
correctly, but we had no test to confirm.
Stefan Pintilie [Thu, 21 Nov 2019 19:28:51 +0000 (13:28 -0600)]
[PowerPC] Add new Future CPU for PowerPC
This patch will add -mcpu=future into clang for PowerPC.
A CPU type is required for work that may possibly be enabled for some future
Power CPU. The CPU type future will serve that purpose. This patch introduces
no new functionality. It is an incremental patch on top of which Power PC work
for some future CPU can be done.
Differential Revision: https://reviews.llvm.org/D70262
Jonas Devlieghere [Thu, 21 Nov 2019 19:14:25 +0000 (11:14 -0800)]
[Test] Split up TestIntegerTypes.py
The unsplit test is timing out on GreenDragon's sanitized bot. By
splitting the test we avoid this issue and increase parallelism.
Adrian Prantl [Thu, 21 Nov 2019 17:56:01 +0000 (09:56 -0800)]
Debug info: Emit objc_direct methods as members of their containing class
even in DWARF 4 and earlier. This allows the debugger to recognize
them as direct functions as opposed to Objective-C methods.
<rdar://problem/
57327663>
Differential Revision: https://reviews.llvm.org/D70544
Tom Stellard [Thu, 14 Nov 2019 05:39:58 +0000 (05:39 +0000)]
[cmake] Explicitly mark libraries defined in lib/ as "Component Libraries"
Summary:
Most libraries are defined in the lib/ directory but there are also a
few libraries defined in tools/ e.g. libLLVM, libLTO. I'm defining
"Component Libraries" as libraries defined in lib/ that may be included in
libLLVM.so. Explicitly marking the libraries in lib/ as component
libraries allows us to remove some fragile checks that attempt to
differentiate between lib/ libraries and tools/ libraires:
1. In tools/llvm-shlib, because
llvm_map_components_to_libnames(LIB_NAMES "all") returned a list of
all libraries defined in the whole project, there was custom code
needed to filter out libraries defined in tools/, none of which should
be included in libLLVM.so. This code assumed that any library
defined as static was from lib/ and everything else should be
excluded.
With this change, llvm_map_components_to_libnames(LIB_NAMES, "all")
only returns libraries that have been added to the LLVM_COMPONENT_LIBS
global cmake property, so this custom filtering logic can be removed.
Doing this also fixes the build with BUILD_SHARED_LIBS=ON
and LLVM_BUILD_LLVM_DYLIB=ON.
2. There was some code in llvm_add_library that assumed that
libraries defined in lib/ would not have LLVM_LINK_COMPONENTS or
ARG_LINK_COMPONENTS set. This is only true because libraries
defined lib lib/ use LLVMBuild.txt and don't set these values.
This code has been fixed now to check if the library has been
explicitly marked as a component library, which should now make it
easier to remove LLVMBuild at some point in the future.
I have tested this patch on Windows, MacOS and Linux with release builds
and the following combinations of CMake options:
- "" (No options)
- -DLLVM_BUILD_LLVM_DYLIB=ON
- -DLLVM_LINK_LLVM_DYLIB=ON
- -DBUILD_SHARED_LIBS=ON
- -DBUILD_SHARED_LIBS=ON -DLLVM_BUILD_LLVM_DYLIB=ON
- -DBUILD_SHARED_LIBS=ON -DLLVM_LINK_LLVM_DYLIB=ON
Reviewers: beanz, smeenai, compnerd, phosek
Reviewed By: beanz
Subscribers: wuzish, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, mgorny, mehdi_amini, sbc100, jgravelle-google, hiraditya, aheejin, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, steven_wu, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, PkmX, jocewei, jsji, dang, Jim, lenary, s.egerton, pzheng, sameer.abuasal, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70179
Philip Reames [Thu, 21 Nov 2019 18:44:13 +0000 (10:44 -0800)]
Broaden the definition of a "widenable branch"
As a reminder, a "widenable branch" is the pattern "br i1 (and i1 X, WC()), label %taken, label %untaken" where "WC" is the widenable condition intrinsics. The semantics of such a branch (derived from the semantics of WC) is that a new condition can be added into the condition arbitrarily without violating legality.
Broaden the definition in two ways:
Allow swapped operands to the br (and X, WC()) form
Allow widenable branch w/trivial condition (i.e. true) which takes form of br i1 WC()
The former is just general robustness (e.g. for X = non-instruction this is what instcombine produces). The later is specifically important as partial unswitching of a widenable range check produces exactly this form above the loop.
Differential Revision: https://reviews.llvm.org/D70502
Philip Reames [Thu, 21 Nov 2019 18:37:58 +0000 (10:37 -0800)]
[Tests] Autogenerate a bunch of SCEV trip count tests for readability. Will likely merge some of these files soon.
Alexey Bataev [Tue, 5 Nov 2019 20:13:30 +0000 (15:13 -0500)]
[OPENMP50]Add device/kind context selector support.
Summary: Added basic parsing/sema support for device/kind context selector.
Reviewers: jdoerfert
Subscribers: rampitec, aheejin, fedor.sergeev, simoncook, guansong, s.egerton, hfinkel, kkwli0, caomhin, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70245
Philip Reames [Thu, 21 Nov 2019 18:22:49 +0000 (10:22 -0800)]
[SCEV] Add a mode to skip classification when printing analysis
For the various trip-count tests, the classification isn't useful and makes the auto-generated tests super verbose. By skipping it, we make the auto-gen tests closer to the manually written ones. Up next: auto-genning a bunch of the existings tests.
Kostya Kortchinsky [Tue, 19 Nov 2019 18:18:38 +0000 (10:18 -0800)]
[scudo][standalone] Minor optimization & improvements
Summary:
A few small improvements and optimizations:
- when refilling the free list, push back the last batch and return
the front one: this allows to keep the allocations towards the front
of the region;
- instead of using 48 entries in the shuffle array, use a multiple of
`MaxNumCached`;
- make the maximum number of batches to create on refil a constant;
ultimately it should be configurable, but that's for later;
- `initCache` doesn't need to zero out the cache, it's already done.
- it turns out that when using `||` or `&&`, the compiler is adamant
on adding a short circuit for every part of the expression. Which
ends up making somewhat annoying asm with lots of test and
conditional jump. I am changing that to bitwise `|` or `&` in two
place so that the generated code looks better. Added comments since
it might feel weird to people.
This yields to some small performance gains overall, nothing drastic
though.
Reviewers: hctim, morehouse, cferris, eugenis
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D70452
Jonas Devlieghere [Wed, 20 Nov 2019 22:53:37 +0000 (14:53 -0800)]
[Docs] Generate the LLDB man page with Sphinx
This patch replaces the existing out-of-date man page for lldb and
replaces it with an RST file from which sphinx generates the actual
troff file. This is similar to how man pages are generated for the rest
of the LLVM utilities.
The man page is generated by building the `docs-lldb-man` target.
Differential revision: https://reviews.llvm.org/D70514
Philip Reames [Thu, 21 Nov 2019 17:52:38 +0000 (09:52 -0800)]
[SCEV] Be robust against IR generated by simple-loop-unswitch
Simple loop unswitch likes to leave around unsimplified and/or/xors. SCEV today bails out on these idioms which is unfortunate in general, and specifically for the unswitch interaction.
Differential Revision: https://reviews.llvm.org/D70459
Fangrui Song [Tue, 19 Nov 2019 22:16:04 +0000 (14:16 -0800)]
[ELF] Error if -Ttext-segment is specified
In GNU ld, -Ttext sets the address of the .text section and -Ttext-segment sets the address of the text segment (RX).
gold only supports the -Ttext-segment semantic and treats -Ttext as an alias for -Ttext-segment.
lld only supports the -Ttext semantic and treats -Ttext-segment as an
alias for -Ttext. The text segment will be assigned to an address less
than the specified -Ttext-segment value.
This patch drops the -Ttext-segment alias.
The text segment is traditionally the first segment. Users who specify
-Ttext-segment may actually want to specify --image-base, the lld way to
express this. Unfortunately currently this is supported by GNU ld's
COFF port but not by its ELF port. gold does not support this option.
With -z separate-code, the behavior of GNU ld -Ttext-segment is weird (see https://sourceware.org/bugzilla/show_bug.cgi?id=25207)
rL289827 introduced the alias for linking qemu's non-pie user mode
binaries. As explained previously, this actually assigns the text
segment to an address less than 0x60000000. I feel that a better fix is
on the qemu side:
https://lists.nongnu.org/archive/html/qemu-devel/2019-11/msg02480.html
Reviewed By: grimar, ruiu
Differential Revision: https://reviews.llvm.org/D70468
Fangrui Song [Mon, 18 Nov 2019 23:25:04 +0000 (15:25 -0800)]
[llvm-objcopy][MachO] Implement --strip-debug
Reviewed By: alexshap
Differential Revision: https://reviews.llvm.org/D70476
Fangrui Song [Wed, 20 Nov 2019 01:27:25 +0000 (17:27 -0800)]
[llvm-objcopy][MachO] Fix symbol order in the symbol table
Only consider isUndefinedSymbol() when the symbol is not local. This
fixes an assert failure when copying the symbol table, if a n_type=0x20
symbol is followed by a n_type=0x64 symbol.
Reviewed By: alexshap, seiya
Differential Revision: https://reviews.llvm.org/D70475
Bjorn Pettersson [Mon, 11 Nov 2019 17:20:40 +0000 (18:20 +0100)]
[BranchFolding] Fix PR43964 about branch folder not being debug invariant
Summary:
The fix in BranchFolder related to non debug invariant problems
done in commit
ec32dff0b075055 actually introduced some new
problems with debug invariance.
Before that patch ComputeCommonTailLength would move iterators
back, past debug instructions, in order to make ProfitableToMerge
make consistent answers "when one block differs from the other
only by whether debugging pseudos are present at the beginning".
But the changes in
ec32dff0b075055 undid that by moving the iterators
forward again.
This patch refactors ComputeCommonTailLength. The function was
really complex, considering that the SkipTopCFIAndReturn part
always moved the iterators forward to the first "real" instruction
in the found tail after
ec32dff0b075055.
The patch also restores the logic to "back past possible debugging
pseudos at beginning of block" to make sure ProfitableToMerge
gives consistent answers independent of DBG_VALUE instructions
before the tail. That is now done by ProfitableToMerge instead of
being hidden as a side-effect in ComputeCommonTailLength.
Reviewers: probinson, yechunliang, jmorse
Reviewed By: jmorse
Subscribers: Orlando, mehdi_amini, dexonsmith, aprantl, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70091
Michael Liao [Thu, 21 Nov 2019 17:06:32 +0000 (12:06 -0500)]
Fix compilation warning. NFC.
Adrian McCarthy [Tue, 19 Nov 2019 20:51:00 +0000 (12:51 -0800)]
[NFC] Refactor and improve comments in CommandObjectTarget
Made small improvements while debugging through
CommandObjectTarget::AddModuleSymbols.
1. Refactored error case for an early out, reducing the indentation of
the rest of this long function.
2. Clarified some comments by correcting spelling and punctuation.
3. Reduced duplicate code at the end of the function.
Tested with `ninja check-lldb`
Differential Review: https://reviews.llvm.org/D70458
Adrian Prantl [Thu, 21 Nov 2019 16:32:42 +0000 (08:32 -0800)]
Reduce the number of iterations in testcase. (NFC)
Alexey Bataev [Thu, 21 Nov 2019 16:03:26 +0000 (11:03 -0500)]
[OPENMP]Fix datasharing checks for if clause in parallel taskloop
directives.
If the default datasharing is set to none, the datasharing attributes
for variables in the condition of the if clause for the inner taskloop
directive must be verified.
Sanjay Patel [Wed, 20 Nov 2019 20:23:03 +0000 (15:23 -0500)]
[InstCombine] add assert in SimplifyDemandedVectorElts and improve readability; NFC
Simon Pilgrim [Thu, 21 Nov 2019 16:09:19 +0000 (16:09 +0000)]
Fix unused variable warning. NFCI.
James Y Knight [Wed, 20 Nov 2019 15:08:18 +0000 (10:08 -0500)]
LLD: Don't use the stderrOS stream in link before it's reassigned.
Remove the lld::enableColors function, as it just obscures which
stream it's affecting, and replace with explicit calls to the stream's
enable_colors.
Also, assign the stderrOS and stdoutOS globals first in link function,
just to ensure nothing might use them.
(Either change individually fixes the issue of using the old
stream, but both together seems best.)
Follow-up to
b11386f9be9b2dc7276a758d64f66833da10bdea.
Differential Revision: https://reviews.llvm.org/D70492
Krzysztof Parzyszek [Thu, 21 Nov 2019 15:06:14 +0000 (09:06 -0600)]
[Hexagon] Remove incorrect intrinsic definition and invalid testcase
The intrinsic int_hexagon_S2_asr_i_vh was mapped to S2_asr_r_vh, which
is wrong. The testcase vasrh.select.ll was using an invalid immediate
for that intrinsic. This is not a proper testcase, since at the MIR
level such use of this intrinsic should never appear.
Together with
824b25fc02, this completes the fix for llvm.org/PR44090.
Alexey Bataev [Wed, 20 Nov 2019 20:59:03 +0000 (15:59 -0500)]
[OPENMP50]Add if clause in for simd directive.
According to OpenMP 5.0, if clause can be used in for simd directive. If
condition in the if clause if false, the non-vectorized version of the
loop must be executed.
Miloš Stojanović [Thu, 21 Nov 2019 14:17:21 +0000 (15:17 +0100)]
[mips] Add a 'generic' Mips CPU
Having a generic CPU removes a warning when creating a subtarget without
the CPU being explicitly specified.
Differential Revision: https://reviews.llvm.org/D70490
Clement Courbet [Thu, 21 Nov 2019 13:55:53 +0000 (14:55 +0100)]
[DAGCombiner] Use the right thumbv7meb triple for ARM big-endian test.
Sjoerd Meijer [Thu, 21 Nov 2019 14:03:28 +0000 (14:03 +0000)]
[LV] PreferPredicateOverEpilog respecting option
Follow-up of
cb47b8783: don't query TTI->preferPredicateOverEpilogue when
option -prefer-predicate-over-epilog is set to false, i.e. when we prefer not
to predicate the loop.
Differential Revision: https://reviews.llvm.org/D70382
Raphael Isemann [Thu, 21 Nov 2019 13:40:45 +0000 (14:40 +0100)]
[lldb][NFC] Modernize string handling in ClangExpressionDeclMap::FindExternalVisibleDecl
Raphael Isemann [Thu, 21 Nov 2019 12:58:48 +0000 (13:58 +0100)]
[lldb][NFC] Move searching functions in ClangExpressionDeclMap to own function
Ehud Katz [Thu, 7 Nov 2019 10:28:48 +0000 (12:28 +0200)]
[DeclCXX] Remove unknown external linkage specifications
Partial revert of r372681 "Support for DWARF-5 C++ language tags".
The change introduced new external linkage languages ("C++11" and
"C++14") which not supported in C++.
It also changed the definition of the existing enum to use the DWARF
constants. The problem is that "LinkageSpecDeclBits.Language" (the field
that reserves this enum) is actually defined as 3 bits length
(bitfield), which cannot contain the new DWARF constants. Defining the
enum as integer literals is more appropriate for maintaining valid
values.
Differential Revision: https://reviews.llvm.org/D69935
Alexey Lapshin [Thu, 21 Nov 2019 12:00:40 +0000 (15:00 +0300)]
[Debuginfo][NFC] removes redundant semicolon.
Raphael Isemann [Thu, 21 Nov 2019 12:43:48 +0000 (13:43 +0100)]
[lldb][NFC] Reduce scope of some variables in ClangExpressionDeclMap::FindExternalVisibleDecls
Dmitri Gribenko [Tue, 19 Nov 2019 17:49:37 +0000 (18:49 +0100)]
Make coding standards document more inclusive
Summary: Patch by Doug Gregor, Tres Popp, and Dmitri Gribenko.
Reviewers: chandlerc
Subscribers: hfinkel, bmcreusillet, arsenm, doug.gregor, mgrang, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69354
Zakk Chen [Thu, 21 Nov 2019 12:34:10 +0000 (04:34 -0800)]
Revert "[RISCV] Support mutilib in baremetal environment"
This reverts commit
df876a026981b7a125b31bbb85ba4b1144edb0f9.
Clang::riscv32-toolchain.c Clang::riscv64-toolchain.c fails on Windows.
Clement Courbet [Thu, 21 Nov 2019 12:05:54 +0000 (13:05 +0100)]
[DAGCombiner] Add tests for thumb load-combine.