Commit Graph

426785 Commits

Author SHA1 Message Date
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
Joseph Huber 6a6484c666 [OpenMP] Fix offload packager not writing to temps correctly
The offloading packager doesn't have a normal offloading kind. This
would result in its output being sent to the executable name when in
save-temps mode. This would then get overwritten by the actual output.
This patch adds specific checks to make sure that it gets the correct
name.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D127673
2022-06-14 09:16:28 -04:00
Louis Dionne ee78181f34 [libc++] Remove macros for IBM compiler
It's not tested or used anymore -- instead a Clang-based compiler is
used on IBM nowadays.

Differential Revision: https://reviews.llvm.org/D127650
2022-06-14 09:15:41 -04:00
Vir Narula 81e890057d
[AArch64] Add cost tests for fadd reductions with fast math flags.
Add test coverage showing how the costs of fadd reductions is
overestimated at the moment.

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D127682
2022-06-14 14:13:12 +01:00
David Green 1da6940275 [ARM] Add more opaque pointer gather/scatter tests. NFC
Some of the newly added tests are incorrect, fixed in D127733.
2022-06-14 14:08:43 +01:00
David Sherwood bd61664167 [AArch64][SME] Add ldr/str (fill/spill) intrinsics
This patch adds implementations for the fill/spill SME ACLE intrinsics:

    @llvm.aarch64.sme.ldr
    @llvm.aarch64.sme.str

Differential Revision: https://reviews.llvm.org/D127317
2022-06-14 13:58:22 +01:00
Jay Foad d393538c7f [AMDGPU] Add a GFX11 MCA test
This mostly just tests that DPFP is 1/32 rate on GFX11, instead of 1/16
rate as on GFX10.
2022-06-14 13:47:29 +01:00
Jean Perier ac64c7b987 [flang] Support PDT declaration with initial comp value in internal procedure
Lowering was crashing with "fatal internal error: node has not been analyzed"
if a PDT with initial component value was defined inside an internal
procedure. This is because the related expression cannot be analyzed
without the component values (which happens at the instatiation).
These expression do not need to be visited (the instantiations, if any
will be). Use the form of GetExpr that tolerates the parse tree expression
to not be analyzed into an evaluate::Expr when looking through the
symbols used in an internal procedure.

Note that the PDTs TODO will then fire (it happens after the PFT
analysis) as expected if the derived type is used.

Differential Revision: https://reviews.llvm.org/D127735
2022-06-14 14:46:12 +02:00
Lucas Prates 7625e01d66 [ARM][Thumb] Command-line option to ensure AAPCS compliant Frame Records
Currently the a AAPCS compliant frame record is not always created for
functions when it should. Although a consistent frame record might not
be required in some cases, there are still scenarios where applications
may want to make use of the call hierarchy made available trough it.

In order to enable the use of AAPCS compliant frame records whilst keep
backwards compatibility, this patch introduces a new command-line option
(`-mframe-chain=[none|aapcs|aapcs+leaf]`) for Aarch32 and Thumb backends.
The option allows users to explicitly select when to use it, and is also
useful to ensure the extra overhead introduced by the frame records is
only introduced when necessary, in particular for Thumb targets.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D125094
2022-06-14 13:37:51 +01:00
Florian Hahn e5c4308ba1
[InterleavedLoadComb] Rename uses when inserting new uses.
This fixes a crash due to uses needing to be renamed.
2022-06-14 13:15:23 +01:00
Jun Zhang 44f0a2658d
Revert "Reland "[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder""
This reverts commit 781ee538da.

Asan build is still broken :(
2022-06-14 19:53:17 +08:00
Balazs Benics de6ba9704d [analyzer][Casting] Support isa, cast, dyn_cast of SVals
This change specializes the LLVM RTTI mechanism for SVals.
After this change, we can use the well-known `isa`, `cast`, `dyn_cast`.

Examples:

  // SVal V = ...;
  // Loc MyLoc = ...;

  bool IsInteresting = isa<loc::MemRegionVal, loc::GotoLabel>(MyLoc);
  auto MRV = cast<loc::MemRegionVal>(MyLoc);
  Optional<loc::MemRegionVal> MaybeMRV = dyn_cast<loc::MemRegionVal>(V)

The current `SVal::getAs` and `castAs` member functions are redundant at
this point, but I believe that they are still handy.

The member function version is terse and reads left-to-right, which IMO
is a great plus. However, we should probably add a variadic `isa` member
function version to have the same casting API in both cases.

Thanks for the extensive TMP help @bzcheeseman!

Reviewed By: bzcheeseman

Differential Revision: https://reviews.llvm.org/D125709
2022-06-14 13:43:04 +02:00
Serguei Katkov 6bf2791814 [MachineSSAUpdater] compile time improvement in GetValueInMiddleOfBlock
GetValueInMiddleOfBlock uses result of GetValueAtEndOfBlockInternal if there is no value
defined for current basic block.

If there is already a value it tries (in this order):

to find single register coming from all predecessors
find existing phi node which matches our incoming registers
build new phi.
The compile time improvement is to use current available value if
it is defined out of current BB or it is a PHI register.
This is due to it can be used in the middle basic block.

Reviewed By: sameerds
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D126523
2022-06-14 18:00:34 +07:00
Guillaume Chatelet b4cf74dc9e [NFC] Remove dead code 2022-06-14 10:56:37 +00:00
Guillaume Chatelet d9b8d13f8b [NFC][Alignment] Use MaybeAlign in CGCleanup/CGExpr 2022-06-14 10:56:36 +00:00
Guillaume Chatelet 77bba68de6 [NFC][Alignment] Use Align in CoroFrame 2022-06-14 10:56:36 +00:00
Guillaume Chatelet c0e85f1c3b [NFC][Alignment] Use Align in SafeStack 2022-06-14 10:56:36 +00:00
Guillaume Chatelet 6725d80640 [NFC][Alignment] Use Align in shouldAlignPointerArgs 2022-06-14 10:56:36 +00:00
Guillaume Chatelet 6fd480d957 [NFC][Alignment] use getAlign in AddressSanitizer 2022-06-14 10:56:36 +00:00