platform/upstream/llvm.git
20 months agoRemove this type from Parser.h; NFC
Aaron Ballman [Mon, 28 Nov 2022 18:11:31 +0000 (13:11 -0500)]
Remove this type from Parser.h; NFC

TypeVector is only used once and isn't used in any interfaces, so this
removes the typedef.

20 months ago[RISCV] Simplify eliminateFrameIndex in advance of reuse [nfc-ish]
Philip Reames [Mon, 28 Nov 2022 17:26:21 +0000 (09:26 -0800)]
[RISCV] Simplify eliminateFrameIndex in advance of reuse [nfc-ish]

The prior code intermixed several concerns - the actual materialization of the offset, the choice of destination register, and whether to prune the ADDI. This version factors the first part out, and then reasons only about the later two. My intention is to merge the adjustReg routine with the one from frame lowering, and then explore using the merged result to simplify frame setup and tear down.

This change is conceptually NFC, but since it results in slightly different vreg usage, the end result can change register allocation in minor ways.

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

20 months ago[X86] Fix SLM ldmxcsr/stmxcsr schedule classes
Simon Pilgrim [Mon, 28 Nov 2022 17:43:10 +0000 (17:43 +0000)]
[X86] Fix SLM ldmxcsr/stmxcsr schedule classes

Fix a long standing FIXME comment using a mixture of llvm-exegesis and Agner numbers

20 months ago[opt][NFC] Simplify GetCodeGenOptLevel()
Arthur Eubanks [Mon, 28 Nov 2022 17:29:08 +0000 (09:29 -0800)]
[opt][NFC] Simplify GetCodeGenOptLevel()

Removed code is unreachable after D137663.

20 months ago[AVR] Do not use R0/R1 on avrtiny
Ayke van Laethem [Wed, 23 Nov 2022 16:24:44 +0000 (17:24 +0100)]
[AVR] Do not use R0/R1 on avrtiny

This patch makes sure the compiler uses R16/R17 on avrtiny (attiny10
etc) instead of R0/R1.

Some notes:

  * For the NEGW and ROLB instructions, it adds an explicit zero
    register. This is necessary because the zero register is different
    on avrtiny (and InstrInfo Uses lines need a fixed register).
  * Not entirely sure about putting all tests in features/avr-tiny.ll,
    but it doesn't seem like the "target-cpu"="attiny10" attribute
    works.

Updates: https://github.com/llvm/llvm-project/issues/53459

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

20 months ago[RISCV] Add cost model for integer and float vector arithmetic instructions.
Philip Reames [Mon, 28 Nov 2022 17:00:57 +0000 (09:00 -0800)]
[RISCV] Add cost model for integer and float vector arithmetic instructions.

This patch implements getArithmeticInstrCost for RISCV, supports cost
model for integer and float vector arithmetic instructions.

Differential Revision: https://reviews.llvm.org/D133552 (Original patch by jacquesguan.  Subset by me with todos added.)

20 months ago[ConstraintElim] Use collectOffset instead of custom GEP idx iteration.
Florian Hahn [Mon, 28 Nov 2022 16:54:58 +0000 (16:54 +0000)]
[ConstraintElim] Use collectOffset instead of custom GEP idx iteration.

Use collectOffset to collect scaled indices and constant offset for GEP
instead of custom code. This simplifies the logic in decomposeGEP and
allows to handle all cases supported by the generic helper.

20 months agoAMDGPU: Bulk update all GlobalISel tests to use opaque pointers
Matt Arsenault [Mon, 28 Nov 2022 16:31:25 +0000 (11:31 -0500)]
AMDGPU: Bulk update all GlobalISel tests to use opaque pointers

20 months ago[AArch64] Add patterns for SVE predicated add/sub and mov combine
Nicola Lancellotti [Tue, 22 Nov 2022 15:35:29 +0000 (15:35 +0000)]
[AArch64] Add patterns for SVE predicated add/sub and mov combine

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

20 months ago[AArch64] Pre-commit test for "Add patterns for SVE predicated add/sub and mov combine"
Nicola Lancellotti [Tue, 22 Nov 2022 15:25:13 +0000 (15:25 +0000)]
[AArch64] Pre-commit test for "Add patterns for SVE predicated add/sub and mov combine"

20 months agoRevert "[AArch64] Canonicalize ZERO_EXTEND to VSELECT"
Nicola Lancellotti [Tue, 22 Nov 2022 15:13:42 +0000 (15:13 +0000)]
Revert "[AArch64] Canonicalize ZERO_EXTEND to VSELECT"

This reverts commit 43fe14c056458501990c3db2788f67268d1bdf38.

20 months ago[flang] Adapt target rewrite for fir.dispatch operation
Valentin Clement [Mon, 28 Nov 2022 16:32:26 +0000 (17:32 +0100)]
[flang] Adapt target rewrite for fir.dispatch operation

Handle rewriting dispatch operation with complex arguments or
return.

sret will be done in a separate patch.

Reviewed By: jeanPerier, PeteSteinfeld

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

20 months ago[X86] Remove unnecessary (V)?PBLENDW(Y)?rm overrides
Simon Pilgrim [Mon, 28 Nov 2022 16:30:24 +0000 (16:30 +0000)]
[X86] Remove unnecessary (V)?PBLENDW(Y)?rm overrides

The znver1/znver2 overrides shouldn't need 2uops for the xmm case (but znver1 should double-pump for the ymm case).

Found with the help of D138359

20 months ago[VPlan] Add VPDerivedIVRecipe, use for VPScalarIVStepsRecipe.
Florian Hahn [Mon, 28 Nov 2022 16:32:31 +0000 (16:32 +0000)]
[VPlan] Add VPDerivedIVRecipe, use for VPScalarIVStepsRecipe.

This patch splits off the logic to transform the canonical IV to a
a value for an induction with a different start and step. This
transformation only needs to be done once (independent of VF/UF) and
enables sinking of VPScalarIVStepsRecipe as follow-up.

Reviewed By: Ayal

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

20 months agoAMDGPU: Bulk update some r600 tests to opaque pointers
Matt Arsenault [Mon, 28 Nov 2022 16:14:03 +0000 (11:14 -0500)]
AMDGPU: Bulk update some r600 tests to opaque pointers

r600.amdgpu-alias-analysis.ll has something strange going on where
AliasAnalyisEvaluator's printing is reproducing the typed pointer
syntax.

20 months ago[OpenMP] Do not add wrapper headers if using '-nogpuinc'
Joseph Huber [Wed, 23 Nov 2022 19:24:56 +0000 (13:24 -0600)]
[OpenMP] Do not add wrapper headers if using '-nogpuinc'

The OpenMP offloading toolchain uses wrapper headers to implement some
standard features on the GPU. Currently there is no way to turn these
off without also disabling all the standard includes altogether. This
patch makes `-nogpuinc` apply to these wrapper headers so we can use a
sterile toolchain. This was causing problems when attempting to compile
a `libc` for the GPU using OpenMP.

Reviewed By: jdoerfert

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

20 months ago[libc++] Remove CMake workaround for the discontinued Projects build
Louis Dionne [Mon, 28 Nov 2022 13:52:13 +0000 (08:52 -0500)]
[libc++] Remove CMake workaround for the discontinued Projects build

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

20 months ago[libc++][NFC] Add assertions before calling memmove
Louis Dionne [Mon, 28 Nov 2022 13:39:42 +0000 (08:39 -0500)]
[libc++][NFC] Add assertions before calling memmove

Since we're checking preconditions for calling memmove, we might
as well do that properly.

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

20 months agoRevert "[Assignment Tracking][13/*] Account for assignment tracking in SROA"
OCHyams [Mon, 28 Nov 2022 16:06:10 +0000 (16:06 +0000)]
Revert "[Assignment Tracking][13/*] Account for assignment tracking in SROA"

This reverts commit e16d59973ffec77eeef73409570bdf04a69c2405.

Buildbot failure:
https://lab.llvm.org/buildbot/#/builders/236/builds/1205

20 months agoRevert "[Assignment Tracking][SROA] Follow-up for failing test"
OCHyams [Mon, 28 Nov 2022 16:04:45 +0000 (16:04 +0000)]
Revert "[Assignment Tracking][SROA] Follow-up for failing test"

This reverts commit 285d46ef4b60c0919c00661199c1b010996cc2c1.

Failing buildbot:
https://lab.llvm.org/buildbot/#/builders/236/builds/1205

20 months ago[mlir][sparse] Improve concatenate operator rewriting for dense tensor results.
bixia1 [Tue, 22 Nov 2022 01:50:16 +0000 (17:50 -0800)]
[mlir][sparse] Improve concatenate operator rewriting for dense tensor results.

Reviewed By: Peiming

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

20 months ago[flang] Hanlde disptach op in abstract result pass
Valentin Clement [Mon, 28 Nov 2022 15:49:25 +0000 (16:49 +0100)]
[flang] Hanlde disptach op in abstract result pass

Update the call conversion pattern to support fir.dispatch
operation as well. The first operand of fir.dispatch op is always the
polymoprhic object. The pass_arg_pos attribute needs to be shifted when
the result is added as argument.

Reviewed By: jeanPerier

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

20 months agoAMDGPU: Convert promote alloca tests to opaque pointers
Matt Arsenault [Mon, 28 Nov 2022 15:36:38 +0000 (10:36 -0500)]
AMDGPU: Convert promote alloca tests to opaque pointers

20 months agoAMDGPU: Convert test to generated checks
Matt Arsenault [Mon, 28 Nov 2022 15:25:41 +0000 (10:25 -0500)]
AMDGPU: Convert test to generated checks

These checks were too thin to begin with, and required slightly
trickier updates for opaque pointers.

20 months agoAMDGPU: Use named values in a test
Matt Arsenault [Mon, 28 Nov 2022 15:24:47 +0000 (10:24 -0500)]
AMDGPU: Use named values in a test

As always, these were an obstacle to test updates.

20 months agoAdd more tests for Reverse Load and AA testing
bipmis [Mon, 28 Nov 2022 15:34:26 +0000 (15:34 +0000)]
Add more tests for Reverse Load and AA testing

20 months ago[mlir][vector] Fix folding of vector.extract from vector.broadcast
Nicolas Vasilache [Mon, 28 Nov 2022 14:12:03 +0000 (06:12 -0800)]
[mlir][vector] Fix folding of vector.extract from vector.broadcast

This revision fixes a bug in the vector.extract folding that was missing
handling the "dim-1" broadcasting case in vector.broadcast.

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

20 months agoSmallVector: Declare explicit instantiations.
Thomas Köppe [Mon, 28 Nov 2022 15:08:54 +0000 (16:08 +0100)]
SmallVector: Declare explicit instantiations.

This was an ODR violation

20 months agoAMDGPU: Use modern address spaces in some tests
Matt Arsenault [Mon, 28 Nov 2022 15:01:20 +0000 (10:01 -0500)]
AMDGPU: Use modern address spaces in some tests

This was way out of date, still using 4 for generic and 0 for private.

20 months ago[SLPVectorizer] Do Not Move Loads/Stores Beyond Stacksave/Stackrestore Boundaries
Qiongsi Wu [Mon, 28 Nov 2022 14:55:11 +0000 (09:55 -0500)]
[SLPVectorizer] Do Not Move Loads/Stores Beyond Stacksave/Stackrestore Boundaries

If left unchecked, the SLPVecrtorizer can move loads/stores below a stackrestore. The move can cause issues if the loads/stores have pointer operands from `alloca`s that are reset by the stackrestores. This patch adds the dependency check.

The check is conservative, in that it does not check if the pointer operands of the loads/stores are actually from `alloca`s that may be reset. We did not observe any SPECCPU2017 performance degradation so this simple fix seems sufficient.

The test could have been added to `llvm/test/Transforms/SLPVectorizer/X86/stacksave-dependence.ll`, but that test has not been updated to use opaque pointers. I am not inclined to add tests that still use typed pointers, or to refactor `llvm/test/Transforms/SLPVectorizer/X86/stacksave-dependence.ll` to use opaque pointers in this patch. If desired, I will open a different patch to refactor and consolidate the tests.

Reviewed By: ABataev

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

20 months ago[InstSimplify] Add precommit tests for select+or patterns; NFC
chenglin.bi [Mon, 28 Nov 2022 14:47:30 +0000 (22:47 +0800)]
[InstSimplify] Add precommit tests for select+or patterns; NFC

20 months agoEncode columnWidthUTF8 tests as UTF-8 sequences.
Corentin Jabot [Mon, 28 Nov 2022 14:53:44 +0000 (15:53 +0100)]
Encode columnWidthUTF8 tests as UTF-8 sequences.

Some platforms do not encode string literals as UTF-8
when building llvm

20 months agoGCOVProfiling: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:35:56 +0000 (17:35 -0500)]
GCOVProfiling: Convert tests to opaque pointers

function-numbering.ll was a special case where the checks are for a
new function which does have unnecessary GEPs with 0 indices.

20 months agoInstMerge: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:51:44 +0000 (17:51 -0500)]
InstMerge: Convert tests to opaque pointers

20 months agollvm-split: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 18:29:14 +0000 (13:29 -0500)]
llvm-split: Convert tests to opaque pointers

global.ll and scc-const-alias.ll needed some manual fixups; the script
seems to not correctly deal with constantexpr bitcasts.

20 months agoNameAnonGlobals: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 01:11:15 +0000 (20:11 -0500)]
NameAnonGlobals: Convert tests to opaque pointers

20 months agoFunctionSpecialization: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:32:52 +0000 (17:32 -0500)]
FunctionSpecialization: Convert tests to opaque pointers

20 months agoIndirectBrExpand: Convert test to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:31:49 +0000 (17:31 -0500)]
IndirectBrExpand: Convert test to opaque pointers

20 months agoGuardWidening: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:31:09 +0000 (17:31 -0500)]
GuardWidening: Convert tests to opaque pointers

20 months agoIRCE: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:27:10 +0000 (17:27 -0500)]
IRCE: Convert tests to opaque pointers

20 months agoPlaceSafepoints: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 21:54:52 +0000 (16:54 -0500)]
PlaceSafepoints: Convert tests to opaque pointers

20 months agoRelLookupTableConverter: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 21:49:43 +0000 (16:49 -0500)]
RelLookupTableConverter: Convert tests to opaque pointers

20 months agoStripSymbols: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 21:15:58 +0000 (16:15 -0500)]
StripSymbols: Convert tests to opaque pointers

20 months agoSyntheticCountsPropagation: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 21:15:07 +0000 (16:15 -0500)]
SyntheticCountsPropagation: Convert tests to opaque pointers

20 months agoTailCallElim: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 21:12:58 +0000 (16:12 -0500)]
TailCallElim: Convert tests to opaque pointers

This was painless and all converted by the script fine.

20 months agoBoundsChecking: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 20:53:27 +0000 (15:53 -0500)]
BoundsChecking: Convert tests to opaque pointers

20 months agoPoisonChecking: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 21:02:31 +0000 (16:02 -0500)]
PoisonChecking: Convert tests to opaque pointers

20 months agoHeapProfiler: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 21:44:53 +0000 (16:44 -0500)]
HeapProfiler: Convert tests to opaque pointers

Needed to manually fix masked-load-store.ll.

20 months agoAMDGPU: Convert debug info tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 19:34:21 +0000 (14:34 -0500)]
AMDGPU: Convert debug info tests to opaque pointers

20 months agoRevert "[MemProf] Defer profile file setup until dump time"
Teresa Johnson [Mon, 28 Nov 2022 14:29:24 +0000 (06:29 -0800)]
Revert "[MemProf] Defer profile file setup until dump time"

This reverts commit ea1826ee57984d4f44fdb4b35a47169d393618ed.

This change is breaking the ability of tests to override the profile
output file. Need to add a mechanism to do that before resubmitting.

20 months agoCodeGenPrepare: Convert most tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 16:33:38 +0000 (11:33 -0500)]
CodeGenPrepare: Convert most tests to opaque pointers

NVPTX/dont-introduce-addrspacecast.ll required manually removing a check for
a bitcast.

AArch64/combine-address-mode.ll required rerunning update_test_checks

Mips required some manual updates due to a CHECK-NEXT coming after a
deleted bitcast.

ARM/sink-addrmode.ll needed one small manual fix.

Excludes one X86 function which needs more attention.

20 months agoUpdate the list of double width codepoints
Corentin Jabot [Tue, 22 Nov 2022 19:30:19 +0000 (20:30 +0100)]
Update the list of double width codepoints

All east asian width wide and full-width codepoints
are considered double width, as well as emojis and
symbols commonely rendered as emoji.

Reviewed By: aaron.ballman

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

20 months agoScalarizeMaskedMemIntrin: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 21:21:39 +0000 (16:21 -0500)]
ScalarizeMaskedMemIntrin: Convert tests to opaque pointers

This was as easy as running the script and running
update_test_checks. I did notice the pass produces some GEPs with 0
indexes, such that running the opaquify script a second time produces
a diff.

20 months agoLowerInvoke: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:23:50 +0000 (17:23 -0500)]
LowerInvoke: Convert tests to opaque pointers

20 months agoLowerGuardIntrinsic: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:24:16 +0000 (17:24 -0500)]
LowerGuardIntrinsic: Convert tests to opaque pointers

20 months agoLowerGlobalDestructors: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:24:55 +0000 (17:24 -0500)]
LowerGlobalDestructors: Convert tests to opaque pointers

20 months agoDivRemPairs: Convert tests to use opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:30:20 +0000 (17:30 -0500)]
DivRemPairs: Convert tests to use opaque pointers

20 months agoLowerExpectIntrinsic: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:25:22 +0000 (17:25 -0500)]
LowerExpectIntrinsic: Convert tests to opaque pointers

20 months agoLowerConstantIntrinsics: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:26:00 +0000 (17:26 -0500)]
LowerConstantIntrinsics: Convert tests to opaque pointers

20 months agoHardwareLoops: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:37:45 +0000 (17:37 -0500)]
HardwareLoops: Convert tests to opaque pointers

20 months agoPartialInlining: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 01:15:46 +0000 (20:15 -0500)]
PartialInlining: Convert tests to opaque pointers

Once again the script decided to delete an llvm.assume declaration
which I manually restored.

20 months ago[libc++][NFC] Rename include guards under /support/
Louis Dionne [Mon, 28 Nov 2022 14:03:31 +0000 (09:03 -0500)]
[libc++][NFC] Rename include guards under /support/

For consistency with the rest of the code base.

20 months agoAtomicExpand: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 15:52:10 +0000 (10:52 -0500)]
AtomicExpand: Convert tests to opaque pointers

20 months agoSink: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 21:16:47 +0000 (16:16 -0500)]
Sink: Convert tests to opaque pointers

20 months agoDivergenceAnalysis: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 19:32:12 +0000 (14:32 -0500)]
DivergenceAnalysis: Convert tests to opaque pointers

20 months agoDCE: Update tests to use opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:29:50 +0000 (17:29 -0500)]
DCE: Update tests to use opaque pointers

basic.ll:test_lifetime_bitcast is a strange case. The comment says
it's trying to keep the lifetime intrinsics for bitcasts. Leave a
dummy bitcast for now to keep it happy.

20 months agoAMDGPU/GlobalISel: Fix hardcoded virtual register numbers in test
Matt Arsenault [Mon, 28 Nov 2022 13:22:36 +0000 (08:22 -0500)]
AMDGPU/GlobalISel: Fix hardcoded virtual register numbers in test

20 months agoPreISelIntrinsicLowering: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 15:53:16 +0000 (10:53 -0500)]
PreISelIntrinsicLowering: Convert tests to opaque pointers

20 months agoSpeculativeExecution: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 15:54:38 +0000 (10:54 -0500)]
SpeculativeExecution: Convert tests to opaque pointers

20 months agoReg2Mem: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 15:54:01 +0000 (10:54 -0500)]
Reg2Mem: Convert tests to opaque pointers

20 months agoMem2Reg: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 15:49:30 +0000 (10:49 -0500)]
Mem2Reg: Convert tests to opaque pointers

This was a painless conversion.

20 months ago[clangd] Fix broken call missed in D138780
Sam McCall [Mon, 28 Nov 2022 13:36:48 +0000 (14:36 +0100)]
[clangd] Fix broken call missed in D138780

20 months ago[clangd] Add script to maintain list of fast clang-tidy checks
Sam McCall [Tue, 22 Nov 2022 13:49:23 +0000 (14:49 +0100)]
[clangd] Add script to maintain list of fast clang-tidy checks

The plan is to intersect this list with the checks selected per config.
This is not yet done, but the initial list is checked in as a baseline.

https://github.com/clangd/clangd/issues/1337

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

20 months ago[SVE] Tidy up the bfloat matmul instruction classes
David Sherwood [Mon, 28 Nov 2022 11:39:40 +0000 (11:39 +0000)]
[SVE] Tidy up the bfloat matmul instruction classes

It doesn't really make sense for the bfloat matmul to derive
from sve_bfloat_dot_base, especially since it's not used
anywhere else.

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

20 months ago[libc++][NFC] Remove stray whitespace in string_view
Louis Dionne [Sun, 27 Nov 2022 22:30:35 +0000 (17:30 -0500)]
[libc++][NFC] Remove stray whitespace in string_view

20 months ago[libc++][NFC] Use using declaration instead of typedef in string_view
Louis Dionne [Sun, 27 Nov 2022 22:27:36 +0000 (17:27 -0500)]
[libc++][NFC] Use using declaration instead of typedef in string_view

20 months ago[mlir] Export `collapseGenericOpIterationDims` (NFC)
Guray Ozen [Fri, 25 Nov 2022 09:52:51 +0000 (10:52 +0100)]
[mlir] Export `collapseGenericOpIterationDims` (NFC)

This revision exports `collapseGenericOpIterationDims` to a header so it can be used outside of the pattern.  We have use-case where we want to call this function directly.

Reviewed By: springerm

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

20 months ago[include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions
Sam McCall [Mon, 28 Nov 2022 09:36:13 +0000 (10:36 +0100)]
[include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions

Based on include-cleaner's version, but:

- remove assert that can fail for input `/\<newline>* */`
- assert was also checking the wrong condition: that the prefix *differed* from
  either `//` or from `/*`. Avoid use of strncmp where we can.
- add a comment that the brittleness of the text matching is intentional

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

20 months ago[Assignment Tracking][SROA] Follow-up for failing test
OCHyams [Mon, 28 Nov 2022 11:59:14 +0000 (11:59 +0000)]
[Assignment Tracking][SROA] Follow-up for failing test

Follow-up for D133296 / e16d59973ffec77eeef73409570bdf04a69c2405

Buildbot example: https://lab.llvm.org/buildbot/#/builders/6/builds/16989

20 months ago[analyzer] Remove the unused LocalCheckers.h header
Balazs Benics [Mon, 28 Nov 2022 12:08:38 +0000 (13:08 +0100)]
[analyzer] Remove the unused LocalCheckers.h header

20 months ago[LoongArch] Add atomic ordering information for binary atomic operations
gonglingqin [Mon, 28 Nov 2022 11:50:33 +0000 (19:50 +0800)]
[LoongArch] Add atomic ordering information for binary atomic operations

This patch also implements not emit fence in atomic binary operation
when AtomicOrdering is monotonic and fixes the issue of loading from
non ptr parameters.

The processing of other levels of AtomicOrdering will be added later.

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

20 months ago[AArch64][AsmParser] SME: Allow h/v suffix to be upper-case.
Sander de Smalen [Thu, 24 Nov 2022 17:16:28 +0000 (17:16 +0000)]
[AArch64][AsmParser] SME: Allow h/v suffix to be upper-case.

20 months ago[Assignment Tracking][13/*] Account for assignment tracking in SROA
OCHyams [Mon, 28 Nov 2022 11:21:46 +0000 (11:21 +0000)]
[Assignment Tracking][13/*] Account for assignment tracking in SROA

The Assignment Tracking debug-info feature is outlined in this RFC:

https://discourse.llvm.org/t/
rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir

Split dbg.assign intrinsics into fragments similarly to what SROA already does
for dbg.declares, except that there's many more intrinsics to split. The
function migrateDebugInfo generates new dbg.assigns intrinsic for each part of
a split store.

Reviewed By: jmorse

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

20 months ago[AMDGPU] Intrinsic to expose s_wait_event for export ready
David Stuttard [Thu, 17 Nov 2022 15:44:39 +0000 (15:44 +0000)]
[AMDGPU] Intrinsic to expose s_wait_event for export ready

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

20 months ago[AArch64][SME]: Generate streaming-compatible code for fp-compares.
Hassnaa Hamdi [Thu, 24 Nov 2022 13:47:06 +0000 (13:47 +0000)]
[AArch64][SME]: Generate streaming-compatible code for fp-compares.

To generate code compatible to streaming mode:
 - enable expanding ISD::SETUEQ to avoid custom-lowering setcc to setcc_merge_zero
   which cause a crash while instruction selection because there is no pattern match for it.

- Testing files:
 - fp-compares.ll

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

20 months ago[Mem2Reg] Switch tests to use opt -passes
Bjorn Pettersson [Mon, 28 Nov 2022 11:10:09 +0000 (12:10 +0100)]
[Mem2Reg] Switch tests to use opt -passes

Also added FileCheck verification to three old tests that only
verified that we did not crash.

20 months ago[clang][CodeGen] Switch tests to use opt -passes
Bjorn Pettersson [Mon, 28 Nov 2022 10:48:30 +0000 (11:48 +0100)]
[clang][CodeGen] Switch tests to use opt -passes

20 months ago[AMDGPU][AsmParser] Remove the now-unused OptionalOperand structure.
Ivan Kosarev [Mon, 28 Nov 2022 10:58:18 +0000 (10:58 +0000)]
[AMDGPU][AsmParser] Remove the now-unused OptionalOperand structure.

Became unused in https://reviews.llvm.org/D138492 .

20 months ago[SCEV] Introduce field for storing SymbolicMaxNotTaken. NFCI
Max Kazantsev [Fri, 25 Nov 2022 06:10:24 +0000 (13:10 +0700)]
[SCEV] Introduce field for storing SymbolicMaxNotTaken. NFCI

ritht is initialized with either exact (if available) or
with constant max exit count. In the future, this can be improved.

Hypothetically this is not an NFC (it is possible that exact is not
known and max is known for a particular exit), but for how we use
it now it seems be an NFC (or at least I could not find an example
where it differs). constant max exit count. In the future, this can
be improved.

Differential Revision: https://reviews.llvm.org/D138699
Reviewed By: lebedev.ri

20 months ago[MLIR] Simplify logic in `parseDynamicIndexList` (NFC)
Lorenzo Chelini [Fri, 25 Nov 2022 09:16:26 +0000 (10:16 +0100)]
[MLIR] Simplify logic in `parseDynamicIndexList` (NFC)

We can use `parseCommaSeparatedList` to simplify the logic of
`parseDynamicIndexList`. We don't need to explicitly check delimiters
and comma anymore, this is done for us by `parseCommaSeparatedList`.

Reviewed By: mehdi_amini

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

20 months ago[NFC] Add helper method to ensure min alignment on MCSection
Guillaume Chatelet [Thu, 24 Nov 2022 20:54:12 +0000 (20:54 +0000)]
[NFC] Add helper method to ensure min alignment on MCSection

Follow up on D138653.

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

20 months agoRemove TargetMachine::adjustPassManager
Bjorn Pettersson [Thu, 10 Nov 2022 19:11:06 +0000 (20:11 +0100)]
Remove TargetMachine::adjustPassManager

Since opt no longer supports to run default (O0/O1/O2/O3/Os/Oz)
pipelines using the legacy PM, there are no in-tree uses of
TargetMachine::adjustPassManager remaining. This patch removes the
no longer used adjustPassManager functions.

Reviewed By: aeubanks

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

20 months ago[include-cleaner] Fix walkUsed only report a single macro ref.
Haojian Wu [Mon, 28 Nov 2022 09:11:08 +0000 (10:11 +0100)]
[include-cleaner] Fix walkUsed only report a single macro ref.

20 months agoReland "[Lex] Fix suggested spelling of /usr/bin/../include/foo"
Sam McCall [Fri, 25 Nov 2022 13:19:04 +0000 (14:19 +0100)]
Reland "[Lex] Fix suggested spelling of /usr/bin/../include/foo"

This reverts commit 1dc0a1e5d220b83c1074204bd3afd54f3bac4270.

Failures were caused by unintentional conversion to native slashes by
remove_dots, so undo that: we always suggest posix slashes for includes.

This could potentially be a change in behavior on windows if people were
spelling headers with backslashes and headermaps contained backslashes,
but that's all underspecified and I don't think anyone uses headermaps
on windows.

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

20 months ago[include-cleaner] Capture private headers in PragmaIncludes.
Viktoriia Bakalova [Mon, 28 Nov 2022 09:00:46 +0000 (10:00 +0100)]
[include-cleaner] Capture private headers in PragmaIncludes.

Save file IDs of IWYU private headers and report them as private.

Reviewed By: hokein

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

20 months ago[mlir][Test] Add a test pass to act as a sink towards LLVM conversion
Nicolas Vasilache [Fri, 25 Nov 2022 18:22:32 +0000 (10:22 -0800)]
[mlir][Test] Add a test pass to act as a sink towards LLVM conversion

This allows writing simple e2e tests where we can check for the proper materialization
of specific LLVM IR (e.g. `llvm.intr.fmuladd`).

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

20 months ago[AArch64] Fix cost model for `udiv` instruction when one of the operands is a uniform...
Zain Jaffal [Mon, 28 Nov 2022 08:37:31 +0000 (10:37 +0200)]
[AArch64] Fix cost model for `udiv` instruction when one of the operands is a uniform constant

Currently the model over estimates the cost of a udiv instruction with one constant. The correct cost for a udiv instruction is
insert_cost * extract_cost * num_elements

Reviewed By: dmgreen

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

20 months agoRemove support for 10.4 Tiger from AsmPrinter
Guillaume Chatelet [Fri, 25 Nov 2022 13:43:17 +0000 (13:43 +0000)]
Remove support for 10.4 Tiger from AsmPrinter

I stumbled on this while trying to tighten Alignment in MCStreamer (D138705).
From the [wikipedia page](https://en.wikipedia.org/wiki/Mac_OS_X_Tiger), last release of MacOSX Tiger was released 15 years ago and is not supported anymore by Apple.

Relevant commit : https://github.com/llvm/llvm-project/commit/9f06f911d197577b80d208a167980833b4fb9ad5#diff-17b326b45ef392288420bed274616afa7df81b27576c96723b3c25f5198dc398

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

20 months ago[test][asan] Speedup the test
Vitaly Buka [Mon, 28 Nov 2022 07:14:06 +0000 (23:14 -0800)]
[test][asan] Speedup the test

20 months ago[NFC][asan] Fix typo in names
Vitaly Buka [Mon, 28 Nov 2022 07:11:56 +0000 (23:11 -0800)]
[NFC][asan] Fix typo in names