Commit Graph

311852 Commits

Author SHA1 Message Date
Jim Ingham e62366bf1e 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
2019-03-12 23:15:48 +00:00
Adrian Prantl 97f51c95db Fix the broken Batch test by passing a custom module cache to the inferior lldb.
llvm-svn: 355991
2019-03-12 22:20:29 +00:00
Adrian Prantl df85147707 Revert "Temporarily add more logging to TestBatchMode"
llvm-svn: 355990
2019-03-12 22:20:26 +00:00
Jason Liu a03ae73c29 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
2019-03-12 22:01:10 +00:00
Sam Clegg d425d6b08b [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
2019-03-12 21:53:23 +00:00
Roman Lebedev 773c391d4a [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
2019-03-12 21:31:00 +00:00
Adrian Prantl 8ef3da494c Temporarily add more logging to TestBatchMode
llvm-svn: 355986
2019-03-12 21:30:50 +00:00
Adrian Prantl 3552b86cbc Add more logging to ClangModulesDeclVendor.cpp
llvm-svn: 355985
2019-03-12 21:30:47 +00:00
Francis Visoiu Mistrih dd42236c6c 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
2019-03-12 21:22:27 +00:00
Philip Reames b760558517 [Test] Add tests for implicit null checks on atomic/volatile instructions
llvm-svn: 355983
2019-03-12 21:09:58 +00:00
Philip Reames 9134f84ba4 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
2019-03-12 21:05:31 +00:00
Matt Arsenault caf1316f71 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
2019-03-12 21:02:54 +00:00
Vitaly Buka 9df0754b8d 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
2019-03-12 21:02:24 +00:00
Vitaly Buka 5ae9f865b2 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
2019-03-12 21:02:15 +00:00
Vitaly Buka d3ed66dfb3 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
2019-03-12 21:02:04 +00:00
Peter Collingbourne 8a28673a2e 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
2019-03-12 20:58:34 +00:00
Francis Visoiu Mistrih 1d6c47ad2b Revert "[Remarks] Add -foptimization-record-passes to filter remark emission"
This reverts commit 20fff32b7d.

llvm-svn: 355976
2019-03-12 20:54:18 +00:00
Zachary Turner 7e44a8440c 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
2019-03-12 20:51:05 +00:00
Zachary Turner 0eaa6d5b01 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
2019-03-12 20:50:46 +00:00
Zachary Turner d5364dfa6d 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
2019-03-12 20:50:29 +00:00
Mircea Trofin 0c29402eb4 [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
2019-03-12 20:48:45 +00:00
Matt Arsenault b5f14326b4 Fix missing C++ mode comments
llvm-svn: 355971
2019-03-12 20:42:14 +00:00
Matt Arsenault bdfb6cfdf1 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
2019-03-12 20:42:12 +00:00
Davide Italiano 4be269e604 [lldb/thirdparty] Remove unneeded files, asked by Jonas.
llvm-svn: 355969
2019-03-12 20:41:36 +00:00
Davide Italiano 2bd995b7e8 [lldb-mi] Make this test more reliable. NFC.
Except that it will probably stop failing on and off on my machine.

llvm-svn: 355968
2019-03-12 20:41:29 +00:00
Davide Italiano 205fd03a27 [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
2019-03-12 20:41:24 +00:00
Peter Collingbourne e2b8c40a77 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
2019-03-12 20:32:30 +00:00
Vitaly Buka 2a3de8f437 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
2019-03-12 20:31:53 +00:00
Francis Visoiu Mistrih 20fff32b7d [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
2019-03-12 20:28:50 +00:00
Jonas Devlieghere a54d580350 Fix compiler warning
Fixes warning: comparison of integers of different signs.

llvm-svn: 355963
2019-03-12 20:24:13 +00:00
Philip Reames 9b6b4fac83 [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
2019-03-12 20:15:05 +00:00
Louis Dionne a470a13a70 [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
2019-03-12 20:10:06 +00:00
Alexey Bataev 8259cc3357 [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
2019-03-12 20:05:17 +00:00
Douglas Yung c61573c93f Fixup test to work after changes in r355878.
This should fix the PS4 Windows build bot.

llvm-svn: 355959
2019-03-12 20:04:03 +00:00
Jason Molenda c02b95e4f9 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
2019-03-12 19:42:34 +00:00
Jim Ingham 027bf7603f 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
2019-03-12 19:27:39 +00:00
Jim Ingham 2ca0ebf6b4 Re-enable this test, the underlying bug was fixed and the test now passes.
llvm-svn: 355956
2019-03-12 19:25:29 +00:00
Sanjay Patel 737c27a9cd [x86] scalarize extractelement 0 of FP vselect
llvm-svn: 355955
2019-03-12 19:20:45 +00:00
Peter Collingbourne 2da7b32684 ELF: Simplify. NFCI.
We don't need to take a slice of SectionCommands in addOrphanSections()
because it is not modified until the end of the function.

Differential Revision: https://reviews.llvm.org/D59239

llvm-svn: 355954
2019-03-12 19:19:23 +00:00
Philip Reames 18408d5e79 [CodeGen] Add MMOs to statepoint nodes during SelectionDAG
The existing statepoint lowering code does something odd; it adds machine memory operands post instruction selection. This was copied from the stackmap/patchpoint implementation, but appears to be non-idiomatic.

This change is largely NFC. It moves the MMO creation logic into SelectionDAG building. It ends up not quite being NFC because the size of the stack slot is reflected in the MMO. The old code blindly used pointer size for the MMO size, which appears to have always been incorrect for larger values. It just happened nothing actually relied on the MMOs, so it worked out okay.

For context, I'm planning on removing the MOVolatile flag from these in a future commit, and then removing the MOStore flag from deopt spill slots in a separate one. Doing so is motivated by a small test case where we should be able to better schedule spill slots, but don't do so due to a memory use/def implied by the statepoint.

Differential Revision: https://reviews.llvm.org/D59106

llvm-svn: 355953
2019-03-12 19:12:33 +00:00
Alexey Bataev 9cc10fc926 [OPENMP 5.0]Initial support for 'allocator' clause.
Added parsing/sema analysis/serialization/deserialization for the
'allocator' clause of the 'allocate' directive.

llvm-svn: 355952
2019-03-12 18:52:33 +00:00
Jim Ingham 85c2955f45 Fix the project for r355939 (ASTUtils.{h,c})
llvm-svn: 355951
2019-03-12 18:48:58 +00:00
Duncan P. N. Exon Smith 70d759b4eb Modules: Add LangOptions::CacheGeneratedPCH
Add an option to cache the generated PCH in the ModuleCache when
emitting it.  This protects clients that build PCHs and read them in the
same process, allowing them to avoid race conditions between parallel
jobs the same way that Clang's implicit module build system does.

rdar://problem/48740787

llvm-svn: 355950
2019-03-12 18:38:04 +00:00
Teresa Johnson 4ab0a9f0a4 [SCEV] Use depth limit for trunc analysis
Summary:
This fixes an extremely long compile time caused by recursive analysis
of truncs, which were not previously subject to any depth limits unlike
some of the other ops. I decided to use the same control used for
sext/zext, since the routines analyzing these are sometimes mutually
recursive with the trunc analysis.

Reviewers: mkazantsev, sanjoy

Subscribers: sanjoy, jdoerfert, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D58994

llvm-svn: 355949
2019-03-12 18:28:05 +00:00
Jinsong Ji 9dc2c1d564 Set useful flags for vector imm setting instructions
Vector imm setting instructions like XXLXORz/XXLXORspz/XXLXORdpz
Should behave like LI8.

We should set corresponding flags to allow rematerialization and other
opts in LICM, RA, Scheduling etc.

Differential Revision: https://reviews.llvm.org/D58645

llvm-svn: 355948
2019-03-12 18:27:09 +00:00
Craig Topper 03e93f514a [SanitizerCoverage] Avoid splitting critical edges when destination is a basic block containing unreachable
This patch adds a new option to SplitAllCriticalEdges and uses it to avoid splitting critical edges when the destination basic block ends with unreachable. Otherwise if we split the critical edge, sanitizer coverage will instrument the new block that gets inserted for the split. But since this block itself shouldn't be reachable this is pointless. These basic blocks will stick around and generate assembly, but they don't end in sane control flow and might get placed at the end of the function. This makes it look like one function has code that flows into the next function.

This showed up while compiling the linux kernel with clang. The kernel has a tool called objtool that detected the code that appeared to flow from one function to the next. https://github.com/ClangBuiltLinux/linux/issues/351#issuecomment-461698884

Differential Revision: https://reviews.llvm.org/D57982

llvm-svn: 355947
2019-03-12 18:20:25 +00:00
Eli Friedman 74b6aae4e8 [RISCV][MC] Find matching pcrel_hi fixup in more cases.
If a symbol points to the end of a fragment, instead of searching for
fixups in that fragment, search in the next fragment.

Fixes spurious assembler error with subtarget change next to "la"
pseudo-instruction, or expanded equivalent.

Alternate proposal to fix the problem discussed in
https://reviews.llvm.org/D58759.

Testcase by Ana Pazos.

Differential Revision: https://reviews.llvm.org/D58943

llvm-svn: 355946
2019-03-12 18:14:16 +00:00
Jinsong Ji b6bfcfc847 [NFC][PowerPC] Update testcases using utils/update_llc_test_checks.py
llvm-svn: 355945
2019-03-12 17:55:32 +00:00
George Burgess IV 87565fe734 Add a creduce script for clang crashes
This CL adds a script that calls C-Reduce on an input file and given the
clang crash script, which is used to generate an interestingness test
for C-Reduce.

Patch by Amy Huang!

Differential Revision: https://reviews.llvm.org/D59118

llvm-svn: 355944
2019-03-12 17:48:53 +00:00
Adrian McCarthy 38d4a6c496 Correcting some comments in PdbIndex.cpp [NFC]
ICF can cause multiple symbols to start at the same virtual address.
I plan to handle this shortly, but I wanted to correct the comment for
now.

Deleted an obsolete comment about adjusting the offset for the magic
number at the beginning of the debug info stream.  This adjustment is
handled at a lower level now.

llvm-svn: 355943
2019-03-12 17:40:51 +00:00