platform/upstream/llvm.git
5 years ago[MinGW] Add an lld specific option for requesting to delay load libraries
Martin Storsjo [Mon, 5 Aug 2019 11:57:06 +0000 (11:57 +0000)]
[MinGW] Add an lld specific option for requesting to delay load libraries

With GNU tools, delayload is handled completely differently. (One
creates a specific delayload import library using dlltool and then
links against it instead of the normal import library.)

Instead of requiring using -Xlink=-delayload:lib.dll, we can provide
an lld specific option for this.

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

llvm-svn: 367837

5 years ago[COFF] Omit automatically imported symbols from the symbol table
Martin Storsjo [Mon, 5 Aug 2019 11:57:00 +0000 (11:57 +0000)]
[COFF] Omit automatically imported symbols from the symbol table

These symbols actually point to the symbol's IAT entry, which
obviously is different from the symbol itself (which is imported
from a different module and doesn't exist in the current one).

Omitting this symbol helps gdb inspect automatically imported
symbols, see https://sourceware.org/bugzilla/show_bug.cgi?id=24574
for discussion on the matter.

Surprisingly, those extra symbols don't seem to be an issue for
gdb when the sources have been built with clang, only with gcc.
The actual logic in gdb that this depends on still is unknown, but
omitting these symbols from the symbol table is the right thing to
do in any case.

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

llvm-svn: 367836

5 years agoFix PDB tests after r367820
Pavel Labath [Mon, 5 Aug 2019 11:29:01 +0000 (11:29 +0000)]
Fix PDB tests after r367820

The commit changed Module dumping code to call SymbolFile::Dump
directly, which meant that we were no longer showing the plugin name in
the output (as that was done in the SymbolVendor).

This adds the plugin name printing code to the SymbolFile dump method,
and tweak the assertions in the PDB tests to match it correctly.

llvm-svn: 367835

5 years ago[DAGCombiner][x86] prevent infinite loop from truncate/extend transforms
Sanjay Patel [Mon, 5 Aug 2019 11:27:07 +0000 (11:27 +0000)]
[DAGCombiner][x86] prevent infinite loop from truncate/extend transforms

The test case is based on the example from the post-commit thread for:
https://reviews.llvm.org/rGc9171bd0a955

This replaces the x86-specific simple-type check from:
rL367766
with a check in the DAGCombiner. Adding the check isn't
strictly necessary after the fix from:
rL367768
...but it seems likely that we're heading for trouble if
we are creating weird types in this transform.

I combined the earlier legality check into the initial
clause to simplify the code.

So we should only try the trunc/sext transform at the
earliest combine stage, but we limit the transform to
simple types anyway because the TLI hook is probably
too lax about what it considers a free truncate.

llvm-svn: 367834

5 years ago[llvm/Object] - Remove ELFFile<ELFT>::getSection(const StringRef SectionName). NFC.
George Rimar [Mon, 5 Aug 2019 11:19:28 +0000 (11:19 +0000)]
[llvm/Object] - Remove ELFFile<ELFT>::getSection(const StringRef SectionName). NFC.

This method is dead. It was introduced in D47989,
but now the logic from D63475 is used in llvm-readobj instead.
Also it has a problem: it returns the first matching section,
even if there are multiple sections with the same name.

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

llvm-svn: 367833

5 years ago[MVT][SVE] Map between scalable vector IR Type and VTs
Graham Hunter [Mon, 5 Aug 2019 11:18:19 +0000 (11:18 +0000)]
[MVT][SVE] Map between scalable vector IR Type and VTs

Adds a two way mapping between the scalable vector IR type and
corresponding SelectionDAG ValueTypes.

Reviewers: craig.topper, jeroen.dobbelaere, fhahn, rengolin, greened, rovka

Reviewed By: greened

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

llvm-svn: 367832

5 years ago[AArch64] Skip isZIPMask check for masks with an odd number of elements.
Florian Hahn [Mon, 5 Aug 2019 11:12:23 +0000 (11:12 +0000)]
[AArch64] Skip isZIPMask check for masks with an odd number of elements.

We process 2 elements at a time and expect the number of elements to be
even. Similar to D60690.

Reviewers: dmgreen, samparker, t.p.northover

Reviewed By: dmgreen

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

llvm-svn: 367831

5 years ago[lldb][NFC] Remove unimplemented ClangExpressionSourceCode::GetNumBodyLines
Raphael Isemann [Mon, 5 Aug 2019 11:08:47 +0000 (11:08 +0000)]
[lldb][NFC] Remove unimplemented ClangExpressionSourceCode::GetNumBodyLines

llvm-svn: 367830

5 years ago[CrossTU][NFCI] Refactor loadExternalAST function
Endre Fulop [Mon, 5 Aug 2019 11:06:41 +0000 (11:06 +0000)]
[CrossTU][NFCI] Refactor loadExternalAST function

Summary:
Refactor loadExternalAST method of CrossTranslationUnitContext in order to
reduce maintenance burden and so that features are easier to add in the future.

Reviewers: martong

Subscribers: rnkovacs, dkrupp, Szelethus, cfe-commits

Tags: #clang

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

llvm-svn: 367829

5 years ago[LLVM][Alignment] Introduce Alignment Type
Guillaume Chatelet [Mon, 5 Aug 2019 11:02:05 +0000 (11:02 +0000)]
[LLVM][Alignment] Introduce Alignment Type

Summary:
This is patch is part of a serie to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet, jfb, jakehehrlich

Reviewed By: jfb

Subscribers: wuzish, jholewinski, arsenm, dschuff, nemanjai, jvesely, nhaehnle, javed.absar, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, PkmX, jocewei, jsji, s.egerton, llvm-commits

Tags: #llvm

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

llvm-svn: 367828

5 years ago[TLI][NFC] Fixed typo
David Bolvansky [Mon, 5 Aug 2019 10:14:09 +0000 (10:14 +0000)]
[TLI][NFC] Fixed typo

llvm-svn: 367827

5 years agoSidestep false positive due to a matching git repository name
Roger Ferrer Ibanez [Mon, 5 Aug 2019 10:09:06 +0000 (10:09 +0000)]
Sidestep false positive due to a matching git repository name

I have failures in this test because the grep @b gets confused by the
clang version including a repository name like this

!1 = !{!"clang version 10.0.0 (git@build-machine:llvm/llvm-monorepo.git fe958c0e8c89ec663c8e551936778e2cbb460154)"}

I considered something like grep -w but my understanding of the manpages
was that that isn't super portable. So I think it is easier to make
clang not to output that metadata using -fno-ident.

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

llvm-svn: 367826

5 years ago[InstCombine] Added mempcpy tests [NFC]
David Bolvansky [Mon, 5 Aug 2019 09:58:32 +0000 (09:58 +0000)]
[InstCombine] Added mempcpy tests [NFC]

llvm-svn: 367825

5 years agoObjectFile[ELF]: Refactor gnu_debuglink interface
Pavel Labath [Mon, 5 Aug 2019 09:55:07 +0000 (09:55 +0000)]
ObjectFile[ELF]: Refactor gnu_debuglink interface

Summary:
The contents of the gnu_debuglink section were passed through the
GetDebugSymbolFilePaths interface, which was more generic than needed.
As the only class implementing this function is ObjectFileELF, we can
modify the function to return just a single FileSpec (instead of a
list). Also, since the SymbolVendorELF already assumes ELF object files,
we don't have to make this method available on the generic ObjectFile
interface -- instead we can put it on ObjectFileELF directly.

This change also makes is so that if the Module has an explicit symbol
file spec set, we disregard the value the value of the debug link
(instead of doing a secondary lookup using that). I think it makes sense
to honor the users wishes if he had explicitly set the symbol file spec,
and this seems to be consistent with what SymbolVendorMacOSX is doing
(SymbolVendorMacOSX.cpp:125).

The main reason for making these changes is to make the treatment of
build-ids and debug links simpler in the follow-up patch.

Reviewers: clayborg, jankratochvil, mgorny, espindola

Subscribers: emaste, arichardson, MaskRay, lldb-commits

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

llvm-svn: 367824

5 years ago[OpenCL] Fix vector literal test broken in rL367675.
Anastasia Stulova [Mon, 5 Aug 2019 09:50:28 +0000 (09:50 +0000)]
[OpenCL] Fix vector literal test broken in rL367675.

Avoid checking alignment unnecessary that is not portable
among targets.

llvm-svn: 367823

5 years ago[LLVM][Alignment] Introduce Alignment In CallingConv
Guillaume Chatelet [Mon, 5 Aug 2019 09:49:09 +0000 (09:49 +0000)]
[LLVM][Alignment] Introduce Alignment In CallingConv

Summary:
This is patch is part of a serie to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Subscribers: hiraditya, llvm-commits, courbet, jfb

Tags: #llvm

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

llvm-svn: 367822

5 years agoAMDGPU: add missing llvm.amdgcn.{raw,struct}.buffer.atomic.{inc,dec}
Nicolai Haehnle [Mon, 5 Aug 2019 09:36:06 +0000 (09:36 +0000)]
AMDGPU: add missing llvm.amdgcn.{raw,struct}.buffer.atomic.{inc,dec}

Summary:
Wrapping increment/decrement. These aren't exposed by many APIs...

Change-Id: I1df25c7889de5a5ba76468ad8e8a2597efa9af6c

Reviewers: arsenm, tpr, dstuttard

Subscribers: kzhuravl, jvesely, wdng, yaxunl, t-tye, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 367821

5 years agoRemove SymbolVendor::GetSymtab
Pavel Labath [Mon, 5 Aug 2019 09:21:47 +0000 (09:21 +0000)]
Remove SymbolVendor::GetSymtab

Summary:
This patch removes the GetSymtab method from the SymbolVendor, which is
a no-op as it's implementation just forwards to the relevant SymbolFile.
Instead it creates a Module::GetSymtab, which calls the SymbolFile
method directly.

All callers have been updated to use the Module method directly instead
of a two phase GetSymbolVendor->GetSymtab search, which leads to reduced
intentation in a lot of deeply nested code.

Reviewers: clayborg, JDevlieghere, jingham

Subscribers: lldb-commits

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

llvm-svn: 367820

5 years agoReland: Fix and test inter-procedural register allocation for ARM
Oliver Stannard [Mon, 5 Aug 2019 09:04:10 +0000 (09:04 +0000)]
Reland: Fix and test inter-procedural register allocation for ARM

Add an explicit construction of the ArrayRef, gcc 5 and earlier don't
seem to select the ArrayRef constructor which takes a C array when the
construction is implicit.

Original commit message:

- Avoid a crash when IPRA calls ARMFrameLowering::determineCalleeSaves
  with a null RegScavenger. Simply not updating the register scavenger
  is fine because IPRA only cares about the SavedRegs vector, the acutal
  code of the function has already been generated at this point.
- Add a new hook to TargetRegisterInfo to get the set of registers which
  can be clobbered inside a call, even if the compiler can see both
  sides, by linker-generated code.

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

llvm-svn: 367819

5 years ago[LLVM][Alignment] Introduce Alignment Type in DataLayout
Guillaume Chatelet [Mon, 5 Aug 2019 09:00:43 +0000 (09:00 +0000)]
[LLVM][Alignment] Introduce Alignment Type in DataLayout

Summary:
This is patch is part of a serie to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet, jfb, jakehehrlich

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

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

Make getFunctionPtrAlign() return MaybeAlign

llvm-svn: 367817

5 years agoRevert "[llvm-objdump] Re-commit r367284."
Michael Pozulp [Mon, 5 Aug 2019 08:52:28 +0000 (08:52 +0000)]
Revert "[llvm-objdump] Re-commit r367284."

This reverts r367776 (git commit d34099926e909390cb0254bebb4b7f5cf15467c7).
My changes to llvm-objdump tests caused them to fail on windows:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/27368

llvm-svn: 367816

5 years agobuild_llvm_package.bat: Set PYTHON_EXECUTABLE (PR42724)
Hans Wennborg [Mon, 5 Aug 2019 08:51:45 +0000 (08:51 +0000)]
build_llvm_package.bat: Set PYTHON_EXECUTABLE (PR42724)

llvm-svn: 367815

5 years agoRemove usage of usleep in generic code
Pavel Labath [Mon, 5 Aug 2019 08:23:25 +0000 (08:23 +0000)]
Remove usage of usleep in generic code

This function is not portable, and there are only a handful of usages of
it anyway. Replacing it with std::this_thread::sleep_for enables us to
get rid of the compatibility code in PosixApi.h.

llvm-svn: 367814

5 years ago[clangd] Expose -offset-encoding=utf-32, which has been implemented for ages
Sam McCall [Mon, 5 Aug 2019 08:14:17 +0000 (08:14 +0000)]
[clangd] Expose -offset-encoding=utf-32, which has been implemented for ages

llvm-svn: 367812

5 years ago[clangd] Fix error message with incorrect TextDocumentcontentChangeEvent.rangeLength
Sam McCall [Mon, 5 Aug 2019 08:14:13 +0000 (08:14 +0000)]
[clangd] Fix error message with incorrect TextDocumentcontentChangeEvent.rangeLength

llvm-svn: 367811

5 years agoAdds a warning when an inline Doxygen comment has no argument
Dmitri Gribenko [Mon, 5 Aug 2019 08:05:16 +0000 (08:05 +0000)]
Adds a warning when an inline Doxygen comment has no argument

Summary:
It warns for for comments like
/** \pre \em */

where \em has no argument

This warning is enabled with the -Wdocumentation option.

Reviewers: gribozavr, rsmith

Reviewed By: gribozavr

Subscribers: cfe-commits

Tags: #clang

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

Patch by Mark de Wever.

llvm-svn: 367809

5 years agocompiler-rt: Rename .cc file in test/lsan to .cpp
Fangrui Song [Mon, 5 Aug 2019 07:04:42 +0000 (07:04 +0000)]
compiler-rt: Rename .cc file in test/lsan to .cpp

Like r367463, but for test/lsan.

llvm-svn: 367803

5 years ago[Analyzer] Iterator Checkers - Fix for Crash on Iterator Differences
Adam Balogh [Mon, 5 Aug 2019 06:45:41 +0000 (06:45 +0000)]
[Analyzer] Iterator Checkers - Fix for Crash on Iterator Differences

Iterators differences were mistakenly handled as random decrements which
causes an assertion. This patch fixes this.

llvm-svn: 367802

5 years ago[DWARF] Change DWARFDebugLoc::Entry::Loc from SmallVector<char, 4> to SmallString<4>
Fangrui Song [Mon, 5 Aug 2019 06:33:52 +0000 (06:33 +0000)]
[DWARF] Change DWARFDebugLoc::Entry::Loc from SmallVector<char, 4> to SmallString<4>

SmallString has a conversion to StringRef, which can be leveraged to
simplify two use sites.

llvm-svn: 367801

5 years agoRename F_{None,Text,Append} to OF_{None,Text,Append}. NFC
Fangrui Song [Mon, 5 Aug 2019 05:43:48 +0000 (05:43 +0000)]
Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC

F_{None,Text,Append} are kept for compatibility since r334221.

llvm-svn: 367800

5 years ago[Driver] Don't disable -fsanitizer-coverage for safe-stack or shadow-call-stack
Petr Hosek [Mon, 5 Aug 2019 04:48:56 +0000 (04:48 +0000)]
[Driver] Don't disable -fsanitizer-coverage for safe-stack or shadow-call-stack

These "sanitizers" are hardened ABIs that are wholly orthogonal
to the SanitizerCoverage instrumentation.

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

llvm-svn: 367799

5 years ago[X86] Fix a bad early out in combineExtInVec that prevented recursive shuffle combini...
Craig Topper [Mon, 5 Aug 2019 03:48:31 +0000 (03:48 +0000)]
[X86] Fix a bad early out in combineExtInVec that prevented recursive shuffle combining from running with -x86-experimental-vector-widening-legalization.

llvm-svn: 367798

5 years ago[Driver] Derive Fuchsia Linker directly from Tool
Petr Hosek [Mon, 5 Aug 2019 01:36:51 +0000 (01:36 +0000)]
[Driver] Derive Fuchsia Linker directly from Tool

Fuchsia Linker tool doesn't need any of the GnuTool behavior.

llvm-svn: 367797

5 years ago[Driver] Always use -z separate-code with lld on Fuchsia
Petr Hosek [Mon, 5 Aug 2019 01:15:33 +0000 (01:15 +0000)]
[Driver] Always use -z separate-code with lld on Fuchsia

Previously -z separate-code was the default lld behavior, but now it
has to be explicitly requested by specifying the flag.

llvm-svn: 367796

5 years agogn build: Merge r367756
Nico Weber [Sun, 4 Aug 2019 23:34:27 +0000 (23:34 +0000)]
gn build: Merge r367756

llvm-svn: 367795

5 years ago[Driver] Support for disabling sanitizer runtime linking
Petr Hosek [Sun, 4 Aug 2019 22:24:14 +0000 (22:24 +0000)]
[Driver] Support for disabling sanitizer runtime linking

This change introduces a pair of -fsanitize-link-runtime and
-fno-sanitize-link-runtime flags which can be used to control linking of
sanitizer runtimes. This is useful in certain environments like kernels
where existing runtime libraries cannot be used.

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

llvm-svn: 367794

5 years ago[Attributor][NFC] Create some attributes earlier
Johannes Doerfert [Sun, 4 Aug 2019 18:40:01 +0000 (18:40 +0000)]
[Attributor][NFC] Create some attributes earlier

llvm-svn: 367793

5 years ago[Attributor][NFC] Improve debug output
Johannes Doerfert [Sun, 4 Aug 2019 18:39:28 +0000 (18:39 +0000)]
[Attributor][NFC] Improve debug output

llvm-svn: 367792

5 years ago[Attributor][Fix] Resolve various liveness issues
Johannes Doerfert [Sun, 4 Aug 2019 18:38:53 +0000 (18:38 +0000)]
[Attributor][Fix] Resolve various liveness issues

Summary:
This contains various fixes:
  - Explicitly determine and return the next noreturn instruction.
  - If an invoke calls a noreturn function which is not nounwind we
    keep the unwind destination live. This also means we require an
    invoke. Though we can still add the unreachable to the normal
    destination block.
  - Check if the return instructions are dead after we look for calls
    to avoid triggering an optimistic fixpoint in the presence of
    assumed liveness information.
  - Make the interface work with "const" pointers.
  - Some simplifications

While additional tests are included, full coverage is achieved only with
D59978.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

llvm-svn: 367791

5 years ago[Attributor][NFC] Simplify common pattern wrt. fixpoints
Johannes Doerfert [Sun, 4 Aug 2019 18:37:38 +0000 (18:37 +0000)]
[Attributor][NFC] Simplify common pattern wrt. fixpoints

When a fixpoint is indicated the change status is known due to the
fixpoint kind. This simplifies a common code pattern by making the
connection explicit.

llvm-svn: 367790

5 years ago[Attributor][NFC] Invalid DerefState is at fixpoint
Johannes Doerfert [Sun, 4 Aug 2019 17:55:15 +0000 (17:55 +0000)]
[Attributor][NFC] Invalid DerefState is at fixpoint

Summary:
If the DerefBytesState (and thereby the DerefState) is invalid, we
reached a fixpoint for the whole DerefState as we will not
manifest/provide information then.

Reviewers: uenoku, sstefan1

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

llvm-svn: 367789

5 years ago[TargetLowering][X86] Teach SimplifyDemandedVectorElts to replace the base vector...
Craig Topper [Sun, 4 Aug 2019 17:30:41 +0000 (17:30 +0000)]
[TargetLowering][X86] Teach SimplifyDemandedVectorElts to replace the base vector of INSERT_SUBVECTOR with undef if none of the elements are demanded even if the node has other users.

Summary:
The SimplifyDemandedVectorElts function can replace with undef
when no elements are demanded, but due to how it interacts with
TargetLoweringOpts, it can only do this when the node has
no other users.

Remove a now unneeded DAG combine from the X86 backend.

Reviewers: RKSimon, spatel

Reviewed By: RKSimon

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 367788

5 years agoRegenerate test for an upcoming patch.
Simon Pilgrim [Sun, 4 Aug 2019 16:37:29 +0000 (16:37 +0000)]
Regenerate test for an upcoming patch.

I managed to use the update_llc_test_checks script for this, but had to set -asm-verbose=true and then manually tweak the result (PR42882)

llvm-svn: 367787

5 years ago[UpdateTestChecks] Add end_function directive to regex matcher for wasm32 function...
Simon Pilgrim [Sun, 4 Aug 2019 16:28:37 +0000 (16:28 +0000)]
[UpdateTestChecks] Add end_function directive to regex matcher for wasm32 function body

llvm-svn: 367786

5 years ago[clang-tidy] Add FixItHint for performance-noexcept-move-constructor
Zinovy Nis [Sun, 4 Aug 2019 13:32:39 +0000 (13:32 +0000)]
[clang-tidy] Add FixItHint for performance-noexcept-move-constructor

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

llvm-svn: 367785

5 years ago[X86] lowerShuffleAsSpecificZeroOrAnyExtend - use undef PSHUFB mask indices for ANY_E...
Simon Pilgrim [Sun, 4 Aug 2019 13:15:23 +0000 (13:15 +0000)]
[X86] lowerShuffleAsSpecificZeroOrAnyExtend - use undef PSHUFB mask indices for ANY_EXTEND shuffles

llvm-svn: 367784

5 years agoFix signed/unsigned comparison warning. NFC.
Simon Pilgrim [Sun, 4 Aug 2019 12:48:19 +0000 (12:48 +0000)]
Fix signed/unsigned comparison warning. NFC.

llvm-svn: 367783

5 years ago[X86] SimplifyMultipleUseDemandedBits - Add target shuffle support
Simon Pilgrim [Sun, 4 Aug 2019 12:24:40 +0000 (12:24 +0000)]
[X86] SimplifyMultipleUseDemandedBits - Add target shuffle support

llvm-svn: 367782

5 years ago[ORC] Remove a layer of indirection when locking the mutex. NFCI.
Benjamin Kramer [Sun, 4 Aug 2019 11:08:32 +0000 (11:08 +0000)]
[ORC] Remove a layer of indirection when locking the mutex. NFCI.

llvm-svn: 367781

5 years ago[ARM] MVE big endian bitcasts
David Green [Sun, 4 Aug 2019 10:18:15 +0000 (10:18 +0000)]
[ARM] MVE big endian bitcasts

This adds big endian MVE patterns for bitcasts. They are defined in llvm as
being the same as a store of the existing type and the load into the new. This
means that they have to become a VREV between the two types, working in the
same way that NEON works in big-endian. This also adds some example tests for
bigendian, showing where code is and isn't different.

The main difference, especially from a testing perspective is that vectors are
passed as v2f64, and so are VREV into and out of call arguments, and the
parameters are passed in a v2f64 format. Same happens for inline assembly where
the register class is used, so it is VREV to a v16i8.

So some of this is probably not correct yet, but it is (mostly) self-consistent
and seems to be consistent with how llvm treats vectors. The rest we can
hopefully fix later. More details about big endian neon can be found in
https://llvm.org/docs/BigEndianNEON.html.

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

llvm-svn: 367780

5 years ago[Parser] Emit descriptive diagnostic for misplaced pragma
Serge Pavlov [Sun, 4 Aug 2019 10:08:51 +0000 (10:08 +0000)]
[Parser] Emit descriptive diagnostic for misplaced pragma

If a class or struct or union declaration contains a pragma that
is not valid in this context, compiler issues generic error like
"expected member name or ';' after declaration specifiers". With this
change the error tells that this pragma cannot appear in this declaration.

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

llvm-svn: 367779

5 years ago[ELF][test] Delete redundant version-script-*.s tests
Fangrui Song [Sun, 4 Aug 2019 09:05:21 +0000 (09:05 +0000)]
[ELF][test] Delete redundant version-script-*.s tests

Delete version-script-missing.s: it is covered by version-script-noundef.s
Delete version-script-anonymous-local.s: it is covered by version-script-{glob,weak}.s etc
Delete version-script-no-warn{,2}.s: add --fatal-warnings to some version-script.s commands instead

llvm-svn: 367778

5 years agoRevert "Suppress -Wctad-maybe-unsupported on types w/o deduction guides."
Eric Fiselier [Sun, 4 Aug 2019 07:13:43 +0000 (07:13 +0000)]
Revert "Suppress -Wctad-maybe-unsupported on types w/o deduction guides."

Some modules builds are issuing buggy diagnostics. The cause of which is
TBD.

This reverts commit r@367770.

llvm-svn: 367777

5 years ago[llvm-objdump] Re-commit r367284.
Michael Pozulp [Sun, 4 Aug 2019 06:04:00 +0000 (06:04 +0000)]
[llvm-objdump] Re-commit r367284.

Add warning messages if disassembly + source for problematic inputs

Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905

Reviewers: jhenderson, rupprecht, grimar

Reviewed By: jhenderson, grimar

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 367776

5 years ago[X86] Consistently use MVT::i8 for the constant operand of BLENDI and INSERTPS nodes.
Craig Topper [Sun, 4 Aug 2019 06:01:31 +0000 (06:01 +0000)]
[X86] Consistently use MVT::i8 for the constant operand of BLENDI and INSERTPS nodes.

This is the type listed in the type constraint for isel. But since
we list a type there, it doesn't get checked during isel matching.

llvm-svn: 367775

5 years agoRevert "[OpenMP 5.0] Codegen support for user-defined mappers."
Michael Kruse [Sun, 4 Aug 2019 05:16:52 +0000 (05:16 +0000)]
Revert "[OpenMP 5.0] Codegen support for user-defined mappers."

This reverts commit r367773. The test case
OpenMP/declare_mapper_codegen.cpp is failing.

llvm-svn: 367774

5 years ago[OpenMP 5.0] Codegen support for user-defined mappers.
Michael Kruse [Sun, 4 Aug 2019 04:18:42 +0000 (04:18 +0000)]
[OpenMP 5.0] Codegen support for user-defined mappers.

This patch implements the code generation for OpenMP 5.0 declare mapper
(user-defined mapper) constructs. For each declare mapper, a mapper
function is generated. These mapper functions will be called by the
runtime and/or other mapper functions to achieve user defined mapping.

The design slides can be found at
https://github.com/lingda-li/public-sharing/blob/master/mapper_runtime_design.pptx

Patch by Lingda Li <lildmh@gmail.com>

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

llvm-svn: 367773

5 years ago[OpenMP 5.0] libomptarget interface for declare mapper functions.
Michael Kruse [Sun, 4 Aug 2019 04:18:28 +0000 (04:18 +0000)]
[OpenMP 5.0] libomptarget interface for declare mapper functions.

This patch implements the libomptarget runtime interface for OpenMP 5.0
declare mapper functions. The declare mapper functions generated by
Clang will call them to complete the mapping of members.
kmpc_mapper_num_components gets the current number of components for a
user-defined mapper; kmpc_push_mapper_component pushes back one
component for a user-defined mapper.

The design slides can be found at
https://github.com/lingda-li/public-sharing/blob/master/mapper_runtime_design.pptx

Patch by Lingda Li <lildmh@gmail.com>

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

llvm-svn: 367772

5 years ago[SelectionDAG] Add node creation debug message to getMemIntrinsicNode.
Craig Topper [Sun, 4 Aug 2019 02:32:06 +0000 (02:32 +0000)]
[SelectionDAG] Add node creation debug message to getMemIntrinsicNode.

llvm-svn: 367771

5 years agoSuppress -Wctad-maybe-unsupported on types w/o deduction guides.
Eric Fiselier [Sat, 3 Aug 2019 23:54:29 +0000 (23:54 +0000)]
Suppress -Wctad-maybe-unsupported on types w/o deduction guides.

There are a handful of standard library types that are intended
to support CTAD but don't need any explicit deduction guides to
do so.

This patch adds a dummy deduction guide to those types to suppress
-Wctad-maybe-unsupported (which gets emitted in user code).

llvm-svn: 367770

5 years ago[Transforms] Do not drop !preserve.access.index metadata
Yonghong Song [Sat, 3 Aug 2019 23:41:26 +0000 (23:41 +0000)]
[Transforms] Do not drop !preserve.access.index metadata

Currently, when a GVN or CSE optimization happens,
the llvm.preserve.access.index metadata is dropped.
This caused a problem for BPF AbstructMemberOffset phase
as it relies on the metadata (debuginfo types).

This patch added proper hooks in lib/Transforms to
preserve !preserve.access.index metadata. A test
case is added to ensure metadata is preserved under CSE.

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

llvm-svn: 367769

5 years ago[DAGCombiner] Prevent the combine added in r367710 from creating illegal types after...
Craig Topper [Sat, 3 Aug 2019 23:09:13 +0000 (23:09 +0000)]
[DAGCombiner] Prevent the combine added in r367710 from creating illegal types after type legalization.

This is further fix for PR42880.

Sanjay already disabled the X86 TLI hook for non-simple types,
but we should really call isTypeLegal here if we're after type
legalization.

llvm-svn: 367768

5 years ago[JITLink] Fix an overly-wide read in the MachO/x86-64 test case.
Lang Hames [Sat, 3 Aug 2019 22:38:31 +0000 (22:38 +0000)]
[JITLink] Fix an overly-wide read in the MachO/x86-64 test case.

This should fix the build failures on some of the 32-bit bots.

llvm-svn: 367767

5 years ago[x86] change free truncate hook to handle only simple types (PR42880)
Sanjay Patel [Sat, 3 Aug 2019 21:46:27 +0000 (21:46 +0000)]
[x86] change free truncate hook to handle only simple types (PR42880)

This avoids the crash from:
https://bugs.llvm.org/show_bug.cgi?id=42880
...and I think it's a proper constraint for the TLI hook.

But that example raises questions about what happens to get us
into this situation (created i29 types) and what happens later
(why does legalization die on those types), so I'm not sure if
we will resolve the bug based on this change.

llvm-svn: 367766

5 years ago[WebAssembly] Fix allocsize attribute in sjlj lowering
Keno Fischer [Sat, 3 Aug 2019 21:38:19 +0000 (21:38 +0000)]
[WebAssembly] Fix allocsize attribute in sjlj lowering

Summary:
The allocsize attribute refers to call parameters by index.
Thus, when we add the extra parameter in sjlj lowering, we
need to increment the referenced paramater in the allocsize
attribute to avoid angering the Verifier.

Reviewed By: aheejin
Differential Revision: https://reviews.llvm.org/D65470

llvm-svn: 367765

5 years ago[JITLink] Add support for MachO/x86-64 UNSIGNED relocs with length=2.
Lang Hames [Sat, 3 Aug 2019 20:17:10 +0000 (20:17 +0000)]
[JITLink] Add support for MachO/x86-64 UNSIGNED relocs with length=2.

MachO/x86-64 UNSIGNED relocs are almost always 64-bit (length=3), but UNSIGNED
relocs of length=2 are allowed if the target resides in the low 32-bits. This
patch adds support for such relocations in JITLink (previously they would have
triggered an unsupported relocation error).

llvm-svn: 367764

5 years ago[JITLink] Fix error message formatting.
Lang Hames [Sat, 3 Aug 2019 20:17:08 +0000 (20:17 +0000)]
[JITLink] Fix error message formatting.

llvm-svn: 367763

5 years agoRevert accidental change to __member_pointer_traits_imp.
Eric Fiselier [Sat, 3 Aug 2019 19:03:22 +0000 (19:03 +0000)]
Revert accidental change to __member_pointer_traits_imp.

A previous patch accidentally made the primary template
an incomplete type. This broke some C++03 constructs.

llvm-svn: 367762

5 years agoFixup r367321 "Ask confirmation when `git llvm push` will push multiple commits"
Mehdi Amini [Sat, 3 Aug 2019 18:53:52 +0000 (18:53 +0000)]
Fixup r367321 "Ask confirmation when `git llvm push` will push multiple commits"

I unfortunately commited an obsolete revision in r367321 that didn't
have all the changes the reviewers suggested.

llvm-svn: 367761

5 years ago[yaml2obj][tests] Replace 8-byte `od` conversion with 1-byte conversion
Hubert Tong [Sat, 3 Aug 2019 18:52:45 +0000 (18:52 +0000)]
[yaml2obj][tests] Replace 8-byte `od` conversion with 1-byte conversion

Summary:
`od` on AIX does not seem to implement 8-byte integer conversions. Work
around this by using 1-byte conversions, which can be used in this case
since the value is byte-order insensitive.

Reviewers: grimar, daltenty, xingxue, jasonliu, MaskRay

Reviewed By: grimar, MaskRay

Subscribers: MaskRay, llvm-commits

Tags: #llvm

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

llvm-svn: 367760

5 years agoUse switch instead of series of comparisons
Serge Pavlov [Sat, 3 Aug 2019 16:32:49 +0000 (16:32 +0000)]
Use switch instead of series of comparisons

This is style correction, no functional changes.

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

llvm-svn: 367759

5 years agoIR: Cleanup after test to silence ASAN builds
Tim Northover [Sat, 3 Aug 2019 15:40:00 +0000 (15:40 +0000)]
IR: Cleanup after test to silence ASAN builds

llvm-svn: 367758

5 years ago[Attributor][NFC] run clang-format on Attributor.cpp
Stefan Stipanovic [Sat, 3 Aug 2019 15:27:41 +0000 (15:27 +0000)]
[Attributor][NFC] run clang-format on Attributor.cpp

llvm-svn: 367757

5 years agoSpeculative Compilation
Praveen Velliengiri [Sat, 3 Aug 2019 14:42:13 +0000 (14:42 +0000)]
Speculative Compilation

[ORC] Remove Speculator Variants for Different Program Representations

[ORC] Block Freq Analysis

Speculative Compilation with Naive Block Frequency

Add Applications to OrcSpeculation

ORC v2 with Block Freq Query & Example

Deleted BenchMark Programs

Signed-off-by: preejackie <praveenvelliengiri@gmail.com>
ORCv2 comments resolved

[ORCV2] NFC

ORCv2 NFC

[ORCv2] Speculative compilation - CFGWalkQuery

ORCv2 Adapting IRSpeculationLayer to new locking scheme

llvm-svn: 367756

5 years agoIR: print value numbers for unnamed function arguments
Tim Northover [Sat, 3 Aug 2019 14:28:34 +0000 (14:28 +0000)]
IR: print value numbers for unnamed function arguments

For consistency with normal instructions and clarity when reading IR,
it's best to print the %0, %1, ... names of function arguments in
definitions.

Also modifies the parser to accept IR in that form for obvious reasons.

llvm-svn: 367755

5 years agoFinish moving TargetRegisterInfo::isVirtualRegister() and friends to llvm::Register...
Sylvestre Ledru [Sat, 3 Aug 2019 13:51:58 +0000 (13:51 +0000)]
Finish moving TargetRegisterInfo::isVirtualRegister() and friends to llvm::Register as started by r367614. NFC

llvm-svn: 367754

5 years ago[Thumb] Fix invalid symbol redefinition due to duplicated jumptable (PR42760)
Nikita Popov [Sat, 3 Aug 2019 06:47:23 +0000 (06:47 +0000)]
[Thumb] Fix invalid symbol redefinition due to duplicated jumptable (PR42760)

Fix for https://bugs.llvm.org/show_bug.cgi?id=42760. A tBR_JTr
instruction is duplicated by tail duplication, which results in
the same jumptable with the same label being emitted twice.

Fix this by marking tBR_JTr as not duplicable. The corresponding
ARM/Thumb instructions are already marked as not duplicable.
Additionally also mark tTBB_JT and tTBH_JT to be consistent with
Thumb2, even though this shouldn't be strictly necessary.

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

llvm-svn: 367753

5 years ago[lit] Print internal env commands
Joel E. Denny [Sat, 3 Aug 2019 06:08:19 +0000 (06:08 +0000)]
[lit] Print internal env commands

Without this patch, the internal `env` command removes `env` and its
args from the command line while parsing it.  This patch modifies a
copy instead so that the original command line is printed.

Reviewed By: stella.stamenova, rnk

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

llvm-svn: 367752

5 years ago[lit] Actually run tests for internal env command
Joel E. Denny [Sat, 3 Aug 2019 06:08:04 +0000 (06:08 +0000)]
[lit] Actually run tests for internal env command

Put the main test script in the right directory, and fix a python bug
in a local script.

Reviewed By: stella.stamenova

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

llvm-svn: 367751

5 years agoEmit diagnostic if an inline asm constraint requires an immediate
Bill Wendling [Sat, 3 Aug 2019 05:52:47 +0000 (05:52 +0000)]
Emit diagnostic if an inline asm constraint requires an immediate

Summary:
An inline asm call can result in an immediate after inlining. Therefore emit a
diagnostic here if constraint requires an immediate but one isn't supplied.

Reviewers: joerg, mgorny, efriedma, rsmith

Reviewed By: joerg

Subscribers: asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, s.egerton, MaskRay, jyknight, dylanmckay, javed.absar, fedor.sergeev, jrtc27, Jim, krytarowski, eraman, llvm-commits

Tags: #llvm

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

llvm-svn: 367750

5 years agoSimplify <type_traits> implementations.
Eric Fiselier [Sat, 3 Aug 2019 05:01:34 +0000 (05:01 +0000)]
Simplify <type_traits> implementations.

This patch rewrites a number of old meta-function implementations
that assumed const/volatile could not be safely applied to all types.
This is no longer the case, though for some types (Ex function types),
the const qualifier can be ignored.

The largest improvement in this patch is the reduction of is_function.
Thanks to Matt Calabrese for the improved implementation.

llvm-svn: 367749

5 years ago[Attributor] Fix dereferenceable callsite argument initialization
Hideto Ueno [Sat, 3 Aug 2019 04:10:50 +0000 (04:10 +0000)]
[Attributor] Fix dereferenceable callsite argument initialization

llvm-svn: 367748

5 years ago[InstSimplify] Add test case to show bad sign bit handling for integer abs idiom...
Craig Topper [Sat, 3 Aug 2019 02:54:54 +0000 (02:54 +0000)]
[InstSimplify] Add test case to show bad sign bit handling for integer abs idiom in computeKnownBits.

computeKnownBits will indicate the sign bit of abs is 0 if the
the RHS operand returned by matchSelectPattern has the nsw flag set.
For abs idioms like (X >= 0) ? X : -X, the RHS returns -X. But
we can also match ((X-Y) >= 0 ? X-Y : Y-X as abs. In this case
RHS will be the Y-X operand. According to Alive, the sign bit for
this is only 0 if both the X-Y and Y-X operands have the nsw flag.
But we're only checking the Y-X operand.

llvm-svn: 367747

5 years agoAdd OMPT support for teams construct
Hansang Bae [Sat, 3 Aug 2019 02:38:53 +0000 (02:38 +0000)]
Add OMPT support for teams construct

This change adds OMPT support for events from teams construct.

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

llvm-svn: 367746

5 years ago[ELF] Move R_*_IRELATIVE from .rel[a].plt to .rel[a].dyn unless --pack-dyn-relocs...
Fangrui Song [Sat, 3 Aug 2019 02:26:52 +0000 (02:26 +0000)]
[ELF] Move R_*_IRELATIVE from .rel[a].plt to .rel[a].dyn unless --pack-dyn-relocs=android[+relr]

An R_*_IRELATIVE represents the address of a STT_GNU_IFUNC symbol
(redirected at runtime) which is non-preemptable and is not associated
with a canonical PLT (associated with a symbol with a section index of
SHN_UNDEF but a non-zero st_value).

.rel[a].plt [DT_JMPREL, DT_JMPREL+DT_JMPRELSZ) contains relocations that
can be lazily resolved. R_*_IRELATIVE are always eagerly resolved, so
conceptually they do not belong to .rela.plt. "iplt" is mostly a misnomer.

glibc powerpc and powerpc64 do not resolve R_*_IRELATIVE if they are in .rela.plt.

    // a.o - synthesized PLT call stub has an R_*_IRELATIVE
    void ifunc(); int main() { ifunc(); }
    // b.o
    static void real() {}
    asm (".type ifunc, %gnu_indirect_function");
    void *ifunc() { return &real; }

The lld-linked executable crashes. ld.bfd places R_*_IRELATIVE in
.rela.dyn and the executable works.

glibc i386, x86_64, and aarch64 have logic
(glibc/sysdeps/*/dl-machine.h:elf_machine_lazy_rel) to eagerly resolve
R_*_IRELATIVE in .rel[a].plt so the lld-linked executable works.

Move R_*_IRELATIVE from .rel[a].plt to .rel[a].dyn to fix the crashes on
glibc powerpc/powerpc64. This also helps simplifying ifunc
implementation in FreeBSD rtld-elf powerpc64.

If --pack-dyn-relocs=android[+relr] is specified, the Android packed
dynamic relocation format is used for .rela.dyn. We cannot name
in.relaIplt ".rela.dyn" because the output section will have mixed
formats. This can be improved in the future.

Reviewed By: pcc

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

llvm-svn: 367745

5 years agoMCRegister/Register: DenseMapInfo should take `const T &`
Daniel Sanders [Sat, 3 Aug 2019 02:19:23 +0000 (02:19 +0000)]
MCRegister/Register: DenseMapInfo should take `const T &`

llvm-svn: 367744

5 years ago[clang-doc] Update documentation
Diego Astiazaran [Sat, 3 Aug 2019 02:18:06 +0000 (02:18 +0000)]
[clang-doc] Update documentation

HTML generator has been included in clang-tools-extra release notes.
clang-doc documentation file has been updated.

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

llvm-svn: 367743

5 years ago[ORC] Remove some old debugging output from a unit test.
Lang Hames [Sat, 3 Aug 2019 01:33:04 +0000 (01:33 +0000)]
[ORC] Remove some old debugging output from a unit test.

llvm-svn: 367742

5 years agoTemporarily Revert "[PowerPC][NFC][MachinePipeliner] Add some regression testcases"
Eric Christopher [Sat, 3 Aug 2019 01:12:55 +0000 (01:12 +0000)]
Temporarily Revert "[PowerPC][NFC][MachinePipeliner] Add some regression testcases"

It's breaking a number of bots, e.g.:

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/13893/steps/check-llvm%20msan/logs/stdio

This reverts commit r367732.

llvm-svn: 367741

5 years agoAdd brackets to remove warnings about ambiguous 'else's.
Bill Wendling [Sat, 3 Aug 2019 00:26:10 +0000 (00:26 +0000)]
Add brackets to remove warnings about ambiguous 'else's.

llvm-svn: 367740

5 years agoRe-commit "[GlobalISel] Add legalization support for non-power-2 loads and stores""
Amara Emerson [Fri, 2 Aug 2019 23:44:24 +0000 (23:44 +0000)]
Re-commit "[GlobalISel] Add legalization support for non-power-2 loads and stores""

This is an old commit that exposed a bug in the GISel importer, which caused
non-truncating stores to be selected for truncating store patterns. Now that's
been fixed in r367737 this can go back in.

llvm-svn: 367739

5 years ago[ScalarizeMaskedMemIntrin] Bitcast the mask to the scalar domain and use scalar bit...
Craig Topper [Fri, 2 Aug 2019 23:43:53 +0000 (23:43 +0000)]
[ScalarizeMaskedMemIntrin] Bitcast the mask to the scalar domain and use scalar bit tests for the branches for expandload/compressstore.

Same as what was done for gather/scatter/load/store in r367489.
Expandload/compressstore were delayed due to lack of constant
masking handling that has since been fixed.

llvm-svn: 367738

5 years ago[GlobalISel] Check LLT size matches memory size for non-truncating stores.
Amara Emerson [Fri, 2 Aug 2019 23:33:13 +0000 (23:33 +0000)]
[GlobalISel] Check LLT size matches memory size for non-truncating stores.

This was causing a bug where non-truncating stores would be selected instead of truncating ones.

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

llvm-svn: 367737

5 years ago[X86] Use the pointer VT for the Scale node when lowering x86 gather/scatter intrinsics.
Craig Topper [Fri, 2 Aug 2019 23:18:16 +0000 (23:18 +0000)]
[X86] Use the pointer VT for the Scale node when lowering x86 gather/scatter intrinsics.

This is consistent with the target independent intrinsic handling.

Not sure this really matters since we just pull the constant out
using getZExtValue later.

llvm-svn: 367736

5 years ago[BPF] Handling type conversions correctly for CO-RE
Yonghong Song [Fri, 2 Aug 2019 23:16:44 +0000 (23:16 +0000)]
[BPF] Handling type conversions correctly for CO-RE

With newly added debuginfo type
metadata for preserve_array_access_index() intrinsic,
this patch did the following two things:
 (1). checking validity before adding a new access index
      to the access chain.
 (2). calculating access byte offset in IR phase
      BPFAbstractMemberAccess instead of when BTF is emitted.

For (1), the metadata provided by all preserve_*_access_index()
intrinsics are used to check whether the to-be-added type
is a proper struct/union member or array element.

For (2), with all available metadata, calculating access byte
offset becomes easier in BPFAbstractMemberAccess IR phase.
This enables us to remove the unnecessary complexity in
BTFDebug.cpp.

New tests are added for
  . user explicit casting to array/structure/union
  . global variable (or its dereference) as the source of base
  . multi demensional arrays
  . array access given a base pointer
  . cases where we won't generate relocation if we cannot find
    type name.

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

llvm-svn: 367735

5 years agoRemove support for unsupported MSVC versions
JF Bastien [Fri, 2 Aug 2019 23:09:01 +0000 (23:09 +0000)]
Remove support for unsupported MSVC versions

Re-land r367727 with the #if fixed.

Reviewers: rnk, lebedev.ri

Subscribers: hiraditya, jkorous, dexonsmith, lebedev.ri, llvm-commits

Tags: #llvm

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

llvm-svn: 367734

5 years agoThe MinGW linker supports response files
Reid Kleckner [Fri, 2 Aug 2019 22:55:00 +0000 (22:55 +0000)]
The MinGW linker supports response files

This affects both LLD and ld.bfd.

This isn't testable with a normal driver test with -### because those
command lines are printed before response file setup. I tested manually
and confirmed it seems to do the right thing.

llvm-svn: 367733

5 years ago[PowerPC][NFC][MachinePipeliner] Add some regression testcases
Jinsong Ji [Fri, 2 Aug 2019 22:27:44 +0000 (22:27 +0000)]
[PowerPC][NFC][MachinePipeliner] Add some regression testcases

Exposed by refactoring in https://reviews.llvm.org/D64665.

llvm-svn: 367732

5 years agoRevert Fix and test inter-procedural register allocation for ARM
Douglas Yung [Fri, 2 Aug 2019 22:11:49 +0000 (22:11 +0000)]
Revert Fix and test inter-procedural register allocation for ARM

This reverts r367669 (git commit f6b00c279a5587a25876752a6ecd8da0bed959dc)

This was breaking a build bot http://lab.llvm.org:8011/builders/netbsd-amd64/builds/21233

llvm-svn: 367731

5 years ago[lit] Fix 42812: lit test suite can no longer be run stand-alone
Stella Stamenova [Fri, 2 Aug 2019 22:03:12 +0000 (22:03 +0000)]
[lit] Fix 42812: lit test suite can no longer be run stand-alone

Summary:
This change updates the lit.cfg file to use llvm_config when it is available, but when it is not, it directly modifies the config object. This makes it possible to run the lit tests standalone without having built llvm (as long as the correct binaries are present in the path such as FileCheck and not).

Because the lit tests don't take a hard dependency on llvm_config, some features such as system-windows have to have definitions in lit's cfg file as well. This is a potential issue as the os features sometimes change names (for example, we went from windows to system-windows, etc.). This can cause drift between lit's tests and the rest of the llvm tests.

Reviewers: probinson, mgorny

Reviewed By: mgorny

Subscribers: delcypher, llvm-commits, asmith

Tags: #llvm

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

llvm-svn: 367730