Benjamin Kramer [Fri, 18 Feb 2022 11:51:43 +0000 (12:51 +0100)]
[mlir][Vector] Add return type inference for multi_reduction
This subsumes the builder and verifier.
Florian Hahn [Fri, 18 Feb 2022 11:59:24 +0000 (11:59 +0000)]
[MemCpyOpt] Add non-local memcpy test with memory phi.
Nico Weber [Fri, 18 Feb 2022 11:56:32 +0000 (06:56 -0500)]
[gn build] (manually) port
6c99a3469d9c
Pavel Labath [Tue, 15 Feb 2022 12:28:34 +0000 (13:28 +0100)]
[lldb] Add support for a "global" lldbinit file
This patch adds introduces a new kind of an lldbinit file. Unlike the
lldbinit in the home directory (useful for customizing lldb to the needs
of a particular user), or the cwd lldbinit file (useful for
project-specific settings), this file can be used to customize an entire
lldb installation to a particular environment.
The feature is enabled at build time, by setting the
LLDB_GLOBAL_INIT_DIRECTORY variable to a path to a directory which
should contain an "lldbinit" file. Lldb will then load the file at
startup, if it exists, and if automatic init loading has not been
disabled. Relative paths will be resolved (at runtime) relative to the
location of the lldb library (liblldb or LLDB.framework).
The system-wide lldbinit file will be loaded first, before any
$HOME/.lldbinit and $CWD/.lldbinit files are processed, so that those
can override any system-wide settings.
More information can be found on the RFC thread at
<https://discourse.llvm.org/t/rfc-system-wide-lldbinit/59933>.
Differential Revision: https://reviews.llvm.org/D119831
Simon Pilgrim [Fri, 18 Feb 2022 11:21:32 +0000 (11:21 +0000)]
[X86] combineADC/SBB - pull out repeated getOperand calls. NFC.
Tres Popp [Thu, 17 Feb 2022 09:27:19 +0000 (10:27 +0100)]
Rename PatternRewriteSet::insert to add
insert is soft deprecated, so remove all references so it's less likely
to be used and can be easily removed in the future.
Differential Revision: https://reviews.llvm.org/D120021
Kadir Cetinkaya [Thu, 17 Feb 2022 21:01:29 +0000 (22:01 +0100)]
[clang][ASTReader] Fix memory leak while reading FriendTemplateDecls
Allocate on ASTContext, rather than just on heap, so that template
parameter lists are freed up.
Differential Revision: https://reviews.llvm.org/D120081
Simon Pilgrim [Fri, 18 Feb 2022 11:12:33 +0000 (11:12 +0000)]
[clangd] lookupSiblingsWithinContext - remove unnecessary nullptr check
The DC pointer is always dereferenced after the loop
Pavel Labath [Fri, 18 Feb 2022 11:01:05 +0000 (12:01 +0100)]
Revert "Fix race condition when launching and attaching."
It breaks TestVSCode_attach.py.
This reverts commit
9febd1e573fb8b3d1de5844b7bfd33eb998f0106 and
38054556a08884aa15d3ebc720e2f43d0cb5a944.
Florian Hahn [Fri, 18 Feb 2022 09:49:50 +0000 (09:49 +0000)]
Revert "unbreak Modules/cxx20-export-import.cpp with LLVM_APPEND_VC_REV after
32b73bc6ab82"
This reverts commit
1689b1092ebb2c630f8ef1d3880a9fb4808d16fa.
This patch was only added to fix a failure with
32b73bc6ab8234b, which
has been reverted again.
Florian Hahn [Fri, 18 Feb 2022 09:47:08 +0000 (09:47 +0000)]
Revert "Add support for floating-point option `ffp-eval-method` and for"
This reverts commit
32b73bc6ab8234b670c34d5ef999300e072cc706.
This breaks builds on macOS in some configurations, because
__FLT_EVAL_METHOD__ is set to an unexpected value.
E.g.
https://green.lab.llvm.org/green/job/clang-stage1-RA/28282/consoleFull#
129538464349ba4694-19c4-4d7e-bec5-
911270d8a58c
More details available in the review thread
https://reviews.llvm.org/D109239
Benjamin Kramer [Fri, 18 Feb 2022 10:39:48 +0000 (11:39 +0100)]
[mlir][Vector] Switch ExtractOp to the declarative assembly format
This is a bit awkward since ExtractOp allows both `f32` and
`vector<1xf32>` results for a scalar extraction. Allow both, but make
inference return the scalar to make this as NFC as possible.
Matthias Springer [Fri, 18 Feb 2022 09:46:20 +0000 (18:46 +0900)]
[mlir][bufferize][NFC] Remove obsolete tensor bufferization patterns from Linalg/Bufferize.cpp
Differential Revision: https://reviews.llvm.org/D119824
Simon Pilgrim [Fri, 18 Feb 2022 10:31:00 +0000 (10:31 +0000)]
[Hexagon] aligned load/store patterns - use cast<> instead of dyn_cast<> to avoid dereference of nullptr
The pointer is always referenced inside isAlignedMemNode, so assert the cast is correct instead of returning nullptr
Simon Pilgrim [Fri, 18 Feb 2022 10:29:52 +0000 (10:29 +0000)]
[ARM] ARMAsmPrinter::emitAttributes - remove unnecessary nullptr test.
The MMI pointer has already been dereferenced several times.
Jay Foad [Wed, 16 Feb 2022 15:59:15 +0000 (15:59 +0000)]
[AMDGPU] Return better Changed status from SIFoldOperands
Differential Revision: https://reviews.llvm.org/D120023
Matthias Springer [Fri, 18 Feb 2022 09:45:36 +0000 (18:45 +0900)]
[mlir][bufferize] Support memrefs with non-standard layout in `finalizing-bufferize`
Differential Revision: https://reviews.llvm.org/D119935
Alexey Lapshin [Thu, 17 Feb 2022 22:41:29 +0000 (01:41 +0300)]
[objcopy][NFC] Add rules to cmake to put files under specific folders.
This patch adds rules to cmake to put files under specific folders.
It allows to have files for different formats(which are located in different
subdirectories) be displayed in different subfolders of VS IDE solution.
Depends on D114429
Differential Revision: https://reviews.llvm.org/D114664
Jay Foad [Wed, 16 Feb 2022 16:41:45 +0000 (16:41 +0000)]
[AMDGPU] Return better Changed status from SILowerControlFlow
Differential Revision: https://reviews.llvm.org/D120025
Jay Foad [Wed, 16 Feb 2022 16:30:25 +0000 (16:30 +0000)]
[AMDGPU] Return better Changed status from SIOptimizeExecMasking
Differential Revision: https://reviews.llvm.org/D120024
Douglas Yung [Fri, 18 Feb 2022 09:48:13 +0000 (01:48 -0800)]
Add "REQUIRES: asserts" to test misched-predicate-virtreg.mir which uses "-debug-only".
Jay Foad [Wed, 16 Feb 2022 16:49:47 +0000 (16:49 +0000)]
[CodeGen] Return better Changed status from PostRAHazardRecognizer
Differential Revision: https://reviews.llvm.org/D119954
esmeyi [Fri, 18 Feb 2022 09:12:32 +0000 (04:12 -0500)]
Revert "[XCOFF][llvm-objdump] change the priority of symbols with"
This reverts commit
2ad662172cbbd1ca53489bf8bddb0183d7692708.
Buildbot failure #19373
Stephan Herhut [Mon, 14 Feb 2022 16:46:35 +0000 (17:46 +0100)]
[mlir][tensor] Extend reshape utils.
This change changes the handling of trailing dimensions with unknown
extent. Users of the changessociationIndicesForReshape helper should
see benefits when transforming reshape like operations into
expand/collapse pairs if the higher-rank type has trailing unknown
dimensions.
The motivating example is a reshape from tensor<16x1x?xi32> to
tensor<16xi32> that can be modeled as collapsing the three dimensions.
Differential Revision: https://reviews.llvm.org/D119730
hyeongyukim [Fri, 18 Feb 2022 08:52:56 +0000 (17:52 +0900)]
[NFC][Clang/test] add target triple to CodeGen/analyze_noundef.cpp
Alexander Potapenko [Thu, 17 Feb 2022 14:48:35 +0000 (15:48 +0100)]
[asan] Add support for disable_sanitizer_instrumentation attribute
For ASan this will effectively serve as a synonym for
__attribute__((no_sanitize("address"))).
Adding the disable_sanitizer_instrumentation to functions will drop the
sanitize_XXX attributes on the IR level.
This is the third reland of https://reviews.llvm.org/D114421.
Now that TSan test is fixed (https://reviews.llvm.org/D120050) there
should be no deadlocks.
Differential Revision: https://reviews.llvm.org/D120055
hyeongyukim [Fri, 18 Feb 2022 08:38:50 +0000 (17:38 +0900)]
[NFC] Fix a buildbot failure after b529744
Tres Popp [Thu, 17 Feb 2022 09:20:50 +0000 (10:20 +0100)]
[mlir] Propagate NaNs in PolynomialApproximation
Previously, NaNs would be dropped in favor of bounded values which was
strictly incorrect. Now the min/max operation propagate this
information. Not all uses of min/max need this, but the given change
will help protect future additions, and this prevents the need for an
additional cmpf and select operation to handle NaNs.
Differential Revision: https://reviews.llvm.org/D120020
hyeongyukim [Fri, 18 Feb 2022 08:00:00 +0000 (17:00 +0900)]
[Clang] Rename `disable-noundef-analysis` flag to `-[no-]enable-noundef-analysis`
This flag was previously renamed `enable_noundef_analysis` to
`disable-noundef-analysis,` which is not a conventional name. (Driver and
CC1's boolean options are using [no-] prefix)
As discussed at https://reviews.llvm.org/D105169, this patch reverts its
name to `[no-]enable_noundef_analysis` and enables noundef-analysis as
default.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D119998
Greg Clayton [Fri, 18 Feb 2022 07:59:15 +0000 (23:59 -0800)]
Fix buildbots after https://reviews.llvm.org/D119797
This value error is no longer needed with the new version of the patch
Valentin Clement [Fri, 18 Feb 2022 07:08:34 +0000 (08:08 +0100)]
[flang] Lower scalar negation
Handle negation on scalar expression.
```
res = -a
```
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D120071
Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
LLVM GN Syncbot [Fri, 18 Feb 2022 06:12:10 +0000 (06:12 +0000)]
[gn build] Port
0a4184909a8c
Snehasish Kumar [Fri, 18 Feb 2022 00:01:31 +0000 (16:01 -0800)]
Reland "[memprof] Extend the index prof format to include memory profiles."
This patch adds support for optional memory profile information to be
included with and indexed profile. The indexed profile header adds a new
field which points to the offset of the memory profile section (if
present) in the indexed profile. For users who do not utilize this
feature the only overhead is a 64-bit offset in the header.
The memory profile section contains (1) profile metadata describing the
information recorded for each entry (2) an on-disk hashtable containing
the profile records indexed via llvm::md5(function_name). We chose to
introduce a separate hash table instead of the existing one since the
indexing for the instrumented fdo hash table is based on a CFG hash
which itself is perturbed by memprof instrumentation.
This commit also includes the changes reviewed separately in D120093.
Differential Revision: https://reviews.llvm.org/D120103
fourdim [Fri, 18 Feb 2022 06:06:48 +0000 (14:06 +0800)]
[JITLink][RISCV] fix the extractBits behavior and add R_RISCV_JAL relocation.
This patch supports the R_RISCV_JAL relocation.
Moreover, it will fix the extractBits function's behavior as it extracts Size + 1 bits.
In the test ELF_jal.s:
Before:
```
Hi:
4294836480
extractBits(Hi, 12, 8): 480
```
After:
```
Hi:
4294836480
extractBits(Hi, 12, 8): 224
```
Reviewed By: StephenFan
Differential Revision: https://reviews.llvm.org/D117975
Serguei Katkov [Thu, 17 Feb 2022 05:06:23 +0000 (12:06 +0700)]
[MemoryDependency] Simplfy re-ordering condition. Cleanup. NFC.
Make the reading of condition for restricting re-ordering simpler.
Reviewers: reames
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D120005
esmeyi [Fri, 18 Feb 2022 05:29:10 +0000 (00:29 -0500)]
[XCOFF][llvm-objdump] change the priority of symbols with
the same address by symbol types.
Summary: In XCOFF, each section comes with a default symbol
with the same name as the section. It doesn't bind
to code locations and it may cause incorrect display
of symbol names under `llvm-objdump -d`.
This patch changes the priority of symbols with the
same address by symbol type.
Reviewed By: jhenderson, shchenz
Differential Revision: https://reviews.llvm.org/D117642
LLVM GN Syncbot [Fri, 18 Feb 2022 04:18:16 +0000 (04:18 +0000)]
[gn build] Port
8e979460bb27
Konstantin Varlamov [Fri, 18 Feb 2022 04:15:02 +0000 (20:15 -0800)]
[libc++][ranges] Implement `std::sortable`.
Differential Revision: https://reviews.llvm.org/D119619
LLVM GN Syncbot [Fri, 18 Feb 2022 04:12:48 +0000 (04:12 +0000)]
[gn build] Port
eea3d90af181
Konstantin Varlamov [Fri, 18 Feb 2022 04:11:46 +0000 (20:11 -0800)]
[libc++][ranges] Implement `std::mergeable`.
Differential Revision: https://reviews.llvm.org/D119489
Kuba Mracek [Fri, 18 Feb 2022 03:41:46 +0000 (19:41 -0800)]
[GlobalDCE] [VFE] Avoid dropping vfunc dependencies when an invalid vtable entry is present
When we scan vtables for a particular vload in ScanVTableLoad and an entry in
one possible vtable is invalid (null or non-fptr), we bail in a wrong way -- we
completely stop the scanning of vtables and this results in dropped dependencies
and incorrectly removed vfuncs from vtables. Let's fix that by correcting the
bailing logic to keep iterating and only skip the invalid entries.
Differential Revision: https://reviews.llvm.org/D120006
Weining Lu [Fri, 18 Feb 2022 02:18:13 +0000 (10:18 +0800)]
[NFC] Add myself to CREDITS.TXT
Jessica Paquette [Fri, 18 Feb 2022 02:26:16 +0000 (18:26 -0800)]
[MachineOutliner] Add testcase for instruction mapping stats
I forgot to attach the testcase for
12389e375811d46ce41d949857f8b469d6563114!
Jessica Paquette [Fri, 18 Feb 2022 02:12:39 +0000 (18:12 -0800)]
[MachineOutliner] Add statistics for unsigned vector size
Useful for debugging + evaluating improvements to the outliner.
Stats are the number of illegal, legal, and invisible instructions in the
unsigned vector, and it's total length.
Vitaly Buka [Thu, 17 Feb 2022 21:06:11 +0000 (13:06 -0800)]
[msan] strsignal interceptor
Reviewed By: kstoimenov
Differential Revision: https://reviews.llvm.org/D120082
Weining Lu [Fri, 18 Feb 2022 02:04:28 +0000 (10:04 +0800)]
[LoongArch] Fix several instruction definition errors in initial patches
This patch corrects some instruction definitions that I incorrectly wrote
in initial patches including bstr{ins/pick}.{w/d}, ll.{w/d} and sc.{w/d}.
Reviewed By: xen0n
Differential Revision: https://reviews.llvm.org/D119817
Weining Lu [Thu, 17 Feb 2022 01:04:47 +0000 (09:04 +0800)]
[LoongArch] Add missing dollar prefix to register name in InstPrinter
This patch adds a '$' prefix to register name in InstPrinter that I missed in initial patches.
Reviewed By: xen0n
Differential Revision: https://reviews.llvm.org/D119813
William S. Moses [Sat, 12 Feb 2022 21:33:22 +0000 (16:33 -0500)]
[LICM][PhaseOrder] Don't speculate in LICM until after running loop rotate
LICM will speculatively hoist code outside of loops. This requires removing information, like alias analysis (https://github.com/llvm/llvm-project/issues/53794), range information (https://bugs.llvm.org/show_bug.cgi?id=50550), among others. Prior to https://reviews.llvm.org/D99249 , LICM would only be run after LoopRotate. Running Loop Rotate prior to LICM prevents a instruction hoist from being speculative, if it was conditionally executed by the iteration (as is commonly emitted by clang and other frontends). Adding the additional LICM pass first, however, forces all of these instructions to be considered speculative, even if they are not speculative after LoopRotate. This destroys information, resulting in performance losses for discarding this additional information.
This PR modifies LICM to accept a ``speculative'' parameter which allows LICM to be set to perform information-loss speculative hoists or not. Phase ordering is then modified to not perform the information-losing speculative hoists until after loop rotate is performed, preserving this additional information.
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D119965
Benjamin Kramer [Fri, 18 Feb 2022 00:35:25 +0000 (01:35 +0100)]
[mlir][Vector] Switch ShuffleOp to the declarative assembly format
This also requires implementing return type deduction.
Benjamin Kramer [Fri, 18 Feb 2022 00:15:14 +0000 (01:15 +0100)]
[mlir][Vector] Add InferTypeOpInterface to vector dialect and remove the now redundant builders
Zakk Chen [Thu, 17 Feb 2022 04:49:25 +0000 (20:49 -0800)]
[RISCV][NFC] Add some tail agnostic tests for nomask operations.
Improve test coverage for tail agnostic nomask vslidedown/up, vmv.s.x
vfmv.s.f and vcompress.
Reviewed By: rogfer01
Differential Revision: https://reviews.llvm.org/D120008
Zakk Chen [Wed, 16 Feb 2022 08:38:51 +0000 (00:38 -0800)]
[RISCV][NFC] Add tail agnostic tests for nomask Vector Reduction IR intrinsics.
Improve test coverage for tail agnostic nomask Vector Reduction IR.
Reviewed By: monkchiang
Differential Revision: https://reviews.llvm.org/D119920
Heejin Ahn [Thu, 17 Feb 2022 00:11:29 +0000 (16:11 -0800)]
[WebAssembly] Make EH/SjLj vars unconditionally thread local
This makes three thread local variables (`__THREW__`, `__threwValue`,
and `__wasm_lpad_context`) unconditionally thread local. If the target
doesn't support TLS, they will be downgraded to normal variables in
`stripThreadLocals`. This makes the object not linkable with other
objects using shared memory, which is what we intend here; these
variables should be thread local when used with shared memory. This is
what we initially tried in D88262.
But D88323 changed this: It only created these variables when threads
were supported, because `__THREW__` and `__threwValue` were always
generated even if Emscripten EH/SjLj was not used, making all objects
built without threads not linkable with shared memory, which was too
restrictive. But sometimes this is not safe. If we build an object using
variables such as `__THREW__` without threads, it can be linked to other
objects using shared memory, because the original object's `__THREW__`
was not created thread local to begin with.
So this CL basically reverts D88323 with some additional improvements:
- This checks each of the functions and global variables created within
`LowerEmscriptenEHSjLj` pass and removes it if it's not used at the
end of the pass. So only modules using those variables will be
affected.
- Moves `CoalesceFeaturesAndStripAtomics` and `AtomicExpand` passes
after all other IR pasess that can create thread local variables. It
is not sufficient to move them to the end of `addIRPasses`, because
`__wasm_lpad_context` is created in `WasmEHPrepare`, which runs inside
`addPassesToHandleExceptions`, which runs before `addISelPrepare`. So
we override `addISelPrepare` and move atomic/TLS stripping and
expanding passes there.
This also removes merges `TLS` and `NO-TLS` FileCheck lines into one
`CHECK` line, because in the bitcode level we always create them as
thread local. Also some function declarations are deleted `CHECK` lines
because they are unused.
Reviewed By: tlively, sbc100
Differential Revision: https://reviews.llvm.org/D120013
LLVM GN Syncbot [Thu, 17 Feb 2022 23:56:17 +0000 (23:56 +0000)]
[gn build] Port
19bdf44d8508
Snehasish Kumar [Thu, 17 Feb 2022 23:45:10 +0000 (15:45 -0800)]
Revert "Reland "[memprof] Extend the index prof format to include memory profiles.""
This reverts commit
807ba7aace188ada83ddb4477265728e97346af1.
Snehasish Kumar [Thu, 17 Feb 2022 23:42:02 +0000 (15:42 -0800)]
Revert "[memprof] Fix frame deserialization on big endian systems."
This reverts commit
c74389b4b58d8db3f8262ce15b9d514d62fe265c.
This broke the ml-opt-x86-64 build.
https://lab.llvm.org/buildbot#builders/9/builds/4127
Matt Arsenault [Thu, 17 Feb 2022 23:42:06 +0000 (18:42 -0500)]
AMDGPU: Try to fix expensive_checks bot tests failures
Snehasish Kumar [Thu, 17 Feb 2022 23:14:47 +0000 (15:14 -0800)]
[memprof] Fix frame deserialization on big endian systems.
We write the memprof internal call frame data in little endian format.
However when reading the frame information we were casting it directly
to a MemProfRecord::Frame pointer. In this change we add a separate
deserialization method which uses an endian reader to read the bytes as
little endian.
This fixes https://lab.llvm.org/buildbot/#/builders/100/builds/12940
Differential Revision: https://reviews.llvm.org/D120093
Matt Arsenault [Thu, 17 Feb 2022 21:52:02 +0000 (16:52 -0500)]
RegAllocGreedy: Fix last chance recolor assert in impossible case
This example is not compilable without handling eviction of specific
subregisters. Last chance recoloring was deciding it could try
evicting an overlapping superregister, which doesn't help make any
progress. The LiveIntervalUnion would then assert due to an
overlapping / identical range when trying the new assignment.
Unfortunately this is also producing a verifier error after the
allocation fails. I've seen a number of these, and not sure if we
should just start deleting the function on error rather than trying to
figure out how to put together valid MIR.
I'm not super confident this is the right place to fix this. I also
have a number of failing testcases I need to fix by handling partial
evictions of superregisters.
Shubham Sandeep Rastogi [Thu, 17 Feb 2022 22:59:50 +0000 (14:59 -0800)]
Fix typo in Swift.def, it is swift5_protocol_conformances not swift5_protocol_confromances
Arthur Eubanks [Thu, 17 Feb 2022 23:00:43 +0000 (15:00 -0800)]
[clang] Remove Address::deprecated() in emitVoidPtrDirectVAArg()
Aart Bik [Thu, 17 Feb 2022 17:43:10 +0000 (09:43 -0800)]
[mlir][sparse] remove unused test matrix file
Reviewed By: bixia
Differential Revision: https://reviews.llvm.org/D120069
Matthew Voss [Thu, 17 Feb 2022 22:18:54 +0000 (14:18 -0800)]
Revert "[CUDA][SPIRV] Assign global address space to CUDA kernel arguments"
This reverts commit
9de4fc0f2d3b60542956f7e5254951d049edeb1f.
Reverting due to test failure: https://lab.llvm.org/buildbot/#/builders/139/builds/17199
Shafik Yaghmour [Thu, 17 Feb 2022 22:30:18 +0000 (14:30 -0800)]
[LLDB] Adding skipif for arm linux for TestStructuredBinding.py
Arthur Eubanks [Thu, 17 Feb 2022 22:22:39 +0000 (14:22 -0800)]
[clang] Remove Address::deprecated() in CGCXXABI.h
Min-Yih Hsu [Thu, 17 Feb 2022 22:13:52 +0000 (14:13 -0800)]
[M68k] Adopt VarLenCodeEmitter for bits instructions
And introduce operand encoding fragments (i.e. MxEncMemOp record) for
addressing modes 'o' and 'e'.
Casey Carter [Thu, 17 Feb 2022 20:23:58 +0000 (12:23 -0800)]
[libcxx][test] Let the library indicate support for int128
Define `TEST_HAS_NO_INT128` accordingly.
Differential Revision: https://reviews.llvm.org/D120010
Martin Storsjö [Tue, 25 Jan 2022 13:58:43 +0000 (13:58 +0000)]
[libcxx] [test] Use proper UTF-8 locales on Windows
Since Windows 10 version 1803 (10.0.17134.0) (or Windows Server 2019),
the Windows Universal C Runtime (UCRT) actually does support UTF-8
locales - they're available e.g. via the same names as commonly on Unices,
e.g. "en_US.UTF-8".
The UTF-8 locale support unfortunately has a bug which breaks a couple
tests that were passing previously. That bug is fixed in the very
latest version of the UCRT (in UCRT 10.0.20348.0, available in Windows
11 or Windows Server 2022), so it will get resolved at some point
eventually, provided that the CI environment does get upgraded to a
newer version of Windows Server.
While the net number of xfailed/passing tests in this patch is a loss,
this does allow fixing a lot more locale tests properly for Windows
in later patches.
Intentionally not touching the ISO-8859-1/2 locales used for testing;
they're not detected and tested/used right now, and fixing that up
is another project.
Differential Revision: https://reviews.llvm.org/D119930
Kiran Chandramohan [Thu, 17 Feb 2022 21:55:07 +0000 (21:55 +0000)]
[NFC][Flang] Add colon to CHECK-LABEL to exercise the check
Reviewed By: clementval
Differential Revision: https://reviews.llvm.org/D119995
Arthur Eubanks [Thu, 17 Feb 2022 21:57:46 +0000 (13:57 -0800)]
[clang] Remove Address::deprecated() call in CGExprCXX.cpp
Nikolas Klauser [Thu, 17 Feb 2022 21:53:20 +0000 (22:53 +0100)]
Remove __uncvref; use __uncvref_t instead
Reviewed By: Quuxplusone, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D119958
Florian Mayer [Thu, 17 Feb 2022 00:32:09 +0000 (16:32 -0800)]
[MTE] Instrument use-after-scope for optnone functions.
We always need the Dominator and PostDominatorTree for use-after-scope.
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/D119993
Nico Weber [Sat, 12 Feb 2022 03:13:28 +0000 (22:13 -0500)]
[clang] Pass more flags to ld64.lld
* ld64.lld now completely supports -export_dynamic (D119372), so map -rdynamic
to -export_dynamic like already done for ld64
* ld64.lld has been supporting -object_path_lto for well over a year (D92537),
so pass it like already done for ld64
Differential Revision: https://reviews.llvm.org/D119612
LLVM GN Syncbot [Thu, 17 Feb 2022 21:41:09 +0000 (21:41 +0000)]
[gn build] Port
807ba7aace18
Krzysztof Drewniak [Thu, 17 Feb 2022 21:37:15 +0000 (21:37 +0000)]
[MLIR][GPU] Remove call to cudaSetDevice(), which no longer exists
Differential Revision: https://reviews.llvm.org/D120085
Mitch Phillips [Thu, 17 Feb 2022 21:27:13 +0000 (13:27 -0800)]
[ASan] Fix TLS teardown.
TLS teardown is currently broken, as we unpoison the shadow a little bit
and to the right of the TLS section, rather than the full TLS section
itself. This currently breaks at -O0, and breaks with some upcoming
globals code that I have.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D120080
Nico Weber [Thu, 17 Feb 2022 21:33:24 +0000 (16:33 -0500)]
unbreak Modules/cxx20-export-import.cpp with LLVM_APPEND_VC_REV after
32b73bc6ab82
See revision
b8b7a9dcdcbc for prior art.
Krzysztof Drewniak [Tue, 15 Feb 2022 20:23:44 +0000 (20:23 +0000)]
[MLIR][GPU] Add gpu.set_default_device op
This op is added to allow MLIR code running on multi-GPU systems to
select the GPU they want to execute operations on when no GPU is
otherwise specified.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D119883
Greg Clayton [Tue, 15 Feb 2022 01:05:03 +0000 (17:05 -0800)]
Fix race condition when launching and attaching.
We discovered that when using "launchCommands" or "attachCommands" that there was an issue where these commands were not being run synchronously. There were further problems in this case where we would get thread events for the process that was just launched or attached before the IDE was ready, which is after "configurationDone" was sent to lldb-vscode.
This fix introduces the ability to wait for the process to stop after the run or attach to ensure that we have a stopped process at the entry point that is ready for the debug session to proceed. This also allows us to run the normal launch or attach without needing to play with the async flag the debugger. We spin up the thread that listens for process events before we start the launch or attach, but we stop the first eStateStopped (with stop ID of zero) event from being delivered through the DAP protocol because the "configurationDone" request handler will deliver it manually as the IDE expects a stop after configuration done. The request_configurationDone will also only deliver the stop packet if the "stopOnEntry" is False in the launch configuration.
Also added a new "timeout" to the launch and attach launch configuration arguments that can be set and defaults to 30 seconds. Since we now poll to detect when the process is stopped, we need a timeout that can be changed in case certain workflows take longer that 30 seconds to attach. If the process is not stopped by the timeout, an error will be retured for the launch or attach.
Added a flag to the vscode.py protocol classes that detects and ensures that no "stopped" events are sent prior to "configurationDone" has been sent and will raise an error if it does happen.
This should make our launching and attaching more reliable and avoid some deadlocks that were being seen (https://reviews.llvm.org/D119548).
Differential Revision: https://reviews.llvm.org/D119797
Snehasish Kumar [Mon, 14 Feb 2022 19:52:42 +0000 (11:52 -0800)]
Reland "[memprof] Extend the index prof format to include memory profiles."
This reverts commit
85355a560a33897453df2ef959e255ee725eebce.
This patch adds support for optional memory profile information to be
included with and indexed profile. The indexed profile header adds a new
field which points to the offset of the memory profile section (if
present) in the indexed profile. For users who do not utilize this
feature the only overhead is a 64-bit offset in the header.
The memory profile section contains (1) profile metadata describing the
information recorded for each entry (2) an on-disk hashtable containing
the profile records indexed via llvm::md5(function_name). We chose to
introduce a separate hash table instead of the existing one since the
indexing for the instrumented fdo hash table is based on a CFG hash
which itself is perturbed by memprof instrumentation.
Differential Revision: https://reviews.llvm.org/D118653
Marek Kurdej [Thu, 17 Feb 2022 10:10:41 +0000 (11:10 +0100)]
[clang-format] Do not add space after return-like keywords in macros.
Fixes https://github.com/llvm/llvm-project/issues/33336.
Reviewed By: HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D120028
Louis Dionne [Thu, 17 Feb 2022 15:00:29 +0000 (10:00 -0500)]
[libc++][CI] Upload ABI lists for all jobs
Some jobs might not produce those, but it makes the blocks easier to
copy-paste and makes sure that if a job does produce an ABI list, it
will be updloaded in the artifacts.
Differential Revision: https://reviews.llvm.org/D120056
Nikolas Klauser [Fri, 11 Feb 2022 18:24:31 +0000 (19:24 +0100)]
[libc++] Implement P1165R1 (Make stateful allocator propagation more consistent)
Reviewed By: Quuxplusone, ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D119112
Casey Carter [Thu, 17 Feb 2022 20:55:51 +0000 (12:55 -0800)]
[libcxx][test] Silence signed/unsigned comparison warnings
Kadir Cetinkaya [Thu, 17 Feb 2022 16:18:43 +0000 (17:18 +0100)]
[clang][SemaTemplate] Fix a stack use after scope
Differential Revision: https://reviews.llvm.org/D120065
Benjamin Kramer [Thu, 17 Feb 2022 20:16:51 +0000 (21:16 +0100)]
[mlir][memref] Switch ViewOp to the declarative assembly format
Aaron Ballman [Thu, 17 Feb 2022 20:32:15 +0000 (15:32 -0500)]
Use functions with prototypes when appropriate; NFC
Now that the AST printer properly handles functions with no parameters
in C code, all of the tests relying on AST printing can be updated to
use prototypes where appropriate.
Mogball [Thu, 17 Feb 2022 20:29:25 +0000 (20:29 +0000)]
[mlir] NFC NamedAttrList append with StringAttr
NamedAttrList.append(StringAttr, StringAttr) fails to compile because it is
matched to the IteratorT append. Fixes the method to only match if the type is
an iterator.
Fangrui Song [Thu, 17 Feb 2022 20:10:58 +0000 (12:10 -0800)]
[ELF] Support (TYPE=<value>) to customize the output section type
The current output section type allows to set the ELF section type to
SHT_PROGBITS or SHT_NOLOAD. This patch allows an arbitrary section value
to be specified. Some common SHT_* literal names are supported as well.
```
SECTIONS {
note (TYPE=SHT_NOTE) : { BYTE(8) *(note) }
init_array ( TYPE=14 ) : { QUAD(14) }
fini_array (TYPE = SHT_FINI_ARRAY) : { QUAD(15) }
}
```
When `sh_type` is specified, it is an error if an input section has a different type.
Our syntax is compatible with GNU ld 2.39 (https://sourceware.org/bugzilla/show_bug.cgi?id=28841).
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D118840
Philip Reames [Thu, 17 Feb 2022 20:00:44 +0000 (12:00 -0800)]
{instsimplify] Precommit some tests for provable inequal pointers derived from allocas
Arthur Eubanks [Thu, 17 Feb 2022 19:18:26 +0000 (11:18 -0800)]
[EarlyCSE][OpaquePtr] Check access type when performing DSE
This will bail out on target specific intrinsics. If those are deemed
important enough for EarlyCSE to handle, we can augment MemIntrinsicInfo
with an access type for TargetTransformInfo::getTgtMemIntrinsic() to
handle.
Reviewed By: #opaque-pointers, nikic
Differential Revision: https://reviews.llvm.org/D120077
Fangrui Song [Thu, 17 Feb 2022 19:54:57 +0000 (11:54 -0800)]
[lld] Make error handling functions opaque
The inline `lld::error` expands to two function calls `errorHandler` and `error`
where the latter is opaque. Move the functions to .cpp files to decrease code
size.
My x86-64 lld executable is 9KiB smaller.
Reviewed By: #lld-macho, thakis
Differential Revision: https://reviews.llvm.org/D120002
Snehasish Kumar [Mon, 14 Feb 2022 19:52:40 +0000 (11:52 -0800)]
Reland "[InstrProf] Make the IndexedInstrProf header backwards compatible."
This reverts commit
9fd2cb21fb3f763fc784eab198bf1297a24596fa.
Fixes an issue on big endian systems where the format version
was not converted to little endian prior to passing to GET_VERSION.
Differential Revision: https://reviews.llvm.org/D118390
Peter Collingbourne [Thu, 6 Jan 2022 21:37:21 +0000 (13:37 -0800)]
AST: Move __va_list tag back to std conditionally on AArch64.
In post-commit feedback on D104830 Jessica Clarke pointed out that
unconditionally adding __va_list to the std namespace caused namespace
debug info to be emitted in C, which is not only inappropriate but
turned out to confuse the dtrace tool. Therefore, move __va_list back
to std only in C++ so that the correct debug info is generated. We
also considered moving __va_list to the top level unconditionally
but this would contradict the specification and be visible to AST
matchers and such, so make it conditional on the language mode.
To avoid breaking name mangling for __va_list, teach the Itanium
name mangler to always mangle it as if it were in the std namespace
when targeting ARM architectures. This logic is not needed for the
Microsoft name mangler because Microsoft platforms define va_list as
a typedef of char *.
Depends on D116773
Differential Revision: https://reviews.llvm.org/D116774
Peter Collingbourne [Thu, 17 Feb 2022 19:23:33 +0000 (11:23 -0800)]
AST: Make getEffectiveDeclContext() a member function of ItaniumMangleContextImpl. NFCI.
In an upcoming change we are going to need to access mangler state
from the getEffectiveDeclContext() function. Therefore, make it a
member function of ItaniumMangleContextImpl. Any callers that are
not currently members of ItaniumMangleContextImpl or CXXNameMangler
are made members of one or the other depending on where they are
called from.
Differential Revision: https://reviews.llvm.org/D116773
Joseph Huber [Thu, 17 Feb 2022 18:20:51 +0000 (13:20 -0500)]
[OpenMP] Add RTL function to externalization RAII
This patch adds the '_kmpc_get_hardware_num_threads_in_block'
OpenMP RTL function to the externalization RAII struct. This was getting
optimized out and then being replaced with an undefined value once added
back in, causing bugs for complex reductions.
Fixes #53909.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D120076
Shafik Yaghmour [Thu, 17 Feb 2022 19:29:05 +0000 (11:29 -0800)]
[LLDB] Fix TestStructuredBinding.py for libstdc++
For the tuple case for the TestStructuredBinding.py the result type is different
between libc++ and libstdc++.
Alex Brachet [Thu, 17 Feb 2022 19:24:53 +0000 (19:24 +0000)]
[ifs] Add --strip-needed flag
Reviewed By: haowei, mcgrathr
Differential Revision: https://reviews.llvm.org/D119907
Leonard Grey [Fri, 14 Jan 2022 19:37:00 +0000 (14:37 -0500)]
[lld-macho] Allow order files and call graph sorting to be used together
If both an order file and a call graph profile are present, the edges of the
call graph which use symbols present in the order file are not used. All of
the symbols in the order file will appear at the beginning of the section just
as they do currently. In other words, the highest priority derived from the
call graph will be below the lowest priority derived from the order file.
Practically, this change renames CallGraphSort.{h,cpp} to SectionPriorities.{h,cpp},
and most order file and call graph profile related code is moved into the new
file to reduce duplication.
Differential Revision: https://reviews.llvm.org/D117354
Shafik Yaghmour [Thu, 17 Feb 2022 19:13:46 +0000 (11:13 -0800)]
[DEBUGINFO] [LLDB] Add support for generating debug-info for structured bindings of structs and arrays
Currently we are not emitting debug-info for all cases of structured bindings a
C++17 feature which allows us to bind names to subobjects in an initializer.
A structured binding is represented by a DecompositionDecl AST node and the
binding are represented by a BindingDecl. It looks the original implementation
only covered the tuple like case which be represented by a DeclRefExpr which
contains a VarDecl.
If the binding is to a subobject of the struct the binding will contain a
MemberExpr and in the case of arrays it will contain an ArraySubscriptExpr.
This PR adds support emitting debug-info for the MemberExpr and ArraySubscriptExpr
cases as well as llvm and lldb tests for these cases as well as the tuple case.
Differential Revision: https://reviews.llvm.org/D119178