Melanie Blower [Thu, 10 Jun 2021 15:44:18 +0000 (11:44 -0400)]
Revert "[clang][FPEnv] Clang floatng point model ffp-model=precise enables ffp-contract=on"
This reverts commit
8daac3714083aa5507622dba858344051f6b5574.
The build bots are showing some fails on broadwell and arm.
Fix to LNT test suite needs work.
David Tenty [Thu, 10 Jun 2021 15:15:04 +0000 (11:15 -0400)]
[AIX] Build libLTO as MODULE rather than SHARED
On CMake versions greater that >= 3.16 on AIX, shared libraries are
created as archives (which is the normal form for the platform). However
plugins libraries which are passed directly to a executable, like
libLTO to the linker, are usual build as plain `.so`, so this patch
restores this behaviour for libLTO on AIX (and adjust the name if need be
to account for the fact that llvm_add_library likes to force an empty
name prefix on modules), so we end up with the expected libLTO.so
Reviewed By: w2yehia
Differential Revision: https://reviews.llvm.org/D103824
Aaron Ballman [Thu, 10 Jun 2021 15:59:29 +0000 (11:59 -0400)]
Add a page to track the status of C proposals in Clang.
Keith Smiley [Wed, 9 Jun 2021 16:08:54 +0000 (09:08 -0700)]
Fix range-loop-analysis warning
```
llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8024:19: warning: loop variable 'VF' of type 'const llvm::ElementCount' creates a copy from type 'const llvm::ElementCount' [-Wrange-loop-analysis]
for (const auto VF : VFCandidates) {
^
llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8024:8: note: use reference type 'const llvm::ElementCount &' to prevent copying
for (const auto VF : VFCandidates) {
^~~~~~~~~~~~~~~
&
1 warning generated.
```
Differential Revision: https://reviews.llvm.org/D103970
thomasraoux [Wed, 9 Jun 2021 16:42:32 +0000 (09:42 -0700)]
[mlir][gpu] Add op to create MMA constant matrix
This allow creating a matrix with all elements set to a given value. This is
needed to be able to implement a simple dot op.
Differential Revision: https://reviews.llvm.org/D103870
gbreynoo [Thu, 10 Jun 2021 15:32:31 +0000 (16:32 +0100)]
[docs][llvm-ar] Add rsp-quoting option to the llvm-ar command guide.
I noticed that I did not update the command guide when introducing the
--rsp-quoting option. This change fixes this.
Differential Revision: https://reviews.llvm.org/D103915
Benjamin Kramer [Thu, 10 Jun 2021 15:23:37 +0000 (17:23 +0200)]
[AArch64] Silence fallthrough warning. NFC.
AArch64TargetTransformInfo.cpp:302:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
default:
^
Markus Böck [Thu, 10 Jun 2021 15:06:19 +0000 (17:06 +0200)]
[clang-cl] Add /permissive and /permissive-
This patch adds the command line options /permissive and /permissive- to clang-cl. These flags are used in MSVC to enable various /Zc language conformance options at once. In particular, /permissive is used to enable the various non standard behaviour of MSVC, while /permissive- is the opposite.
When either of two command lines are specified they are simply expanded to the various underlying /Zc options. In particular when /permissive is passed it currently expands to:
/Zc:twoPhase- (disable two phase lookup)
-fno-operator-names (disable C++ operator keywords)
/permissive- expands to the opposites of these flags + /Zc:strictStrings (/Zc:strictStrings- does not currently exist). In the future, if any more MSVC workarounds are ever added they can easily be added to the expansion. One is also able to override settings done by permissive. Specifying /permissive- /Zc:twoPhase- will apply the settings from permissive minus, but disables two phase lookup.
Motivation for this patch was mainly parity with MSVC as well as compatibility with Windows SDK headers. The /permissive page from MSVC documents various workarounds that have to be done for the Windows SDK headers [1], when MSVC is used with /permissive-. In these, Microsoft often recommends simply compiling with /permissive for the specified source files. Since some of these also apply to clang-cl (which acts like /permissive- by default mostly), and some are currently implemented as "hacks" within clang that I'd like to remove, adding /permissive and /permissive- to be in full parity with MSVC and Microsofts documentation made sense to me.
[1] https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-160#windows-header-issues
Differential Revision: https://reviews.llvm.org/D103773
Markus Böck [Thu, 10 Jun 2021 15:02:44 +0000 (17:02 +0200)]
[clang][msvc] Define _HAS_STATIC_RTTI to 0, when compiling with -fno-rtti
When using the -fno-rtti option of the GCC style clang++, using typeid results in an error. The MSVC STL however kindly provides a define flag called _HAS_STATIC_RTTI, which either enables or disables uses of typeid throughout the STL. By default, if undefined, it is set to 1, enabling the use of typeid.
With this patch, _HAS_STATIC_RTTI is set to 0 when -fno-rtti is specified. This way various headers of the MSVC STL like functional can be consumed without compilation failures.
Differential Revision: https://reviews.llvm.org/D103771
Markus Böck [Thu, 10 Jun 2021 15:01:13 +0000 (17:01 +0200)]
[clang][driver] Add -foperator-names
This patch adds the command line option -foperator-names which acts as the opposite of -fno-operator-names. With this command line option it is possible to reenable C++ operator keywords on the command line if -fno-operator-names had previously been passed.
Differential Revision: https://reviews.llvm.org/D103749
Adam Czachorowski [Mon, 7 Jun 2021 16:26:21 +0000 (18:26 +0200)]
[clang] Do not crash when ArgTy is null in CheckArgAlignment
This can happen around RecoveryExpr.
Differential Revision: https://reviews.llvm.org/D103825
Luo, Yuanke [Thu, 10 Jun 2021 14:36:17 +0000 (22:36 +0800)]
[X86][NFC] Fix typo.
Xing Xue [Thu, 10 Jun 2021 14:45:50 +0000 (10:45 -0400)]
[libc++abi] NFC: adding a new parameter base to functions for calculating addresses with relative encodings
Summary:
This NFC patch adds a new parameter base to functions invoked by scan_eh_tab() for calculating the address of the encoding with a relative value. base defaults to 0. This is in preparation for the AIX implementation which uses the DW_EH_PE_datarel encoding.
Reviewed by: MaskRay, sfertile, compnerd, libc++abi
Differential Revision: https://reviews.llvm.org/D101545
Paul C. Anagnostopoulos [Tue, 8 Jun 2021 15:51:53 +0000 (11:51 -0400)]
[TableGen] Eliminate dead code in ParseForeachDeclaration [NFC]
Differential Revision: https://reviews.llvm.org/D103904
Irina Dobrescu [Thu, 3 Jun 2021 08:46:12 +0000 (09:46 +0100)]
[AArch64] Add cost tests for bitreverse
This patch includes cost tests for bit reverse as well as some adjustments to the cost model.
Differential Revision: https://reviews.llvm.org/D102755
David Green [Thu, 10 Jun 2021 13:49:04 +0000 (14:49 +0100)]
[ARM] Skip debug during vpt block creation
Debug info is currently preventing VPT block creation, leading to
different codegen. This patch attempts to skip any debug instructions
during vpt block creation, making sure they do not interfere.
Differential Revision: https://reviews.llvm.org/D103610
David Green [Wed, 9 Jun 2021 19:48:42 +0000 (20:48 +0100)]
[ARM] MVE VPT block tests with debug info. NFC
Melanie Blower [Fri, 14 May 2021 17:06:26 +0000 (13:06 -0400)]
[clang][FPEnv] Clang floatng point model ffp-model=precise enables ffp-contract=on
This patch changes the ffp-model=precise to enables -ffp-contract=on
(previously -ffp-model=precise enabled -ffp-contract=fast). This is a
follow-up to Andy Kaylor's comments in the llvm-dev discussion
"Floating Point semantic modes". From the same email thread, I put
Andy's distillation of floating point options and floating point modes
into UsersManual.rst
Differential Revision: https://reviews.llvm.org/D74436
Yaxun (Sam) Liu [Thu, 10 Jun 2021 13:13:04 +0000 (09:13 -0400)]
Fix test hip-device-compile.hip
Add stricter check for 'ld'.
Joseph Huber [Wed, 9 Jun 2021 23:34:24 +0000 (19:34 -0400)]
[OpenMP] Add type to firstprivate symbol for const firstprivate values
Clang will create a global value put in constant memory if an aggregate value
is declared firstprivate in the target device. The symbol name only uses the
name of the firstprivate variable, so symbol name conflicts will occur if the
variable is allowed to have different types through templates. An example of
this behvaiour is shown in https://godbolt.org/z/EsMjYh47n. This patch adds the
mangled type name to the symbol to avoid such naming conflicts. This fixes
https://bugs.llvm.org/show_bug.cgi?id=50642.
Reviewed By: ABataev
Differential Revision: https://reviews.llvm.org/D103995
Adam Czachorowski [Wed, 9 Jun 2021 12:52:29 +0000 (14:52 +0200)]
[clang] Make CXXDefaultArgExpr inherit dependence from the inner Expr
Before this change, CXXDefaultArgExpr would always have
ExprDependence::None. This can lead to issues when, for example, the
inner expression is RecoveryExpr and yet containsErrors() on the default
expression is false.
Differential Revision: https://reviews.llvm.org/D103982
Sanjay Patel [Thu, 10 Jun 2021 12:47:40 +0000 (08:47 -0400)]
[CodeGen] limit tests to current pass manager to avoid variability; NFC
Post-commit feedback for
d69c4372bfbe says the output
may vary between pass managers. This is hopefully a
quick fix, but we might want to investigate how to
better solve this type of problem.
Guillaume Chatelet [Thu, 10 Jun 2021 12:41:57 +0000 (12:41 +0000)]
[clang-tidy] Allow disabling integer narrowing conversions for cppcoreguidelines-narrowing-conversions
Differential Revision: https://reviews.llvm.org/D104018
Caroline Concatto [Wed, 26 May 2021 08:50:29 +0000 (09:50 +0100)]
[InstCombine] Add fold for extracting known elements from a stepvector
This patch allows folding stepvector + extract to the lane when the lane is
lower than the minimum size of the scalable vector. This fold is possible
because lane X of a stepvector is also X!
For instance, extracting element 3 of a <vscale x 4 x i64>stepvector is 3.
Differential Revision: https://reviews.llvm.org/D103153
Eric Astor [Thu, 10 Jun 2021 12:35:41 +0000 (08:35 -0400)]
[ms] [llvm-ml] Make variable redefinition match ML.EXE
MASM specifies that all variable definitions are redefinable, except for EQU definitions to expressions. (TEXTEQU is unspecified, but appears to be fully redefinable as well.)
Also, in practice, ML.EXE allows redefinitions where the value doesn't change.
Make variable redefinition possible for text macros, suppressing expansion if written as the first argument to an EQU or TEXTEQU directive.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D103993
Caroline Concatto [Tue, 11 May 2021 14:22:27 +0000 (15:22 +0100)]
[InstSimplify] Add constant fold for extractelement + splat for scalable vectors
This patch allows that scalable vector can fold extractelement and constant splat
only when the lane index is lower than the minimum number of elements of the vector.
Differential Revision: https://reviews.llvm.org/D103180
Guillaume Chatelet [Thu, 10 Jun 2021 11:15:28 +0000 (11:15 +0000)]
[llvm] Make Sequence reverse-iterable
This is a roll forward of D102679.
This patch simplifies the implementation of Sequence and makes it compatible with llvm::reverse.
It exposes the reverse iterators through rbegin/rend which prevents a dangling reference in std::reverse_iterator::operator++().
Note: Compared to D102679, this patch introduces a `asSmallVector()` member function and fixes compilation issue with GCC 5.
Differential Revision: https://reviews.llvm.org/D103948
Esme-Yi [Thu, 10 Jun 2021 11:10:45 +0000 (11:10 +0000)]
[NFC][XCOFF] Replace structs FileHeader32/SectionHeader32 with constants.
Summary: Some structs like FileHeader32/SectionHeader32
defined in llvm/include/llvm/BinaryFormat/XCOFF.h seem
unnecessary, because we only need their size. So this
patch removes them and defines size constants directly.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D103901
Timm Bäder [Thu, 10 Jun 2021 04:48:09 +0000 (06:48 +0200)]
[llvm][PPC] Add missing case for 'I' asm memory operands
From https://llvm.org/docs/LangRef.html#asm-template-argument-modifiers:
I: Print the letter ‘i’ if the operand is an integer constant,
otherwise nothing. Used to print ‘addi’ vs ‘add’ instructions.
Differential Revision: https://reviews.llvm.org/D103968
Nico Weber [Thu, 10 Jun 2021 10:22:03 +0000 (06:22 -0400)]
Reland "[gn build] port
d1d36f7ad (llvm-tapi-diff)"
This reverts commit
d84ed15c649616a50abdd7fbd9b28ddebb9f432c
The original change relanded in
5b5ab80e3195.
Michael Kruse [Thu, 10 Jun 2021 10:06:56 +0000 (05:06 -0500)]
[flang][windows] Run regression tests under Windows. NFCI.
Allow the lit test suite to run under Windows. This encompasses the following changes:
* Define `lit_tools_dir` for flang's test configuration
* Replace `(<command> || true)` idiom with `not <command>`
* Add `REQUIRES: shell` on tests that invoke a shell script
Reviewed By: awarzynski
Differential Revision: https://reviews.llvm.org/D89368
David Spickett [Thu, 10 Jun 2021 10:11:17 +0000 (10:11 +0000)]
Revert "Implementation of global.get/set for reftypes in LLVM IR"
This reverts commit
31859f896cf90d64904134ce7b31230f374c3fcc.
Causing SVE and RISCV-V test failures on bots.
Simon Pilgrim [Thu, 10 Jun 2021 09:55:06 +0000 (10:55 +0100)]
Fix MSVC int64_t -> uint64_t "narrowing conversion" warning.
Simon Pilgrim [Wed, 9 Jun 2021 17:19:49 +0000 (18:19 +0100)]
Add explicit braces to silence warning about ambiguous 'else' inside the EXPECT_EQ macro. NFCI.
Simon Pilgrim [Wed, 9 Jun 2021 16:30:00 +0000 (17:30 +0100)]
[TargetLowering] getABIAlignmentForCallingConv - pass DataLayout by const reference. NFCI.
Avoid unnecessary copies and match every other method in TargetLowering that takes DataLayout as an argument.
David Spickett [Thu, 10 Jun 2021 09:44:34 +0000 (09:44 +0000)]
[clang][Arm] Require arm and aarch64 target for bf16 intrinsics test
Alex Zinenko [Wed, 9 Jun 2021 09:51:15 +0000 (11:51 +0200)]
[mlir] make LLVMPointerType implement the data layout type interface
This brings us closer to replacing the LLVM data layout string with a
first-class layout modeling in MLIR.
Depends On D103945
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D103946
Ole Strohm [Thu, 10 Jun 2021 08:36:37 +0000 (09:36 +0100)]
[OpenCL] Relax test implicit members in C++ for OpenCL
Addresses the issue from a comment in D103252
Relaxes the test to account for some targets with added attributes
to inside the pattern.
Sven van Haastregt [Thu, 10 Jun 2021 09:05:53 +0000 (10:05 +0100)]
[OpenCL] Add builtin header test
Add a test to verify OpenCL builtin declarations using
OpenCLBuiltins.td.
This test consists of parsing a 60k line generated input file. The
entire test takes about 60s with a debug build on a decent machine.
Admittedly this is not the fastest test, but doesn't seem excessive
compared to other tests in clang/test/Headers (with one of the tests
taking 85s for example).
RFC: https://lists.llvm.org/pipermail/cfe-dev/2021-April/067973.html
Differential Revision: https://reviews.llvm.org/D97869
Paulo Matos [Thu, 10 Jun 2021 08:02:10 +0000 (10:02 +0200)]
Implementation of global.get/set for reftypes in LLVM IR
This change implements new DAG notes GLOBAL_GET/GLOBAL_SET, and
lowering methods for load and stores of reference types from IR
globals. Once the lowering creates the new nodes, tablegen pattern
matches those and converts them to Wasm global.get/set.
Reviewed By: tlively
Differential Revision: https://reviews.llvm.org/D95425
Alexander Kornienko [Thu, 10 Jun 2021 07:58:05 +0000 (09:58 +0200)]
Revert "[Verifier] Speed up and parallelize dominance checking. NFC"
This reverts commit
08664d005c02003180371049b19c7e5d01541c58, which according to
https://reviews.llvm.org/D103373 was pushed accidentally, and I believe it
causes timeouts in some internal mlir tests.
Martin Storsjö [Thu, 10 Jun 2021 07:30:13 +0000 (10:30 +0300)]
Revert "[AArch64LoadStoreOptimizer] Generate more STPs by renaming registers earlier"
This reverts commit
d96ea46629803641038ebe46d8cd512f8cf7e20f, as it
caused various misoptimizations, see https://reviews.llvm.org/D103597
for discussion on the issues.
Juneyoung Lee [Thu, 10 Jun 2021 07:11:43 +0000 (16:11 +0900)]
[LangRef] Fix missing code highlighting format
Esme-Yi [Thu, 10 Jun 2021 07:08:23 +0000 (07:08 +0000)]
[XCOFF][llvm-objdump] Dump the debug type in `--section-headers` option.
Summary: Add XCOFF recognition of debug section types
under `--section-headers` option.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D103079
Christian Sigg [Thu, 10 Jun 2021 05:50:29 +0000 (07:50 +0200)]
[mlir] Support pre-existing tokens in 'gpu-async-region'
Allow gpu ops implementing the async interface to already be async when running the GpuAsyncRegionPass.
That pass threads a 'current token' through a block with ops implementing the gpu async interface.
After this change, existing async ops (returning a !gpu.async.token) set the current token.
Existing synchronous `gpu.wait` ops reset the current token.
Reviewed By: herhut
Differential Revision: https://reviews.llvm.org/D103396
Qiu Chaofan [Thu, 10 Jun 2021 06:28:33 +0000 (14:28 +0800)]
[NFC] Pre-commit tests for VectorCombine scalarize
Jim Lin [Thu, 10 Jun 2021 03:30:31 +0000 (11:30 +0800)]
[Docs] Fix incorrect return type for example code
Qiu Chaofan [Thu, 10 Jun 2021 06:14:57 +0000 (14:14 +0800)]
Update my mailmap
Christopher Di Bella [Sun, 9 May 2021 01:30:32 +0000 (01:30 +0000)]
[libcxx][optional] adds missing constexpr operations
Makes the following operations constexpr:
* `std::swap(optional, optional)`
* `optional(optional<U> const&)`
* `optional(optional<U>&&)`
* `~optional()`
* `operator=(nullopt_t)`
* `operator=(U&&)`
* `operator=(optional<U> const&)`
* `operator=(optional<U>&&)`
* `emplace(Args&&...)`
* `emplace(initializer_list<U>, Args&&...)`
* `swap(optional&)`
* `reset()`
P2231 has been accepted by plenary, with the committee recommending
implementers retroactively apply to C++20. It's necessary for us to
implement _`semiregular-box`_ and _`non-propagating-cache`_, both of
which are required for ranges (otherwise we'll need to reimplement
`std::optional` with these members `constexpr`ified).
Differential Revision: https://reviews.llvm.org/D102119
Siva Chandra Reddy [Thu, 10 Jun 2021 05:05:11 +0000 (05:05 +0000)]
[libc] Remove libc-fuzzer as a dependency to check-libc.
Serge Pavlov [Wed, 9 Jun 2021 03:49:17 +0000 (10:49 +0700)]
[ConstantFolding] Enable folding of min/max/copysign for all floats
Previously such folding was enabled for half, float and double values
only. With this change it is allowed for other floating point values
also.
Differential Revision: https://reviews.llvm.org/D103956
Tom Stellard [Fri, 14 May 2021 03:54:04 +0000 (20:54 -0700)]
[Utils][vim] Highlight 'ptr' type
Differential Revision: https://reviews.llvm.org/D102460
Esme-Yi [Thu, 10 Jun 2021 04:37:06 +0000 (04:37 +0000)]
[llvm-objdump][XCOFF] Enable the -l (--line-numbers) option.
Summary: Add support for dumping line number
information for XCOFF object files in llvm-objdump.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D101272
Sam Powell [Thu, 10 Jun 2021 04:13:31 +0000 (21:13 -0700)]
Reland "[llvm] llvm-tapi-diff"
This is relanding commit
d1d36f7ad2ae82bea8a6fcc40d6c42a72e21f096 .
This patch additionally addresses failures found in buildbots due to unstable build ordering & post review comments.
This patch introduces a new tool, llvm-tapi-diff, that compares and returns the diff of two TBD files.
Reviewed By: ributzka, JDevlieghere
Differential Revision: https://reviews.llvm.org/D101835
Yaxun (Sam) Liu [Thu, 29 Apr 2021 19:10:06 +0000 (15:10 -0400)]
[HIP] Add --gpu-bundle-output
Added --gpu-bundle-output to control bundling/unbundling output of HIP device compilation.
By default preprocessor expansion, llvm bitcode and assembly are unbundled, code objects are
bundled.
Reviewed by: Artem Belevich, Jan Svoboda
Differential Revision: https://reviews.llvm.org/D101630
hsmahesha [Thu, 10 Jun 2021 02:30:23 +0000 (08:00 +0530)]
[AMDGPU] Fix missing lowering of LDS used in global scope.
Reviewed By: rampitec
Differential Revision: https://reviews.llvm.org/D103431
Jinsong Ji [Thu, 10 Jun 2021 02:39:57 +0000 (02:39 +0000)]
[AIX] Add traceback ssp canary bit support
We will need to set the ssp canary bit in traceback table to communicate
with unwinder about the canary.
Reviewed By: #powerpc, shchenz
Differential Revision: https://reviews.llvm.org/D103202
Nico Weber [Wed, 9 Jun 2021 19:16:45 +0000 (15:16 -0400)]
[lld/mac] Print dylib search details with --print-dylib-search or RC_TRACE_DYLIB_SEARCHING
For debugging dylib loading, it's useful to have some insight into what
the linker is doing.
ld64 has the undocumented RC_TRACE_DYLIB_SEARCHING env var
for this printing dylib search candidates.
This adds a flag --print-dylib-search to make lld print the seame information.
It's useful for users, but also for writing tests. The output is formatted
slightly differently than ld64, but we still support RC_TRACE_DYLIB_SEARCHING
to offer at least a compatible way to trigger this.
ld64 has both `-print_statistics` and `-trace_symbol_output` to enable
diagnostics output. I went with "print" since that seems like a more
straightforward name.
Differential Revision: https://reviews.llvm.org/D103985
Ron Lieberman [Thu, 10 Jun 2021 01:52:45 +0000 (01:52 +0000)]
[libomptarget][amdgpu] Remove stray fprintf in rtl.cpp
remove unintended fprintf in rtl.cpp
Reviewed By: pdhaliwal
Differential Revision: https://reviews.llvm.org/D104003
Jon Roelofs [Thu, 10 Jun 2021 01:35:13 +0000 (18:35 -0700)]
Add .mailmap entries for myself, and sort the list
Ben Shi [Thu, 10 Jun 2021 01:14:14 +0000 (09:14 +0800)]
[clang][RISCV][test] Add more tests of the -mabi and -march options
1. There is no tests for mabi=ilp32e, and my patch covers that.
2. The tests in riscv-abi.c will show default ABI changes for special archs
in the future, especially the arch with the F but without the D extension.
3. The tests in riscv-arch.c will show default arch changes for abi=ilp32,
which is rv32imacfd currently, but it is better to be rv32imac.
And it is also better for abi=ilp32f defaults to arch=imacf.
Reviewed By: MaskRay, luismarques
Differential Revision: https://reviews.llvm.org/D103878
Jon Roelofs [Wed, 9 Jun 2021 23:36:38 +0000 (16:36 -0700)]
Annotate memcpy's of globals with info about the src/dst
Differential revision: https://reviews.llvm.org/D103994
Justin Lebar [Wed, 9 Jun 2021 23:57:22 +0000 (16:57 -0700)]
Save/restore OuterTemplateParams in AbstractManglingParser::parseEncoding.
Previously we were only saving plain TemplateParams.
Differential Revision: https://reviews.llvm.org/D103996
Nico Weber [Thu, 10 Jun 2021 00:27:55 +0000 (20:27 -0400)]
[lld/mac] Make framework symlinks in tests more realistic
In a framework Foo.framework, Foo.framework/Foo is usually a relative
symbolic link to Foo.framework/Versions/Current/Foo,
and Foo.framework/Versions/Current is usually a relative symbolic
link to A.
Our tests used absolute symbolic links. Now they use relative symbolic links.
No behavior change, just makes the tests more representative of the real world.
(implicit-dylib.s omits the "Current" folder too, but I'm not changing that
here.)
Differential Revision: https://reviews.llvm.org/D103998
Nico Weber [Wed, 9 Jun 2021 20:09:44 +0000 (16:09 -0400)]
[lld/mac] When handling @loader_path, use realpath() of symlinks
This is important for Frameworks, which are usually symlinks.
ld64 gets this right for @rpath that's replaced with @loader_path, but not for
bare @loader_path -- ld64's code calls realpath() in that case too, but ignores
the result.
ld64 somehow manages to find libbar1.dylib in the test without the
explicit `-rpath` in Foo1. I don't understand why or how. But this
change is a step forward and fixes an immediate problem I'm having,
so let's start with this :)
Differential Revision: https://reviews.llvm.org/D103990
Amy Huang [Wed, 9 Jun 2021 23:11:27 +0000 (16:11 -0700)]
Fix to Windows temp file change.
Original change passed wrong parameters to the raw_fd_ostream ctor.
Fixes a bug in https://reviews.llvm.org/D102736.
Ahmed Taei [Wed, 9 Jun 2021 19:04:38 +0000 (12:04 -0700)]
Folds linalg.pad_tensor with zero padding
Differential Revision: https://reviews.llvm.org/D103984
Craig Topper [Wed, 9 Jun 2021 22:07:27 +0000 (15:07 -0700)]
[RISCV] Remove unused method from RISCVInsertVSETVLI. NFC
If this becomes needed its trivial to add it back.
Philip Reames [Mon, 7 Jun 2021 23:20:25 +0000 (16:20 -0700)]
[tests] Precommit test for D103991
Eric Astor [Wed, 9 Jun 2021 20:05:12 +0000 (16:05 -0400)]
[ms] [llvm-ml] Add support for INCLUDE environment variable
Also adds support for the ML.exe command-line flag /X, which ignores the INCLUDE environment variable.
This relands commit
c43f413b01b021a8f7b6fce013296114fa92a245 using lit's cross-platform `env` support.
Differential Revision: https://reviews.llvm.org/D103989
Mehdi Amini [Tue, 8 Jun 2021 18:28:39 +0000 (18:28 +0000)]
Add a static assertions for custom Op<> to not defined data members (NFC)
A common mistake for newcomers to MLIR is to try to store extra member
on the Op class. However these are intended to be thing wrapper around
an Operation*, all the storage is meant to be encoded in attribute on
the underlying Operation. This can be confusing to debug, so better
catch it at build time.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D103869
Philip Reames [Wed, 9 Jun 2021 21:17:06 +0000 (14:17 -0700)]
[SCEV] Minor code motion to simplify a later patch [nfc]
Cyndy Ishida [Wed, 9 Jun 2021 20:46:12 +0000 (13:46 -0700)]
Revert "Reland "[llvm] llvm-tapi-diff""
This reverts commit
20126c9fd4afe2fe11510becccaa769332da302f.
The sorting fixes failed to have stable output on different platforms.
Cyndy Ishida [Wed, 9 Jun 2021 20:45:13 +0000 (13:45 -0700)]
Revert "[llvm-tapi-diff] Apply stable sorting to output"
This reverts commit
90a26a41e9ce16a4d471d25c2f7b36b5538fb4ce.
This failed to fix ubuntu failures.
Kevin Athey [Wed, 9 Jun 2021 14:26:38 +0000 (07:26 -0700)]
Cleanup for final comment on https://reviews.llvm.org/D103304
Consolidate DEFINE_STACK_MALLOC to simplify.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D103965
Felix Berger [Mon, 24 May 2021 13:14:59 +0000 (09:14 -0400)]
[clang-tidy] performance-unnecessary-copy-initialization: Look at the canonical type when checking for aliases.
This fixes a false positive case where for instance a pointer is obtained and declared using `auto`.
Differential Revision: https://reviews.llvm.org/D103018
Reviewed-by: ymandel
Michael Kruse [Sun, 6 Jun 2021 11:26:24 +0000 (06:26 -0500)]
[Polly][Matmul] Re-pack A in every iteration.
Packed_A must be copied repeatedly, not just for the first iteration of
the outer tile.
This fixes llvm.org/PR50557
Joseph Huber [Wed, 9 Jun 2021 18:43:59 +0000 (14:43 -0400)]
[Attributor] Set floating point loads and stores as nofree in AANoFreeFloating
Summary:
The current implementation of AANoFreeFloating will incorrectly list floating
point loads and stores as may-free. This prevents other attributor instances
like HeapToStack from pushing some allocations to the stack.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D103975
Joseph Huber [Wed, 9 Jun 2021 18:32:56 +0000 (14:32 -0400)]
[OpenMP][NFC] Precommit change to hide_mem_transfer_latency test flags
Sam Powell [Wed, 9 Jun 2021 20:06:32 +0000 (13:06 -0700)]
[llvm-tapi-diff] Apply stable sorting to output
* For the output, the attributes within the target slice should be
grouped by the input order, then sorted by value ordering.
This is to fix current ubuntu buildbot inconsistences.
Leonard Chan [Mon, 7 Jun 2021 21:27:07 +0000 (14:27 -0700)]
[compiler-rt][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature
This allows for using the frame record feature (which uses __hwasan_tls)
independently from however the user wants to access the shadow base, which
prior was only usable if shadow wasn't accessed through the TLS variable or ifuncs.
Frame recording can be explicitly set according to ShadowMapping::WithFrameRecord
in ShadowMapping::init. Currently, it is only enabled on Fuchsia and if TLS is
used, so this should mimic the old behavior.
Added an extra case to prologue.ll that covers this new case.
Differential Revision: https://reviews.llvm.org/D103841
Felix Berger [Mon, 10 May 2021 15:26:00 +0000 (11:26 -0400)]
[clang-tidy] performance-unnecessary-copy-initialization: Remove the complete statement when the copied variable is unused.
It is not useful to keep the statement around and can lead to compiler
warnings when -Wall (-Wunused-variable specifically) turned on.
Differential Revision: https://reviews.llvm.org/D102175
Reviewed-by: ymandel
Eric Astor [Wed, 9 Jun 2021 19:49:51 +0000 (15:49 -0400)]
Revert "[ms] [llvm-ml] Add support for INCLUDE environment variable"
This reverts commit
c43f413b01b021a8f7b6fce013296114fa92a245 due to Windows environment build breaks
Eric Astor [Wed, 9 Jun 2021 18:41:24 +0000 (14:41 -0400)]
[ms] [llvm-ml] Add support for INCLUDE environment variable
Also adds support for the ML.exe command-line flag /X, which ignores the INCLUDE environment variable.
Arthur Eubanks [Wed, 9 Jun 2021 18:46:10 +0000 (11:46 -0700)]
Revert "[InstSimplify] Treat invariant group insts as bitcasts for load operands"
This reverts commit
26044c6a54de3e03c73c5515702b95acdb0b7f22.
Breaks on invalid IR (see D101103).
Mark de Wever [Sun, 6 Jun 2021 11:44:10 +0000 (13:44 +0200)]
[libc++][nfc] Test std::unique_ptr self move assignment.
The post-conditions for the self move assignment of `std::unique_ptr`
were changed. This requires no implementation changes. A test was added
to validate the new post-conditions.
Addresses
- LWG-3455: Incorrect Postconditions on `unique_ptr` move assignment
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D103764
madhur13490 [Wed, 9 Jun 2021 17:42:35 +0000 (23:12 +0530)]
[LangRef] Add link to opaque pointers
Reviewed By: aeubanks
Differential Revision: https://reviews.llvm.org/D103981
Nathan Sidwell [Fri, 14 May 2021 11:24:28 +0000 (04:24 -0700)]
[docs] Collate CMake options
I found the documentation of the various CMake variables difficult to
navigate, because they are unsorted. I can see they've grown
organically with new clusters of somewhat-related options, but the
result is hard to use. This collates them (treating '_' as space).
Differential Revision: https://reviews.llvm.org/D102481
Rob Suderman [Wed, 9 Jun 2021 18:05:32 +0000 (11:05 -0700)]
[mlir][tosa] Update tosa.matmul lowering to linalg.batch_matmul
tosa.matmul is a batched matmul, update the lowering for linalg
with the tests.
Reviewed By: sjarus
Differential Revision: https://reviews.llvm.org/D103937
Lei Zhang [Wed, 9 Jun 2021 17:58:13 +0000 (13:58 -0400)]
[mlir][spirv] Use SingleBlock + NoTerminator for spv.module
This allows us to remove the `spv.mlir.endmodule` op and
all the code associated with it.
Along the way, tightened the APIs for `spv.module` a bit
by removing some aliases. Now we use `getRegion` to get
the only region, and `getBody` to get the region's only
block.
Reviewed By: mravishankar, hanchung
Differential Revision: https://reviews.llvm.org/D103265
Hongtao Yu [Tue, 8 Jun 2021 16:35:28 +0000 (09:35 -0700)]
[CSSPGO] Emit mangled dwarf names for line tables debug option under -fpseudo-probe-for-profiling
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D103909
Aaron Ballman [Wed, 9 Jun 2021 17:37:51 +0000 (13:37 -0400)]
Corrects some minor issues with the CXX status page.
1) Adds some </p> tags where they were missing.
2) Documents that C++14 is the current default language mode, not C++98
Sam Powell [Wed, 9 Jun 2021 17:29:29 +0000 (10:29 -0700)]
Reland "[llvm] llvm-tapi-diff"
This is relanding commit
d1d36f7ad2ae82bea8a6fcc40d6c42a72e21f096 .
This patch additionally addresses failures found in buildbots & post review comments.
This patch introduces a new tool, llvm-tapi-diff, that compares and returns the diff of two TBD files.
Reviewed By: ributzka, JDevlieghere
Differential Revision: https://reviews.llvm.org/D101835
Eric Astor [Wed, 9 Jun 2021 17:34:18 +0000 (13:34 -0400)]
[ms] [llvm-ml] Fix parity errors in error handling for INCLUDE directive
Also adds basic testing for "include" directive.
Differential Revision: https://reviews.llvm.org/D103980
Nico Weber [Wed, 9 Jun 2021 17:21:05 +0000 (13:21 -0400)]
Revert "Do not generate calls to the 128-bit function __multi3() on 32-bit ARM"
This reverts commit
64e9aa33020d68a98c30bf05362ffc1c1778890c.
Breaks check-llvm everywhere, see https://reviews.llvm.org/D103906
Louis Dionne [Wed, 9 Jun 2021 13:41:27 +0000 (09:41 -0400)]
[libc++] Fix libc++ build with assertions enabled
This fixes http://llvm.org/PR50534. This is another take on D103960
which is less disruptive.
Differential Revision: https://reviews.llvm.org/D103964
Jonas Devlieghere [Wed, 9 Jun 2021 16:25:29 +0000 (09:25 -0700)]
[lldb] Use C++11 default member initializers
This converts a default constructor's member initializers into C++11
default member initializers. This patch was automatically generated with
clang-tidy and the modernize-use-default-member-init check.
$ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-default-member-init' -fix
This is a mass-refactoring patch and this commit will be added to
.git-blame-ignore-revs.
Differential revision: https://reviews.llvm.org/D103483
thomasraoux [Tue, 8 Jun 2021 05:25:30 +0000 (22:25 -0700)]
[mlir][gpu][NFC] Simplify conversion of MMA type to NVVM
Consolidate the type conversion in a single function to make it simpler
to use. This allow to re-use the type conversion for up coming ops.
Differential Revision: https://reviews.llvm.org/D103868
Florian Hahn [Wed, 9 Jun 2021 10:06:21 +0000 (11:06 +0100)]
[SCEV] Keep common NUW flags when inlining Add operands.
Currently, NoWrapFlags are dropped if we inline operands of SCEVAddExpr
operands. As a consequence, we always drop flags when building
expressions like `getAddExpr(A, getAddExpr(B, C, NUW), NUW)`.
We should be able to retain NUW flags common among all inlined
SCEVAddExpr and the original flags.
Reviewed By: nikic, mkazantsev
Differential Revision: https://reviews.llvm.org/D103877
Pavel Krajcevski [Wed, 9 Jun 2021 16:07:56 +0000 (16:07 +0000)]
Fix typo in Toy tutorial Ch1
This aligns the website with the actual test case in the repo.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D84193