Paul C. Anagnostopoulos [Wed, 21 Oct 2020 15:58:06 +0000 (11:58 -0400)]
[Clang] [TableGen] Clean up !if(!eq(bool, 1) and related booleans
Differential Revision: https://reviews.llvm.org/D89893
Simon Pilgrim [Thu, 22 Oct 2020 13:27:19 +0000 (14:27 +0100)]
[CodeGen] Split MVT::changeTypeToInteger() functionality from EVT::changeTypeToInteger().
Add the MVT equivalent handling for EVT changeTypeToInteger/changeVectorElementType/changeVectorElementTypeToInteger.
All the SimpleVT code already exists inside the EVT equivalents, but by splitting this out we can use these directly inside MVT types without converting to/from EVT.
Evgeny Leviant [Thu, 22 Oct 2020 13:21:40 +0000 (16:21 +0300)]
[llvm-mca] Add few ldm* instructions to cortex-a57 test case
Alexander Belyaev [Thu, 22 Oct 2020 12:48:52 +0000 (14:48 +0200)]
[mlir] Add MemRefReinterpretCastOp definition to Standard.
Reuse most code for printing/parsing/verification from SubViewOp.
https://llvm.discourse.group/t/rfc-standard-memref-cast-ops/1454/15
Differential Revision: https://https://reviews.llvm.org/D89720
Raphael Isemann [Thu, 22 Oct 2020 11:50:22 +0000 (13:50 +0200)]
[lldb][NFC] Make GetShellSafeArgument return std::string and unittest it.
Florian Hahn [Thu, 22 Oct 2020 10:47:43 +0000 (11:47 +0100)]
[AArch64] Add cost model tests for min/max intrinsics.
Jeremy Morse [Thu, 22 Oct 2020 12:18:55 +0000 (13:18 +0100)]
Test I added requires X86 to be built.
This the second time I've stepped on this landmine, I'll look at setting
a lit local config. All the tests in this dir are going to be X86 for now.
Jeremy Morse [Thu, 22 Oct 2020 11:48:57 +0000 (12:48 +0100)]
[DebugInstrRef] Substitute debug value numbers to handle optimizations
This patch touches two optimizations, TwoAddressInstruction and X86's
FixupLEAs pass, both of which optimize by re-creating instructions. For
LEAs, various bits of arithmetic are better represented as LEAs on X86,
while TwoAddressInstruction sometimes converts instrs into three address
instructions if it's profitable.
For debug instruction referencing, both of these require substitutions to
be created -- the old instruction number must be pointed to the new
instruction number, as illustrated in the added test. If this isn't done,
any variable locations based on the optimized instruction are
conservatively dropped.
Differential Revision: https://reviews.llvm.org/D85756
David Zarzycki [Thu, 22 Oct 2020 11:50:00 +0000 (07:50 -0400)]
[x86 testing] NFC: Create exhaustive vector popcnt ULT/UGT tests
There are bunch of optimization opportunities right now in the vector
popcnt code gen when doing simple less-than/greater-than comparisons, so
let's examine them all to ensure that things don't regress as different
scenarios are fixed. We can always delete some later once some fixes are
made.
Please note: the new files were auto-generated. If people want, I can
commit the short C code that printed out the various combinations.
Alexander Kornienko [Thu, 22 Oct 2020 11:30:30 +0000 (13:30 +0200)]
[clang-tidy] Add links to check docs in comments
Alexander Belyaev [Wed, 21 Oct 2020 19:05:06 +0000 (21:05 +0200)]
[mlir] Add MemRefReshapeOp definition to Standard.
https://llvm.discourse.group/t/rfc-standard-memref-cast-ops/1454/15
Differential Revision: https://reviews.llvm.org/D89784
Max Kazantsev [Thu, 22 Oct 2020 10:29:15 +0000 (17:29 +0700)]
[SCEV][NFC] Simplify internals of BackedgeTakenInfo
Luís Marques [Thu, 22 Oct 2020 10:34:03 +0000 (11:34 +0100)]
[RISCV][NFC] Add more tests for 32-bit constant materialization
The existing tests were mostly for 64-bit constants.
Differential Revision: https://reviews.llvm.org/D83210
LLVM GN Syncbot [Thu, 22 Oct 2020 09:39:53 +0000 (09:39 +0000)]
[gn build] Port
be39a6fe6fc
Max Kazantsev [Thu, 22 Oct 2020 09:25:16 +0000 (16:25 +0700)]
[SCEV][NFC] Rename MaxAndComplete -> ConstantMaxAndComplete
This better reflects what this variable is about.
Tianqing Wang [Thu, 22 Oct 2020 08:46:07 +0000 (16:46 +0800)]
[X86] Add User Interrupts(UINTR) instructions
For more details about these instructions, please refer to the latest
ISE document:
https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D89301
Evgeny Leviant [Thu, 22 Oct 2020 09:08:08 +0000 (12:08 +0300)]
[llvm-mca] Improve test case
Mikhail Goncharov [Fri, 9 Oct 2020 10:23:48 +0000 (12:23 +0200)]
[libc++] Update continous integration scripts
Now libc++ pipeline will be triggered from the "premerge-checks" and the
combined result are going to be returned to Harbormaster.
Reviewed-by: ldionne
Differential Revision: https://reviews.llvm.org/D89113
Max Kazantsev [Thu, 22 Oct 2020 08:12:54 +0000 (15:12 +0700)]
[SCEV][NFC] Rename getMax -> getConstantMax
This better reflects what this logic actually does.
Max Kazantsev [Thu, 22 Oct 2020 07:57:36 +0000 (14:57 +0700)]
Revert "[DWARFLinker] Capitalize type names (NFC)"
This reverts commit
3fce5ea7ce663410d3fb533528158bdab3a3604e.
`make check` broken.
Sjoerd Meijer [Wed, 21 Oct 2020 10:06:10 +0000 (11:06 +0100)]
[InstructionSimplify] icmp (X+Y), (X+Z) simplification
This improves simplifications for pattern `icmp (X+Y), (X+Z)` -> `icmp Y,Z`
if only one of the operands has NSW set, e.g.:
icmp slt (x + 0), (x +nsw 1)
We can still safely rewrite this to:
icmp slt 0, 1
because we know that the LHS can't overflow if the RHS has NSW set and
C1 < C2 && C1 >= 0, or C2 < C1 && C1 <= 0
This simplification is useful because ScalarEvolutionExpander which is used to
generate code for SCEVs in different loop optimisers is not always able to put
back NSW flags across control-flow, thus inhibiting CFG simplifications.
Differential Revision: https://reviews.llvm.org/D89317
Fangrui Song [Thu, 22 Oct 2020 06:44:45 +0000 (23:44 -0700)]
[ShrinkWrap] Delete unneeded nullptr checks for the save point. NFC
findNearestCommonDominator never returns nullptr.
Jonas Devlieghere [Thu, 22 Oct 2020 07:13:53 +0000 (00:13 -0700)]
[DWARFLinker] Capitalize type names (NFC)
Make these types conform to the LLVM Coding Standards:
> Type names (including classes, structs, enums, typedefs, etc) should
> be nouns and start with an upper-case letter.
Alex Lorenz [Thu, 22 Oct 2020 05:43:10 +0000 (22:43 -0700)]
[driver][arm64] Set target CPU to A12 for compiler invocations that
target Apple Silicon macOS machines
Differential Revision: https://reviews.llvm.org/D82699
Martin Storsjö [Wed, 21 Oct 2020 10:42:48 +0000 (13:42 +0300)]
[libcxx] [test] Move use of statvfs to helper header
Implement the corresponding thing using windows functions as well.
Differential Revision: https://reviews.llvm.org/D89864
Martin Storsjö [Wed, 21 Oct 2020 07:37:59 +0000 (10:37 +0300)]
[libcxx] [test] Mark bits of fs.enum tests as libcpp specific
The individual enum values in copy_options and file_type aren't
specified in the standard.
The standard doesn't require fs::path::format to be a scoped enum.
Differential Revision: https://reviews.llvm.org/D89866
Martin Storsjö [Wed, 21 Oct 2020 08:44:51 +0000 (11:44 +0300)]
[libcxx] [test] Add another (void) cast for a function marked nodiscard in MS STL
Differential Revision: https://reviews.llvm.org/D89867
Martin Storsjö [Wed, 21 Oct 2020 06:11:31 +0000 (09:11 +0300)]
[libcxxabi] Define _LIBCXXABI_WEAK properly for mingw compilers
Copy over the compiler detection structure from libcxx, and set
_LIBCXXABI_WEAK like _LIBCPP_WEAK is set in libcxx.
This allows users to override operator new/delete, if using those
operators from libcxxabi instead of from libcxx.
Differential Revision: https://reviews.llvm.org/D89863
Tony [Wed, 21 Oct 2020 13:30:02 +0000 (13:30 +0000)]
[NFC][AMDGPU] Reorder SIMemoryLegalizer functions to be consistent
- Make the SIMemoryLegalizer insertAcquire function be in the same
order for each target to be consistent.
Differential Revision: https://reviews.llvm.org/D89880
Douglas Yung [Thu, 22 Oct 2020 04:57:59 +0000 (21:57 -0700)]
Revert "Add "not" to an llvm-symbolizer test that expects to fail"
A recent commit to revert llvm-symbolizer changes forgot to revert this test fix.
This reverts commit
5e656ee48bccc73f1328db1770770acaec90a7c9.
Arthur Eubanks [Thu, 22 Oct 2020 04:52:27 +0000 (21:52 -0700)]
[test] Fix tests using -analyze that fail under NPM
Many of these tests don't use the output of -analyze.
Serguei Katkov [Tue, 20 Oct 2020 06:28:20 +0000 (13:28 +0700)]
[IRCE] consolidate profitability check
Use BFI if it is available and BPI otherwise.
This is a promised follow-up after D89541.
Reviewers: ebrevnov, mkazantsev
Reviewed By: ebrevnov
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D89773
Arthur Eubanks [Thu, 22 Oct 2020 04:19:02 +0000 (21:19 -0700)]
[test] Fix shrunk-constant.ll under NPM
Vy Nguyen [Sat, 17 Oct 2020 06:24:10 +0000 (02:24 -0400)]
Do not intercept __libc_memalign and cfree on Android because neither of these exists in Bionic.
Differential Revision: https://reviews.llvm.org/D89616
Arthur Eubanks [Thu, 22 Oct 2020 03:17:12 +0000 (20:17 -0700)]
[NPM][opt] Disallow -analyze under NPM
-analyze does not work with the NPM.
'print<foo>' passes should be used instead.
Richard Smith [Thu, 22 Oct 2020 03:02:07 +0000 (20:02 -0700)]
Fix test failure on Windows.
Teresa Johnson [Sat, 17 Oct 2020 17:40:03 +0000 (10:40 -0700)]
[sanitizer] Allow log_path to distinguish default from explicit stderr
Split out of D89086 as suggested.
Change the default of the log_path flag to nullptr, and the code
consuming that flag (ReportFile::SetReportPath), to treat nullptr as
stderr (so no change to the behavior of existing users). This allows
code to distinguish between the log_path being specified explicitly as
stderr vs the default.
This is so the flag can be used to override the new report path variable
that will be encoded in the binary for memprof for runtime testing.
Differential Revision: https://reviews.llvm.org/D89629
Xiang1 Zhang [Thu, 22 Oct 2020 01:46:42 +0000 (09:46 +0800)]
[X86] Support customizing stack protector guard
Reviewed By: nickdesaulniers, MaskRay
Differential Revision: https://reviews.llvm.org/D88631
Arthur Eubanks [Thu, 22 Oct 2020 02:05:01 +0000 (19:05 -0700)]
[test] Fix LoopDistribute tests under NPM
Chen Zheng [Thu, 22 Oct 2020 01:53:55 +0000 (21:53 -0400)]
[LSR] add testcase for LSR profitable chain change, nfc
Richard Smith [Thu, 22 Oct 2020 01:50:43 +0000 (18:50 -0700)]
Ensure that the "value" of an unnamed bit-field isn't taken into
account when determining the identity of a class NTTP.
Arthur Eubanks [Thu, 22 Oct 2020 01:31:06 +0000 (18:31 -0700)]
[test] Fix LoopDeletion tests under NPM
Craig Topper [Wed, 21 Oct 2020 23:45:23 +0000 (16:45 -0700)]
[FPEnv][X86][SystemZ] Use different algorithms for i64->double uint_to_fp under strictfp to avoid producing -0.0 when rounding toward negative infinity
Some of our conversion algorithms produce -0.0 when converting unsigned i64 to double when the rounding mode is round toward negative. This switches them to other algorithms that don't have this problem. Since it is undefined behavior to change rounding mode with the non-strict nodes, this patch only changes the behavior for strict nodes.
There are still problems with unsigned i32 conversions too which I'll try to fix in another patch.
Fixes part of PR47393
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D87115
Richard Smith [Thu, 22 Oct 2020 01:04:04 +0000 (18:04 -0700)]
Make APValue profiling a little more compact.
Vy Nguyen [Wed, 21 Oct 2020 19:07:52 +0000 (12:07 -0700)]
[sanitizer]Update tests to be compatible with Android.
Split off from D89251
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D89884
Zequan Wu [Thu, 22 Oct 2020 00:08:56 +0000 (17:08 -0700)]
Revert "Revert "SimplifyCFG: Clean up optforfuzzing implementation""
This reverts commit
716f7636e1ec7880a6d2f2205f54f65191cf8f9a.
Zequan Wu [Wed, 21 Oct 2020 23:56:32 +0000 (16:56 -0700)]
Revert "SimplifyCFG: Clean up optforfuzzing implementation"
See discussion: https://reviews.llvm.org/D89590
This reverts commit
cdd006eec9409923f9a56b9026ce2cb72e7b71dc.
Gaurav Jain [Wed, 21 Oct 2020 08:15:13 +0000 (01:15 -0700)]
[NFC] Set return type of getStackPointerRegisterToSaveRestore to Register
Differential Revision: https://reviews.llvm.org/D89858
David Blaikie [Wed, 21 Oct 2020 22:16:14 +0000 (15:16 -0700)]
Revert several changes related to llvm-symbolizer exiting non-zero on failure.
Seems users have enough different uses of the symbolizer where they
might have unknown binaries and offsets such that "best effort" behavior
is all that's expected of llvm-symbolizer - so even erroring on unknown
executables and out of bounds offsets might not be suitable.
This reverts commit
1de0199748ef2a20cd146c100ea1b8e6726c4767.
This reverts commit
a7b209a6d40d77b43a38664b1fe64513587f24c6.
This reverts commit
338dd138ea4a70b52ab48e0c8aa38ec152b3569a.
Quentin Colombet [Tue, 20 Oct 2020 21:43:25 +0000 (14:43 -0700)]
[ValueTracking] Interpret GEPs as a series of adds multiplied by the related scaling factor
Prior to this patch, computeKnownBits would only try to deduce trailing zeros
bits for getelementptrs. This patch adds the logic to treat geps as a series
of add * scaling factor.
Thanks to this patch, using a gep or performing an address computation
directly "by hand" (ptrtoint followed by adds and mul followed by inttoptr)
offers the same computeKnownBits information.
Previously, the "by hand" approach would have given more information.
This is related to https://llvm.org/PR47241.
Differential Revision: https://reviews.llvm.org/D86364
Richard Smith [Mon, 14 Sep 2020 03:15:46 +0000 (20:15 -0700)]
[c++20] For P0732R2: permit class template argument deduction for non-type template parameters.
Louis Dionne [Wed, 21 Oct 2020 21:55:35 +0000 (17:55 -0400)]
[libc++] Fix the benchmarks build
Louis Dionne [Wed, 21 Oct 2020 17:57:05 +0000 (13:57 -0400)]
[libc++][ci] Also install the library in the CI scripts
It's good to run the installation step to make sure it works properly,
as build system changes can break that.
rdzhabarov [Tue, 20 Oct 2020 04:51:41 +0000 (04:51 +0000)]
[mlir] Simplify DDR matching patterns with equal operands for operators where it's applicable. Added documentation.
This https://reviews.llvm.org/D89254 diff introduced implicit matching between same name operands.
Differential Revision: https://reviews.llvm.org/D89598
Felix Berger [Tue, 13 Oct 2020 17:32:53 +0000 (13:32 -0400)]
Always allow std::function to be copied.
Since its call operator is const but can modify the state of its underlying
functor we cannot tell whether the copy is necessary or not.
This avoids false positives.
Reviewed-by: aaron.ballman, gribozavr2
Differential Revision: https://reviews.llvm.org/D89332
Richard Smith [Mon, 14 Sep 2020 02:38:32 +0000 (19:38 -0700)]
[c++20] For P0732R2: Give class NTTPs the proper type when examined with 'decltype'.
This requires that we track enough information to determine the original
type of the parameter in a substituted non-type template parameter, to
distinguish the reference-to-class case from the class case.
Joseph Huber [Wed, 21 Oct 2020 13:55:21 +0000 (09:55 -0400)]
[OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts
The changes made in D88594 caused the test OpenMP/driver.c to fail on a 32-bit host becuase it was offloading to a 64-bit architecture by default. The offloading test was moved to a new file and a feature was added to the lit config to check for a 64-bit host.
Reviewed By: daltenty
Differential Revision: https://reviews.llvm.org/D89904
Louis Dionne [Wed, 21 Oct 2020 20:52:21 +0000 (16:52 -0400)]
[libc++] Fix compiler-rt build by copying libc++ headers to <build>/include
This commit should really be named "Workaround external projects depending
on libc++ build system implementation details". It seems that the compiler-rt
build (and perhaps other projects) is relying on the fact that we copy libc++
and libc++abi headers to `<build-root>/include/c++/v1`. This was changed
by
5d796645, which moved the headers to `<build-root>/projects/libcxx/include/c++/v1`
and broke the compiler-rt build.
I'm committing this workaround to fix the compiler-rt build, but we should
remove reliance on implementation details like that. The correct way to
setup the compiler-rt build would be to "link" against the `cxx-headers`
target in CMake, or to run `install-cxx-headers` using an appropriate
installation prefix, and then manually add a `-I` path to that location.
Thomas Raoux [Wed, 21 Oct 2020 20:42:29 +0000 (13:42 -0700)]
[spirv] Fix legalize standard to spir-v for transfer ops
Forward missing attributes when creating the new transfer op otherwise the
builder would use default values.
Differential Revision: https://reviews.llvm.org/D89907
Sriraman Tallam [Wed, 21 Oct 2020 20:38:55 +0000 (13:38 -0700)]
Simple fix to basic-block-sections to replace emit-obj with emit-llvm
emit-obj is unnecessary here and further wasn't redirected to /dev/null.
Arthur Eubanks [Wed, 21 Oct 2020 20:33:01 +0000 (13:33 -0700)]
[test] Fix quadradic-exit-value.ll under NPM
Arthur Eubanks [Wed, 21 Oct 2020 20:30:45 +0000 (13:30 -0700)]
[test] Fix alloca-offset-lifetime.ll under NPM
Lei Zhang [Wed, 21 Oct 2020 20:22:41 +0000 (16:22 -0400)]
[mlir] Add missing dependency for MLIRSCFTransforms
MLIRTransforms is needed to provide BufferizeTypeConverter
definitions.
Richard Smith [Wed, 21 Oct 2020 19:59:08 +0000 (12:59 -0700)]
Add more test coverage for APValue serialization / deserialization and
fix a few exposed bugs.
Richard Smith [Mon, 21 Sep 2020 06:16:08 +0000 (23:16 -0700)]
[c++20] For P0732R2 / P1907R1: Basic frontend support for class types as
non-type template parameters.
Create a unique TemplateParamObjectDecl instance for each such value,
representing the globally unique template parameter object to which the
template parameter refers.
No IR generation support yet; that will follow in a separate patch.
Arthur Eubanks [Wed, 21 Oct 2020 20:14:44 +0000 (13:14 -0700)]
[test] Fix no-wrap-symbolic-becount.ll under NPM
Hafiz Abid Qadeer [Wed, 21 Oct 2020 19:56:24 +0000 (20:56 +0100)]
[libcxxabi] Stub out 'sleep' call when _LIBCXXABI_HAS_NO_THREADS is defined.
While running this test on a bare metal target, I got an error as 'sleep' was not available on that system. As 'sleep' call is not doing anything useful for cases when _LIBCXXABI_HAS_NO_THREADS is defined. This patch puts it under this check.
Reviewed By: ldionne
Differential Revision: https://reviews.llvm.org/D89871
Arthur Eubanks [Wed, 7 Oct 2020 22:15:09 +0000 (15:15 -0700)]
[BlockExtract][NewPM] Port -extract-blocks to NPM
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D89015
Teresa Johnson [Sat, 17 Oct 2020 17:46:19 +0000 (10:46 -0700)]
[sanitizer] Convert PrintModuleMap to DumpProcessMap
As discussed in the review for D87120 (specifically at
https://reviews.llvm.org/D87120#inline-831939), clean up PrintModuleMap
and DumpProcessMap usage differences. The former is only implemented for
Mac OSX, whereas the latter is implemented for all OSes. The former is
called by asan and tsan, and the latter by hwasan and now memprof, under
the same option. Simply rename the PrintModuleMap implementation for Mac
to DumpProcessMap, remove other empty PrintModuleMap implementations,
and convert asan/tsan to new name. The existing posix DumpProcessMap is
disabled for SANITIZER_MAC.
Differential Revision: https://reviews.llvm.org/D89630
Arthur Eubanks [Sat, 10 Oct 2020 00:58:27 +0000 (17:58 -0700)]
[LowerMatrixIntrinsics][NewPM] Fix PreservedAnalyses result
PreservedCFGCheckerInstrumentation was saying that LowerMatrixIntrinsics
didn't properly preserve CFG even though it claimed to. The legacy pass
says it doesn't. Match the legacy pass's preserved analyses.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D89175
Artur Pilipenko [Fri, 2 Oct 2020 03:01:39 +0000 (20:01 -0700)]
[RS4GC] NFC. Preparatory refactoring to make GC parseable memcpy
For GC parseable element atomic memcpy/memmove we'll need to
shuffle statepoint arguments. Make it possible by storing the
arguments as Value *, not Use *.
Mark de Wever [Wed, 21 Oct 2020 19:19:04 +0000 (21:19 +0200)]
[NFC] Fixes Doxygen copy-paste error.
Stella Laurenzo [Wed, 21 Oct 2020 06:20:04 +0000 (23:20 -0700)]
[mlir][CAPI][Python] Plumb OpPrintingFlags to C and Python APIs.
* Adds a new MlirOpPrintingFlags type and supporting accessors.
* Adds a new mlirOperationPrintWithFlags function.
* Adds a full featured python Operation.print method with all options and the ability to print directly to files/stdout in text or binary.
* Adds an Operation.get_asm which delegates to print and returns a str or bytes.
* Reworks Operation.__str__ to be based on get_asm.
Differential Revision: https://reviews.llvm.org/D89848
Sean Silva [Mon, 19 Oct 2020 22:59:03 +0000 (15:59 -0700)]
[mlir][shape] Split out structural type conversions for shape dialect.
A "structural" type conversion is one where the underlying ops are
completely agnostic to the actual types involved and simply need to update
their types. An example of this is shape.assuming -- the shape.assuming op
and the corresponding shape.assuming_yield op need to update their types
accordingly to the TypeConverter, but otherwise don't care what type
conversions are happening.
Also, the previous conversion code would not correctly materialize
conversions for the shape.assuming_yield op. This should have caused a
verification failure, but shape.assuming's verifier wasn't calling
RegionBranchOpInterface::verifyTypes (which for reasons can't be called
automatically as part of the trait verification, and requires being
called manually). This patch also adds that verification.
Differential Revision: https://reviews.llvm.org/D89833
Sean Silva [Fri, 16 Oct 2020 03:17:25 +0000 (20:17 -0700)]
[mlir] Add structural type conversions for SCF dialect.
A "structural" type conversion is one where the underlying ops are
completely agnostic to the actual types involved and simply need to update
their types. An example of this is scf.if -- the scf.if op and the
corresponding scf.yield ops need to update their types accordingly to the
TypeConverter, but otherwise don't care what type conversions are happening.
To test the structural type conversions, it is convenient to define a
bufferize pass for a dialect, which exercises them nicely.
Differential Revision: https://reviews.llvm.org/D89757
Sanjay Patel [Wed, 21 Oct 2020 18:19:52 +0000 (14:19 -0400)]
[CostModel] remove cost-kind predicate for scatter/gather cost
This is similar in spirit to
01ea93d85d6e (memcpy) except that
here the underlying caller assumptions were created for vectorizer
use (throughput) rather than other passes.
That meant ARM could have an enormous throughput cost with no
corresponding size, latency, or blended cost increase. X86 has
the same throughput restriction as the basic implementation, so
it is still unchanged.
Paraphrasing from the previous commit:
This may not make sense for some callers, but at least now the
costs will be consistently wrong instead of mysteriously wrong.
Targets should provide better overrides if the current modeling
is not accurate.
Sanjay Patel [Wed, 21 Oct 2020 18:10:14 +0000 (14:10 -0400)]
[ARM] add cost-kind tests for intrinsics; NFC
This is a copy of the x86 file to provide better coverage;
x86 may have strange overrides that mask changes in the
generic model.
Saiyedul Islam [Wed, 21 Oct 2020 18:20:16 +0000 (18:20 +0000)]
[NFC][OpenMP] Update description of OMPGridValues enums
Update comments describing how OMPGridValues enums will be used in
clang, deviceRTLs, and hsa and cuda plugins.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D86232
Nico Weber [Wed, 21 Oct 2020 18:11:16 +0000 (14:11 -0400)]
[gn build] try to fix clang build after
37c030f81a9fdd
37c030f81a9fdd made it so that depending on //libcxx/include
automatically added the copied header dir to the include search path.
For some reason, clang can't build against the copied libcxx headers
(it complains about ldiv_t not being a type). I don't have a mac
to debug right now, but for the clang target this change was
unintentional anyways -- only depend on the copies target, instead
of on the target that also adjusts the include path.
Arthur Eubanks [Thu, 8 Oct 2020 02:35:39 +0000 (19:35 -0700)]
[NFC] Clean up always false variables
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D89023
Jon Chesterfield [Wed, 21 Oct 2020 17:52:53 +0000 (18:52 +0100)]
[libomptarget] Require LLVM source tree to build libomptarget
[libomptarget] Require LLVM source tree to build libomptarget
This is to permit reliably #including files from the LLVM tree in libomptarget,
as an improvement on the copy and paste that is currently in use. See D87841
for the first example of removing duplication given this new requirement.
The weekly openmp dev call reached consensus on this approach. See also D87841
for some alternatives that were considered. In the future, we may want to
introduce a new top level repo for shared constants, or start using the ADT
library within openmp.
This will break sufficiently exotic build systems, trivial fixes as below.
Building libomptarget as part of the monorepo will continue to work.
If openmp is built separately, it now requires a cmake macro indicating
where to find the LLVM source tree.
If openmp is built separately, without the llvm source tree already on disk,
the build machine will need a copy of a subset of the llvm source tree and
the cmake macro indicating where it is.
Reviewed By: protze.joachim
Differential Revision: https://reviews.llvm.org/D89426
Evgeny Leviant [Wed, 21 Oct 2020 17:49:10 +0000 (20:49 +0300)]
[ARM][SchedModels] Convert IsLdrAm3RegOffPred to MCSchedPredicate
Differential revision: https://reviews.llvm.org/D89876
Matt Arsenault [Fri, 9 Oct 2020 00:05:18 +0000 (20:05 -0400)]
Fix missing c++ mode comment
Xiangling Liao [Wed, 21 Oct 2020 17:34:56 +0000 (13:34 -0400)]
[NFC] Fix the definition of SuitableAlign
Peter Steinfeld [Mon, 19 Oct 2020 18:01:13 +0000 (11:01 -0700)]
[flang] Another validity of the TARGET= argument of ASSOCIATED() for objects
In my previous implementation of the semantic checks for ASSOCIATED(), I
had neglected to check the TARGET= argument for objects to ensure that
it has either the POINTER or TARGET attributes.
I added an implementation and a test.
Differential Revision: https://reviews.llvm.org/D89717
Stanislav Mekhanoshin [Fri, 16 Oct 2020 22:22:42 +0000 (15:22 -0700)]
[AMDGPU] Fixed v_swap_b32 match
1. Fixed liveness issue with implicit kills.
2. Fixed potential problem with an indirect mov.
Fixes: SWDEV-256848
Differential Revision: https://reviews.llvm.org/D89599
Fangrui Song [Wed, 21 Oct 2020 17:11:20 +0000 (10:11 -0700)]
[ELF] --gc-sections: retain dependent sections of non-SHF_ALLOC sections
Fix http://lists.llvm.org/pipermail/llvm-dev/2020-October/145908.html
Currently non-SHF_ALLOC SHT_REL[A] (due to --emit-relocs) and SHF_LINK_ORDER are not
marked live.
Reviewed By: grimar, psmith
Differential Revision: https://reviews.llvm.org/D89841
Simon Pilgrim [Wed, 21 Oct 2020 17:10:33 +0000 (18:10 +0100)]
[X86] Improve variable vector insertion test coverage.
Add tests for insertion into non-undef vectors
Add SSE2/AVX512F/AVX512BW coverage
Simon Pilgrim [Wed, 21 Oct 2020 17:00:23 +0000 (18:00 +0100)]
[X86] Regenerate old vector-variable-insertion test
Tyker [Thu, 1 Oct 2020 15:58:07 +0000 (17:58 +0200)]
[clang] Improve Serialization/Imporing/Dumping of APValues
Changes:
- initializer expressions of constexpr variable are now wraped in a ConstantExpr. this is mainly used for testing purposes. the old caching system has not yet been removed.
- Add all the missing Serialization and Importing for APValue.
- Improve dumping of APValue when ASTContext isn't available.
- Cleanup leftover from last patch.
- Add Tests for Import and serialization.
Differential Revision: https://reviews.llvm.org/D63640
Nico Weber [Wed, 21 Oct 2020 16:57:50 +0000 (12:57 -0400)]
[gn build] try to fix up deps of __config_site after
37c030f81a
Louis Dionne [Wed, 21 Oct 2020 16:53:24 +0000 (12:53 -0400)]
[libc++] Fix the installation of libc++ headers since the __config_site change
Nico Weber [Wed, 21 Oct 2020 16:50:22 +0000 (12:50 -0400)]
[gn build] (manually) port
5d796645d6c8cade (libcxx __config change)
Nico Weber [Wed, 21 Oct 2020 16:43:01 +0000 (12:43 -0400)]
[gn build] (manually) port
54fa9ecd3088
John Brawn [Wed, 21 Oct 2020 16:34:47 +0000 (17:34 +0100)]
Use -### in arm-float-abi.c test
This is needed to prevent the test from failing when llvm is
configured so that the arm target is not present, which is the case
for some buildbots.
Joe Nash [Mon, 19 Oct 2020 20:52:51 +0000 (16:52 -0400)]
[AMDGPU] Refactor SOPC & SOPP .td for extension
We use the Real vs Pseudo instruction abstraction for other
types of instructions to facilitate changes in opcode
between gpu generations.
This patch introduces that abstraction to SOPC and SOPP.
Reviewed By: rampitec
Differential Revision: https://reviews.llvm.org/D89738
Change-Id: I59d53c2c7058b49d05b60350f4062a9b542d3138
Christian Sigg [Wed, 21 Oct 2020 06:24:53 +0000 (08:24 +0200)]
[mlir][gpu] Add lowering to LLVM for `gpu.wait` and `gpu.wait async`.
Reviewed By: herhut
Differential Revision: https://reviews.llvm.org/D89686
Christian Sigg [Wed, 21 Oct 2020 09:46:32 +0000 (11:46 +0200)]
[mlir][gpu] Add customer printer/parser for gpu.launch_func.
Reviewed By: herhut
Differential Revision: https://reviews.llvm.org/D89262
Frej Drejhammar [Wed, 21 Oct 2020 16:07:30 +0000 (18:07 +0200)]
[mlir]: Clarify docs for external OpTrait::FunctionLike ops
The documentation claims that an op with the trait FunctionLike has a
single region containing the blocks that corresponding to the body of
the function. It then goes on to say that the absence of a region
corresponds to an external function when, in fact, this is represented
by a single empty region. This patch changes the wording in the
documentation to match the implementation.
Signed-off-by: Frej Drejhammar <frej.drejhammar@gmail.com>
Co-authored-by: Frej Drejhammar <frej.drejhammar@gmail.com>
Co-authored-by: Klas Segeljakt <klasseg@kth.se>
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D89868
Matt Arsenault [Fri, 16 Oct 2020 18:15:03 +0000 (14:15 -0400)]
AMDGPU: Lower the threshold reported for maximum stack size exceeded
Check the actual maximum supported stack size for a kernel.