Arjun P [Thu, 17 Mar 2022 22:22:11 +0000 (22:22 +0000)]
[MLIR][Presburger] unittests: move more util functions into Utils.h (NFC)
Arthur Eubanks [Fri, 18 Mar 2022 23:49:12 +0000 (16:49 -0700)]
[OpaquePointers][BitcodeReader] Enable -opaque-pointers if we see an opaque pointer type
This allows us to more easily test opaque pointers e.g. in the case of
ThinLTO where we only have to pass -opaque-pointers to the frontend.
Reviewed By: #opaque-pointers, nikic
Differential Revision: https://reviews.llvm.org/D122048
Craig Topper [Mon, 21 Mar 2022 16:09:13 +0000 (09:09 -0700)]
[VP] Make VectorBuilder take IRBuilderBase instead of IRBuilder<>
IRBuilder<> assumes specific values for template parameters.
IRBuilderBase abstracts away the template.
Reviewed By: simoll
Differential Revision: https://reviews.llvm.org/D122032
Simon Pilgrim [Mon, 21 Mar 2022 16:09:45 +0000 (16:09 +0000)]
[X86] Add PR34666 redundant broadcast test case
Andrew Litteken [Mon, 21 Mar 2022 15:18:24 +0000 (10:18 -0500)]
[IROutliner] Fix phi nodes when self referential within block but doesn't contain branch
When outlining a phi node, if the the incoming branch is a block contained in the region and the branch from that block is not outlined, we create broken code. The fix is to recognize when that branch from the included incoming block is not contained, and ignore the region.
Reviewer: paquette
Differential Revision: https://reviews.llvm.org/D121311
psamolysov-intel [Mon, 21 Mar 2022 15:56:26 +0000 (10:56 -0500)]
[InferAddressSpaces][NFC] Small code improvements for the InferAddressSpaces pass
There is a bunch of code improvements in the patch: marking as const everything what can be
const and fixing some typos in comments.
Also the patch removes the shadowing parameter TTI from the rewriteWithNewAddressSpaces
method, the TTI parameter is not required because the same field is in the class.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D121671
Arjun P [Fri, 18 Mar 2022 12:25:15 +0000 (12:25 +0000)]
[MLIR][Presburger] Support PWMAFunction::dump by calling into print
This was declared but not defined previously.
Simon Pilgrim [Mon, 21 Mar 2022 15:50:51 +0000 (15:50 +0000)]
[X86] Don't fold SUB(X,SBB(0,0,W)) -> SUB(ADC(0,0,W),Y)
This will further fold to a AND(SETCC_CARRY(),1) pattern which tends to prevent further folds.
Simon Pilgrim [Mon, 21 Mar 2022 15:36:21 +0000 (15:36 +0000)]
[X86] Add ((z & m) >> s) - (x + y)) sub -> sbb test case
Another variant based off the PR35908 test cases
Arjun P [Fri, 18 Mar 2022 14:53:52 +0000 (14:53 +0000)]
[MLIR][Presburger] fix typo: maybeGetNonIntegeralVarRow -> maybeGetNonIntegralVarRow (NFC)
zhongyunde [Mon, 21 Mar 2022 15:14:15 +0000 (23:14 +0800)]
[AArch64][SelectionDAG] Supports unpklo/hi instructions to reduce the number of loads
Trying to reduce the number of masked loads in favour of more unpklo/hi
instructions. Both ISD::ZEXTLOAD and ISD::SEXTLOAD are supported to extensions
from legal types.
Both of normal and masked loads test cases added to guard compile crash.
Reviewed By: paulwalker-arm
Differential Revision: https://reviews.llvm.org/D120953
William S. Moses [Mon, 21 Mar 2022 00:32:36 +0000 (20:32 -0400)]
[MLIR][SCF] Fix nested if merging bug
The current nested if merging has a bug. Specifically, consider the following code:
```
%r = scf.if %arg3 -> (i32) {
scf.if %arg1 {
"test.op"() : () -> ()
}
scf.yield %arg0 : i32
} else {
scf.yield %arg2 : i32
}
```
When the above gets merged, it will become:
```
%r = scf.if %arg3 && %arg1-> (i32) {
"test.op"() : () -> ()
scf.yield %arg0 : i32
} else {
scf.yield %arg2 : i32
}
```
However, this means that when only %arg3 is true, we will incorrectly return %arg2 instead
of %arg0. This change updates the behavior of the pass to only enable nested if merging where
the outer yield contains only values from the inner if, or values defined outside of the if.
In the case of the latter, they can turned into a select of only the outer if condition, thus
maintaining correctness.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D122108
Arjun P [Thu, 17 Mar 2022 22:24:47 +0000 (22:24 +0000)]
[MLIR][Presburger] fix the names of some tests (NFC)
Arjun P [Thu, 17 Mar 2022 22:24:16 +0000 (22:24 +0000)]
[MLIR][Presburger] IntegerPolyhedronTest: remove unused include (NFC)
Arjun P [Mon, 21 Mar 2022 15:19:30 +0000 (15:19 +0000)]
[MLIR][Presburger] IntegerRelation.h: Fix header guard
Arjun P [Thu, 17 Mar 2022 22:20:42 +0000 (22:20 +0000)]
[MLIR][Presburger] add a non-const Matrix::getRow() returning a MutableArrayRef
Reviewed By: Groverkss
Differential Revision: https://reviews.llvm.org/D122136
Alex Zinenko [Mon, 21 Mar 2022 14:28:11 +0000 (15:28 +0100)]
[mlir][bazel] filegroups for Python CF, PDL, Tensor dialects
These dialects have Python bindings and are tested, but were not
previously exposed through Bazel filegroups.
Differential Revision: https://reviews.llvm.org/D122138
Aaron Puchert [Mon, 21 Mar 2022 14:28:27 +0000 (15:28 +0100)]
Add cmake/ to release tarballs via concatenation
The solution using append was reported not to work, but additionally it
would use the contents of the checked-out source tree instead of the git
tag or commit. This uses `git archive`, so it will use the right commit,
and at least for me (with GNU tar) it seems to work as intended.
Should fix #53281.
Reviewed By: kwk
Differential Revision: https://reviews.llvm.org/D121972
Kiran Chandramohan [Mon, 21 Mar 2022 14:09:47 +0000 (14:09 +0000)]
[Flang] Add OpenMP Conversion patterns
This patch adds the OpenMP conversion patterns to the FIR to LLVM
dialect lowering pass in Codegen. Appropriate legalization
conditions are also added. This ensures that a mix of FIR and OpenMP
dialects can be lowered to LLVM and OpenMP dialects. Also adds two
tests.
This is part of the upstreaming effort from the fir-dev branch in [1].
[1] https://github.com/flang-compiler/f18-llvm-project
Reviewed By: clementval, peixin
Differential Revision: https://reviews.llvm.org/D121793
Co-authored-by: Sourabh Singh Tomar <SourabhSingh.Tomar@amd.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Nikita Popov [Mon, 21 Mar 2022 11:30:30 +0000 (12:30 +0100)]
[CodeGen][OpenMP] Use correct type in EmitLoadOfPointer()
The EmitLoadOfPointer() call already specified the right pointer
type, but it did not match the Address we're loading from, so we
need to insert a bitcast first.
Simon Pilgrim [Mon, 21 Mar 2022 14:20:46 +0000 (14:20 +0000)]
[X86] Fold SUB(X,SBB(Y,Z,W)) -> SUB(ADC(X,Z,W),Y)
Prefer the commutable ADC over SBB to improve load folding opportunities
Arjun P [Mon, 21 Mar 2022 14:16:44 +0000 (14:16 +0000)]
Revert "Matrix::getRow non-const"
This reverts commit
68575ddea52d3104a7a6e2998fa05be278b99b34.
This commit was pushed accidentally.
Arjun P [Thu, 17 Mar 2022 22:20:42 +0000 (22:20 +0000)]
Matrix::getRow non-const
Nikita Popov [Mon, 21 Mar 2022 12:20:32 +0000 (13:20 +0100)]
Reapply [Utils] Fix %S substitution
%S refers to the directory of %s, not to the cwd. This is mostly
handled correctly, but update_cc_test_checks.py used the wrong
path for non-FileCheck RUN lines.
Reapplying this with a fix for an update_cc_test_checks test that
was based on cwd semantics.
Louis Dionne [Fri, 18 Mar 2022 14:03:01 +0000 (10:03 -0400)]
[libunwind] Add libunwind to the bootstrapping build CI
Differential Revision: https://reviews.llvm.org/D122006
Louis Dionne [Mon, 21 Mar 2022 14:06:40 +0000 (10:06 -0400)]
[libc++] Disable modules with the bootstrapping build
It turns out that we had never been enabling it anyways, since the
LIBCXX_TEST_PARAMS parameter was not being passed from the bootstrapping
build to the libc++ and libc++abi builds. Furthermore, it looks like the
per-target include directories used by the bootstrapping build by default
are incompatible with our current modulemap, since __config_site doesn't
live in the directory that our modulemap claims.
This disables modules in our bootstrapping CI job to unblock D121822,
but we should work on fixing the underlying issue once we're able to
pass those configuration options to our bootstrapping build.
Alex Bradbury [Mon, 21 Mar 2022 14:03:01 +0000 (14:03 +0000)]
[WebAssembly][NFC] Add test case for functype emission
This test aims to demonstrate the WebAssembly backend's behaviour around
emission of the .functype directive. It covers defined and declared
functions as well as libcalls.
It currently fails to emit functypes for all defined functions at the
head of the file, causing issues with the type checker
<https://github.com/llvm/llvm-project/issues/54022>. The patch in
<https://reviews.llvm.org/D122134> is a proposal to fix this issue.
Simon Pilgrim [Mon, 21 Mar 2022 13:55:26 +0000 (13:55 +0000)]
[X86] combineAddOrSubToADCOrSBB - commute + neg subtraction patterns
Handle SUB(AND(SRL(Y,Z),1),X) -> NEG(SBB(X,0,BT(Y,Z))) folds
I'll address the X86 lost folded-load regressions in a follow-up patch
James Y Knight [Mon, 21 Mar 2022 13:27:26 +0000 (13:27 +0000)]
[compiler-rt] Expand comment about Exynos 9810 workaround.
Simon Pilgrim [Mon, 21 Mar 2022 13:31:11 +0000 (13:31 +0000)]
[X86] combineAddOrSubToADCOrSBB - bail for illegal types
Ensure we don't attempt to fold to illegal types to ADC/SBB nodes.
After D122084 its possible for ADD(X,AND(SRL(Y,Z),1) patterns to be matched before type legalization.
Nikita Popov [Mon, 21 Mar 2022 13:24:27 +0000 (14:24 +0100)]
Revert "[Utils] Fix %S substitution"
This reverts commit
8ee1ef2a087da1a101a6b2c0bea31788da289e0b.
This breaks an update_cc_test_checks test that is based on an
incorrect %S use, revert until I can fix it.
Nikita Popov [Mon, 21 Mar 2022 13:17:38 +0000 (14:17 +0100)]
[OpenMP] Regenerate test checks (NFC)
Alexey Bataev [Mon, 21 Mar 2022 12:47:29 +0000 (05:47 -0700)]
[SLP]Make stricter check for instructions that do not require
scheduling.
Need to check that the instructions with external operands can be
reordered safely before actualy exclude them from the scheduling.
Sam McCall [Mon, 21 Mar 2022 13:04:20 +0000 (14:04 +0100)]
[pseudo] fix typo'd test assertions
Simon Pilgrim [Mon, 21 Mar 2022 13:02:30 +0000 (13:02 +0000)]
[SDAG] enable binop identity constant folds for shifts
Add shl/srl/sra to the list of ops that we canonicalize with a select to expose an identity merge
Differential Revision: https://reviews.llvm.org/D122070
Sven van Haastregt [Mon, 21 Mar 2022 12:45:58 +0000 (12:45 +0000)]
[OpenCL] Guard write_only image3d_t with TypeExtension
Ensure that the TypeExtension of an `ImageType` is also taken into
account when generating `OpenCLBuiltins.inc`.
This aligns the handling of the `write_only image3d_t` type for
`-fdeclare-opencl-builtins` with opencl-c.h with respect to the
`cl_khr_3d_image_writes` extension.
Since the `write_only image3d_t` type is not available when the
extension is disabled, this commit does not add a test to
`SemaOpenCL/fdeclare-opencl-builtins.cl`.
Dmitry Preobrazhensky [Mon, 21 Mar 2022 12:23:44 +0000 (15:23 +0300)]
[AMDGPU][MC][NFC] Refactored sendmsg(...) handling
Differential Revision: https://reviews.llvm.org/D121995
Sophia [Fri, 18 Mar 2022 02:14:50 +0000 (10:14 +0800)]
[LV] Fix typo in comment
Reviewed by: fhahn (Florian Hahn)
Differential Revision: https://reviews.llvm.org/D121781
Markus Böck [Mon, 21 Mar 2022 12:26:00 +0000 (13:26 +0100)]
[mlir] Fix block merging with the result of a terminator
When the current implementation merges two blocks that have operands defined outside of their block respectively, it will merge these by adding a block argument in the resulting merged block and adding successor arguments to the predecessors.
There is a special case where this is incorrect however: If one of predecessors terminator produce the operand, inserting the block argument and updating the predecessor would lead to the terminator using its own result as successor argument.
IR Example:
```
%0 = "test.producing_br"()[^bb1, ^bb2] {
operand_segment_sizes = dense<0> : vector<2 x i32>
} : () -> i32
^bb1:
"test.br"(%0)[^bb4] : (i32) -> ()
```
where `^bb1` is then merged with another block would lead to:
```
%0 = "test.producing_br"(%0)[^bb1, ^bb2]
```
This patch fixes that issue during clustering by making sure that if the operand is from an outside block, that it is not produced by the terminator of a predecessor.
Differential Revision: https://reviews.llvm.org/D121988
Nikita Popov [Mon, 21 Mar 2022 12:20:32 +0000 (13:20 +0100)]
[Utils] Fix %S substitution
%S refers to the directory of %s, not to the cwd. This is mostly
handled correctly, but update_cc_test_checks.py used for the wrong
path for non-FileCheck RUN lines.
Alexander Belyaev [Mon, 21 Mar 2022 10:01:50 +0000 (11:01 +0100)]
[mlir] Add a function to print C-strings to RunnerUtils.cpp.
Differential Revision: https://reviews.llvm.org/D122066
Simon Pilgrim [Mon, 21 Mar 2022 11:44:12 +0000 (11:44 +0000)]
[X86] Add nounwind to adc/sbb tests to prevent cfi noise
Jay Foad [Mon, 21 Mar 2022 11:41:22 +0000 (11:41 +0000)]
[AMDGPU] Add an agpr copy propagation test
Jay Foad [Mon, 21 Mar 2022 11:40:42 +0000 (11:40 +0000)]
[AMDGPU] Update checks in agpr-copy-propagation.mir
Jez Ng [Wed, 16 Mar 2022 21:53:02 +0000 (17:53 -0400)]
[lld-macho][nfc] Add comment explaining why a cast<> is safe
Jez Ng [Wed, 16 Mar 2022 22:05:32 +0000 (18:05 -0400)]
[lld-macho][nfc] Have findContainingSubsection take a Section
... instead of an instance of `Subsections`.
This simplifies the code slightly since all its callsites have a Section
instance anyway.
Kristina Bessonova [Mon, 21 Mar 2022 11:21:24 +0000 (13:21 +0200)]
[clang] Fix wrong -Wunused-local-typedef warning within a template function
Partially fixes PR24883.
The patch sets Reference bit while instantiating a typedef if it
previously was found referenced.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D114382
Evgeny Shulgin [Sat, 19 Mar 2022 18:23:47 +0000 (21:23 +0300)]
[clang-tidy] Skip parentheses in `readability-make-member-function-const`
The checker should ignore parentheses when looking whether the
function should be marked as `const`.
Fixes https://github.com/llvm/llvm-project/issues/52838
Reviewed By: mgehre-amd, njames93
Differential Revision: https://reviews.llvm.org/D122075
Jay Foad [Mon, 21 Mar 2022 11:14:17 +0000 (11:14 +0000)]
[AMDGPU] SIInstrInfo::verifyInstruction tweaks. NFCI.
Simplify some for loops. Don't bother checking src2 operand for
writelane because it doesn't have one. Check all VALU instructions,
not just VOP1/2/3/C/SDWA.
Shraiysh Vaishay [Mon, 21 Mar 2022 10:50:54 +0000 (16:20 +0530)]
[mlir][OpenMP] Added translation from `omp.atomic.capture` to LLVM IR
This patch adds translation from `omp.atomic.capture` to LLVM IR. Also
added tests for the same.
Depends on D121546
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D121554
Nikita Popov [Mon, 21 Mar 2022 10:54:39 +0000 (11:54 +0100)]
[CodeGen][OpenMP] Use correct type in EmitLoadOfPointer()
Rather than using a dummy void pointer type, we should specify the
correct private type and perform the bitcast beforehand rather than
afterwards. This way, the Address will have correct alignment
information.
Simon Pilgrim [Mon, 21 Mar 2022 10:56:27 +0000 (10:56 +0000)]
[X86] combineAddOrSubToADCOrSBB - Fold ADD/SUB + (AND(SRL(X,Y),1) -> ADC/SBB+BT(X,Y)
As suggested on PR35908, if we are adding/subtracting an extracted bit, attempt to use BT instead to fold the op and use a ADC/SBB op.
Differential Revision: https://reviews.llvm.org/D122084
Shraiysh Vaishay [Mon, 21 Mar 2022 10:08:45 +0000 (15:38 +0530)]
[OpenMP][IRBuilder] Fix emitAtomicUpdate conditions
This patch fixes the condition for emitting atomic update using
`atomicrmw` instruction or compare-exchange loop.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D121546
Simon Pilgrim [Mon, 21 Mar 2022 10:44:05 +0000 (10:44 +0000)]
[X86] Add (x - y - ((z & m) >> s)) sub -> sbb test case for D122084
serge-sans-paille [Fri, 18 Mar 2022 13:37:43 +0000 (14:37 +0100)]
[instcombine] Support and test __builtin_object_size interaction with __strdup and __strndup
Differential Revision: https://reviews.llvm.org/D122005
serge-sans-paille [Thu, 17 Mar 2022 10:18:54 +0000 (11:18 +0100)]
[LowerConstantIntrinsics] Support phi operand in __builtin_object_size folder
The implementation is just a generalization of the Select handler.
We're no trying to be smart and compute any kind of fixed point.
Differential Revision: https://reviews.llvm.org/D121897
Florian Hahn [Mon, 21 Mar 2022 10:07:25 +0000 (10:07 +0000)]
[LV] Remove unneeded Loop argument from completeLoopSkeleton. (NFCI)
completeLoopSkeleton only uses its loop argument only to get the
pre-header, but the pre-header is already known (we created/cached it
earlier). Remove the unneeded loop argument.
Marek Kurdej [Mon, 21 Mar 2022 09:24:56 +0000 (10:24 +0100)]
[clang-format] [doc] Improve BraceWrapping documentation.
Martin Storsjö [Mon, 7 Mar 2022 21:35:45 +0000 (23:35 +0200)]
[libcxx] [ci] Check that Windows static libraries don't contain dllexports
Differential Revision: https://reviews.llvm.org/D121164
Nikita Popov [Mon, 21 Mar 2022 09:11:03 +0000 (10:11 +0100)]
[Docs] Update opaque pointers docs (NFC)
Mention automatic enablement of opaque pointers mode that was
recently implemented. Update wording in the transition state,
because it seems like my overly cautious wording has given some
people an incorrect impression of the state of opaque pointer
support in clang.
Nikita Popov [Mon, 21 Mar 2022 09:06:04 +0000 (10:06 +0100)]
[Docs] Fix reference (NFC)
Marek Kurdej [Fri, 18 Mar 2022 13:28:31 +0000 (14:28 +0100)]
[clang-format] Use range-for loop with drop_end. NFC.
Thomas Symalla [Mon, 21 Mar 2022 08:49:30 +0000 (09:49 +0100)]
Revert "[AMDGPU] Improve v_cmpx usage on GFX10.3."
This reverts commit
011c64191ef9ccc6538d52f4b57f98f37d4ea36e and
e725e2afe02e18398525652c9bceda1eb055ea64.
Differential Revision: https://reviews.llvm.org/D122117
Marek Kurdej [Fri, 18 Mar 2022 13:18:37 +0000 (14:18 +0100)]
[ADT] Add drop_end.
This patch adds drop_end that is analogical to drop_begin.
It tries to fill the functional gap where one could drop first elements but not the last ones.
The need for it came in when refactoring clang-format.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D122009
Thomas Symalla [Mon, 21 Mar 2022 08:37:22 +0000 (09:37 +0100)]
[AMDGPU] [NFC] Fix missing include.
Thomas Symalla [Tue, 1 Feb 2022 09:28:18 +0000 (10:28 +0100)]
[AMDGPU] Improve v_cmpx usage on GFX10.3.
On GFX10.3 targets, the following instruction sequence
v_cmp_* SGPR, ...
s_and_saveexec ..., SGPR
leads to a fairly long stall caused by a VALU write to a SGPR and having the
following SALU wait for the SGPR.
An equivalent sequence is to save the exec mask manually instead of letting
s_and_saveexec do the work and use a v_cmpx instruction instead to do the
comparison.
This patch modifies the SIOptimizeExecMasking pass as this is the last position
where s_and_saveexec instructions are inserted. It does the transformation by
trying to find the pattern, extracting the operands and generating the new
instruction sequence.
It also changes some existing lit tests and introduces a few new tests to show
the changed behavior on GFX10.3 targets.
Reviewed By: sebastian-ne, critson
Differential Revision: https://reviews.llvm.org/D119696
Alisamar Husain [Mon, 21 Mar 2022 07:38:40 +0000 (13:08 +0530)]
[tests][intelpt] Fix outdated trace load test
Differential Revision: https://reviews.llvm.org/D122114
LLVM GN Syncbot [Mon, 21 Mar 2022 07:47:10 +0000 (07:47 +0000)]
[gn build] Port
9ada761be3b9
Adrian Kuegel [Mon, 21 Mar 2022 07:41:17 +0000 (08:41 +0100)]
[clang][Bazel] Add missing dependency from symbol_graph to llvm:support.
This did not show up as build error because the build also works if the
dependency is transitively available. But there should be a direct
dependency anyway.
Chen Zheng [Mon, 21 Mar 2022 07:38:46 +0000 (03:38 -0400)]
[PowerPC][NFC] rename file for PPCCTRLoopsVerify pass.
Rename file for PPCCTRLoopsVerify pass from PPCCTRLoops.cpp
to PPCCTRLoopsVerify.cpp.
There will be a new file PPCCTRLoops.cpp for PPC CTR loops
generation later.
Pavel Labath [Mon, 21 Mar 2022 07:26:34 +0000 (08:26 +0100)]
Revert "[lldb/test] Add events listener helper class to lldbtest"
It removes the "wait-until-event-thread-stops" logic, which makes
TestDiagnosticReporting.py flaky.
This reverts commits
09ff41a087760ea7e80b8e5390a05101c5a5b929 and
acdd41b4590935e39208a941fbac7889d778e8e5.
Siva Chandra Reddy [Thu, 17 Mar 2022 08:38:37 +0000 (08:38 +0000)]
[libc] Add a linux file implementation.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D121976
Alisamar Husain [Sun, 20 Mar 2022 07:31:31 +0000 (13:01 +0530)]
[trace][intelpt] Added total memory usage by decoded trace
This fails currently but the basics are there
Differential Revision: https://reviews.llvm.org/D122093
Kazu Hirata [Mon, 21 Mar 2022 06:11:06 +0000 (23:11 -0700)]
[CodeGen] Apply clang-tidy fixes for readability-redundant-smartptr-get (NFC)
Craig Topper [Mon, 21 Mar 2022 05:02:40 +0000 (22:02 -0700)]
[X86] Simplify the interface to getCondNoFromDesc.
Instead of taking a SkipDefs parameter, rename to getCondSrcNoFromDesc
and have it return the source operand number. Make getCondFromMI
responsible for adding the number of Defs for MI instructions.
While there remove some unneeded casts to unsigned and check for
negative numbers instead of explicitly -1. Less than 0 is easier
for a compiler to codegen.
Differential Revision: https://reviews.llvm.org/D122113
Carlos Alberto Enciso [Sun, 20 Mar 2022 07:40:32 +0000 (07:40 +0000)]
[llmv-pdbutil] Replace ExitOnError with explicit error handling.
At Sony we are developing llvm-dva
https://lists.llvm.org/pipermail/llvm-dev/2020-August/144174.html
For its PDB support, it requires functionality already present
in llvm-pdbutil.
We intend to move that functionaly into the PDB library to be
shared by both tools. That change will be done in 2 steps, that
will be submitted as 2 patches:
(1) Replace 'ExitOnError' with explicit error handling.
(2) Move the intended shared code to the PDB library.
This patch is for step (1).
As 'ExitOnError' is intended to be used only in tool code, replace
all occurrences in the code that will be moved to the PDB library
with explicit error handling.
Reviewed By: aganea, dblaikie, rnk
Differential Revision: https://reviews.llvm.org/D121801
Andrew Litteken [Mon, 14 Mar 2022 04:34:30 +0000 (23:34 -0500)]
[IROutliner] Do not outlined from functions with optnone
Since the IROutliner is performing an optimization, it should not outline from functions explicitly marked with optnone. This adds an extra check and test to make sure this does not occur.
Reviewers: paquette
Differential Revision: https://reviews.llvm.org/D121567
Shengchen Kan [Mon, 21 Mar 2022 04:05:05 +0000 (12:05 +0800)]
[X86][NFC] Run clang-format on
cb26730aaa8b, fix typo and remove redundant else
Shengchen Kan [Mon, 21 Mar 2022 03:28:24 +0000 (11:28 +0800)]
[X86][NFC] Unify implementations of getting condition code
jacquesguan [Fri, 18 Mar 2022 07:57:47 +0000 (15:57 +0800)]
[mlir][Arith] Add constant folder for right shift
Differential Revision: https://reviews.llvm.org/D121985
Kazu Hirata [Mon, 21 Mar 2022 01:21:40 +0000 (18:21 -0700)]
[Analysis] Apply clang-tidy fixes for readability-redundant-smartptr-get (NFC)
Florian Hahn [Sun, 20 Mar 2022 21:01:15 +0000 (21:01 +0000)]
[LV] Remove dead Loop argument from emitMemRuntimeChecks. (NFC)
Philip Reames [Sun, 20 Mar 2022 20:50:36 +0000 (13:50 -0700)]
[SLP] Explicit track required stacksave/alloca dependency
The semantics of an inalloca alloca instruction requires that it not be reordered with a preceeding stacksave intrinsic call. Unfortunately, there's no def/use edge or memory dependence edge. (THe memory point is slightly subtle, but in general a new allocation can't alias with a call which executes strictly before it comes into existance.)
I'd tried to tackle this same case previously in
689babdf6, but the fix chosen there turned out to be incomplete. As such, this change contains a fully revert of the first fix attempt.
This was noticed when investigating problems which surfaced with D118538, but this is definitely an existing bug. This time around, I managed to reduce a couple of additional cases, including one which was being actively miscompiled even without the new scheduling change. (See test diffs)
Compile time wise, we only spend extra time when seeing a stacksave (rare), and even then we walk the block at most once per schedule window extension. Likely a non-issue.
Aaron Puchert [Sun, 20 Mar 2022 19:59:06 +0000 (20:59 +0100)]
[PPCISelLowering] Avoid emitting calls to __multi3, __muloti4
After D108936, @llvm.smul.with.overflow.i64 was lowered to __multi3
instead of __mulodi4, which also doesn't exist on PowerPC 32-bit, not
even with compiler-rt. Block it as well so that we get inline code.
Because libgcc doesn't have __muloti4, we block that as well.
Fixes #54460.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D122090
Kazu Hirata [Sun, 20 Mar 2022 17:41:22 +0000 (10:41 -0700)]
[Transform] Apply clang-tidy fixes for readability-redundant-smartptr-get (NFC)
Mark de Wever [Sun, 20 Mar 2022 13:15:00 +0000 (14:15 +0100)]
[libc++][test][NFC] Remove libcpp-no-concepts.
This is no longer needed.
Reviewed By: #libc, philnik
Differential Revision: https://reviews.llvm.org/D122099
Chen Zheng [Sun, 20 Mar 2022 13:58:41 +0000 (09:58 -0400)]
[PowerPC][NFC] use right hardware loop intrinsics in test case
esmeyi [Sun, 20 Mar 2022 13:31:29 +0000 (09:31 -0400)]
[XCOFF] support XCOFFObjectWriter for fileHeader and sectionHeaders in 64-bit XCOFF.
This is the first patch to enable the XCOFF64 object writer.
Currently only fileHeader and sectionHeaders are supported.
Reviewed By: jhenderson, DiggerLin
Differential Revision: https://reviews.llvm.org/D120861
Michel Weber [Sun, 20 Mar 2022 12:59:05 +0000 (12:59 +0000)]
[MLIR][Presburger] remove redundant constraints in coalesce
This patch improves the representation size of individual
`IntegerRelation`s by calling the function
`IntegerRelation::removeRedundantConstraints`. While this is only a
slight optimization in the current version, it will be necessary for
patches to come.
Reviewed By: arjunp
Differential Revision: https://reviews.llvm.org/D121989
Luo, Yuanke [Mon, 14 Mar 2022 00:27:30 +0000 (08:27 +0800)]
enable binop identity constant folds for add
Differential Revision: https://reviews.llvm.org/D119654
Shengchen Kan [Sun, 20 Mar 2022 10:38:09 +0000 (18:38 +0800)]
[X86] Simplify function isDataInvariant by using X86MnemonicTables
This is not a NFC change b/c we add more instructions like
IMUL16/32/64r, MOV16ao16 and MOV16rr_REV etc to the list.
But I think it's reasonable.
Reviewed By: Amir
Differential Revision: https://reviews.llvm.org/D122063
Florian Hahn [Sun, 20 Mar 2022 10:11:40 +0000 (10:11 +0000)]
[VPlan] Add test for VPExpandSCEVRecipe printing.
Simon Pilgrim [Sun, 20 Mar 2022 09:31:52 +0000 (09:31 +0000)]
[X86] Add test add with bit0 extraction and improve comments
Based on feedback from D122084
Simon Pilgrim [Sat, 19 Mar 2022 21:09:43 +0000 (21:09 +0000)]
[X86] combineAddOrSubToADCOrSBB - split to more cleanly handle commuted variants.
Split combineAddOrSubToADCOrSBB into wrapper (which handles ADDs with commuted args) and the real combine, which no longer has to account for commutation.
I'm intending to extend combineAddOrSubToADCOrSBB to detect patterns other than just X86ISD::SETCC, so we need to detect all patterns without detecting them as part of a commutation swap.
Shengchen Kan [Sun, 20 Mar 2022 07:22:02 +0000 (15:22 +0800)]
[X86][NFC] Generate fields and getters for subtarget features
Non-duplicated comments are moved from X86Subtarget.h to X86.td.
This is a follow-up patch for D120906.
Alisamar Husain [Sat, 19 Mar 2022 19:58:04 +0000 (01:28 +0530)]
[trace][intelpt] Instruction count in trace info
Added a line to `thread trace dump info` results which shows total number of instructions executed until now.
Differential Revision: https://reviews.llvm.org/D122076
Shengchen Kan [Sun, 20 Mar 2022 05:21:25 +0000 (13:21 +0800)]
[X86][NFC] Remove unused variable UseAA
Shengchen Kan [Sun, 20 Mar 2022 05:14:13 +0000 (13:14 +0800)]
[X86][NFC] Remove unused feature UseAA
Shengchen Kan [Sun, 20 Mar 2022 04:00:25 +0000 (12:00 +0800)]
[X86][NFC] Rename hasCMOV() to canUseCMOV(), hasLAHFSAHF() to canUseLAHFSAHF()
To make them less like other feature functions.
This is a follow-up patch for D121978.
Craig Topper [Sat, 19 Mar 2022 01:33:30 +0000 (18:33 -0700)]
[SelectionDAG][RISCV] Make RegsForValue::getCopyToRegs explicitly zero_extend constants.
ComputePHILiveOutRegInfo assumes that constant incoming values to
Phis will be zero extended if they aren't a legal type. To guarantee
that we should zero_extend rather than any_extend constants.
This fixes a bug for RISCV where any_extend of constants can be
treated as a sign_extend.
Differential Revision: https://reviews.llvm.org/D122053