platform/upstream/llvm.git
4 years agoAdd a key method to Sema to optimize debug info size
Reid Kleckner [Fri, 15 Nov 2019 19:22:02 +0000 (11:22 -0800)]
Add a key method to Sema to optimize debug info size

It turns out that the debug info describing the Sema class is an
appreciable percentage of the total object file size of objects in Sema.
By adding a key function, clang is able to optimize the debug info size
by emitting a forward declaration in TUs that do not define the key
function.

On Windows, with clang-cl, these are the total sizes of object files in
Sema before and after this change, compiling with optimizations and
debug info:
  before: 335,012 KB
  after:  278,116 KB
  delta:  -56,896 KB
  percent: -17.0%

The effect on link time was negligible, despite having ~56MB less input.

On Linux, with clang, these are the same sizes using DWARF -g and
optimizations:
  before: 603,756 KB
  after:  515,340 KB
  delta:  -88,416 KB
  percent: -14.6%

I didn't use type units, DWARF-5, fission, or any other special flags.

Reviewed By: thakis

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

4 years ago[profile] Unbreak Fuchsia/Windows after D68351
Vedant Kumar [Tue, 19 Nov 2019 20:29:56 +0000 (12:29 -0800)]
[profile] Unbreak Fuchsia/Windows after D68351

Continuous mode is not yet supported on Fuchsia/Windows, however an
error should not be reported unless the user attempted to actually
enable continuous mode.

4 years agoThe patch is the compiler error specific on the compile error on CMVC
diggerlin [Tue, 19 Nov 2019 20:17:32 +0000 (15:17 -0500)]
The patch is the compiler error specific on the compile error on CMVC

SUMMARY:

CMVC has a compiler error on the
const uint64_t OffsetToRaw = is64Bit()
                                   ? toSection64(Sec)->FileOffsetToRawData
                                   : toSection32(Sec)->FileOffsetToRawData;

while  gcc  compiler do not have the problem.
I have to change the code to

  uint64_t OffsetToRaw;
  if (is64Bit())
    OffsetToRaw = toSection64(Sec)->FileOffsetToRawData;
  else
    OffsetToRaw = toSection32(Sec)->FileOffsetToRawData;

Reviewers: Sean Fertile
Subscribers: rupprecht, seiyai,hiraditya

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

4 years agofixe leak found by asan build bot
Tyker [Tue, 19 Nov 2019 20:05:30 +0000 (21:05 +0100)]
fixe leak found by asan build bot

4 years ago[DebugInfo] Describe size of spilled values in call site params
Vedant Kumar [Tue, 19 Nov 2019 19:58:14 +0000 (11:58 -0800)]
[DebugInfo] Describe size of spilled values in call site params

A call site parameter description of a memory operand needs to
unambiguously convey the size of the operand to prevent incorrect entry
value evaluation.

Thanks for David Stenberg for pointing this issue out!

4 years agollvm/ObjCARC: Eliminate inlined AutoreleaseRV calls
Duncan P. N. Exon Smith [Mon, 18 Nov 2019 01:58:01 +0000 (17:58 -0800)]
llvm/ObjCARC: Eliminate inlined AutoreleaseRV calls

Pair up inlined AutoreleaseRV calls with their matching RetainRV or
ClaimRV.

- RetainRV cancels out AutoreleaseRV.  Delete both instructions.
- ClaimRV is a peephole for RetainRV+Release.  Delete AutoreleaseRV and
  replace ClaimRV with Release.

This avoids problems where more aggressive inlining triggers memory
regressions.

This patch is happy to skip over non-callable instructions and non-ARC
intrinsics looking for the pair.  It is likely sound to also skip over
opaque function calls, but that's harder to reason about, and it's not
relevant to the goal here: if there's an opaque function call splitting
up a pair, it's very unlikely that a handshake would have happened
dynamically without inlining.

Note that this patch also subsumes the previous logic that looked
backwards from ReleaseRV.

https://reviews.llvm.org/D70370
rdar://problem/46509586

4 years ago[SLP] fix miscompile on min/max reductions with extra uses (PR43948) (2nd try)
Sanjay Patel [Tue, 19 Nov 2019 17:24:55 +0000 (12:24 -0500)]
[SLP] fix miscompile on min/max reductions with extra uses (PR43948) (2nd try)

The 1st attempt was reverted because it revealed an existing
bug where we could produce invalid IR (use of value before
definition). That should be fixed with:
rG39de82ecc9c2

The bug manifests as replacing a reduction operand with an undef
value.

The problem appears to be limited to cases where a min/max reduction
has extra uses of the compare operand to the select.

In the general case, we are tracking "ExternallyUsedValues" and
an "IgnoreList" of the reduction operations, but those may not apply
to the final compare+select in a min/max reduction.

For that, we use replaceAllUsesWith (RAUW) to ensure that the new
vectorized reduction values are transferred to all subsequent users.

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

4 years ago[nfc][libomptarget] Remove casts of string literals to char*
JonChesterfield [Tue, 19 Nov 2019 19:41:59 +0000 (19:41 +0000)]
[nfc][libomptarget] Remove casts of string literals to char*

4 years agoMTE: add more unchecked instructions.
Evgenii Stepanov [Fri, 15 Nov 2019 21:29:54 +0000 (13:29 -0800)]
MTE: add more unchecked instructions.

Summary:
In particular, 1- and 2-byte loads and stores ignore the pointer tag
when using SP as the base register.

Reviewers: pcc, ostannard

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years agotest-release.sh: Update to fetch source from GitHub
Tom Stellard [Tue, 19 Nov 2019 18:42:56 +0000 (10:42 -0800)]
test-release.sh: Update to fetch source from GitHub

Summary:
This also changes the test-release.sh script to build using the monorepo
layout instead of copying sub-projects into llvm/tools or llvm/projects.

Reviewers: jdoerfert, hans

Reviewed By: hans

Subscribers: hans, llvm-commits

Tags: #llvm

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

4 years ago[ADT][Expensive checks] Create a std::random_device seed only once when shuffling...
Alex Lorenz [Tue, 19 Nov 2019 19:07:55 +0000 (11:07 -0800)]
[ADT][Expensive checks] Create a std::random_device seed only once when shuffling before sorting

This speeds up the build of compiler-rt with an expensive checks enabled clang by an order of
1 or 2 magnitudes on my machine. I was hoping this would also fix the 'large.test' libFuzzer
timeout on the expensive checks bot on green dragon http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/,
but the fuzzer test still takes too long to compile because of other IR/MIR verification inefficiencies.

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

4 years agoAdd a "Using LLDB" section to the welcome page of the website
Adrian Prantl [Tue, 19 Nov 2019 16:53:15 +0000 (08:53 -0800)]
Add a "Using LLDB" section to the welcome page of the website

This is an attempt to feature the user-facing resources more
prominently on the LLDB website by calling out the tutorial and the
GDB command map wight on the start page.

I also moved the "Why a new debugger" section to the "Goals"
subpage. Given that LLDB's first release is almost a decade in the
past now, the title is a bit of an anachronism.

Lastly, I moved the Architecture sub-page from "use" to "resources",
since end-users do not care about the source code layout.

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

4 years ago[ARM] MVE interleaving load and stores.
David Green [Tue, 19 Nov 2019 18:37:21 +0000 (18:37 +0000)]
[ARM] MVE interleaving load and stores.

Now that we have the intrinsics, we can add VLD2/4 and VST2/4 lowering
for MVE. This works the same way as Neon, recognising the load/shuffles
combination and converting them into intrinsics in a pre-isel pass,
which just calls getMaxSupportedInterleaveFactor, lowerInterleavedLoad
and lowerInterleavedStore.

The main difference to Neon is that we do not have a VLD3 instruction.
Otherwise most of the code works very similarly, with just some minor
differences in the form of the intrinsics to work around. VLD3 is
disabled by making isLegalInterleavedAccessType return false for those
cases.

We may need some other future adjustments, such as VLD4 take up half the
available registers so should maybe cost more. This patch should get the
basics in though.

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

4 years ago[ARM] Add and update a lot of VLDn tests. NFC
David Green [Tue, 19 Nov 2019 18:17:46 +0000 (18:17 +0000)]
[ARM] Add and update a lot of VLDn tests. NFC

4 years agoimplement printing out raw section data of xcoff objectfile for llvm-objdump
diggerlin [Tue, 19 Nov 2019 18:29:09 +0000 (13:29 -0500)]
implement printing out raw section data of xcoff objectfile for llvm-objdump

SUMMARY:
implement printing out raw section data of xcoff objectfile for llvm-objdump
and option -D --disassemble-all option for llvm-objdump

Reviewers: Sean Fertile
Subscribers: rupprecht, seiyai,hiraditya

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

4 years ago[C-index] Fix test when using Debug target & MSVC STL
Alexandre Ganea [Tue, 19 Nov 2019 18:30:14 +0000 (13:30 -0500)]
[C-index] Fix test when using Debug target & MSVC STL

Avoids a deadlock in "clang/test/Index/crash-recovery-modules.m" when building with the MSVC STL & _ITERATOR_DEBUG_LEVEL == 2 (meaning a DEBUG build)

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

4 years ago[LLDB] Fix formatting in the driver (NFC)
Jonas Devlieghere [Tue, 19 Nov 2019 18:23:35 +0000 (10:23 -0800)]
[LLDB] Fix formatting in the driver (NFC)

4 years ago[Symbolizers] On Darwin compute function offset when possible.
Dan Liew [Tue, 29 Oct 2019 06:04:27 +0000 (23:04 -0700)]
[Symbolizers] On Darwin compute function offset when possible.

Summary:
The sanitizer symbolizers support printing the function offset
(difference between pc and function start) of a stackframe using the
`%q` format specifier.

Unfortunately this didn't actually work because neither the atos
or dladdr symbolizer set the `AddressInfo::function_offset` field.

This patch teaches both symbolizers to try to compute the function
offset. In the case of the atos symbolizer, atos might not report the
function offset (e.g. it reports a source location instead) so in this
case it fallsback to using `dladdr()` to compute the function offset.

Two test cases are included.

rdar://problem/56695185

Reviewers: kubamracek, yln

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

4 years agoclang: Add -fconvergent-functions flag
Matt Arsenault [Sun, 27 Oct 2019 00:15:10 +0000 (17:15 -0700)]
clang: Add -fconvergent-functions flag

The CUDA builtin library is apparently compiled in C++ mode, so the
assumption of convergent needs to be made in a typically non-SPMD
language. The functions in the library should still be assumed
convergent. Currently they are not, which is potentially incorrect and
this happens to work after the library is linked.

4 years ago[ELF] Disallow out-of-range section group indices after D70146
Fangrui Song [Tue, 19 Nov 2019 17:47:17 +0000 (09:47 -0800)]
[ELF] Disallow out-of-range section group indices after D70146

Exposed by invalid/sht-group-wrong-section.test
http://45.33.8.238/win/2613/step_9.txt

4 years ago[OPENMP]Rename function, NFC.
Alexey Bataev [Tue, 19 Nov 2019 17:12:23 +0000 (12:12 -0500)]
[OPENMP]Rename function, NFC.

Change the name of the CGOpenMPRuntime::emitOMPIfClause to CGOpenMPRuntime::emitIfClause.

4 years ago[nfc][libomptarget] Write amdgcn macros in terms of compiler intrinsics
JonChesterfield [Tue, 19 Nov 2019 17:23:46 +0000 (17:23 +0000)]
[nfc][libomptarget] Write amdgcn macros in terms of compiler intrinsics

4 years ago[NFC] Refactor representation of materialized temporaries
Tyker [Sun, 17 Nov 2019 10:41:55 +0000 (11:41 +0100)]
[NFC] Refactor representation of materialized temporaries

Summary:
this patch refactor representation of materialized temporaries to prevent an issue raised by rsmith in https://reviews.llvm.org/D63640#inline-612718

Reviewers: rsmith, martong, shafik

Reviewed By: rsmith

Subscribers: thakis, sammccall, ilya-biryukov, rnkovacs, arphaman, cfe-commits

Tags: #clang

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

4 years ago[libTooling] Extend `buildASTFromCodeWithArgs` to take files argument.
Yitzhak Mandelbaum [Wed, 13 Nov 2019 14:04:13 +0000 (09:04 -0500)]
[libTooling] Extend `buildASTFromCodeWithArgs` to take files argument.

Summary:
Adds an optional parameter to `buildASTFromCodeWithArgs` that allows the user to
pass additional files that the main code needs to compile. This change makes
`buildASTFromCodeWithArgs` consistent with `runToolOnCodeWithArgs`.

Patch by Alexey Eremin.

Reviewers: gribozavr

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[FileCheck] Use lit's internal shell for the test suite
Joel E. Denny [Tue, 19 Nov 2019 15:54:21 +0000 (10:54 -0500)]
[FileCheck] Use lit's internal shell for the test suite

An advantage is that there are less portability concerns when writing
tests.  For example, `-u` is not supported by all implementations of
`env`, but lit's internal shell provides its own `env` that supports
`-u`.

A disadvantage is that some shell constructs, such as parentheses, are
not supported, but FileCheck's test suite currently doesn't require
such constructs.

For comparison, lit configures its test suite in the same manner.  See
`llvm/utils/lit/tests/lit.cfg`.

Reviewed By: rnk

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

4 years ago[ELF] Improve --gc-sections compatibility with GNU ld regarding section groups
Fangrui Song [Tue, 19 Nov 2019 05:56:58 +0000 (21:56 -0800)]
[ELF] Improve --gc-sections compatibility with GNU ld regarding section groups

Based on D70020 by serge-sans-paille.

The ELF spec says:

> Furthermore, there may be internal references among these sections that would not make sense if one of the sections were removed or replaced by a duplicate from another object. Therefore, such groups must be included or omitted from the linked object as a unit. A section cannot be a member of more than one group.

GNU ld has 2 behaviors that we don't have:

- Group members (nextInSectionGroup != nullptr) are subject to garbage collection.
  This includes non-SHF_ALLOC SHT_NOTE sections.
  In particular, discarding non-SHF_ALLOC SHT_NOTE sections is an expected behavior by the Annobin
  project. See
  https://developers.redhat.com/blog/2018/02/20/annobin-storing-information-binaries/
  for more information.
- Groups members are retained or discarded as a unit.
  Members may have internal references that are not expressed as
  SHF_LINK_ORDER, relocations, etc. It seems that we should be more conservative here:
  if a section is marked live, mark all the other member within the
  group.

Both behaviors are reasonable. This patch implements them.

A new field InputSectionBase::nextInSectionGroup tracks the next member
within a group. on ELF64, this increases sizeof(InputSectionBase) froms
144 to 152.

InputSectionBase::dependentSections tracks section dependencies, which
is used by both --gc-sections and /DISCARD/. We can't overload it for
the "next member" semantic, because we should allow /DISCARD/ to discard
sections independent of --gc-sections (GNU ld behavior). This behavior
may be reasonably used by `/DISCARD/ : { *(.ARM.exidx*) }` or `/DISCARD/
: { *(.note*) }` (new test `linkerscript/discard-group.s`).

Reviewed By: ruiu

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

4 years agoFix openmp on PowerPC64-BE-ELFv2 ABI on FreeBSD.
AndreyChurbanov [Tue, 19 Nov 2019 16:45:06 +0000 (19:45 +0300)]
Fix openmp on PowerPC64-BE-ELFv2 ABI on FreeBSD.

Patch by adalava (Alfredo Dal'Ava J.nior)

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

4 years ago[NFC] Attempting to fix sphinx build failure with badly encoded characters from incom...
Mitchell Balan [Tue, 19 Nov 2019 16:39:13 +0000 (11:39 -0500)]
[NFC] Attempting to fix sphinx build failure with badly encoded characters from incoming patch.

4 years agogn build: Merge 7fe9435dc88
LLVM GN Syncbot [Tue, 19 Nov 2019 16:34:22 +0000 (16:34 +0000)]
gn build: Merge 7fe9435dc88

4 years agoWork on cleaning up denormal mode handling
Matt Arsenault [Tue, 29 Oct 2019 23:16:05 +0000 (16:16 -0700)]
Work on cleaning up denormal mode handling

Cleanup handling of the denormal-fp-math attribute. Consolidate places
checking the allowed names in one place.

This is in preparation for introducing FP type specific variants of
the denormal-fp-mode attribute. AMDGPU will switch to using this in
place of the current hacky use of subtarget features for the denormal
mode.

Introduce a new header for dealing with FP modes. The constrained
intrinsic classes define related enums that should also be moved into
this header for uses in other contexts.

The verifier could use a check to make sure the denorm-fp-mode
attribute is sane, but there currently isn't one.

Currently, DAGCombiner incorrectly asssumes non-IEEE behavior by
default in the one current user. Clang must be taught to start
emitting this attribute by default to avoid regressions when this is
switched to assume ieee behavior if the attribute isn't present.

4 years ago[cmake] Disable GCC 9's -Winit-list-lifetime warning in ArrayRef
Pavel Labath [Tue, 12 Nov 2019 14:19:21 +0000 (15:19 +0100)]
[cmake] Disable GCC 9's -Winit-list-lifetime warning in ArrayRef

Summary:
This is a new warning which fires when one stores a reference to the
initializer_list contents in a way which may outlive the
initializer_list which it came from. In llvm this warning is triggered
whenever someone uses the initializer_list ArrayRef constructor.

This is indeed a dangerous thing to do (I myself was bitten by that at
least once), but it is not more dangerous than calling other ArrayRef
constructors with temporary objects -- something which we are used to
and have accepted as a tradeoff for ArrayRef's efficiency.

Currently, this warnings generates so much output that it completely
obscures any actionable warnings, so this patch disables it.

Reviewers: rnk, aaron.ballman

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

4 years ago[clang][NFC] Make various uses of Regex const
Thomas Preud'homme [Tue, 19 Nov 2019 11:18:51 +0000 (11:18 +0000)]
[clang][NFC] Make various uses of Regex const

The const-correctness of match() was fixed in rL372764, which allows
uses of Regex objects to be const in cases they couldn't be before. This
patch tightens up the const-ness of Regex in various such cases.

Reviewers: thopre

Reviewed By: thopre

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[NFC] Attempting to fix sphinx build failure with badly encoded characters from incom...
Mitchell Balan [Tue, 19 Nov 2019 16:13:27 +0000 (11:13 -0500)]
[NFC] Attempting to fix sphinx build failure with badly encoded characters from incoming patch.

4 years ago[AIX][XCOFF] Write Function descriptors and TOC base to data section
jasonliu [Tue, 19 Nov 2019 15:09:07 +0000 (15:09 +0000)]
[AIX][XCOFF] Write Function descriptors and TOC base to data section

This patch implements writing function descriptors and TOC base into
data section, and also add function descriptors(both csect and label)
and TOC base symbols to the symbol table.

4 years ago[clang-tidy] Give readability-redundant-member-init an option IgnoreBaseInCopyConstru...
Mitchell Balan [Tue, 19 Nov 2019 15:57:16 +0000 (10:57 -0500)]
[clang-tidy] Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

Summary:
readability-redundant-member-init removes redundant / unnecessary member and base class initialization. Unfortunately for the specific case of a copy constructor's initialization of a base class, gcc at strict warning levels warns if "base class is not initialized in the copy constructor of a derived class".

This patch adds an option `IgnoreBaseInCopyConstructors` defaulting to 0 (thus maintaining current behavior by default) to skip the specific case of removal of redundant base class initialization in the copy constructor. Enabling this option enables the resulting code to continue to compile successfully under `gcc -Werror=extra`. New test cases `WithCopyConstructor1` and `WithCopyConstructor2` in clang-tools-extra/test/clang-tidy/readability-redundant-member-init.cpp show that it removes redundant members even from copy constructors.

Reviewers: malcolm.parsons, alexfh, hokein, aaron.ballman, lebedev.ri

Patch by: poelmanc

Subscribers: mgehre, lebedev.ri, cfe-commits

Tags: #clang, #clang-tools-extra

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

4 years ago[SLP] fix insertion point for min/max reduction
Sanjay Patel [Tue, 19 Nov 2019 15:47:07 +0000 (10:47 -0500)]
[SLP] fix insertion point for min/max reduction

As discussed in D70148 (and caused a revert of the original commit):
if we insert at the select, then we can produce invalid IR because
the replacement for the compare may have uses before the select.

4 years agogn build: Merge 765b1250f68
LLVM GN Syncbot [Tue, 19 Nov 2019 15:33:25 +0000 (15:33 +0000)]
gn build: Merge 765b1250f68

4 years agoFixup AVR tests to reflect changes in addend format in llvm-objdump
David Bozier [Tue, 19 Nov 2019 13:56:29 +0000 (13:56 +0000)]
Fixup AVR tests to reflect changes in addend format in llvm-objdump

Summary: Changes to llvm-objdump made in D69997

Reviewers: thakis, jhenderson, grimar

Reviewed By: thakis

Subscribers: dylanmckay, Jim, llvm-commits

Tags: #llvm

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

4 years ago[SLP] add test for reduction miscompile; NFC
Sanjay Patel [Tue, 19 Nov 2019 15:24:32 +0000 (10:24 -0500)]
[SLP] add test for reduction miscompile; NFC

See D70148 for discussion.

4 years ago[lldb] Add logging to IRExecutionUnit::GetStaticInitializers
Raphael Isemann [Tue, 19 Nov 2019 14:21:15 +0000 (15:21 +0100)]
[lldb] Add logging to IRExecutionUnit::GetStaticInitializers

4 years ago[ARM,MVE] Add intrinsics for scalar shifts.
Simon Tatham [Tue, 19 Nov 2019 14:47:07 +0000 (14:47 +0000)]
[ARM,MVE] Add intrinsics for scalar shifts.

This fills in the small family of MVE intrinsics that have nothing to
do with vectors: they implement bit-shift operations on 32- or 64-bit
values held in one or two general-purpose registers. Most of these
shift operations saturate if shifting left, and round to nearest if
shifting right, although LSLL and ASRL behave like ordinary shifts.

When these instructions take a variable shift count in a register,
they pay attention to its sign, so that (for example) LSLL or UQRSHLL
will shift left if given a positive number but right if given a
negative one. That makes even LSLL and ASRL different enough from
standard LLVM IR shift semantics that I couldn't see any better
alternative than to simply model the whole family as a set of
MVE-specific IR intrinsics.

(The //immediate// forms of LSLL and ASRL, on the other hand, do
behave exactly like a standard IR shift of a 64-bit value. In fact,
those forms don't have ACLE intrinsics defined at all, because you can
just write an ordinary C shift operation if you want one of those.)

The 64-bit shifts have to be instruction-selected in C++, because they
deliver two output values. But the 32-bit ones are simple enough that
I could write a DAG isel pattern directly into each Instruction
record.

Reviewers: ostannard, MarkMurrayARM, dmgreen

Reviewed By: dmgreen

Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

4 years ago[clangd] Show values of more expressions on hover
Sam McCall [Sat, 16 Nov 2019 21:15:05 +0000 (22:15 +0100)]
[clangd] Show values of more expressions on hover

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

4 years agoAMDGPU: Refactor treatment of denormal mode
Matt Arsenault [Fri, 1 Nov 2019 01:50:30 +0000 (18:50 -0700)]
AMDGPU: Refactor treatment of denormal mode

Start moving towards treating this as a property of the calling
convention, and not the subtarget. The default denormal mode should
not be part of the subtarget, and be moved into a separate function
attribute.

This patch is still NFC. The denormal mode remains as a subtarget
feature for now, but make the necessary changes to switch to using an
attribute.

4 years agoAMDGPU: Be explicit about denormal mode in MIR tests
Matt Arsenault [Fri, 1 Nov 2019 16:44:56 +0000 (09:44 -0700)]
AMDGPU: Be explicit about denormal mode in MIR tests

Start checking the machine function in GlobalISel instead of the
target directly.

This temporarily breaks fcanonicalize selection in GlobalISel.

4 years ago[clang-tidy] DefaultOperatorNewCheck test fixes.
Balázs Kéri [Tue, 19 Nov 2019 14:22:38 +0000 (15:22 +0100)]
[clang-tidy] DefaultOperatorNewCheck test fixes.

4 years ago[clangd] Untangle Hover from XRefs, move into own file.
Sam McCall [Sat, 16 Nov 2019 16:00:19 +0000 (17:00 +0100)]
[clangd] Untangle Hover from XRefs, move into own file.

Summary:
This is mostly mechanical, with a few exceptions:
 - getDeducedType moved into AST.h where it belongs. It now takes
   ASTContext instead of ParsedAST, and avoids using the preprocessor.
 - hover now uses SelectionTree directly rather than via
   getDeclAtPosition helper
 - hover on 'auto' used to find the decl that contained the 'auto' and
   use that to set Kind and documentation for the hover result.
   Now we use targetDecl() to find the decl matching the deduced type instead.
   This changes tests, e.g. 'variable' -> class for auto on lambdas.
   I think this is better, but the motivation was to avoid depending on
   the internals of DeducedTypeVisitor. This functionality is removed
   from the visitor.

Reviewers: kadircet

Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

4 years ago[lldb][NFC] Early exit in IRExecutionUnit::GetStaticInitializers
Raphael Isemann [Tue, 19 Nov 2019 13:47:37 +0000 (14:47 +0100)]
[lldb][NFC] Early exit in IRExecutionUnit::GetStaticInitializers

4 years agoDAG: Add function context to isFMAFasterThanFMulAndFAdd
Matt Arsenault [Tue, 29 Oct 2019 00:38:44 +0000 (17:38 -0700)]
DAG: Add function context to isFMAFasterThanFMulAndFAdd

AMDGPU needs to know the FP mode for the function to answer this
correctly when this is removed from the subtarget.

AArch64 had to make this more complicated by using this from an IR
hook, so add an IR typed overload.

4 years agoFix modules build by adding missing includes
Raphael Isemann [Tue, 19 Nov 2019 13:23:51 +0000 (14:23 +0100)]
Fix modules build by adding missing includes

4 years ago[AMDGPU] Tune inlining parameters for AMDGPU target (part 2)
dfukalov [Mon, 18 Nov 2019 13:42:34 +0000 (16:42 +0300)]
[AMDGPU] Tune inlining parameters for AMDGPU target (part 2)

Summary:
Most of IR instructions got better code size estimations after commit 47a5c36b.
So default parameters values should be updated to improve inlining and
unrolling for the target.

Reviewers: rampitec, arsenm

Reviewed By: rampitec

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, zzheng, llvm-commits

Tags: #llvm

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

4 years ago[NFC][X86] Fixup comment in CodeGen/X86/cmov.ll
Roman Lebedev [Tue, 19 Nov 2019 13:23:34 +0000 (16:23 +0300)]
[NFC][X86] Fixup comment in CodeGen/X86/cmov.ll

As noted in post-commit review for
https://reviews.llvm.org/D59035#inline-631659

4 years ago[ARM] Regenerate vector lane store tests
Simon Pilgrim [Tue, 19 Nov 2019 13:18:31 +0000 (13:18 +0000)]
[ARM] Regenerate vector lane store tests

4 years ago[PowerPC] Regenerate vsx_insert_extract_le.ll tests
Simon Pilgrim [Tue, 19 Nov 2019 13:17:21 +0000 (13:17 +0000)]
[PowerPC] Regenerate vsx_insert_extract_le.ll tests

4 years agoRevert "[RISCV] Support mutilib in baremetal environment"
Nico Weber [Tue, 19 Nov 2019 13:16:55 +0000 (08:16 -0500)]
Revert "[RISCV] Support mutilib in baremetal environment"

This reverts commit b6d7bbfa004310777cd41448ffc377aea082fc8c.
Driver/riscv64-toolchain.c fails on Windows.

4 years ago[ThinLTO] Simplify code. NFC
evgeny [Tue, 19 Nov 2019 12:51:25 +0000 (15:51 +0300)]
[ThinLTO] Simplify code. NFC

4 years ago[lldb] Also test Get[De]mangledName of SBType in TestSBTypeClassMembers.py
Raphael Isemann [Tue, 19 Nov 2019 12:45:37 +0000 (13:45 +0100)]
[lldb] Also test Get[De]mangledName of SBType in TestSBTypeClassMembers.py

I just used the mangled names as this test is anyway a Darwin-only ObjC++ test.
We probably should also test this on other platforms but that will be
another commit as we need to untangle the ObjC and C++ parts first.

4 years ago[clang-tidy] modernize-use-override new option AllowOverrideAndFinal
Mitchell Balan [Tue, 19 Nov 2019 12:46:48 +0000 (07:46 -0500)]
[clang-tidy] modernize-use-override new option AllowOverrideAndFinal

Summary:
In addition to adding `override` wherever possible, clang-tidy's `modernize-use-override` nicely removes `virtual` when `override` or `final` is specified, and further removes override when final is specified. While this is great default behavior, when code needs to be compiled with gcc at high warning levels that include `gcc -Wsuggest-override` or `gcc -Werror=suggest-override`, clang-tidy's removal of the redundant `override` keyword causes gcc to emit a warning or error. This discrepancy / conflict has been noted by others including a comment on Stack Overflow and by Mozilla's Firefox developers.

This patch adds an AllowOverrideAndFinal option defaulting to 0 - thus preserving current behavior - that when enabled allows both `override` and `final` to co-exist, while still fixing all other issues.

The patch includes a test file verifying all combinations of virtual/override/final, and mentions the new option in the release notes.

Reviewers: alexfh, djasper, JonasToth

Patch by: poelmanc

Subscribers: JonasToth, cfe-commits

Tags: #clang

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

4 years ago[clang-tidy] Fix readability-redundant-string-init for c++17/c++2a
Mitchell Balan [Tue, 19 Nov 2019 12:45:53 +0000 (07:45 -0500)]
[clang-tidy] Fix readability-redundant-string-init for c++17/c++2a

Summary:
`readability-redundant-string-init` was one of several clang-tidy checks documented as failing for C++17. (The failure mode in C++17 is that it changes `std::string Name = ""`; to `std::string Name = Name;`, which actually compiles but crashes at run-time.)

Analyzing the AST with `clang -Xclang -ast-dump` showed that the outer `CXXConstructExprs` that previously held the correct SourceRange were being elided in C++17/2a, but the containing `VarDecl` expressions still had all the relevant information. So this patch changes the fix to get its source ranges from `VarDecl`.

It adds one test `std::string g = "u", h = "", i = "uuu", j = "", k;` to confirm proper warnings and fixit replacements in a single `DeclStmt` where some strings require replacement and others don't. The readability-redundant-string-init.cpp and readability-redundant-string-init-msvc.cpp tests now pass for C++11/14/17/2a.

Reviewers: gribozavr, etienneb, alexfh, hokein, aaron.ballman, gribozavr2

Patch by: poelmanc

Subscribers: NoQ, MyDeveloperDay, Eugene.Zelenko, dylanmckay, cfe-commits

Tags: #clang, #clang-tools-extra

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

4 years agoRevert "[clang-tidy] modernize-use-override new option AllowOverrideAndFinal"
Mitchell Balan [Tue, 19 Nov 2019 12:43:12 +0000 (07:43 -0500)]
Revert "[clang-tidy] modernize-use-override new option AllowOverrideAndFinal"

This reverts commit 50e99563fb0459f5160572eef3c4e6062b8ad3f2.

4 years agoRevert "[clang-tidy] Fix readability-redundant-string-init for c++17/c++2a"
Mitchell Balan [Tue, 19 Nov 2019 12:38:01 +0000 (07:38 -0500)]
Revert "[clang-tidy] Fix readability-redundant-string-init for c++17/c++2a"

This reverts commit 06f3dabe4a2e85a32ade27c0769b6084c828a206.

4 years ago[llvm-objdump] Print relocation addends in hexadecimal
David Bozier [Tue, 19 Nov 2019 11:58:50 +0000 (11:58 +0000)]
[llvm-objdump] Print relocation addends in hexadecimal

Summary: Matches GNU objdump. Makes debugging easier for me as I'm working out addresses from symbol+addend, so it would be good to be calculating in a single format.

Reviewers: MaskRay, grimar, jhenderson, bd1976llvm

Reviewed By: jhenderson

Subscribers: sdardis, jrtc27, atanasyan, rupprecht, seiya, llvm-commits

Tags: #llvm

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

4 years ago[X86][SSE] Remove XFormVExtractWithShuffleIntoLoad to prevent legalization infinite...
Simon Pilgrim [Tue, 19 Nov 2019 11:55:14 +0000 (11:55 +0000)]
[X86][SSE] Remove XFormVExtractWithShuffleIntoLoad to prevent legalization infinite loops (PR43971)

As detailed in PR43971/D70267, the use of XFormVExtractWithShuffleIntoLoad causes issues where we end up in infinite loops of extract(targetshuffle(vecload)) -> extract(shuffle(vecload)) -> extract(vecload) -> extract(targetshuffle(vecload)), there are just too many legalization checks at every stage that we can't guarantee that extract(shuffle(vecload)) -> scalarload can occur.

At the moment we see a number of minor regressions as we don't fold extract(shuffle(vecload)) -> scalarload before legal ops, these can be addressed in future patches and extension of X86ISelLowering's combineExtractWithShuffle.

4 years ago[lldb] Remove ClangExpressionDeclMap::ResolveUnknownTypes
Raphael Isemann [Tue, 19 Nov 2019 10:49:55 +0000 (11:49 +0100)]
[lldb] Remove ClangExpressionDeclMap::ResolveUnknownTypes

Summary:
This is some really shady code. It's supposed to kick in after an expression already failed and then try to look
up "unknown types" that for some undocumented reason can't be resolved during/before parsing. Beside the
fact that we never mark any type as `EVUnknownType` in either swift-lldb or lldb (which means this code is unreachable),
this code doesn't even make the expression evaluation succeed if if would ever be executed but instead seems
to try to load more debug info that maybe any following expression evaluations might succeed.

This patch removes ClangExpressionDeclMap::ResolveUnknownTypes and the related data structures/checks/calls.

Reviewers: davide

Reviewed By: davide

Subscribers: aprantl, abidh, JDevlieghere, lldb-commits

Tags: #lldb

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

4 years agoFix PR44001: assert failure in getFunctionLocalOffsetAfterInsn
Thomas Preud'homme [Thu, 14 Nov 2019 14:42:01 +0000 (14:42 +0000)]
Fix PR44001: assert failure in getFunctionLocalOffsetAfterInsn

Summary:
Assert in getFunctionLocalOffsetAfterInsn() fails when processing a call
MachineInstr inside a bundle and compiling with debug info. This is
because labels are added by DwarfDebug::beginInstruction() which is
called for each top-level MI by EmitFunctionBody()'s for-loop iteration
but constructCallSiteEntryDIEs() which calls
getFunctionLocalOffsetAfterInsn() iterates over all MIs.

This commit modifies constructCallSiteEntryDIEs() to get the associated
bundle MI for call MIs inside a bundle and use that to when calling
getFunctionLocalOffsetAfterInsn() and getLabelAfterInsn(). It also skips
loop iterations for bundle MIs since the loop statements are concerned
with debug info for each physical instructions and bundles represent a
group of instructions. It also fix the comment about PCAddr since the
code is getting the return address and not the call address.

Reviewers: dstenb, vsk, aprantl, djtodoro, dblaikie, NikolaPrica

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[mips] Joint MipsMemSimmXXXAsmOperand into the single template class. NFC
Simon Atanasyan [Sat, 16 Nov 2019 07:23:37 +0000 (10:23 +0300)]
[mips] Joint MipsMemSimmXXXAsmOperand into the single template class. NFC

4 years agogn build: Merge e8a4c74f115
LLVM GN Syncbot [Tue, 19 Nov 2019 10:34:24 +0000 (10:34 +0000)]
gn build: Merge e8a4c74f115

4 years ago[clang-tidy] Added DefaultOperatorNewCheck.
Balázs Kéri [Mon, 18 Nov 2019 15:02:36 +0000 (16:02 +0100)]
[clang-tidy] Added DefaultOperatorNewCheck.

Summary:
Added new checker 'cert-default-operator-new' that checks for
CERT rule MEM57-CPP. Simple version.

Reviewers: aaron.ballman, alexfh, JonasToth, lebedev.ri

Reviewed By: aaron.ballman

Subscribers: hiraditya, martong, mehdi_amini, mgorny, inglorion, xazax.hun, dkrupp, steven_wu, dexonsmith, Szelethus, gamesh411, cfe-commits

Tags: #clang

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

4 years ago[DependenceAnalysis] Dependecies for loads marked with "ivnariant.load" should not...
Evgeniy Brevnov [Tue, 19 Nov 2019 10:26:24 +0000 (17:26 +0700)]
[DependenceAnalysis] Dependecies for loads marked with "ivnariant.load" should not be shared with general accesses. Fix for https://bugs.llvm.org/show_bug.cgi?id=42151

Summary:
Dependence anlysis has a mechanism to cache results. Thus for particular memory access the cache keep track of side effects in basic blocks. The problem is that for invariant loads dependepce analysis legally ignores many dependencies due to a special semantic rules for such loads. But later results calculated for invariant load retrived from the cache for general case acceses. As a result we have wrong dependence information causing GVN to do illegal transformation. Fixes, T42151.

Proposed solution is to disable caching of invariant loads. I think such loads a pretty rare and it doesn't make sense to extend caching mechanism for them.

Reviewers: reames, chandlerc, skatkov, morisset, jdoerfert

Reviewed By: reames

Subscribers: hiraditya, test, jdoerfert, lebedev.ri, llvm-commits

Tags: #llvm

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

4 years ago[RISCV] Support mutilib in baremetal environment
Zakk Chen [Tue, 19 Nov 2019 06:15:50 +0000 (22:15 -0800)]
[RISCV] Support mutilib in baremetal environment

Currently only support the set of multilibs same to riscv-gnu-toolchain.

Reviewers: espindola, asb, kito-cheng, lenary

Reviewed By: lenary

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

4 years ago[ThinLTO] Make ValueInfo::operator bool() explicit
evgeny [Tue, 19 Nov 2019 09:46:09 +0000 (12:46 +0300)]
[ThinLTO] Make ValueInfo::operator bool() explicit

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

4 years ago[libunwind] Adjust the signal_frame test for Arm
Mikhail Maltsev [Tue, 19 Nov 2019 09:57:04 +0000 (09:57 +0000)]
[libunwind] Adjust the signal_frame test for Arm

Summary:
This patch adjusts the signal_frame.pass.cpp to pass on Arm targets:
* When Arm EHABI is used the unwinder does not use DWARF, hence the
  DWARF-specific check unw_is_signal_frame() must be disabled.
* Certain C libraries don't include EH tables, so the unwinder must
  not try to step out of main(). The patch moves the test code out of
  main() into a separate function to avoid this.

Reviewers: saugustine, ostannard, phosek, jfb, mclow.lists

Reviewed By: saugustine

Subscribers: dexonsmith, aprantl, kristof.beyls, christof, libcxx-commits, pbarrio, labrinea

Tags: #libc

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

4 years agogn build: Merge c0fc29c4684
LLVM GN Syncbot [Tue, 19 Nov 2019 09:55:01 +0000 (09:55 +0000)]
gn build: Merge c0fc29c4684

4 years agogn build: Merge 39285a0f02c
LLVM GN Syncbot [Tue, 19 Nov 2019 09:55:01 +0000 (09:55 +0000)]
gn build: Merge 39285a0f02c

4 years ago[kate] Add various missing keywords
Sven van Haastregt [Tue, 19 Nov 2019 09:54:07 +0000 (09:54 +0000)]
[kate] Add various missing keywords

Patch by Pedro Olsen Ferreira.

4 years ago[clangd] Fix hover 'local scope' to include class template params
Sam McCall [Fri, 15 Nov 2019 18:49:36 +0000 (19:49 +0100)]
[clangd] Fix hover 'local scope' to include class template params

Summary: Fixes the last part of https://github.com/clangd/clangd/issues/76

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

4 years agoMark PR44037 tests as XFAIL on AArch64 Linux dwo
Diana Picus [Mon, 18 Nov 2019 09:39:33 +0000 (10:39 +0100)]
Mark PR44037 tests as XFAIL on AArch64 Linux dwo

These tests are failing with various assertion failures, but they all
throw the following error message first:

error: a.out 0x0000002d: adding range [0x14-0x24) which has a base that
is less than the function's low PC 0x40060c.

See llvm.org/pr44037.

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

4 years ago[clangd] More sensible output for constructors/destructors in hover.
Sam McCall [Mon, 18 Nov 2019 20:29:17 +0000 (21:29 +0100)]
[clangd] More sensible output for constructors/destructors in hover.

Summary:
Previously: both had type void() and return type void.
Now: neither have a type. Constructors return T, destructors return void.

Reviewers: hokein

Subscribers: merge_guards_bot, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

4 years ago[clangd] Fix ps4 buildbot failure.
Haojian Wu [Tue, 19 Nov 2019 09:39:19 +0000 (10:39 +0100)]
[clangd] Fix ps4 buildbot failure.

dynamic_cast on ps4 buildbot seems relying on rtti flag which is off by
default. Remove the dynamic_cast in the tests.

4 years agoRevert "gn build: (manually) try to merge 1689ad27af"
Nico Weber [Tue, 19 Nov 2019 09:39:26 +0000 (04:39 -0500)]
Revert "gn build: (manually) try to merge 1689ad27af"

This reverts commit e4ec2ecf6d4768d681a89263c0a4d29a7b7761ad.
1689ad27af was reverted as well.

4 years agoAdd streaming/equality operators to DWARFAddressRange/DWARFLocationExpression
Pavel Labath [Tue, 19 Nov 2019 08:55:17 +0000 (09:55 +0100)]
Add streaming/equality operators to DWARFAddressRange/DWARFLocationExpression

The main motivation for this is being able to write simpler assertions
and get better error messages in unit tests.

Split off from D70394.

4 years agoAdd operator<< for object::SectionedAddress
Pavel Labath [Tue, 19 Nov 2019 08:54:24 +0000 (09:54 +0100)]
Add operator<< for object::SectionedAddress

The main motivation for this is better failure messages in unit tests.

Split off from D70394.

4 years agoReland "[clangd] Implement rename by using SelectionTree and findExplicitReferences."
Haojian Wu [Tue, 19 Nov 2019 09:10:43 +0000 (10:10 +0100)]
Reland "[clangd] Implement rename by using SelectionTree and findExplicitReferences."

this reland the commit 4f80fc2491cc35730a9a84b86975278b7daa8522 which
has been reverted at f805c60a093325c16ce4200d2615ef48555d9cb8.

Fixed windows buildbot failure (by adding -fno-delayed-template-parsing flag).

4 years ago[APInt] add wrap support for `setBits` and `getBitsSet`
czhengsz [Tue, 19 Nov 2019 08:46:55 +0000 (03:46 -0500)]
[APInt] add wrap support for `setBits` and `getBitsSet`

Add two new interfaces getBitsSet and getBitsSetWithWrap

Reviewed by: lebedev.ri, craig.topper

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

4 years ago[ARM][MVE] Enable narrow vectors for tail pred
Sam Parker [Tue, 19 Nov 2019 08:41:37 +0000 (08:41 +0000)]
[ARM][MVE] Enable narrow vectors for tail pred

Remove the restriction, from the mve tail predication pass, that the
all masked vectors instructions need to be 128-bits. This allows us
to supported extending loads and truncating stores.

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

4 years ago[clang-format] [NFC] add recent changes to release notes
mydeveloperday [Tue, 19 Nov 2019 08:34:23 +0000 (08:34 +0000)]
[clang-format] [NFC] add recent changes to release notes

Summary: clang-tidy keeps nice release notes of what is added, have clang-format do the same.

Reviewers: klimek, mitchell-stellar, sylvestre.ledru, sammccall

Reviewed By: mitchell-stellar

Subscribers: merge_guards_bot, Eugene.Zelenko, cfe-commits

Tags: #clang-format, #clang

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

4 years ago[NFC] Test commit. Please ignore.
Evgeniy Brevnov [Tue, 19 Nov 2019 08:06:34 +0000 (15:06 +0700)]
[NFC] Test commit. Please ignore.

As a test commit I fixed a misspelling in one of comments in SLP
vectorizer.

4 years agoRevert 1689ad27af5 "[builtins] Implement rounding mode support for i386/x86_64"
Hans Wennborg [Tue, 19 Nov 2019 08:37:31 +0000 (09:37 +0100)]
Revert 1689ad27af5 "[builtins] Implement rounding mode support for i386/x86_64"

It broke the build with MSVC:

fp_mode.c(20): error C2065: '__asm__': undeclared identifier

> Differential Revision: https://reviews.llvm.org/D69870

4 years ago[ARM][MVE] Tail predication conversion
Sam Parker [Mon, 18 Nov 2019 17:07:56 +0000 (17:07 +0000)]
[ARM][MVE] Tail predication conversion

This patch modifies ARMLowOverheadLoops to convert a predicated
vector low-overhead loop into a tail-predicatd one. This is currently
a very basic conversion, with the following restrictions:
- Operates only on single block loops.
- The loop can only contain a single vctp instruction.
- No other instructions can write to the vpr.
- We only allow a subset of the mve instructions in the loop.

TODO: Pass the number of elements, not the number of iterations to
dlstp/wlstp.

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

4 years ago[X86] Add more addcarry tests
Paweł Bylica [Mon, 18 Nov 2019 10:59:48 +0000 (11:59 +0100)]
[X86] Add more addcarry tests

Summary: More addcarry tests for incoming https://reviews.llvm.org/D70079.

Reviewers: davezarzycki, RKSimon, spatel, craig.topper

Reviewed By: spatel

Subscribers: craig.topper, llvm-commits

Tags: #llvm

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

4 years ago[lldb-server] Use LLDB_LOG_ERROR to consume Error<> even if logging is disabled
Martin Storsjö [Mon, 18 Nov 2019 10:31:33 +0000 (12:31 +0200)]
[lldb-server] Use LLDB_LOG_ERROR to consume Error<> even if logging is disabled

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

4 years agoRevert "[clang][IFS] Driver pipeline: generate interface stubs after standard pipeline."
Puyan Lotfi [Tue, 19 Nov 2019 07:08:22 +0000 (02:08 -0500)]
Revert "[clang][IFS] Driver pipeline: generate interface stubs after standard pipeline."

This reverts commit 58ea00b51fe9b011301484957556872fced7dd08.

Test for .o + .ifs sidecar files is brittle and failing on bots.
Reverting to unblock.

4 years ago[clang][IFS] Driver pipeline: generate interface stubs after standard pipeline.
Puyan Lotfi [Sat, 16 Nov 2019 16:41:01 +0000 (11:41 -0500)]
[clang][IFS] Driver pipeline: generate interface stubs after standard pipeline.

Up until now, clang interface stubs has replaced the standard
PP -> C -> BE -> ASM -> LNK pipeline. With this change, it will happen in
conjunction with it. So what when you build your code you will get an
a.out or lib.so as well as an interface stub file.

Example:

clang -shared -o libfoo.so -emit-interface-stubs ...

will generate both a libfoo.so and a libfoo.ifso. The .so file will
contain the code from the standard compilation pipeline and the .ifso
file will contain the ELF stub library.

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

4 years agoAMDGPU: Split test functions to avoid dependency on subtarget
Matt Arsenault [Mon, 18 Nov 2019 06:54:31 +0000 (12:24 +0530)]
AMDGPU: Split test functions to avoid dependency on subtarget

Prepare this test for moving tthe denormal setting out of the
subtarget features.

4 years agobugpoint: Add option to disable attribute removal
Matt Arsenault [Fri, 17 May 2019 20:42:52 +0000 (16:42 -0400)]
bugpoint: Add option to disable attribute removal

This takes a long time and never reduces anything useful for me
(e.g. I've been waiting for 3 hours on a testcase and it hasn't found
any attributes to remove yet). This should probably start by assuming
no attributes matter, and adding back.

4 years ago[SelectionDAG] Merge the two identical ExpandChainLibCall methods from LegalizeTypes...
Craig Topper [Tue, 19 Nov 2019 03:13:06 +0000 (19:13 -0800)]
[SelectionDAG] Merge the two identical ExpandChainLibCall methods from LegalizeTypes and LegalizeDAG to one version in TaretLowering.

Reviewers: RKSimon, efriedma, spatel

Reviewed By: efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years agoRevert "implement printing out raw section data of xcoff objectfile for llvm-objdump"
Leonard Chan [Tue, 19 Nov 2019 04:05:57 +0000 (20:05 -0800)]
Revert "implement printing out raw section data of xcoff objectfile for llvm-objdump"

This reverts commit 8f8a9f3437d4517f674395da30edb59d5514f7bc.

Reverting since this patch seems to break a lot of llvm buildbots.

4 years agoRevert "Fix shared lib build."
Rui Ueyama [Tue, 19 Nov 2019 03:05:16 +0000 (12:05 +0900)]
Revert "Fix shared lib build."

This reverts commit 17e37ba57a696198c9744eeba4f8f293f155587a
because it introduced a circular dependency between Core and Common.
Because d0371f473675ede1d79a615ec4fdf0cf5368944c fixed a build issue,
we no longer need that dependency.

4 years agoFix component build
Rui Ueyama [Tue, 19 Nov 2019 02:16:59 +0000 (11:16 +0900)]
Fix component build

b11386f9be9b2dc7276a758d64f66833da10bdea broke lld build
if `-DBUILD_SHARED_LIBS=ON` is passed to CMake.

4 years agoRevert "[Bindings][Go] Fix go.test failure due to missing argument"
Kai Luo [Tue, 19 Nov 2019 01:57:23 +0000 (09:57 +0800)]
Revert "[Bindings][Go] Fix go.test failure due to missing argument"

This reverts commit 88235812a71d99c082e7aa2ef9356d43d1f83a80 due to
d27a16eb392f39f9ee04ff5194b1eff3e189e6f8.

4 years ago[Bindings][Go] Fix go.test failure due to missing argument
Kai Luo [Sun, 17 Nov 2019 01:58:42 +0000 (09:58 +0800)]
[Bindings][Go] Fix go.test failure due to missing argument
go.test failed with error
```
/tmp/gopath431502532/src/llvm.org/llvm/bindings/go/llvm/dibuilder.go:514:40: not enough arguments in call to _Cfunc_LLVMDIBuilderCreateTypedef
        have (_Ctype_LLVMDIBuilderRef, _Ctype_LLVMMetadataRef, *_Ctype_char, _Ctype_ulong, _Ctype_LLVMMetadataRef, _Ctype_uint, _Ctype_LLVMMetadataRef)
        want (*_Ctype_struct_LLVMOpaqueDIBuilder, *_Ctype_struct_LLVMOpaqueMetadata, *_Ctype_char, _Ctype_ulong, *_Ctype_struct_LLVMOpaqueMetadata, _Ctype_uint, *_Ctype_struct_LLVMOpaqueMetadata, _Ctype_uint)
```
This patch fixes above error.

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