Commit Graph

412563 Commits

Author SHA1 Message Date
River Riddle e3cd80ea9f [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
2022-01-26 21:37:22 -08:00
River Riddle f4a368689f [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
2022-01-26 21:37:22 -08:00
Congzhe Cao f3e1f44340 [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
2022-01-27 00:33:46 -05:00
Max Kazantsev 2d566637f4 [Test] Add test for or-reduce idiom symmetrical to and-reduce 2022-01-27 12:26:19 +07:00
Max Kazantsev 63839854ba [Test] Add one more add-reduce test w/ pointer bitcasts 2022-01-27 12:13:54 +07:00
Evgeny Shulgin 836950c4e6 [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
2022-01-26 21:54:17 -07:00
Ahmed Bougacha ecb502342c [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.
2022-01-26 20:52:54 -08:00
Arthur O'Dwyer 7ea4fe7ede [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
2022-01-26 23:50:26 -05:00
Ting Wang 6f25cb8685 [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
2022-01-26 23:00:43 -05:00
Petr Hosek 2fcdd685bd [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
2022-01-26 18:57:21 -08:00
Craig Topper b3bec6e453 [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
2022-01-26 18:38:13 -08:00
Craig Topper 5844d29e76 [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
2022-01-26 18:38:13 -08:00
Arthur Eubanks b75eea12fe [gn build] Format gn files 2022-01-26 18:37:03 -08:00
Arthur Eubanks f73f367f72 [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
2022-01-26 18:33:35 -08:00
Chuanqi Xu f85ee6d56a [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
2022-01-27 10:30:50 +08:00
Roland McGrath 1510668fb0 [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
2022-01-26 18:19:08 -08:00
David Blaikie 9c62728610 Default to DWARFv4 on Windows 2022-01-26 18:01:07 -08:00
Arthur Eubanks eee97f1617 [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.
2022-01-26 17:54:37 -08:00
Amir Ayupov 5c238be04b [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
2022-01-26 17:12:54 -08:00
Aart Bik 11fb049954 [mlir][amx] add a full tile matrix mult integral example to integration tests
Reviewed By: dcaballe

Differential Revision: https://reviews.llvm.org/D118292
2022-01-26 17:10:01 -08:00
Ting Wang 630e6fa912 [NFC] Empty test commit, check commit access 2022-01-26 20:00:25 -05:00
Shubham Sandeep Rastogi 0303eb3cf2 Revert "Emit swift5 reflection section data in dsym bundle generated by dsymutil in the Dwarf section."
This reverts commit 50f50f2582.
2022-01-26 16:59:11 -08:00
Arthur O'Dwyer 4b3e0d2a7e [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
2022-01-26 19:38:39 -05:00
Arthur O'Dwyer c99a585399 [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
2022-01-26 19:34:03 -05:00
Arthur O'Dwyer 16031cbf2b [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
2022-01-26 19:32:46 -05:00
Arthur O'Dwyer ff84c635b7 [libc++] [ranges] Fix LWG3470 "convertible-to-non-slicing seems to reject valid case"
Differential Revision: https://reviews.llvm.org/D117941
2022-01-26 19:30:12 -05:00
Zixu Wang 98fa46f870 [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.
2022-01-26 16:24:04 -08:00
Med Ismail Bennani aae3c4f2b4
[lldb/test] Skip TestSBModule unless darwin
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-01-27 01:05:12 +01:00
Med Ismail Bennani a6b5624372 Revert "[lldb/test] Try to fix TestSBModule failure"
This reverts commit 326516448c.
2022-01-27 01:04:38 +01:00
Med Ismail Bennani 326516448c [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>
2022-01-27 01:00:29 +01:00
Aart Bik 19f67ee29e [mlir][amx] fix some whitespace issues in AMX tests
Reviewed By: dcaballe

Differential Revision: https://reviews.llvm.org/D118289
2022-01-26 16:00:03 -08:00
Mehdi Amini 7ebd22c504 Revert "[mlir][LLVM] Add support for operand_attrs to InlineAsmOp"
This reverts commit e6ce2c0b8d.

The test is failing in CI right now.
2022-01-26 23:59:24 +00:00
Arthur Eubanks 0a4bbdabe3 [gn build] Remove unnecessary include_dirs
These are already part of crt_code.
2022-01-26 15:40:54 -08:00
Paweł Bylica bdb7837481
[test][DAGCombine] Add more tests for carry diamond. NFC 2022-01-27 00:25:26 +01:00
Vladislav Khmelevsky dcc595ea3c [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
2022-01-27 02:14:58 +03:00
Stanislav Mekhanoshin 409c4436f9 [AMDGPU] Validate dst and src2 non-overlapping restriction in asm
Differential Revision: https://reviews.llvm.org/D118089
2022-01-26 15:14:06 -08:00
Arthur Eubanks 1d085f1147 [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.
2022-01-26 15:08:22 -08:00
Arthur Eubanks 10ce1eed47 [gn build] Remove incorrect interception dependency 2022-01-26 15:07:41 -08:00
Stanislav Mekhanoshin dbf278b984 [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
2022-01-26 14:48:20 -08:00
Benjamin Kramer f32dccb9a4 [bazel] Port 480cd4cb 2022-01-26 23:24:45 +01:00
Maksim Panchenko d97fcf3df2 [BOLT][docs] Add note regarding DWARF v5 support to README.md
Reviewed By: Amir, yota9

Differential Revision: https://reviews.llvm.org/D118284
2022-01-26 14:19:46 -08:00
Shubham Sandeep Rastogi 50f50f2582 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
2022-01-26 14:14:17 -08:00
Aart Bik a5257ae277 [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
2022-01-26 14:13:30 -08:00
Petr Hosek 48a38954c9 [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
2022-01-26 14:12:48 -08:00
Craig Topper f487a76430 [RISCV] Add hasStdExtZbp() to hasAndNotCompare. 2022-01-26 13:54:05 -08:00
Jordan Rupprecht e7cf109587 [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 2074eef5db 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
2022-01-26 13:37:42 -08:00
Craig Topper 7e73fd95a0 [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()
2022-01-26 13:35:40 -08:00
Fangrui Song 6bc20eb134 [cc1as] Remove -Wa,--compress-debug-sections=zlib-gnu
It's obsoleted and unlikely used. See D117744.
2022-01-26 13:28:51 -08:00
Fangrui Song 35d15222c0 [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
2022-01-26 13:26:51 -08:00
Vladislav Khmelevsky 20e9d4caf0 [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
2022-01-27 00:22:13 +03:00