Sven van Haastregt [Thu, 27 Jan 2022 10:33:12 +0000 (10:33 +0000)]
[OpenCL] opencl-c.h: add missing read_write image guards
The get_image_num_mip_levels overloads that take a read_write image
parameter were missing the __opencl_c_read_write_images guard.
Matthias Springer [Thu, 27 Jan 2022 10:18:59 +0000 (19:18 +0900)]
[mlir][tensor] Replace tensor-bufferize with BufferizableOpInterface impl
This commit switches the `tensor-bufferize` pass over to BufferizableOpInterface-based bufferization.
Differential Revision: https://reviews.llvm.org/D118246
Sander de Smalen [Thu, 27 Jan 2022 09:17:29 +0000 (09:17 +0000)]
[AArch64][SVE] Implement PFALSE with explicit AArch64ISD node.
The ISel patterns for PFALSE helps recognise the instructions as being
free of side-effects, which helps MachineCSE remove redundant
PFALSE instructions.
Reviewed By: dmgreen
Differential Revision: https://reviews.llvm.org/D118054
Petr Hosek [Thu, 27 Jan 2022 10:27:18 +0000 (02:27 -0800)]
[CMake][Fuchsia] Only build iossim runtimes for arm64
x86_64 isn't supported with the recent Xcode SDK.
Jay Foad [Wed, 26 Jan 2022 16:50:08 +0000 (16:50 +0000)]
[AMDGPU] SILoadStoreOptimizer: Remove redundant check for volatile
SILoadStoreOptimizer::collectMergeableInsts already ends the current
block if it sees a volatile (or ordered) memory access, so there is no
need to check for them again when scanning the instructions between two
pairing candidates in a block.
Differential Revision: https://reviews.llvm.org/D118266
Matthias Springer [Thu, 27 Jan 2022 10:04:44 +0000 (19:04 +0900)]
[mlir][bufferize] Insert memref.cast ops during finalizing pass
The pass can currently not handle to_memref(to_tensor(x)) folding where a cast is necessary. This is required with the new unified bufferization. There is already a canonicalization pattern that handles such foldings and it should be used during this pass.
Differential Revision: https://reviews.llvm.org/D117988
Dawid Jurczak [Tue, 25 Jan 2022 15:53:05 +0000 (16:53 +0100)]
[NFC][CodeGen] Use llvm::DenseMap for DeferredDecls
CodeGenModule::DeferredDecls std::map::operator[] seem to be hot especially while code generating huge compilation units.
In such cases using DenseMap instead gives observable compile time improvement. Patch was tested on Linux build with default config acting as benchmark.
Build was performed on isolated CPU cores in silent x86-64 Linux environment following: https://llvm.org/docs/Benchmarking.html#linux rules.
Compile time statistics diff produced by perf and time before and after change are following:
instructions -0.15%, cycles -0.7%, max-rss +0.65%.
Using StringMap instead DenseMap doesn't bring any visible gains.
Differential Revision: https://reviews.llvm.org/D118169
Florian Hahn [Thu, 27 Jan 2022 09:55:38 +0000 (09:55 +0000)]
[LoopVersioning] Use IRBuilder for OR simplification.
Sergej Jaskiewicz [Thu, 20 Jan 2022 13:36:41 +0000 (16:36 +0300)]
[LLDB] Add formatters for PointerIntPair, PointerUnion
Also, add summaries for `SmallVector` and `ArrayRef`,
and fix the `StringRef` summary provider so it doesn't
ignore the `Length` field.
Differential Revision: https://reviews.llvm.org/D117779
Nikita Popov [Thu, 27 Jan 2022 09:51:45 +0000 (10:51 +0100)]
[InstCombine] Skip GEP of bitcast transform with opaque pointers
This transform is fundamentally incompatible with opaque pointers.
Usually we would not hit it anyway because the bitcast is folded
away earlier, but due to worklist order it might survive until
here, so make sure we bail out explicitly.
Nikita Popov [Thu, 27 Jan 2022 09:47:29 +0000 (10:47 +0100)]
[InstCombine] Extract GEP of bitcast folds into separate function (NFC)
Fraser Cormack [Thu, 27 Jan 2022 09:26:20 +0000 (09:26 +0000)]
[RISCV] Fix test case expected output
I didn't correctly update this before landing D118058.
Nikita Popov [Thu, 27 Jan 2022 09:30:21 +0000 (10:30 +0100)]
[BTFDebug] Avoid pointer element type access
Use the global value type instead.
Nikita Popov [Thu, 27 Jan 2022 09:24:15 +0000 (10:24 +0100)]
[InstCombine] Skip PromoteCastOfAllocation() transform under opaque pointers
I think this can't be hit anyway (because a ptr-to-ptr bitcast would
get folded earlier), but in the interest of being explicit skip
this transform for opaque pointers entirely.
Pavel Labath [Thu, 27 Jan 2022 09:16:56 +0000 (10:16 +0100)]
[lldb/test] Fix gnu-style-compression.yaml
In the rush to get the bot green, I did not realize I was building the
file with -gsplit-dwarf, and therefore the yaml ended up referring to a
file I did not check it.
This rebuilds the file without split dwarf.
Nikita Popov [Thu, 27 Jan 2022 09:14:44 +0000 (10:14 +0100)]
[InstCombine] Remove some pointer element type accesses
One of these is guarded against opaque pointers, and the others
were accessing the call function type in a rather convoluted way.
Fraser Cormack [Mon, 24 Jan 2022 18:11:14 +0000 (18:11 +0000)]
[SelectionDAG][VP] Provide expansion for VP_MERGE
This patch adds support for expanding VP_MERGE through a sequence of
vector operations producing a full-length mask setting up the elements
past EVL/pivot to be false, combining this with the original mask, and
culminating in a full-length vector select.
This expansion should work for any data type, though the only use for
RVV is for boolean vectors, which themselves rely on an expansion for
the VSELECT.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D118058
Pavel Labath [Thu, 27 Jan 2022 07:47:52 +0000 (08:47 +0100)]
[lldb] Convert ProcessWindowsLog to the new API
Pavel Labath [Wed, 26 Jan 2022 15:29:51 +0000 (16:29 +0100)]
[lldb/DWARF] Make manual dwarf index deterministic
Currently, running the test suite with LLVM_ENABLE_EXPENSIVE_CHECKS=On
causes a couple of tests to fail. This happens because they expect a
certain order of variables (all of them happen to use the "target
variable" command, but other lookup functions should suffer from the
same issues), all of which have the same name. Sort algorithms often
preserve the order of equivalent elements (in this case the entries in
the NameToDIE map), but that not guaranteed, and
LLVM_ENABLE_EXPENSIVE_CHECKS stresses that by pre-shuffling all inputs
before sorting.
While this could easily be fixed by relaxing the test expectations,
having a deterministic output seems like a worthwhile goal,
particularly, as this could have bigger consequences than just a
different print order -- in some cases we just pick the first entry that
we find, whatever that is. Therefore this patch makes the sort
deterministic by introducing another sort key -- UniqueCString::Sort
gets a value comparator functor, which can be used to sort elements with
the same name -- in the DWARF case we use DIERef::operator<, which
roughly equals the order in which the entries appear in the debug info,
and matches the current "accidental" order.
Using a extra functor seemed preferable to using stable_sort, as the
latter allocates extra O(n) of temporary memory.
I observed no difference in debug info parsing speed with this patch
applied.
Differential Revision: https://reviews.llvm.org/D118251
Pavel Labath [Thu, 27 Jan 2022 09:01:59 +0000 (10:01 +0100)]
[lldb/test] Replace gnu-style-compression.cpp with a yaml file
In D117744, llvm removed writing support for this format, breaking the
test. We may eventually want to remove reading support as well, but for
now I have converted the test to a yaml file to maintain coverage.
Saiyedul Islam [Thu, 27 Jan 2022 08:55:08 +0000 (08:55 +0000)]
[clang-format] Format ParseOpenMP.cpp changes
Properly format D116549.
Adrian Kuegel [Thu, 27 Jan 2022 08:44:06 +0000 (09:44 +0100)]
[mlir][Bazel] Add TestMemRef target.
Needed after D118285
Differential Revision: https://reviews.llvm.org/D118330
Fangrui Song [Thu, 27 Jan 2022 08:37:49 +0000 (00:37 -0800)]
[MC] Add MCAsmParser::parseRParen to improve consistency and simplify code
Some diagnostics are more verbose but they don't seem to be more useful than
simple `expected ')'`
Adrian Kuegel [Thu, 27 Jan 2022 08:31:55 +0000 (09:31 +0100)]
[mlir][Bazel] Add missing dependency to ArithmeticTransforms.
Mike Hommey [Thu, 27 Jan 2022 08:26:16 +0000 (09:26 +0100)]
Add missing namespace to PPCLinux.cpp
This fixes a build failure with MSVC introduced in
https://reviews.llvm.org/D112906
Reviewed By: nemanjai
Differential Revision: https://reviews.llvm.org/D118211
Fangrui Song [Thu, 27 Jan 2022 08:10:57 +0000 (00:10 -0800)]
[MC] Remove unreachable .comm/.lcomm diagnostic
and make another diagnostic math the prevailing format.
Wu Xinlong [Thu, 27 Jan 2022 07:48:25 +0000 (15:48 +0800)]
[RISCV] fix dead code
fix dead code mentioned on https://reviews.llvm.org/D98136
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D118323
Marius Brehler [Tue, 25 Jan 2022 16:13:30 +0000 (16:13 +0000)]
[mlir] Don't emit unused labels
Stop the Cpp target from emitting unused labels. The previosly generated
code generated warning if `-Wunused-label` is passed to a compiler.
Co-authored-by: Simon Camphausen <simon.camphausen@iml.fraunhofer.de>
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D118154
Zi Xuan Wu [Thu, 27 Jan 2022 06:49:43 +0000 (14:49 +0800)]
[CSKY] Add floating operation support including float and double
CSKY arch has multiple FPU instruction versions such as FPU, FPUv2 and FPUv3 to implement floating operations.
For now, we just only support FPUv2 and FPUv3.
It includes the encoding, asm parsing of instructions and codegen of DAG nodes.
Wu Xinlong [Thu, 27 Jan 2022 03:59:13 +0000 (11:59 +0800)]
[RISCV][CodeGen] Implement IR Intrinsic support for K extension
This revision implements IR Intrinsic support for RISCV Scalar Crypto extension according to the specification of version [[ https://github.com/riscv/riscv-crypto/releases/tag/v1.0.0-scalar | 1.0]]
Co-author:@ksyx & @VincentWu & @lihongliang & @achieveartificialintelligence
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D102310
Fangrui Song [Thu, 27 Jan 2022 07:45:03 +0000 (23:45 -0800)]
[ELF] Parallelize computeIsPreemptible
Uday Bondhugula [Thu, 27 Jan 2022 02:36:26 +0000 (08:06 +0530)]
[MLIR] NFC. Rename pass cmd-line to prefix affine
Prefix "affine-" to affine transform passes that were missing it -- to
avoid ambiguity and for uniformity. There were only two needed this.
Move mispaced affine coalescing test case file.
NFC.
Differential Revision: https://reviews.llvm.org/D118314
Uday Bondhugula [Thu, 27 Jan 2022 07:30:19 +0000 (13:00 +0530)]
[MLIR] Fix integration tests broken by D118285
[MLIR] Fix integration tests broken by D118285.
Tanya Lattner [Thu, 27 Jan 2022 07:22:04 +0000 (23:22 -0800)]
Add email addresses to create a topic via email in a specific category.
River Riddle [Wed, 26 Jan 2022 22:42:38 +0000 (14:42 -0800)]
[mlir] Finish replacing OwningRewritePatternList with RewritePatternSet
OwningRewritePatternList has been deprecated for ~10 months now, we can remove
the leftover using directives at this point.
Differential Revision: https://reviews.llvm.org/D118287
River Riddle [Wed, 26 Jan 2022 22:18:21 +0000 (14:18 -0800)]
[mlir] Move ComposeSubView+ExpandOps from Standard to MemRef
These transformations already operate on memref operations (as part of
splitting up the standard dialect). Now that the operations have moved,
it's time for these transformations to move as well.
Differential Revision: https://reviews.llvm.org/D118285
Fangrui Song [Thu, 27 Jan 2022 07:10:40 +0000 (23:10 -0800)]
[ELF] Optimize two vector. NFC
Fangrui Song [Thu, 27 Jan 2022 06:51:31 +0000 (22:51 -0800)]
[ELF] Optimize -Map. NFC
getVA is slow. Avoid calling it in the llvm::sort comparator.
Fangrui Song [Thu, 27 Jan 2022 06:03:26 +0000 (22:03 -0800)]
[ELF] Simplify InputSection::writeTo. NFC
Jim Lin [Thu, 27 Jan 2022 01:52:45 +0000 (09:52 +0800)]
[NFC] Remove duplicate include
River Riddle [Wed, 26 Jan 2022 23:49:53 +0000 (15:49 -0800)]
[mlir][NFC] Add a using for llvm::SMLoc/llvm::SMRange to LLVM.h
These are used pervasively during parsing.
Differential Revision: https://reviews.llvm.org/D118291
River Riddle [Wed, 26 Jan 2022 23:30:56 +0000 (15:30 -0800)]
[mlir][NFC] Add a using for llvm::BitVector to LLVM.h
BitVector is becoming widespread enough that we should add a proper using.
Differential Revision: https://reviews.llvm.org/D118290
River Riddle [Mon, 24 Jan 2022 23:18:04 +0000 (15:18 -0800)]
[mlir:Function][NFC] Use BitVector instead of ArrayRef for indices when removing arguments/results
We already convert to BitVector internally, and other APIs (namely Operation::eraseOperands)
already use BitVector as well. Switching over provides a common format between
API and also reduces the amount of format conversions necessary.
Fixes #53325
Differential Revision: https://reviews.llvm.org/D118083
River Riddle [Mon, 24 Jan 2022 22:30:03 +0000 (14:30 -0800)]
[mlir:PassOptions] Fix parsing of nested option values/better handle escaping
The option parser currently does not properly handle nested options, meaning that
in some cases we can print pass pipelines that we can't actually parse back in. For example,
from #52885 we currently can't parse in inliner pipelines that have nested pipeline strings.
This commit adds handling for string values (e.g. "...") and nested options
(e.g. `foo{baz{bar=10 pizza=11}}`).
Fixes #52885
Differential Revision: https://reviews.llvm.org/D118078
Congzhe Cao [Thu, 27 Jan 2022 05:24:12 +0000 (00:24 -0500)]
[IVDescriptor] Get the exact FP instruction that does not allow reordering
This is a bugfix in IVDescriptor.cpp.
The helper function `RecurrenceDescriptor::getExactFPMathInst()`
is supposed to return the 1st FP instruction that does not allow
reordering. However, when constructing the RecurrenceDescriptor,
we trace the use-def chain staring from a PHI node and for each
instruction in the use-def chain, its descriptor overrides the
previous one. Therefore in the final RecurrenceDescriptor we
constructed, we lose previous FP instructions that does not allow
reordering.
Reviewed By: kmclaughlin
Differential Revision: https://reviews.llvm.org/D118073
Max Kazantsev [Thu, 27 Jan 2022 05:26:19 +0000 (12:26 +0700)]
[Test] Add test for or-reduce idiom symmetrical to and-reduce
Max Kazantsev [Thu, 27 Jan 2022 05:13:07 +0000 (12:13 +0700)]
[Test] Add one more add-reduce test w/ pointer bitcasts
Evgeny Shulgin [Thu, 27 Jan 2022 00:55:14 +0000 (17:55 -0700)]
[clang-tidy] Fix nested namespaces in `readability-static-definition-in-anonymous-namespace` check
The check previously inspected only the immediate parent namespace.
`static` in a named namespace within an unnamed namespace is still
redundant.
We will use `Decl::isInAnonymousNamespace()` method that traverses the
namespaces hierarchy recursively.
Differential Revision: https://reviews.llvm.org/D118010
Ahmed Bougacha [Thu, 27 Jan 2022 01:31:26 +0000 (17:31 -0800)]
[ObjC] Emit selector load right before msgSend call.
We currently emit the selector load early, but only because we need
it to compute the signature (so that we know which msgSend variant to
call). We can prepare the signature with a plain undef, and replace
it with the materialized selector value if (and only if) needed, later.
Concretely, this usually doesn't have an effect, but tests need updating
because we reordered the receiver bitcast and the selector load, which
is always fine.
There is one notable change: with this, when a msgSend needs a
receiver null check, the selector is now loaded in the non-null
block, instead of before the null check. That should be a mild
improvement.
Arthur O'Dwyer [Fri, 14 Jan 2022 16:25:56 +0000 (11:25 -0500)]
[libc++] Fix LWG3390: move_iterator now handles move-only iterators.
This can't really be tested until C++20 move_iterator is completely implemented.
Differential Revision: https://reviews.llvm.org/D117327
Ting Wang [Thu, 27 Jan 2022 04:00:43 +0000 (23:00 -0500)]
[PowerPC] Add the Power10 XS[MAX|MIN]CQP instruction
Add the Power 10 instruction XS[MAX|MIN]CQP.
Reviewed By: shchenz, amyk
Differential Revision: https://reviews.llvm.org/D118036
Petr Hosek [Thu, 27 Jan 2022 02:48:20 +0000 (18:48 -0800)]
[CMake][Fuchsia] Drop 32-bit ios runtimes
These are no longer supported in the recent Xcode SDK versions.
Differential Revision: https://reviews.llvm.org/D118306
Craig Topper [Thu, 27 Jan 2022 02:20:04 +0000 (18:20 -0800)]
[RISCV] Use vnsrl.wx with x0 instead of vnsrl.vi for truncate.
This matches what the spec uses for the vncvt.x.x.w assembly
pseudoinstruction.
Reviewed By: kito-cheng
Differential Revision: https://reviews.llvm.org/D118295
Craig Topper [Thu, 27 Jan 2022 02:19:52 +0000 (18:19 -0800)]
[RISCV] Remove unused flags from FeatureKind in TargetParser.h. NFC
These flags aren't used and we shouldn't add more flags for new
ratified extensions. So clear out the unused flags to avoid any
confusion.
Reviewed By: khchen
Differential Revision: https://reviews.llvm.org/D118294
Arthur Eubanks [Thu, 27 Jan 2022 02:37:03 +0000 (18:37 -0800)]
[gn build] Format gn files
Arthur Eubanks [Wed, 26 Jan 2022 22:54:11 +0000 (14:54 -0800)]
[gn build] Move -fno-builtin to crt_code
crt_code seems to correspond to SANITIZER_COMMON_CFLAGS which contains -fno-builtin.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D118288
Chuanqi Xu [Thu, 27 Jan 2022 02:26:40 +0000 (10:26 +0800)]
[NFC] [AST] Move isSameEntity into ASTContext
Currently we are trying to implement the semantics of C++ Modules. A big
challenge would be the ODR checking. Previously we did this in
ASTReader, it would handle the cases like:
```
module;
export module a_module;
import another_module; // check the ODR consistency here
```
or
```
export module m;
import a_module;
import another_module; // check the ODR consistency here
```
However, it wouldn't handle the case:
```
import another_module; // When we check ODR here, everything looks fine.
```
In the case, the read process is ended. But we need to check the ODR
still. To reuse the facility we do in ASTReader, this patch moves the
corresponding codes into ASTContext. This should be good since there
were facilities like `hasSameTemplateName` and `hasSameType`.
Although the patch is a little bit big, all of the change should be
trivial.
Reviewed By: erichkeane
Differential Revision: https://reviews.llvm.org/D118223
Roland McGrath [Thu, 27 Jan 2022 00:39:36 +0000 (16:39 -0800)]
[asan] Add missing #include of sanitizer_platform.h
The "asan/asan_mapping.h" header relies on sanitizer_platform.h
macros, but doesn't directly include the header. All the existing
uses until recently happened to be in places where some other header
had indirectly included sanitizer_platform.h first. The addition of
asan_rtl_x86_64.S was the first place to use "asan/asan_mapping.h"
alone. It so happens that its uses of the macros make having no
macros defined equivalent to SANITIZER_LINUX, so this did not affect
Linux builds. But the assembly constants in asan_rtl_x86_64.S were
wrong for Fuchsia when SANITIZER_FUCHSIA was not properly defined.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D118296
David Blaikie [Thu, 27 Jan 2022 02:00:43 +0000 (18:00 -0800)]
Default to DWARFv4 on Windows
Arthur Eubanks [Thu, 27 Jan 2022 01:54:37 +0000 (17:54 -0800)]
[clang] Use proper type to left shift after D117262
Causing warnings like
warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits
as reported in D117262.
Amir Ayupov [Thu, 27 Jan 2022 01:08:13 +0000 (17:08 -0800)]
[BOLT][TEST] Adjust tests for BOLT_CLANG_EXE=clang-{6..9}
Fix tests to pass with clang-6..9 on Ubuntu 20.04.
Reviewed By: yota9
Differential Revision: https://reviews.llvm.org/D118282
Aart Bik [Thu, 27 Jan 2022 00:05:31 +0000 (16:05 -0800)]
[mlir][amx] add a full tile matrix mult integral example to integration tests
Reviewed By: dcaballe
Differential Revision: https://reviews.llvm.org/D118292
Ting Wang [Thu, 27 Jan 2022 01:00:25 +0000 (20:00 -0500)]
[NFC] Empty test commit, check commit access
Shubham Sandeep Rastogi [Thu, 27 Jan 2022 00:58:49 +0000 (16:58 -0800)]
Revert "Emit swift5 reflection section data in dsym bundle generated by dsymutil in the Dwarf section."
This reverts commit
50f50f2582993a079dbcfb8e7ba48920f41e6be0.
Arthur O'Dwyer [Fri, 14 Jan 2022 16:44:31 +0000 (11:44 -0500)]
[libc++] Fix LWG3533 "Make `base() const&` consistent..."
Fixed in counted_iterator and transform_view::iterator.
The LWG issue also affected elements_view::iterator, but we haven't
implemented that one yet, and whoever does implement it will get
the fix for free if they just follow the working draft's wording.
Drive-by stop calling `.base()` on test iterators in the test,
and improve the transform_view::iterator/sentinel tests.
Differential Revision: https://reviews.llvm.org/D117329
Arthur O'Dwyer [Sat, 22 Jan 2022 23:34:25 +0000 (18:34 -0500)]
[libc++] Make C++03 reference_wrapper more like C++11.
Remove a bunch of LIBCPP_CXX03_LANG. This is the result of a
rabbithole to re-eliminate the workaround I introduced into
std::cref in D117953. It turns out that Clang's C++03 mode
(the only compiler we care about C++03 for) now supports all
the things we were originally eschewing via LIBCPP_CXX03_LANG;
we can fully support these reference_wrapper features in
C++03 mode, and un-XFAIL the relevant tests.
Drive-by constexprify a few more tests.
Differential Revision: https://reviews.llvm.org/D117974
Arthur O'Dwyer [Sat, 22 Jan 2022 20:29:18 +0000 (15:29 -0500)]
[libc++] Fix LWG3557 "static_cast expression in convertible_to has the wrong operand"
https://cplusplus.github.io/LWG/issue3557
I think the code change is unobservable, so we could just close this as
"Nothing To Do" instead; but it seems appropriate to follow the Standard's
wording here as closely as possible.
Differential Revision: https://reviews.llvm.org/D117964
Arthur O'Dwyer [Sat, 22 Jan 2022 04:29:41 +0000 (23:29 -0500)]
[libc++] [ranges] Fix LWG3470 "convertible-to-non-slicing seems to reject valid case"
Differential Revision: https://reviews.llvm.org/D117941
Zixu Wang [Thu, 27 Jan 2022 00:22:08 +0000 (16:22 -0800)]
[FIX][clang] Fix unused private field in ExtractAPIVisitor
Fix a build failure where an unused private field in ExtractAPIVisitor
triggered a warning turned into error.
Med Ismail Bennani [Thu, 27 Jan 2022 00:05:12 +0000 (01:05 +0100)]
[lldb/test] Skip TestSBModule unless darwin
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Med Ismail Bennani [Thu, 27 Jan 2022 00:04:38 +0000 (01:04 +0100)]
Revert "[lldb/test] Try to fix TestSBModule failure"
This reverts commit
326516448c839d8f9cc515b20a34d0f3a6ee2374.
Med Ismail Bennani [Wed, 26 Jan 2022 23:57:54 +0000 (00:57 +0100)]
[lldb/test] Try to fix TestSBModule failure
This should fix https://lab.llvm.org/buildbot/#/builders/68/builds/25571
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Aart Bik [Wed, 26 Jan 2022 23:22:47 +0000 (15:22 -0800)]
[mlir][amx] fix some whitespace issues in AMX tests
Reviewed By: dcaballe
Differential Revision: https://reviews.llvm.org/D118289
Mehdi Amini [Wed, 26 Jan 2022 23:59:24 +0000 (23:59 +0000)]
Revert "[mlir][LLVM] Add support for operand_attrs to InlineAsmOp"
This reverts commit
e6ce2c0b8d5f8253791bf87145669c58328c30db.
The test is failing in CI right now.
Arthur Eubanks [Wed, 26 Jan 2022 23:40:30 +0000 (15:40 -0800)]
[gn build] Remove unnecessary include_dirs
These are already part of crt_code.
Paweł Bylica [Wed, 26 Jan 2022 14:57:42 +0000 (15:57 +0100)]
[test][DAGCombine] Add more tests for carry diamond. NFC
Vladislav Khmelevsky [Wed, 26 Jan 2022 22:59:10 +0000 (01:59 +0300)]
[BOLT] Fix DWARFv5 for aarch64
This patch reverts patch "DWARFv5 default: Switch bolt tests to use
DWARFv4 since Bolt doesn't support v5 yet" and places the -gdwarf-4 flag
to the global cflags config file.
Reviewed By: Amir
Differential Revision: https://reviews.llvm.org/D118283
Stanislav Mekhanoshin [Tue, 25 Jan 2022 00:22:49 +0000 (16:22 -0800)]
[AMDGPU] Validate dst and src2 non-overlapping restriction in asm
Differential Revision: https://reviews.llvm.org/D118089
Arthur Eubanks [Wed, 26 Jan 2022 22:50:27 +0000 (14:50 -0800)]
[gn build] Don't pass -fuse-ld=lld to compiler-rt tests
This was done for check-hwasan, but compiler-rt/test/hwasan/lit.cfg.py
already does that.
This makes check-asan (to be submitted) fail on Windows due to using
lld-link (as opposed to MSVC link.exe) in tests. That seems like a
problem that should be fixed, but that's orthogonal to this patch.
Arthur Eubanks [Wed, 26 Jan 2022 23:07:20 +0000 (15:07 -0800)]
[gn build] Remove incorrect interception dependency
Stanislav Mekhanoshin [Fri, 21 Jan 2022 20:12:31 +0000 (12:12 -0800)]
[AMDGPU] Prevent aliasing of SrcC and Dst in MAI
Form the MAI spec: It’s ok that Src_C and vDst are the exact same VGPRs
or Src_C and vDst are completely separated. The case that Src_C and vDst
are overlapping should be avoid as new value could be written to accumulator
input before it gets read.
Note that this inevitably increases register pressure to the point where
some programs will become uncompilable.
This patch separates MAC and FMA versions of MFMA instructions using either
tied dst and src2 or earlyclobber dst.
Fixes: SWDEV-318900
Differential Revision: https://reviews.llvm.org/D117844
Benjamin Kramer [Wed, 26 Jan 2022 22:24:45 +0000 (23:24 +0100)]
Maksim Panchenko [Wed, 26 Jan 2022 21:52:40 +0000 (13:52 -0800)]
[BOLT][docs] Add note regarding DWARF v5 support to README.md
Reviewed By: Amir, yota9
Differential Revision: https://reviews.llvm.org/D118284
Shubham Sandeep Rastogi [Wed, 17 Nov 2021 23:05:58 +0000 (15:05 -0800)]
Emit swift5 reflection section data in dsym bundle generated by dsymutil in the Dwarf section.
Add support for Swift reflection metadata to dsymutil.
This patch adds support for copying Swift reflection metadata (__swift5_.* sections) from .o files to into the symbol-rich binary in the output .dSYM. The functionality is automatically enabled only if a .o file has reflection metadata sections and the binary doesn't. When copying dsymutil moves the section from the __TEXT segment to the __DWARF segment.
rdar://
76973336
Differential Revision: https://reviews.llvm.org/D115007
Aart Bik [Wed, 26 Jan 2022 19:58:17 +0000 (11:58 -0800)]
[mlir][amx] add a full tile matrix mult example to integration tests
Rationale:
Demonstrates the maximum tile size allowed for the f32 <= bf16 x bf16 op
Reviewed By: dcaballe
Differential Revision: https://reviews.llvm.org/D118277
Petr Hosek [Wed, 26 Jan 2022 00:10:51 +0000 (16:10 -0800)]
[CMake] Use generator expression to get in-tree libc++ path
When using the in-tree libc++, we should be using the full path to
ensure that we're using the right library and not accidentally pick up
the system library.
Differential Revision: https://reviews.llvm.org/D118200
Craig Topper [Wed, 26 Jan 2022 21:39:36 +0000 (13:39 -0800)]
[RISCV] Add hasStdExtZbp() to hasAndNotCompare.
Jordan Rupprecht [Wed, 26 Jan 2022 21:37:42 +0000 (13:37 -0800)]
[bazel] Enable layering_check for MLIR test directory
This would have enabled me to notice the MLIR test file needed updating too, preventing the test file of
2074eef5db330ab437410bfb617b58ea70f4fbff from being necessary.
layering_check is already enabled in mlir/BUILD.bazel. I don't know why I didn't see the other breakage there.
Differential Revision: https://reviews.llvm.org/D118125
Craig Topper [Wed, 26 Jan 2022 20:50:38 +0000 (12:50 -0800)]
[RISCV] Minor code cleanups in RISCVISAInfo. NFCI
Pass StringRef by value instead of const reference.
Replace if () llvm_unreachable with an assert.
Replace size() == 0 with empty()
Fangrui Song [Wed, 26 Jan 2022 21:28:51 +0000 (13:28 -0800)]
[cc1as] Remove -Wa,--compress-debug-sections=zlib-gnu
It's obsoleted and unlikely used. See D117744.
Fangrui Song [Wed, 26 Jan 2022 21:26:51 +0000 (13:26 -0800)]
[Driver] Remove obsoleted -gz=zlib-gnu
GCC added -gz=zlib-gnu in 2014 for -gz meaning change (.zdebug =>
SHF_COMPRESSED) and the legacy zlib-gnu hasn't gain adoption.
According to Debian Code Search (`gz=zlib-gnu`), no project uses -gz=zlib-gnu
(valgrind has a configure to use -gz=zlib). Any possible -gz=zlib-gnu user can
switch to -gz smoothly (supported by integrated assemblers for many years;
binutils 2.26).
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D117744
Vladislav Khmelevsky [Wed, 26 Jan 2022 20:45:46 +0000 (23:45 +0300)]
[BOLT] Prepare BOLT for unit-testing
This patch adds unit testing support for BOLT. In order to do this we will need at least do this changes on the code level:
* Make createMCPlusBuilder accessible externally
* Remove positional InputFilename argument to bolt utlity sources
And prepare the cmake and lit for the new tests.
Vladislav Khmelevsky,
Advanced Software Technology Lab, Huawei
Reviewed By: maksfb, Amir
Differential Revision: https://reviews.llvm.org/D118271
Petr Hosek [Tue, 25 Jan 2022 17:42:28 +0000 (09:42 -0800)]
[CMake] Handle in-tree libc++ for sanitizer tests
We have been relying on the logic for C++ ABI library for sanitizer
tests but that's incorrect since most tests require a full C++ library
and not just C++ ABI. This change tries to address this by using the
dependency on libc++ if available.
Differential Revision: https://reviews.llvm.org/D118163
Adrian Prantl [Tue, 25 Jan 2022 21:29:22 +0000 (13:29 -0800)]
Fix UB in DwarfExpression::emitLegacyZExt()
A shift-left > 63 triggers a UBSAN failure. This patch kicks the can
down the road (to the consumer) by emitting a more compact
representation of the shift computation in DWARF expressions.
Relanding (I accidentally pushed an earlier version of the patch previously).
Differential Revision: https://reviews.llvm.org/D118183
Jeremy Furtek [Wed, 26 Jan 2022 21:00:21 +0000 (21:00 +0000)]
[mlir] Add ODS support for enum attributes with grouped bit cases
This diff modifies the tablegen specification and code generation for
BitEnumAttr attributes in MLIR Operation Definition Specification (ODS) files.
Specifically:
- there is a new tablegen class for "none" values (i.e. no bits set)
- single-bit enum cases are specified via bit index (i.e. [0, 31]) instead of
the resulting enum integer value
- there is a new tablegen class to represent a "grouped" bitwise OR of other
enum values
This diff is intended as an initial step towards improving "fastmath"
optimization support in MLIR, to allow more precise control of whether certain
floating point optimizations are applied in MLIR passes. "Fast" math options
for floating point MLIR operations would (following subsequent RFC and
discussion) be specified by using the improved enum bit support in this diff.
For example, a "fast" enum value would act as an alias for a group of other
cases (e.g. finite-math-only, no-signed-zeros, etc.), in a way that is similar
to support in C/C++ compilers (clang, gcc).
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D117029
Aaron Ballman [Wed, 26 Jan 2022 20:54:52 +0000 (15:54 -0500)]
Update the Bug Life Cycle docs for the switch to GitHub issues
This updates the Bug Life Cycle docs now that we've switched to GitHub
issues. The intent is to retain the same general process we used to
use for triaging bugs under Bugzilla, but with the facilities we have
available in GitHub.
LLVM GN Syncbot [Wed, 26 Jan 2022 20:46:39 +0000 (20:46 +0000)]
[gn build] Port
b1d946cbf780
Adrian Prantl [Wed, 26 Jan 2022 20:46:07 +0000 (12:46 -0800)]
Revert "Fix UB in DwarfExpression::emitLegacyZExt()"
This reverts commit
216002c4bb708e6d6fd1895c8ea636470961f824
while investigating bot breakage.
Matt Arsenault [Wed, 12 Jan 2022 17:02:40 +0000 (12:02 -0500)]
AMDGPU/GlobalISel: Fold wave address into mubuf addressing modes
Matt Arsenault [Wed, 19 Jan 2022 22:23:57 +0000 (17:23 -0500)]
GlobalISel: Avoid crash on asm with lying result types
The physical register in the asm has the wrong type for the declared
IR. It seems to work in the DAG by extracting the 4 elements that are
defined in the IR from the register, but that isn't handled here. This
doesn't seem to be a well tested path since other mismatched cases are
crashing the DAG asm handling.