Joe Nash [Thu, 12 May 2022 17:32:19 +0000 (13:32 -0400)]
[AMDGPU] gfx11 ds instructions
MC layer support for ds instructions
Contributors:
Piotr Sobczak <Piotr.Sobczak@amd.com>
Patch 14/N for upstreaming of AMDGPU gfx11 architecture.
Depends on D126463
Reviewed By: arsenm, #amdgpu
Differential Revision: https://reviews.llvm.org/D126468
Paul Robinson [Thu, 2 Jun 2022 18:00:32 +0000 (11:00 -0700)]
[PS5] Make passing unions in registers match PS4 ABI
Paul Robinson [Thu, 2 Jun 2022 17:53:40 +0000 (10:53 -0700)]
[PS5] Classify __m64 as integer, matching PS4 ABI
Balazs Benics [Thu, 2 Jun 2022 17:46:38 +0000 (19:46 +0200)]
[llvm][analyzer][NFC] Introduce SFINAE for specializing FoldingSetTraits
Reviewed By: martong
Differential Revision: https://reviews.llvm.org/D126803
Balazs Benics [Thu, 2 Jun 2022 17:46:38 +0000 (19:46 +0200)]
[analyzer][NFC] Uplift checkers after D126801
Reviewed By: martong
Differential Revision: https://reviews.llvm.org/D126802
Balazs Benics [Thu, 2 Jun 2022 17:46:38 +0000 (19:46 +0200)]
[analyzer][NFC] Add partial specializations for ProgramStateTraits
I'm also hoisting common code from the existing specializations into a
common trait impl to reduce code duplication.
Reviewed By: martong
Differential Revision: https://reviews.llvm.org/D126801
Will Hawkins [Thu, 2 Jun 2022 17:43:11 +0000 (19:43 +0200)]
[libc++] Fix typo in comment at __optional_storage_base
Small typo fix(es) for struct definition of __optional_storage_base for
a reference type.
Reviewed By: #libc, jloser, philnik
Differential Revision: https://reviews.llvm.org/D126621
Ashay Rane [Sun, 29 May 2022 00:33:04 +0000 (17:33 -0700)]
[mlir] translate memref.reshape with static shapes but dynamic dims
Prior to this patch, the lowering of memref.reshape operations to the
LLVM dialect failed if the shape argument had a static shape with
dynamic dimensions. This patch adds the necessary support so that when
the shape argument has dynamic values, the lowering probes the dimension
at runtime to set the size in the `MemRefDescriptor` type. This patch
also computes the stride for dynamic dimensions by deriving it from the
sizes of the inner dimensions.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D126604
Craig Topper [Thu, 2 Jun 2022 16:37:05 +0000 (09:37 -0700)]
[RISCV] Add test case showing unnecessary extend after i32 smax on rv64. NFC
One of the operands of the smax is a positive value so computeKnownBits
determines the result of the smax must always be positive. This allows
DAG combiner to convert the sign extend to zero extend before type
legalization.
After type legalization the smax is promoted to i64 by sign extending
its inputs and the zero extend becomes an AND instruction. We are unable
to remove the AND at this point and it becomes a pair of shifts or a
zext.w.
The result of smax has as many sign bits as the minimum of its inputs.
Had we kept the sign extend instead of turning it into a zero extend
it would be removed by DAG combiner after type legalization.
Luís Ferreira [Thu, 2 Jun 2022 16:01:04 +0000 (16:01 +0000)]
[lldb][NFC] Move non-clang specific method to the generic DWARF Parser
This patch renames DW_ACCESS_to_AccessType function and move it to the abstract
DWARFASTParser, since there is no clang-specific code there. This is useful for
plugins other than Clang.
Reviewed By: shafik, bulbazord
Differential Revision: https://reviews.llvm.org/D114719
David CARLIER [Thu, 2 Jun 2022 16:10:29 +0000 (17:10 +0100)]
[OpenMP] omp_get_proc_id uses sched_getcpu fallback on FreeBSD 13.1 and above.
Reviewers: jlpeyton, jdoerfert
Reviewed-By: jlpeyton
Differential-Revision: https://reviews.llvm.org/D126408
Mikael Simberg [Thu, 2 Jun 2022 15:45:02 +0000 (10:45 -0500)]
[OpenMP][libomp] Make LIBOMP_CONFIGURED_LIBFLAGS a list instead of string
When configuring llvm with the openmp subproject, the build for the omp
target fails if LIBOMP_CONFIGURED_LIBFLAGS contains more than one item.
LIBOMP_CONFIGURED_LIBFLAGS should be a semicolon-separated list instead
of a string with items separated by spaces.
Differential Revision: https://reviews.llvm.org/D125370
Liqiang Tao [Thu, 2 Jun 2022 14:26:33 +0000 (22:26 +0800)]
[llvm][ModuleInliner] Refactor InlineSizePriority and PriorityInlineOrder
This patch introduces the abstract base class InlinePriority to serve as
the comparison function for the priority queue. A derived class, such
as SizePriority, may choose to cache the priorities for different
functions for performance reasons.
This design shields the type used for the priority away from classes
outside InlinePriority and classes derived from it. In turn,
PriorityInlineOrder no longer needs to be a template class.
Reviewed By: kazu
Differential Revision: https://reviews.llvm.org/D126300
Liqiang Tao [Thu, 2 Jun 2022 15:15:42 +0000 (23:15 +0800)]
Revert "[llvm][ModuleInliner] Refactor InlineSizePriority and PriorityInlineOrder"
This reverts commit
50de7f1e7787bf327d1d04c4daab97c1c180b58c.
Mark de Wever [Mon, 16 May 2022 16:48:04 +0000 (18:48 +0200)]
[libc++] Lets to_chars use header implementation.
This removes the duplicated code from the dylib. Instead the dylib will
call the new functions in the header. Since this code is unneeded it's
removed from the unstable ABI.
Depends on D125704
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D125761
Philip Reames [Thu, 2 Jun 2022 14:56:06 +0000 (07:56 -0700)]
[RISCV] Fix an inconsistency with compatible load/store handling
Once we've computed the incoming predecessor state, we should use the same compatibility check with knowledge of MI as we did in phase 2 in order to be consistent across all phases.
Differential Revision: https://reviews.llvm.org/D126574
Joe Loser [Thu, 2 Jun 2022 03:23:40 +0000 (21:23 -0600)]
[libc++][test] Enable some more string_view tests
Some test cases for `ends_with.ptr.pass` and `starts_with.ptr.pass` for
`string_view` are commented out, but work just fine. Uncomment them.
Differential Revision: https://reviews.llvm.org/D126849
Paul Robinson [Thu, 2 Jun 2022 14:50:52 +0000 (07:50 -0700)]
Tidy up `pragma comment lib` handling and testing
A bit of historical research shows that over the years:
Commit
99efc036 added `pragma comment lib` support for PS4.
Commit
fd4db533 added `pragma comment lib` support for all ELF targets.
Commit
1d16515f reworked dependent-library support for all ELF targets.
The upshot is that some PS4-specific code became dead, and the
testing became somewhat fragmented. I've removed the dead code and
combined the previous PS4-specific and linux-specific tests for the
diagnostics into one generic ELF test.
Also added a couple of PS5 runs while I was in there.
LLVM GN Syncbot [Thu, 2 Jun 2022 14:47:37 +0000 (14:47 +0000)]
[gn build] Port
f9b8f422e711
Luís Ferreira [Thu, 2 Jun 2022 14:32:36 +0000 (14:32 +0000)]
[lldb][NFC] Move generic DWARFASTParser code out of Clang-specific code
This patch moves ParseChildArrayInfo out of DWARFASTParserClang in order
to decouple Clang-specific logic from DWARFASTParser.
Reviewed By: clayborg
Differential Revision: https://reviews.llvm.org/D114668
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
Liqiang Tao [Thu, 2 Jun 2022 14:26:33 +0000 (22:26 +0800)]
[llvm][ModuleInliner] Refactor InlineSizePriority and PriorityInlineOrder
This patch introduces the abstract base class InlinePriority to serve as
the comparison function for the priority queue. A derived class, such
as SizePriority, may choose to cache the priorities for different
functions for performance reasons.
This design shields the type used for the priority away from classes
outside InlinePriority and classes derived from it. In turn,
PriorityInlineOrder no longer needs to be a template class.
Reviewed By: kazu
Differential Revision: https://reviews.llvm.org/D126300
serge-sans-paille [Mon, 16 May 2022 14:02:44 +0000 (16:02 +0200)]
[MCParser] Set default alignment value when meeting invalid align
Upon invalid alignment value, still set a default valid alignment value to avoid
hitting later asserts.
Fix #55273
Differential Revision: https://reviews.llvm.org/D125688
Paul Walker [Sun, 22 May 2022 19:32:10 +0000 (20:32 +0100)]
[SVE] Fixed custom lowering of ISD::INSERT_SUBVECTOR.
LowerINSERT_SUBVECTOR emits AArch64ISD::UUNPK## when lowering
scalable vector floating point INSERT_SUBVECTOR. However, these
nodes only make sense for integer types and thus isel patterns do
not exist for floating point, which leads to isel failures.
This patch ensures floating point operands are cast to integer
before the core lowering takes place.
Fixes: #55037
Differential Revision: https://reviews.llvm.org/D126487
Joseph Huber [Thu, 2 Jun 2022 13:32:32 +0000 (09:32 -0400)]
[Binary] Remove OffloadBinary from the Objects enumeration
Summary:
We use the beginning and end of this enumeration to determine what is
and isn't an object format. The enumeration for the OffloadBinary was
put here by mistake which led to it being mistakenly classified as an
Object file.
Aaron Ballman [Thu, 2 Jun 2022 13:31:34 +0000 (09:31 -0400)]
Update more DR status information for C.
This adds new files to track DRs 100-199 and 400-499, but the file
contents are still a work in progress. It also updates the associated
status in the DR tracking page.
Nico Weber [Thu, 2 Jun 2022 13:31:57 +0000 (09:31 -0400)]
Revert "unbreak Modules/cxx20-export-import.cpp with LLVM_APPEND_VC_REV after
8c8a2679a20f"
This reverts commit
4463bd0f89181234e0cef982e21de2e96038f873.
8c8a2679a20f was reverted in
d42fe9aa8420.
Paul Robinson [Thu, 2 Jun 2022 13:25:40 +0000 (06:25 -0700)]
[PS5] Support r and y specifiers of freebsd_kernel_printf format strings
Alex Zinenko [Tue, 31 May 2022 13:49:02 +0000 (15:49 +0200)]
[mlir] add decompose and generalize to structured transform ops
These ops complement the tiling/padding transformations by transforming
higher-level named structured operations such as depthwise convolutions into
lower-level and/or generic equivalents that are better handled by some
downstream transformations.
Differential Revision: https://reviews.llvm.org/D126698
Hans Wennborg [Thu, 2 Jun 2022 13:09:39 +0000 (15:09 +0200)]
Revert "[clang][AIX] add option mdefault-visibility-export-mapping"
This caused assertions, see comment on the code review:
llvm/clang/lib/AST/Decl.cpp:1510:
clang::LinkageInfo clang::LinkageComputer::getLVForDecl(const clang::NamedDecl *, clang::LVComputationKind):
Assertion `D->getCachedLinkage() == LV.getLinkage()' failed.
> The option mdefault-visibility-export-mapping is created to allow
> mapping default visibility to an explicit shared library export
> (e.g. dllexport). Exactly how and if this is manifested is target
> dependent (since it depends on how they map dllexport in the IR).
>
> Three values are provided for the option:
>
> * none: the default and behavior without the option, no additional export linkage information is created.
> * explicit: add the export for entities with explict default visibility from the source, including RTTI
> * all: add the export for all entities with default visibility
>
> This option is useful for targets which do not export symbols as part of
> their usual default linkage behaviour (e.g. AIX), such targets
> traditionally specified such information in external files (e.g. export
> lists), but this mapping allows them to use the visibility information
> typically used for this purpose on other (e.g. ELF) platforms.
>
> Reviewed By: MaskRay
>
> Differential Revision: https://reviews.llvm.org/D126340
This reverts commit
8c8a2679a20f621994fa904bcfc68775e7345edc.
Xing Xue [Thu, 2 Jun 2022 13:03:10 +0000 (09:03 -0400)]
[libunwind][ci][AIX] Add libunwind to buildbot CI
Summary:
This patch changes scripts to add libunwind CI on AIX. Test config file ibm-libunwind-shared.cfg.in is introduced for testing on AIX.
Reviewed by: ldionne, MaskRay, libunwind, ibc++abi
Differential Revision: https://reviews.llvm.org/D126017
PeixinQiao [Thu, 2 Jun 2022 12:58:05 +0000 (20:58 +0800)]
[flang] Add check for conflict of BIND(C) and Parameter attributes
The entity with BIND(C) attribute cannot be a named constant, so the
BIND(C) and parameter attributes are conflicted. Add check for it.
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D126654
Nikita Popov [Thu, 2 Jun 2022 12:51:55 +0000 (14:51 +0200)]
Revert "cmake: use llvm dir variables for clang/utils/hmaptool"
As discussed on the review, this change breaks the standalone
clang build. When building against an installed LLVM, the
LLVM_TOOLS_BINARY_DIR cmake variable points to the location of
the installed LLVM tools, not to the cmake build directory. This
means that we would end up trying to move hmaptool into something
like /usr/bin as part of the normal build, while this should only
be happening when running an install target.
This reverts commit
bf1ab1f0eb9578914343f48096229ecccd0ecf52.
Aaron Ballman [Thu, 2 Jun 2022 12:26:38 +0000 (08:26 -0400)]
Revert "Drop qualifiers from return types in C (DR423)"
This reverts commit
d374b65f2da1bdd3d9a7e9ac8ed4ad5467c882f9.
The changes lose AST fidelity (reported in #55778), but also may be
improperly dropping _Atomic qualifiers. I am rolling the changes back
until I've finished discussions in WG14 about the proper resolution to
DR423.
Andrzej Warzynski [Tue, 31 May 2022 18:29:52 +0000 (19:29 +0100)]
[flang][docs] Document CMake support
One out-of-date section is also deleted.
Differential Revision: https://reviews.llvm.org/D126712
Nicolas Vasilache [Thu, 2 Jun 2022 11:52:45 +0000 (11:52 +0000)]
[mlir][SCF] Add scf.foreach_thread.parallel_insert_slice canonicalization.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D126761
Guillaume Chatelet [Thu, 2 Jun 2022 11:25:03 +0000 (13:25 +0200)]
Fix llvm.memset semantics description
The description was referring to a ``src`` parameter probably copied over from ``llvm.memcpy``
Florian Hahn [Thu, 2 Jun 2022 11:07:54 +0000 (12:07 +0100)]
[VPlan] Remove dead VPlan-native special case from BranchOnCount (NFC).
After
05776122b682684ad this special case doesn't exist any longer.
Mikael Holmen [Thu, 2 Jun 2022 10:50:00 +0000 (12:50 +0200)]
[clang-tidy] Remove extra ";" in ModernizeModuleTest.cpp
Without this fix we get
../../clang-tools-extra/unittests/clang-tidy/ModernizeModuleTest.cpp:270:2: error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
};
^
1 error generated.
when compiling with -Werror.
Nikita Popov [Thu, 2 Jun 2022 10:28:12 +0000 (12:28 +0200)]
[Docs] Update default in opaque pointer docs (NFC)
Also mention a relevant C API.
Paul Walker [Mon, 7 Feb 2022 17:55:42 +0000 (17:55 +0000)]
[SVE] Remove custom lowering of scalable vector MGATHER & MSCATTER operations.
Differential Revision: https://reviews.llvm.org/D126255
Nikita Popov [Thu, 2 Jun 2022 10:17:56 +0000 (12:17 +0200)]
[OrcV2Examples] Fix test with opaque pointers
The other two modules now use opaque pointers, so make sure this
one does as well.
Nikita Popov [Thu, 2 Jun 2022 10:07:37 +0000 (12:07 +0200)]
[flang] Update memcpy intrinsic mangling for opaque pointers
Flang is manually mangling names for memset/memcpy/memmove
intrinsics, so we need to update the mangling to use the opaque
pointer format (p0 instead of p0i8).
Nikita Popov [Thu, 2 Jun 2022 09:53:00 +0000 (11:53 +0200)]
[flang] Update tests for opaque pointers
There is still one remaining failure in Lower/forall/character-1.f90.
Martin Storsjö [Thu, 2 Jun 2022 09:57:51 +0000 (12:57 +0300)]
[ARM] Fix a test case typo. NFC.
The test looked for the wrong string, but it happened to match as
it was a substring of the actual output.
This fixes a typo from
d8e67c1cccd8fcb62230166caea744592288da17.
Nikita Popov [Thu, 2 Jun 2022 08:53:32 +0000 (10:53 +0200)]
[llvm-ocaml] Add and use opaque pointer compatible bindings
Add bindings for LLVMConstGEP2, LLVMAddAlias2, LLVMBuildLoad2,
LLVMBuildInvoke2, LLVMBuildGEP2, LLVMBuildInBoundsGEP2,
LLVMBuildStructGEP2, LLVMBuildPtrDiff2 and use these in tests.
Gabor Marton [Tue, 31 May 2022 15:49:52 +0000 (17:49 +0200)]
[analyzer][NFC] Move overconstrained check from reAssume to assumeDualImpl
Depends on D126406. Checking of the overconstrained property is much
better suited here.
Differential Revision: https://reviews.llvm.org/D126707
Martin Storsjö [Thu, 19 May 2022 10:17:24 +0000 (13:17 +0300)]
[clang] [ARM] Add __builtin_sponentry like on aarch64
This is used for calling the SEH aware setjmp on MinGW.
Differential Revision: https://reviews.llvm.org/D126764
Martin Storsjö [Thu, 19 May 2022 10:16:53 +0000 (13:16 +0300)]
[ARM] Implement lowering of the sponentry intrinsic
This is needed for SEH based setjmp on Windows.
Differential Revision: https://reviews.llvm.org/D126763
Martin Storsjö [Fri, 26 Nov 2021 13:17:47 +0000 (15:17 +0200)]
[ARM] Adjust the frame pointer when it's needed for SEH unwinding
For functions that require restoring SP from FP (e.g. that need to
align the stack, or that have variable sized allocations), the prologue
and epilogue previously used to look like this:
push {r4-r5, r11, lr}
add r11, sp, #8
...
sub r4, r11, #8
mov sp, r4
pop {r4-r5, r11, pc}
This is problematic, because this unwinding operation (restoring sp
from r11 - offset) can't be expressed with the SEH unwind opcodes
(probably because this unwind procedure doesn't map exactly to
individual instructions; note the detour via r4 in the epilogue too).
To make unwinding work, the GPR push is split into two; the first one
pushing all other registers, and the second one pushing r11+lr, so that
r11 can be set pointing at this spot on the stack:
push {r4-r5}
push {r11, lr}
mov r11, sp
...
mov sp, r11
pop {r11, lr}
pop {r4-r5}
bx lr
For the same setup, MSVC generates code that uses two registers;
r11 still pointing at the {r11,lr} pair, but a separate register
used for restoring the stack at the end:
push {r4-r5, r7, r11, lr}
add r11, sp, #12
mov r7, sp
...
mov sp, r7
pop {r4-r5, r7, r11, pc}
For cases with clobbered float/vector registers, they are pushed
after the GPRs, before the {r11,lr} pair.
Differential Revision: https://reviews.llvm.org/D125649
Martin Storsjö [Fri, 26 Nov 2021 12:28:16 +0000 (14:28 +0200)]
[ARM] Add SEH opcodes in frame lowering
Skip inserting regular CFI instructions if using WinCFI.
This is based a fair amount on the corresponding ARM64 implementation,
but instead of trying to insert the SEH opcodes one by one where
we generate other prolog/epilog instructions, we try to walk over the
whole prolog/epilog range and insert them. This is done because in
many cases, the exact number of instructions inserted is abstracted
away deeper.
For some cases, we manually insert specific SEH opcodes directly where
instructions are generated, where the automatic mapping of instructions
to SEH opcodes doesn't hold up (e.g. for __chkstk stack probes).
Skip Thumb2SizeReduction for SEH prologs/epilogs, and force
tail calls to wide instructions (just like on MachO), to make sure
that the unwind info actually matches the width of the final
instructions, without heuristics about what later passes will do.
Mark SEH instructions as scheduling boundaries, to make sure that they
aren't reordered away from the instruction they describe by
PostRAScheduler.
Mark the SEH instructions with the NoMerge flag, to avoid doing
tail merging of functions that have multiple epilogs that all end
with the same sequence of "b <other>; .seh_nop_w, .seh_endepilogue".
Differential Revision: https://reviews.llvm.org/D125648
jacquesguan [Thu, 2 Jun 2022 03:00:02 +0000 (03:00 +0000)]
[LegalizeTypes][VP] Add widen and split support for VP FP integer casting op.
This patch adds widen and split support for VP_FPTOSI, VP_FPTOUI, VP_SITOFP and VP_UITOFP.
Differential Revision: https://reviews.llvm.org/D126847
lewuathe [Thu, 2 Jun 2022 08:38:20 +0000 (10:38 +0200)]
[mlir][complex] Lower complex.sin/cos to libm
Lower sin/cos operation in complex dialect to libm as a baseline. This follows up to https://reviews.llvm.org/D125550.
Reviewed By: pifon2a
Differential Revision: https://reviews.llvm.org/D126755
Nikita Popov [Thu, 2 Jun 2022 08:22:59 +0000 (10:22 +0200)]
[llvm-ocaml] Add LLVMBuildCall2 binding
Add binding for the opaque pointer compatible LLVMBuildCall2
API and use it in tests.
lewuathe [Thu, 2 Jun 2022 08:33:13 +0000 (10:33 +0200)]
[mlir][complex] Sanity check for tan operation in complex dialect
Add a sanity check for newly added tan operation in complex dialect. It follows-up to https://reviews.llvm.org/D126685.
Differential Revision: https://reviews.llvm.org/D126858
owenca [Wed, 1 Jun 2022 08:06:02 +0000 (01:06 -0700)]
[clang-format] Handle do-while loops for RemoveBracesLLVM
Also updates the unit tests to match the updated LLVM Coding
Standards.
Differential Revision: https://reviews.llvm.org/D126758
Stanislav Gatev [Thu, 24 Feb 2022 17:07:41 +0000 (17:07 +0000)]
[clang][dataflow] Add transfer functions for structured bindings
This is part of the implementation of the dataflow analysis framework.
See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev.
Differential Revision: https://reviews.llvm.org/D120495
Reviewed-by: ymandel, xazax.hun
Benjamin Kramer [Thu, 2 Jun 2022 07:56:11 +0000 (09:56 +0200)]
[IRTests] With opaque ptrs we can test that there is no bitcast inserted
Nikita Popov [Tue, 31 May 2022 09:58:35 +0000 (11:58 +0200)]
[IR] Enable opaque pointers by default
This enabled opaque pointers by default in LLVM. The effect of this
is twofold:
* If IR that contains *neither* explicit ptr nor %T* types is passed
to tools, we will now use opaque pointer mode, unless
-opaque-pointers=0 has been explicitly passed.
* Users of LLVM as a library will now default to opaque pointers.
It is possible to opt-out by calling setOpaquePointers(false) on
LLVMContext.
A cmake option to toggle this default will not be provided. Frontends
or other tools that want to (temporarily) keep using typed pointers
should disable opaque pointers via LLVMContext.
Differential Revision: https://reviews.llvm.org/D126689
Amir Ayupov [Thu, 2 Jun 2022 07:26:23 +0000 (00:26 -0700)]
[BOLT][NFC] Use colors in CFG dumps
Use color coding to distinguish nodes:
- Entry nodes have bold border
- Scalar (non-loopy) code is milk white
- Outer loops are light yellow
- Innermost loops are light blue
`-print-loops` needs to be enabled to provide BinaryLoopInfo.
Examples:
{
F23170673}
{
F23170680}
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D126248
Venkata Ramanaiah Nalamothu [Thu, 2 Jun 2022 06:32:44 +0000 (12:02 +0530)]
[lldb, test] Fix typos in the lldb tests
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D126596
Weining Lu [Thu, 2 Jun 2022 06:57:23 +0000 (14:57 +0800)]
[LoongArch] Add the missing ld.d instruction definition
Amir Ayupov [Thu, 2 Jun 2022 06:40:55 +0000 (23:40 -0700)]
[BOLT][NFC] Print block instructions in dumpGraph as part of node label
Reuse the option `-dot-tooltip-code` to put block instructions into the label.
This way, the instructions are displayed by default when used with dot viewer.
When the .dot file is used with dot2html, instructions are hidden by default,
and are shown by clicking on a node.
{
F23169510}
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D126237
Amir Ayupov [Thu, 2 Jun 2022 06:37:04 +0000 (23:37 -0700)]
[BOLT][UTILS] Add dot2html helper tool to embed dot into html
To be rendered in browser using d3-graphviz.
Example: {
F23169510}
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D126218
jacquesguan [Fri, 20 May 2022 07:31:07 +0000 (07:31 +0000)]
[mlir][Arithmetic] Add constant folder for RemF.
This patch adds the constant folder for RemF.
Differential Revision: https://reviews.llvm.org/D126045
Weining Lu [Thu, 2 Jun 2022 06:18:08 +0000 (14:18 +0800)]
[LoongArch] Fix register type in FCMP_*_D instructions definition
The correct type is FPR64 but not FPR32.
Tobias Hieta [Thu, 2 Jun 2022 06:20:21 +0000 (08:20 +0200)]
[NFC][workflow] Fix issue where the workflow would say all PR's already exists
LLVM GN Syncbot [Thu, 2 Jun 2022 06:04:25 +0000 (06:04 +0000)]
[gn build] Port
a15ae4139cea
Mark de Wever [Thu, 2 Jun 2022 06:02:19 +0000 (08:02 +0200)]
[libc++][doc] Fixes unwanted list nesting.
Mark de Wever [Mon, 16 May 2022 15:12:18 +0000 (17:12 +0200)]
[libc++] Make to_chars base 10 header only.
The functions to_chars and from_chars should offer 128-bit support. This
is the first step to implement 128-bit version of to_chars. Before
implementing 128-bit support the current code will be polished.
This moves the code from the dylib to the header in prepartion of
P2291 "Add Constexpr Modifiers to Functions to_chars and from_chars for
Integral Types in <charconv> Header"
Note some more cleanups will be done in follow-up commits
- Remove the _LIBCPP_AVAILABILITY_TO_CHARS from to_chars. With all code
in the header the availablilty macro is no longer needed. This
requires enabling the unit tests for additional platforms.
- The code in the dylib can switch to using the header implementation.
This allows removing the code duplicated in the header and the dylib.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D125704
Richard [Sat, 14 May 2022 23:57:10 +0000 (17:57 -0600)]
[clang-tidy] Reject invalid enum initializers in C files
C requires that enum values fit into an int. Scan the macro tokens
present in an initializing expression and reject macros that contain
tokens that have suffixes making them larger than int.
C forbids the comma operator in enum initializing expressions, so
optionally reject comma operator.
Differential Revision: https://reviews.llvm.org/D125622
Fixes #55467
eopXD [Thu, 2 Jun 2022 03:39:38 +0000 (20:39 -0700)]
[LSR] Early exit for RateFormula when it is already losing. NFC
This patch does not effect any behavior of the current code.
The codebase implicitly implies that `Cost::RateFormula` is only called
when the `Cost` is not in losing status, or else there may be possible
to trigger the assertion of `Cost::isValid`.
The intention here is to prevent mis-use where future development
allow `Cost` that is already loser to call `Cost::RateFormula` - Early
exit when `Cost` is already losing.
Reviewed By: Meinersbur, #loopoptwg
Differential Revision: https://reviews.llvm.org/D125670
jacquesguan [Wed, 1 Jun 2022 06:29:09 +0000 (06:29 +0000)]
[mlir] Support convert token type from LLVM IR.
This patch supports the token type for converting from LLVM IR.
Differential Revision: https://reviews.llvm.org/D126756
Fangrui Song [Thu, 2 Jun 2022 03:05:01 +0000 (20:05 -0700)]
[test] Fix LLVMgold.so tests after D125847
Florian Mayer [Wed, 1 Jun 2022 23:43:59 +0000 (16:43 -0700)]
[libunwind] Add more information to eh_frame_hdr version error
This makes it easier to find the offending ELF file.
Reviewed By: #libunwind, MaskRay
Differential Revision: https://reviews.llvm.org/D126841
Nico Weber [Thu, 2 Jun 2022 02:33:36 +0000 (22:33 -0400)]
unbreak Modules/cxx20-export-import.cpp with LLVM_APPEND_VC_REV after
8c8a2679a20f
See revision
b8b7a9dcdcbc for prior art.
Snehasish Kumar [Wed, 1 Jun 2022 22:20:53 +0000 (22:20 +0000)]
[memprof] Print out the segment information in YAML format.
This change prints out the segment information in the raw profile in
YAML format for testing. Since we don't capture build ids yet, we print
out <None> for now.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D126840
jacquesguan [Thu, 26 May 2022 03:14:27 +0000 (03:14 +0000)]
[LegalizeTypes][VP] Add widen and split support for VP_SIGN_EXTEND and VP_ZERO_EXTEND.
Differential Revision: https://reviews.llvm.org/D126442
Snehasish Kumar [Wed, 1 Jun 2022 22:20:53 +0000 (22:20 +0000)]
[memprof] Update summary output.
Update the YAML format print out of the profile to include a summary
instead of displaying the headers in the raw file buffer. This allows us
to release the raw buffer early saving memory.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D126834
Matthias Braun [Thu, 2 Jun 2022 01:51:35 +0000 (18:51 -0700)]
Fix compilation in gold-plugin triggered by D125847
Siva Chandra Reddy [Wed, 25 May 2022 21:07:23 +0000 (21:07 +0000)]
[libc] Add pthread_create and pthread_join functions.
They do not yet support all the feature/attributes in pthread_attr_t.
Future changes will add such support.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D126718
Joe Loser [Tue, 31 May 2022 00:21:56 +0000 (18:21 -0600)]
[libc++][test] Enable constexpr string comparison tests
Some tests in `string.view.comparison` are not enabled due to previous lack of
support for `constexpr std::string`. Now that it is implemented, we can enable
these tests.
Differential Revision: https://reviews.llvm.org/D126737
Chris Bieneman [Thu, 2 Jun 2022 01:18:41 +0000 (20:18 -0500)]
Fix DXContainer test on ppcbe
Silly mistake, the code here was byteswapping in-place which corrupts
the data structure that is used later to write the correct file.
Alexander Yermolovich [Thu, 2 Jun 2022 01:15:41 +0000 (18:15 -0700)]
[BOLT][DWARF] Fix TU Index handling for DWARF4/5
When we generate split dwarf with -fdebug-types-section we will have
.debug_types.dwo sections. These go into TU Index when we run llvm-dwp. BOLT was
not handling DWP input correctly with this section.
Added support for handling DWP with TU Index as an input and output for DWARF4.
Added support for handling DWP with TU Index as an input for DWARF5
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D126087
Matt Arsenault [Fri, 22 Apr 2022 23:15:58 +0000 (19:15 -0400)]
BranchFolder: Require NoPHIs
The pass doesn't handle SSA and breaks any phis.
Matt Arsenault [Wed, 4 May 2022 12:12:51 +0000 (13:12 +0100)]
AMDGPU: Add release notes about atomic load and store
Matt Arsenault [Wed, 18 May 2022 15:00:41 +0000 (16:00 +0100)]
AMDGPU: Fix missing c++ mode comment
Matthias Braun [Wed, 18 May 2022 03:33:22 +0000 (20:33 -0700)]
LTO: Decide upfront whether to use opaque/non-opaque pointer types
LTO code may end up mixing bitcode files from various sources varying in
their use of opaque pointer types. The current strategy to decide
between opaque / typed pointers upon the first bitcode file loaded does
not work here, since we could be loading a non-opaque bitcode file first
and would then be unable to load any files with opaque pointer types
later.
So for LTO this:
- Adds an `lto::Config::OpaquePointer` option and enforces an upfront
decision between the two modes.
- Adds `-opaque-pointers`/`-no-opaque-pointers` options to the gold
plugin; disabled by default.
- `--opaque-pointers`/`--no-opaque-pointers` options with
`-plugin-opt=-opaque-pointers`/`-plugin-opt=-no-opaque-pointers`
aliases to lld; disabled by default.
- Adds an `-lto-opaque-pointers` option to the `llvm-lto2` tool.
- Changes the clang driver to pass `-plugin-opt=-opaque-pointers` to
the linker in LTO modes when clang was configured with opaque
pointers enabled by default.
This fixes https://github.com/llvm/llvm-project/issues/55377
Differential Revision: https://reviews.llvm.org/D125847
Hendrik Greving [Thu, 2 Jun 2022 00:46:50 +0000 (00:46 +0000)]
[ValueTypes] Define MVTs for v128i2/v64i4 as well as i2 and i4.
Adds MVT::v128i2, MVT::v64i4, and implied MVT::i2, MVT::i4.
Keeps MVT::i2, MVT::i4 lowering actions as expand, which should be
removed once targets set this explicitly.
Adjusts 11 lit tests to reflect slightly different behavior during
DAG combine.
Differential Revision: https://reviews.llvm.org/D125247
Fangrui Song [Thu, 2 Jun 2022 00:33:14 +0000 (17:33 -0700)]
[Polly] Fix -Wreorder-ctor. NFC
Quentin Colombet [Thu, 2 Jun 2022 00:14:03 +0000 (17:14 -0700)]
[RegisterClassInfo] Invalidate cached information if ignoreCSRForAllocationOrder changes
Even if CSR list is same between functions, we could have had a different
allocation order if ignoreCSRForAllocationOrder is evaluated differently.
Hence invalidate cached register class information if
ignoreCSRForAllocationOrder changes.
Patch by Srividya Karumuri <srividya_karumuri@apple.com>
Differential Revision: https://reviews.llvm.org/D126565
Fangrui Song [Thu, 2 Jun 2022 00:04:58 +0000 (17:04 -0700)]
[Object] Fix namespace style issues in D122069
https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions
Shilei Tian [Wed, 1 Jun 2022 23:53:36 +0000 (19:53 -0400)]
[OMPIRBuilder] Add the support for compare capture
This patch adds the support for `compare capture` in `OMPIRBuilder`.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D120007
Philip Reames [Wed, 1 Jun 2022 23:08:19 +0000 (16:08 -0700)]
[RISCV] Split fixed-vector-strided-load-store.ll so it can be autogened
I've gotten tired of updating register allocation changes by hand, let's just autogen this even if we have to duplicate it.
Alexey Bataev [Wed, 1 Jun 2022 22:40:00 +0000 (15:40 -0700)]
Revert "[SLP]Improve shuffles cost estimation where possible."
This reverts commit
fd5a6ce9dcb77b7821c95355d73af0b3b2020647 to fix
a crash detected by a buildbot
https://lab.llvm.org/buildbot/#/builders/179/builds/3805/steps/11/logs/stdio.
Joseph Huber [Wed, 1 Jun 2022 19:28:34 +0000 (15:28 -0400)]
[Binary] Promote OffloadBinary to inherit from Binary
We use the `OffloadBinary` to create binary images of offloading files
and their corresonding metadata. This patch changes this to inherit from
the base `Binary` class. This allows us to create and insepect these
more generically. This patch includes all the necessary glue to
implement this as a new binary format, along with added the magic bytes
we use to distinguish the offloading binary to the `file_magic`
implementation.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D126812
Craig Topper [Wed, 1 Jun 2022 22:37:48 +0000 (15:37 -0700)]
[RISCV] Use MachineRegisterInfo::use_instr_begin instead of use_begin+getParent. NFCI
David Tenty [Tue, 10 May 2022 15:39:58 +0000 (11:39 -0400)]
[clang][AIX] add option mdefault-visibility-export-mapping
The option mdefault-visibility-export-mapping is created to allow
mapping default visibility to an explicit shared library export
(e.g. dllexport). Exactly how and if this is manifested is target
dependent (since it depends on how they map dllexport in the IR).
Three values are provided for the option:
* none: the default and behavior without the option, no additional export linkage information is created.
* explicit: add the export for entities with explict default visibility from the source, including RTTI
* all: add the export for all entities with default visibility
This option is useful for targets which do not export symbols as part of
their usual default linkage behaviour (e.g. AIX), such targets
traditionally specified such information in external files (e.g. export
lists), but this mapping allows them to use the visibility information
typically used for this purpose on other (e.g. ELF) platforms.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D126340
Matthias Springer [Wed, 1 Jun 2022 21:59:58 +0000 (23:59 +0200)]
[mlir][sparse][NFC] Switch InitOp to bufferization::AllocTensorOp
Now that we have an AllocTensorOp (previously InitTensorOp) in the bufferization dialect, the InitOp in the sparse dialect is no longer needed.
Differential Revision: https://reviews.llvm.org/D126180
Chris Bieneman [Wed, 1 Jun 2022 21:45:49 +0000 (16:45 -0500)]
Temporarily disabling this test on arm
This is failing on an arm32 builder, and it is going to take me a while
to debug. To not block further progress I'm disabling this test on
arm32 configuraitons.
wren romano [Tue, 31 May 2022 22:26:52 +0000 (15:26 -0700)]
[mlir][sparse] Using non-empty function name suffix for OverheadType::kIndex
The trick of using an empty token in the `FOREVERY_O` x-macro relies on preprocessor behavior which is only standard since C99 6.10.3/4 and C++11 N3290 16.3/4 (whereas it was undefined behavior up through C++03 16.3/10). Since the `ExecutionEngine/SparseTensorUtils.cpp` file is required to be compile-able under C++98 compatibility mode (unlike the C++11 used elsewhere in MLIR), we shouldn't rely on that behavior.
Also, using a non-empty suffix helps improve uniformity of the API, since all other primary/overhead suffixes are also non-empty. I'm using the suffix `0` since that's the value used by the `SparseTensorEncoding` attribute for indicating the index overhead-type.
Depends On D126720
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D126724