platform/upstream/llvm.git
14 months agoKeep multiple-include optimization for null directives
Elliot Goodrich [Thu, 27 Apr 2023 17:43:18 +0000 (13:43 -0400)]
Keep multiple-include optimization for null directives

The multiple-include optimization allows Clang to avoid opening a
files when they contain #pragma once or a proper include guard.

Both GCC and Microsoft Visual Studio allow null directives outside of
the #ifndef/#endif pair without disabling this multiple-include
optimization. GCC documents this behavior here
https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html.

> There must be no directives outside the controlling directive pair,
> but the null directive (a line containing nothing other than a
> single '#' and possibly whitespace) is permitted.

However, Clang disables the multiple-include optimization when
encountering the null directive.

In particular, this slows down preprocessing of most projects that
depend on boost as many boost libraries depend on the boost
preprocessor library, which contains null directives outside the
include guard on every header file.

Differential Revision: https://reviews.llvm.org/D147928

14 months ago[clang] Fix a crash with parenthesized aggregate initialization and base classes
Alan Zhao [Wed, 26 Apr 2023 21:50:01 +0000 (14:50 -0700)]
[clang] Fix a crash with parenthesized aggregate initialization and base classes

When calling InitializeBase(...), TryOrBuidlParenListInit(...) needs to
pass in the parent entity; otherwise, we erroneously try to cast
CurContext to a CXXConstructorDecl[0], which can't be done since we're
performing aggregate initialization, not constructor initialization.

Field initialization is not affected, but this patch still adds some
tests for it.

Fixes 62296

[0]: https://github.com/llvm/llvm-project/blob/33d6bd1c667456f7f4a9d338a7996a30a3af50a3/clang/lib/Sema/SemaAccess.cpp#L1696

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D149301

14 months ago[NFC][MachineFunctionPassManager] Remove unused DebugLogging param
Arthur Eubanks [Thu, 27 Apr 2023 17:37:53 +0000 (10:37 -0700)]
[NFC][MachineFunctionPassManager] Remove unused DebugLogging param

14 months ago[IR][NFC] Change UndefMaskElem to PoisonMaskElem
ManuelJBrito [Thu, 27 Apr 2023 15:22:57 +0000 (16:22 +0100)]
[IR][NFC] Change UndefMaskElem to PoisonMaskElem

Following the change in shufflevector semantics,
poison will be used to represent undefined elements in shufflevector masks.

Differential Revision: https://reviews.llvm.org/D149256

14 months ago[RegAllocFast] Use uint16_t SparseT for LiveRegMap
Alexis Engelke [Wed, 26 Apr 2023 14:26:42 +0000 (16:26 +0200)]
[RegAllocFast] Use uint16_t SparseT for LiveRegMap

For functions with very large numbers of live variables, lookups into
LiveRegMap previously detoriated to linear searches.

This slightly increases memory usage, but that is barely measurable.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D149330

14 months agoRemove unused attributes from move-dbg-values-imm-test.mir
Shubham Sandeep Rastogi [Thu, 27 Apr 2023 16:11:08 +0000 (09:11 -0700)]
Remove unused attributes from move-dbg-values-imm-test.mir

Differential Revision: https://reviews.llvm.org/D149355

14 months ago[AArch64][InlineAsm]Add Clang support for flag output constraints
Mingming Liu [Tue, 25 Apr 2023 05:13:30 +0000 (22:13 -0700)]
[AArch64][InlineAsm]Add Clang support for flag output constraints

- Mention this change in Clang release notes

Before:
- Clang emits "invalid output constraint '=@cceq' in asm" https://gcc.godbolt.org/z/b9crfEo8h

After:
- For aarch64 targets (with __aarch64__ defined), Clang validates and parses flag output constraints to generate LLVM IR.

Differential Revision: https://reviews.llvm.org/D149123

14 months ago[flang][lowering] Do not instantiate component symbols used in spec expr
Jean Perier [Thu, 27 Apr 2023 16:35:51 +0000 (18:35 +0200)]
[flang][lowering] Do not instantiate component symbols used in spec expr

Lowering analyse specification expressions in order to create order the
symbol instantiations in the IR (If symbol B is used in the
specification expression of A, symbol B must be instantiated first).

This analysis was mistakenly collecting component symbols used in
component references inside specification expressions, which led
lowering to instantiate component symbols as if they were local
objects.

This patch prevents collecting component symbols during this analysis.

Differential Revision: https://reviews.llvm.org/D149328

14 months ago[SLP]Fix a crash for the replaced vectorized value.
Alexey Bataev [Thu, 27 Apr 2023 16:00:21 +0000 (09:00 -0700)]
[SLP]Fix a crash for the replaced vectorized value.

If two nodes share the same value, which is replaced in one of the
nodes, need to automatically replace same value in all nodes. Btter to
use WeakTrackingVH for this to fix compiler crash.

14 months ago[libc++][PSTL][NFC] clang-format files
Nikolas Klauser [Fri, 13 Jan 2023 20:12:54 +0000 (21:12 +0100)]
[libc++][PSTL][NFC] clang-format files

Reviewed By: ldionne, #libc

Spies: sstefan1, pcwang-thead, jplehr, libcxx-commits, arichardson, mgrang

Differential Revision: https://reviews.llvm.org/D141781

14 months ago[libcxx] [test] Prepend to PATH instead of overriding it
Martin Storsjö [Fri, 14 Apr 2023 08:37:24 +0000 (08:37 +0000)]
[libcxx] [test] Prepend to PATH instead of overriding it

On Windows, the PATH env variable is used for locating dynamically
linked librarys, akin to LD_LIBRARY_PATH on Linux.

The tests that run with a dynamically linked libc++ used "--env
PATH=%{lib}" in the test config. This had the unfortunate side effect
of making other tools from PATH unavailable during the runtime of the
tests; in particular, it caused the "executor-has-no-bash" flag to be
set for all those Windows test configs (with the clang-cl static config
being the only one lacking it).

Thus, this increases the number of tests actually included in the
clang-cl dll and all mingw test configs by 9 tests.

The clang-cl static test configuration has been executing those tests
since the "--env PATH=%{lib}" was removed from that test config in
e78223e79efc886ef6f0ea5413deab3737d6d63b. (For mingw we haven't had a
need to split the test config between shared and static, which means
that the mingw static test config previously ran with --env PATH
needlessly.)

This increases the test coverage for patches like D146398 which
can't be executed in the executor-has-no-bash configs.

Change the default value of the arg.env to an empty array; when we do
pass values to the option, they get passed as an array of strings,
so make sure the variable behaves consistently when no arguments
have been passed.

Differential Revision: https://reviews.llvm.org/D148324

14 months ago[libcxx] [test] Unbreak passing multiple env variables in ssh.py
Martin Storsjö [Thu, 27 Apr 2023 07:11:05 +0000 (10:11 +0300)]
[libcxx] [test] Unbreak passing multiple env variables in ssh.py

No test actually does this, but this makes the option behave like
the corresponding one in run.py.

This was broken by commit b8b23aa80eefe84187d6ba364d06496c90c53bdb
(https://reviews.llvm.org/D99242) which introduced quoting; instead
of quoting the whole space separated list, quote each individual
argument.

Differential Revision: https://reviews.llvm.org/D149319

14 months ago[libcxx] [test] Print the failing commands in Configuration{Compilation,Runtime}Error
Martin Storsjö [Thu, 6 Apr 2023 08:19:06 +0000 (11:19 +0300)]
[libcxx] [test] Print the failing commands in Configuration{Compilation,Runtime}Error

This allows for easier debugging of the test environment when something
fails.

Differential Revision: https://reviews.llvm.org/D145807

14 months ago[AArch64] Regenerate trunc-to-tbl and zext-to-tbl tests. NFC
David Green [Thu, 27 Apr 2023 16:21:13 +0000 (17:21 +0100)]
[AArch64] Regenerate trunc-to-tbl and zext-to-tbl tests. NFC

The -mattr=+global-isel is not valid syntax, so those lines have been removed.
With Global-ISel there is currently missing vector legalization for wide G_EXT,
and it does not support BE.

14 months ago[PGO] Minor instrumentation code cleanup (NFC)
Christian Ulmann [Thu, 27 Apr 2023 16:04:51 +0000 (16:04 +0000)]
[PGO] Minor instrumentation code cleanup (NFC)

This commit cleans up some parts of the PGO instrumentation. Most
importantly, it removes a template parameter shadowing of a class name
that could lead to confusion.

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D149324

14 months ago[SimplifyCFG] Remove some unnecessary TTI arguments. NFC.
Jay Foad [Thu, 27 Apr 2023 15:58:41 +0000 (16:58 +0100)]
[SimplifyCFG] Remove some unnecessary TTI arguments. NFC.

TTI was already available in the SimplifyCFGOpt class.

14 months ago[MLIR][EmitC] Add empty emitc.constant check
Kiung Jung [Thu, 27 Apr 2023 15:52:59 +0000 (15:52 +0000)]
[MLIR][EmitC] Add empty emitc.constant check

Implementing logic to check if the emitc dialect constant Op is empty.

Reviewed By: marbre

Differential Revision: https://reviews.llvm.org/D147907

14 months ago[LLD][ELF] Fix compressed-debug-level test on SystemZ
Ulrich Weigand [Thu, 27 Apr 2023 15:49:32 +0000 (17:49 +0200)]
[LLD][ELF] Fix compressed-debug-level test on SystemZ

The libz compression library on SystemZ by default makes use of the
platform's hardware-accelerated compression facility. This is much
faster than the regular software implementation, but often results in
slightly different outputs. This causes failures with the
compressed-debug-level test case.

To fix this, run this test while setting the DFLTCC environment
variable to zero, which prevents use of hardware compression and falls
back to the software implementation. (This should not have any effect
on other platforms.)

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D149273

14 months agoFix PDB relocation on big-endian hosts
Ulrich Weigand [Thu, 27 Apr 2023 15:45:25 +0000 (17:45 +0200)]
Fix PDB relocation on big-endian hosts

When running the LLD test suite on a big-endian host, the
COFF/pdb-framedata.yaml test case currently fails.

As it turns out, this is because code in DebugSHandler::finish
intended to relocate RvaStart entries of FDO records does not
work correctly when compiled for a big-endian host.

Fixed by always reading file data in little-endian mode.

Reviewed By: aganea

Differential Revision: https://reviews.llvm.org/D149268

14 months ago[MLIR][OpenMP] Use inlineConvertOmpRegions for targetData conversion
Akash Banerjee [Thu, 27 Apr 2023 15:26:29 +0000 (15:26 +0000)]
[MLIR][OpenMP] Use inlineConvertOmpRegions for targetData conversion

Co-authored-by: Kiran Chandramohan <kiran.chandramohan@arm.com>
Reviewed By: TIFitis

Differential Revision: https://reviews.llvm.org/D149153

14 months agoDisallow to apply the op & to const
Kiung Jung [Thu, 27 Apr 2023 15:22:23 +0000 (15:22 +0000)]
Disallow to apply the op & to const

Disallow to apply the operator & (address of) to emitc.constant operations.

Reviewed By: marbre, simon-camp

Differential Revision: https://reviews.llvm.org/D147992

14 months ago[LegalizeVectorOps] Use all ones mask when expanding i1 VP_SELECT.
Craig Topper [Thu, 27 Apr 2023 15:26:11 +0000 (08:26 -0700)]
[LegalizeVectorOps] Use all ones mask when expanding i1 VP_SELECT.

We were previously using the condition as the mask. By the semantics
of VP operations, that means that anywhere the condition is false
returns poison and not the false operand.

Use an all ones mask instead.

No tests are affected because RISC-V drops the mask when lowering.

Reviewed By: fakepaper56

Differential Revision: https://reviews.llvm.org/D149310

14 months ago[libc++] Adds newer clang-tidy in the CI.
Mark de Wever [Thu, 20 Apr 2023 19:03:39 +0000 (21:03 +0200)]
[libc++] Adds newer clang-tidy in the CI.

In order to use clang-tidy for modules version 17 is required. Some of the
development fixes haven't been backported. This adds the new version to
the CI so it can be used in a follow-up patch.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D148831

14 months ago[mlir][arith] Add missing canon pattern `trunci(ext*i(x)) -> ext*i(x)`
Jakub Kuderski [Thu, 27 Apr 2023 15:13:46 +0000 (11:13 -0400)]
[mlir][arith] Add missing canon pattern `trunci(ext*i(x)) -> ext*i(x)`

This pattern triggers when only the extension bits are truncated.

Reviewed By: dcaballe

Differential Revision: https://reviews.llvm.org/D149286

14 months ago[RISCV] Remove support for attribute interrupt("user").
Craig Topper [Thu, 27 Apr 2023 15:21:24 +0000 (08:21 -0700)]
[RISCV] Remove support for attribute interrupt("user").

This was part of the N extension which didn't make it version
1.12 of the privilege specification.

Reviewed By: kito-cheng

Differential Revision: https://reviews.llvm.org/D149314

14 months ago[libc++][chrono] Adds formatter file_time.
Mark de Wever [Thu, 20 Apr 2023 19:40:36 +0000 (21:40 +0200)]
[libc++][chrono] Adds formatter file_time.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D148928

14 months ago[gn build] Port 9d16cbc5c8bd
LLVM GN Syncbot [Thu, 27 Apr 2023 15:07:24 +0000 (15:07 +0000)]
[gn build] Port 9d16cbc5c8bd

14 months ago[libc++] Adds more forward declaration headers.
Mark de Wever [Thu, 20 Apr 2023 19:03:40 +0000 (21:03 +0200)]
[libc++] Adds more forward declaration headers.

The module validation script of D144994 validate whether the contents of
an include match its module. An include is the set of files matching the
pattern:
- foo
- foo/*.
- __fwd/foo.h

Several declarations of the stream headers are in the header iosfwd.
This gives issue using the validation script. Adding iosfwd to the set
of matching files gives too many declarations. For example when
validating the fstream header it will pull in declarations of the
istream header. Instead if writing a set of filters the headers are
granularized into smaller headers containing the expected declarations.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D148927

14 months ago[libc++] Fix ODR violation with placeholders
Louis Dionne [Wed, 26 Apr 2023 20:35:13 +0000 (16:35 -0400)]
[libc++] Fix ODR violation with placeholders

In D145589, we made the std::bind placeholders inline constexpr to
satisfy C++17. It turns out that this causes ODR violations since the
shared library provides strong definitions for those placeholders, and
the linker on Windows actually complains about this.

Fortunately, C++17 only encourages implementations to use `inline constexpr`,
it doesn't force them. So instead, we unconditionally define the placeholders
as `extern const`, which avoids the ODR violation and is indistinguishable
from `inline constexpr` for most purposes, since the placeholders are
empty types anyway.

Note that we could also go back to the pre-D145589 state of defining them
as non-inline constexpr variables in C++17, however that is definitely
non-conforming since that means the placeholders have different addresses
in different TUs. This is all a bit pedantic, but all in all I feel that
`extern const` provides the best bang for our buck, and I can't really
find any downsides to that solution.

Differential Revision: https://reviews.llvm.org/D149292

14 months ago[MLIR][OpenMP][test] Update omp::FlagsAttr tests to only use CHECK tests
Andrew Gozillon [Thu, 27 Apr 2023 14:10:34 +0000 (09:10 -0500)]
[MLIR][OpenMP][test] Update omp::FlagsAttr tests to only use CHECK tests

The CHECK-NOT tests were incorrect and impacting the other
tests flag tests negatively, they'd pass as false positives.

14 months ago[MLIR][OpenMP] Add check for appropriate module operation during convertFlagsAttr
Andrew Gozillon [Thu, 27 Apr 2023 13:18:57 +0000 (08:18 -0500)]
[MLIR][OpenMP] Add check for appropriate module operation during convertFlagsAttr

Checks if the operation the attirbute resides on is an ModuleOp otherwise it fails.

14 months ago[clang] Try to fix check-clang after f539b6ffc251
Nico Weber [Thu, 27 Apr 2023 14:12:39 +0000 (10:12 -0400)]
[clang] Try to fix check-clang after f539b6ffc251

14 months ago[PGO] Move CFGMST.h into the include directory
Christian Ulmann [Thu, 27 Apr 2023 14:06:26 +0000 (14:06 +0000)]
[PGO] Move CFGMST.h into the include directory

This commit moves the CFGMST.h file into the include directory. The
implemented algorithm is can be helpful for downstream projects that
want to use the PGO data in a non-standard way.

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D149336

14 months ago[Polly] Update polly test after SCEV changes
Nikita Popov [Thu, 27 Apr 2023 14:08:34 +0000 (16:08 +0200)]
[Polly] Update polly test after SCEV changes

Make the phi non-trivial, so SCEV can't see through it.

14 months ago[AMDGPU] Legalize soffset of buffer instructions. Use Waterfall loop logic.
skc7 [Tue, 3 Jan 2023 12:01:58 +0000 (17:31 +0530)]
[AMDGPU] Legalize soffset of buffer instructions. Use Waterfall loop logic.

Legalize soffset of buffer instructions using waterfall loop.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D141030

14 months agoRevert "[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols"
Zequan Wu [Thu, 27 Apr 2023 14:01:56 +0000 (10:01 -0400)]
Revert "[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols"

This reverts commit 10c17c97ebaf81ac26f6830e51a7a57ddcf63cd2. It causes undefined symbol error on chromium windows build. A small repro was uploaded to the code review.

14 months ago[MLIR][OpenMP][NFC] Minor code cleanup
Akash Banerjee [Thu, 27 Apr 2023 13:47:42 +0000 (14:47 +0100)]
[MLIR][OpenMP][NFC] Minor code cleanup

Cleanup how the IsBegin argument is passed and removed unnecessary variable.

14 months ago[AArch64] Precommit tests for VECTOR_SHUFFLE
Jingu Kang [Thu, 27 Apr 2023 13:31:40 +0000 (14:31 +0100)]
[AArch64] Precommit tests for VECTOR_SHUFFLE

14 months ago[IR] Change shufflevector undef mask to poison
ManuelJBrito [Wed, 26 Apr 2023 13:19:12 +0000 (14:19 +0100)]
[IR] Change shufflevector undef mask to poison

With this patch an undefined mask in a shufflevector will be printed as poison.
This change is done to support the new shufflevector semantics
for undefined mask elements.

Differential Revision: https://reviews.llvm.org/D149210

14 months ago[InstCombine] Add frozen for the condition value of SelectInst
Zhongyunde [Thu, 27 Apr 2023 13:32:28 +0000 (21:32 +0800)]
[InstCombine] Add frozen for the condition value of SelectInst

If the condition value of SelectInst may be a poison or undef value,
infer constant range at SelectInst use is incorrect, similar to D143883.
Fixes https://github.com/llvm/llvm-project/issues/62401

Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D149339

14 months ago[NFC] Add tests from my fix for GH62362.
Erich Keane [Thu, 27 Apr 2023 13:31:46 +0000 (06:31 -0700)]
[NFC] Add tests from my fix for GH62362.

This ended up being fixed separately by @rsmith in 1e43349e3 in a
better/correct way. This patch adds the tests from the original, as
though they are reasonably covered in his patch, explicit versions seem
to have value here.

Additionally, this adds a release note for 1e43349e3.

14 months ago[SCEV] Drop LCSSA check in createNodeFromSelectLikePHI()
Nikita Popov [Thu, 27 Apr 2023 10:57:28 +0000 (12:57 +0200)]
[SCEV] Drop LCSSA check in createNodeFromSelectLikePHI()

SCEV expressions no longer try to preserve LCSSA form. SCEV
construction will try to look through LCSSA phi nodes. As such,
we also no longer need to limit this special-case fold.

14 months ago[SCEV] Try simplifying phi before createNodeFromSelectLikePHI()
Nikita Popov [Thu, 27 Apr 2023 13:05:03 +0000 (15:05 +0200)]
[SCEV] Try simplifying phi before createNodeFromSelectLikePHI()

Sometimes a phi can both be trivial and match the
createNodeFromSelectLikePHI() fold. In that case it is generally
more profitable to look through the phi node.

14 months ago[clangd] Fix the include-cleaner-batch-fix.test failure on some
Haojian Wu [Thu, 27 Apr 2023 12:57:40 +0000 (14:57 +0200)]
[clangd] Fix the include-cleaner-batch-fix.test failure on some
platforms

It seems that on some platforms, the spelling include doesn't work. Make
the test less strict on it.

14 months ago[DebugInfo][InstCombine] Fix missing source and variable locations after foldOpIntoPhi
OCHyams [Thu, 27 Apr 2023 12:44:12 +0000 (13:44 +0100)]
[DebugInfo][InstCombine] Fix missing source and variable locations after foldOpIntoPhi

Reviewed By: fdeazeve

Differential Revision: https://reviews.llvm.org/D149335

14 months ago[KMSAN] Enable on SystemZ
Ilya Leoshkevich [Thu, 27 Apr 2023 11:44:41 +0000 (13:44 +0200)]
[KMSAN] Enable on SystemZ

Enable -fsanitize=kernel-memory support in Clang.

The x86_64 ABI requires that shadow_origin_ptr_t must be returned via a
register pair, and the s390x ABI requires that it must be returned via
memory pointed to by a hidden parameter. Normally Clang takes care of
the ABI, but the sanitizers run long after it, so unfortunately they
have to duplicate the ABI logic.

Therefore add a special case for SystemZ and manually emit the
s390x-ABI-compliant calling sequences. Since it's only 2 architectures,
do not create a VarArgHelper-like abstraction layer.

The kernel functions are compiled with the "packed-stack" and
"use-soft-float" attributes. For the "packed-stack" functions, it's not
correct for copyRegSaveArea() to copy 160 bytes of shadow and origins,
since the save area is dynamically sized. Things are greatly simplified
by the fact that the vararg "use-soft-float" functions use precisely
56 bytes in order to save the argument registers to where va_arg() can
find them.

Make copyRegSaveArea() copy only 56 bytes in the "use-soft-float" case.
The "packed-stack" && !"use-soft-float" case has no practical uses at
the moment, so leave it for the future.

Add tests.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D148596

14 months ago[SCEV] Regenerate test checks (NFC)
Nikita Popov [Thu, 27 Apr 2023 10:57:28 +0000 (12:57 +0200)]
[SCEV] Regenerate test checks (NFC)

14 months ago[SCEV] Remove LCSSA special case in getSCEVAtScope() (NFCI)
Nikita Popov [Thu, 27 Apr 2023 10:50:22 +0000 (12:50 +0200)]
[SCEV] Remove LCSSA special case in getSCEVAtScope() (NFCI)

We no longer try to preserve LCSSA form in SCEV representation:
Nowadays, we look through LCSSA PHI nodes directly during SCEV
construction. As such, this separate special case in
getSCEVAtScope() is no longer needed.

14 months ago[mlir][test] Remove unused lambda capture 'this' in UtilsTest.cpp (NFC)
Jie Fu [Thu, 27 Apr 2023 10:45:14 +0000 (18:45 +0800)]
[mlir][test] Remove unused lambda capture 'this' in UtilsTest.cpp (NFC)

/data/llvm-project/mlir/unittests/Analysis/Presburger/UtilsTest.cpp:39:17: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
  auto merge = [this](unsigned i, unsigned j) -> bool { return true; };
                ^~~~
/data/llvm-project/mlir/unittests/Analysis/Presburger/UtilsTest.cpp:52:17: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
  auto merge = [this](unsigned i, unsigned j) -> bool { return true; };
                ^~~~
2 errors generated.

14 months ago[clang][Interp] Emit diagnostic when comparing function pointers
Timm Bäder [Tue, 25 Apr 2023 13:46:20 +0000 (15:46 +0200)]
[clang][Interp] Emit diagnostic when comparing function pointers

Function pointers can be compared for (in)equality but, but LE, GE, LT,
and GT opcodes should emit an error and abort.

Differential Revision: https://reviews.llvm.org/D149154

14 months ago[clangd] Add batch fixes for include-cleaner diagnostics
Haojian Wu [Tue, 25 Apr 2023 19:59:11 +0000 (21:59 +0200)]
[clangd] Add batch fixes for include-cleaner diagnostics

For each unused-include/missing-include diagnostic, we provide fix-all
alternative to them.

This patch also adds LSP ChangeAnnotation support.

Differential Revision: https://reviews.llvm.org/D147684

14 months ago[DAG] Do not call computeKnownBits from isKnownToBeAPowerOfTwo
Jay Foad [Thu, 27 Apr 2023 08:33:24 +0000 (09:33 +0100)]
[DAG] Do not call computeKnownBits from isKnownToBeAPowerOfTwo

The only way known bits could help identify a known power of two is if
it knows exactly which power of two it is, i.e. if it is a known
constant. But in that case the value should have been simplified to a
constant already. So save some compile time by not calling
computeKnownBits.

Differential Revision: https://reviews.llvm.org/D149325

14 months ago[clang][Interp] Check Neg ops for errors
Timm Bäder [Sat, 22 Apr 2023 12:09:14 +0000 (14:09 +0200)]
[clang][Interp] Check Neg ops for errors

This should fail when negating __INT_MIN__.

Differential Revision: https://reviews.llvm.org/D148987

14 months ago[bazel][mlir] fix build for transform utils
Mikhail Goncharov [Thu, 27 Apr 2023 10:02:53 +0000 (12:02 +0200)]
[bazel][mlir] fix build for transform utils

14 months ago[AArch64][FastISel] Handle call with multiple return regs
Alexis Engelke [Fri, 14 Apr 2023 12:35:49 +0000 (14:35 +0200)]
[AArch64][FastISel] Handle call with multiple return regs

The code closely follows the X86 back-end. Applications that make heavy
use of {i64, i64} returns to use two registers strongly benefit from the
reduced number of SelectionDAG fallbacks.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D148346

14 months ago[X86] Fix -Wstring-conversion in X86InstrInfo.cpp (NFC)
Jie Fu [Thu, 27 Apr 2023 09:52:57 +0000 (17:52 +0800)]
[X86] Fix -Wstring-conversion in X86InstrInfo.cpp (NFC)

/Users/jiefu/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9794:12: error: implicit conversion turns string literal into bool: 'const char[25]' to 'bool' [-Werror,-Wstring-conversion]
    assert("It should not reach here");
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode13.1/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/assert.h:99:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0)
                      ~ ^
1 error generated.

14 months ago[clang] Do not crash on undefined template partial specialization
Mariya Podchishchaeva [Thu, 27 Apr 2023 09:24:31 +0000 (05:24 -0400)]
[clang] Do not crash on undefined template partial specialization

Before checking that template partial specialization is "reachable",
ensure it exists.

Fixes https://github.com/llvm/llvm-project/issues/61356

Reviewed By: shafik, erichkeane

Differential Revision: https://reviews.llvm.org/D148330

14 months ago[SCEV] Check correct binary operator for nowrap flags
Nikita Popov [Thu, 27 Apr 2023 09:25:40 +0000 (11:25 +0200)]
[SCEV] Check correct binary operator for nowrap flags

We should be checking the current BO here, not the nested one. If
the current BO has nowrap flags (and is UB on poison), then we'll
fetch both operand SCEVs of that BO. We'll check the nested BO
on the next iteration of the do/while loop.

14 months ago[SCEV] Check MatchBinaryOp opcode instead of original opcode
Nikita Popov [Thu, 27 Apr 2023 09:04:55 +0000 (11:04 +0200)]
[SCEV] Check MatchBinaryOp opcode instead of original opcode

These are not necessarily the same (e.g. or can become add) and
this is what we're switching over in the first place.

14 months ago[X86] Fix -Wsometimes-uninitialized in X86InstrInfo.cpp (NFC)
Jie Fu [Thu, 27 Apr 2023 09:08:24 +0000 (17:08 +0800)]
[X86] Fix -Wsometimes-uninitialized in X86InstrInfo.cpp (NFC)

/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9793:3: error: variable 'MaddOpc' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
  default:
  ^~~~~~~
/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9854:25: note: uninitialized use occurs here
  Madd->setDesc(TII.get(MaddOpc));
                        ^~~~~~~
/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9791:19: note: initialize the variable 'MaddOpc' to silence this warning
  unsigned MaddOpc;
                  ^
                   = 0
/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9793:3: error: variable 'AddOpc' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
  default:
  ^~~~~~~
/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9862:46: note: uninitialized use occurs here
      BuildMI(*MF, MIMetadata(Root), TII.get(AddOpc), DstReg)
                                             ^~~~~~
/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9790:18: note: initialize the variable 'AddOpc' to silence this warning
  unsigned AddOpc;
                 ^
                  = 0
2 errors generated.

14 months ago[bazel][mlir] update build for mem2reg f88f8fd0bca34dc8e5571cb828b1a159a50fd504
Mikhail Goncharov [Thu, 27 Apr 2023 08:43:13 +0000 (10:43 +0200)]
[bazel][mlir] update build for mem2reg f88f8fd0bca34dc8e5571cb828b1a159a50fd504

Differential Revision: https://reviews.llvm.org/D149326

14 months ago[SCEV] Fix getOperandsToCreate() for and/or
Nikita Popov [Thu, 27 Apr 2023 08:49:34 +0000 (10:49 +0200)]
[SCEV] Fix getOperandsToCreate() for and/or

We can create expressions either for constant operand or i1
and/or. The implementation was inverting the latter check.

14 months ago[MLIR][presburger] normalize divisionrepr
gilsaia [Thu, 27 Apr 2023 08:36:29 +0000 (14:06 +0530)]
[MLIR][presburger] normalize divisionrepr

Added a simple normalize function to divisionrepr and added a simple unittest.
Added a normalizediv call to divisionrepr's removeDuplicateDivs function, which now eliminates divs that are consistent after gcd's normalize

Reviewed By: Groverkss

Differential Revision: https://reviews.llvm.org/D147381

14 months ago[X86] Machine combine vnni instruction.
Luo, Yuanke [Fri, 21 Apr 2023 11:28:58 +0000 (19:28 +0800)]
[X86] Machine combine vnni instruction.

"vpmaddwd + vpaddd" can be combined to vpdpwssd and the latency is
reduced after combination. However when vpdpwssd is in a critical path
the combination get less ILP. It happens when vpdpwssd is in a loop, the
vpmaddwd can be executed in parallel in multi-iterations while vpdpwssd
has data dependency for each iterations. If vpaddd is in a critical path
while vpmaddwd is not, it is profitable to split vpdpwssd into "vpmaddwd
+ vpaddd".
This patch is based on the machine combiner framework to acheive decision
on "vpmaddwd + vpaddd" combination. The typical example code is as
below.
```
__m256i foo(int cnt, __m256i c, __m256i b, __m256i *p) {

    for (int i = 0; i < cnt; ++i) {
        __m256i a = p[i];
        __m256i m = _mm256_madd_epi16 (b, a);
        c = _mm256_add_epi32(m, c);
    }

    return c;
}
```

Differential Revision: https://reviews.llvm.org/D148980

14 months ago[BranchFolder] Skip redundant IMPLICIT_DEFs of subregs
Jay Foad [Mon, 17 Apr 2023 10:06:06 +0000 (11:06 +0100)]
[BranchFolder] Skip redundant IMPLICIT_DEFs of subregs

Differential Revision: https://reviews.llvm.org/D148509

14 months ago[BranchFolder] Precommit AMDGPU test case for D148509
Jay Foad [Mon, 17 Apr 2023 10:05:14 +0000 (11:05 +0100)]
[BranchFolder] Precommit AMDGPU test case for D148509

14 months ago[lit] Set __COMPAT_LAYER=RunAsInvoker when running tests on Windows
Alvin Wong [Mon, 24 Apr 2023 13:52:18 +0000 (21:52 +0800)]
[lit] Set __COMPAT_LAYER=RunAsInvoker when running tests on Windows

Windows heuristics try to detect old installer programs and run them as
elevated. These heuristics include checking for certain substrings in
file names, e.g. "patch", "update", "setup". When lit tries to run
affected executables, it produces "[WinError 740] The requested
operation requires elevation" instead. Several tests have been affected
by this issue (see https://reviews.llvm.org/D137772,
https://reviews.llvm.org/D148988, https://reviews.llvm.org/D149004).

We should set this environment variable to disable this heuristic once
and for all, instead of setting it in inidividual test suites. There
should be no lit tests that legitimately want to run as elevated.

Differential Revision: https://reviews.llvm.org/D149064

14 months ago[MLIR][Linalg] Change destination logic in `bubbleUpPackOpThroughGenericOp`.
Lorenzo Chelini [Wed, 26 Apr 2023 09:08:31 +0000 (11:08 +0200)]
[MLIR][Linalg] Change destination logic in `bubbleUpPackOpThroughGenericOp`.

In `bubbleUpPackOpThroughGenericOp`, we replaced the init operands with
a new `tensor.empty` if the operation was a pure element-wise op. This
behaviour is not wrong but not ideal because we "break" the original
use-def-chain of the output operand by materializing a new
`tensor.empty`. We should use `tensor.empty` as a destination *only* if the
initial init operand was already a `tensor.empty`, as we do in
`PushDownUnpack`.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D149250

14 months agoAMDGPU: Fix an assertion in SIOptimizeVGPRLiveRange
Nicolai Hähnle [Wed, 26 Apr 2023 13:18:51 +0000 (15:18 +0200)]
AMDGPU: Fix an assertion in SIOptimizeVGPRLiveRange

As the comment notes, the shader results in an INSERT_SUBREG with
"undef" (dead) operand in the Endif block. The same can happen with
REG_SEQUENCE. The register is considered dead from a liveness
analysis perspective. The correct thing to do seems to be nothing:
we keep the undef use of the register, the register allocator should
still be able to take the liveness into account correctly.

Differential Revision: https://reviews.llvm.org/D149161

14 months ago[RISCV][Driver] Allow the use of CPUs with a different XLEN than the triple.
Kito Cheng [Thu, 27 Apr 2023 06:35:15 +0000 (14:35 +0800)]
[RISCV][Driver] Allow the use of CPUs with a different XLEN than the triple.

Our downstream toolchain release got some issue is we set the default
triple by creating symbolic link of clang like `riscv64-unknown-elf-clang`,
and has lots of multi-lib config including rv32's config.

However when we trying to set arch by a 32 bit CPU like generic-rv32
but got error message below:
error: unsupported argument 'generic-rv32' to option '-mcpu='

`generic-rv32` is listed in the output of `-mcpu=help`, that
might be confusing for user since help message say supported.

So let clang driver also consider -mcpu option during computing
the target triple to archvie that.

Reviewed By: asb, craig.topper

Differential Revision: https://reviews.llvm.org/D148124

14 months ago[HWASAN] Use InTaggableRegion in basic tagging functions
Vitaly Buka [Wed, 26 Apr 2023 23:26:48 +0000 (16:26 -0700)]
[HWASAN] Use InTaggableRegion in basic tagging functions

For primary use-case when !HWASAN_ALIASING_MODE the function is constant
true and should be eliminated by optimizations.

In case HWASAN_ALIASING_MODE all new calls to the functions were missing
in the first place. We just not use this mode for anything but tests, so
we didn't noticed.

Addressing @thurston comment on D149293

Reviewed By: thurston

Differential Revision: https://reviews.llvm.org/D149305

14 months ago[HWASAN] Untag pointer with TagMaskByte instead 0xFF
Vitaly Buka [Wed, 26 Apr 2023 02:36:26 +0000 (19:36 -0700)]
[HWASAN] Untag pointer with TagMaskByte instead 0xFF

This applies only X86_64 where mask is 0x3F.

Reviewed By: kstoimenov

Differential Revision: https://reviews.llvm.org/D149227

14 months ago[BOLT] Parallelize legacy profile merging
Yi Kong [Fri, 31 Mar 2023 09:08:16 +0000 (17:08 +0800)]
[BOLT] Parallelize legacy profile merging

Merging profiles is quite expensive, but easily paralleizable.

8359 profiles on n2d-standard-128:
single-thread: 808s
multi-thread: 200s (~75% speed up)

Differential Revision: https://reviews.llvm.org/D149014

14 months ago[HWASAN] Fix X86 ClInstrumentWithCalls
Vitaly Buka [Wed, 26 Apr 2023 02:32:25 +0000 (19:32 -0700)]
[HWASAN] Fix X86 ClInstrumentWithCalls

It was always ON for X86.

14 months ago[NFC][hwasan] Precommit X86 inline tests
Vitaly Buka [Wed, 26 Apr 2023 02:29:05 +0000 (19:29 -0700)]
[NFC][hwasan] Precommit X86 inline tests

-hwasan-instrument-with-calls is broken on X86.

14 months ago[clang] Modernize DelayedDiagnostics (NFC)
Kazu Hirata [Thu, 27 Apr 2023 06:29:03 +0000 (23:29 -0700)]
[clang] Modernize DelayedDiagnostics (NFC)

14 months ago[mlir] Replace None with std::nullopt in comments (NFC)
Kazu Hirata [Thu, 27 Apr 2023 06:29:02 +0000 (23:29 -0700)]
[mlir] Replace None with std::nullopt 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

14 months ago[C++20] [Modules] Avoid crash if the inconsistency the size of lang options exceeds 1
Chuanqi Xu [Thu, 27 Apr 2023 06:19:32 +0000 (14:19 +0800)]
[C++20] [Modules] Avoid crash if the inconsistency the size of lang options exceeds 1

Close https://github.com/llvm/llvm-project/issues/62359

The root reason for the crash is that we didn't test the case that
the bits number of a language option exceeds 1.

14 months ago[mlir] Add a generic mem2reg implementation.
Théo Degioanni [Thu, 27 Apr 2023 06:00:39 +0000 (06:00 +0000)]
[mlir] Add a generic mem2reg implementation.

This patch introduces a generic implementation of mem2reg on
unstructured control-flow, along with a specialization for LLVM IR. This
is achieved by defining three new interfaces, representing 1. allocating
operations, 2. operations doing memory accesses, 3. operations that can
be rewired and/or deleted to stop using a specific use.

The file containing the core implementation of the algorithm
(`Mem2Reg.cpp`) contains a detailed explanation of how the algorithm
works. The contract for this pass is that given a memory slot with a
single non-aliased pointer, the pass will either remove all the uses of
the pointer or not change anything.

To help review this patch, I recommend starting by looking at the
interfaces defined in `Mem2Reg.td`, along with their reference
implementation for LLVM IR defined in `LLVMMem2Reg.cpp`. Then, the core
algorithm is implemented in `Mem2Reg.cpp`.

If this is all good I also have an implementation of the interfaces for
0-dimensional memref promotion that I can upstream afterwards.

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D148109

14 months ago[mlir][llvm] Add assertion in LLVM IR import (NFC).
Tobias Gysi [Thu, 27 Apr 2023 05:45:46 +0000 (05:45 +0000)]
[mlir][llvm] Add assertion in LLVM IR import (NFC).

This revision adds an assertion to convertConstantExpr to ensure the
function is not called if the constant has been converted before.

This is a follow up for https://reviews.llvm.org/D149247.

Reviewed By: victor-eds

Differential Revision: https://reviews.llvm.org/D149253

14 months ago[X86] Support `X86ISD::PCMPEQ` and `X86ISD::PCMPGT` in ComputeKnownBits
Noah Goldstein [Thu, 27 Apr 2023 03:00:53 +0000 (22:00 -0500)]
[X86] Support `X86ISD::PCMPEQ` and `X86ISD::PCMPGT` in ComputeKnownBits

These functions where missing support but are used enough that it
makes sense to track them.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D148963

14 months ago[ValueTracking] Add logic for `add nuw x,y != 0` -> `x != 0 || y != 0`
Noah Goldstein [Thu, 27 Apr 2023 03:00:32 +0000 (22:00 -0500)]
[ValueTracking] Add logic for `add nuw x,y != 0` -> `x != 0 || y != 0`

Alive2 Link:
    https://alive2.llvm.org/ce/z/TKpqxc

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D149204

14 months ago[ValueTracking] Add logic for `(sub x, y) != 0` if we know `KnownX != KnownY`
Noah Goldstein [Tue, 25 Apr 2023 18:47:49 +0000 (13:47 -0500)]
[ValueTracking] Add logic for `(sub x, y) != 0` if we know `KnownX != KnownY`

Alive2 Link:
    https://alive2.llvm.org/ce/z/TAFcjF

Differential Revision: https://reviews.llvm.org/D149202

14 months ago[ValueTracking] Add some additional tests for `isKnownNonZero`; NFC
Noah Goldstein [Tue, 25 Apr 2023 18:46:41 +0000 (13:46 -0500)]
[ValueTracking] Add some additional tests for `isKnownNonZero`; NFC

Differential Revision: https://reviews.llvm.org/D149201

14 months ago[InstSimplify] Extend handlng of fp min/max.
Serguei Katkov [Wed, 29 Mar 2023 05:37:03 +0000 (12:37 +0700)]
[InstSimplify] Extend handlng of fp min/max.

Add support the cases like
  m(m(X,Y),m'(X,Y)) => m(X,Y)
where m is one of maxnum, minnum, maximum, minimum and
m' is m or inverse of m.

alive2 correctness check:
maxnum(maxnum,maxnum) https://alive2.llvm.org/ce/z/kSyAzo
maxnum(maxnum,minnum) https://alive2.llvm.org/ce/z/Vra8j2
minnum(minnum,minnum) https://alive2.llvm.org/ce/z/B6h-hW
minnum(minnum,maxnum) https://alive2.llvm.org/ce/z/rG2u_b
maximum(maximum,maximum) https://alive2.llvm.org/ce/z/N2nevY
maximum(maximum,minimum) https://alive2.llvm.org/ce/z/23RFcP
minimum(minimum,minimum) https://alive2.llvm.org/ce/z/spHZ-U
minimum(minimum,maximum) https://alive2.llvm.org/ce/z/Aa-VE8

Reviewed By: dantrushin, RKSimon
Differential Revision: https://reviews.llvm.org/D147137

14 months ago[LTO] Change getThinLTOOutputFile to take StringRef
Fangrui Song [Thu, 27 Apr 2023 03:43:11 +0000 (20:43 -0700)]
[LTO] Change getThinLTOOutputFile to take StringRef

14 months ago[RISCV] Support vector strict rounding operations.
Yeting Kuo [Mon, 17 Apr 2023 07:26:51 +0000 (15:26 +0800)]
[RISCV] Support vector strict rounding operations.

The patch basically models custom lowering of base rounding operations to expand
rounding by coverting to ingter and coverting back to FP. The other one thing
the patch does is to covert sNan of the source to qNan.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D148519

14 months ago[ValueTracking] Guaranteed not to be undef if has dereferenceable attribute
luxufan [Thu, 27 Apr 2023 02:40:27 +0000 (10:40 +0800)]
[ValueTracking] Guaranteed not to be undef if has dereferenceable attribute

As LangRef says, "dereferenceable<n> implies noundef".
`isGuaranteedNotToBeUndefOrPoison` should return true if the parameter
has dereferenceable attribute.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D149035

14 months ago[NFC][HWASAN] Move InTaggableRegion
Vitaly Buka [Wed, 26 Apr 2023 23:20:04 +0000 (16:20 -0700)]
[NFC][HWASAN] Move InTaggableRegion

Prepare to use it in all tag related functions.

Reviewed By: thurston

Differential Revision: https://reviews.llvm.org/D149304

14 months agoRevert "[SPARC][MC] Fix encoding of backwards BPr branches"
Vitaly Buka [Thu, 27 Apr 2023 02:41:26 +0000 (19:41 -0700)]
Revert "[SPARC][MC] Fix encoding of backwards BPr branches"

Introduces UB, details in D144012.

This reverts commit 92f1156efc5f762ac3a4cc4eebe62742f6d75789.

14 months ago[HWASAN] Support tagged stack pointer
Vitaly Buka [Wed, 26 Apr 2023 00:48:24 +0000 (17:48 -0700)]
[HWASAN] Support tagged stack pointer

If stack was allocated using regular allocator, it may be tagged
and it will make memToShadow calculate invalid offset.

Also when UAR tag should be the tag of the stack frame pointer.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D149228

14 months ago[hwasan] Implement __sanitizer_purge_allocator
Vitaly Buka [Wed, 26 Apr 2023 07:50:34 +0000 (00:50 -0700)]
[hwasan] Implement __sanitizer_purge_allocator

Reviewed By: kstoimenov

Differential Revision: https://reviews.llvm.org/D149241

14 months ago[libfuzzer] avoid unneccessary auto-copy
Wu, Yingcong [Thu, 27 Apr 2023 01:59:49 +0000 (18:59 -0700)]
[libfuzzer] avoid unneccessary auto-copy

Avoid an unneccessary auto-copy

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D148902

14 months ago[sanitizer] move a pointer dereference after its null check
Wu, Yingcong [Thu, 27 Apr 2023 01:56:30 +0000 (18:56 -0700)]
[sanitizer] move a pointer dereference after its null check

The dereference of pointer `ctx` is not protected by its null check, this could be problematic.

Reviewed By: vitalybuka, MaskRay

Differential Revision: https://reviews.llvm.org/D149011

14 months ago[HWASAN] Fix __sanitizer_get_allocated_{begin,size}
Vitaly Buka [Wed, 26 Apr 2023 06:35:20 +0000 (23:35 -0700)]
[HWASAN] Fix __sanitizer_get_allocated_{begin,size}

HWASAN_ALIASING_MODE needs to untag only
primary allocator pointers.

Reviewed By: kstoimenov, thurston

Differential Revision: https://reviews.llvm.org/D149238

14 months ago[GlobalOpt] Don't replace the aliasee if it has other references.
DianQK [Thu, 27 Apr 2023 00:10:15 +0000 (08:10 +0800)]
[GlobalOpt] Don't replace the aliasee if it has other references.

As long as aliasee has `@llvm.used` or `@llvm.compiler.used` references, we cannot do the related replace or delete operations. Even if it is a Local Linkage, we cannot infer if there is no other use for it, such as asm or other future added cases.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D145293

14 months ago[HWASAN] Fix HwasanReallocate in aliasing mode
Vitaly Buka [Wed, 26 Apr 2023 21:03:49 +0000 (14:03 -0700)]
[HWASAN] Fix HwasanReallocate in aliasing mode

HWASAN_ALIASING_MODE needs to untag only
primary allocator pointers.

Reviewed By: kstoimenov

Differential Revision: https://reviews.llvm.org/D149293

14 months agoAlways emit symbol table when dwarf section exists in COFF
Haohai Wen [Thu, 27 Apr 2023 01:32:44 +0000 (09:32 +0800)]
Always emit symbol table when dwarf section exists in COFF

This also fixes check prefix NO which is pointless in symtab.test

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D149235

14 months ago[sanitizer] Correct alignment of x32 __sanitizer_siginfo
H.J. Lu [Wed, 26 Apr 2023 23:34:08 +0000 (16:34 -0700)]
[sanitizer] Correct alignment of x32 __sanitizer_siginfo

Since alignment of x32 siginfo_t is 8 bytes, not 4 bytes, use u64 in
__sanitizer_siginfo_pad to align x32 __sanitizer_siginfo to 8 bytes.

Fixes https://github.com/llvm/llvm-project/issues/62394

Differential Revision: https://reviews.llvm.org/D149309

14 months ago[OpenMP][Flang][Semantics] Add semantics support for USE_DEVICE_PTR clause on OMP...
Raghu Maddhipatla [Thu, 13 Apr 2023 16:33:21 +0000 (11:33 -0500)]
[OpenMP][Flang][Semantics] Add semantics support for USE_DEVICE_PTR clause on OMP TARGET DATA directive.

Initial support for USE_DEVICE_PTR clause on OMP TARGET DATA directive.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D148254