Haojian Wu [Fri, 28 Oct 2022 13:08:41 +0000 (15:08 +0200)]
Timm Bäder [Fri, 28 Oct 2022 11:49:30 +0000 (13:49 +0200)]
[clang][Interp] Implement String- and CharacterLiterals
Differential Revision: https://reviews.llvm.org/D135366
Haojian Wu [Fri, 28 Oct 2022 12:47:01 +0000 (14:47 +0200)]
Kristof Beyls [Thu, 27 Oct 2022 19:05:56 +0000 (21:05 +0200)]
Online sync-ups: remove Windows/COFF entry.
They stopped a while ago.
Differential Revision: https://reviews.llvm.org/D136876
Nenad Mikša [Fri, 28 Oct 2022 12:18:38 +0000 (08:18 -0400)]
Disambiguate type names when printing NTTP types
When printing NTTP template types, ensure that type name of the NTTP is
printed.
Fixes #57562
Differential Revision: https://reviews.llvm.org/D134453
Aaron Ballman [Fri, 28 Oct 2022 12:16:19 +0000 (08:16 -0400)]
Add some more C11 DR tests and update the status page
Nikita Popov [Fri, 28 Oct 2022 12:08:34 +0000 (14:08 +0200)]
[InstCombine] Convert test to opaque pointers (NFC)
With some manual fixup for different alloca types and variable name
clashes.
Victor Campos [Fri, 7 Oct 2022 14:37:42 +0000 (15:37 +0100)]
[Object] Prevent null pointer dereference in BigArchiveMemberHeader
The pointer argument Err from BigArchiveMemberHeader's constructor can
be null. This pointer was dereferenced without any null checks.
This patch adds a check to avoid a null dereference.
Reviewed By: brenoguim
Differential Revision: https://reviews.llvm.org/D135449
Guray Ozen [Fri, 28 Oct 2022 11:45:44 +0000 (13:45 +0200)]
[mlir][nvvm] Introduce performance tuning directives
PTX programming models provides some performance tuning directives; see https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#performance-tuning-directives
The downstream compiler namely `ptxas` leverages these information for better register allocation or to handle other resource management that improves the performance.
This revision introduce all the kernel based directives to MLIR's NVVM dialect. The list is below
```
maxnreg -> max register per thread in CTA
maxntid -> max threads per CTA
reqntid -> exact number of threads per CTA
minnctapersm -> min CTA per SM
```
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D136931
Timm Bäder [Fri, 28 Oct 2022 11:33:26 +0000 (13:33 +0200)]
Revert "[clang][Interp] Implement String- and CharacterLiterals"
This reverts commit
6fa1795d1fd4770f9f5c00f5a30937d68c3feb17.
This breaks a windows builder:
../../clang/lib/AST/Interp/ByteCodeExprGen.h(236,11): error: call to constructor of 'clang::interp::APInt' (aka 'llvm::APInt') is ambiguous
APInt WrappedValue(getIntWidth(Ty), Value, std::is_signed<T>::value);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../clang/lib/AST/Interp/ByteCodeExprGen.cpp(409,16): note: in instantiation of function template specialization 'clang::interp::ByteCodeExprGen<clang::interp::ByteCodeEmitter>::emitConst<unsigned int>' requested here
return this->emitConst(E, E->getValue());
^
../../clang/lib/AST/Interp/ByteCodeExprGen.cpp(1149,16): note: in instantiation of member function 'clang::interp::ByteCodeExprGen<clang::interp::ByteCodeEmitter>::VisitCharacterLiteral' requested here
template class ByteCodeExprGen<ByteCodeEmitter>;
^
../../llvm/include\llvm/ADT/APInt.h(108,3): note: candidate constructor
APInt(unsigned numBits, uint64_t val, bool isSigned = false)
^
../../llvm/include\llvm/ADT/APInt.h(134,3): note: candidate constructor
APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]);
^
Simon Pilgrim [Fri, 28 Oct 2022 11:11:00 +0000 (12:11 +0100)]
[DAG] visitXOR - fold XOR(A,B) -> OR(A,B) iff A and B have no common bits
Alive2: https://alive2.llvm.org/ce/z/7wvfns
Part of Issue #58624
Nikita Popov [Fri, 28 Oct 2022 11:03:39 +0000 (13:03 +0200)]
[InstCombine] Convert some tests to opaque pointers (NFC)
Conversion was performed (without manual fixup) using:
https://gist.github.com/nikic/
98357b71fd67756b0f064c9517b62a34
Timm Bäder [Fri, 28 Oct 2022 10:48:40 +0000 (12:48 +0200)]
[clang][Interp][NFC] Fix instance method check
This was a change suggested by Aaron that I forgot to commit.
Timm Bäder [Mon, 10 Oct 2022 11:00:38 +0000 (13:00 +0200)]
[clang][Interp] Implement String- and CharacterLiterals
Differential Revision: https://reviews.llvm.org/D135366
Timm Bäder [Thu, 27 Oct 2022 04:19:19 +0000 (06:19 +0200)]
[clang][Interp][NFC] Print more info in Program::dump()
Number of functions and global variables is useful to know.
Timm Bäder [Wed, 26 Oct 2022 09:25:25 +0000 (11:25 +0200)]
[clang][Interp][NFC] Remove leftover comment fragment
Timm Bäder [Fri, 28 Oct 2022 07:27:49 +0000 (09:27 +0200)]
[clang][Interp][NFC] Fix a file header comment
Timm Bäder [Wed, 26 Oct 2022 09:24:41 +0000 (11:24 +0200)]
[clang][Interp][NFC] Add Record::getName()
Useful for debugging.
Simon Pilgrim [Fri, 28 Oct 2022 10:48:33 +0000 (11:48 +0100)]
[DAG] visitFSUBForFMACombine - pass callbacks by reference in isContractableAndReassociableFMUL lambda capture. NFC.
Fixes a coverity remark about large copies by value
Martin Storsjö [Thu, 27 Oct 2022 19:48:24 +0000 (22:48 +0300)]
[LLD] [COFF] Include "rust_eh_personality" among the known personality functions
These need to have special treatment wrt to .eh_frame sections
and GC - as long as we don't have a full parser of the .eh_frame
section in the COFF linker.
This fixes Rust unwind issues on i686 mingw as discussed in
https://github.com/msys2/MINGW-packages/issues/9091.
Differential Revision: https://reviews.llvm.org/D136879
Michael Buch [Wed, 26 Oct 2022 13:40:34 +0000 (14:40 +0100)]
[lldb][Docs][NFC] Fix sphinx warnings/errors for LLDB docs
Ran `ninja docs-lldb-html` and made sure the docs are fixed.
Differential Revision: https://reviews.llvm.org/D136766
Momchil Velikov [Fri, 28 Oct 2022 09:36:47 +0000 (10:36 +0100)]
Recommit: [FuncSpec][NFC] Refactor finding specialisation opportunities
[recommitting after recommitting a dependency]
This patch reorders the traversal of function call sites and function
formal parameters to:
* do various argument feasibility checks (`isArgumentInteresting` )
only once per argument, i.e. doing N-args checks instead of
N-calls x N-args checks.
* do hash table lookups only once per call site, i.e. N-calls
lookups/inserts instead of N-call x N-args lookups/inserts.
Reviewed By: ChuanqiXu, labrinea
Differential Revision: https://reviews.llvm.org/D135968
Change-Id: I7d21081a2479cbdb62deac15f903d6da4f3b8529
Simon Pilgrim [Fri, 28 Oct 2022 10:19:53 +0000 (11:19 +0100)]
ConstraintElimination - pass const DataLayout by reference in (recursive) MergeResults lambda capture. NFC.
There's no need to copy this and fixes a coverity remark about large copy by value
Jay Foad [Fri, 28 Oct 2022 10:17:21 +0000 (11:17 +0100)]
[AMDGPU] Regenerate checks in waitcnt-overflow.mir. NFC.
Simon Pilgrim [Fri, 28 Oct 2022 10:05:26 +0000 (11:05 +0100)]
IndirectBrExpandPass - remove unused DL from lambda capture. NFC.
Oddly I wasn't seeing an unused variable warning - this came up in a coverity remark about large copy by values!
Stephen Thomas [Fri, 28 Oct 2022 09:59:03 +0000 (10:59 +0100)]
[AMDGPU] Small cleanups in wait counter code
A small number of cleanups and refactors intended to enhance readability in
two passes that deal with s_waitcnt instructions.
Differential Revision: https://reviews.llvm.org/D136677
Andrzej Warzynski [Fri, 21 Oct 2022 15:27:57 +0000 (15:27 +0000)]
[mlir][aarch64] XFAIL correctness.mlir
There are some discrepancies between the expected and the generated
output on AArch64 for this test. I reported these on GitHub:
* https://github.com/llvm/llvm-project/issues/58531
I'm XFAILing this test as a temporary measure while this is being
investigated.
Differential Revision: https://reviews.llvm.org/D136458
Haojian Wu [Fri, 28 Oct 2022 09:36:02 +0000 (11:36 +0200)]
Revert "[clang] Instantiate NTTPs and template default arguments with sugar"
This patch reverts
- commit
d4b1964f0554046b1e64908e5c1cd701b25f4c9e
- commit
59f0827e2cf3755834620e7e0b6d946832440f80([clang] Instantiate alias templates with sugar)
As it makes clang fail to pass some code it used to compile.
See comments: https://reviews.llvm.org/D136564#3891065
wanglei [Fri, 28 Oct 2022 09:49:47 +0000 (17:49 +0800)]
[LoongArch] Add emergency spill slot for GPR for large frames
An emergency spill slot is created when the stack size cannot be
represented by an 11-bit signed number.
This patch also modifies how the `sp` is adjusted in the prologue.
`RegScavenger` will place the spill instruction before the prologue
if a VReg is created in the prologue. This will pollute the caller's
stack data. Therefore, until there is better way, we just use the
`addi.w/d` instruction for stack adjustment to ensure that VReg will
not be created. (RISCV has the same issue #58286)
Due to the addition of emergency spill slot, some test cases that use
exact stacksize need to be updated.
Differential Revision: https://reviews.llvm.org/D135757
Jay Foad [Thu, 27 Oct 2022 14:05:35 +0000 (15:05 +0100)]
[AMDGPU] Clean up calls to MachineOperand::setIsDead and friends. NFC.
Oleg Shyshkov [Fri, 28 Oct 2022 09:31:58 +0000 (11:31 +0200)]
Revert "Revert "[mlir][linalg] Add nicer builders for `map` and `reduce`.""
This reverts commit
7eef3ea5f4fe4f4cc461b191bac031e3962d0347.
Oleg Shyshkov [Fri, 28 Oct 2022 08:29:01 +0000 (10:29 +0200)]
[mlir][linalg] Fix linalg.transpose region builder.
The region should yield the first argument (input) not the last argument
(output). Also fix a few tests that were affected by this bug.
Differential Revision: https://reviews.llvm.org/D136924
David Green [Fri, 28 Oct 2022 09:15:41 +0000 (10:15 +0100)]
[InstCombine] Don't change switch table from desirable to illegal types
In InstCombine we treat i8/i16 as desirable, even if they are not legal.
The current logic in shouldChangeType will decide to convert from an
illegal but desirable type (such as an i8) to an illegal and undesirable
type (such as i3). This patch prevents changing the switch conditions to
an irregular type on like Arm/AArch64 where i8/i16 are not legal.
This is the same issue as https://reviews.llvm.org/D54115. In the case I
was looking it is was converting an i32 switch to an i8 switch, which
then became a i3 switch.
Differential Revision: https://reviews.llvm.org/D136763
eopXD [Thu, 27 Oct 2022 07:42:46 +0000 (00:42 -0700)]
[Clang] Improve diagnostic message for loop hint pragma
Originally the loop hint is not displayed correctly in the diagnostic.
This patch fixes it.
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D136784
wanglei [Fri, 28 Oct 2022 08:18:40 +0000 (16:18 +0800)]
[LoongArch] Split SP adjustment
This patch split the SP adjustment to reduce the instructions in
prologue and epilogue. In this way, the offset of the callee saved
register could fit in a single store.
Similar to D68011(RISCV).
Differential Revision: https://reviews.llvm.org/D136222
Christian Sigg [Thu, 27 Oct 2022 08:08:52 +0000 (10:08 +0200)]
[mlir][gpu] Unroll ops on vectors which map to intrinsic calls
Unroll ops that map to intrinsics when lowering to LLVM, because intrinsics don't support vector operands/results.
Reviewed By: herhut
Differential Revision: https://reviews.llvm.org/D136345
chenglin.bi [Fri, 28 Oct 2022 08:30:14 +0000 (16:30 +0800)]
Revert "[AArch64] Adjust operand sequence for Add+Sub to combine more inline shift"
This reverts commit
ada9ab610727917561370e976eaea26dbbc20cce.
Nikita Popov [Wed, 26 Oct 2022 11:05:20 +0000 (13:05 +0200)]
[ARM] Use DefaultAttrsIntrinsics
Use DefaultAttrsIntrinsics for most ARM intrinsics. This adds the
WillReturn, NoSync, NoFree and NoCallback attributes and is needed
to avoid regressions in the future.
I've switched to DefaultAttrIntrinsics for everything doing arithmetic
and load/store. I've left some TODOs in cases where all DefaultsAttrs
are not correct (e.g. ldrex etc are clearly not nosync) or it wasn't
entirely obvious to me (e.g. stuff interacting with a coprocessor).
Differential Revision: https://reviews.llvm.org/D136758
Oleg Shyshkov [Fri, 28 Oct 2022 07:56:59 +0000 (09:56 +0200)]
Revert "[mlir][linalg] Add nicer builders for `map` and `reduce`."
This reverts commit
aebde280476943e58f5bcd9993fdd7e36cdbe47e.
Juan Manuel MARTINEZ CAAMAÑO [Wed, 26 Oct 2022 08:57:36 +0000 (03:57 -0500)]
[StructurizeCFG][DebugInfo] Maintain DILocations in the branches created by StructurizeCFG
Make StructurizeCFG preserve the debug locations of the branch instructions it introduces.
Differential Revision: https://reviews.llvm.org/D135967
Michał Górny [Mon, 24 Oct 2022 13:50:41 +0000 (15:50 +0200)]
[flang] Fix building against clang dylib
Differential Revision: https://reviews.llvm.org/D136606
Sander de Smalen [Fri, 28 Oct 2022 07:08:08 +0000 (07:08 +0000)]
[AArch64][SME] Set fn attributes correctly on __arm_tpidr2_save call.
Changing the way the attribute is created changes the way the attribute
is added. Now it seems to be correctly added as a function attribute, whereas
before it was not. This led ISel ignoring attributes and setting up a lazy-save
buffer for the call to __arm_tpidr2_save.
This patch also marks the intrinsic call as 'preserves_za' which together with the
above prevents the code-generator from setting up a lazy-save buffer.
Reviewed By: kmclaughlin
Differential Revision: https://reviews.llvm.org/D136342
Pavel Labath [Fri, 28 Oct 2022 07:04:14 +0000 (09:04 +0200)]
[lldb/qemu] Stub out process info functions
These functions return the information about the host process (so they
show the executable as "qemu" and have the "wrong" architecture), which
isn't useful and can confuse lldb.
We could theoretically try to identify which host processes are running
an emulator, and translate the process information, but that would be
tricky to implement, and the usefulness of it would be fairly limited as
qemu does not support attaching to a running process.
Valery Pykhtin [Fri, 28 Oct 2022 07:15:37 +0000 (09:15 +0200)]
Revert "[AMDGPU] Add EXPENSIVE_CHECK into GCNRPTracker::reset"
This reverts commit
fecf067db40ffa1a6d5d665769c90cd29547f502.
The change introduces 420 test failures with EXPENSIVE_CHECK in AMDGPU which I don't want to disable.
Going to fix the failures and recommit the check.
David Sherwood [Wed, 19 Oct 2022 14:29:51 +0000 (14:29 +0000)]
[AArch64][SVE2] Add the SVE2.1 extract-and-narrow instructions
This patch adds the assembly/disassembly for the following instructions:
sqcvtn : Signed saturating extract narrow and interleave
sqcvtun : Signed saturating unsigned extract narrow and interleave
uqcvtn : Unsigned saturating extract narrow and interleave
The reference can be found here:
https://developer.arm.com/documentation/ddi0602/2022-09
Differential revision: https://reviews.llvm.org/D136689
Oleg Shyshkov [Thu, 27 Oct 2022 18:48:04 +0000 (20:48 +0200)]
[mlir][linalg] Add nicer builders for `map` and `reduce`.
The new builders get a list of additional attrs, a lambda to build the region
body and infer return types from `init`.
Differential Revision: https://reviews.llvm.org/D136838
Michał Górny [Mon, 24 Oct 2022 04:58:55 +0000 (06:58 +0200)]
[llvm] [cmake] Silence GNUInstallDirs warning in LLVMInstallSymlink
Set a dummy CMAKE_INSTALL_LIBDIR in order to silence the following CMake
warning when executing LLVMInstallSymlink.cmake script:
CMake Warning (dev) at /usr/share/cmake/Modules/GNUInstallDirs.cmake:243 (message):
Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
target architecture is known. Please enable at least one language before
including GNUInstallDirs.
Call Stack (most recent call first):
/usr/lib/llvm/16/lib64/cmake/llvm/LLVMInstallSymlink.cmake:5 (include)
tools/lld/cmake_install.cmake:66 (include)
cmake_install.cmake:52 (include)
Differential Revision: https://reviews.llvm.org/D136573
Michał Górny [Mon, 24 Oct 2022 04:31:37 +0000 (06:31 +0200)]
Harmonize cmake_policy() across standalone builds of all projects
Move `cmake_policy()` settings from `llvm/CMakeLists.txt` into a shared
`cmake/modules/CMakePolicy.cmake`. Include it from all relevant
projects that support standalone builds, in order to ensure that
the policies are consistently set whether they are built in-tree
or stand-alone.
Differential Revision: https://reviews.llvm.org/D136572
Valery Pykhtin [Thu, 27 Oct 2022 07:06:27 +0000 (09:06 +0200)]
[AMDGPU] Add EXPENSIVE_CHECK into GCNRPTracker::reset
This would check if passed in live-ins registers match those calculated using LIS.
This check currently breaks 420 lit tests when enabled.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D136860
Pierre van Houtryve [Fri, 28 Oct 2022 06:28:35 +0000 (06:28 +0000)]
[DAGCombiner] Use `getAnyExtOrTrunc` instead of TRUNCATE in ExtractVectorElt combine
ScalarVT isn't guaranteed to be smaller than the BCSrc.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D136849
Valentin Clement [Fri, 28 Oct 2022 06:30:53 +0000 (08:30 +0200)]
[flang] Carry polymoprhic dynamic type when using coordinate_of polymoprhic array
Dynamic type of a polymorphic array element was retrieved by finding the
coordinate operation and use the base array. This patch remove this hack and use
the newly PolymorphicValue to carray the dynamic type together with the element.
The patch also rearrange some tests in the `allocatable-polymorphic.f90`.
Depends on D136824
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D136857
Advenam Tacet [Fri, 28 Oct 2022 05:14:14 +0000 (22:14 -0700)]
[1b/3][ASan][compiler-rt] API for annotating objects memory
This revision is a part of a series of patches extending AddressSanitizer C++ container overflow detection capabilities by adding annotations, similar to those existing in std::vector, to std::string and std::deque collections. These changes allow ASan to detect cases when the instrumented program accesses memory which is internally allocated by the collection but is still not in-use (accesses before or after the stored elements for std::deque, or between the size and capacity bounds for std::string).
The motivation for the research and those changes was a bug, found by Trail of Bits, in a real code where an out-of-bounds read could happen as two strings were compared via a std::equals function that took iter1_begin, iter1_end, iter2_begin iterators (with a custom comparison function). When object iter1 was longer than iter2, read out-of-bounds on iter2 could happen. Container sanitization would detect it.
This revision extends a compiler-rt ASan sanitization API function sanitizer_annotate_contiguous_container used to sanitize/annotate containers like std::vector to support different allocators and situations when granules are shared between objects. Those changes are necessary to support annotating objects' self memory (in contrast to annotating memory allocated by an object) like short std::basic_string (with short string optimization). That also allows use of non-standard memory allocators, as alignment requirement is no longer necessary.
This also updates an API function to verify if a double ended contiguous container is correctly annotated (__sanitizer_verify_contiguous_container).
If you have any questions, please email:
advenam.tacet@trailofbits.com
disconnect3d@trailofbits.com
Reviewed By: #sanitizers, vitalybuka
Differential Revision: https://reviews.llvm.org/D132522
Carlos Alberto Enciso [Fri, 28 Oct 2022 06:20:15 +0000 (07:20 +0100)]
[llvm-debuginfo-analyzer] (08/09) - ELF Reader - Disable test.
Disable the test case: 06-dwarf-full-logical-view.test
It produces incorrect data on ARM:
https://lab.llvm.org/buildbot/#/builders/182/builds/4232
https://lab.llvm.org/buildbot/#/builders/187/builds/9483
Expected:
189 (100.00%) : [0x000000000b][001] {CompileUnit}
110 ( 58.20%) : [0x000000002a][002] 2 {Function}
27 ( 14.29%) : [0x0000000071][003] {Block}
Generated:
3432 ( 0.00%) : [0x000000000b][001] {CompileUnit}
3351 ( 0.00%) : [0x000000002a][002] 2 {Function}
3234 ( 0.00%) : [0x0000000071][003] {Block}
Alexander Shaposhnikov [Fri, 28 Oct 2022 05:30:19 +0000 (05:30 +0000)]
[clang-tidy] Skip template ctors in modernize-use-equals-default
Skip template ctors in modernize-use-equals-default,
such constructors may be enabled/disabled via SFINAE,
it is not safe to make them "= default".
Test plan: ninja check-all
Differential revision: https://reviews.llvm.org/D136797
Wael Yehia [Thu, 27 Oct 2022 18:37:26 +0000 (14:37 -0400)]
[PGO] Simplify InstrProfilingRuntime.cpp
Differential Revision: https://reviews.llvm.org/D136192
Vitaly Buka [Fri, 28 Oct 2022 04:35:08 +0000 (21:35 -0700)]
[test] Disable the test with asan
There is a memory leak.
See comments in https://reviews.llvm.org/D125783
Ye Luo [Thu, 27 Oct 2022 19:01:18 +0000 (14:01 -0500)]
[DeviceRTL] Fix incremental build
Need both add_custom_command to resolve file-level dependency and add_custom_target to resolve target-level dependency.
From CMake add_custom_command doc:
Do not list the output in more than one independent target that may build in parallel or the two instances of the rule may conflict (instead use the add_custom_target() command to drive the command and make the other targets depend on that one).
${CMAKE_CURRENT_BINARY_DIR}/${bclib_name} is used by multiple targets and thus requires a custom target to avoid racing.
Differential Revision: https://reviews.llvm.org/D136911
LLVM GN Syncbot [Fri, 28 Oct 2022 02:40:48 +0000 (02:40 +0000)]
[gn build] Port
23f02693ec58
Freddy Ye [Fri, 28 Oct 2022 01:43:38 +0000 (09:43 +0800)]
[X86] Add AVX-VNNI-INT8 instructions.
For more details about these instructions, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html
Reviewed By: pengfei, skan
Differential Revision: https://reviews.llvm.org/D135938
Valery Pykhtin [Tue, 25 Oct 2022 18:07:13 +0000 (20:07 +0200)]
[AMDGPU] Refactor debug printing routines for GCNRPTracker
Use Printable to enhance syntax, remove duplication, unify.
Reviewed By: arsenm, rampitec
Differential Revision: https://reviews.llvm.org/D136704
LLVM GN Syncbot [Fri, 28 Oct 2022 01:53:34 +0000 (01:53 +0000)]
[gn build] Port
0e720e6adad1
Emilio Cota [Fri, 28 Oct 2022 01:40:33 +0000 (21:40 -0400)]
[mlir][spirv] fix Bazel build of Passes.h
I cannot repro this with CMake, but on Bazel this is failing with
```
error: incomplete result type 'mlir::spirv::TargetEnvAttr' in function definition
[...]
note: in instantiation of member function 'std::function<mlir::spirv::TargetEnvAttr (mlir::spirv::ModuleOp)>::function' requested here
createUnifyAliasedResourcePass(GetTargetEnvFn getTargetEnv = nullptr);
```
Reviewed By: antiagainst
Differential Revision: https://reviews.llvm.org/D136909
Freddy Ye [Fri, 28 Oct 2022 01:11:29 +0000 (09:11 +0800)]
[X86] Add AVX-IFMA instructions.
For more details about these instructions, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html
Reviewed By: pengfei, skan
Differential Revision: https://reviews.llvm.org/D135932
Carl Ritson [Fri, 28 Oct 2022 00:26:50 +0000 (09:26 +0900)]
[AMDGPU] Add pseudo wavemode to optimize strict_wqm
Strict WQM does not require a WQM transistion if it occurs within
an existing WQM section.
This occurs heavily in GFX11 pixel shaders with LDS_PARAM_LOAD.
Which leads to unnecessary EXEC mask manipulation.
To avoid these transitions, detect WQM -> Strict WQM -> WQM
and substitute new ENTER_PSEUDO_WM/EXIT_PSEUDO_WM markers instead.
These are treat similarly by WWM register pre-allocation pass,
but do not manipulate EXEC or use registers to save EXEC state.
Reviewed By: piotr
Differential Revision: https://reviews.llvm.org/D136813
Katherine Rasmussen [Thu, 27 Oct 2022 00:15:08 +0000 (17:15 -0700)]
[flang] Add atomic_fetch_xor to list of intrinsics
Add the atomic subroutine, atomic_fetch_xor, to the list of
intrinsic subroutines, add its last dummy argument to a check
for coindexed-object, and update test.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D136804
Fangrui Song [Thu, 27 Oct 2022 23:58:22 +0000 (23:58 +0000)]
[mlir][arith] Fix -Wunused-but-set-variable
Jason Molenda [Thu, 27 Oct 2022 23:46:55 +0000 (16:46 -0700)]
Remove compile-time and runtime checks for SPI in HostInfoMacOSX
There are conditionalized calls to an SPI in HostInfoMacOSX.mm
to test if lldb is being built against a pre-macOS 10.12 SDK,
or being run on a pre-macOS 10.12 system. macOS 10.12 was released
six years ago, and I don't know of any active users of this system
so let's remove the checks.
Differential Revision: https://reviews.llvm.org/D136900
rdar://
101652340
zhongyunde [Thu, 27 Oct 2022 23:52:24 +0000 (07:52 +0800)]
[AArch64] Optimize memcmp when the result is tested for [in]equality with 0
Fixes 1st issue of https://github.com/llvm/llvm-project/issues/58061
Reviewed By: dmgreen, efriedma
Differential Revision: https://reviews.llvm.org/D136244
Zequan Wu [Tue, 18 Oct 2022 22:58:07 +0000 (15:58 -0700)]
[LLDB][NativePDB] Fix parameter size for member functions LF_MFUNCTION
Fix the problem that it was treating member functions as non-member functions
when trying to get the parameter size. This causes some non-parameter variables
showing up in function signature. Suprisingly,
`cantFail(TypeDeserializer::deserializeAs<ProcedureRecord>(...))` just sliently
parse it without error and gave the wrong result.
It's hard to test it. This only causes problem when `params_remaining`
is larger than the real parameter size. If it's smaller, we also check
individual local variable's attribute to see it's a parameter. When I trying to
come up with a test, the parameter size is always 0 if we parse LF_MFUNCTION as
LF_PROCEDURE.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D136209
Alexey Bataev [Tue, 28 Dec 2021 13:23:10 +0000 (05:23 -0800)]
[SLP]Improve analysis of same/alternate code ops and scheduling.
Should improve compile time for analysis and vectorization.
Metric: SLP.NumVectorInstructions
Program SLP.NumVectorInstructions
test-suite :: External/SPEC/CINT2017speed/623.xalancbmk_s/623.xalancbmk_s.test 6380.00 6378.00 -0.0%
test-suite :: External/SPEC/CINT2017rate/523.xalancbmk_r/523.xalancbmk_r.test 6380.00 6378.00 -0.0%
test-suite :: External/SPEC/CINT2006/483.xalancbmk/483.xalancbmk.test 2023.00 2022.00 -0.0%
test-suite :: External/SPEC/CINT2006/471.omnetpp/471.omnetpp.test 148.00 146.00 -1.4%
Generated more vector instructions.
Differential Revision: https://reviews.llvm.org/D127531
Nikolas Klauser [Thu, 27 Oct 2022 18:01:13 +0000 (20:01 +0200)]
[libc++][math.h] Remove unnecessary uses of __promote
Removes __promote when it's just the identity.
Reviewed By: ldionne, #libc
Spies: libcxx-commits, michaelplatings
Differential Revision: https://reviews.llvm.org/D136868
Diego Caballero [Wed, 26 Oct 2022 01:18:15 +0000 (01:18 +0000)]
[mlir][Vector] Introduce the `vector.mask` operation lowering
This patch introduces the lowering for xfer ops masked with `vector.mask`.
Vector reductions are not lowered yet because new LLVM intrinsics are needed
in the LLVM dialect.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D136741
Diego Caballero [Wed, 26 Oct 2022 00:58:56 +0000 (00:58 +0000)]
[mlir][Vector] Introduce the MaskingOpInterface
This MaskingOpInterface provides masking cababilitites to those
operations that implement it. For only is only implemented by the `vector.mask`
operation and it's used to break the dependency between the Vector
dialect (where the `vector.mask` op lives) and operations implementing
the MaskableOpInterface.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D136734
Alex Zinenko [Fri, 21 Oct 2022 00:53:05 +0000 (00:53 +0000)]
[mlir] ODS: emit interface model method at the end of the header
Previously, ODS interface generator was placing implementations of the
interface's internal "Model" class template immediately after the class
definitions in the header. This doesn't allow this implementation, and
consequently the interface itself, to return an instance of another
interface if its class definition is emitted below. This creates
undesired ordering effects and makes it impossible for two or more
interfaces to return instances of each other. Change the interface
generator to place the implementations of these methods after all
interface classes.
Reviewed By: dcaballe
Differential Revision: https://reviews.llvm.org/D136322
Amy Huang [Thu, 27 Oct 2022 22:41:49 +0000 (22:41 +0000)]
Fix documentation error in
e8433a2b06d5
Amy Huang [Tue, 18 Oct 2022 17:56:41 +0000 (17:56 +0000)]
Update docs for -fuse-ctor-homing
Update docs to reflect the fact that this flag is on by default now.
Differential Revision: https://reviews.llvm.org/D136188
Alexey Bataev [Thu, 27 Oct 2022 21:42:07 +0000 (14:42 -0700)]
Revert "[SLP]Improve analysis of same/alternate code ops and scheduling."
This reverts commit
dad64448c66975054d3d968232652a56eb93b451 to fix
a crash in https://lab.llvm.org/buildbot/#/builders/74/builds/14584
Jorge Gorbe Moya [Thu, 27 Oct 2022 21:48:44 +0000 (14:48 -0700)]
[lldb-vscode] Don't call SBValue.GetError after generating a summary.
In some occasions, SBValue::GetError can invalidate its cached
`m_summary_str` member. This in turn invalidates any StringRef variables
pointing to it.
Differential Revision: https://reviews.llvm.org/D136890
Aaron Siddhartha Mondal [Wed, 26 Oct 2022 17:10:07 +0000 (19:10 +0200)]
[Bazel] Add missing C++ style Clang headers and modulemap
Reviewed By: chapuni
Differential Revision: https://reviews.llvm.org/D136452
Emilio Cota [Thu, 27 Oct 2022 20:45:14 +0000 (16:45 -0400)]
[mlir] Fix typo s/utilties/utilities/ (including in file name)
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D136887
Xing Xue [Thu, 27 Oct 2022 21:06:18 +0000 (17:06 -0400)]
[libc++abi][AIX] Use reserved slot in stack to pass the address of exception object
Summary:
The existing implementation of the personality for legacy IBM xlclang++ compiler generated code passes the address of exception object in r14 for the landing pad to retrieve with a call to __xlc_exception_handle(). This clobbers the content of r14 in user code (and potentially, when running cleanup actions, the address of another exception object being passed). This patch changes to use the stack slot reserved for compilers to pass the address. It has been confirmed that xlclang++-generated code does not use this slot.
This is a follow-on of the origibal patch below with a change in comments.
https://reviews.llvm.org/rGa499051f10a2d0150b60c14493558476039f701a
Reviewed by: hubert.reinterpretcast, cebowleratibm
Differential Revision: https://reviews.llvm.org/D136257
Peiming Liu [Wed, 26 Oct 2022 19:07:25 +0000 (19:07 +0000)]
[mlir][sparse] code refactoring, move <tid, loop id> -> dim map to Merger.
To address unresolved comments in D136185
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D136780
Kevin Athey [Thu, 27 Oct 2022 20:57:25 +0000 (13:57 -0700)]
Revert "[OpenMP] [OMPIRBuilder] Create a new datatype to hold the unique target region info"
This reverts commit
3d0e9edd8e53fb72e85084f4170513159212839a.
Breaking HWASAN buildbot:
https://lab.llvm.org/buildbot/#/builders/236/builds/786
Shown by targetted builds breaking at this patch:
Built at this patch: https://lab.llvm.org/buildbot/#/builders/236/builds/803
Built at prior patch: https://lab.llvm.org/buildbot/#/builders/236/builds/804
Aart Bik [Thu, 27 Oct 2022 19:43:39 +0000 (12:43 -0700)]
[mlir][sparse] fix typo "admissable" -> "admissible"
Reviewed By: wrengr, Peiming
Differential Revision: https://reviews.llvm.org/D136878
David Blaikie [Thu, 27 Oct 2022 20:41:22 +0000 (20:41 +0000)]
Clang: Add release note for defaulted-special-members-POD GCC ABI fix
Follow-up to
7846d590033e8d661198f4c00f56f46a4993c526
David Blaikie [Thu, 27 Oct 2022 19:35:04 +0000 (19:35 +0000)]
[BinaryFormat:Dwarf] Add a couple of DW_IDX_GCC extensions
Seen here:
https://github.com/gcc-mirror/gcc/blob/
16e2427f50c208dfe07d07f18009969502c25dc8/include/dwarf2.def#L805-L806
Hongtao Yu [Mon, 17 Oct 2022 17:07:18 +0000 (10:07 -0700)]
[PseudoProbe] Replace relocation with offset for entry probe.
Currently pseudo probe encoding for a function is like:
- For the first probe, a relocation from it to its physical position in the code body
- For subsequent probes, an incremental offset from the current probe to the previous probe
The relocation could potentially cause relocation overflow during link time. I'm now replacing it with an offset from the first probe to the function start address.
A source function could be lowered into multiple binary functions due to outlining (e.g, coro-split). Since those binary function have independent link-time layout, to really avoid relocations from .pseudo_probe sections to .text sections, the offset to replace with should really be the offset from the probe's enclosing binary function, rather than from the entry of the source function. This requires some changes to previous section-based emission scheme which now switches to be function-based. The assembly form of pseudo probe directive is also changed correspondingly, i.e, reflecting the binary function name.
Most of the source functions end up with only one binary function. For those don't, a sentinel probe is emitted for each of the binary functions with a different name from the source. The sentinel probe indicates the binary function name to differentiate subsequent probes from the ones from a different binary function. For examples, given source function
```
Foo() {
…
Probe 1
…
Probe 2
}
```
If it is transformed into two binary functions:
```
Foo:
…
Foo.outlined:
…
```
The encoding for the two binary functions will be separate:
```
GUID of Foo
Probe 1
GUID of Foo
Sentinel probe of Foo.outlined
Probe 2
```
Then probe1 will be decoded against binary `Foo`'s address, and Probe 2 will be decoded against `Foo.outlined`. The sentinel probe of `Foo.outlined` makes sure there's not accidental relocation from `Foo.outlined`'s probes to `Foo`'s entry address.
On the BOLT side, to be minimal intrusive, the pseudo probe re-encoding sticks with the old encoding format. This is fine since unlike linker, Bolt processes the pseudo probe section as a whole and it is free from relocation overflow issues.
The change is downwards compatible as long as there's no mixed use of the old encoding and the new encoding.
Reviewed By: wenlei, maksfb
Differential Revision: https://reviews.llvm.org/D135912
Differential Revision: https://reviews.llvm.org/D135914
Differential Revision: https://reviews.llvm.org/D136394
Valentin Clement [Thu, 27 Oct 2022 20:23:40 +0000 (22:23 +0200)]
[flang] Remove debug flag added in D136824
wlei [Thu, 27 Oct 2022 20:13:04 +0000 (13:13 -0700)]
Use getCanonicalFnName for callee name
Ji, Jinsong [Thu, 27 Oct 2022 19:56:49 +0000 (12:56 -0700)]
[docs] Fix old path for clang-format
The path in vimrc was old, replace it with <path-to-this-file> to be
consistent with above.
Jason Molenda [Thu, 27 Oct 2022 20:11:20 +0000 (13:11 -0700)]
Handle an unknown binary platform type in debugserver
debugserver parses the Mach-O header & load commands of
binaries; if it does this with a binary whose LC_BUILD
platform enum it does not recognize, it will currently crash.
This patch changes MachProcss::GetPlatformString to return
an optional platform string, and updates the callers to
do the right thing when this optional could not be
provided.
Differential Revision: https://reviews.llvm.org/D136719
rdar://
100452994
Troy Johnson [Thu, 27 Oct 2022 19:31:34 +0000 (12:31 -0700)]
[clang][Sema][NFC] Remove redundant isTypeValid
These isTypeValid calls are redundant because the isDerivedFrom call performs the same checks.
Differential Revision: https://reviews.llvm.org/D136190
Joe Loser [Thu, 27 Oct 2022 15:05:08 +0000 (09:05 -0600)]
[ADT] Simplify hashing for tuples
Instead of using `std::index_sequence` with a helper function template to access
each element in the tuple, leverage `std::apply` from C++17 to do the heavy
lifting for us.
Differential Revision: https://reviews.llvm.org/D136850
Sanjay Patel [Thu, 27 Oct 2022 19:24:02 +0000 (15:24 -0400)]
[InstCombine] improve efficiency of sub demanded bits; NFC
There's no reason to shrink a constant or simplify
an operand in 2 steps.
This matches what we currently do for 'add' (although that
seems like it should be altered to handle the commutative
case).
Dmitry Sidorov [Thu, 27 Oct 2022 18:06:22 +0000 (14:06 -0400)]
[IR] Allow typed pointers to be used in vector types
Reviewed By: nikic, jcranmer-intel
Differential Revision: https://reviews.llvm.org/D136768
Jordan Rupprecht [Thu, 27 Oct 2022 19:23:22 +0000 (12:23 -0700)]
[NFC] Remove unused variables
Kristof Beyls [Thu, 27 Oct 2022 19:14:32 +0000 (21:14 +0200)]
Community calendar: more clearly document how to add events
Xing Xue [Thu, 27 Oct 2022 19:11:06 +0000 (15:11 -0400)]
[libc++abi][AIX] Use reserved slot in stack to pass the address of exception object
Summary:
The existing implementation of the personality for legacy IBM xlclang++ compiler generated code passes the address of exception object in r14 for the landing pad to retrieve with a call to __xlc_exception_handle(). This clobbers the content of r14 in user code (and potentially, when running cleanup actions, the address of another exception object being passed). This patch changes to use the stack slot reserved for compilers to pass the address. It has been confirmed that xlclang++-generated code does not use this slot.
Reviewed by: hubert.reinterpretcast, cebowleratibm
Jeff Niu [Tue, 25 Oct 2022 16:28:53 +0000 (09:28 -0700)]
[mlir] Add `parseSymbolName` that doesn't take an attribute list
This patch adds a version of `parseSymbolName` and
`parseOptionalSymbolName` to AsmParser that don't take an attribute name
and attribute list.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D136696
Valentin Clement [Thu, 27 Oct 2022 18:56:39 +0000 (20:56 +0200)]
[flang] Carry dynamic type when emboxing polymorphic pointer
In order to be passed as passed-object in the dynamic dispatch, the
polymorphic pointer entity are emboxed. In this process, the dynamic
type must be preserve and pass to fir.embox as the tdesc operand. This
patch introduce a new ExtendedValue that allow to carry over the
dynamic type when the value is unboxed.
Depends on D136820
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D136824