platform/upstream/llvm.git
4 years ago[CodeGen] Fix up warnings in visitEXTRACT_SUBVECTOR
David Sherwood [Fri, 26 Jun 2020 12:54:55 +0000 (13:54 +0100)]
[CodeGen] Fix up warnings in visitEXTRACT_SUBVECTOR

It's perfectly valid to do certain DAG combines where we extract
subvectors from a concat vector when we have scalable vector types.
However, we can do this in a way that avoids generating compiler
warnings by replacing calls to getVectorNumElements() with
getVectorMinNumElements(). Due to the way subvector extracts are
designed to work with scalable vector types this is ok.

This eliminates some warnings from existing tests in this file:

  llvm/test/CodeGen/AArch64/sve-intrinsics-loads.ll

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

4 years ago[lldb] Fix NSDate test after Scalar change
Raphael Isemann [Wed, 1 Jul 2020 13:58:09 +0000 (15:58 +0200)]
[lldb] Fix NSDate test after Scalar change

The formatter was requesting an unsigned integer from the ValueObject,
but CFAbsoluteTime is a signed double, so in the NSDate test the formatter
actually just printed the 'error value' date which is the Cocoa epoch. This
started failing after the recent Scalar changes.

This patch just changes the logic to use a signed value which fits to the data
we try to read and avoids this issue.

4 years ago[mlir][Linalg] Add an option to use Alloca instead of malloc/free pairs.
Nicolas Vasilache [Wed, 1 Jul 2020 13:40:20 +0000 (09:40 -0400)]
[mlir][Linalg] Add an option to use Alloca instead of malloc/free pairs.

Summary: A relevant test is also added.

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, Kayjukh, jurahul, msifontes

Tags: #mlir

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

4 years ago[lldb] Add basic -flimit-debug-info support to expression evaluator
Pavel Labath [Tue, 23 Jun 2020 09:34:58 +0000 (11:34 +0200)]
[lldb] Add basic -flimit-debug-info support to expression evaluator

Summary:
This patch adds support for evaluation of expressions referring to types
which were compiled in -flimit-debug-info (a.k.a -fno-standalone-debug)
in clang. In this mode it's possible that the debug information needed
to fully describe a c++ type is not present in a single shared library
-- for example debug info for a base class or a member of a type can
only be found in another shared library.  This situation is not
currently handled well within lldb as we are limited to searching within
a single shared library (lldb_private::Module) when searching for the
definition of these types.

The way that this patch gets around this limitation is by doing the
search at a later stage -- during the construction of the expression ast
context. This works by having the parser (currently SymbolFileDWARF, but
a similar approach is probably needed for PDBs too) mark a type as
"forcefully completed". What this means is that the parser has marked
the type as "complete" in the module ast context (as this is necessary
to e.g. derive classes from it), but its definition is not really there.
This is done via a new field on the ClangASTMetadata struct.

Later, when we are importing such a type into the expression ast, we
check this flag. If the flag is set, we try to find a better definition
for the type in other shared libraries. We do this by initiating a
new lookup for the "forcefully completed" classes, which then imports the
type from a module with a full definition.

This patch only implements this handling for base classes, but other
cases (members, array element types, etc.). The changes for that should
be fairly simple and mostly revolve around marking these types as
"forcefully completed" at an approriate time -- the importing logic is
generic already.

Another aspect, which is also not handled by this patch is viewing these
types via the "frame variable" command. This does not use the AST
importer and so it will need to handle these types on its own -- that
will be the subject of another patch.

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

4 years agoRevert "[StackSafety,NFC] Remove unneded constexpr"
Alexey Bataev [Wed, 1 Jul 2020 12:41:14 +0000 (08:41 -0400)]
Revert "[StackSafety,NFC] Remove unneded constexpr"

This reverts commit 38470baa542bde038340b7d10a0ed2c25fac1bfa because it
breaks builds with lld and gold linkers.

4 years ago[clang-tidy] fix cppcoreguidelines-init-variables with catch variables
Nathan James [Wed, 1 Jul 2020 12:40:18 +0000 (13:40 +0100)]
[clang-tidy] fix cppcoreguidelines-init-variables with catch variables

Ignore catch statement var decls.

Reviewed By: aaron.ballman

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

4 years ago[llvm-readobj] - Simplify the symbols.test
Georgii Rymar [Wed, 1 Jul 2020 09:58:20 +0000 (12:58 +0300)]
[llvm-readobj] - Simplify the symbols.test

We are able to use YAML macros to avoid having
4 independent YAML descriptions.

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

4 years agoPass DIEnumerator APInt args by const reference not value.
Simon Pilgrim [Wed, 1 Jul 2020 12:07:35 +0000 (13:07 +0100)]
Pass DIEnumerator APInt args by const reference not value.

Noticed by clang-tidy performance-unnecessary-value-param warning.

4 years ago[PowerPC] Fix for PC Relative call protocol
Stefan Pintilie [Wed, 1 Jul 2020 12:08:41 +0000 (07:08 -0500)]
[PowerPC] Fix for PC Relative call protocol

The situation where the caller uses a TOC and the callee does not
but is marked as clobbers the TOC (st_other=1) was not being compiled
correctly if both functions where in the same object file.

The call site where we had `callee` was missing a nop after the call.
This is because it was assumed that since the two functions where in
the same DSO they would be sharing a TOC. This is not the case if the
callee uses PC Relative because in that case it may clobber the TOC.
This patch makes sure that we add the cnop correctly so that the
linker has a place to restore the TOC.

Reviewers: sfertile, NeHuang, saghir

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

4 years agoPass stripNonLineTableDebugInfo remapDebugLoc lambda DebugLoc arg by const reference...
Simon Pilgrim [Wed, 1 Jul 2020 11:37:47 +0000 (12:37 +0100)]
Pass stripNonLineTableDebugInfo remapDebugLoc lambda DebugLoc arg by const reference not value.

Noticed by clang-tidy performance-unnecessary-value-param warning.

4 years ago[X86][SSE] Fix targetShrinkDemandedConstant constant vector sign extensions
Simon Pilgrim [Wed, 1 Jul 2020 11:12:34 +0000 (12:12 +0100)]
[X86][SSE] Fix targetShrinkDemandedConstant constant vector sign extensions

D82257/rG3521ecf1f8a3 was incorrectly sign-extending a constant vector from the lsb, this is fine if all the constant elements are 'allsignbits' in the active bits, but if only some of the elements are, then we are corrupting the constant values for those elements.

This fix ensures we sign extend from the msb of the active/demanded bits instead.

4 years ago[llvm-size] Output REL, RELA and STRTAB sections when allocatable
gbreynoo [Wed, 1 Jul 2020 10:57:30 +0000 (11:57 +0100)]
[llvm-size] Output REL, RELA and STRTAB sections when allocatable

gnu size has a number of special cases regarding REL, RELA and STRTAB
sections being considered in size output. To avoid unnecessary
complexity this commit makes llvm size outputs these sections in cases
they have the SHF_ALLOC flag.

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

4 years ago[X86][SSE] Add test showing incorrect sign-extension by targetShrinkDemandedConstant
Simon Pilgrim [Wed, 1 Jul 2020 10:40:46 +0000 (11:40 +0100)]
[X86][SSE] Add test showing incorrect sign-extension by targetShrinkDemandedConstant

4 years agoFix Wdocumentation warnings by only tagging a param id once per doxygen comment block...
Simon Pilgrim [Wed, 1 Jul 2020 10:27:31 +0000 (11:27 +0100)]
Fix Wdocumentation warnings by only tagging a param id once per doxygen comment block. NFC.

4 years agoFix Wdocumentation warnings due to outdated parameter list. NFC.
Simon Pilgrim [Wed, 1 Jul 2020 10:25:59 +0000 (11:25 +0100)]
Fix Wdocumentation warnings due to outdated parameter list. NFC.

4 years agoAttrBuilder::merge/remove - use const& for iterator values in for-range loops.
Simon Pilgrim [Tue, 30 Jun 2020 17:03:16 +0000 (18:03 +0100)]
AttrBuilder::merge/remove - use const& for iterator values in for-range loops.

Noticed by clang-tidy performance-for-range-copy warning.

4 years ago[RISCV] Implement Hooks to avoid chaining SELECT
Sam Elliott [Wed, 1 Jul 2020 10:55:07 +0000 (11:55 +0100)]
[RISCV] Implement Hooks to avoid chaining SELECT

Summary:
This implements two hooks that attempt to avoid control flow for RISC-V. RISC-V
will lower SELECTs into control flow, which is not a great idea.

The hook `hasMultipleConditionRegisters()` turns off the following
DAGCombiner folds:
    select(C0|C1, x, y) <=> select(C0, x, select(C1, x, y))
    select(C0&C1, x, y) <=> select(C0, select(C1, x, y), y)

The second hook `setJumpIsExpensive` controls a flag that has a similar purpose
and is used in CodeGenPrepare and the SelectionDAGBuilder.

Both of these have the effect of ensuring more logic is done before fewer jumps.

Note: with the `B` extension, we may be able to lower select into a conditional
move instruction, so at some point these hooks will need to be guarded based on
enabled extensions.

Reviewed By: luismarques

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

4 years ago[RISCV][NFC] Add Test for (select (or B1, B2), X, Y)
Sam Elliott [Wed, 1 Jul 2020 10:54:56 +0000 (11:54 +0100)]
[RISCV][NFC] Add Test for (select (or B1, B2), X, Y)

Summary:
As shown, LLVM is keen to avoid logic and introduce selects (in DAGCombiner, and
other places). This leads to control flow on RISC-V which we should attempt to
avoid.

Reviewed By: luismarques

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

4 years ago[Analyzer] Quick fix for broken tests on Windows
Adam Balogh [Wed, 1 Jul 2020 10:52:12 +0000 (12:52 +0200)]
[Analyzer] Quick fix for broken tests on Windows

4 years ago[clangd] Set gRPC deadlines to all remote index requests
Kirill Bobyrev [Wed, 1 Jul 2020 10:45:41 +0000 (12:45 +0200)]
[clangd] Set gRPC deadlines to all remote index requests

Summary: "TL;DR: Always set a deadline.", https://grpc.io/blog/deadlines/

Reviewers: sammccall

Reviewed By: sammccall

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

Tags: #clang

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

4 years ago[lldb/api] Improve error reporting in SBBreakpoint::AddName (NFCI)
Med Ismail Bennani [Tue, 30 Jun 2020 14:37:48 +0000 (16:37 +0200)]
[lldb/api] Improve error reporting in SBBreakpoint::AddName (NFCI)

This patch improves the error reporting for SBBreakpoint::AddName by
adding a new method `SBBreakpoint::AddNameWithErrorHandling` that returns
a SBError instead of a boolean.

This way, if the breakpoint naming failed in the backend, the client
(i.e. Xcode), will be able to report the reason of that failure to the
user.

rdar://64765461

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
4 years agoRevert "[lldb/api] Improve error reporting in SBBreakpoint::AddName (NFCI)"
Med Ismail Bennani [Wed, 1 Jul 2020 10:41:32 +0000 (12:41 +0200)]
Revert "[lldb/api] Improve error reporting in SBBreakpoint::AddName (NFCI)"

This reverts commit 56bb1d1755ae38b4e7a67f775978b18a601f215f.

4 years ago[lldb/api] Improve error reporting in SBBreakpoint::AddName (NFCI)
Med Ismail Bennani [Tue, 30 Jun 2020 14:37:48 +0000 (16:37 +0200)]
[lldb/api] Improve error reporting in SBBreakpoint::AddName (NFCI)

This patch improves the error reporting for SBBreakpoint::AddName by
adding a new method `SBBreakpoint::AddNameWithErrorHandling` that returns
a SBError instead of a boolean.

This way, if the breakpoint naming failed in the backend, the client
(i.e. Xcode), will be able to report the reason of that failure to the
user.

rdar://64765461

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
4 years ago[Driver][ARM] parse version of arm/thumb architecture correctly
Daniel Kiss [Wed, 1 Jul 2020 09:15:52 +0000 (11:15 +0200)]
[Driver][ARM] parse version of arm/thumb architecture correctly

Summary:
If you execute the following commandline multiple times, the behavior was not always the same:
  clang++ --target=thumbv7em-none-windows-eabi-coff -march=armv7-m -mcpu=cortex-m7 -o temp.obj -c -x c++ empty.cpp

Most of the time the compilation succeeded, but sometimes clang reported this error:
  clang++: error: the target architecture 'thumbv7em' is not supported by the target 'thumbv7em-none-windows-eabi'

The cause of the inconsistent behavior was the uninitialized variable Version.

With these commandline arguments, the variable Version was not set by getAsInteger(),
because it cannot parse a number from the substring "7em" (of "thumbv7em").
To get a consistent behaviour, it's enough to initialize the variable Version to zero.
Zero is smaller than 7, so the comparison will be true.
Then the command always fails with the error message seen above.

By using consumeInteger() instead of getAsInteger() we get 7 from the substring "7em"
and the command does not fail.

Reviewers: compnerd, danielkiss

Reviewed By: danielkiss

Subscribers: danielkiss, kristof.beyls, cfe-commits

Tags: #clang

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

4 years ago[StackSafety,NFC] Remove expensive assert
Vitaly Buka [Wed, 1 Jul 2020 07:38:43 +0000 (00:38 -0700)]
[StackSafety,NFC] Remove expensive assert

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

4 years ago[StackSafety,NFC] Remove unneded constexpr
Vitaly Buka [Wed, 1 Jul 2020 07:32:36 +0000 (00:32 -0700)]
[StackSafety,NFC] Remove unneded constexpr

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

4 years agoAMDGPU/GlobalISel: Select init_exec intrinsic
Petar Avramovic [Wed, 1 Jul 2020 09:50:59 +0000 (11:50 +0200)]
AMDGPU/GlobalISel: Select init_exec intrinsic

Change imm with timm in pattern for SI_INIT_EXEC_LO and
remove regbank mappings for non register operands.

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

4 years ago[AArch64][SVE] Add reg+imm addressing mode for unpredicated loads
Kerry McLaughlin [Wed, 1 Jul 2020 09:00:35 +0000 (10:00 +0100)]
[AArch64][SVE] Add reg+imm addressing mode for unpredicated loads

Reviewers: efriedma, sdesmalen, david-arm

Reviewed By: efriedma

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, llvm-commits

Tags: #llvm

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

4 years ago[clangd] Fix name conflict again, unbreak GCC. NFC
Sam McCall [Wed, 1 Jul 2020 09:28:15 +0000 (11:28 +0200)]
[clangd] Fix name conflict again, unbreak GCC. NFC

4 years ago[llvm-readobj] - Don't crash when checking the number of dynamic symbols.
Georgii Rymar [Tue, 30 Jun 2020 14:14:45 +0000 (17:14 +0300)]
[llvm-readobj] - Don't crash when checking the number of dynamic symbols.

When we deriving the number of symbols from the DT_HASH table, we can crash when
calculate the number of symbols in the symbol table when SHT_DYNSYM
has sh_entsize == 0.

The patch fixes the issue.

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

4 years ago[llvm-readobj] - Simplify and refine hash table tests
Georgii Rymar [Tue, 30 Jun 2020 12:47:05 +0000 (15:47 +0300)]
[llvm-readobj] - Simplify and refine hash table tests

Now we are able to have default values for macros in YAML descriptions.
I've applied it for hash table tests and also fixed few copy-paste issues
in their comments.

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

4 years ago[DebugInfo] Do not emit entry values for composite locations
David Stenberg [Wed, 1 Jul 2020 07:45:56 +0000 (09:45 +0200)]
[DebugInfo] Do not emit entry values for composite locations

Summary:
This is a fix for PR45009.

When working on D67492 I made DwarfExpression emit a single
DW_OP_entry_value operation covering the whole composite location
description that is produced if a register does not have a valid DWARF
number, and is instead composed of multiple register pieces. Looking
closer at the standard, this appears to not be valid DWARF. A
DW_OP_entry_value operation's block can only be a DWARF expression or a
register location description, so it appears to not be valid for it to
hold a composite location description like that.

See DWARFv5 sec. 2.5.1.7:

"The DW_OP_entry_value operation pushes the value that the described
 location held upon entering the current subprogram. It has two
 operands: an unsigned LEB128 length, followed by a block containing a
 DWARF expression or a register location description (see Section
 2.6.1.1.3 on page 39)."

Here is a dwarf-discuss mail thread regarding this:

http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/2020-March/004610.html

There was not a strong consensus reached there, but people seem to lean
towards that operations specified under 2.6 (e.g. DW_OP_piece) may not
be part of a DWARF expression, and thus the DW_OP_entry_value operation
can't contain those.

Perhaps we instead want to emit a entry value operation per each
DW_OP_reg* operation, e.g.:

  - DW_OP_entry_value(DW_OP_regx sub_reg0),
    DW_OP_stack_value,
    DW_OP_piece 8,
  - DW_OP_entry_value(DW_OP_regx sub_reg1),
    DW_OP_stack_value,
    DW_OP_piece 8,
  [...]

The question then becomes how the call site should look; should a
composite location description be emitted there, and we then leave it up
to the debugger to match those two composite location descriptions?
Another alternative could be to emit a call site parameter entry for
each sub-register, but firstly I'm unsure if that is even valid DWARF,
and secondly it seems like that would complicate the collection of call
site values quite a bit. As far as I can tell GCC does not emit any
entry values / call sites in these cases, so we do not have something to
compare with, but the former seems like the more reasonable approach.

Currently when trying to emit a call site entry for a parameter composed
of multiple DWARF registers a (DwarfRegs.size() == 1) assert is
triggered in addMachineRegExpression(). Until the call site
representation is figured out, and until there is use for these entry
values in practice, this commit simply stops the invalid DWARF from
being emitted.

Reviewers: djtodoro, vsk, aprantl

Reviewed By: djtodoro, vsk

Subscribers: jyknight, hiraditya, fedor.sergeev, jrtc27, llvm-commits

Tags: #debug-info, #llvm

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

4 years ago[Alignment][NFC] Migrate MachineFrameInfo::CreateSpillStackObject to Align
Guillaume Chatelet [Wed, 1 Jul 2020 08:49:28 +0000 (08:49 +0000)]
[Alignment][NFC] Migrate MachineFrameInfo::CreateSpillStackObject to Align

iThis patch is part of a series 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

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

4 years ago[lldb] Scalar re-fix UB in float->int conversions
Pavel Labath [Wed, 1 Jul 2020 08:18:02 +0000 (10:18 +0200)]
[lldb] Scalar re-fix UB in float->int conversions

The refactor in 48ca15592f1 reintroduced UB when converting out-of-bounds
floating point numbers to integers -- the behavior for ULongLong() was
originally fixed in r341685, but did not survive my refactor because I
based my template code on one of the methods which did not have this
fix.

This time, I apply the fix to all float->int conversions, instead of
just the "double->unsigned long long" case. I also use a slightly
simpler version of the code, with fewer round-trips
(APFloat->APSInt->native_int vs
APFloat->native_float->APInt->native_int).

I also add some unit tests for the conversions.

4 years ago[NFC][ARM] Add test.
Sam Parker [Wed, 1 Jul 2020 08:20:25 +0000 (09:20 +0100)]
[NFC][ARM] Add test.

4 years ago[AMDGPU] Correct AMDGPUUsage.rst DW_AT_LLVM_lane_pc example
Tony [Wed, 1 Jul 2020 08:17:28 +0000 (08:17 +0000)]
[AMDGPU] Correct AMDGPUUsage.rst DW_AT_LLVM_lane_pc example

- Correct typo of DW_OP_xaddr to DW_OP_addrx in AMDGPUUsage.rst for
  DW_AT_LLVM_lane_pc example.

Change-Id: I1b0ee2b24362a0240388e4c2f044c1d4883509b9

4 years ago[SVE] Relax merge requirement for IR based divides.
Paul Walker [Wed, 1 Jul 2020 08:12:46 +0000 (08:12 +0000)]
[SVE] Relax merge requirement for IR based divides.

We currently lower SDIV to SDIV_MERGE_OP1. This forces the value
for inactive lanes in a way that can hamper register allocation,
however, the lowering has no requirement for inactive lanes.

Instead this patch replaces SDIV_MERGE_OP1 with SDIV_PRED thus
freeing the register allocator. Once done the only user of
SDIV_MERGE_OP1 is intrinsic lowering so I've removed the node
and perform ISel on the intrinsic directly. This also allows
us to implement MOVPRFX based zeroing in the same manner as SUB.

This patch also renames UDIV_MERGE_OP1 and [F]ADD_MERGE_OP1 for
the same reason but in the ADD cases the ISel code is already
as required.

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

4 years ago[gn build] Port f12cd99c440
LLVM GN Syncbot [Wed, 1 Jul 2020 08:09:43 +0000 (08:09 +0000)]
[gn build] Port f12cd99c440

4 years ago[analyzer][CrossTU] Lower CTUImportThreshold default value
Endre Fülöp [Thu, 25 Jun 2020 15:10:56 +0000 (17:10 +0200)]
[analyzer][CrossTU] Lower CTUImportThreshold default value

Summary:
The default value of 100 makes the analysis slow. Projects of considerable
size can take more time to finish than it is practical. The new default
setting of 8 is based on the analysis of LLVM itself. With the old default
value of 100 the analysis time was over a magnitude slower. Thresholding the
load of ASTUnits is to be extended in the future with a more fine-tuneable
solution that accomodates to the specifics of the project analyzed.

Reviewers: martong, balazske, Szelethus

Subscribers: whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, steakhal, ASDenysPetrov, cfe-commits

Tags: #clang

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

4 years ago[clangd] Config: compile Fragment -> CompiledFragment -> Config
Sam McCall [Thu, 25 Jun 2020 23:49:53 +0000 (01:49 +0200)]
[clangd] Config: compile Fragment -> CompiledFragment -> Config

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

Tags: #clang

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

4 years ago[ThinLTO] Always parse module level inline asm with At&t dialect (PR46503)
Hans Wennborg [Tue, 30 Jun 2020 10:48:10 +0000 (12:48 +0200)]
[ThinLTO] Always parse module level inline asm with At&t dialect (PR46503)

clang-cl passes -x86-asm-syntax=intel to the cc1 invocation so that
assembly listings produced by the /FA flag are printed in Intel dialect.
That flag however should not affect the *parsing* of inline assembly in
the program. (See r322652)

When compiling normally, AsmPrinter::emitInlineAsm is used for
assembling and defaults to At&t dialect. However, when compiling for
ThinLTO, the code which parses module level inline asm to find symbols
for the symbol table was failing to set the dialect. This patch fixes
that. (See the bug for more details.)

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

4 years ago[AMDGPU] Spill more than wavesize CSR SGPRs
Saiyedul Islam [Wed, 1 Jul 2020 07:28:47 +0000 (07:28 +0000)]
[AMDGPU] Spill more than wavesize CSR SGPRs

In case of more than wavesize CSR SGPR spills, lanes of reserved VGPR were getting
overwritten due to wrap around.

Reserve a VGPR (when NumVGPRSpillLanes = 0, WaveSize, 2*WaveSize, ..) and when one
of the two conditions is true:
 1. One reserved VGPR being tracked by VGPRReservedForSGPRSpill is not yet reserved.
 2. All spill lanes of reserved VGPR(s) are full and another spill lane is required.

Reviewed By: arsenm, kerbowa

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

4 years ago[ARM][LowOverheadLoops] Handle reductions
Sam Parker [Wed, 1 Jul 2020 07:27:12 +0000 (08:27 +0100)]
[ARM][LowOverheadLoops] Handle reductions

While validating live-out values, record instructions that look like
a reduction. This will comprise of a vector op (for now only vadd),
a vorr (vmov) which store the previous value of vadd and then a vpsel
in the exit block which is predicated upon a vctp. This vctp will
combine the last two iterations using the vmov and vadd into a vector
which can then be consumed by a vaddv.

Once we have determined that it's safe to perform tail-predication,
we need to change this sequence of instructions so that the
predication doesn't produce incorrect code. This involves changing
the register allocation of the vadd so it updates itself and the
predication on the final iteration will not update the falsely
predicated lanes. This mimics what the vmov, vctp and vpsel do and
so we then don't need any of those instructions.

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

4 years agoCorrectly track GCOVProfiling IR update
serge-sans-paille [Mon, 29 Jun 2020 08:58:08 +0000 (10:58 +0200)]
Correctly track GCOVProfiling IR update

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

4 years ago[Alignment][NFC] Migrate MachineFrameInfo::CreateStackObject to Align
Guillaume Chatelet [Wed, 1 Jul 2020 07:28:11 +0000 (07:28 +0000)]
[Alignment][NFC] Migrate MachineFrameInfo::CreateStackObject to Align

This patch is part of a series 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

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

4 years ago[clang][CrossTU] Invalidate parent map after get cross TU definition.
Balázs Kéri [Tue, 30 Jun 2020 07:41:48 +0000 (09:41 +0200)]
[clang][CrossTU] Invalidate parent map after get cross TU definition.

Summary:
Parent map of ASTContext is built once. If this happens and later
the TU is modified by getCrossTUDefinition the parent map does not
contain the newly imported objects and has to be re-created.

Invalidation of the parent map is added to the CrossTranslationUnitContext.
It could be added to ASTImporter as well but for now this task remains the
responsibility of the user of ASTImporter. Reason for this is mostly that
ASTImporter calls itself recursively.

Reviewers: gamesh411, martong

Reviewed By: gamesh411

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, martong, cfe-commits

Tags: #clang

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

4 years ago[gn build] Port 4da65c2920b
LLVM GN Syncbot [Wed, 1 Jul 2020 07:02:27 +0000 (07:02 +0000)]
[gn build] Port 4da65c2920b

4 years ago[Analyzer] Handle pointer implemented as iterators in iterator checkers
Adam Balogh [Tue, 16 Jun 2020 18:00:47 +0000 (20:00 +0200)]
[Analyzer] Handle pointer implemented as iterators in iterator checkers

Iterators are an abstraction of pointers and in some data structures
iterators may be implemented by pointers. This patch adds support for
iterators implemented as pointers in all the iterator checkers
(including iterator modeling).

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

4 years ago[Analyzer] Fix errors in iterator modeling
Adam Balogh [Tue, 23 Jun 2020 12:09:48 +0000 (14:09 +0200)]
[Analyzer] Fix errors in iterator modeling

There is major a bug found in iterator modeling: upon adding a value
to or subtracting a value from an iterator the position of the original
iterator is also changed beside the result. This patch fixes this bug.

To catch such bugs in the future we also changed the tests to look for
regular expressions including an end-of-line symbol (`$`) so we can
prevent false matches where only the tested prefix matches.

Another minor bug is that when printing the state, all the iterator
positions are printed in a single line. This patch also fixes this.

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

4 years ago[clang-tidy] New util `Aliasing` factored out from `bugprone-infinite-loop`
Adam Balogh [Mon, 8 Jun 2020 10:41:36 +0000 (12:41 +0200)]
[clang-tidy] New util `Aliasing` factored out from `bugprone-infinite-loop`

Function `hasPtrOrReferenceInfFunc()` of `bugprone-infinite-loop` is a
generic function which could be reused in another checks. This patch
moves this function into a newly created utility module.

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

4 years ago[Sema][NFC] Remove Redundant Condition
Adam Balogh [Thu, 25 Jun 2020 14:41:23 +0000 (16:41 +0200)]
[Sema][NFC] Remove Redundant Condition

Condition `TypeQuals` is checked both in an outer and in an inner `if`
statement in static function `ConvertDeclSpecToType()` in file
`SemaType.cpp`. This patch removes the redundant inner check.

The issue was found using `clang-tidy` check under review
`misc-redundant-condition`. See https://reviews.llvm.org/D81272.

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

4 years ago[LLDB][Clang Integration][NFC] Remove redundant condition
Adam Balogh [Thu, 25 Jun 2020 14:20:29 +0000 (16:20 +0200)]
[LLDB][Clang Integration][NFC] Remove redundant condition

Condition `omit_empty_base_classes` is checked both in an outer and
in an inner `if` statement in `TypeSystemClang::GetNumBaseClasses()`.
This patch removes the redundant inner check.

The issue was found using `clang-tidy` check under review
`misc-redundant-condition`. See https://reviews.llvm.org/D81272.

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

4 years ago[LLDB][NFC] Remove redundant condition
Adam Balogh [Thu, 25 Jun 2020 14:23:35 +0000 (16:23 +0200)]
[LLDB][NFC] Remove redundant condition

Condition `auto_advance_pc` is checked both in an outer and in an
inner `if` statement in `EmulateInstructionARM::EvaluateInstruction()`,
`EmulateInstructionARM64::EvaluateInstruction()` and
`EmulateInstructionPPC64::EvaluateInstruction()`. This patch removes the
redundant inner check.

The issue was found using `clang-tidy` check under review
`misc-redundant-condition`. See https://reviews.llvm.org/D81272.

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

4 years ago[Hexagon][NFC] Remove redundant condition
Adam Balogh [Thu, 25 Jun 2020 13:48:10 +0000 (15:48 +0200)]
[Hexagon][NFC] Remove redundant condition

Condition `secondReg` is checked both in an outer and in an inner `if`
statement in static function `canCompareBeNewValueJump()` in file
`HexagonNewValueJump.cpp`. This patch removes the redundant inner check.

The issue was found using `clang-tidy` check under review
`misc-redundant-condition`. See https://reviews.llvm.org/D81272.

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

4 years ago[AMDGPU][NFC] Remove redundant condition
Adam Balogh [Thu, 25 Jun 2020 13:41:36 +0000 (15:41 +0200)]
[AMDGPU][NFC] Remove redundant condition

Condition `LiteralCount` is checked both in an outer and in an inner
`if` statement in `SIInstrInfo::verifyInstruction()`. This patch removes
the redundant inner check.

The issue was found using `clang-tidy` check under review
`misc-redundant-condition`. See https://reviews.llvm.org/D81272.

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

4 years ago[BPF] Fix a bug for __builtin_preserve_field_info() processing
Yonghong Song [Tue, 30 Jun 2020 22:27:24 +0000 (15:27 -0700)]
[BPF] Fix a bug for __builtin_preserve_field_info() processing

Andrii discovered a problem where a simple case similar to below
will generate wrong relocation kind:
  enum { FIELD_EXISTENCE = 2, };
  struct s1 { int a1; };
  int test() {
    struct s1 *v = 0;
    return __builtin_preserve_field_info(v[0], FIELD_EXISTENCE);
  }
The expected relocation kind should be FIELD_EXISTENCE, but
recorded reloc kind in the final object file is FIELD_BYTE_OFFSET,
which is incorrect.

This exposed a bug in generating access strings from intrinsics.
The current access string generation has two steps:
  step 1: find the base struct/union type,
  step 2: traverse members in the base type.

The current implementation relies on at lease one member access
in step 2 to get the correct relocation kind, which is true
in typical cases. But if there is no member accesses, the current
implementation falls to the default info kind FIELD_BYTE_OFFSET.
This is incorrect, we should still record the reloc kind
based on the user input. This patch fixed this issue by properly
recording the reloc kind in such cases.

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

4 years ago[ELF][test] Fix ppc32-gnu-ifunc.s and remove XFAIL: *
Fangrui Song [Wed, 1 Jul 2020 05:05:01 +0000 (22:05 -0700)]
[ELF][test] Fix ppc32-gnu-ifunc.s and remove XFAIL: *

4 years ago[mlir] Remove the default template parameters from AttrBase and TypeBase.
River Riddle [Wed, 1 Jul 2020 04:50:17 +0000 (21:50 -0700)]
[mlir] Remove the default template parameters from AttrBase and TypeBase.

MSVC 2017 doesn't support the case where a trailing variadic template list comes after template types with default parameters. Until we upgrade to VS 2019, we can't use the simplified definitions.

4 years ago[CodeComplete] Add code completion after function equals
lh123 [Thu, 25 Jun 2020 12:04:18 +0000 (20:04 +0800)]
[CodeComplete] Add code completion after function equals

Summary:
Provide `default` and `delete` completion after the function equals.

Reviewers: kadircet, sammccall

Tags: #clang

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

4 years ago[NFC] fix diagnostic
JF Bastien [Wed, 1 Jul 2020 04:49:01 +0000 (21:49 -0700)]
[NFC] fix diagnostic

It's pretty silly to diagnose on a scalar copy but the build does that:
  loop variable 'SibReg' of type 'const llvm::Register' creates a copy from type 'const llvm::Register' [-Wrange-loop-analysis]

4 years ago[lld][WebAssembly] Give better error message on bad archive member
Sam Clegg [Tue, 30 Jun 2020 15:38:38 +0000 (08:38 -0700)]
[lld][WebAssembly] Give better error message on bad archive member

Include the archive name as well as the member name when an error
is encountered parsing bitcode archives.

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

4 years agoFix diagnostic for missing virtual dtor
JF Bastien [Wed, 1 Jul 2020 04:32:05 +0000 (21:32 -0700)]
Fix diagnostic for missing virtual dtor

Introduced in D82673.

4 years ago[NewPM] Add explicit init value to -enable-new-pm
Arthur Eubanks [Wed, 1 Jul 2020 01:38:59 +0000 (18:38 -0700)]
[NewPM] Add explicit init value to -enable-new-pm

 So it's easier to test with it on by default.

Reviewed By: ychen

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

4 years ago[DWARFYAML][test] Make the checker stricter. NFC.
Xing GUO [Wed, 1 Jul 2020 01:36:18 +0000 (09:36 +0800)]
[DWARFYAML][test] Make the checker stricter. NFC.

Currently, DWARFYAML doesn't emit the 0 byte for terminating the abbrev
table for the given compilation unit. Before addressing this issue, we
have to make the test stricter.

4 years ago[c++20] consteval functions don't get vtable slots.
Richard Smith [Tue, 30 Jun 2020 22:53:08 +0000 (15:53 -0700)]
[c++20] consteval functions don't get vtable slots.

For the Itanium C++ ABI, this implements the rule added in
https://github.com/itanium-cxx-abi/cxx-abi/pull/83

For the MS C++ ABI, this implements the direction that seemed most
plausible based on personal correspondence with MSVC developers, but is
subject to change as they decide their ABI rule.

4 years agoFixup BDVER1 and ZNVER1 definitions that were accidentally changed in recent refactor.
Douglas Yung [Wed, 1 Jul 2020 01:10:09 +0000 (18:10 -0700)]
Fixup BDVER1 and ZNVER1 definitions that were accidentally changed in recent refactor.

- BDVER1
  - Duplicate FeatureLZCNT removed
- ZNVER1
  - Duplicate FeatureLZCNT removed
  - Removed unsupported FeatureLWP
  - Swapped FeatureMMX and FeatureMOVBE to be in alphabetical order

4 years ago[llvm-install-name-tool] Tighten some path checks
Shoaib Meenai [Wed, 1 Jul 2020 00:20:00 +0000 (17:20 -0700)]
[llvm-install-name-tool] Tighten some path checks

Just having --implicit-check-not=/usr breaks when the LLVM checkout path
contains '/usr', since llvm-objdump prints out the path to the input
file in the first line. Tighten the checks by adding the 'name' prefix
that's used when printing load command payloads. An alternative would be
to redirect the input file into llvm-objdump, in which case it prints
out 'a.out' as the file name, but I'm not sure how reliable that
behavior is.

4 years ago[Docs][BasicAA] Rename some more basicaa -> basic-aa
Arthur Eubanks [Tue, 30 Jun 2020 22:57:45 +0000 (15:57 -0700)]
[Docs][BasicAA] Rename some more basicaa -> basic-aa

Follow up to https://reviews.llvm.org/D82607.

4 years ago[Sanitizers] Implement interceptors for msgsnd, msgrcv
Gui Andrade [Tue, 30 Jun 2020 23:29:10 +0000 (23:29 +0000)]
[Sanitizers] Implement interceptors for msgsnd, msgrcv

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

4 years ago[gn build] (semi-manually) port ce6153a5282
Nico Weber [Tue, 30 Jun 2020 23:29:47 +0000 (19:29 -0400)]
[gn build] (semi-manually) port ce6153a5282

4 years agoGlobalISel: Disallow undef generic virtual register uses
Matt Arsenault [Sun, 28 Jun 2020 14:06:58 +0000 (10:06 -0400)]
GlobalISel: Disallow undef generic virtual register uses

With an undef operand, it's possible for getVRegDef to fail and return
null. This is an edge case very little code bothered to
consider. Proper gMIR should use G_IMPLICIT_DEF instead.

I initially tried to apply this restriction to all SSA MIR, so then
getVRegDef would never fail anywhere. However, ProcessImplicitDefs
does technically run while the function is in SSA. ProcessImplicitDefs
and DetectDeadLanes would need to either move, or a new pseudo-SSA
type of function property would need to be introduced.

4 years agoAMDGPU/GlobalISel: Remove some selection tests which should be invalid
Matt Arsenault [Sun, 28 Jun 2020 22:41:38 +0000 (18:41 -0400)]
AMDGPU/GlobalISel: Remove some selection tests which should be invalid

These use undef generic virtual register operands, which should be
rejected by the verifier.

4 years agoA constexpr virtual function is implicitly inline so should never be a
Richard Smith [Tue, 30 Jun 2020 22:53:08 +0000 (15:53 -0700)]
A constexpr virtual function is implicitly inline so should never be a
key function.

4 years agoFix wrong title underline length
Arthur Eubanks [Tue, 30 Jun 2020 23:01:41 +0000 (16:01 -0700)]
Fix wrong title underline length

4 years ago[gn build] Update build for new OpenMP tablegen logic
Reid Kleckner [Tue, 30 Jun 2020 23:00:04 +0000 (16:00 -0700)]
[gn build] Update build for new OpenMP tablegen logic

Ports 1a70077b5a64189d9c04d1a2d7ea6ff0e49744d6 to gn from cmake.

4 years ago[ModuloSchedule] Make PeelingModuloScheduleExpander inheritable.
Hendrik Greving [Fri, 26 Jun 2020 18:45:18 +0000 (11:45 -0700)]
[ModuloSchedule] Make PeelingModuloScheduleExpander inheritable.

Basically a NFC, but allows subclasses access to the entire PeelingModuloScheduleExpander
class. We are doing this to allow backends, particularly one that are not necessarily
upstreamed, to inherit from PeelingModuloScheduleExpander and access its basic structures.

Renames Info into LoopInfo for consistency in PeelingModuloScheduleExpander.

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

4 years ago[Docs][BasicAA] Rename -basicaa to -basic-aa in docs
Arthur Eubanks [Tue, 30 Jun 2020 22:53:03 +0000 (15:53 -0700)]
[Docs][BasicAA] Rename -basicaa to -basic-aa in docs

Follow up to https://reviews.llvm.org/D82607.

4 years ago[mlir] Remove locking for dialect/operation registration.
River Riddle [Tue, 30 Jun 2020 22:43:03 +0000 (15:43 -0700)]
[mlir] Remove locking for dialect/operation registration.

Moving forward dialects should only be registered in a thread safe context. This matches the existing usage we have today, but it allows for removing quite a bit of expensive locking from the context.

This led to ~.5 a second compile time improvement when running one conversion pass on a very large .mlir file(hundreds of thousands of operations).

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

4 years ago[mlir] Refactor InterfaceGen to support generating interfaces for Attributes and...
River Riddle [Tue, 30 Jun 2020 22:42:52 +0000 (15:42 -0700)]
[mlir] Refactor InterfaceGen to support generating interfaces for Attributes and Types.

This revision adds support to ODS for generating interfaces for attributes and types, in addition to operations. These interfaces can be specified using `AttrInterface` and `TypeInterface` in place of `OpInterface`. All of the features of `OpInterface` are supported except for the `verify` method, which does not have a matching representation in the Attribute/Type world. Generating these interface can be done using `gen-(attr|type)-interface-(defs|decls|docs)`.

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

4 years ago[mlir] Add support for defining Traits and Interfaces on Attributes/Types.
River Riddle [Tue, 30 Jun 2020 22:42:39 +0000 (15:42 -0700)]
[mlir] Add support for defining Traits and Interfaces on Attributes/Types.

This revisions add mechanisms to Attribute/Type for attaching traits and interfaces. The mechanisms are modeled 1-1 after those for operations to keep the system consistent. AttrBase and TypeBase now accepts a trailing list of `Trait` types that will be attached to the object. These traits should inherit from AttributeTrait::TraitBase and TypeTrait::TraitBase respectively as necessary. A followup commit will refactor the interface gen mechanisms in ODS to support Attribute/Type interface generation and add tests for the mechanisms.

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

4 years ago[clangd] Run formatting operations asynchronously.
Sam McCall [Fri, 26 Jun 2020 10:57:29 +0000 (12:57 +0200)]
[clangd] Run formatting operations asynchronously.

Summary:
They don't need ASTs or anything, so they should still run immediately.

These were sync for historical reasons (they predate clangd having a pervasive
threading model). This worked ok as they were "cheap".
Aside for consistency, there are a couple of reasons to make them async:
 - they do IO (finding .clang-format) so aren't trivially cheap
 - having TUScheduler involved in running these tasks means we can use it as
   an injection point for configuration.
   (TUScheduler::run will need to learn about which file is being operated on,
   but that's an easy change).
 - adding the config system adds more potential IO, too

Reviewers: kbobyrev

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

Tags: #clang

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

4 years ago[BasicAA] Replace -basicaa with -basic-aa in polly
Arthur Eubanks [Tue, 30 Jun 2020 22:40:24 +0000 (15:40 -0700)]
[BasicAA] Replace -basicaa with -basic-aa in polly

Follow up to https://reviews.llvm.org/D82607.

4 years ago[PPC][NFC] Replace TM with Subtarget->getTargetMachine() in preparation for GlobalISel.
Kit Barton [Tue, 30 Jun 2020 17:38:31 +0000 (12:38 -0500)]
[PPC][NFC] Replace TM with Subtarget->getTargetMachine() in preparation for GlobalISel.

There are two uses of TM (instance of TargetMachine) when checking options.
These will not work once we enable GlobalISel. This patch replaces those uses of
TM with Subtarget->getTargetMachine().

4 years agosplit darwin-version-min-load-command.s into Arm64 subtest to avoid failures
Alex Lorenz [Tue, 30 Jun 2020 21:49:01 +0000 (14:49 -0700)]
split darwin-version-min-load-command.s into Arm64 subtest to avoid failures

Some buildbot configurations don't build the arm64 backend, so the test-cases
that need arm64 should go into the aarch64 subdirectory.

4 years ago[X86] Use some preprocessor macros to reduce the very similar repeated code in getVPT...
Craig Topper [Tue, 30 Jun 2020 21:35:07 +0000 (14:35 -0700)]
[X86] Use some preprocessor macros to reduce the very similar repeated code in getVPTESTMOpc. NFCI

This function picks X86 opcode name based on type, masking,
and whether not a load or broadcast has been folded using multiple
switch statements. The contents of the switches mostly just vary in
a few characters in the instruction name. So use some macros to
build the instruction names to reduce the repetiveness.

4 years ago[PowerPC][Power10] Add Vector Splat Imm/Permute/Blend/Shift Double Bit Imm Definition...
Amy Kwan [Tue, 30 Jun 2020 20:12:58 +0000 (15:12 -0500)]
[PowerPC][Power10] Add Vector Splat Imm/Permute/Blend/Shift Double Bit Imm Definitions and MC Tests

This patch adds the td definitions and asm/disasm tests for the
following instructions:

XXSPLTIW
XXSPLTIDP
XXSPLTI32DX
XXPERMX
XXBLENDVB
XXBLENDVH
XXBLENDVW
XXBLENDVD
VSLDBI
VSRDBI

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

4 years ago[clang][diagnostics] Add '-Wundef-prefix' warning option
Zixu Wang [Tue, 30 Jun 2020 16:28:06 +0000 (09:28 -0700)]
[clang][diagnostics] Add '-Wundef-prefix' warning option

Summary:
Add an `-Wundef-prefix=<arg1>,<arg2>...` option, which is similar to `-Wundef`, but only give warnings for undefined macros with the given prefixes.

Reviewers: ributzka, steven_wu, cishida, bruno, arphaman, rsmith

Reviewed By: ributzka, arphaman

Subscribers: riccibruno, dexonsmith, cfe-commits

Tags: #clang

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

This patch was authored by Zixu Wang <zixu_wang@apple.com>

4 years ago[ASTImporter] Fix AST import crash for a friend decl
Vince Bridgers [Tue, 30 Jun 2020 15:08:35 +0000 (10:08 -0500)]
[ASTImporter] Fix AST import crash for a friend decl

Summary:
Running CTU testing, we found that VisitFriendDecl in
ASTImporterLookup.cpp was not handling a particular non-dependent case,
so we reached the llvm_unreachable case.

The FriendDecl and QualType not handled were:

(gdb) p D->dump()
FriendDecl 0x7ffff5cf1958
< <<srcfile>>, 'nlohmann::basic_json<std::map, std::vector,
   std::basic_string<char>, bool, long long, unsigned long long, double,
   std::allocator, adl_serializer, std::vector<unsigned char,
   std::allocator<unsigned char>>>':'nlohmann::basic_json<std::map,
   std::vector, std::basic_string<char>, bool, long long, unsigned long
   long, double, std::allocator, adl_serializer, std::vector<unsigned char,
   std::allocator<unsigned char>>>'

(gdb) p Ty->dump()
SubstTemplateTypeParmType 0x7ffff5cf0df0 'class
nlohmann::basic_json<std::map, std::vector, class
   std::basic_string<char>, _Bool, long long, unsigned long long, double,
   std::allocator, adl_serializer, class std::vector<unsigned char, class
   std::allocator<unsigned char> > >' sugar
|-TemplateTypeParmType 0x7ffff643ea40 'BasicJsonType' dependent depth 0
index 0
| `-TemplateTypeParm 0x7ffff643e9e8 'BasicJsonType'
`-RecordType 0x1012ad20 'class nlohmann::basic_json<std::map,
std::vector, class std::basic_string<char>, _Bool, long long, unsigned
long long, double, std::allocator, adl_serializer, class
std::vector<unsigned char, class std::allocator<unsigned char> > >'
  `-ClassTemplateSpecialization 0x1012ab68 'basic_json'

Reviewers: martong, a.sidorin

Reviewed By: martong

Subscribers: kristof.beyls, rnkovacs, teemperor, cfe-commits, dkrupp

Tags: #clang

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

4 years ago[SVE] Reject vector struct indexes for scalable vectors.
Eli Friedman [Wed, 24 Jun 2020 03:01:07 +0000 (20:01 -0700)]
[SVE] Reject vector struct indexes for scalable vectors.

It's messy to pattern-match, and completely unnecessary: scalar indexes
work equally well.

See also discussion on D81620 and D82061.

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

4 years ago[libc++] Translate the std Lit parameter to the DSL
Louis Dionne [Tue, 30 Jun 2020 18:26:10 +0000 (14:26 -0400)]
[libc++] Translate the std Lit parameter to the DSL

4 years ago[Sanitizer] Remove obsolete assert for OS version checking on Darwin
Julian Lettner [Tue, 30 Jun 2020 20:19:25 +0000 (13:19 -0700)]
[Sanitizer] Remove obsolete assert for OS version checking on Darwin

macOS versions do not necessarily start with 10 anymore.  Remove an
obsolete assert.

4 years ago[BitcodeReader] Fix DelayedShuffle handling for ConstantExpr shuffles.
Eli Friedman [Wed, 20 May 2020 22:08:36 +0000 (15:08 -0700)]
[BitcodeReader] Fix DelayedShuffle handling for ConstantExpr shuffles.

The indexing was messed up, so the result was completely broken.

Shuffle constant exprs are rare in practice; without vscale types,
constant folding generally elminates them. So sort of hard to trip over.

Fixes regression from D72467.

(Recommitting after fix for memory leak.)

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

4 years agoSparc: Use Register
Matt Arsenault [Tue, 30 Jun 2020 20:14:23 +0000 (16:14 -0400)]
Sparc: Use Register

4 years agoRISCV: Don't store function in RISCVMachineFunctionInfo
Matt Arsenault [Tue, 30 Jun 2020 19:41:03 +0000 (15:41 -0400)]
RISCV: Don't store function in RISCVMachineFunctionInfo

Targets should not depend on the MachineFunction state during the
MachineFunctionInfo construction.

4 years agoPPC: Don't store function in PPCFunctionInfo
Matt Arsenault [Tue, 30 Jun 2020 19:36:19 +0000 (15:36 -0400)]
PPC: Don't store function in PPCFunctionInfo

Continue migrating targets from depending on the MachineFunction
during the initial construction.

4 years agoMips: Don't store MachineFunction in MipsFunctionInfo
Matt Arsenault [Thu, 18 Jun 2020 14:19:07 +0000 (10:19 -0400)]
Mips: Don't store MachineFunction in MipsFunctionInfo

It will soon be disallowed to depend on MachineFunction state on
construction.

4 years agoSkip arm-(fp|gp)-read.test on Darwin.
Davide Italiano [Tue, 30 Jun 2020 19:53:20 +0000 (12:53 -0700)]
Skip arm-(fp|gp)-read.test on Darwin.

Our assembler doesn't seem to grok floating point literals.

<rdar://problem/64951608>

4 years ago[TestReturnValue] Skip based on architecutre, not platform.
Davide Italiano [Tue, 30 Jun 2020 19:47:56 +0000 (12:47 -0700)]
[TestReturnValue] Skip based on architecutre, not platform.

4 years ago[lldb/Scalar] Fix undefined behavior
Jonas Devlieghere [Tue, 30 Jun 2020 19:40:25 +0000 (12:40 -0700)]
[lldb/Scalar] Fix undefined behavior

Fix UBSan error detected in TestDataFormatterObjCCF.py and
TestDataFormatterObjCNSDate.py:

Scalar.cpp:698:27: runtime error: -4.96303e+08 is outside the range of
representable values of type 'unsigned long long'.

4 years ago[IR] Delete llvm::Constants using the correct type.
Eli Friedman [Wed, 24 Jun 2020 22:54:21 +0000 (15:54 -0700)]
[IR] Delete llvm::Constants using the correct type.

In most cases, this doesn't have much impact: the destructors just call
the base class destructor anyway.  A few subclasses of ConstantExpr
actually store non-trivial data, though. Make sure we clean up
appropriately.

This is sort of ugly, but I don't see a good alternative given the
constraints.

Issue found by asan buildbots running the testcase for D80330.

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