Valentin Clement [Fri, 9 Dec 2022 14:37:25 +0000 (15:37 +0100)]
[flang] Embox derived-type when passed to element procedure as passed object
In elemental procedure lowering the passed object is always emboxed. The current code
was not correctly dealing with scalar derived-type used as passed object.
Reviewed By: jeanPerier, PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D139667
Nikita Popov [Fri, 9 Dec 2022 14:30:40 +0000 (15:30 +0100)]
[GVN] Regenerate test checks (NFC)
David Truby [Tue, 22 Nov 2022 13:32:47 +0000 (13:32 +0000)]
[openmp][mlir] Lower parallel if to new fork_call_if function.
This patch adds a new runtime function `fork_call_if` and uses that
to lower parallel if statements when going through OpenMPIRBuilder.
This fixes an issue where the OpenMPIRBuilder passes all arguments to
fork_call as a struct but this struct is not filled corretly in the
non-if branch by handling the fork inside the runtime.
Differential Revision: https://reviews.llvm.org/D138495
Matthias Springer [Fri, 9 Dec 2022 14:17:30 +0000 (15:17 +0100)]
[mlir][linalg] Fold duplicate and unused inputs in linalg.generic
If an input bbArg is not used, its corresponding input operand is removed. If there are duplicate input operands or input operands that are also used as output operands, the duplicate input operands are removed. Output operands are never modified.
Differential Revision: https://reviews.llvm.org/D139709
Alex Richardson [Fri, 9 Dec 2022 13:42:47 +0000 (13:42 +0000)]
[MemoryBuiltins] Avoid comparing against Type::getInt8PtrTy(0)
This does not make sense with opaque pointers, and also caused issues for
CHERI/Morello where hardcoding address-space zero prevented optimization.
Downstream change: https://git.morello-project.org/morello/llvm-project/-/merge_requests/180
Co-authored-by: Silviu Baranga <silviu.baranga@arm.com>
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D139708
Nico Weber [Fri, 9 Dec 2022 13:56:02 +0000 (08:56 -0500)]
[clang] Try to unbreak test/C/drs/dr324.c on Windows
The test uses
#pragma GCC dependency "oops\..\dr0xx.c"
to test preprocessor "tokenization obscurities". However, that
pragma also emits a warning if the refered file is newer than the
current file -- and
d694e2490af8 edited dr0xx.c, causing this warning
to fire.
As workaround, touch this file, so that it's newer than dr0xx.c again.
Sam McCall [Fri, 9 Dec 2022 13:30:04 +0000 (14:30 +0100)]
[Serialization] Add -ftime-trace block for reading loaded modules.
The existing ReadAST block only describes the top-level PCM file being
loaded, when in practice most of the time taken is dealing with other
PCM files which are loaded in turn.
Because this work isn't strictly recursive (first all the modules are
discovered, then processsed in several flat loops), we can't have a neat
recursive structure like processing of source files. Instead, slap a
timer on the largest of these boxes: reading the AST block for modules.
In practice this shows where most of the time goes, and in particular
which modules are most expensive.
Matthias Springer [Fri, 9 Dec 2022 13:30:08 +0000 (14:30 +0100)]
[mlir][bufferize] Improve analysis of external functions
External functions have no body, so they cannot be analyzed. Assume conservatively that each tensor bbArg may be aliasing with each tensor result. Furthermore, assume that each function arg is read and written-to after bufferization. This default behavior can be controlled with `bufferization.access` (similar to `bufferization.memory_layout`) in test cases.
Also fix a bug in the dialect attribute verifier, which did not run for region argument attributes.
Differential Revision: https://reviews.llvm.org/D139517
Nico Weber [Fri, 9 Dec 2022 13:32:10 +0000 (08:32 -0500)]
Revert "[lld-macho] Fix bug in reading cpuSubType field."
This reverts commit
e54cfa48d2d56e025fee9e239f8ba4fdec5520c8.
Test fails at least on macOS: https://reviews.llvm.org/D139572#3984162
Nico Weber [Fri, 9 Dec 2022 13:32:01 +0000 (08:32 -0500)]
Revert "Mark test lld/test/MachO/fat-arch.s updated in e54cfa4 to require aarch64."
This reverts commit
9c381c430e413b2c2b7a15e43f4db3f4b7a7e138.
Prerequisite for reverting
e54cfa48d2d56e025fee9e239f8ba4fdec5520c8.
Nikita Popov [Fri, 9 Dec 2022 13:29:51 +0000 (14:29 +0100)]
[TBAA] Avoid duplicate set lookup (NFC)
Tobias Gysi [Fri, 9 Dec 2022 12:40:18 +0000 (14:40 +0200)]
[mlir][llvm] Improve LLVM IR import error handling.
Instead of exiting in the middle of the import handle errors more
gracefully by printing an error message and returning failure. The
revision handles and tests the import of unsupported instructions,
values, constants, and intrinsics.
Depends on D139404
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D139405
Manas [Fri, 9 Dec 2022 12:30:57 +0000 (13:30 +0100)]
[analyzer][solver] Introduce reasoning for not equal to operator
With this patch, the solver can infer results for not equal (!=) operator
over Ranges as well. This also fixes the issue of comparison between
different types, by first converting the RangeSets to the resulting type,
which then can be used for comparisons.
Patch by Manas.
Reviewed By: steakhal
Differential Revision: https://reviews.llvm.org/D112621
Alexey Bataev [Thu, 8 Dec 2022 21:32:25 +0000 (13:32 -0800)]
[SLP][NFC]prepare isUndefVector function to be used for differently
sized vectors as shuffle masks, NFC.
Use use-mask instead of actual mask to speed up the process and make it
possible to use for the cases where the mask is used for vector
resizing.
Haojian Wu [Sat, 26 Nov 2022 00:02:25 +0000 (01:02 +0100)]
[include-cleaner] Filter out references that not spelled in the main file.
A HTML report of gtest after this patch:
https://gist.githubusercontent.com/hokein/
73eee6f65a803e5702d8388c187524a6/raw/
cf05a503519703a2fb87840bb0b270fe11a7a9fd/RecordTest.html
Differential Revision: https://reviews.llvm.org/D138779
Nikita Popov [Fri, 9 Dec 2022 11:57:40 +0000 (12:57 +0100)]
[MemoryBuiltins] Remove unused TLI parameters (NFC)
Nikita Popov [Fri, 9 Dec 2022 11:45:00 +0000 (12:45 +0100)]
[MemoryBuiltins] Remove CallocLike (NFC)
All functions of this kind already use allocator attributes. This
also highlights that isMallocOrCallocLikeFn() doesn't really do
what the name says (notably, it does not check for allocator
attributes). The places it is used in are also very dubious, so
we'll want to remove it.
Simon Pilgrim [Fri, 9 Dec 2022 11:45:59 +0000 (11:45 +0000)]
[SLP][X86] slp-fma-loss.ll - add various targets with different FMA abilities
Add targets with FMA3, FMA4 and no-FMA support
Should help with D132872 testing
Nikita Popov [Fri, 9 Dec 2022 11:35:43 +0000 (12:35 +0100)]
[MemoryBuiltins] Remove AlignedAllocLike (NFC)
All functions that formerly had this AllocType now use allocator
attributes, so drop it.
Ilya Biryukov [Wed, 7 Dec 2022 16:14:27 +0000 (17:14 +0100)]
[clangd] NFC. Add a newline at the end of the file
Haojian Wu [Fri, 9 Dec 2022 11:10:13 +0000 (12:10 +0100)]
[include-cleaner] Fix walkUsed only report a single macro ref.
The fix
962343a979d51cea9363167e9121c446abbdfdbc was reverted during a
rebase of a later patch. Added a test.
serge-sans-paille [Thu, 8 Dec 2022 14:29:05 +0000 (15:29 +0100)]
[NFC] Finish cleaning up StringRef usage in OptTable::ParseOneArg
This is a followup to https://reviews.llvm.org/D139274
Tobias Gysi [Fri, 9 Dec 2022 10:31:53 +0000 (11:31 +0100)]
[mlir][llvm] Modernize LLVM instruction and global import (NFC).
Modernize the import of LLVMIR instructions and global variables.
Use longer variable names, factor out code used to import call or
invoke instructions, use the CPP builders for importing branch
instructions, etc. The revision is a preparation for a follow up
revision that moves the import code to implement improved error
handling.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D139404
Dmitry Makogon [Tue, 6 Dec 2022 16:18:48 +0000 (23:18 +0700)]
[SimplifyCFG] Prohibit hoisting of llvm.deoptimize calls
This prohibits hoisiting identical llvm.deoptimize calls
from 'then' and 'else' blocks of a conditional branch.
This fixes a crash that happened because we didn't hoist
the return instructions together with the llvm.deoptimize calls,
so the verifier would crash.
Differential Revision: https://reviews.llvm.org/D139437
Dmitry Makogon [Fri, 9 Dec 2022 10:36:03 +0000 (17:36 +0700)]
[Test] Reduce deopt bundle in test with hoisted llvm.deoptimize call
Simon Pilgrim [Fri, 9 Dec 2022 10:40:49 +0000 (10:40 +0000)]
[X86] Regenerate fastcc-byval.ll with visible stack math
Allows us to truly see the diff in D138899
Simon Pilgrim [Fri, 9 Dec 2022 10:37:03 +0000 (10:37 +0000)]
[X86] Regenerate fastcc-byval.ll
Allows us to truly see the diff in D138899
Salvatore Dipietro [Fri, 9 Dec 2022 10:36:16 +0000 (10:36 +0000)]
[AArch64] Lower READCYCLECOUNTER using MRS CNTVCT_EL0
As suggested in D12425 it would be better for the readcyclecounter
function on ARM architecture to use the CNTVCT_EL0 register
(Counter-timer Virtual Count register) instead of the PMCCNTR_EL0
(Performance Monitors Cycle Count Register) because the PMCCNTR_EL0 is a
PMU register which, depending on the configuration, it might always
return zeroes and it doesn't guaranteed to always be increased.
Differential Revision: https://reviews.llvm.org/D136999
Nikita Popov [Fri, 9 Dec 2022 10:35:20 +0000 (11:35 +0100)]
[MemoryBuiltins] Drop ReallocLike type (NFC)
All realloc style functions have been migrated to use allocator
attributes, so we no longer need to check for this.
Nikita Popov [Fri, 9 Dec 2022 10:28:11 +0000 (11:28 +0100)]
[MemoryBuiltins] Remove some hardcoded builtins
For all of these we already infer the new memory attributes, so
they don't need to be explicitly listed.
serge-sans-paille [Fri, 9 Dec 2022 10:20:37 +0000 (11:20 +0100)]
Adapt lldb to use StringRef for option storage
As a consequence to
138942c833b3baa12d19216797efca6d4dd010d2
This fixes lldb build https://lab.llvm.org/buildbot/#/builders/83/builds/26991
Guillaume Chatelet [Thu, 8 Dec 2022 09:53:35 +0000 (09:53 +0000)]
[Alignment] Use Align in MCStreamer::emitCommonSymbol
Next patch after D139548 and D139439. Same expectations, the change seems safe with as far as llvm goes, we cannot check downstream implementations.
Differential Revision: https://reviews.llvm.org/D139614
Max Kazantsev [Fri, 9 Dec 2022 10:05:33 +0000 (17:05 +0700)]
[IndVars] Use symbolic max block exit count to handle the last iter
Old logic: when loop symbolic max exit count matched *exact* block exit count,
assume that all subsequent blocks will do 1 iteration less.
New logic: when loop symbolic max exit count matched *symbolic max* block exit count,
assume that all subsequent blocks will do 1 iteration less.
The new logic is still legal and is more permissive in situations when exact
block exit count is not known.
Differential Revision: https://reviews.llvm.org/D139692
Reviewed By: nikic
Luke Lau [Fri, 9 Dec 2022 09:55:35 +0000 (09:55 +0000)]
[Docs] Update PatFrag definition in documentation
The old definition for store was outdated.
Differential Revision: https://reviews.llvm.org/D139531
Luke Lau [Fri, 9 Dec 2022 09:52:31 +0000 (09:52 +0000)]
[AsmParser] Check that addrspace fits within 24 bits
Address spaces equal or larger than 1 << 24 don't fit and produce an
assertion during debug builds, or worse in release. This causes an error
to be reported during parsing instead.
Differential Revision: https://reviews.llvm.org/D139528
Corentin Jabot [Fri, 9 Dec 2022 09:42:43 +0000 (10:42 +0100)]
[Clang] improve grammar in warn_utf8_symbol_homoglyph diagnostic
Max Kazantsev [Fri, 9 Dec 2022 09:14:19 +0000 (16:14 +0700)]
[NFC] Rename variables in optimizeLoopExits
Pierre van Houtryve [Mon, 24 Oct 2022 08:48:57 +0000 (08:48 +0000)]
[GISel] Rework trunc/shl combine in a generic trunc/shift combine
This combine only handled left shifts, but now it can handle right shifts as well. It handles right shifts conservatively and only truncates them to the size returned by TLI.
AMDGPU benefits from always lowering shifts to 32 bits for instance, but AArch64 would rather keep them at 64 bits.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D136319
Guillaume Chatelet [Fri, 9 Dec 2022 09:44:01 +0000 (09:44 +0000)]
Revert D139098 "[Alignment] Use Align for ObjectFile::getSectionAlignment"
This breaks lld.
This reverts commit
10c47465e2505ddfee4e62a2ab2e535abea3ec56.
serge-sans-paille [Sun, 4 Dec 2022 08:33:14 +0000 (09:33 +0100)]
Recommit of
8ae18303f97d5dcfaecc90b4d87effb2011ed82e - part 2
Differential Revision: https://reviews.llvm.org/D139274
Nikita Popov [Mon, 7 Nov 2022 16:22:14 +0000 (17:22 +0100)]
[PtrAuth] Use default attributes for some ptrauth intrinsics
This uses the default intrinsic attributes (nofree, nosync,
nocallback, willreturn) for a subset of the ptrauth intrinsics.
Notably, this does not use them for auth and resign, because these
intrinsics are specified to trap and as such are not willreturn.
As far as I understood, the remaining intrinsics may not trap
(or can only trap in cases where behavior is undefined).
Differential Revision: https://reviews.llvm.org/D137557
Guray Ozen [Thu, 8 Dec 2022 16:59:22 +0000 (17:59 +0100)]
[mlir] Support llvm.readonly attribute on llvm pointers
The attribute is translated into LLVM's function attribute 'readonly'. The attribute can be only used for pointers.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D139641
Guillaume Chatelet [Thu, 1 Dec 2022 12:34:21 +0000 (12:34 +0000)]
[Alignment] Use Align for ObjectFile::getSectionAlignment
Differential Revision: https://reviews.llvm.org/D139098
Vladislav Khmelevsky [Thu, 8 Dec 2022 10:06:39 +0000 (14:06 +0400)]
[BOLT] Fix blocks layout reverse iterators
Use container's reverse iterators, fix iterators types.
Reviewed By: Amir
Differential Revision: https://reviews.llvm.org/D139335
Corentin Jabot [Sun, 23 Oct 2022 15:32:58 +0000 (17:32 +0200)]
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members
are not evaluated.
Instead, we evaluate them when constructing a
`CXXDefaultArgExpr`/`BuildCXXDefaultInitExpr`.
The immediate calls are executed by doing a
transform on the initializing expression.
Note that lambdas are not considering subexpressions so
we do not need to transform them.
As a result of this patch, unused default member
initializers are not considered odr-used, and
errors about members binding to local variables
in an outer scope only surface at the point
where a constructor is defined.
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/D136554
Elena Lepilkina [Wed, 7 Dec 2022 06:42:24 +0000 (09:42 +0300)]
[Precommit][RISCV] Test for unsupported extensions in llvm-objdump
Precommit for https://reviews.llvm.org/D139553
serge-sans-paille [Fri, 9 Dec 2022 09:15:41 +0000 (10:15 +0100)]
Jean Perier [Fri, 9 Dec 2022 09:09:35 +0000 (10:09 +0100)]
[flang] Lower intrinsics to HLFIR part 1
This patch adds support for lowering intrinsics that have no dynamic
optionality aspects to handle and that requires argument to be lowered
to value, addr, or box.
It uses the current intrinsic lowering framework that can be re-used in
HLFIR to start with. HLFIR operations for charater/transformational
intrinsics will be added as needed from an optimization point of view.
The current approach will still create temporary variables for their
value directly in lowering.
Later patch will still need to add:
- support for dynamically optional arguments
- inquires
- "moving" the in memory computation of character and transformational
intrinsics to hlfir.expr. This is not needed from a semantic point of
view, but will help optimizing and will probably be required inside
hlfir.elemental returning characters so that the returned element
type is an hlfir.expr and match the result type of later hlfir.apply.
Differential Revision: https://reviews.llvm.org/D139613
serge-sans-paille [Thu, 8 Dec 2022 21:04:39 +0000 (22:04 +0100)]
Recommit of
8ae18303f97d5dcfaecc90b4d87effb2011ed82e - part 2
Differential Revision: https://reviews.llvm.org/D139274
Nilanjana Basu [Mon, 28 Nov 2022 03:45:34 +0000 (09:15 +0530)]
[AArch64] Extending lowering of 'zext <Y x i8> %x to <Y x i8X>' to use tbl instructions
Adding support for ZExt lowering for destination types beyond the existing support for (8|16) x i32
Patch for lowering zext instructions to 'tbl' for (8|16)xi8 -> (8|16)xi32 conversions in https://reviews.llvm.org/D120571 is extended to support zext to 'tbl' lowering for Y x i8 to Y x i8X where X > 2 and X < 8, that is, any number of vector elements & any destination element type whose size is a multiple of 8 and lies between 16 & 64 is allowed for this transformation.
Related microbenchmarks are in https://reviews.llvm.org/D136274 & https://reviews.llvm.org/D138059
Differential Revision: https://reviews.llvm.org/D136722
Nilanjana Basu [Fri, 2 Dec 2022 18:45:57 +0000 (00:15 +0530)]
[AArch64] Unit test for zext lowering for different types of vectors
These are unit tests for code generated for zext lowering of vectors.
There are tests for different types of vectors, as well as cases where multiple 'zext' instructions of same type occur back-to-back.
Testing of Global-ISel path is added.
This will help in comparing changes in zext lowering in https://reviews.llvm.org/D136722.
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D137993
Valentin Clement [Fri, 9 Dec 2022 08:18:14 +0000 (09:18 +0100)]
[flang] Generate iteration shape from passed object
When call an elemental subroutine with a monomorphic or polymorphic
passed object, the iteration shape could not be computed. Use the
passed object to infer the implicit iteration shape so the loop
can be constructed.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D139635
Nikita Popov [Fri, 9 Dec 2022 07:47:00 +0000 (08:47 +0100)]
[LangRef] Fix typo (NFC)
Kazu Hirata [Fri, 9 Dec 2022 07:36:50 +0000 (23:36 -0800)]
[clang] Don't including None.h (NFC)
These source files no longer use None, so they do not need to include
None.h.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Kazu Hirata [Fri, 9 Dec 2022 07:21:59 +0000 (23:21 -0800)]
[llvm] Use std::nullopt instead of None in comments (NFC)
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Douglas Yung [Fri, 9 Dec 2022 06:41:45 +0000 (22:41 -0800)]
Mark test lld/test/MachO/fat-arch.s updated in e54cfa4 to require aarch64.
Kazu Hirata [Fri, 9 Dec 2022 06:43:11 +0000 (22:43 -0800)]
[clang] Use std::nullopt instead of None in comments (NFC)
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
liqinweng [Fri, 9 Dec 2022 04:45:42 +0000 (12:45 +0800)]
[AARCH64][CostModel] Modified the cost of mask vector load/store
Reviewed By: david-arm
Differential Revision: https://reviews.llvm.org/D134413
Jeff Niu [Fri, 9 Dec 2022 05:32:26 +0000 (21:32 -0800)]
[mlir] Fix examples build
Missing two extra parameters.
Sameer Sahasrabuddhe [Fri, 9 Dec 2022 05:28:28 +0000 (10:58 +0530)]
[AAPointerInfo] rearrange code in preparation for further changes
AAPointerInfoFloating::updateImpl
Move the member function definition out of its class before modifying it.
translateAndAddState
Split the function definition into two along the FromCallee boolean argument.
handleAccess
This should only be called when Size is not known. In other cases, replaced
with a direct call to addAccess.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D138645
Jeff Niu [Thu, 8 Dec 2022 19:51:36 +0000 (11:51 -0800)]
[mlir][ods] Add I8 and I16 cases to BitEnumAttr
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D139664
Paul Kirth [Fri, 9 Dec 2022 04:28:43 +0000 (04:28 +0000)]
Revert "Reland "[pgo] Avoid introducing relocations by using private alias""
This reverts commit
e89e8dcfad364d23515de25ac87d26dfe25badbb.
Some configurations still have references to discarded sections. I'm
reverting until these can be addressed.
Eric Li [Thu, 8 Dec 2022 22:01:53 +0000 (17:01 -0500)]
[libTooling] Add flag to getRangeForEdit to ignore macro expansions
This commit resolves the FIXME around the behavior of
`Lexer::makeFileCharRange` that `getRangeForEdit` inherits around
source locations in macro expansions.
We add a flag to `getRangeForEdit` that allows a caller to disable the
behavior, and instead uses the spelling location instead, with checks
to ensure that the source locations are not within a macro definition.
Differential Revision: https://reviews.llvm.org/D139676
Chenbing Zheng [Fri, 9 Dec 2022 03:18:31 +0000 (11:18 +0800)]
[InstCombine] Add tests for udiv with shl-mul; NFC
Vy Nguyen [Wed, 7 Dec 2022 20:54:48 +0000 (15:54 -0500)]
[lld-macho] Fix bug in reading cpuSubType field.
Differential Revision: https://reviews.llvm.org/D139572
NAKAMURA Takumi [Fri, 9 Dec 2022 02:41:14 +0000 (11:41 +0900)]
[Bazel] Set HAVE_DLADDR in config.h
Corresponding to CMake change in llvmorg-16-init-13673-g138d53895734
Jordan Rupprecht [Fri, 9 Dec 2022 01:53:54 +0000 (17:53 -0800)]
Improve error handling for invalid breakpoint `-t` and `-x` options.
Breakpoint option `-t` checks that `option_arg` is empty by checking `option_arg[0] == '\0'`. This is unnecessary: the next two checks for comparing against "current" and calling `getAsInteger` already gracefully handle an empty StringRef. If the `option_arg` string is empty, this crashes (or triggers an assertion failure with asserts enabled). Also, this sets the thread id to `LLDB_INVALID_THREAD_ID` if the thread id is invalid -- it should just not set the thread id.
Likewise of `-x` which checks `option_arg[0] == '\n'` unnecessarily.
I believe both of these bugs are unreachable via normal LLDB usage, and are only accessible via the fuzzer -- most likely some other CLI parsing is trimming whitespace and rejecting empty inputs. Still, it doesn't hurt to simplify this bit.
Paul Kirth [Fri, 9 Dec 2022 00:28:37 +0000 (00:28 +0000)]
Reland "[pgo] Avoid introducing relocations by using private alias"
In many cases, we can use an alias to avoid a symbolic relocations,
instead of using the public, interposable symbol. When the instrumented
function is in a COMDAT, we can use a hidden alias, and still avoid
references to discarded sections.
This version makes the new runtime test a Linux only test.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D137982
Weining Lu [Fri, 9 Dec 2022 01:11:10 +0000 (09:11 +0800)]
[LoongArch] Remove GlobalISel from the LINK_COMPONENTS list. NFC
LoongArch doesn't use GlobalISel for now.
Jordan Rupprecht [Fri, 9 Dec 2022 01:14:38 +0000 (17:14 -0800)]
[NFC] Fix leak handling breakpoint names.
The breakpoint list is a list of raw pointers. When breakpoints are removed, the memory is not deleted. Switch to unique pointers. I did some minor cleanup while making this change.
Found by the LLDB command interpreter fuzzer. The input is `br m G`.
LLVM GN Syncbot [Fri, 9 Dec 2022 01:06:43 +0000 (01:06 +0000)]
[gn build] Port
3b7af2796b3d
Artem Dergachev [Fri, 9 Dec 2022 00:40:33 +0000 (16:40 -0800)]
Revert "Revert "[-Wunsafe-buffer-usage] Initial commit - Transition away from raw buffers.""
This reverts commit
bc0617795f8bdcd5deab3e48b120107cc2833cdc.
Be more careful with #includes to avoid linker errors on some buildbots.
Jordan Rupprecht [Fri, 9 Dec 2022 00:37:43 +0000 (16:37 -0800)]
[NFC] Fix leak in command options configuration.
`m_options.Append(new OptionPermissions())` leaks because the pointer passed in is not owned. Use a class member to ensure lifetime, which is the common pattern used for this API.
Found by the LLDB command interpreter fuzzer. The fuzz input is running `ap $` twice.
Sami Tolvanen [Fri, 9 Dec 2022 00:06:36 +0000 (00:06 +0000)]
[ModuleUtils][KCFI] Set !kcfi_type metadata for sanitizer constructors
Set KCFI type metadata for the sanitizer constructors to prevent
runtime failures when these functions are indirectly called in
instrumented code. This fixes a compatibility issue with KASAN and
-fsanitize=kcfi in the Linux kernel.
Link: https://github.com/ClangBuiltLinux/linux/issues/1742
Reviewed By: nickdesaulniers, MaskRay
Differential Revision: https://reviews.llvm.org/D138945
Paul Kirth [Fri, 9 Dec 2022 00:22:57 +0000 (00:22 +0000)]
Revert "Reland "[pgo] Avoid introducing relocations by using private alias""
This reverts commit
3cfaea2d499970c2fd14389ade59f792156be0f8.
The runtime test fails on Mac.
Jeff Niu [Fri, 9 Dec 2022 00:22:06 +0000 (16:22 -0800)]
[flang] Fix flang after MLIR update
Roman Lebedev [Fri, 9 Dec 2022 00:07:36 +0000 (03:07 +0300)]
[compiler-rt] Update build_symbolizer.sh to use -passes syntax
Daniel Thornburgh [Wed, 7 Dec 2022 00:22:24 +0000 (16:22 -0800)]
[CMake] Move dladdr check below _GNU_SOURCE check.
The presence of dladdr on Linux depends on whether or not _GNU_SOURCE is
set.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D139575
Joshua Batista [Thu, 8 Dec 2022 21:03:47 +0000 (13:03 -0800)]
add floor library function
This change exposes the floor library function for HLSL,
excluding long, int, and long long doubles.
Floor is supported for all scalar, vector, and matrix types.
Long and long long double support is missing in this patch because those types
don't exist in HLSL. Int is missing because the floor function only works on floating type arguments.
The full documentation of the HLSL floor function is available here:
https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-floor
Reviewed By: beanz
Differential Revision: https://reviews.llvm.org/D139137
Peiming Liu [Thu, 8 Dec 2022 20:03:18 +0000 (20:03 +0000)]
[mlir][sparse] reject kernels with non-sparsfiable reduction expression.
To address https://github.com/llvm/llvm-project/issues/59394.
Reduction on negation of the output tensor is a non-sparsifiable kernel, it creates cyclic dependency.
This patch reject those cases instead of crashing.
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D139659
David Green [Thu, 8 Dec 2022 23:08:06 +0000 (23:08 +0000)]
[ARM][AArch64] Some additional for bitcast splats. NFC
Roman Lebedev [Thu, 8 Dec 2022 23:06:33 +0000 (02:06 +0300)]
[NFC] Port one more codegen WinEH test to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 23:04:45 +0000 (02:04 +0300)]
[NFC] Port last few Transforms tests to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 23:04:06 +0000 (02:04 +0300)]
[NFC] Port last few Other tests to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 23:03:37 +0000 (02:03 +0300)]
[NFC] Port all Verifier tests to `-passes=` syntax
Vitaly Buka [Thu, 8 Dec 2022 22:52:00 +0000 (14:52 -0800)]
[NFC][asan] Guard implemetation with ASAN_INTERCEPT_SWAPCONTEXT
Yaxun (Sam) Liu [Thu, 8 Dec 2022 21:56:25 +0000 (16:56 -0500)]
Revert "[AMDGPU] Disable bool range metadata to workaround backend issue"
This reverts commit
107ee2613063183cb643cef97f0fad403508c9f0 to facilitate
investigating and fixing the root cause.
Differential Revision: https://reviews.llvm.org/D135269
Roman Lebedev [Thu, 8 Dec 2022 21:54:41 +0000 (00:54 +0300)]
[NFC] Port codegen X86 tests that invoke opt to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 21:54:41 +0000 (00:54 +0300)]
[NFC] Port codegen WinEH tests that invoke opt to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 21:54:40 +0000 (00:54 +0300)]
[NFC] Port codegen Thumb2 tests that invoke opt to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 21:54:40 +0000 (00:54 +0300)]
[NFC] Port codegen Thumb tests that invoke opt to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 21:54:40 +0000 (00:54 +0300)]
[NFC] Port codegen SystemZ tests that invoke opt to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 21:54:39 +0000 (00:54 +0300)]
[NFC] Port codegen PowerPC tests that invoke opt to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 21:54:39 +0000 (00:54 +0300)]
[NFC] Port codegen NVPTX tests that invoke opt to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 21:54:36 +0000 (00:54 +0300)]
[NFC] Port codegen Generic tests that invoke opt to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 21:54:35 +0000 (00:54 +0300)]
[NFC] Port codegen ARM tests that invoke opt to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 21:54:35 +0000 (00:54 +0300)]
[NFC] Port codegen AMDGPU tests that invoke opt to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 21:54:35 +0000 (00:54 +0300)]
[NFC] Port codegen AArch64 tests that invoke opt to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 21:52:21 +0000 (00:52 +0300)]
[NFC] Port all tools tests to `-passes=` syntax
Roman Lebedev [Thu, 8 Dec 2022 21:52:21 +0000 (00:52 +0300)]
[NFC] Port all Verifier tests to `-passes=` syntax