481032 Commits

Author SHA1 Message Date
Tacet
09ac2ec3ad
Remove deprecated warning from cmake files (#72595)
`LIBCXXABI_SYSROOT`, `LIBCXXABI_TARGET_TRIPLE` and
`LIBCXXABI_GCC_TOOLCHAIN` are not supported anymore. Based on the
comment, the warning should be removed after branching for LLVM 15.
2023-11-16 21:20:12 -05:00
Alexey Bataev
72b97630bc [SLP][NFC]Fix comparison of integers of different signs warning, NFC. 2023-11-16 17:18:28 -08:00
Shraiysh
c06700bd75
Revert "[flang][OpenMP] Add semantic check for declare target" (#72592)
Reverts llvm/llvm-project#71861
2023-11-16 19:17:56 -06:00
Aart Bik
83cf0dc982
[mlir][sparse] implement direct IR alloc/empty/new for non-permutations (#72585)
This change implements the correct *level* sizes set up for the direct
IR codegen fields in the sparse storage scheme. This brings libgen and
codegen together again.

This is step 3 out of 3 to make sparse_tensor.new work for BSR
2023-11-16 17:17:41 -08:00
Lang Hames
d97981c98a [ORC-RT] Add missing cstdint include.
This should have been included in b2bbe8cc1c7. Adding it should fix the bot
failures in https://lab.llvm.org/buildbot/#/builders/85/builds/20288
2023-11-16 16:45:29 -08:00
Valentin Clement (バレンタイン クレメン)
9365ed1e10
[flang][openacc] Add ability to link acc.declare_enter with acc.declare_exit ops (#72476) 2023-11-16 16:41:50 -08:00
Jakub Kuderski
c6f7b631a9
[mlir][spirv] Fix VectorShuffle assembly format (#72568)
Align with the rest of the spirv dialect by using a functional type
syntax.

Regex for updating existing code:
`spirv\.VectorShuffle (\[.+\]) (%[^:]+): ([^,]+), (%[^:]+): ([^\s]+) ->(.+)`
 ==>
`spirv.VectorShuffle $1 $2, $4 : $3, $5 ->$6`
2023-11-16 19:34:00 -05:00
Alexey Bataev
cb678708e6 [SLP][NFC]Add TreeEntry-based add member functions and use them, where
possible, NFC.
2023-11-16 16:30:52 -08:00
Yinying Li
c5a67e16b6
[mlir][sparse] Use variable instead of inlining sparse encoding (#72561)
Example:

#CSR = #sparse_tensor.encoding<{
  map = (d0, d1) -> (d0 : dense, d1 : compressed),
}>

// CHECK: #[[$CSR.*]] = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0
: dense, d1 : compressed) }>
// CHECK-LABEL: func private @sparse_csr(
// CHECK-SAME: tensor<?x?xf32, **#[[$CSR]]**>)
func.func private @sparse_csr(tensor<?x?xf32, #CSR>)
2023-11-16 19:30:21 -05:00
Usama Hameed
4fe29d0dc2
[ASan] AddressSanitizerPass constructor should honor the AsanCtorKind argument (#72330)
Currently, the ConstructorKind member variable in AddressSanitizerPass
gets overriden by the ClConstructorKind whether the option is passed
from the command line or not. This override should only happen if the
ClConstructorKind argument is passed from the command line. Otherwise,
the constructor should honor the argument passed to it. This patch makes
this fix.

rdar://118423755
2023-11-16 16:29:05 -08:00
Lang Hames
c11be31104 [C-API] Fix typo in comment. 2023-11-16 16:14:15 -08:00
Lang Hames
b2bbe8cc1c [ORC-RT] Add bitmask-enum and bit_ceil utilities to the ORC runtime.
bitmask_enum.h is essentially a copy of llvm/ADT/BitmaskEnum.h, with some minor
cleanup and renaming.

The bit_ceil function is a placeholder for std::bit_ceil, which we can use once
compiler-rt can use c++20.

These utilities will be used to simplify bitfield enum usage in upcoming
ORC-RT patches.
2023-11-16 16:14:15 -08:00
Lang Hames
b2e7527318 [ORC] Fix some typos in comments in MachOPlatform. 2023-11-16 16:14:15 -08:00
Alexey Bataev
484a27e412 [SLP][NFC]Make needToDelay constant, NFC. 2023-11-16 16:11:43 -08:00
Brad Smith
49795d2776 [Driver][NFC] A bit more const for OpenBSD and DragonFly 2023-11-15 19:36:56 -05:00
Shraiysh
7ff8094a39
[flang][OpenMP] Add semantic check for declare target (#71861)
This patch adds the following check from OpenMP 5.2.

```
If the directive has a clause, it must contain at least one enter clause
or at least one link clause.
```

Also added a warning for the deprication of `TO` clause on `DECLARE
TARGET` construct.

```
The clause-name to may be used as a synonym for the clause-name enter.
This use has been deprecated.
```

Based on the tests for to clause, the tests for enter clause are added.

This patch does not add tests where both to and enter clause are used together.
2023-11-16 18:03:32 -06:00
Davide Italiano
615ebfc3e5
[SampleProfileProbe] Downgrade probes too large from error to warning. (#72574) 2023-11-16 15:57:51 -08:00
Owen Pan
f0ad9ea36a
[clang-format] Handle lambdas in QualifierAlignment (#72456)
Fixed #62780.
2023-11-16 15:00:09 -08:00
Mark de Wever
003a3b04b0
[libc++] Fixes lit portability issues. (#72435)
@StephanTLavavej mentioned the libc++ tests no longer works for MSVC
STL. The regex changes have been provided by Stephan.
2023-11-16 17:56:34 -05:00
Philip Reames
233971b475 [RISCV] Fix typo in a test and regen another to reduce test diff 2023-11-16 14:28:16 -08:00
Peiming Liu
ccd923e3cb
[mlir][sparse] code cleanup (remove dead code related to filter loop). (#72573) 2023-11-16 14:26:09 -08:00
Augusto Noronha
46396108de
[lldb] Add interface to check if UserExpression::Parse() is cacheable (#66826)
When setting conditional breakpoints, we currently assume that a call to
UserExpression::Parse() can be cached and resued multiple times. This
may not be true for every user expression. Add a new method so
subclasses of UserExpression can customize if they are parseable or not.
2023-11-16 14:20:14 -08:00
Philip Reames
1aa493f064 [RISCV] Further expand coverage for insert_vector_elt patterns 2023-11-16 14:14:31 -08:00
Jonathan Thackray
066c4524bc
[AArch64] Add support for Cortex-A520, Cortex-A720 and Cortex-X4 CPUs (#72395)
Cortex-A520, Cortex-A720 and Cortex-X4 are Armv9.2 AArch64 CPUs.

Technical Reference Manual for Cortex-A520:
   https://developer.arm.com/documentation/102517/latest/

Technical Reference Manual for Cortex-A720:
   https://developer.arm.com/documentation/102530/latest/

Technical Reference Manual for Cortex-X4:
   https://developer.arm.com/documentation/102484/latest/

Patch co-authored by: Sivan Shani <sivan.shani@arm.com>
2023-11-16 22:08:58 +00:00
Aiden Grossman
add20537cc Reland "[llvm-exegesis] Fix preservation of RDI in subprocess mode (#72458)"
This reverts commit 186db1bcb0096a6af348d7e17866c68fa2004068.

This relands commit 0718c1a8405ac130d72cd3525befed2911618cc7.

The REQUIRES flag in the test that was added only specified that the
machine needed to have the capability to execute the snippet rather than
actually run it with performance counters. This would work with
--dummy-perf-counters, but that is not currently supported in the
subprocess execution mode. So for now, we require the ability to
actually perform measurements to prevent test failures in configurations
that don't have libpfm or access to performance counters.
2023-11-16 14:03:07 -08:00
Jason Molenda
5f64b94076
Clarify error messages on corefiles that no plugin handles (#72559)
These error messages are written in a way that makes sense to an lldb
developer, but not to an end user who asks lldb to run on a compressed
corefile or whatever. Simplfy the messages.
2023-11-16 13:58:07 -08:00
serge-sans-paille
102f7fce8d
[llvm] Reduce memory footprint of Debug metadata nodes (#71227)
Using a combination of reordering fields and using empty SubclassData32
/ SubclassData1, it's possible to improve the size of data structures
used to store debug info in the IR:

Before:

DILexicalBlock: 24
DILexicalBlockFile: 24
DIModule: 24
DITemplateParameter: 24
DICommonBlock: 24
DIMacro: 24
DICompileUnit: 56
DIType: 48
DINamespace: 24
DIVariable: 24
DIGlobalVariable: 32
DILocalVariable: 32
DILabel: 24

After:

DILexicalBlock: 24
DILexicalBlockFile: 16
DIModule: 16
DITemplateParameter: 16
DICommonBlock: 16
DIMacro: 16
DICompileUnit: 48
DIType: 40
DINamespace: 16
DIVariable: 24
DIGlobalVariable: 24
DILocalVariable: 32
DILabel: 16
2023-11-16 21:55:43 +00:00
Fangrui Song
ae623d16d5 [Driver,Gnu] Simplify -static -static-pie -shared -pie handling and suppress -shared -rdynamic warning
These options select different link modes (note: -shared -static can be
used together for musl and mingw). It makes sense to place them
together, which enables some simplification. The relevant ld options
are now consistently placed after -m, similar to GCC.

While here, suppress -Wunused-command-line-argument warning when -shared
-rdynamic are used together (introduced by commit
291f4a00232b5742940d67e2ecf9168631251317). It can be argued either way
whether the warning is justified (in ELF linkers --export-dynamic
functionality is subsumed by -shared), but it is not useful (users can
do -Wl,--export-dynamic, bypassing the driver diagnostic).
2023-11-16 13:48:04 -08:00
David Li
ac3779e92e
Enable Custom Lowering for fabs.v8f16 on AVX (#71730)
[X86]: Enable custom lowering for fabs.v8f16 on AVX

Currently, custom lowering of fabs.v8f16 requires AVX512FP16, which is
too restrictive. For v8f16 fabs lowering, no instructions in AVX512FP16
are needed. Without the fix, horribly inefficient code is generated
without AVX512FP16. Note instcombiner generates calls to intrinsics
@llvm.fabs.v8f16 when simplifyping AND <8 x half> operations.
2023-11-16 13:47:31 -08:00
Philip Reames
73e963379e [RISCV] Add test coverage for partial buildvecs idioms
Test coverage for an upcoming set of changes
2023-11-16 13:33:12 -08:00
Peiming Liu
ff8815e597
[mlir][sparse] code cleanup (remove topSort in CodegenEnv). (#72550) 2023-11-16 13:21:49 -08:00
Florian Hahn
6f3b88baa2
[VPlan] Move trunc ([s|z]ext A) simplifications to simplifyRecipe.
Split off simplification from D149903 as suggested.

This should be effectively NFC until D149903 lands.
2023-11-16 21:17:10 +00:00
PiJoules
b2d62c9a58
[clang] Ensure fixed point conversions work in C++ (#68344) 2023-11-16 13:11:15 -08:00
Aiden Grossman
cdfb51295d
[MLGO] Remove -tfutils-use-simplelogger flag (#72492)
This flag was redundant and the value was not used anywhere, so it
should be removed.
2023-11-16 12:50:46 -08:00
Florian Hahn
10c0166909
[PhaseOrdering] Add tests where early sinking prevents if-conversion. 2023-11-16 20:31:21 +00:00
Alex Langford
a322d50804 [lldb] Add forward declaration for SBWatchpointOptions in SBDefines.h 2023-11-16 12:13:44 -08:00
Louis Dionne
f97a579b74 [runtimes] Add TODO about CXX_STANDARD_REQUIRED being off after review comment 2023-11-16 14:58:52 -05:00
Craig Topper
337f0ededc [RISCV] Fix memory leak in RISCVInstrInfoTest.cpp unittest
We need to make sure the RISCVTargetMachine is also deleted.
2023-11-16 11:48:27 -08:00
androm3da
4e6a9fccaa
Hexagon: Add memw_phys, l2gclean* instructions (#72420) 2023-11-16 13:48:20 -06:00
Maksim Levental
4eaf3a9c12
[mlir][python] reformat transform ext (#71136) 2023-11-16 13:37:52 -06:00
Matthias Braun
a9cc6fc280
LoopVectorize: Set branch_weight for conditional branches (#72450)
Consistently add `branch_weights` metadata in any condition branch
created by `LoopVectorize.cpp`:
- Will only add metadata if the original loop-latch branch had metadata
assigned.
- Most checks should rarely trigger so I am using a 127:1 ratio.
- For the middle block we assume an equal distribution of modulo
results.
2023-11-16 11:33:46 -08:00
Billy Zhu
0ab6b20c36
[MLIR] Add DIExpression to LLVM dialect (#72462)
Add initial support for DIExpression in LLVM dialect.

Similar to LLVM IR, DI Expression is encoded as a list of uint64. The
difference is that LLVM IR has helpers for understanding the expression
(e.g. for verification and pretty printing), whereas the current support
added by this PR treats the expression elements as opaque.
2023-11-16 11:32:02 -08:00
Craig Topper
927f6f1858 [RISCV] Use bset+addi for (not (sll -1, X)).
This is an alternative to #71420 that handles i32 on RV64 safely
by pre-promoting the pattern in DAG combine.
2023-11-16 11:14:53 -08:00
Craig Topper
4eaf986be4 [RISCV] Add test cases for (not (sll -1, X)) for Zbs. NFC
We can use (ADDI (BSET X0, X), -1).
2023-11-16 11:14:53 -08:00
Kazu Hirata
f8e8530f73 [StaticAnalyzer] Fix warnings about missing override
This patch fixes:

  clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:609:23:
  error: 'describe' overrides a member function but is not marked
  'override' [-Werror,-Winconsistent-missing-override]

  clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:627:23:
  error: 'describe' overrides a member function but is not marked
  'override' [-Werror,-Winconsistent-missing-override]
2023-11-16 11:06:01 -08:00
Tarun Prabhu
34e4e5eb70
[flang][Driver] Support -rpath, -shared, and -static in the frontend (#66702)
Enable -rpath, -shared, and -static for the flang frontend. This brings
it in line with clang. Fixes issue #65546.
2023-11-16 12:01:17 -07:00
Matthias Braun
cb4627d150
Add setBranchWeigths convenience function. NFC (#72446)
Add `setBranchWeights` convenience function to ProfDataUtils.h and use
it where appropriate.
2023-11-16 10:55:19 -08:00
Aiden Grossman
186db1bcb0 Revert "[llvm-exegesis] Fix preservation of RDI in subprocess mode (#72458)"
This reverts commit 0718c1a8405ac130d72cd3525befed2911618cc7.

The test doesn't have the correct requires string apparently because it
attempts to run on all the buildbots. Reverting until I have time to fix
the test and reland it.
2023-11-16 10:39:53 -08:00
Aiden Grossman
f49bca9b5a
[CMake] Make specifying invalid build type a fatal error (#72021)
This patch makes it so that specifying an invalid value for
CMAKE_BUILD_TYPE is a fatal error. Having this simply as a warning has
caused me (and probably others) a decent amount of headache. The check
was present before, but was proposed to be modified to a warning in
https://github.com/llvm/llvm-project/issues/60975 and changed to a
warning in c75dbeda15c10424910ddc83a9ff7669776c19ac. This patch
reenables that behavior to hopefully reduce frustration for people
building LLVM in the common case while still allowing for alternative
build types to be setup without needing to perform source modification
through the addition of a CMake flag.
2023-11-16 10:32:14 -08:00
Aiden Grossman
0718c1a840
[llvm-exegesis] Fix preservation of RDI in subprocess mode (#72458)
I made a typo at some point while doing the subprocess implementation,
trying to pop RIP from the stack. For whatever reason, this ends up as
popq %rax after being JITed, which means we aren't properly preserving
the value of %rdi.

Regression test added.

This fixes #72188.
2023-11-16 10:27:10 -08:00