Commit Graph

344950 Commits

Author SHA1 Message Date
Fangrui Song 71269a1f17 [lldb] Add .clang-tidy with customization to disable readability-identifier-naming
Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D75810
2020-03-09 12:50:28 -07:00
Krzysztof Parzyszek d0ca1041ba [Hexagon] Refactor handling of circular load/store builtins, NFC 2020-03-09 14:40:08 -05:00
Erich Keane cc8390bfe3 Permit attribute 'used' with 'target' multiversioning.
This adds infrastructure for a multiversioning whitelist, plus adds
'used' to the allowed list with 'target'.  The behavior here mirrors the
implementation in GCC, where 'used' only applies to the single
declaration and doesn't apply to the ifunc or resolver.

This is not being applied to cpu_dispatch and cpu_specific, since the
rules are more complicated for cpu_specific, which emits multiple
symbols. Additionally, the author isn't currently aware of uses in the
wild of this combination, but is aware of a number of target+used
combinations.
2020-03-09 12:38:03 -07:00
Matt Arsenault 209094eeb6 AMDGPU/GlobalISel: Start matching s_lshlN_add_u32 instructions
Use a hack to only enable this for GlobalISel.

Technically this also works with SelectionDAG, but the divergence
selection isn't reliable enough and a few cases fail, but I have no
desire to spend time writing the manual expansion code for it. The DAG
actually does a better job since it catches using v_add_lshl_u32 in
the mixed SGPR/VGPR cases.
2020-03-09 12:36:51 -07:00
Akira Hatanaka e4dfc9f5bd Fix the type of the capture passed to LambdaIntroducer::addCapture in
RebuildLambdaScopeInfo

Previously the type of the variable was being passed, which was causing
clang to crash when a non-reference variable was captured by reference
or a reference variable was captured by value by a lambda and a block
nested inside the lambda body was referencing the variable.

Original patch by JF Bastien.

rdar://problem/47550338

Differential Revision: https://reviews.llvm.org/D58164
2020-03-09 12:25:28 -07:00
Cameron McInally 2ab8065df6 [AArch64][SVE] Add missing fp16 DestructiveInstType tests
These tests should have been added with a5b22b768f in D73711.

Differential Revision: https://reviews.llvm.org/D75767
2020-03-09 14:09:23 -05:00
Louis Dionne 97d8d6ab38 [libc++] Enable std::function ABI bug demonstration on Apple Clang too 2020-03-09 15:03:34 -04:00
Hubert Tong dfaafbab46 [www] cxx_status: Update Reflection TS to Cologne draft
Summary:
As of the 2019 Cologne meeting, according to its minutes (N4826), N4818
is the draft of the Reflection TS.

Reviewers: rsmith, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D75524
2020-03-09 14:51:11 -04:00
Hubert Tong f4076ad640 [www] cxx_status: Update title to mention C++20
Summary:
The document covers the Clang implementation status of the "upcoming
C++20 standard". Update the title to match.

Reviewers: rsmith, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D75523
2020-03-09 14:51:11 -04:00
Simon Pilgrim 4b130b883d [X86][SSE] SimplifyDemandedVectorEltsForTargetNode - reduce vector width of X86ISD::BLENDI
If we don't need the upper subvector elements of the BLENDI node then use a smaller vector size.

This causes a couple of minor regressions in insertelement-ones.ll which are more examples of PR26018; given how cheap allones generation is I don't consider that a showstopper, just an annoyance (and there's plenty of other poor codegen cases in that file).
2020-03-09 18:29:28 +00:00
Craig Topper 3dcc0db15e [X86] Teach combineToExtendBoolVectorInReg to create opportunities for using broadcast load instructions.
If we're inserting a scalar that is smaller than the element
size of the final VT, the value of the extra bits doesn't matter.

Previously we any_extended in the scalar domain before inserting.

This patch changes this to use a broadcast of the original
scalar type and then a bitcast to the final type. This might
enable the use of a broadcast load.

This recovers regressions from 07d68c24aa
and 9fcd212e2f without relying on
alignment of the load.

Differential Revision: https://reviews.llvm.org/D75835
2020-03-09 11:26:12 -07:00
JF Bastien 8fc9eea43a Test that volatile load type isn't changed
Summary: As discussed in D75505, it's not particularly useful to change the type of a load to/from floating-point/integer because it's followed by a bitcast, and it might lead to surprising code generation. Check that this doesn't generally happen.

Reviewers: lebedev.ri

Subscribers: jkorous, dexonsmith, ributzka, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75644
2020-03-09 11:19:23 -07:00
Jonathan Roelofs c71ef7a85d Drop HEADER_ per review feedback on D74669 2020-03-09 12:14:22 -06:00
Jonathan Coe cb3f20d27c [clang-format] Correct indentation for `[key] = value,` entries in C++ object initialisers
Summary: Do not use continuation indent for '[' in blocks in C# code.

Reviewers: krasimir

Reviewed By: krasimir

Subscribers: cfe-commits

Tags: #clang-format, #clang

Differential Revision: https://reviews.llvm.org/D75747
2020-03-09 18:04:34 +00:00
LLVM GN Syncbot 4a1b6b0057 [gn build] Port 3486cc014b 2020-03-09 17:56:57 +00:00
Jeremy Stenglein 90e791d732 Add test missed in r843a9778fcd5
Differential Revision: https://reviews.llvm.org/D75768
2020-03-09 10:54:56 -07:00
Nikita Popov 45555c3819 [InstSimplify] Simplify calls with "returned" attribute
If a call argument has the "returned" attribute, we can simplify
the call to the value of that argument. The "-inst-simplify" pass
already handled this for the constant integer argument case via
known bits, which is invoked in SimplifyInstruction. However,
non-constant (or non-int) arguments are not handled at all right now.

This addresses one of the regressions from D75801.

Differential Revision: https://reviews.llvm.org/D75815
2020-03-09 18:53:47 +01:00
Marcello Maggioni a8f76e99ba Fix indentation using clang-format for Spiller.h. NFC
Spiller.h had indentation that doesn't match LLVM guidelines. Fixing it

Reviewers: qcolombet, arsenm

Subscribers: MatzeB, wdng, hiraditya, llvm-commits, qcolombet

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75830
2020-03-09 10:52:28 -07:00
Marcello Maggioni e5205074df Move Spiller.h from lib/ directory path to include/CodeGen. NFC
This allows Spiller.h to be used and included outside of
the lib/CodeGen directory. For example to be used in the
lib/Target directory or other places.
2020-03-09 10:52:28 -07:00
Nikita Popov c3ca6876ed [InstCombine] Don't simplify calls without uses
When simplifying a call without uses, replaceInstUsesWith() is
going to do nothing, but we'll skip all following folds. We can
only run into this problem with calls that both simplify and are
not trivially dead if unused, which currently seems to happen only
with calls to undef, as the test diff shows. When extending
SimplifyCall() to handle "returned" attributes, this becomes a much
bigger problem, so I'm fixing this first.

Differential Revision: https://reviews.llvm.org/D75814
2020-03-09 18:47:46 +01:00
Nikita Popov 829d377a98 [InstSimplify] Don't simplify musttail calls
As pointed out by jdoerfert on D75815, we must be careful when
simplifying musttail calls: We can only replace the return value
if we can eliminate the call entirely. As we can't make this
guarantee for all consumers of InstSimplify, this patch disables
simplification of musttail calls. Without this patch, musttail
simplification currently results in module verification errors.

Differential Revision: https://reviews.llvm.org/D75824
2020-03-09 18:46:56 +01:00
Jeremy Stenglein 843a9778fc Add a warning for builtin_return_address/frame_address with > 0 argument
Clang is missing a warning for
builtin_return_address/builtin_frame_address called with > 0 argument.
Gcc provides a warning for this via -Wframe-address:

https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html

As calling these functions with argument > 0 has caused several crashes
for us, we would like to have the same warning as gcc here. This diff
adds the warning and makes it part of -Wmost.

Differential Revision: https://reviews.llvm.org/D75768
2020-03-09 10:43:09 -07:00
Jonathan Coe eb682b8027 [clang-format] C# does not indent braced initializers as continuations
Summary: C# treats object initializers as braced init blocks. Braced init blocks are no longer indented as continuations.

Reviewers: krasimir

Reviewed By: krasimir

Subscribers: cfe-commits

Tags: #clang-format, #clang

Differential Revision: https://reviews.llvm.org/D75731
2020-03-09 17:36:21 +00:00
Nicolas Vasilache 63b683a816 [mlir][Vector] Add a vector.matrix_multiply op on 1-D vectors
Summary: This op mirrors the llvm.intr counterpart and allows lowering + type conversions in a progressive fashion.

Differential Revision: https://reviews.llvm.org/D75775
2020-03-09 13:34:03 -04:00
Jonathan Roelofs 47caa69120 [clang-tidy] Use ; as separator for HeaderFileExtensions
... and deprecate use of ',' for the same.

https://reviews.llvm.org/D75621
2020-03-09 11:32:44 -06:00
Jonathan Roelofs 3486cc014b [clang-tidy] Generalize HeaderFileExtensions.{h,cpp}. NFC
https://reviews.llvm.org/D75489
2020-03-09 11:32:44 -06:00
Jonathan Coe b28ed9cec8 [clang-format] cleanup from D75517
Summary:
Fix typo in comment.

Add closing brace to test text.

Reviewers: krasimir

Subscribers: cfe-commits

Tags: #clang-format, #clang

Differential Revision: https://reviews.llvm.org/D75856
2020-03-09 17:31:36 +00:00
Nicolas Vasilache 90322403c2 [mlir][Vector] Allow lowering of vector.shape_cast 2D <-> 1D
Summary:
This will support the progressive lowering of:
```
vector.contract ->
  downcast + vector.matrix_multiply + upcast ->
    llvm.intr.matrix
```

Differential Revision: https://reviews.llvm.org/D75776
2020-03-09 13:14:39 -04:00
Nicolas Vasilache 55622fd4f3 [mlir][LLVM] Add remaining llvm.matrix intrinsics
Summary:
This revision adds intrinsics for transpose, columnwise.load and columnwise.store
achieving full coverage of the llvm.matrix intrinsics.

Differential Revision: https://reviews.llvm.org/D75852
2020-03-09 13:08:49 -04:00
Jonas Devlieghere 12ba989eef [lldb/Process] Update ThreadKDP for API change
GetUnwinder now returns a reference instead of a pointer.
2020-03-09 10:01:53 -07:00
Nicolas Vasilache c494ff05ed [mlir] NFC - Add predicates and types for VectorOfRank
Summary:
This is the counterpart of VectorOfLength for ranks.
This will be used in lowering vector.contract operations to llvm.matrix

Differential Revision: https://reviews.llvm.org/D75771
2020-03-09 12:53:37 -04:00
Michael Kruse 0e93f3b0a0 [Polly] Replace use of std::stringstream. NFC.
Use of std::-style (io)streams is discouraged in the LLVM coding style
(https://llvm.org/docs/CodingStandards.html#include-iostream-is-forbidden).
Replace with a use of llvm::Twine (which uses llvm::raw_ostream behind
the scenes).
2020-03-09 11:35:34 -05:00
aartbik d1186fcb04 [mlir] [ExecutionEngine] add option to enable/disable GDB notification listener
Summary:
This way, clients can opt-out of the GDB notification listener. Also, this
changes the semantics of enabling the object cache, which seemed the wrong
way around.

Reviewers: rriddle, nicolasvasilache, ftynse, andydavis1

Reviewed By: nicolasvasilache

Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75787
2020-03-09 09:26:03 -07:00
Mikhail Maltsev cdeeb548bb [ARM,CDE] Implement CDE feature test macros
Summary:
This patch implements feature test macros for the CDE extension
according to the upcoming ACLE specification.

The following 2 macros are being added:
- __ARM_FEATURE_CDE - defined as '1' when any coprocessor is
  configured as a CDE coprocessor
- __ARM_FEATURE_CDE_COPROC - defined as an 8-bit mask, each bit of the
  mask corresponds to a coprocessor and is set when the corresponding
  coprocessor is configured as CDE (and cleared otherwise).

The patch also exposes the value of __ARM_FEATURE_CDE_COPROC in the
target-independent method TargetInfo::getARMCDECorpocMask, the method
will be used in follow-up patches implementing semantic checks of CDE
intrinsics (we want to diagnose the cases when CDE intrinsics are used
with coprocessors that are not configured as CDE).

Reviewers: simon_tatham, dmgreen, ostannard, MarkMurrayARM

Reviewed By: simon_tatham

Subscribers: kristof.beyls, danielkiss, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D75843
2020-03-09 16:14:06 +00:00
Shiva Chen c3d981aeba [RISCV] Add new SchedRead SchedWrite
The patch fixes some typos and introduces ReadFMemBase, ReadFSGNJ32,
ReadFSGNJ64, WriteFSGNJ32, WriteFSGNJ64, ReadFMinMax32, ReadFMinMax64,
WriteFMinMax32, WriteFMinMax64, so the target CPU with different pipeline model
could use them to describe latency.

Differential Revision: https://reviews.llvm.org/D75515
2020-03-10 00:12:27 +08:00
Jay Foad daf686b7b9 [AMDGPU] Remove unused SchedWrite class 2020-03-09 16:09:43 +00:00
LLVM GN Syncbot 3b64bf7b01 [gn build] Port 882f589e20 2020-03-09 16:03:39 +00:00
Jonas Devlieghere 882f589e20 Revert "[AssumeBundles] Move to IR so it can be used by Analysis"
This breaks the modules build:

http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/
http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/

This reverts commit 57c964aaa7.
2020-03-09 09:02:47 -07:00
Kirstóf Umann 58884eb648 [analyzer][NFC] Refactor the checker registration unit test file
Nothing exciting to see here! The new interface allows for more fine tuning
(register but disable a checker, add custom checker registry functions, etc),
that was basically the point.

Differential Revision: https://reviews.llvm.org/D67335
2020-03-09 16:38:30 +01:00
Muhammad Omair Javaid 2b6ad82f8d [lldb/test] Fix arch arm for 32-bit armv7l/armv8l
This patch forces architecture "arm" if underlying os reports core
armv7l or armv8l. On linux systems 32 bit sysroot running on 64bit
AArch64 hardware reports armv7l or armv8l which is essently arm
32bit mode. This fixes 5 testcases on 32bit arm.
2020-03-09 20:32:18 +05:00
Fangrui Song 92b5b980d2 [ELF] Postpone evaluation of ORIGIN/LENGTH in a MEMORY command
```
createFiles(args)
 readDefsym
 readerLinkerScript(*mb)
  ...
   readMemory
    readMemoryAssignment("ORIGIN", "org", "o") // eagerly evaluated
target = getTarget();
link(args)
 writeResult<ELFT>()
  ...
   finalizeSections()
    script->processSymbolAssignments()
     addSymbol(cmd) // with this patch, evaluated here
```

readMemoryAssignment eagerly evaluates ORIGIN/LENGTH and returns an uint64_t.
This patch postpones the evaluation to make

* --defsym and symbol assignments
* `CONSTANT(COMMONPAGESIZE)` (requires a non-null `lld:🧝:target`)

work. If the expression somehow requires interaction with memory
regions, the circular dependency may cause the expression to evaluate to
a strange value. See the new test added to memory-err.s

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D75763
2020-03-09 08:31:41 -07:00
Erich Keane 7b66160828 Fix Target Multiversioning renaming.
The initial implementation only did 'first declaration renaming' when
a default version came after. This is insufficient in cases where a
default does not exist, so this patch makes sure that we do the renaming
in all cases.

This renaming is necessary because we emit the first declaration before
knowing that it IS a target multiversion function, which would change
its name. The second declaration (the one that caused the
multiversioning) then needs to make sure that the first one has its name
changed to be consistent with the resolver usage.
2020-03-09 08:29:18 -07:00
Fangrui Song 2fed3ca3b5 [lld] Add .clang-tidy to customize readability-identifier-naming.{Member,Parameter,Variable}Case => camelBack
lld/.clang-tidy is almost identical to the top-level .clang-tidy, with the aforementioned customization.

Reviewed By: ruiu

Differential Revision: https://reviews.llvm.org/D75809
2020-03-09 08:26:41 -07:00
Fangrui Song 0d673be13a [llvm-objdump] Rename --disassemble-functions to --disassemble-symbols
https://bugs.llvm.org/show_bug.cgi?id=41910

The feature can disassemble data and the new option name reflects its
more generic usage.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D75816
2020-03-09 08:25:45 -07:00
Pavel Labath 34d7143b03 [lldb] Fix windows build, second attempt 2020-03-09 16:24:34 +01:00
Fangrui Song 6d026c89dc [llvm-objdump][test] Move binary format specific tests under COFF/ ELF/ MachO/ XCOFF/ wasm/
Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D75798
2020-03-09 08:04:48 -07:00
Haojian Wu e669d81715 [clangd] Bump vscode-clangd v0.0.21.
CHANGELOG:
- better ranking for completions
- enable dot-to-arrow fix in code completion
2020-03-09 15:36:49 +01:00
Alexander Belyaev 3147342ae7 [MLIR] Change custom printer/parser for loop.parallel and loop.reduce. 2020-03-09 15:11:48 +01:00
Krzysztof Parzyszek 44205891ed [Hexagon] Fix match pattern in a testcase 2020-03-09 09:09:58 -05:00
Pavel Labath 24b1831ebf [lldb] Fix windows&freebsd builds for c0b1af68 2020-03-09 14:55:43 +01:00