platform/upstream/llvm.git
5 years agoAdd XCOFF triple object format type for AIX
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

5 years ago[WebAssembly] Handle undefined data symbols in shared libraries
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

5 years ago[NFC][clang][PCH][ObjC] Add some missing `VisitStmt(S);`
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

5 years agoTemporarily add more logging to TestBatchMode
Adrian Prantl [Tue, 12 Mar 2019 21:30:50 +0000 (21:30 +0000)]
Temporarily add more logging to TestBatchMode

llvm-svn: 355986

5 years agoAdd more logging to ClangModulesDeclVendor.cpp
Adrian Prantl [Tue, 12 Mar 2019 21:30:47 +0000 (21:30 +0000)]
Add more logging to ClangModulesDeclVendor.cpp

llvm-svn: 355985

5 years agoReland "[Remarks] Add -foptimization-record-passes to filter remark emission"
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

5 years ago[Test] Add tests for implicit null checks on atomic/volatile instructions
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

5 years agoFor faulting ops, include a comment w/the fault destination
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

5 years agoIR: Add immarg attribute
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

5 years agoAddressSanitizer: 64-bit SPARC/Linux port
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

5 years agoAddressSanitizer: fix for SPARC with GCC
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

5 years agoSanitizerCommon: 64-bit SPARC/Linux port
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

5 years agoELF: Don't add .dynamic strings to .dynstr early.
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

5 years agoRevert "[Remarks] Add -foptimization-record-passes to filter remark emission"
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

5 years agoRemove support for DWARF64.
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

5 years agoRemove DWARFDIECollection.
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

5 years agoMove ElaboratingDIEIterator into implementation file.
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

5 years ago[llvm] Skip over empty line table entries.
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

5 years agoFix missing C++ mode comments
Matt Arsenault [Tue, 12 Mar 2019 20:42:14 +0000 (20:42 +0000)]
Fix missing C++ mode comments

llvm-svn: 355971

5 years agoMIR: Stop reinitializing target information for every use
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

5 years ago[lldb/thirdparty] Remove unneeded files, asked by Jonas.
Davide Italiano [Tue, 12 Mar 2019 20:41:36 +0000 (20:41 +0000)]
[lldb/thirdparty] Remove unneeded files, asked by Jonas.

llvm-svn: 355969

5 years ago[lldb-mi] Make this test more reliable. NFC.
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

5 years ago[third-party] Update pexpect to 4.6.
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

5 years agoELF: Use bump pointer allocator for uncompressed section buffers. NFCI.
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

5 years agoSanitizerCommon: fixes for unwinding & backtrace on SPARC
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

5 years ago[Remarks] Add -foptimization-record-passes to filter remark emission
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

5 years agoFix compiler warning
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

5 years ago[SROA] Fix a crash when trying to convert a memset to an non-integral pointer type
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

5 years ago[libc++] Enable deprecation warnings by default
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

5 years ago[OPENMP]Allow to redefine entry for the variables definitions.
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

5 years agoFixup test to work after changes in r355878.
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

5 years agoRework how lldb warngs about kexts that failed to load in a
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

5 years agoCheck the result of creating a node from __next_ in the std::list formatter.
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

5 years agoRe-enable this test, the underlying bug was fixed and the test now passes.
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

5 years ago[x86] scalarize extractelement 0 of FP vselect
Sanjay Patel [Tue, 12 Mar 2019 19:20:45 +0000 (19:20 +0000)]
[x86] scalarize extractelement 0 of FP vselect

llvm-svn: 355955

5 years agoELF: Simplify. NFCI.
Peter Collingbourne [Tue, 12 Mar 2019 19:19:23 +0000 (19:19 +0000)]
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

5 years ago[CodeGen] Add MMOs to statepoint nodes during SelectionDAG
Philip Reames [Tue, 12 Mar 2019 19:12:33 +0000 (19:12 +0000)]
[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

5 years ago[OPENMP 5.0]Initial support for 'allocator' clause.
Alexey Bataev [Tue, 12 Mar 2019 18:52:33 +0000 (18:52 +0000)]
[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

5 years agoFix the project for r355939 (ASTUtils.{h,c})
Jim Ingham [Tue, 12 Mar 2019 18:48:58 +0000 (18:48 +0000)]
Fix the project for r355939 (ASTUtils.{h,c})

llvm-svn: 355951

5 years agoModules: Add LangOptions::CacheGeneratedPCH
Duncan P. N. Exon Smith [Tue, 12 Mar 2019 18:38:04 +0000 (18:38 +0000)]
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

5 years ago[SCEV] Use depth limit for trunc analysis
Teresa Johnson [Tue, 12 Mar 2019 18:28:05 +0000 (18:28 +0000)]
[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

5 years agoSet useful flags for vector imm setting instructions
Jinsong Ji [Tue, 12 Mar 2019 18:27:09 +0000 (18:27 +0000)]
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

5 years ago[SanitizerCoverage] Avoid splitting critical edges when destination is a basic block...
Craig Topper [Tue, 12 Mar 2019 18:20:25 +0000 (18:20 +0000)]
[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

5 years ago[RISCV][MC] Find matching pcrel_hi fixup in more cases.
Eli Friedman [Tue, 12 Mar 2019 18:14:16 +0000 (18:14 +0000)]
[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

5 years ago[NFC][PowerPC] Update testcases using utils/update_llc_test_checks.py
Jinsong Ji [Tue, 12 Mar 2019 17:55:32 +0000 (17:55 +0000)]
[NFC][PowerPC] Update testcases using utils/update_llc_test_checks.py

llvm-svn: 355945

5 years agoAdd a creduce script for clang crashes
George Burgess IV [Tue, 12 Mar 2019 17:48:53 +0000 (17:48 +0000)]
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

5 years agoCorrecting some comments in PdbIndex.cpp [NFC]
Adrian McCarthy [Tue, 12 Mar 2019 17:40:51 +0000 (17:40 +0000)]
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

5 years agoTest commit: add a blank line in test case ppc64-dq-expr.s
Jason Liu [Tue, 12 Mar 2019 17:33:07 +0000 (17:33 +0000)]
Test commit: add a blank line in test case ppc64-dq-expr.s

llvm-svn: 355942

5 years ago[Reproducers] Add a test to ensure we can reuse the reproducer dir.
Jonas Devlieghere [Tue, 12 Mar 2019 17:31:04 +0000 (17:31 +0000)]
[Reproducers] Add a test to ensure we can reuse the reproducer dir.

Yesterday I noticed a reproducer test failing after making a local
change. Removing the reproducer directory solved the issue. Add a test
case that detects this.

llvm-svn: 355941

5 years ago[Reproducers] Stop recording instead of deallocating
Jonas Devlieghere [Tue, 12 Mar 2019 17:10:28 +0000 (17:10 +0000)]
[Reproducers] Stop recording instead of deallocating

The command interpreter holds a pointer to a DataRecorder. After
generating the reproducer, we deallocated all the DataRecorders, causing
the command interpreter to hold a non-null reference to an invalid
object.

This patch changes the behavior of the command provider to stop the
DataRecorders when a reproducer is generated, rather than deallocating
them.

llvm-svn: 355940

5 years agoAdd ability to import std module into expression parser to improve C++ debugging
Raphael Isemann [Tue, 12 Mar 2019 17:09:33 +0000 (17:09 +0000)]
Add ability to import std module into expression parser to improve C++ debugging

Summary:
This patch is the MVP version of importing the std module into the expression parser to improve C++ debugging.

What happens in this patch is that we inject a `@import std` into our expression source code. We also
modify our internal Clang instance for parsing this expression to work with modules and debug info
at the same time (which is the main change in terms of LOC). We implicitly build the `std` module on the first use. The
C++ include paths for building are extracted from the debug info, which means that this currently only
works if the program is compiled with `-glldb -fmodules` and uses the std module. The C include paths
are currently specified by LLDB.

I enabled the tests currently only for libc++ and Linux because I could test this locally. I'll enable the tests
for other platforms once this has landed and doesn't break any bots (and I implemented the platform-specific
C include paths for them).

With this patch we can now:
* Build a libc++ as a module and import it into the expression parser.
* Read from the module while also referencing declarations from the debug info. E.g. `std::abs(local_variable)`.

What doesn't work (yet):
* Merging debug info and C++ module declarations. E.g. `std::vector<CustomClass>` doesn't work.
* Pretty much anything that involves the ASTImporter and templated code. As the ASTImporter is used for saving the result declaration, this means that we can't
call yet any function that returns a non-trivial type.
* Use libstdc++ for this, as it requires multiple include paths and Clang only emits one include path per module. Also libstdc++ doesn't support Clang modules without patches.

Reviewers: aprantl, jingham, shafik, friss, davide, serge-sans-paille

Reviewed By: aprantl

Subscribers: labath, mgorny, abidh, jdoerfert, lldb-commits

Tags: #c_modules_in_lldb, #lldb

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

llvm-svn: 355939

5 years ago[yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names
James Henderson [Tue, 12 Mar 2019 17:00:25 +0000 (17:00 +0000)]
[yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names

Prior to this change, the "Symbol" field of a relocation would always be
assumed to be a symbol name, and if no such symbol existed, the
relocation would reference index 0. This confused me when I tried to use
a literal symbol index in the field: since "0x1" was not a known symbol
name, the symbol index was set as 0. This change falls back to treating
unknown symbol names as integers, and emits an error if the name is not
found and the string is not an integer.

Note that the Symbol field is optional, so if a relocation doesn't
reference a symbol, it shouldn't be specified. The new error required a
number of test updates.

Reviewed by: grimar, ruiu
Differential Revision: https://reviews.llvm.org/D58510

llvm-svn: 355938

5 years ago[SDAG] Expand pow2 mulo using shifts
Nikita Popov [Tue, 12 Mar 2019 16:57:25 +0000 (16:57 +0000)]
[SDAG] Expand pow2 mulo using shifts

Expand MULO with constant power of two operand into a shift. The
overflow is checked with (x << shift) >> shift == x, where the right
shift will be logical for umulo and arithmetic for smulo (with
exception for multiplications by signed_min).

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

llvm-svn: 355937

5 years ago[Reproducers] Support capturing a reproducer without an explicit path.
Jonas Devlieghere [Tue, 12 Mar 2019 16:44:18 +0000 (16:44 +0000)]
[Reproducers] Support capturing a reproducer without an explicit path.

Tablegen doesn't support options that are both flags and take values as
an argument. I noticed this when doing the tablegen rewrite, but forgot
that that affected the reproducer --capture flag.

This patch makes --capture a flag and adds --capture-path to specify a
path for the reproducer. In reality I expect this to be mostly used for
testing, but it could be useful nonetheless.

Differential revision: https://reviews.llvm.org/D59238

llvm-svn: 355936

5 years ago[X86] Arrange more CPU features to inherit from earlier CPUs. NFCI
Craig Topper [Tue, 12 Mar 2019 16:35:30 +0000 (16:35 +0000)]
[X86] Arrange more CPU features to inherit from earlier CPUs. NFCI

This makes SandyBridge inherit back to Westmere/Nehalem.

Make bdver1-4 inherit from each other and btver2 inherit from btver1.

llvm-svn: 355935

5 years ago[clang-tidy] NOLINT support for "clang-diagnostic-*".
Haojian Wu [Tue, 12 Mar 2019 16:11:46 +0000 (16:11 +0000)]
[clang-tidy] NOLINT support for "clang-diagnostic-*".

Reviewers: alexfh, aaron.ballman

Reviewed By: alexfh

Subscribers: xazax.hun, cfe-commits

Tags: #clang

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

llvm-svn: 355934

5 years agoRegenerate sign_extend.ll test.
Simon Pilgrim [Tue, 12 Mar 2019 16:00:59 +0000 (16:00 +0000)]
Regenerate sign_extend.ll test.

This will change as part of the fix for the regressions in D58017.

llvm-svn: 355933

5 years ago[DAGCombine] Pull out repeated demanded bitmask generation. NFCI.
Simon Pilgrim [Tue, 12 Mar 2019 15:58:28 +0000 (15:58 +0000)]
[DAGCombine] Pull out repeated demanded bitmask generation. NFCI.

llvm-svn: 355932

5 years agoRevert "[CMake] Avoid clang-tablegen-targets dependency when building sphinx docs...
Stefan Granitz [Tue, 12 Mar 2019 15:54:35 +0000 (15:54 +0000)]
Revert "[CMake] Avoid clang-tablegen-targets dependency when building sphinx docs (experimental)"

This reverts commit 511066858d44101703d61eded9abf8caff0f9fe0.
This turned out unnecessary to fix the bot.

llvm-svn: 355931

5 years ago[Docs] Add note about legacy PM to Ch4 of tutorial
Kristina Brooks [Tue, 12 Mar 2019 15:44:18 +0000 (15:44 +0000)]
[Docs] Add note about legacy PM to Ch4 of tutorial

Add a note about legacy FunctionPassManager to the LLVM tutorial.

It seems to confuse some people, worth adding a warning to the tutorial
to elaborate and suggest using `llvm::legacy::FunctionPassManager` for
now. Not a perfect solution but hopefully will avoid confusion
in the meantime.

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

llvm-svn: 355930

5 years ago[llvm-cxxfilt]Add test to show that empty lines can be handled
James Henderson [Tue, 12 Mar 2019 15:42:38 +0000 (15:42 +0000)]
[llvm-cxxfilt]Add test to show that empty lines can be handled

I recently discovered a bug in llvm-cxxfilt introduced in r353743 but
was fixed later incidentally due to r355031. Specifically, llvm-cxxfilt
was attempting to call .back() on an empty string any time there was a
new line in the input. This was causing a crash in my debug builds only.
This patch simply adds a test that explicitly tests that llvm-cxxfilt
handles empty lines correctly. It may pass under release builds under
the broken behaviour, but it fails at least in debug builds.

Reviewed by: mattd

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

llvm-svn: 355929

5 years ago[FileCheck]Remove assertions that prevent matching an empty string at file start...
James Henderson [Tue, 12 Mar 2019 15:37:34 +0000 (15:37 +0000)]
[FileCheck]Remove assertions that prevent matching an empty string at file start before CHECK-NEXT/SAME

This patch removes two assertions that were preventing writing of a test
that checked an empty line followed by some text. For example:

CHECK: {{^$}}
CHECK-NEXT: foo()

The assertion was because the current location the CHECK-NEXT was
scanning from was the start of the buffer. A similar issue occurred with
CHECK-SAME. These assertions don't protect against anything, as there is
already an error check that checks that CHECK-NEXT/EMPTY/SAME don't
appear first in the checks, and the following code works fine if the
pointer is at the start of the input.

Reviewed by: probinson, thopre, jdenny
Differential Revision: https://reviews.llvm.org/D58784

llvm-svn: 355928

5 years ago[CMake] Tell libc++ that we're using compiler-rt on Apple platforms
Louis Dionne [Tue, 12 Mar 2019 15:32:00 +0000 (15:32 +0000)]
[CMake] Tell libc++ that we're using compiler-rt on Apple platforms

Reviewers: beanz, arphaman, EricWF

Subscribers: dberris, mgorny, jkorous, dexonsmith, jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 355927

5 years agoCodeGenPrep: preserve inbounds attribute when sinking GEPs.
Tim Northover [Tue, 12 Mar 2019 15:22:23 +0000 (15:22 +0000)]
CodeGenPrep: preserve inbounds attribute when sinking GEPs.

Targets can potentially emit more efficient code if they know address
computations never overflow. For example ILP32 code on AArch64 (which only has
64-bit address computation) can ignore the possibility of overflow with this
extra information.

llvm-svn: 355926

5 years agofix break tests after rL355922. NFCI
Xing GUO [Tue, 12 Mar 2019 14:58:01 +0000 (14:58 +0000)]
fix break tests after rL355922. NFCI

llvm-svn: 355925

5 years ago[format] \t => ' '
Liang Zou [Tue, 12 Mar 2019 14:48:32 +0000 (14:48 +0000)]
[format] \t => '  '

Summary:
1. \t => '  '
2. test commit access

Reviewers: Higuoxing, liangdzou

Reviewed By: Higuoxing, liangdzou

Subscribers: kristina, llvm-commits

Tags: #llvm

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

llvm-svn: 355924

5 years ago[scudo][standalone] Implement checksumming functions
Kostya Kortchinsky [Tue, 12 Mar 2019 14:46:31 +0000 (14:46 +0000)]
[scudo][standalone] Implement checksumming functions

Summary:
This CL implements the checksumming functions. This departs from the
current Scudo code in one aspect: the software version is no longer
CRC32 but a BSD checksum. This is because the software CRC32 was too
impactful in terms of performances, the BSD checksum has no array
lookup which is better (and saves 1KB of data).

As with the current version, we only flip the CRC compiler flag for
a single compilation unit by default, to allow for a library compiled
with HW CRC32 to work on a system without HW CRC32.

There is some platform & hardware specific code in those files, but
since departs from a mere platform split, it felt right to me to have
it that way.

Reviewers: morehouse, eugenis, vitalybuka, hctim, mcgrathr

Reviewed By: morehouse

Subscribers: mgorny, delcypher, jfb, jdoerfert, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 355923

5 years ago[llvm-readobj] Print symbol version when dumping relocations (PR31564)
Xing GUO [Tue, 12 Mar 2019 14:30:13 +0000 (14:30 +0000)]
[llvm-readobj] Print symbol version when dumping relocations (PR31564)

Summary: This helps resolve https://bugs.llvm.org/show_bug.cgi?id=31564

Reviewers: jhenderson, grimar

Reviewed By: jhenderson

Subscribers: rupprecht, llvm-commits

Tags: #llvm

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

llvm-svn: 355922

5 years ago[SimplifyLibCalls] Simplify optimizePuts
Fangrui Song [Tue, 12 Mar 2019 14:20:22 +0000 (14:20 +0000)]
[SimplifyLibCalls] Simplify optimizePuts

The code might intend to replace puts("") with putchar('\n') even if the
return value is used. It failed because use_empty() was used to guard
the whole block. While returning '\n' (putchar('\n')) is technically
correct (puts is only required to return a nonnegative number on
success), doing this looks weird and there is really little benefit to
optimize puts whose return value is used. So don't do that.

llvm-svn: 355921

5 years ago[NFC][PowerPC]Assert when trying to generate directmove below P8.
Jinsong Ji [Tue, 12 Mar 2019 14:01:29 +0000 (14:01 +0000)]
[NFC][PowerPC]Assert when trying to generate directmove below P8.

This was found when we generated COPY from G8RC to F8RC in
EmitInstrWithCustomInserter without checking proper architecture,
we silently generated mtvsrd, which require P8 and up.

This is a NFC patch to add assert when we call copyPhysReg, in case
someone accidentally generate COPY between G8RC to F8RC for P7 and
below.

llvm-svn: 355920

5 years ago[pstl] Deprecate non-CMake based build
Louis Dionne [Tue, 12 Mar 2019 13:54:37 +0000 (13:54 +0000)]
[pstl] Deprecate non-CMake based build

All of LLVM builds with CMake, so it doesn't make sense to maintain a
separate set of build files just for pstl.

Thanks to Thomas Rodgers for the patch.
Differential Revision: https://reviews.llvm.org/D59111

llvm-svn: 355919

5 years ago[pstl] Properly extract the version number from pstl_config.h
Louis Dionne [Tue, 12 Mar 2019 13:48:25 +0000 (13:48 +0000)]
[pstl] Properly extract the version number from pstl_config.h

Previously, we'd be performing math on `#define PSTL_VERSION NNN` instead
of just `NNN`. It seems like older CMakes didn't complain, but newer
CMakes do complain because it doesn't make sense.

llvm-svn: 355918

5 years ago[XRay][docs] Fix option name
Fangrui Song [Tue, 12 Mar 2019 13:44:42 +0000 (13:44 +0000)]
[XRay][docs] Fix option name

llvm-svn: 355917

5 years ago[PR41007][OpenCL] Allow printf in C++ mode.
Anastasia Stulova [Tue, 12 Mar 2019 12:46:56 +0000 (12:46 +0000)]
[PR41007][OpenCL] Allow printf in C++ mode.

As for OpenCL C, we need to allow using printf and toolchain variadic
functions (prefixed by "__") in C++ mode.

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

llvm-svn: 355915

5 years ago[llvm-objcopy] Remove unneeded checks. NFC
Eugene Leviant [Tue, 12 Mar 2019 12:41:06 +0000 (12:41 +0000)]
[llvm-objcopy] Remove unneeded checks. NFC

Differential revision: https://reviews.llvm.org/D59081

llvm-svn: 355914

5 years agoRevert rL355906: [SLP] Remove redundancy of performing operand reordering twice:...
Simon Pilgrim [Tue, 12 Mar 2019 11:51:59 +0000 (11:51 +0000)]
Revert rL355906: [SLP] Remove redundancy of performing operand reordering twice: once in buildTree() and later in vectorizeTree().

This is a refactoring patch that removes the redundancy of performing operand reordering twice, once in buildTree() and later in vectorizeTree().
To achieve this we need to keep track of the operands within the TreeEntry struct while building the tree, and later in vectorizeTree() we are just accessing them from the TreeEntry in the right order.

This patch is the first in a series of patches that will allow for better operand reordering across chains of instructions (e.g., a chain of ADDs), as presented here: https://www.youtube.com/watch?v=gIEn34LvyNo

Patch by: @vporpo (Vasileios Porpodas)

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

Reverted due to buildbot failures that I don't have time to track down.

llvm-svn: 355913

5 years agoTry to fix SLPVectorizer BoUpSLP::BoEdgeInfo::dump visibility on non-debug builds
Simon Pilgrim [Tue, 12 Mar 2019 11:31:06 +0000 (11:31 +0000)]
Try to fix SLPVectorizer BoUpSLP::BoEdgeInfo::dump visibility on non-debug builds

llvm-svn: 355912

5 years agoRevert "[analyzer] Fix function macro crash"
Kristof Umann [Tue, 12 Mar 2019 11:22:30 +0000 (11:22 +0000)]
Revert "[analyzer] Fix function macro crash"

Buildbot breaks when LLVm is compiled with memory sanitizer.

WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0xa3d16d8 in getMacroNameAndPrintExpansion(blahblah)
                             lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:903:11
llvm-svn: 355911

5 years ago[LLD][ELF] - Show symbols visibility in "undefined symbol..." error messages.
George Rimar [Tue, 12 Mar 2019 11:10:29 +0000 (11:10 +0000)]
[LLD][ELF] - Show symbols visibility in "undefined symbol..." error messages.

This teaches LLD to report visibility when showing undefined symbol errors
and fixes https://bugs.llvm.org/show_bug.cgi?id=40770.

Differential revision: https://reviews.llvm.org/D58577

llvm-svn: 355909

5 years ago[ARM][NFC] Delete original smlad tests
Sam Parker [Tue, 12 Mar 2019 11:06:15 +0000 (11:06 +0000)]
[ARM][NFC] Delete original smlad tests

Because I don't understand svn.

llvm-svn: 355908

5 years ago[ARM][NFC] Move smlad tests
Sam Parker [Tue, 12 Mar 2019 11:01:11 +0000 (11:01 +0000)]
[ARM][NFC] Move smlad tests

Created a test/CodeGen/ARM/ParallelDSP folder.

llvm-svn: 355907

5 years ago[SLP] Remove redundancy of performing operand reordering twice: once in buildTree...
Simon Pilgrim [Tue, 12 Mar 2019 10:51:51 +0000 (10:51 +0000)]
[SLP] Remove redundancy of performing operand reordering twice: once in buildTree() and later in vectorizeTree().

This is a refactoring patch that removes the redundancy of performing operand reordering twice, once in buildTree() and later in vectorizeTree().
To achieve this we need to keep track of the operands within the TreeEntry struct while building the tree, and later in vectorizeTree() we are just accessing them from the TreeEntry in the right order.

This patch is the first in a series of patches that will allow for better operand reordering across chains of instructions (e.g., a chain of ADDs), as presented here: https://www.youtube.com/watch?v=gIEn34LvyNo

Patch by: @vporpo (Vasileios Porpodas)

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

llvm-svn: 355906

5 years ago[SimplifyLibCalls] Fix comments about fputs, memchr, and s[n]printf. NFC
Fangrui Song [Tue, 12 Mar 2019 10:31:52 +0000 (10:31 +0000)]
[SimplifyLibCalls] Fix comments about fputs, memchr, and s[n]printf. NFC

llvm-svn: 355905

5 years ago[CGP] Fix UB when GEP is bound to trivial PHINode
Eugene Leviant [Tue, 12 Mar 2019 10:10:29 +0000 (10:10 +0000)]
[CGP] Fix UB when GEP is bound to trivial PHINode

Differential revision: https://reviews.llvm.org/D59140

llvm-svn: 355904

5 years ago[analyzer] Fix function macro crash
Kristof Umann [Tue, 12 Mar 2019 10:03:32 +0000 (10:03 +0000)]
[analyzer] Fix function macro crash

When there is a functor-like macro which is passed as parameter to another
"function" macro then its parameters are not listed at the place of expansion:

#define foo(x) int bar() { return x; }
#define hello(fvar) fvar(0)
hello(foo)
int main() { 1 / bar(); }

Expansion of hello(foo) asserted Clang, because it expected an l_paren token in
the 3rd line after "foo", since it is a function-like token.

Patch by Tibor Brunner!

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

llvm-svn: 355903

5 years ago[AMDGPU] Add support for immediate operand for S_ENDPGM
David Stuttard [Tue, 12 Mar 2019 09:52:58 +0000 (09:52 +0000)]
[AMDGPU] Add support for immediate operand for S_ENDPGM

Summary:
Add support for immediate operand in S_ENDPGM

Change-Id: I0c56a076a10980f719fb2a8f16407e9c301013f6

Reviewers: alexshap

Subscribers: qcolombet, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, eraman, arphaman, Petar.Avramovic, llvm-commits

Tags: #llvm

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

llvm-svn: 355902

5 years ago[TTI] Enable analysis of clib functions in getIntrinsicCosts. NFCI.
Sjoerd Meijer [Tue, 12 Mar 2019 09:48:02 +0000 (09:48 +0000)]
[TTI] Enable analysis of clib functions in getIntrinsicCosts. NFCI.

This is addressing the issue that we're not modeling the cost of clib functions
in TTI::getIntrinsicCosts and thus we're basically addressing this fixme:

// FIXME: This is wrong for libc intrinsics.

To enable analysis of clib functions, we not only need an intrinsic ID and
formal arguments, but also the actual user of that function so that we can e.g.
look at alignment and values of arguments. So, this is the initial plumbing to
pass the user of an intrinsinsic on to getCallCosts, which queries
getIntrinsicCosts.

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

llvm-svn: 355901

5 years ago[TableGen] Allow 2^63-1 and 2^63-2 as int literals.
Simon Tatham [Tue, 12 Mar 2019 09:28:19 +0000 (09:28 +0000)]
[TableGen] Allow 2^63-1 and 2^63-2 as int literals.

These two values correspond to the 'Empty' and 'Tombstone' special
keys defined by DenseMapInfo<int64_t>, which means that neither one
can be used as a key in DenseMap<int64_t, anything>. Hence, if you try
to use either of those values as an int literal, IntInit::get() fails
an assertion when it tries to insert them into its static cache of
int-literal objects.

Fixed by replacing the DenseMap with a std::map, which doesn't intrude
on the space of legal values of the key type.

Reviewers: nhaehnle, hfinkel, javedabsar, efriedma

Reviewed By: efriedma

Subscribers: fhahn, efriedma, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 355900

5 years ago[RISCV] Add test cases for the lp64 ABI
Alex Bradbury [Tue, 12 Mar 2019 09:26:53 +0000 (09:26 +0000)]
[RISCV] Add test cases for the lp64 ABI

These are closely modeled on similar tests for the ilp32 ABI. Like those
tests, we group together tests that should be common cross lp64, lp64+lp64f,
and lp64+lp64f+lp64d ABIs.

llvm-svn: 355899

5 years agoCorrectly look up declarations in inline namespaces
Raphael Isemann [Tue, 12 Mar 2019 07:45:04 +0000 (07:45 +0000)]
Correctly look up declarations in inline namespaces

Summary:
This patch marks the inline namespaces from DWARF as inline and also ensures that looking
up declarations now follows the lookup rules for inline namespaces.

Reviewers: aprantl, shafik, serge-sans-paille

Reviewed By: aprantl

Subscribers: eraman, jdoerfert, lldb-commits

Tags: #c_modules_in_lldb, #lldb

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

llvm-svn: 355897

5 years agoFix git-llvm crashing when trying to remove directory while cleaning
Raphael Isemann [Tue, 12 Mar 2019 07:40:54 +0000 (07:40 +0000)]
Fix git-llvm crashing when trying to remove directory while cleaning

Summary:
I'm trying to push D59198 but it seems that `git-llvm push` can't handle the fact
that I add a new directory in the patch:

```
> git llvm push -n
Pushing 1 commit:
  e7c0a9bd136 Correctly look up declarations in inline namespaces
Traceback (most recent call last):
  File "llvm/utils/git-svn//git-llvm", line 431, in <module>
    args.func(args)
  File "llvm/utils/git-svn//git-llvm", line 385, in cmd_push
    clean_svn(svn_root)
  File "llvm/utils/git-svn//git-llvm", line 201, in clean_svn
    os.remove(os.path.join(svn_repo, filename))
IsADirectoryError: [Errno 21] Is a directory: '.git/llvm-upstream-svn/lldb/trunk/packages/Python/lldbsuite/test/expression_command/inline-namespace'
```

This patch just uses shutil to delete the directory instead of trying to use `os.remove`
which only works for files.

Reviewers: mehdi_amini, jlebar

Reviewed By: jlebar

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 355896

5 years agoVery minor typo. NFC
Kristina Brooks [Tue, 12 Mar 2019 07:08:19 +0000 (07:08 +0000)]
Very minor typo. NFC

Typo `we we're` => `we were` in the pass EarlyCSE

Patch by liangdzou (Liang ZOU)

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

llvm-svn: 355895

5 years agoFix test to unconditionally create a GNU-format archive.
Eli Friedman [Tue, 12 Mar 2019 02:20:01 +0000 (02:20 +0000)]
Fix test to unconditionally create a GNU-format archive.

On Darwin targets, llvm-ar creates a Darwin format archive by default,
which ld.lld can't read, so it was printing an unexpected error.

llvm-svn: 355894

5 years agoELF: Remove dead code. NFCI.
Peter Collingbourne [Tue, 12 Mar 2019 02:18:03 +0000 (02:18 +0000)]
ELF: Remove dead code. NFCI.

The Live bit is already set to false by SectionBase.

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

llvm-svn: 355893

5 years agollvm-objcopy: Remove unused field. NFCI.
Peter Collingbourne [Tue, 12 Mar 2019 02:17:01 +0000 (02:17 +0000)]
llvm-objcopy: Remove unused field. NFCI.

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

llvm-svn: 355892

5 years ago[Driver] Support object files in addition to static and shared libraries in compiler-rt
Petr Hosek [Tue, 12 Mar 2019 02:12:48 +0000 (02:12 +0000)]
[Driver] Support object files in addition to static and shared libraries in compiler-rt

This change introduces support for object files in addition to static
and shared libraries which were already supported which requires
changing the type of the argument from boolean to an enum.

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

llvm-svn: 355891

5 years ago[DebugInfo] Add test cases for FlagNonTrivial
Aaron Smith [Tue, 12 Mar 2019 02:00:39 +0000 (02:00 +0000)]
[DebugInfo] Add test cases for FlagNonTrivial

Summary:
This is a test case to go with D44406 which added FlagNonTrivial to mark that a C++ record is non-trivial to support CodeView debug emission.

While it looks like FlagTypePassByValue can imply triviality and FlagTypePassByReference can imply non-triviality that is not true. Some non-trivial cases use a combination of FlagNonTrivial and FlagTypePassByValue instead of FlagTypePassByReference. See the test cases and D44406 for discussion.

Reviewers: dblaikie, rnk, zturner

Reviewed By: dblaikie

Subscribers: jdoerfert, llvm-commits

Tags: #llvm

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

llvm-svn: 355890

5 years agoReland "Relax constraints for reduction vectorization"
Sanjoy Das [Tue, 12 Mar 2019 01:31:44 +0000 (01:31 +0000)]
Reland "Relax constraints for reduction vectorization"

Change from original commit: move test (that uses an X86 triple) into the X86
subdirectory.

Original description:
Gating vectorizing reductions on *all* fastmath flags seems unnecessary;
`reassoc` should be sufficient.

Reviewers: tvvikram, mkuper, kristof.beyls, sdesmalen, Ayal

Reviewed By: sdesmalen

Subscribers: dcaballe, huntergr, jmolloy, mcrosier, jlebar, bixia, llvm-commits

Tags: #llvm

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

llvm-svn: 355889

5 years ago[ELF] Print a better error for an archive containing a non-ELF file.
Eli Friedman [Tue, 12 Mar 2019 01:24:39 +0000 (01:24 +0000)]
[ELF] Print a better error for an archive containing a non-ELF file.

Hopefully gives a more readable error message for the most obvious
mistake.

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

llvm-svn: 355888

5 years ago[CMake] Avoid clang-tablegen-targets dependency when building sphinx docs (experimental)
Jonas Devlieghere [Tue, 12 Mar 2019 00:49:10 +0000 (00:49 +0000)]
[CMake] Avoid clang-tablegen-targets dependency when building sphinx docs (experimental)

Proposal to fix bot
http://lab.llvm.org:8011/builders/lldb-sphinx-docs/builds/1564/steps/cmake-configure/logs/stdio

Patch by: Stefan Gränitz

Differential revision: https://reviews.llvm.org/D59232

llvm-svn: 355887