Commit Graph

416691 Commits

Author SHA1 Message Date
Manas 3ca1098557 [clang][scan-build] Change mode of installation for scan-build.1
Currently, manpage for scan-build is installed as a program, with
permission of 755. This patch makes installation of scan-build.1 as
file, with 644 permission.

Patch by Manas.

Reviewed By: steakhal

Differential Revision: https://reviews.llvm.org/D120646
2022-03-02 13:12:08 +01:00
Kiran Chandramohan dc48849fcc [Flang] NFC: Rearrange conversion patterns in Codegen.cpp
Minor rearrangment in the order of conversion patterns to identify
differences.

Reviewed By: clementval, schweitz

Differential Revision: https://reviews.llvm.org/D120721
2022-03-02 11:55:45 +00:00
Nikita Popov 5cf06d10f8 Revert "[InstCombine] Support switch in phi to cond fold"
This reverts commit 0817ce86b5.

Seeing some ppc64le stage2 failures, reverting to investigate.
2022-03-02 12:49:47 +01:00
Pavel Samolysov 2397f67166 [Object] Skip section offset checking for /<XFGHASHMAP>/
Starting from Windows SDK for Windows 11 (10.0.22000.x), all the system
libraries (.lib files) contain a section with the '/<XFGHASHMAP>/' name.
This looks like the libraries are built with control flow guard enabled:
https://docs.microsoft.com/en-us/cpp/build/reference/guard-enable-control-flow-guard?view=msvc-170

To let the LLVM tools (llvm-ar, llvm-lib) work with these libraries,
this patch just skips the section offset check for sections with the
'/<XFGHASHMAP>/' name.

Closes: llvm/llvm-project#53814

Signed-off-by: Pavel Samolysov <pavel.samolysov@intel.com>

Reviewed By: jhenderson, thieta

Differential Revision: https://reviews.llvm.org/D120645
2022-03-02 13:29:35 +02:00
Simon Pilgrim df0a2b4f30 [DAG] SelectionDAG::isSplatValue - add initial BITCAST handling
This patch adds support for recognising vector splats by peeking through bitcasts to vectors with smaller element types - if all the offset subelements are splats then the bitcasted vector is a splat as well.

We don't have great coverage for isSplatValue so I've made this pretty specific to the use case I'm trying to fix - regressions in some vXi64 vector shift by splat cases that 32-bit x86 doesn't recognise because the shift amount buildvector has been type legalised to v2Xi32.

We can add further support (floats, bitcast from larger element types, undef elements) when we have actual test coverage.

Differential Revision: https://reviews.llvm.org/D120553
2022-03-02 11:25:51 +00:00
Nikita Popov 0817ce86b5 [InstCombine] Support switch in phi to cond fold
For conditional branches, we know the value is i1 0 or i1 1 along
the outgoing edges. For switches we can apply exactly the same
optimization, just with the known values determined by the switch
cases.
2022-03-02 12:16:32 +01:00
Jay Foad 8bed52c9eb [AMDGPU] Make more use of madmk/fmamk instructions
In convertToThreeAddress handle VOP2 mac/fmac instructions with a
literal src0 operand, since these are prime candidates for
converting to madmk/fmamk.

Previously this would only happen if src0 (or src1) was a register
defined by a move-immediate instruction, but in many cases these
operands have already been folded because SIFoldOperands runs
before TwoAddressInstructionPass.

Differential Revision: https://reviews.llvm.org/D120736
2022-03-02 10:22:10 +00:00
Dawid Jurczak d813116c9d [NFC][Lexer] Remove getLangOpts function from Lexer
Given that there is only one external user of Lexer::getLangOpts
we can remove getter entirely without much pain.

Differential Revision: https://reviews.llvm.org/D120404
2022-03-02 11:17:05 +01:00
Florian Hahn 83fd2071f0
[LV] Modernize test matching hardcoded induction phi name. 2022-03-02 10:12:38 +00:00
Nikita Popov 85491fb6e4 [InstCombine] Add tests for phi to cond with switch (NFC)
Currently we only handle br but not switch in this fold.
2022-03-02 11:06:15 +01:00
Haojian Wu 05d7e9f68e [pseudo] fix some comment nits, NFC. 2022-03-02 10:19:17 +01:00
Simon Moll d05ddb86f6 [VP] vp.sitofp cast intrinsic and docs
Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D119922
2022-03-02 10:16:19 +01:00
Simon Moll febf548129 [VP] Fix vp.fptosi LangRef example
Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D120068
2022-03-02 10:15:32 +01:00
Haojian Wu 7f99e1870f [pseudo] Add a print-grammar option in the tool
This is helpful for debugging purposes.

Differential Revision: https://reviews.llvm.org/D120724
2022-03-02 10:05:49 +01:00
LLVM GN Syncbot 91e9af32fc [gn build] Port ae60884dfe 2022-03-02 08:58:54 +00:00
Stanislav Gatev ae60884dfe [clang][dataflow] Add flow condition constraints to Environment
This is part of the implementation of the dataflow analysis framework.
See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev.

Reviewed-by: ymandel, xazax.hun

Differential Revision: https://reviews.llvm.org/D120711
2022-03-02 08:57:27 +00:00
Haojian Wu 28efb1ccf5 [pseudo] Fix an out-of-bound error in LRTable::find.
The linear scan should not escape the TargetedStates range.

Differential Revision: https://reviews.llvm.org/D120723
2022-03-02 09:53:52 +01:00
Martin Storsjö 6ec18aafec [Object] [COFF] Improve error messages
This aids debugging when working with possibly broken files,
instead of just flat out erroring out without telling what's wrong.

Differential Revision: https://reviews.llvm.org/D120679
2022-03-02 10:44:41 +02:00
Martin Storsjö ea4c198a0f [libcxx] [test] Make filesystem tests not rely on libc++ internals
As part of https://reviews.llvm.org/D119036
(506cf6dc04), `-DNOMINMAX` was
dropped from the Windows CI configurations, replaced with a
block with `_LIBCPP_PUSH_MACROS`, `#include <__undef_macros>`
and `_LIBCPP_POP_MACROS` (and
`ADDITIONAL_COMPILE_FLAGS: -DNOMINMAX` left in two tests).

However, this workaround breaks the running the libc++ tests
against a different C++ standard library than libc++, as those
macros and that header are libc++ internals.

Therefore, reinstate `-DNOMINMAX` for clang-cl configurations
and remove the libc++ specific bits in filesystem_test_helper.h.

Differential Revision: https://reviews.llvm.org/D120478
2022-03-02 10:39:14 +02:00
Iain Sandoe 17ce5497aa [C++20][Modules] Improve efficiency of isModulePartition method.
The original implementation of this used the presence of a ":" in the module
name as the key, but since we now generate modules with the correct kind, we
can just test that.

Differential Revision: https://reviews.llvm.org/D120764
2022-03-02 08:31:46 +00:00
Saiyedul Islam 7a02abf06f
[clang-offload-bundler] HIP and OpenMP comaptibility for linking heterogeneous archive library
`hip-openmp-compatible` flag treats hip and hipv4 offload kinds
as compatible with openmp offload kind while extracting code objects
from a heterogenous archive library. Vice versa is also considered
compatible if hip code was compiled with -fgpu-rdc.

This flag only relaxes compatibility criteria on `OffloadKind`,
rest of the components like `Triple` and `GPUArhc` still needs to
be compatible.

Reviewed By: yaxunl

Differential Revision: https://reviews.llvm.org/D120697
2022-03-02 07:55:06 +00:00
Shao-Ce SUN 0e38b29543 [RISCV] add the MC layer support of Zfinx extension
This patch added the MC layer support of Zfinx extension.

Authored-by: StephenFan
Co-Authored-by: Shao-Ce Sun

Reviewed By: asb

Differential Revision: https://reviews.llvm.org/D93298
2022-03-02 14:25:19 +08:00
LLVM GN Syncbot e1fd5a86c7 [gn build] Port 65588a0776 2022-03-02 06:10:52 +00:00
Xiang1 Zhang 65588a0776 Revert "TLS loads opimization (hoist)"
Revert for more reviews

This reverts commit 30e612ebdf.
2022-03-02 14:10:11 +08:00
Mircea Trofin cb2160760e [nfc][codegen] Move RegisterBank[Info].h under CodeGen
This wraps up from D119053. The 2 headers are moved as described,
fixed file headers and include guards, updated all files where the old
paths were detected (simple grep through the repo), and `clang-format`-ed it all.

Differential Revision: https://reviews.llvm.org/D119876
2022-03-01 21:53:25 -08:00
Shraiysh Vaishay d2f0fe23d2 [mlir][OpenMP] Added assemblyFormat for atomic and critical operations
This patch adds assemblyFormat for `omp.critical.declare`, `omp.atomic.read`,
`omp.atomic.write`, `omp.atomic.update` and `omp.atomic.capture`.

Also removing those clauses from `parseClauses` that aren't needed
anymore, thanks to the new assemblyFormats.

Reviewed By: NimishMishra, rriddle

Differential Revision: https://reviews.llvm.org/D120248
2022-03-02 11:22:09 +05:30
Abinav Puthan Purayil 8b4ab01c38 [AMDGPU] Select no-return atomic ops in BUFInstructions.td
This change adds the selection of no-return buffer_* instructions in
tblgen. The motivation for this is to get the no-return atomic isel
working without relying on post-isel hooks so that GlobalISel can start
selecting them (once GlobalISelEmitter allows no return atomic patterns
like how DAGISel does).

This change handles the selection of no-return mubuf_atomic_cmpswap in
tblgen without changing the extract_subreg generation for the return
variant. This handling was done by the post-isel hook.

Differential Revision: https://reviews.llvm.org/D120538
2022-03-02 08:25:28 +05:30
Hongtao Yu 23391febd8 [llvm-profgen] Generating probe-based non-CS profile.
I'm bring up the support of pseudo-probe-based non-CS profile generation. The approach is quite similar to generating dwarf-based non-CS profile. The main difference is for a given linear instruction range, instead of each disassembled instruction,  pseudo probes that are covered by the range are processed. The pseudo probe extraction code is shared with CS probe profile generation.

I'm seeing 0.7% performance win for one of our internal large benchmark compared to using non-CS dwarf-based profile, and 0.5% win for another large benchmark when combined with profi.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D120335
2022-03-01 18:49:08 -08:00
Hongtao Yu 07846e3387 [CSSPGO][PriorityInliner] Do not use block weight to drive callsite inlining.
The priority-based inliner currenlty uses block count combined with callee entry count to drive callsite inlining. This doesn't work well with LTO where postlink inlining is driven by prelink-annotated block count which could be based on the merge of all context profiles. I'm fixing it by using callee profile entry count only which should be context-sensitive.

I'm seeing 0.2% perf improvment for one of our internal large benchmarks with probe-based non-CS profile.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D120784
2022-03-01 18:43:19 -08:00
LLVM GN Syncbot c007a17af6 [gn build] Port 30e612ebdf 2022-03-02 02:38:00 +00:00
Xiang1 Zhang 30e612ebdf TLS loads opimization (hoist)
Reviewed By: Wang Pheobe, Topper Craig

Differential Revision: https://reviews.llvm.org/D120000
2022-03-02 10:37:24 +08:00
Maksim Panchenko ae87445c25 [BOLT][test] Fix function size in test case 2022-03-01 17:53:41 -08:00
Zhihao Yuan 44eee659f1
[AST] Print NTTP args as string-literals when possible
C++20 non-type template parameter prints `MyType<{{116, 104, 105, 115}}>` when the code is as simple as `MyType<"this">`. This patch prints `MyType<{"this"}>`, with one layer of braces preserved for the intermediate structural type to trigger CTAD.

`StringLiteral` handles this case, but `StringLiteral` inside `APValue` code looks like a circular dependency. The proposed patch implements a cheap strategy to emit string literals in diagnostic messages only when they are readable and fall back to integer sequences.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D115031
2022-03-01 19:34:27 -06:00
Arthur Eubanks 9c6250ee41 Revert "[SLP] Schedule only sub-graph of vectorizable instructions"
This reverts commit 0539a26d91.

Causes a miscompile, see comments on D118538.

Required updating bottom-to-top-reorder.ll.
2022-03-01 17:31:16 -08:00
Arthur Eubanks 6987ac7903 Revert "[SLP] Remove SchedulingPriority from ScheduleData [NFC]"
This reverts commit a3e9b32c00.

Required for reverting D118538.
2022-03-01 17:28:52 -08:00
Lang Hames 1e16272ba7 [examples][BuildingAJIT] Use the right layer when adding code in Chapter 3.
We were incorrectly using the OptimizeLayer and bypassing the COD layer.
2022-03-01 16:44:55 -08:00
Lang Hames 34e539dcd7 [ORC] Set ResolverBlockAddr in EPCIndirectionUtils::writeResolverBlock.
Without this, EPCIndirectionUtils::getResolverBlockAddr (and lazy compilation
via EPC) won't work.

No test case: lli is still using LocalLazyCallThroughManager. I'll revisit this
soon when I look at adding lazy compilation support to the ORC runtime.
2022-03-01 16:44:55 -08:00
Aart Bik d8b229a1d5 [mlir][sparse][pytaco] added test with various sparse annotations
This also found a bug in the new toMLIR code (missing permutation)

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D120783
2022-03-01 16:36:19 -08:00
Arthur Eubanks 81291b636d [gn build] Add -fsanitize=fuzzer to link flags in fuzzer targets when llvm_use_sanitize_coverage 2022-03-01 16:10:51 -08:00
Nico Weber 015cbd7218 [gn build] (manually) port 15ab7bc3af (TestingSupportTests) 2022-03-01 18:50:22 -05:00
Craig Topper 8787726609 [LegalizeTypes] Remove incomplete StrictFP support from SplitVecRes_UnaryOp. NFC
There is no handling of Chain operands in this function so it can't
work. There's a separate splitting function for all strict fp nodes.
2022-03-01 15:43:57 -08:00
Bixia Zheng c25f3dfff3 [mlir][sparse][taco] Support tensor dimension storage ordering and more general
sparsity values.

Previously, we can't properly handle input tensors with a dimension
ordering that is different from the natural ordering or with a mixed of
compressed and dense dimensions. This change fixes the problems by
passing the dimension ordering and sparsity values to the runtime
routine.

Modify an existing test to test the situation.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D120777
2022-03-01 15:36:38 -08:00
David Green 62c2b070d5 [AArch64] Add simple arithmetic cost model test. NFC 2022-03-01 23:31:02 +00:00
Max Kudryavtsev c26fcd1ab8 [MLIR] [Arith] [NFC] Remove switch statement default label due to warning
We are getting compiler warning because default label is excessive. Removing it for now.

[[ http://lab.llvm.org:8011/#/builders/61/builds/22782/steps/5/logs/warnings__2_ | view on buildbot ]]

```
/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp:1597:9: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]
```

Related to: [[ https://reviews.llvm.org/D117257 | D117257 ]]

Reviewed By: stella.stamenova

Differential Revision: https://reviews.llvm.org/D120730
2022-03-01 15:24:03 -08:00
Sam Clegg 1cf6ebc0e9 [lld][WebAssembly] Improve error reporting for bad ar archive members
Show the name of of the archive in the error message as well as the name
of the object within it.

Differential Revision: https://reviews.llvm.org/D120689
2022-03-01 15:21:53 -08:00
Benjamin Kramer 38406ca9bd [bazel] Add a missing dependency after 1f971e23f0 2022-03-02 00:20:08 +01:00
Peter Klausler 44ff4df6de [flang] Extension: don't require commas between most edit descriptors in formats
The standard explicitly allows a comma to be omitted between a 'P'
edit descriptor and a following numeric edit descriptor (e.g., 1PE10.1),
and before and after a '/' edit descriptor, but otherwise requires them
between edit descriptors.  Most implementations, however, only require
commas where they prevent ambiguity, and accept things like 1XI10.
This extension is already assumed by the static FORMAT checker in
semantics.  Patch the runtime to behave accordingly.

Differential Revision: https://reviews.llvm.org/D120747
2022-03-01 15:15:59 -08:00
Benjamin Kramer 6c19bb4040 [bazel] Build fixes for 23aa5a7446 2022-03-02 00:13:57 +01:00
Craig Topper 0853ed2b52 [RISCV] Remove accidental negate from recently added i64 abs test. NFC
I copied the tests from neg-abs.ll and thought I removed all the
negations.
2022-03-01 15:07:51 -08:00
Stephane Moore 0ff2905709 [lldb] Hyphenate Objective-C exception breakpoint labels ✍️
Objective-C is officially hyphenated:
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html#//apple_ref/doc/uid/TP30001163

Reviewed By: mwyman, clayborg

Differential Revision: https://reviews.llvm.org/D113616
2022-03-01 15:02:44 -08:00