Commit Graph

426753 Commits

Author SHA1 Message Date
Daniel Bertalan
d61341768c [lld-macho] Group undefined symbol diagnostics by symbol
ld64.lld used to print the "undefined symbol" line for each reference to
an undefined symbol previously:

  ld64.lld: error: undefined symbol: _foo
  >>> referenced by /path/to/bar.o:(symbol _baz+0x0)

  ld64.lld: error: undefined symbol: _foo
  >>> referenced by /path/to/bar.o:(symbol _quux+0x1)

Now they are deduplicated:

  ld64.lld: error: undefined symbol: _foo
  >>> referenced by /path/to/bar.o:(symbol _baz+0x0)
  >>> referenced by /path/to/bar.o:(symbol _quux+0x1)

As with the other lld ports, only the first 3 references are printed.

Differential Revision: https://reviews.llvm.org/D127753
2022-06-14 16:38:11 -04:00
Florian Hahn
7c0089d735
[Matrix] Check if iterator is at beginning of BB in optimizeTranspose.
If an instruction at the beginning of a block is erased,  this may
trigger crash due to dereferencing an invalid iterator.

Check if II is at the end before dereferencing it.

Reviewed By: thegameg

Differential Revision: https://reviews.llvm.org/D127736
2022-06-14 21:37:02 +01:00
Okwan Kwon
1a19abf38c [mlir] add an option to print op stats in JSON
Differential Revision: https://reviews.llvm.org/D127691
2022-06-14 13:06:25 -07:00
Joseph Huber
c4a2674e21 [Clang] Simplify unifying target features
This patch simplifies how we unify target features. Now we simply
iterate the input in reverse and only insert the feature if it hasn't
been seen yet. The only reason we need to reverse this at the end is to
keep the features in order for the existing tests.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D127707
2022-06-14 15:58:16 -04:00
Paul Robinson
10affe74ed [PS5] Make library function availability match PS4 2022-06-14 12:47:06 -07:00
Shivam
6ccc2733e7
Update ASTImportError.h 2022-06-15 00:45:07 +05:30
isuckatcs
caf2767c47 [Clang][AST] Fixed BindingDecl AST-dump for tuple like structures
The AST of a BindingDecl in case of tuple like structures wasn't
properly printed. For these bidnings there is information stored
in BindingDecl::getHoldingVar(), and this information was't
printed in the AST-dump.

Differential Revision: https://reviews.llvm.org/D126131
2022-06-14 21:13:04 +02:00
Amir Ayupov
6226e46c5f [X86][NFC] Use mnemonic tables in validateInstruction 3/4
Group switch cases by opcode:
- V4FMADDPS
- V4FMADDSS
- V4FNMADDPS
- V4FNMADDSS
- VP4DPWSSDS
- VP4DPWSSD

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D127718
2022-06-14 12:11:47 -07:00
phyBrackets
9d637956b7 [clang][NFC][AST] rename the ImportError to ASTImportError
this patch is the continuation of my previous patch regarding the ImportError in ASTImportError.h

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D125340
2022-06-15 00:40:32 +05:30
Amir Ayupov
df16c077dc [X86][NFC] Use mnemonic tables in validateInstruction 2/4
Group switch cases by opcode:
- VFCMULCPH
- VFCMULCSH
- VFMULCPH
- VFMULCSH

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D127717
2022-06-14 12:09:37 -07:00
Amir Ayupov
4bf928bce4 [X86][NFC] Use mnemonic tables in validateInstruction 1/4
Group switch cases by opcode:
- VFCMADDCPH
- VFCMADDCSH
- VFMADDCPH
- VFMADDCSH

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D127716
2022-06-14 12:06:23 -07:00
Sanjay Patel
8605b4d8c5 [ValueTracking] recognize sub X, (X -nsw Y) as not overflowing
This extends a similar pattern from D125500.
If we know that operand 1 (RHS) of a subtract is itself a
non-overflowing subtract from operand 0 (LHS), then the
final/outer subtract is also non-overflowing:
https://alive2.llvm.org/ce/z/Bqan8v

InstCombine uses this analysis to trigger a narrowing
optimization, so that is what the first changed test shows.

The last test models the motivating case from issue #48013.
In that example, we determine 'nsw' on the first sub from
the srem, then we determine that the 2nd sub can be narrowed,
and that leads to eliminating both subtracts.

This works for unsigned sub too, but I left that out to keep
the patch minimal. If this looks ok, I will follow up with
that change. There are also several missing subtract narrowing
optimizations demonstrated in the tests above the diffs shown
here - those should be handled in InstCombine with another set
of patches.

Differential Revision: https://reviews.llvm.org/D127754
2022-06-14 14:51:49 -04:00
Groverkss
87b8b377cc [MLIR][Presburger] Fix spellings of attachment 2022-06-15 00:10:54 +05:30
Philip Reames
44a0a558dc [RISCV] Split out subfields in InsertVSETVLI's demanded fields analysis [nfc]
At the moment, this just gets the infrastructure in place.  Following changes will start using this in non-trivial ways.
2022-06-14 11:35:24 -07:00
Krzysztof Drewniak
75bfc6f295 [mlir][Arith] Implement InferIntRangeInterface for arithmetic ops
Depends on D124023

Reviewed By: Mogball, rriddle

Differential Revision: https://reviews.llvm.org/D124022
2022-06-14 18:30:34 +00:00
Katherine Rasmussen
473d780692 [flang] Add team_type to num_images intrinsic call
num_images had previously been added to the list of intrinsics
before the type team_type had been implemented. Now that team_type
is implemented, add the num_images call that has the team argument.
Update the semantics tests for num_images.

Reviewed By: craig.rasmussen

Differential Revision: https://reviews.llvm.org/D126734
2022-06-14 11:28:46 -07:00
Nikolas Klauser
e7c72d69ac [libc++] Find a clang-format everybody is happy with
We decided that we want to use clang-format for libc++ but we haven't decided yet how the code should be formatted. We should probably discuss things on discord. This PR is mostly to show how the clang-format would look like and to commit to one once we decided on it. I'll remove the `<string>` diff when I commit this PR.

Reviewed By: ldionne

Spies: EricWF, dschuff, krytarowski, fedor.sergeev, aheejin, mstorsjo, phosek, abrachet, libcxx-commits, arichardson

Differential Revision: https://reviews.llvm.org/D124789
2022-06-14 20:12:33 +02:00
Alex Brachet
93c46e9632 [libc++] Use explicit module cache path in tests
For reference, this test creates about 1.5G in the cache
directory. By default this will go to ~/.cache/clang/
which can fill up quick. This changes the test to put the
cache path in lit temp directories. Size considerations
aside it makes sense for tests to be hermetic and not
touch global system state.

Differential revision: https://reviews.llvm.org/D127587
2022-06-14 18:06:59 +00:00
Groverkss
127780e5b7 [MLIR][Presburger] Add values to PresburgerSpace
This patch allows attaching user information, called "values" to each
identifier. The values are used to carry information along with variables and
are also used to determine if two variables are identical.

This patch is part of a series of patches to allow attaching user information
with variables in Presburger library.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D127347
2022-06-14 23:15:10 +05:30
David Tenty
73c273c97a [NFC][libcxx] Check def of __LONG_DOUBLE_IEEE128__
Follow on to https://reviews.llvm.org/D108352, also check for the
definition of __LONG_DOUBLE_128__ before using it (because AIX doesn't
enable it by default).

Reviewed By: xingxue

Differential Revision: https://reviews.llvm.org/D127002
2022-06-14 13:41:31 -04:00
Paul Robinson
c36eebb52e [PS5] Use __gxx_personality_v0 for TSan 2022-06-14 10:39:34 -07:00
Balazs Benics
21ff652de9 [analyzer][NFC] Replace getLastArg with hasArg when applicable
Depends on D126215.
2022-06-14 19:28:44 +02:00
Petr Hosek
18a1fc8459 [CMake][compiler-rt] Provide a dedicated option for LLVM unwinder
This allows configuring LLVM unwinder separately from the C++ library
matching how we configure it in libcxx.

This also applies changes made to libunwind+libcxxabi+libcxx in D113253
to compiler-rt.

Differential Revision: https://reviews.llvm.org/D115674
2022-06-14 17:26:25 +00:00
Jake Egan
3af7aa5202 [libcxx][AIX] Enable ABI list checking for XCOFF
The existing nm extractors can't dump the loader symbol table information we need to do the ABI checks for XCOFF, so provide an implementation using the system dump utility. We match the symbol name, whether it's defined, it's import/export status, and its storage mapping class.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D124165
2022-06-14 13:16:00 -04:00
Balazs Benics
cf078adc90 [analyzer][NFC] Remove unused ExprEngine::evalBinOp functions
Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D127732
2022-06-14 19:15:20 +02:00
Philip Reames
52b166c0de [RISCV] Split out getEEWForLoadStore [nfc]
Mostly about allowing reuse in an upcoming patch, but also makes the code slightly easier to follow.
2022-06-14 10:10:43 -07:00
Balazs Benics
40940fb2a6 [analyzer][NFC] Substitute the SVal::evalMinus and evalComplement functions
Depends on D126127

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D127734
2022-06-14 18:56:43 +02:00
Balazs Benics
cfc915149c [analyzer][NFC] Relocate unary transfer functions
This is an initial step of removing the SimpleSValBuilder abstraction. The SValBuilder alone should be enough.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126127
2022-06-14 18:56:43 +02:00
Luboš Luňák
4d27c154a5 remove a duplicated include 2022-06-14 18:55:26 +02:00
Mogball
9dea117283 [mlir] Add a generic data-flow analysis framework
This patch introduces a generic data-flow analysis framework to MLIR. The framework implements a fixed-point iteration algorithm and a dependency graph between lattice states and analysis. Lattice states and points are fully extensible to support highly-customizable analyses.

Reviewed By: phisiart, rriddle

Differential Revision: https://reviews.llvm.org/D126751
2022-06-14 16:54:15 +00:00
Danila Malyutin
3b54aa9eab freeze does not change the constant property
Traverse through freeze when checking if base is constant

Differential Revision: https://reviews.llvm.org/D127744
2022-06-14 19:53:26 +03:00
Stefan Pintilie
263f1b2f5d [PowerPC] Fix combine step for shufflevector.
The combine step for shufflevector will sometimes replace undef in the mask
with a defined value. This can cause an infinite loop in some cases as another
combine will then put the undef back in the mask.

This patch fixes the issue so that undefs are not replaced when doing a combine.

Reviewed By: ZarkoCA, amyk, quinnp, saghir

Differential Revision: https://reviews.llvm.org/D127439
2022-06-14 11:31:24 -05:00
Benjamin Kramer
ba0222cdc6 [mlir][linalg] Add named ops for depthwise 3d convolution
Also complete the set by adding a variant of depthwise 1d convolution
with the multiplier != 1.

Differential Revision: https://reviews.llvm.org/D127687
2022-06-14 18:22:47 +02:00
Matheus Izvekov
671eb7dc1e
[clang] AST/Print: honor AlwaysIncludeTypeForTemplateArgument policy
This redoes D103040 in a way that `AlwaysIncludeTypeForTemplateArgument = false`
policy is honored for printing template specialization types.
This can be seen for example when printing a canonicalized
dependent TemplateSpecializationType which has integral arguments.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: v.g.vassilev

Differential Revision: https://reviews.llvm.org/D126620
2022-06-14 18:18:24 +02:00
Jay Foad
3035cc5bdb [AMDGPU] Regenerate MIR checks for image instructions 2022-06-14 17:04:36 +01:00
Alex Zinenko
069ca6f7a3 [mlir] fix compiler error due to commit landing race 2022-06-14 18:04:00 +02:00
Alex Zinenko
e3890b7fd6 [mlir] Introduce transform.alternatives op
Introduce a transform dialect op that allows one to attempt different
transformation sequences on the same piece of payload IR until one of them
succeeds. This op fundamentally expands the scope of possibilities in the
transform dialect that, until now, could only propagate transformation failure,
at least using in-tree operations. This requires a more detailed specification
of the execution model for the transform dialect that now indicates how failure
is handled and propagated.

Transformations described by transform operations now have tri-state results,
with some errors being fundamentally irrecoverable (e.g., generating malformed
IR) and some others being recoverable by containing ops. Existing transform ops
directly implementing the `apply` interface method are updated to produce this
directly. Transform ops with the `TransformEachTransformOpTrait` are currently
considered to produce only irrecoverable failures and will be updated
separately.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D127724
2022-06-14 17:51:30 +02:00
Sanjay Patel
304cda0b16 [InstCombine] add tests for sub with extended operands; NFC 2022-06-14 11:24:06 -04:00
Jin Xin Ng
9f2b873a7d [inliner] Add per-SCC-pass InlineAdvisor printing option
Adds option to print the contents of the Inline Advisor after each SCC Inliner pass

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D127689
2022-06-14 08:06:52 -07:00
Alex Brachet
60d4a10710 [libc] Guard common macro names
Differential revision: https://reviews.llvm.org/D127692
2022-06-14 15:05:16 +00:00
Serge Pavlov
6117784c5f [NFC] Remove unused function parameter 2022-06-14 22:00:59 +07:00
Philip Reames
7659dc6cdd [RISCV] simplify emitVSETVLIs handling of vsetvli xN, phi(), vtype case [NFC]
This is possibly somewhat subjective, but having an explicitly named flag to track the property required and code structure that more closely matches phase 1/2 of the dataflow seems much easier to read.

Differential Revision: https://reviews.llvm.org/D126893
2022-06-14 08:00:24 -07:00
Shivam Gupta
48e1829874 [Diagnostics] Fix inconsistent shift-overflow warnings in C++20
This fixes https://github.com/llvm/llvm-project/issues/52873.
Don't warn in C++2A mode (and newer), as signed left shifts
always wrap and never overflow. Ref. -
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1236r1.html.
2022-06-14 20:19:46 +05:30
Joseph Huber
d5d836635c [Libomptarget] Add test config for compiling in LTO-mode
We are planning on making LTO the default compilation mode for
offloading. In order to make sure it works we should run these tests on
the test suite. AMDGPU already uses the LTO compilation path for its
linking, but in LTO mode it also links the static library late.

Performing LTO requires the static library to be built, if we make the
change this will be a hard requirement and the old bitcode library will
go away. This means users will need to use either a two-step build or a
runtimes build for libomptarget.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D127512
2022-06-14 10:16:03 -04:00
Valentin Clement
3260d42398
[flang] Avoid losing type parameter information
This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: jeanPerier

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

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
2022-06-14 15:57:56 +02:00
Louis Dionne
0c66a4ce0a Add __config formatting to .git-blame-ignore-revs 2022-06-14 09:52:49 -04:00
Daniel Bertalan
f2e92cf60e [lld-macho] Print the name of functions containing undefined references
The error used to look like this:

  ld64.lld: error: undefined symbol: _foo
  >>> referenced by /path/to/bar.o

Now it displays the name of the function that contains the undefined
reference as well:

  ld64.lld: error: undefined symbol: _foo
  >>> referenced by /path/to/bar.o:(symbol _baz+0x4)

Differential Revision: https://reviews.llvm.org/D127696
2022-06-14 09:41:28 -04:00
Lucas Prates
cbcce82ef6 [NFC][Thumb] Update frame-chain codegen test to use thumbv6m
The `llvm/test/CodeGen/Thumb/frame-chain.ll`, recently added by D125094,
currently fails when expensive checks are enabled due to a tMOVr
instruction that is only valid from V6 onwards.

The use of the invalid instruction is unrelated to the contents of the
original patch, and continues to be triggered by this test if its
CodeGen changes are reverted, so this patch updates the test to use V6-M
while the issue is not resolved.
2022-06-14 14:36:57 +01:00
Joe Nash
989bd57f98 [AMDGPU] gfx11 support add_f16
The instruction was skipped in the earlier large patch adding
VOP2, https://reviews.llvm.org/D126917.

Reviewed By: rampitec, #amdgpu

Differential Revision: https://reviews.llvm.org/D127697
2022-06-14 08:59:45 -04:00
Serguei Katkov
d713f0eab8 Revert "[MachineSSAUpdater] compile time improvement in GetValueInMiddleOfBlock"
It looks like it causes buildbot failures.
As an example: https://lab.llvm.org/buildbot/#/builders/121/builds/20364

Revert to investigate...

This reverts commit 6bf2791814.
2022-06-14 20:27:21 +07:00