Adrian Prantl [Wed, 13 Mar 2019 15:54:18 +0000 (15:54 +0000)]
Make sure FileSystem::Resolve preserves the path/file distinction.
This should finally fix TestPaths.py.
llvm-svn: 356057
Louis Dionne [Wed, 13 Mar 2019 15:35:21 +0000 (15:35 +0000)]
[NFC][CMake] Improve Status message in the iOS toolchain file
llvm-svn: 356056
Haojian Wu [Wed, 13 Mar 2019 15:22:31 +0000 (15:22 +0000)]
[clangd] Fix a typo in doc.
llvm-svn: 356055
Sander de Smalen [Wed, 13 Mar 2019 15:18:27 +0000 (15:18 +0000)]
[AArch64] Add test/CodeGen/AArch64/vecreduce-fadd.ll
This test is added to see difference created by:
https://reviews.llvm.org/D59259
llvm-svn: 356054
Sanjay Patel [Wed, 13 Mar 2019 14:49:52 +0000 (14:49 +0000)]
[x86] limit extractelement of setcc to pre-legalization
A fuzzer found the crasher:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13700
The bug was introduced recently here:
rL355741
This is the quick fix. If we need to do this transform
later, then we'd have to extend/truncate the vector setcc
element type to the scalar setcc type (i8).
llvm-svn: 356053
Simon Atanasyan [Wed, 13 Mar 2019 14:23:12 +0000 (14:23 +0000)]
[mips] Fix encoding of the `mov.d` command for microMIPS R6
Before this change LLVM emits non-microMIPS variant of the `mov.d`
command for microMIPS code.
Differential Revision: http://reviews.llvm.org/D59045
llvm-svn: 356052
Simon Atanasyan [Wed, 13 Mar 2019 14:22:58 +0000 (14:22 +0000)]
[mips] Define `mov.d` instructions using `ABSS_M` multiclass. NFC
llvm-svn: 356051
Clement Courbet [Wed, 13 Mar 2019 13:56:23 +0000 (13:56 +0000)]
Re-land r354244 "[DAGCombiner] Eliminate dead stores to stack."
Always check candidates for hasOtherUses(), not only stores.
llvm-svn: 356050
Adam Balogh [Wed, 13 Mar 2019 13:55:11 +0000 (13:55 +0000)]
[Analyzer] Skip symbolic regions based on conjured symbols in comparison of the containers of iterators
Checking whether two regions are the same is a partially decidable problem:
either we know for sure that they are the same or we cannot decide. A typical
case for this are the symbolic regions based on conjured symbols. Two
different conjured symbols are either the same or they are different. Since
we cannot decide this and want to reduce false positives as much as possible
we exclude these regions whenever checking whether two containers are the
same at iterator mismatch check.
Differential Revision: https://reviews.llvm.org/D53754
llvm-svn: 356049
Pavel Labath [Wed, 13 Mar 2019 13:45:14 +0000 (13:45 +0000)]
Fix/unify SBType comparison
Summary:
In my next step at cleaning up modify-python-lldb.py, I started focusing
on equality comparison. To my surprise, I found out that both python and
c++ versions of the SBType class implement equality comparison, but each
one does it differently. While the python version was implemented in
terms of type name equality, the C++ one used a deep comparison on the
underlying objects.
Removing the python version caused one test to fail (TestTypeList). This
happened because the c++ version of operator== boiled down to
TypePair::operator==, which contains two items: the compiler_type and
type_sp. In this case, the compiler_type was identical, but one of the
objects had the type_sp field unset.
I tried fixing the code so that both objects keep their type_sp member,
but it wasn't easy, because there are so many operations which just work
with the CompilerType types, and so any operation on the SBType (the
test in question was doing GetPointeeType on the type of one variable
and expecting it to match the type of another variable), cause that
second member to be lost.
So instead, here I relax the equality comparison on the TypePair
class. Now, this class ignores the type_sp for the purposes of
comparison, and uses the CompilerType only. This seems reasonable, as
each TypeSP is able to convert itself to a CompilerType.
Reviewers: clayborg, aprantl, serge-sans-paille
Subscribers: jdoerfert, lldb-commits
Differential Revision: https://reviews.llvm.org/D59217
llvm-svn: 356048
Aleksandr Urakov [Wed, 13 Mar 2019 13:38:12 +0000 (13:38 +0000)]
[AST] Improve support of external layouts in `MicrosoftRecordLayoutBuilder`
Summary:
This patch fixes several small problems with external layouts support in
`MicrosoftRecordLayoutBuilder`:
- aligns properly the size of a struct that ends with a bit field. It was
aligned on byte before, not on the size of the field, so the struct size was
smaller than it should be;
- adjusts the struct size when injecting a vbptr in the case when there were no
bases or fields allocated after the vbptr. Similarly, without the adjustment
the struct was smaller than it should be;
- the same fix as above for the vfptr.
All these fixes affect the non-virtual size of a struct, so they are tested
through non-virtual inheritance.
Reviewers: rnk, zturner, rsmith
Reviewed By: rnk
Subscribers: jdoerfert, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58544
llvm-svn: 356047
Simon Pilgrim [Wed, 13 Mar 2019 13:14:14 +0000 (13:14 +0000)]
Fix signed/unsigned mismatch warning. NFCI.
llvm-svn: 356046
Simon Atanasyan [Wed, 13 Mar 2019 13:09:30 +0000 (13:09 +0000)]
[mips] Map SW instruction to its microMIPS R6 variant
To provide mapping between standard and microMIPS R6 variants of the
`sw` command we have to rename SWSP_xxx commands from "sw" to "swsp".
Otherwise `tablegen` starts to show the error `Multiple matches found
for `SW'`. After that to restore printing SWSP command as `sw`, I add
an appropriate `MipsInstAlias` instance.
We also need to implement "size reduction" for microMIPS R6. But this
task is for separate patch. After that the `micromips-lwsp-swsp.ll` test
case will be extended.
Differential Revision: http://reviews.llvm.org/D59046
llvm-svn: 356045
Alex Bradbury [Wed, 13 Mar 2019 12:33:44 +0000 (12:33 +0000)]
[RISCV] Regenerate umulo-128-legalisation-lowering.ll
Upstream changes have improved codegen, reducing stack usage. Regenerate the test.
llvm-svn: 356044
Simon Pilgrim [Wed, 13 Mar 2019 12:20:39 +0000 (12:20 +0000)]
[X86][AVX] lowerShuffleAsBroadcast - improve load folding by avoiding bitcasts
AVX1 broadcasts were failing as we were adding bitcasts that caused MayFoldLoad's hasOneUse to return false.
This patch stops introducing bitcasts so early and also replaces the broadcast index scaling through bitcasts (which can't succeed in some cases) to instead just keep track of the bitoffset which can be converted back to the broadcast index later on.
Differential Revision: https://reviews.llvm.org/D58888
llvm-svn: 356043
Simon Pilgrim [Wed, 13 Mar 2019 11:51:13 +0000 (11:51 +0000)]
Appease MSVC builds by #ifdef wrapping runAndGetCommandOutput tests. NFCI.
llvm-svn: 356042
Jeremy Morse [Wed, 13 Mar 2019 11:43:13 +0000 (11:43 +0000)]
[DebugInfo][Docs] Document how dbg.value intrinsics are interpreted in optimized code
This patch adds a section, ``Object lifetime in optimized code'', that
documents how such intrinsics are supposed to be handled. It sets out some of
the principles of how they specify variable locations, and how long those
locations are valid for.
This patch also documents one of the objectives behind the variable-location
design, that we should never allow the debugger to observe a state of the
program that would not have appeared without optimization.
Differential Revision: https://reviews.llvm.org/D58726
llvm-svn: 356041
Simon Pilgrim [Wed, 13 Mar 2019 11:08:57 +0000 (11:08 +0000)]
[DAG] Move integer setcc %x, %x folding into FoldSetCC
First step towards PR40800 - I intend to move the float case in a separate future patch.
I had to tweak the (overly reduced) thumb2 test and the x86 widening test change is annoying (no longer rematerializable) but we should address this separately.
Differential Revision: https://reviews.llvm.org/D59244
llvm-svn: 356040
Simon Atanasyan [Wed, 13 Mar 2019 11:04:38 +0000 (11:04 +0000)]
[MIPS][microMIPS] Fix PseudoMTLOHI_MM matching and expansion
On micromips MipsMTLOHI is always matched to PseudoMTLOHI_DSP regardless
of +dsp argument. This patch checks is HasDSP predicate is present for
PseudoMTLOHI_DSP so PseudoMTLOHI_MM can be matched when appropriate.
Add expansion of PseudoMTLOHI_MM instruction into a mtlo/mthi pair.
Patch by Mirko Brkusanin.
Differential Revision: http://reviews.llvm.org/D59203
llvm-svn: 356039
Simon Atanasyan [Wed, 13 Mar 2019 11:04:28 +0000 (11:04 +0000)]
[mips] Fix CPU used in the test case to suppress warning. NFC
The MSA ASE used in in the test case requires MIPS32 revision 5 or
greater while the test uses MIPS32 revision 1.
llvm-svn: 356038
Jonas Hahnfeld [Wed, 13 Mar 2019 10:38:17 +0000 (10:38 +0000)]
[ELF] Fix GCC8 warnings about "fall through", NFCI
Add break statements in Object/ELF.cpp since the code should consider the
generic tags for Hexagon, MIPS, and PPC. Add a test (copied from llvm-readobj)
to show that this works correctly (earlier versions of this patch would have
asserted).
The warnings in X86ELFObjectWriter.cpp are actually false-positives since
the nested switch() handles all possible values and returns in all cases.
Make this explicit by adding llvm_unreachable's.
Differential Revision: https://reviews.llvm.org/D58837
llvm-svn: 356037
Jonas Hahnfeld [Wed, 13 Mar 2019 10:37:56 +0000 (10:37 +0000)]
[Support] Treat truncation of fullpath as error
If the concatenation of arguments dir and bin has at least PATH_MAX
characters the call to snprintf will truncate. The result will usually
not exist, but if it does it's actually incorrect to return that the
path exists.
(Motivated by GCC compiler warning about format truncation.)
Differential Revision: https://reviews.llvm.org/D58835
llvm-svn: 356036
Alex Bradbury [Wed, 13 Mar 2019 09:22:57 +0000 (09:22 +0000)]
[RISCV] Replace incorrect use of sizeof with array_lengthof
RISCVDisassembler was incorrectly using sizeof(Arr) when it should have used
sizeof(Arr)/sizeof(Arr[0]). Update to use array_lengthof instead.
llvm-svn: 356035
Kadir Cetinkaya [Wed, 13 Mar 2019 08:42:15 +0000 (08:42 +0000)]
[clangd] Default initialize SymInfo
llvm-svn: 356032
Paul Hoad [Wed, 13 Mar 2019 08:26:39 +0000 (08:26 +0000)]
[clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present
Summary:
Addressing: PR25010 - https://bugs.llvm.org/show_bug.cgi?id=25010
Code like:
```
if(true) var++;
else {
var--;
}
```
is reformatted to be
```
if (true)
var++;
else {
var--;
}
```
Even when `AllowShortIfStatementsOnASingleLine` is true
The following revision comes from a +1'd suggestion in the PR to support AllowShortIfElseStatementsOnASingleLine
This suppresses the clause prevents the merging of the if when there is a compound else
Reviewers: klimek, djasper, JonasToth, alexfh, krasimir, reuk
Reviewed By: reuk
Subscribers: reuk, Higuoxing, jdoerfert, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D59087
llvm-svn: 356031
Paul Hoad [Wed, 13 Mar 2019 08:15:03 +0000 (08:15 +0000)]
Revert "[clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present"
This reverts commit
b358cbb9b78389e20f7be36e1a98e26515c3ecce.
llvm-svn: 356030
Paul Hoad [Wed, 13 Mar 2019 08:07:46 +0000 (08:07 +0000)]
[clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present
Summary:
Addressing: PR25010 - https://bugs.llvm.org/show_bug.cgi?id=25010
Code like:
```
if(true) var++;
else {
var--;
}
```
is reformatted to be
```
if (true)
var++;
else {
var--;
}
```
Even when `AllowShortIfStatementsOnASingleLine` is true
The following revision comes from a +1'd suggestion in the PR to support AllowShortIfElseStatementsOnASingleLine
This suppresses the clause prevents the merging of the if when there is a compound else
Reviewers: klimek, djasper, JonasToth, alexfh, krasimir, reuk
Reviewed By: reuk
Subscribers: reuk, Higuoxing, jdoerfert, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D59087
llvm-svn: 356029
Jan Vesely [Wed, 13 Mar 2019 07:13:34 +0000 (07:13 +0000)]
sincos: Simplify declaration headers.
This follows the same pattern as modf and fract.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356028
Jan Vesely [Wed, 13 Mar 2019 07:13:32 +0000 (07:13 +0000)]
fdim: Use binary_decl_tt.inc instead of custom inc file.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356027
Jan Vesely [Wed, 13 Mar 2019 07:13:30 +0000 (07:13 +0000)]
nextafter: Use binary_decl_tt.inc instead of custom inc file.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356026
Jan Vesely [Wed, 13 Mar 2019 07:13:28 +0000 (07:13 +0000)]
copysign: Use binary_decl_tt.inc instead of custom inc file.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356025
Jan Vesely [Wed, 13 Mar 2019 07:13:26 +0000 (07:13 +0000)]
atan2pi: Use binary_decl_tt.inc instead of custom inc file.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356024
Jan Vesely [Wed, 13 Mar 2019 07:13:24 +0000 (07:13 +0000)]
atan2: Use binary_decl_tt.inc instead of custom inc file.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356023
Jan Vesely [Wed, 13 Mar 2019 07:13:22 +0000 (07:13 +0000)]
hypot: Use binary_decl_tt.inc instead of custom inc file
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356022
Jan Vesely [Wed, 13 Mar 2019 07:06:19 +0000 (07:06 +0000)]
Move unary_instrinsic.inc to private headers.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356021
Jan Vesely [Wed, 13 Mar 2019 07:06:15 +0000 (07:06 +0000)]
Move binary_intrinsic.h to private headers.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356020
Jan Vesely [Wed, 13 Mar 2019 07:06:13 +0000 (07:06 +0000)]
Move ternary_intrinsic.h to private headers.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356019
Jan Vesely [Wed, 13 Mar 2019 07:06:10 +0000 (07:06 +0000)]
trunc: Remove llvm intrinsic from the header.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356018
Jan Vesely [Wed, 13 Mar 2019 07:06:08 +0000 (07:06 +0000)]
round: Remove llvm intrinsic from the header
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356017
Jan Vesely [Wed, 13 Mar 2019 07:06:06 +0000 (07:06 +0000)]
rint: Remove llvm intrinsic from the header.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356016
Jan Vesely [Wed, 13 Mar 2019 07:06:03 +0000 (07:06 +0000)]
floor: Remove llvm isntrinsic from the header.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356015
Jan Vesely [Wed, 13 Mar 2019 07:06:00 +0000 (07:06 +0000)]
fabs: Remove llvm intrinsic from the header.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356014
Jan Vesely [Wed, 13 Mar 2019 07:05:58 +0000 (07:05 +0000)]
ceil: Remove llvm intrinsic from the header.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356013
Jan Vesely [Wed, 13 Mar 2019 07:05:56 +0000 (07:05 +0000)]
sqrt: Split function generation to a shared inc file.
This will be reused by other unary functions.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356012
Jan Vesely [Wed, 13 Mar 2019 07:05:53 +0000 (07:05 +0000)]
mad: Convert to standard ternary header
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356011
Jan Vesely [Wed, 13 Mar 2019 06:58:53 +0000 (06:58 +0000)]
travis: Deduplicate LLVM_CONFIG variable
Reviewers: Aaron Watry, Tom Stellard
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356010
Jan Vesely [Wed, 13 Mar 2019 06:58:51 +0000 (06:58 +0000)]
travis: Use gcc-6 for llvm-7 build
llvm does not expose -std=c++11 in cxx flags.
gcc-6 switched default from c++98 to c++14
Reviewers: Aaron Watry, Tom Stellard
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356009
Craig Topper [Wed, 13 Mar 2019 05:14:52 +0000 (05:14 +0000)]
[X86] Remove 'cx16' from 'prescott' and 'yonah' as they are 32-bit only CPUs and cmpxchg16b requires 64-bit mode.
llvm-svn: 356008
Craig Topper [Wed, 13 Mar 2019 05:14:50 +0000 (05:14 +0000)]
[X86] Add 'yonah' test to predefined-arch-macros.c test.
llvm-svn: 356007
Philip Reames [Wed, 13 Mar 2019 03:25:20 +0000 (03:25 +0000)]
[ImplicitNullChecks] Support unordered atomic accesses
Update the INC pass to allow folding unordered atomics. This is the first optimization unblocked by the changes landed from D57601.
llvm-svn: 356006
Fangrui Song [Wed, 13 Mar 2019 03:22:33 +0000 (03:22 +0000)]
Delete unused declaration of DeclContextPrintAction after the removal of -print-decl-contexts by D52529
llvm-svn: 356005
Philip Reames [Wed, 13 Mar 2019 03:17:58 +0000 (03:17 +0000)]
[Tests] Expand implicit null check coverage
llvm-svn: 356004
Davide Italiano [Wed, 13 Mar 2019 02:47:51 +0000 (02:47 +0000)]
[TestBatchMode] We already log this output to a file.
llvm-svn: 356003
Davide Italiano [Wed, 13 Mar 2019 02:44:32 +0000 (02:44 +0000)]
[testsuite] Remove other traces broken in python 3.
They can be reinstated in case somebody needs to debug
this test in the future.
llvm-svn: 356002
Evgeniy Stepanov [Wed, 13 Mar 2019 01:37:58 +0000 (01:37 +0000)]
Revert "[llvm] Skip over empty line table entries."
This reverts commit r355972.
See the discussion at https://reviews.llvm.org/D58952.
llvm-svn: 356001
Davide Italiano [Wed, 13 Mar 2019 01:26:01 +0000 (01:26 +0000)]
[testsuite] Remove dead code in TestFormats.
llvm-svn: 356000
Davide Italiano [Wed, 13 Mar 2019 00:48:32 +0000 (00:48 +0000)]
[test] Some unicode sequences can't be printed, and Py 3 is more picky.
Given this was under trace, it can just be removed. If somebody
ever needs to debug this testcase again and print the data, they
can add a new statement.
llvm-svn: 355999
Davide Italiano [Wed, 13 Mar 2019 00:48:29 +0000 (00:48 +0000)]
[Python] Fix another batch of python 2/python 3 portability issues.
llvm-svn: 355998
Craig Topper [Wed, 13 Mar 2019 00:43:03 +0000 (00:43 +0000)]
[X86] Enable printAliasInstr for the Intel assembly printer so that AAM and AAD will print without an immediate when the immediate is 10.
llvm-svn: 355997
Heejin Ahn [Wed, 13 Mar 2019 00:37:31 +0000 (00:37 +0000)]
[WebAssembly] Place 'try' and 'catch' correctly wrt EH_LABELs
Summary:
After instruction selection phase, possibly-throwing calls, which were
previously invoke, are wrapped in `EH_LABEL` instructions. For example:
```
EH_LABEL <mcsymbol .Ltmp0>
CALL_VOID @foo ...
EH_LABEL <mcsymbol .Ltmp1>
```
`EH_LABEL` is placed also in the beginning of EH pads:
```
bb.1 (landing-pad):
EH_LABEL <mcsymbol .Ltmp2>
...
```
And we'd like to maintian this relationship, so when we place a `try`,
```
TRY ...
EH_LABEL <mcsymbol .Ltmp0>
CALL_VOID @foo ...
EH_LABEL <mcsymbol .Ltmp1>
```
When we place a `catch`,
```
bb.1 (landing-pad):
EH_LABEL <mcsymbol .Ltmp2>
%0:except_ref = CATCH ...
...
```
Previously we didn't treat EH_LABELs specially, so `try` was placed
right before a call, and `catch` was placed in the beginning of an EH
pad.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D58914
llvm-svn: 355996
Hubert Tong [Wed, 13 Mar 2019 00:12:43 +0000 (00:12 +0000)]
Use AIX version detection at LLVM run-time
Summary:
AIX compilers define macros based on the version of the operating
system.
This patch implements updating of versionless AIX triples to include the
host AIX version. Also, the host triple detection in the build system is
adjusted to strip the AIX version information so that the run-time
detection is preferred.
Reviewers: xingxue, stefanp, nemanjai, jasonliu
Reviewed By: xingxue
Subscribers: mgorny, kristina, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D58798
llvm-svn: 355995
Adrian Prantl [Tue, 12 Mar 2019 23:59:02 +0000 (23:59 +0000)]
Update the macOS implementation of ComputeClangResourceDirectory to
comply with the more pedantic TestPaths.py
llvm-svn: 355994
Craig Topper [Tue, 12 Mar 2019 23:48:07 +0000 (23:48 +0000)]
[X86] Add ImmArg markings to intrinsics.
Remove test cases that checked for not crashing when immediate operands were passed not an immediate. These are now considered ill-formed in IR.
This was done by manually scanning the intrinsic file for llvm_i32_ty and llvm_i8_ty which are the predominant types we use for immediates. Most of them are on vector intrinsics. I might have missed some other intrinsics.
Differential Revision: https://reviews.llvm.org/D58302
llvm-svn: 355993
Jim Ingham [Tue, 12 Mar 2019 23:15:48 +0000 (23:15 +0000)]
This test is failing on and off on the bots.
Disable it for now till I can figure out what's going wrong.
llvm-svn: 355992
Adrian Prantl [Tue, 12 Mar 2019 22:20:29 +0000 (22:20 +0000)]
Fix the broken Batch test by passing a custom module cache to the inferior lldb.
llvm-svn: 355991
Adrian Prantl [Tue, 12 Mar 2019 22:20:26 +0000 (22:20 +0000)]
Revert "Temporarily add more logging to TestBatchMode"
llvm-svn: 355990
Jason Liu [Tue, 12 Mar 2019 22:01:10 +0000 (22:01 +0000)]
Add XCOFF triple object format type for AIX
This patch adds an XCOFF triple object format type into LLVM.
This XCOFF triple object file type will be used later by object file and assembly generation for the AIX platform.
Differential Revision: https://reviews.llvm.org/D58930
llvm-svn: 355989
Sam Clegg [Tue, 12 Mar 2019 21:53:23 +0000 (21:53 +0000)]
[WebAssembly] Handle undefined data symbols in shared libraries
When linking shared libraries, we import a mutable wasm global
to represent the address of each undefined data symbol.
This is a step towards supporting dynamic linking and shared
libraries.
Differential Revision: https://reviews.llvm.org/D59270
llvm-svn: 355988
Roman Lebedev [Tue, 12 Mar 2019 21:31:00 +0000 (21:31 +0000)]
[NFC][clang][PCH][ObjC] Add some missing `VisitStmt(S);`
Summary:
These ObjC AST classes inherit from Stmt, but don't call `VisitStmt(S);`.
Some were founded with help of existing tests (with `NumStmtFields` bumped to `1`),
but some of them don't even have PCH test coverage. :/
Reviewers: arphaman, sammccall, smeenai, aprantl, rsmith, jordan_rose
Reviewed By: jordan_rose
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D59197
llvm-svn: 355987
Adrian Prantl [Tue, 12 Mar 2019 21:30:50 +0000 (21:30 +0000)]
Temporarily add more logging to TestBatchMode
llvm-svn: 355986
Adrian Prantl [Tue, 12 Mar 2019 21:30:47 +0000 (21:30 +0000)]
Add more logging to ClangModulesDeclVendor.cpp
llvm-svn: 355985
Francis Visoiu Mistrih [Tue, 12 Mar 2019 21:22:27 +0000 (21:22 +0000)]
Reland "[Remarks] Add -foptimization-record-passes to filter remark emission"
Currently we have -Rpass for filtering the remarks that are displayed as
diagnostics, but when using -fsave-optimization-record, there is no way
to filter the remarks while generating them.
This adds support for filtering remarks by passes using a regex.
Ex: `clang -fsave-optimization-record -foptimization-record-passes=inline`
will only emit the remarks coming from the pass `inline`.
This adds:
* `-fsave-optimization-record` to the driver
* `-opt-record-passes` to cc1
* `-lto-pass-remarks-filter` to the LTOCodeGenerator
* `--opt-remarks-passes` to lld
* `-pass-remarks-filter` to llc, opt, llvm-lto, llvm-lto2
* `-opt-remarks-passes` to gold-plugin
Differential Revision: https://reviews.llvm.org/D59268
Original llvm-svn: 355964
llvm-svn: 355984
Philip Reames [Tue, 12 Mar 2019 21:09:58 +0000 (21:09 +0000)]
[Test] Add tests for implicit null checks on atomic/volatile instructions
llvm-svn: 355983
Philip Reames [Tue, 12 Mar 2019 21:05:31 +0000 (21:05 +0000)]
For faulting ops, include a comment w/the fault destination
A faulting_op is one that has specified behavior when a fault occurs, generally redirecting control flow to another location. This change just adds a comment to the assembly output which makes it both human readable, and machine checkable w/o having to parse the FaultMap section. This is used to split a test file into two parts, so that I can (in a near future commit) easily extend the test file to demonstrate another case.
llvm-svn: 355982
Matt Arsenault [Tue, 12 Mar 2019 21:02:54 +0000 (21:02 +0000)]
IR: Add immarg attribute
This indicates an intrinsic parameter is required to be a constant,
and should not be replaced with a non-constant value.
Add the attribute to all AMDGPU and generic intrinsics that comments
indicate it should apply to. I scanned other target intrinsics, but I
don't see any obvious comments indicating which arguments are intended
to be only immediates.
This breaks one questionable testcase for the autoupgrade. I'm unclear
on whether the autoupgrade is supposed to really handle declarations
which were never valid. The verifier fails because the attributes now
refer to a parameter past the end of the argument list.
llvm-svn: 355981
Vitaly Buka [Tue, 12 Mar 2019 21:02:24 +0000 (21:02 +0000)]
AddressSanitizer: 64-bit SPARC/Linux port
Summary:
This patch contains the bits required to make the AddressSanitizer work on SPARC64/Linux (SPARC-T4 and later).
Patch by Eric Botcazou.
Reviewers: #sanitizers, vitalybuka, krytarowski
Reviewed By: #sanitizers, vitalybuka
Subscribers: brad, vitalybuka, ro, jyknight, kubamracek, fedor.sergeev, jdoerfert, llvm-commits, #sanitizers
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D58434
llvm-svn: 355980
Vitaly Buka [Tue, 12 Mar 2019 21:02:15 +0000 (21:02 +0000)]
AddressSanitizer: fix for SPARC with GCC
Summary:
This patch contains a fixlet for the AddressSanitizer on the SPARC with GCC, which would otherwise generate a problematic call to the intercepted memcpy routine. It was tested with GCC on SPARC/Solaris and SPARC/Linux.
Patch by Eric Botcazou.
Reviewers: #sanitizers, vitalybuka
Reviewed By: #sanitizers, vitalybuka
Subscribers: vitalybuka, ro, jyknight, kubamracek, fedor.sergeev, jdoerfert, llvm-commits, #sanitizers
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D58433
llvm-svn: 355979
Vitaly Buka [Tue, 12 Mar 2019 21:02:04 +0000 (21:02 +0000)]
SanitizerCommon: 64-bit SPARC/Linux port
Summary:
This patch contains the bits required to make the common 32-bit allocator work on SPARC64/Linux.
Patch by Eric Botcazou.
Reviewers: #sanitizers, vitalybuka
Reviewed By: #sanitizers, vitalybuka
Subscribers: krytarowski, vitalybuka, ro, jyknight, kubamracek, fedor.sergeev, jdoerfert, llvm-commits, #sanitizers
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D58432
llvm-svn: 355978
Peter Collingbourne [Tue, 12 Mar 2019 20:58:34 +0000 (20:58 +0000)]
ELF: Don't add .dynamic strings to .dynstr early.
This does not appear to be necessary because StringTableSection does not
need to be finalized, which also means that we can remove the call to
finalizeSynthetic on .dynstr.
Differential Revision: https://reviews.llvm.org/D59240
llvm-svn: 355977
Francis Visoiu Mistrih [Tue, 12 Mar 2019 20:54:18 +0000 (20:54 +0000)]
Revert "[Remarks] Add -foptimization-record-passes to filter remark emission"
This reverts commit
20fff32b7d1f1a1bd417b22aa9f26ededd97a3e5.
llvm-svn: 355976
Zachary Turner [Tue, 12 Mar 2019 20:51:05 +0000 (20:51 +0000)]
Remove support for DWARF64.
LLVM doesn't produce DWARF64, and neither does GCC. LLDB's support
for DWARF64 is only partial, and if enabled appears to also not work.
Finally, it's untested. Removing this makes merging LLVM and
LLDB's DWARF parsing implementations simpler.
Differential Revision: https://reviews.llvm.org/D59235
llvm-svn: 355975
Zachary Turner [Tue, 12 Mar 2019 20:50:46 +0000 (20:50 +0000)]
Remove DWARFDIECollection.
This is a very thin wrapper over a std::vector<DWARFDIE> and does
not seem to provide any real value over just using a container
directly.
Differential Revision: https://reviews.llvm.org/D59165
llvm-svn: 355974
Zachary Turner [Tue, 12 Mar 2019 20:50:29 +0000 (20:50 +0000)]
Move ElaboratingDIEIterator into implementation file.
This is not used outside of the private implementation of the class,
so hiding in the implementation file is a nice way of simplifying
the external interface.
Differential Revision: https://reviews.llvm.org/D59164
llvm-svn: 355973
Mircea Trofin [Tue, 12 Mar 2019 20:48:45 +0000 (20:48 +0000)]
[llvm] Skip over empty line table entries.
Summary:
This is similar to how addr2line handles consecutive entries with the
same address - pick the last one.
Reviewers: dblaikie, friss, JDevlieghere
Reviewed By: dblaikie
Subscribers: ormris, echristo, JDevlieghere, probinson, aprantl, hiraditya, rupprecht, jdoerfert, llvm-commits
Tags: #llvm, #debug-info
Differential Revision: https://reviews.llvm.org/D58952
llvm-svn: 355972
Matt Arsenault [Tue, 12 Mar 2019 20:42:14 +0000 (20:42 +0000)]
Fix missing C++ mode comments
llvm-svn: 355971
Matt Arsenault [Tue, 12 Mar 2019 20:42:12 +0000 (20:42 +0000)]
MIR: Stop reinitializing target information for every use
Every time a physical register reference was parsed, this would
initialize a string map for every register in in target, and discard
it for the next. The same applies for the other fields initialized
from target information.
Follow along with how the function state is tracked, and add a new
tracking class for target information.
The string->register class/register bank for some reason were kept
separately, so track them in the same place.
llvm-svn: 355970
Davide Italiano [Tue, 12 Mar 2019 20:41:36 +0000 (20:41 +0000)]
[lldb/thirdparty] Remove unneeded files, asked by Jonas.
llvm-svn: 355969
Davide Italiano [Tue, 12 Mar 2019 20:41:29 +0000 (20:41 +0000)]
[lldb-mi] Make this test more reliable. NFC.
Except that it will probably stop failing on and off on my machine.
llvm-svn: 355968
Davide Italiano [Tue, 12 Mar 2019 20:41:24 +0000 (20:41 +0000)]
[third-party] Update pexpect to 4.6.
Reviewers: labath, jdevlieghere
Subscribers: lldb-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59159
llvm-svn: 355967
Peter Collingbourne [Tue, 12 Mar 2019 20:32:30 +0000 (20:32 +0000)]
ELF: Use bump pointer allocator for uncompressed section buffers. NFCI.
This shaves another word off SectionBase and makes it possible to clone a
section using the implicit copy constructor.
This basically reverts r311056, which removed the mutex in order to
make the code easier to understand. On balance I think it's probably more
straightforward to have a mutex here than to have an unusual copy constructor
in SectionBase.
Differential Revision: https://reviews.llvm.org/D59269
llvm-svn: 355966
Vitaly Buka [Tue, 12 Mar 2019 20:31:53 +0000 (20:31 +0000)]
SanitizerCommon: fixes for unwinding & backtrace on SPARC
Summary:
This patch contains various fixes for the unwinding and backtrace machinery on the SPARC, which doesn't work correctly in various cases. It was tested with GCC on SPARC/Solaris and SPARC/Linux.
Patch by Eric Botcazou.
Reviewers: #sanitizers, vitalybuka
Reviewed By: #sanitizers, vitalybuka
Subscribers: jrtc27, delcypher, vitalybuka, ro, jyknight, kubamracek, fedor.sergeev, jdoerfert, llvm-commits, #sanitizers
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D58431
llvm-svn: 355965
Francis Visoiu Mistrih [Tue, 12 Mar 2019 20:28:50 +0000 (20:28 +0000)]
[Remarks] Add -foptimization-record-passes to filter remark emission
Currently we have -Rpass for filtering the remarks that are displayed as
diagnostics, but when using -fsave-optimization-record, there is no way
to filter the remarks while generating them.
This adds support for filtering remarks by passes using a regex.
Ex: `clang -fsave-optimization-record -foptimization-record-passes=inline`
will only emit the remarks coming from the pass `inline`.
This adds:
* `-fsave-optimization-record` to the driver
* `-opt-record-passes` to cc1
* `-lto-pass-remarks-filter` to the LTOCodeGenerator
* `--opt-remarks-passes` to lld
* `-pass-remarks-filter` to llc, opt, llvm-lto, llvm-lto2
* `-opt-remarks-passes` to gold-plugin
Differential Revision: https://reviews.llvm.org/D59268
llvm-svn: 355964
Jonas Devlieghere [Tue, 12 Mar 2019 20:24:13 +0000 (20:24 +0000)]
Fix compiler warning
Fixes warning: comparison of integers of different signs.
llvm-svn: 355963
Philip Reames [Tue, 12 Mar 2019 20:15:05 +0000 (20:15 +0000)]
[SROA] Fix a crash when trying to convert a memset to an non-integral pointer type
The included test case currently crashes on tip of tree. Rather than adding a bailout, I chose to restructure the code so that the existing helper function could be used. Given that, the majority of the diff is NFC-ish, but the key difference is that canConvertValue returns false when only one side is a non-integral pointer.
Thanks to Cherry Zhang for the test case.
Differential Revision: https://reviews.llvm.org/D59000
llvm-svn: 355962
Louis Dionne [Tue, 12 Mar 2019 20:10:06 +0000 (20:10 +0000)]
[libc++] Enable deprecation warnings by default
Summary:
In r342843, I added deprecation warnings to some facilities that were
deprectated in C++14 and C++17. However, those deprecation warnings
were not enabled by default.
After discussing this on IRC, we had finally gotten consensus to enable
those warnings by default, and I'm getting around to doing that only
now.
Reviewers: mclow.lists, EricWF
Subscribers: christof, jkorous, dexonsmith, jdoerfert, libcxx-commits
Differential Revision: https://reviews.llvm.org/D58140
llvm-svn: 355961
Alexey Bataev [Tue, 12 Mar 2019 20:05:17 +0000 (20:05 +0000)]
[OPENMP]Allow to redefine entry for the variables definitions.
If the variable was declared and marked as declare target, a new offload
entry with size 0 is created. But if later a definition is created and
marked as declare target, this definition is not added to the entry set
and the definition remains not mapped to the target. Patch fixes this
problem allowing to redefine the size and linkage for
previously registered declaration.
llvm-svn: 355960
Douglas Yung [Tue, 12 Mar 2019 20:04:03 +0000 (20:04 +0000)]
Fixup test to work after changes in r355878.
This should fix the PS4 Windows build bot.
llvm-svn: 355959
Jason Molenda [Tue, 12 Mar 2019 19:42:34 +0000 (19:42 +0000)]
Rework how lldb warngs about kexts that failed to load in a
darwin kernel debug session.
Originally, the kext name & uuid were emitted in the middle of the
kext-loading period's. Last week I decided to try not printing
any details about kexts that failed to load, only printing a summary
of how many failed to load.
This time I'm print different progress characters depending on whether
the kext loaded or not ("-" for not), then at the end I will print a
summary of how many kexts failed to load and a sorted list of the
kexts with the bundle ID and the uuid. It's a lot more readable.
<rdar://problem/
48654569>
llvm-svn: 355958
Jim Ingham [Tue, 12 Mar 2019 19:27:39 +0000 (19:27 +0000)]
Check the result of creating a node from __next_ in the std::list formatter.
There's a single report of a crash coming from this current_sp being NULL. I don't
have a repro case, and I couldn't get it to happen by hand-corrupting a list. We
always get an error instead. So I don't have a test case. But checking for null
is clearly right here.
<rdar://problem/
48503320>
llvm-svn: 355957
Jim Ingham [Tue, 12 Mar 2019 19:25:29 +0000 (19:25 +0000)]
Re-enable this test, the underlying bug was fixed and the test now passes.
llvm-svn: 355956