Commit Graph

443458 Commits

Author SHA1 Message Date
Aaron Ballman 2fc5a34100 Add test coverage for more C DRs
This completes the initial pass over all of the C DRs.
2022-11-29 14:44:37 -05:00
Brendon Cahoon b32a5666a8 [AMDGPU] Unify uniform return and divergent unreachable blocks
This patch fixes a "failed to annotate CFG" error in
SIAnnotateControlFlow. The problem occurs when there are
divergent and uniform unreachable/return blocks in the same
region. In this case, AMDGPUUnifyDivergentExitNodes does not
create a unified block so the region contains multiple exits.

StructurizeCFG does not work properly when there are multiple
exits, so the neccessary CFG transformations do not occur along
divergent control flow. Subsequently, SIAnnotateControlFlow
processes the path to the divergent exit block, but may only
partially process blocks along a unform control flow path to
another exit block.

This patch fixes the bug by creating a single exit block when
there is a divergent exit block in the function.

Differential revision: https://reviews.llvm.org/D136892
2022-11-29 13:25:56 -06:00
Jan Sjodin 2166d9529a [OpenMP][OMPIRBuilder] Migrate target outlined function registration to OMPIRBuilder from clang
This patch moves the outlined function registration, function attribute
configuration and function ID creation to the OpenMPIRBuilder. This will later
be used by flag as well.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D137587
2022-11-29 14:20:34 -05:00
Keith Smiley c702bf1400
[lld-macho] Reject -no_pie for unsupported archs
ld64 rejects `-no_pie` when targeting arm64, this mirrors that behavior.
Newer versions of ld64 also reject it based on minimum OS versions, but
that logic isn't in an open source dump yet so it isn't implemented
here.

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

Differential Revision: https://reviews.llvm.org/D138884
2022-11-29 11:17:08 -08:00
Kelvin Li b42cb2d601 [flang][doc] Remove DCMPLX intrinsic from the Intrinsic Procedures Lacking Support list
Differential Revision: https://reviews.llvm.org/D138848
2022-11-29 14:15:02 -05:00
Heejin Ahn 341d4cdeb6 [WebAssembly] Move debug tests into DebugInfo
This moves debug info tests in `test/CodeGen/WebAssembly` into
`test/DebugInfo/WebAssembly`, to gather all wasm debug info related
tests there.

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D138871
2022-11-29 11:13:42 -08:00
Kazu Hirata 04b59e7af9 [BOLT] Fix unused function warnings
This patch fixes:

  bolt/lib/Passes/CallGraph.cpp:27:15: error: unused function
  'hash_int64_fallback' [-Werror,-Wunused-function]

  bolt/lib/Passes/CallGraph.cpp:40:15: error: unused function
  'hash_int64' [-Werror,-Wunused-function]
2022-11-29 11:13:14 -08:00
Xing Xue 1e3e3e28a6 [libc++abi][LIT][AIX] Use Vector instructions available on Power7 in vec_reg_restore.pass.cpp
Summary:
libc++abi LIT test case vec_reg_restore.pass.cpp for AIX uses instructions mtvsrd and mfvsrd that are only available on Power8 CPU and higher, and therefore, fails on Power7 which is supported by the current AIX Clang. This patch replaces mtvsrd/mfvsrd with vector instructions available on Power7.

Reviewed by: nemanjai

Differential Revision: https://reviews.llvm.org/D138667
2022-11-29 14:08:03 -05:00
Philip Reames b25672ba82 [RISCV] Separate out helper for checking if vector splat supported for operand [nfc] 2022-11-29 11:05:46 -08:00
Kelvin Li 93196654f5 [flang] Add support for LSHIFT and RSHIFT intrinsics
The functionality of LSHIFT and RSHIFT intrinsics is the same as the
standard SHIFTL and SHIFTA intrinsics respectively. The patch is to
alias the two intrinsics to the standardized ones.

Differential Revision: https://reviews.llvm.org/D138839
2022-11-29 14:03:31 -05:00
Vitaly Buka 0d07922d92 [NFC][asan] Simplify parameters check 2022-11-29 10:56:17 -08:00
Vitaly Buka cc27860165 [NFC][asan] Cleanup comments
D132090 is too verbose.
Don't explain obvious.
Add simpler explanation of rounding reasoning.

Differential Revision: https://reviews.llvm.org/D138773
2022-11-29 10:56:17 -08:00
Vitaly Buka 2b026fedca [NFC][asan] Handle non-intersecting case early
Differential Revision: https://reviews.llvm.org/D138772
2022-11-29 10:56:17 -08:00
Vitaly Buka e1657e3229 [asan] Add unaligned double ended container support
Differential Revision: https://reviews.llvm.org/D138771
2022-11-29 10:56:17 -08:00
Mike Rice 530eb263c0 [clang] Add serialization for loop hint annotation tokens
When late parsed templates are used with PCH tokens are serialized. The
existing code does not handle annotation tokens which can occur due to
various pragmas.

This patch implements the serialization for annot_pragma_loop_hint.

This also enables use of OpenMP pragmas and #pragma unused which do not
need special serialization of the PtrData field.

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

Differential Revision: https://reviews.llvm.org/D138453
2022-11-29 10:51:11 -08:00
Nikolas Klauser 65df5bf2d1 [lbc++] Implement the rest of P0600R1 (nodiscard in the library)
Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D137597
2022-11-29 19:42:38 +01:00
Nikolas Klauser ad79455fad [libc++] Don't pass the allocator in substr()
This bug was dicoved when implementing P2438R2.

Fixes #57190

Reviewed By: ldionne, Mordante, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D138069
2022-11-29 19:40:37 +01:00
Shafik Yaghmour 54be300f7e [Clang] Fix Sema::ClassifyName so that it classifies EnumConstantDecl as NonType when they are brought into scope via using enum
Currently Sema::ClassifyName(...) in some cases when an enumerator is brought
into scope via using enum during lookup it can end up being classified as an
OverloadSet. It looks like this was never accounted for when using enum support
was implemented and we need to add a check to allow an EnumConstantDecl to be
classified as NonType even when it is a class member.

This fixes:
  https://github.com/llvm/llvm-project/issues/58057
  https://github.com/llvm/llvm-project/issues/59014
  https://github.com/llvm/llvm-project/issues/54746

Differential Revision: https://reviews.llvm.org/D138091
2022-11-29 10:39:21 -08:00
Paul Robinson df3f5f7149 [Windows] Convert tests to check 'target=<triple>'
Part of the project to eliminate special handling for triples in lit
expressions.
2022-11-29 10:33:21 -08:00
Lei Huang a25f7c530a [NFC] Fix indentation in td file 2022-11-29 12:11:06 -06:00
Paul Robinson cd5900dcd1 [PCH] Remove useless UNSUPPORTED clause
"win32" is never defined as a lit feature, AFAICT, and Windows bots
appear to be running this just fine.

Part of the project to eliminate special handling for triples in lit expressions.
2022-11-29 10:07:38 -08:00
Roy Sundahl 87d0ff9117
[asan][test] Fix SED issues with macOS (BSD)
SED differs between GNU and BSD in handling semicolon and the use of
'\n' in regex patterns. For macOS we can't use these GNU extensions.

rdar://102686948

Differential Revision: https://reviews.llvm.org/D138824
2022-11-29 09:47:23 -08:00
Jay Foad 0daa3df3a5 [AMDGPU] Use GCNSubtarget::hasInstPrefetch instead of generation check. NFC. 2022-11-29 17:36:33 +00:00
Matt Arsenault 600e9d33a5 AMDGPU: Fix broken test
From ee29a846c6
2022-11-29 12:33:44 -05:00
Tarun Prabhu d43a2f09de [flang] Lower F08 FINDLOC intrinsic
The implementation follows the patterns established by the lowering of other
similar intrinsics.

In addition to the code for lowering, the DoTotalReduction template had to be
fixed to correctly break when signaled to do so by the accumulator function.

Differential Revision: https://reviews.llvm.org/D138140
2022-11-29 10:18:38 -07:00
Tom Eccles 6841c43f36 [flang] Remove warnings that fast-math options are unimplemented
These are now fully implemented, see
https://reviews.llvm.org/D137390
https://reviews.llvm.org/D137391
https://reviews.llvm.org/D137456
https://reviews.llvm.org/D137580
https://reviews.llvm.org/D137602
https://reviews.llvm.org/D138048

These flags are still tested in
flang/test/Driver/frontend-forwarding.f90 and
flang/test/Lower/fast-math-arithmetic.f90

Differential revision: https://reviews.llvm.org/D138907
2022-11-29 17:15:05 +00:00
Paul Robinson dee009d3b5 [lit] UNSUPPORTED ps4/ps5 => target={{.*-ps(4|5)}}
Part of the project to eliminate special handling for triples in lit expressions.
2022-11-29 09:07:59 -08:00
Jonas Devlieghere b3c978e850
[lldb] Make SWIG an auto-detected dependency
This patch makes SWIG itself an auto-detected dependency. This allows us
to look for SWIG once in a centralized place and makes it easier
downstream to detect whether to use the static bindings.

Differential revision: https://reviews.llvm.org/D138879
2022-11-29 09:07:11 -08:00
Kazu Hirata dbb1130966 Revert "Use-after-return sanitizer binary metadata"
This reverts commit a1255dc467.

This patch results in:

  llvm/lib/CodeGen/SanitizerBinaryMetadata.cpp:57:17: error: no member
  named 'size' in 'llvm::MDTuple'
2022-11-29 09:04:00 -08:00
Aaron Ballman 7b5d5250be Fix Clang sphinx build
This addresses the issue found by:
https://lab.llvm.org/buildbot/#/builders/92/builds/36372
2022-11-29 12:01:25 -05:00
Paul Robinson f19c2720e3 [PS4] Remove an UNSUPPORTED, this test seems to work now 2022-11-29 08:59:09 -08:00
Matt Arsenault ee29a846c6 DAG: Fix assert when alloca has inconsistent pointer size
Take the type from the alloca, not the type to use for allocas.

Fixes issue 59250.
2022-11-29 11:48:46 -05:00
Matt Arsenault 91ba8b2b8d clang: Fix cast failure when using -fsanitize=undefined for HIP
This was assuming a direct reference to the global variable. The
constant string is placed in addrspace 4, and has a constexpr
addrspacecast to the generic address space.
2022-11-29 11:48:46 -05:00
Dmitry Vyukov a1255dc467 Use-after-return sanitizer binary metadata
Currently per-function metadata consists of:
(start-pc, size, features)

This adds a new UAR feature and if it's set an additional element:
(start-pc, size, features, stack-args-size)

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D136078
2022-11-29 17:37:36 +01:00
Jay Foad dca1a3f29e [AMDGPU] Add error line number checking
Differential Revision: https://reviews.llvm.org/D138916
2022-11-29 16:33:43 +00:00
Philip Reames fc0efb7e78 [SDAG] Allow scalable vectors in ComputeNumSignBits (try 2)
I had reverted this before the holiday week because a problem was reported with a related change (D137140 - scalable vector known bits in DAG).  I had initially confused the two patches, and then decided to leave this reverted out an abundance of caution.  Now that we're through the holiday week, reapplying.

I also roled in fixes for several post commit review comments that hadn't landed with the original change.

Original commit message

This is a continuation of the series of patches adding lane wise support for scalable vectors in various knownbit-esq routines.

The basic idea here is that we track a single lane for scalable vectors which corresponds to an unknown number of lanes at runtime. This is enough for us to perform lane wise reasoning on many arithmetic operations.

Differential Revision: https://reviews.llvm.org/D137141
2022-11-29 08:25:05 -08:00
Corentin Jabot b12aea6659 [Clang] Implement CWG2654: Un-deprecation of compound volatile assignments
Reviewed By: #clang-language-wg, erichkeane

Differential Revision: https://reviews.llvm.org/D138918
2022-11-29 17:15:39 +01:00
Matt Arsenault a74ea40cb6 AMDGPU: Remove unnecessary metadata from test
The pass isn't doing anything with it, and the line wrapping is
confusing update_test_checks.
2022-11-29 11:12:08 -05:00
Guillaume Chatelet 3e6001e91e [Coroutines] createStructType takes alignment in bits but receives bytes
This has been found while trying to remove the last few places relying on `unsigned` to convey alignment operations.
This seems to be untested.

Differential Revision: https://reviews.llvm.org/D138784
2022-11-29 16:05:06 +00:00
Mateja Marjanovic 595a08847a [AMDGPU] Add support for new LLVM vector types
Add VReg, AReg and SReg on AMDGPU for bit widths: 288, 320, 352 and 384.

Differential Revision: https://reviews.llvm.org/D138205
2022-11-29 17:02:04 +01:00
Mateja Marjanovic 68057c2b8d Add new vector types for LLVM
Add v9i32, v9f32, v10i32, v10f32, v11i32, v11f32, v12i32 and v12f32.

Differential Revision: https://reviews.llvm.org/D138136
2022-11-29 17:02:04 +01:00
Matt Arsenault 02ea3694a0 Utils: Fix appending to global_ctors with program address spaces
Also fix constructing sanitizer constructors in address space 0 so
it's testable (this was also failing the verifier on the type of
global_ctors).
2022-11-29 10:54:11 -05:00
David Green 57dc4a8cab [AArch64] Extend testing for widening conditions under SVE. NFC 2022-11-29 15:53:39 +00:00
Joseph Huber 3458a2b737 [Libomptarget][NFC] Add missing LLVM header 2022-11-29 09:46:51 -06:00
Joseph Huber bfd69ad596 [LinkerWrapper] Ignore OFK_None kinds for building registration code
Summary:
The linker wrapper uses this metadata to determine which registration
code to emit, e.g. CUDA, HIP or OpenMP. If we encounter an OFK_None we
should just ignore it.
2022-11-29 09:46:51 -06:00
Dmitry Preobrazhensky 9b8eb5fa8e [AMDGPU][MC][GFX11] Correct op_sel handling for permlane*16
Differential Revision: https://reviews.llvm.org/D137969
2022-11-29 18:45:22 +03:00
Michael Francis 0fae851824 [AIX][pg] Add Correct Search Paths for Profiled Libraries
On AIX, profiled system libraries are stored at `/lib/profiled` and
`/usr/lib/profiled`. When compiling with `-pg`, we want to link against
libraries in those directories. This PR modifies the AIX toolchain to
add those directories to the linker search paths.

Differential Review: https://reviews.llvm.org/D137375
2022-11-29 10:16:27 -05:00
Filipp Zhinkin c59822cd1a [NFC][ORC] Fix lljit-with-thinlto-summaries.test output ordering issue
Use CHECK-DAG to check module names that printed in order depending
on full file path.

Related issue: https://github.com/llvm/llvm-project/issues/59248

Reviewed By: sgraenitz

Differential Revision: https://reviews.llvm.org/D138913
2022-11-29 18:15:45 +03:00
Matt Arsenault d939eeb9db llvm-reduce: Add some missing consts 2022-11-29 10:08:02 -05:00
Viktoriia Bakalova 7452e053e5 [include-cleaner] Implement IWYU begin_keep/end_keep pragma support.
Implement support for begin_keep/end_keep pragmas.

Differential Revision: https://reviews.llvm.org/D138797
2022-11-29 14:51:20 +00:00