platform/upstream/llvm.git
2 years ago[Clang][Sema][OpenMP] Fix uninitialized variable Op
Shilei Tian [Fri, 4 Feb 2022 20:00:36 +0000 (15:00 -0500)]
[Clang][Sema][OpenMP] Fix uninitialized variable Op

This can fix the case atomic_messages

2 years ago[libc++][ranges][NFC] On the Ranges status page, fix some broken links.
Konstantin Varlamov [Fri, 4 Feb 2022 19:58:35 +0000 (11:58 -0800)]
[libc++][ranges][NFC] On the Ranges status page, fix some broken links.

2 years ago[mlir][sparse] Updating sparse-compiler pipeline for python usage
wren romano [Tue, 1 Feb 2022 22:19:11 +0000 (14:19 -0800)]
[mlir][sparse] Updating sparse-compiler pipeline for python usage

Explicitly nests passes for FuncOp, adds more options to the sparse-compiler pipeline, and updates python integration tests.  This should be sufficient to close https://github.com/llvm/llvm-project/issues/51751

Reviewed By: aartbik

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

2 years ago[clang-format][NFC] Fix a bug in setting type FunctionLBrace
Owen Pan [Fri, 4 Feb 2022 05:23:41 +0000 (21:23 -0800)]
[clang-format][NFC] Fix a bug in setting type FunctionLBrace

The l_brace token in a macro definition should not be set to
TT_FunctionLBrace.

This patch could have fixed #42087.

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

2 years ago[mlir] Use SetVector to deduplicate shape ops operands
Eugene Zhulenev [Fri, 4 Feb 2022 18:20:12 +0000 (10:20 -0800)]
[mlir] Use SetVector to deduplicate shape ops operands

Do not use quadratic complexity algorithm to find unique operands

Reviewed By: jpienaar

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

2 years ago[mlir][linalg] Let tile and fuse fail for tile sizes zero.
gysit [Fri, 4 Feb 2022 19:13:28 +0000 (19:13 +0000)]
[mlir][linalg] Let tile and fuse fail for tile sizes zero.

Adapt `tileConsumerAndFuseProducers` to return failure if the generated tile loop nest is empty since all tile sizes are zero. Additionally, fix `LinalgTileAndFuseTensorOpsPattern` to return success if the pattern applied successfully.

Reviewed By: mravishankar

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

2 years ago[clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".
Devin Jeanpierre [Fri, 4 Feb 2022 18:54:35 +0000 (19:54 +0100)]
[clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

This reverts commit 852afed5e0200b70047c28ccf4424a17089d17b0.

Changes since D114732:

On PS4, we reverse the expectation that classes whose constructor is deleted are not trivially relocatable. Because, at the moment, only classes which are passed in registers are trivially relocatable, and PS4 allows passing in registers if the copy constructor is deleted, the original assertions were broken on PS4.

(This is kinda similar to DR1734.)

Reviewed By: gribozavr2

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

2 years ago[x86] enable fast sqrtss/sqrtps tuning for AMD Zen cores
Sanjay Patel [Fri, 4 Feb 2022 18:13:01 +0000 (13:13 -0500)]
[x86] enable fast sqrtss/sqrtps tuning for AMD Zen cores

As discussed in D118534, all of the recent AMD CPUs have
relatively fast (<14 cycle latency) "sqrtss" and "sqrtps"
instructions:
https://uops.info/table.html?search=sqrtps&cb_lat=on&cb_tp=on&cb_SNB=on&cb_SKL=on&cb_ZENp=on&cb_ZEN2=on&cb_ZEN3=on&cb_measurements=on&cb_avx=on&cb_sse=on

So we should set this tuning flag to alter codegen of plain
"sqrt(X)" expansion (as opposed to reciprocal-sqrt - there
is other test coverage for that pattern). The expansion is
both slower and less accurate than the hardware instruction.

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

2 years ago[llvm-libtool-darwin] Fix crash with bitcode asm module
Keith Smiley [Sun, 30 Jan 2022 21:38:03 +0000 (13:38 -0800)]
[llvm-libtool-darwin] Fix crash with bitcode asm module

When using llvm-libtool-darwin with LTO building llvm itself, it crashed
on a file with an asm module in the bitcode. This fixes that by
correctly registering the targets for this.

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

2 years ago[gn build] Port 1d8bbe3d255f
LLVM GN Syncbot [Fri, 4 Feb 2022 18:44:32 +0000 (18:44 +0000)]
[gn build] Port 1d8bbe3d255f

2 years ago[RISCV] Implement a basic version of AArch64RedundantCopyElimination pass.
Craig Topper [Fri, 4 Feb 2022 17:45:02 +0000 (09:45 -0800)]
[RISCV] Implement a basic version of AArch64RedundantCopyElimination pass.

Using AArch64's original implementation for reference, this patch
implements a pass to remove unneeded copies of X0. This pass runs
after register allocation and looks to see if a register is implied
to be 0 by a branch in the predecessor basic block.

Reviewed By: asb

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

2 years ago[lldb] Rename DemangleWithRichManglingInfo to GetRichManglingInfo (NFC)
Jonas Devlieghere [Fri, 4 Feb 2022 18:32:34 +0000 (10:32 -0800)]
[lldb] Rename DemangleWithRichManglingInfo to GetRichManglingInfo (NFC)

This addresses Pavel's comment from D118814.

2 years ago[Libomptarget] Remove AMDGPU XFAIL from test
Joseph Huber [Fri, 4 Feb 2022 18:38:57 +0000 (13:38 -0500)]
[Libomptarget] Remove AMDGPU XFAIL from test

Summary;
This test should pass now with AMDGPU. Previously the symbols were
hidden and would fail when read.

2 years ago[mte] fix runOnFunction return value falsely suggesting function was modified.
Florian Mayer [Fri, 4 Feb 2022 02:18:39 +0000 (18:18 -0800)]
[mte] fix runOnFunction return value falsely suggesting function was modified.

If NumInterestingAllocas == 0 we do not add any instrumentation or
padding in the previous loop.

Reviewed By: eugenis

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

2 years ago[HeaderSearch] Track framework name in LookupFile
David Goldman [Thu, 20 Jan 2022 18:41:56 +0000 (13:41 -0500)]
[HeaderSearch] Track framework name in LookupFile

Previously, the Framework name was only set if the file
came from a header mapped framework; now we'll always
set the framework name if the file is in a framework.

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

2 years ago[Clang][Sema][OpenMP] Remove unused variables. NFC.
Benjamin Kramer [Fri, 4 Feb 2022 18:27:59 +0000 (19:27 +0100)]
[Clang][Sema][OpenMP] Remove unused variables. NFC.

2 years ago[lldb] Don't construct the demangled strings while indexing the symbol table
Jonas Devlieghere [Thu, 3 Feb 2022 18:48:16 +0000 (10:48 -0800)]
[lldb] Don't construct the demangled strings while indexing the symbol table

The symbol table needs to demangle all symbol names when building its
index. However, this doesn't require the full mangled name: we only need
the base name and the function declaration context. Currently, we always
construct the demangled string during indexing and cache it in the
string pool as a way to speed up future lookups.

Constructing the demangled string is by far the most expensive step of
the demangling process, because the output string can be exponentially
larger than the input and unless you're dumping the symbol table, many
of those demangled names will not be needed again.

This patch avoids constructing the full demangled string when we can
partially demangle. This speeds up indexing and reduces memory usage.

I gathered some numbers by attaching to Slack:

Before
------

  Memory usage: 280MB
  Benchmark 1: ./bin/lldb -n Slack -o quit
    Time (mean ± σ):      4.829 s ±  0.518 s    [User: 4.012 s, System: 0.208 s]
    Range (min … max):    4.624 s …  6.294 s    10 runs

After
-----

  Memory usage: 189MB
  Benchmark 1: ./bin/lldb -n Slack -o quit
    Time (mean ± σ):      4.182 s ±  0.025 s    [User: 3.536 s, System: 0.192 s]
    Range (min … max):    4.152 s …  4.233 s    10 runs

Differential revision: https://reviews.llvm.org/D118814

2 years ago[lldb] Improve RichManglingContext ergonomics (NFC)
Jonas Devlieghere [Fri, 4 Feb 2022 01:26:19 +0000 (17:26 -0800)]
[lldb] Improve RichManglingContext ergonomics (NFC)

Have the different ::Parse.* methods return the demangled string
directly instead of having to go through ::GetBufferRef.

Differential revision: https://reviews.llvm.org/D118953

2 years ago[msan] Guard FP_XSTATE_MAGIC1 usage with SANITIZER_GLIBC
Fangrui Song [Fri, 4 Feb 2022 18:15:11 +0000 (10:15 -0800)]
[msan] Guard FP_XSTATE_MAGIC1 usage with SANITIZER_GLIBC

Fix build for Linux musl.

Reviewed By: #sanitizers, dvyukov

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

2 years ago[SLP] Remove ScheduleData::UnscheduledDepsInBundle field [NFC-ish]
Philip Reames [Fri, 4 Feb 2022 18:09:38 +0000 (10:09 -0800)]
[SLP] Remove ScheduleData::UnscheduledDepsInBundle field [NFC-ish]

We can simply compute the value of this field on demand.  Doing so clarifies the behavior when one of the instructions within a bundle doesn't have valid dependencies.  I vaguely thing this could change behavior slightly, but none of the test cases are affected, and my attempts to write one by hand have failed.

This also minorly reduces memory usage, but that's a secondary value at best.

2 years agoRevert "[MLIR][Presburger] Use `SmallVector` instead of `std::vector` in `getLocalRepr`"
Prashant Kumar [Fri, 4 Feb 2022 15:57:01 +0000 (21:27 +0530)]
Revert "[MLIR][Presburger] Use `SmallVector` instead of `std::vector` in `getLocalRepr`"

This reverts commit 3cc544772848682bc77ff63db659a5aa4b3d4e6b.
SmallVector inside SmallVector are not optimized.

Reviewed By: arjunp

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

2 years ago[BOLT][TEST] Add section flags for .gcc_except_table
Amir Ayupov [Fri, 4 Feb 2022 17:33:22 +0000 (09:33 -0800)]
[BOLT][TEST] Add section flags for .gcc_except_table

clang-10 complains about changed section flags in two tests:
- X86/shrinkwrapping.test
- X86/exceptions-args.test

Fix that by adding the missing flags.

Reviewed By: yota9

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

2 years ago[gn build] Port 4a02562275d4
LLVM GN Syncbot [Fri, 4 Feb 2022 17:43:11 +0000 (17:43 +0000)]
[gn build] Port 4a02562275d4

2 years ago[gn build] Port 44cdca37c01a
LLVM GN Syncbot [Fri, 4 Feb 2022 17:43:10 +0000 (17:43 +0000)]
[gn build] Port 44cdca37c01a

2 years ago[AMDGPU] Lazily init pal metadata on first function
Sebastian Neubauer [Fri, 4 Feb 2022 17:39:35 +0000 (18:39 +0100)]
[AMDGPU] Lazily init pal metadata on first function

Delay reading global metadata until the first function or the end of
the file is emitted. That way, earlier module passes can set metadata
that is emitted in the ELF.

`emitStartOfAsmFile` gets called when the passes are initialized,
which prevented earlier passes from changing the metadata.

This fixes issues encountered after converting
AMDGPUResourceUsageAnalysis to a Module pass in D117504.

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

2 years ago[libc++] Define `namespace views` in its own detail header.
Arthur O'Dwyer [Wed, 2 Feb 2022 17:23:51 +0000 (12:23 -0500)]
[libc++] Define `namespace views` in its own detail header.

Discovered in the comments on D118748: we would like this namespace
to exist anytime Ranges exists, regardless of whether concepts syntax
is supported. Also, we'd like to fully granularize the <ranges> header,
which means not putting any loose declarations at the top level.

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

2 years ago[Clang][Sema][OpenMP] Sema support for `atomic compare`
Shilei Tian [Fri, 4 Feb 2022 17:30:17 +0000 (12:30 -0500)]
[Clang][Sema][OpenMP] Sema support for `atomic compare`

This patch adds the Sema support for `atomic compare`.

Reviewed By: ABataev

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

2 years ago[Driver][Android] Removed obsoleted --warn-shared-textrel
Fangrui Song [Fri, 4 Feb 2022 17:30:11 +0000 (09:30 -0800)]
[Driver][Android] Removed obsoleted --warn-shared-textrel

--warn-shared-textrel is ignored in ld.lld and obsoleted in GNU ld
(https://sourceware.org/bugzilla/show_bug.cgi?id=22909).

Note: binutils can be configured with --enable-textrel-check=[yes|error]
to make GNU ld error for text relocations by default, like ld.lld.

Reviewed By: srhines

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

2 years ago[libc++] Normalize all our '#pragma GCC system_header', and regression-test.
Arthur O'Dwyer [Wed, 2 Feb 2022 01:16:40 +0000 (20:16 -0500)]
[libc++] Normalize all our '#pragma GCC system_header', and regression-test.

Now we'll notice if a header forgets to include this magic phrase.

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

2 years ago[SimplifyCFG] 'merge compatible invokes': allow PHI nodes in landing pads
Roman Lebedev [Fri, 4 Feb 2022 17:16:49 +0000 (20:16 +0300)]
[SimplifyCFG] 'merge compatible invokes': allow PHI nodes in landing pads

... iff the incoming values for the invokes-to-be-merged
are compatible (identical).

2 years ago[NFC][SimplifyCFG] Extract `IncomingValuesAreCompatible()` out of `SafeToMergeTermina...
Roman Lebedev [Fri, 4 Feb 2022 15:43:29 +0000 (18:43 +0300)]
[NFC][SimplifyCFG] Extract `IncomingValuesAreCompatible()` out of `SafeToMergeTerminators()`

2 years ago[NFC][SimplifyCFG] 'merge compatible invokes': tests w/ PHI's in landingpad
Roman Lebedev [Fri, 4 Feb 2022 14:31:24 +0000 (17:31 +0300)]
[NFC][SimplifyCFG] 'merge compatible invokes': tests w/ PHI's in landingpad

2 years ago[AMDGPU] SILoadStoreOptimizer: rewrite checkAndPrepareMerge. NFCI.
Jay Foad [Thu, 27 Jan 2022 14:22:55 +0000 (14:22 +0000)]
[AMDGPU] SILoadStoreOptimizer: rewrite checkAndPrepareMerge. NFCI.

Separate the function clearly into:
- Checks that can be done on CI and Paired before the loop.
- The loop over all instructions between CI and Paired.
- Checks that must be done on InstsToMove after the loop.

Previously these were mostly done inside the loop in a very
confusing way.

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

2 years ago[RISCV] Add more types of shuffles isShuffleMaskLegal.
Craig Topper [Fri, 4 Feb 2022 17:13:12 +0000 (09:13 -0800)]
[RISCV] Add more types of shuffles isShuffleMaskLegal.

Add the vslidedown and interleave patterns that I recently implemented.

Reviewed By: frasercrmck

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

2 years ago[RISCV] Add inline expansion for vector fround.
Craig Topper [Fri, 4 Feb 2022 17:01:07 +0000 (09:01 -0800)]
[RISCV] Add inline expansion for vector fround.

This avoids a crash for scalable vectors and or scalarization for
fixed vectors.

The algorithm is different enough that I don't think it makes sense
to merge with ceil/floor/trunc. Algorithm is adapted from gcc's X86
SSE2 output.

Reviewed By: frasercrmck

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

2 years ago[Support] Add isShiftedMask_32/isShiftedMask_64 unit test coverage
Simon Pilgrim [Fri, 4 Feb 2022 17:06:48 +0000 (17:06 +0000)]
[Support] Add isShiftedMask_32/isShiftedMask_64 unit test coverage

2 years ago[NFC] Move FoldingSetNodeIDRef::ComputeHash and FoldingSetNodeID::ComputeHash definit...
Dawid Jurczak [Fri, 4 Feb 2022 17:03:42 +0000 (18:03 +0100)]
[NFC] Move FoldingSetNodeIDRef::ComputeHash and FoldingSetNodeID::ComputeHash definitions to header

Lack of ComputeHash inlining slows down slightly FoldingSetBase::FindNodeOrInsertPos calls.
Inlining makes it faster which matters in particular for FoldingSet users in ASTContext.

Extracted from: https://reviews.llvm.org/D118385

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

2 years ago[InstCombine] try to fold one-demanded-bit-of-multiply
Sanjay Patel [Fri, 4 Feb 2022 16:24:01 +0000 (11:24 -0500)]
[InstCombine] try to fold one-demanded-bit-of-multiply

This is a generalization of the icmp fold in D118061 (and that can be abandoned).
We're looking for a disguised form of "odd * odd must be odd".
Some Alive2 proofs to show correctness:
https://alive2.llvm.org/ce/z/60Y8hz
https://alive2.llvm.org/ce/z/HfAP6R

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

2 years ago[x86] add test coverage for AMD Ryzen fast sqrt codegen; NFC
Sanjay Patel [Fri, 4 Feb 2022 15:35:17 +0000 (10:35 -0500)]
[x86] add test coverage for AMD Ryzen fast sqrt codegen; NFC

2 years ago[BitstreamReader] Fix incorrect error forwarding
Nikita Popov [Fri, 4 Feb 2022 16:30:48 +0000 (17:30 +0100)]
[BitstreamReader] Fix incorrect error forwarding

This code clearly intended to forward the error, but instead
returned the non-error result.

2 years ago[BitstreamReader] Handle errors more gracefully
Nikita Popov [Fri, 4 Feb 2022 16:23:08 +0000 (17:23 +0100)]
[BitstreamReader] Handle errors more gracefully

Use proper error reporting instead of report_fatal_error().

2 years ago[BitcodeReader] Resolve error handling todo
Nikita Popov [Fri, 4 Feb 2022 16:13:02 +0000 (17:13 +0100)]
[BitcodeReader] Resolve error handling todo

If possible, forward the inner error instead of creating a new
one.

2 years agoTweak some uses of std::iota to skip initializing the underlying storage. NFCI.
Benjamin Kramer [Fri, 4 Feb 2022 16:00:50 +0000 (17:00 +0100)]
Tweak some uses of std::iota to skip initializing the underlying storage. NFCI.

2 years agoDon't dllexport reference temporaries
Hans Wennborg [Fri, 4 Feb 2022 10:11:11 +0000 (11:11 +0100)]
Don't dllexport reference temporaries

Even if the reference itself is dllexport, the temporary should not be.
In fact, we're already giving it internal linkage, so dllexporting it
is not just wasteful, but will fail to link, as in the example below:

  $ cat /tmp/a.cc
  void _DllMainCRTStartup() {}
  const int __declspec(dllexport) &foo = 42;

  $ clang-cl -fuse-ld=lld /tmp/a.cc /Zl /link /dll /out:a.dll
  lld-link: error: <root>: undefined symbol: int const &foo::$RT1

Differential revision: https://reviews.llvm.org/D118980

2 years ago[gn build] (manually) port e1db505b42f4 (clang-pseudo)
Nico Weber [Fri, 4 Feb 2022 15:17:02 +0000 (10:17 -0500)]
[gn build] (manually) port e1db505b42f4 (clang-pseudo)

2 years ago[libc] Set default CXX_STANDARD to C++17 and let targets set their own standard if...
Tue Ly [Thu, 3 Feb 2022 05:03:27 +0000 (00:03 -0500)]
[libc] Set default CXX_STANDARD to C++17 and let targets set their own standard if needed.

CMAKE_CXX_STANDARD 14 is set in the llvm-project/llvm folder overriding all COMPILE_OPTIONS -std=c++17.  We need to override the CXX_STANDARD property of the target in order to set the correct C++ standard flags.

Reviewed By: gchatelet

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

2 years ago[HIP] Support code object v5
Yaxun (Sam) Liu [Thu, 3 Feb 2022 19:07:45 +0000 (14:07 -0500)]
[HIP] Support code object v5

New device library supporting v4 and v5 has abi_version_400.bc and abi
version_500.bc.

For v5, abi_version_500.bc is linked.

For v2-4, abi_version_400.bc is linked.

For old device library, for v2-4, none of the above is linked. For v5,
error is emitted about unsupported ABI version.

Reviewed by: Artem Belevich

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

Fixes: SWDEV-321313

2 years ago[AMDGPU] SILoadStoreOptimizer: fewer calls to offsetsCanBeCombined
Jay Foad [Fri, 4 Feb 2022 14:51:28 +0000 (14:51 +0000)]
[AMDGPU] SILoadStoreOptimizer: fewer calls to offsetsCanBeCombined

Only call offsetsCanBeCombined with Modify = true in cases
where it will really do something. NFC.

2 years ago[AMDGPU][GFX9][DOC][NFC] Corrected description of registers available via getreg...
Dmitry Preobrazhensky [Fri, 4 Feb 2022 14:55:01 +0000 (17:55 +0300)]
[AMDGPU][GFX9][DOC][NFC] Corrected description of registers available via getreg/setreg

This is to reflect changes introduced by https://reviews.llvm.org/D118860.

2 years ago[NFC][SVE] Change useSVEForFixedLengthVectorVT to allow unconditional SVE usage for...
Paul Walker [Fri, 4 Feb 2022 00:52:18 +0000 (00:52 +0000)]
[NFC][SVE] Change useSVEForFixedLengthVectorVT to allow unconditional SVE usage for NEON sized vectors.

Previously useSVEForFixedLengthVectorVT only allowed SVE usage when
the target SVE register length was known to be at least 256bit.
This was true even for NEON sized vectors, which was an artificial
restriction imposed during early SVE bring up.  This now changes so
that callers can opt to use SVE for NEON sized vectors regardless
of the SVE register length.

The patch is NFC because for all places where OverrideNEON is used
we now explicitly also check that SVE code generation for larger
than NEON vectors is enabled.  The intent is that over time these
extra checks will either be removed or the lowering disabled if the
SVE usage proves not beneficial.

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

2 years ago[AMDGPU] SILoadStoreOptimizer: simplify class/subclass checks
Jay Foad [Fri, 28 Jan 2022 11:07:58 +0000 (11:07 +0000)]
[AMDGPU] SILoadStoreOptimizer: simplify class/subclass checks

Also add a comment explaining the difference between class
and subclass. NFCI.

2 years ago[AArch64] Expand UADDLV patterns to SADDLV
David Green [Fri, 4 Feb 2022 14:07:02 +0000 (14:07 +0000)]
[AArch64] Expand UADDLV patterns to SADDLV

We already had some patterns for UADDV(UADDLP(x)) -> UADDLV(x), this
simply expands them to the signed instructions by re-using the tablegen
patterns.

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

2 years ago[SimplifyCFG] Merge compatible `invoke`s of a `landingpad`
Roman Lebedev [Fri, 4 Feb 2022 14:04:10 +0000 (17:04 +0300)]
[SimplifyCFG] Merge compatible `invoke`s of a `landingpad`

While nowadays SimplifyCFG knows how to hoist code from then-else blocks,
sink code from unconditional predecessors, and even promote the latter
by tail-merging `ret`/`resume` function terminators, that isn't everything.

While i (& others) have been trying to deal with merging/sinking `unreachable`,
apparently perhaps the more impactful remaining problem is merging the `throw`
calls.

If we start at the `landingpad`, all the predecessors are unwind edges of `invoke`s,
and in some cases some of the `invoke`s are mergeable.
```
/// This is a weird mix of hoisting and sinking. Visually, it goes from:
///          [...]        [...]
///            |            |
///        [invoke0]    [invoke1]
///           / \          / \
///     [cont0] [landingpad] [cont1]
/// to:
///      [...] [...]
///          \ /
///       [invoke]
///          / \
///     [cont] [landingpad]
```

This simplifies the IR/CFG, at the cost of debug info and extra PHI nodes.

Note that we don't require for *all* the `invokes` of the `landingpad`
to be mergeable, they can form more than a single set, we gracefully handle that.

For now, i completely disallowed normal destination, PHI nodes and indirect invokes
but that can be supported.

Out of all the CTMark projects, only 7zip is C++, so there isn't much impact:
https://llvm-compile-time-tracker.com/compare.php?from=ba8eb31bd9542828f6424e15a3014f80f14522c8&to=722fc871c84f14157d45c2159bc9c8c7e2825785&stat=size-total
... but there it currently causes size-total decrease.

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

2 years ago[ConstraintElimination] Add initial signed support.
Florian Hahn [Fri, 4 Feb 2022 14:02:48 +0000 (14:02 +0000)]
[ConstraintElimination] Add initial signed support.

This patch adds initial support for signed conditions. To do so,
ConstraintElimination maintains two separate systems, one with facts
from signed and one for unsigned conditions.

To start with this means information from signed and unsigned conditions
is kept completely separate. When it is safe to do so, information from
signed conditions may be also transferred to the unsigned system and
vice versa. That's left for follow-ups.

In the initial version, de-composition of signed values just handles
constants and otherwise just uses the value, without trying to
decompose the operation. Again this can be extended in follow-up
changes.

The main benefit of this limited signed support is proving >=s 0
pre-conditions added in D118799. But even this initial version also
fixes PR53273.

Depends on D118799.

Reviewed By: reames

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

2 years ago[NFC][SimplifyCFG] 'merge compatible invokes': test with PHI nodes in unreachable...
Roman Lebedev [Fri, 4 Feb 2022 13:50:32 +0000 (16:50 +0300)]
[NFC][SimplifyCFG] 'merge compatible invokes': test with PHI nodes in unreachable normal destinations

2 years ago[Statepoint] Determine return type from elementtype attribute
Nikita Popov [Fri, 4 Feb 2022 13:37:02 +0000 (14:37 +0100)]
[Statepoint] Determine return type from elementtype attribute

Based on the LangRef change in D117890, this uses the elementtype
attribute rather than the pointer element type to determine the
statepoint callee function type, making statepoints compatible
with opaque pointers.

2 years ago[Verifier] Require elementtype on gc.statepoint intrinsics
Nikita Popov [Fri, 4 Feb 2022 11:29:01 +0000 (12:29 +0100)]
[Verifier] Require elementtype on gc.statepoint intrinsics

This enforces the requirement specified in D117890.

2 years ago[AMDGPU] SILoadStoreOptimizer: simplify optimizeInstsWithSameBaseAddr
Jay Foad [Fri, 4 Feb 2022 13:24:11 +0000 (13:24 +0000)]
[AMDGPU] SILoadStoreOptimizer: simplify optimizeInstsWithSameBaseAddr

Common up all the calls to CI.setMI. NFCI.

2 years ago[Statepoint] Update gc.statepoint calls in tests with elementtype (NFC)
Nikita Popov [Fri, 4 Feb 2022 11:47:03 +0000 (12:47 +0100)]
[Statepoint] Update gc.statepoint calls in tests with elementtype (NFC)

This updates tests for the LangRef change in D117890.

2 years ago[AMDGPU] SILoadStoreOptimizer: simplify OptimizeListAgain test
Jay Foad [Fri, 4 Feb 2022 13:02:19 +0000 (13:02 +0000)]
[AMDGPU] SILoadStoreOptimizer: simplify OptimizeListAgain test

At this point CI represents the combined access (original CI combined
with Paired) so it doesn't make any sense to add in Paired.width again.
NFCI.

2 years ago[AArch64] Fix legalization of v1f64 strict_fsetcc and strict_fsetccs
John Brawn [Tue, 25 Jan 2022 17:41:33 +0000 (17:41 +0000)]
[AArch64] Fix legalization of v1f64 strict_fsetcc and strict_fsetccs

These operations are scalarized but the result type v1i1 isn't which
needs special handling (the same as is done for the non-strict
versions of these operations).

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

2 years ago[AArch64] Generate fcmps when appropriate for neon intrinsics
John Brawn [Tue, 25 Jan 2022 17:29:52 +0000 (17:29 +0000)]
[AArch64] Generate fcmps when appropriate for neon intrinsics

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

2 years agoRevert "[x86] try harder to scalarize a vector load with extracted integer op uses"
Sanjay Patel [Fri, 4 Feb 2022 12:45:57 +0000 (07:45 -0500)]
Revert "[x86] try harder to scalarize a vector load with extracted integer op uses"

This reverts commit b4b97ec813a02585000f30ac7d532dda74e8bfda.

As discussed in post-commit feedback at:
https://reviews.llvm.org/D118376
...there's a stage 2 failure on a Mac running a clang-refactor tool test.

2 years ago[lldb] Remove Log:Channel::GetLogIfAll
Pavel Labath [Thu, 3 Feb 2022 13:54:13 +0000 (14:54 +0100)]
[lldb] Remove Log:Channel::GetLogIfAll

after the recent refactor, the function is unused.

2 years ago[OpenMP][Clang] Allow ancestor device modifier only with reverse offloading
Saiyedul Islam [Thu, 3 Feb 2022 11:28:04 +0000 (11:28 +0000)]
[OpenMP][Clang] Allow ancestor device modifier only with reverse offloading

OpenMP Spec 5.0 [2.12.5, Restrictions]: If a device clause in which the
ancestor device-modifier appears is present on the target construct,
then a requires directive with the reverse_offload clause must be
specified.

Reviewed By: ABataev

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

2 years ago[libc++] Remove vector base class
Nikolas Klauser [Thu, 3 Feb 2022 22:09:37 +0000 (23:09 +0100)]
[libc++] Remove vector base class

Remove the vector base class as suggested by @ldionne

Reviewed By: ldionne, Quuxplusone, #libc

Spies: libcxx-commits, ldionne

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

2 years ago[ConstraintElimination] Allow adding pre-conditions for constraints.
Florian Hahn [Fri, 4 Feb 2022 11:45:07 +0000 (11:45 +0000)]
[ConstraintElimination] Allow adding pre-conditions for constraints.

With this patch pre-conditions can be added to a list of constraints.
Constraints with pre-conditions can only be used if all pre-conditions
are satisfied when the constraint is used.

The pre-conditions at the moment are specified as a list of
(Predicate, Value *,Value *) tuples. This allow easily checking them
like any other condition, using the existing infrastructure.

This then is used to limit GEP decomposition to cases where we can
prove that offsets are signed positive.

This fixes a couple of incorrect transforms where GEP offsets where
assumed to be signed positive, but they were not.

Note that this effectively disables GEP decomposition, as there's no
support for reasoning about signed predicates. D118806 adds initial
signed support.

Fixes PR49624.

Reviewed By: reames

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

2 years ago[Format] Also test rvalue-qualified functions
Sam McCall [Fri, 4 Feb 2022 11:17:25 +0000 (12:17 +0100)]
[Format] Also test rvalue-qualified functions

2 years ago[Format] Don't derive pointers right based on space before method ref-qualifiers
Sam McCall [Thu, 3 Feb 2022 17:15:49 +0000 (18:15 +0100)]
[Format] Don't derive pointers right based on space before method ref-qualifiers

The second space in `void foo() &` is always produced by clang-format,
and isn't evidence of any particular style.

Before this patch, it was considered evidence of PAS_Right, because
there is a space before a pointerlike ampersand.

This caused the following code to have "unstable" pointer alignment:
  void a() &;
  void b() &;
  int *x;
PAS_Left, Derive=false would produce 'int* x' with other lines unchanged.
But subsequent formatting with Derive=true would produce 'int *x' again.

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

2 years ago[clang][CodeGen] Use memory type representation in `va_arg`
Jan Svoboda [Thu, 3 Feb 2022 14:59:55 +0000 (15:59 +0100)]
[clang][CodeGen] Use memory type representation in `va_arg`

Some types (e.g. `_Bool`) have different scalar and memory representations. CodeGen for `va_arg` didn't take this into account, leading to an assertion failures with different types.

This patch makes sure we use memory representation for `va_arg`.

Reviewed By: ahatanak

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

2 years ago[syntax][pseudo] Introduce the C++ spec grammar.
Haojian Wu [Thu, 20 Jan 2022 10:02:50 +0000 (11:02 +0100)]
[syntax][pseudo] Introduce the C++ spec grammar.

Add a dummy clang-pseudo tool (right now it accepts and parses the
grammar file).

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

2 years agoReduce dependencies on llvm/BinaryFormat/Dwarf.h
serge-sans-paille [Wed, 2 Feb 2022 12:53:56 +0000 (13:53 +0100)]
Reduce dependencies on llvm/BinaryFormat/Dwarf.h

This header is very large (3M Lines once expended) and was included in location
where dwarf-specific information were not needed.

More specifically, this commit suppresses the dependencies on
llvm/BinaryFormat/Dwarf.h in two headers: llvm/IR/IRBuilder.h and
llvm/IR/DebugInfoMetadata.h. As these headers (esp. the former) are widely used,
this has a decent impact on number of preprocessed lines generated during
compilation of LLVM, as showcased below.

This is achieved by moving some definitions back to the .cpp file, no
performance impact implied[0].

As a consequence of that patch, downstream user may need to manually some extra
files:

llvm/IR/IRBuilder.h no longer includes llvm/BinaryFormat/Dwarf.h
llvm/IR/DebugInfoMetadata.h no longer includes llvm/BinaryFormat/Dwarf.h

In some situations, codes maybe relying on the fact that
llvm/BinaryFormat/Dwarf.h was including llvm/ADT/Triple.h, this hidden
dependency now needs to be explicit.

$ clang++ -E  -Iinclude -I../llvm/include ../llvm/lib/Transforms/Scalar/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l
after:   10978519
before:  11245451

Related Discourse thread: https://llvm.discourse.group/t/include-what-you-use-include-cleanup
[0] https://llvm-compile-time-tracker.com/compare.php?from=fa7145dfbf94cb93b1c3e610582c495cb806569b&to=995d3e326ee1d9489145e20762c65465a9caeab4&stat=instructions

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

2 years ago[flang] Upstream partial lowering of GET_COMMAND_ARGUMENT intrinsic
Josh Mottley [Thu, 6 Jan 2022 14:55:33 +0000 (14:55 +0000)]
[flang] Upstream partial lowering of GET_COMMAND_ARGUMENT intrinsic

This patch adds partial lowering of the "GET_COMMAND_ARGUMENT"
intrinsic to the backend runtime hook implemented in patches D109227,
D109813, D109814.

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

2 years ago[OpenCL] Move OpenCL 2.0 atomics into multiclass; NFC
Sven van Haastregt [Fri, 4 Feb 2022 10:17:48 +0000 (10:17 +0000)]
[OpenCL] Move OpenCL 2.0 atomics into multiclass; NFC

This is in preparation for adding the OpenCL 3.0 builtins with named
address space arguments.

2 years ago[AArch64][SVE] Remove false register dependency for unary FP convert operations
Matt Devereau [Mon, 31 Jan 2022 16:24:48 +0000 (16:24 +0000)]
[AArch64][SVE] Remove false register dependency for unary FP convert operations

Generate movprfx for floating point convert zeroing pseudo operations

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

2 years ago[RS4GC] Restore DAG check line (NFC)
Nikita Popov [Fri, 4 Feb 2022 09:25:00 +0000 (10:25 +0100)]
[RS4GC] Restore DAG check line (NFC)

It's fishy that this is needed, but this is what the test did
previously. Should hopefully address buildbot failures.

2 years agoSplit fast-basictest.ll according to passes responsible for optimizations
Daniil Kovalev [Fri, 4 Feb 2022 08:40:10 +0000 (11:40 +0300)]
Split fast-basictest.ll according to passes responsible for optimizations

- add logically missing test cases.
- add appropriate comments.
- add appropriate TODO's.

See initial motivation in https://reviews.llvm.org/D117302

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

2 years ago[flang] Handle logical constant value for quiet in STOP stmt
Valentin Clement [Fri, 4 Feb 2022 09:11:46 +0000 (10:11 +0100)]
[flang] Handle logical constant value for quiet in STOP stmt

This patch handles the quiet argument in the STOP statement. It adds
ability to lower LOGICAL constant.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: kiranchandramohan, PeteSteinfeld

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

Co-authored-by: Jean Perier <jperier@nvidia.com>
2 years ago[pseudo] NFC, clangSyntaxPsuedo => clangToolingSyntaxPseudo
Haojian Wu [Fri, 4 Feb 2022 08:57:20 +0000 (09:57 +0100)]
[pseudo] NFC, clangSyntaxPsuedo => clangToolingSyntaxPseudo

To be consistent with existing name pattern.

2 years ago[pseudo] Rename Tests.cpp => Test.cpp
Haojian Wu [Fri, 4 Feb 2022 08:31:53 +0000 (09:31 +0100)]
[pseudo] Rename Tests.cpp => Test.cpp

To be consistent with other files in clang unittest directory.

2 years ago[IRBuilder][RS4GC] Require FunctionCallee when creating statepoint
Nikita Popov [Thu, 3 Feb 2022 10:29:06 +0000 (11:29 +0100)]
[IRBuilder][RS4GC] Require FunctionCallee when creating statepoint

This makes the statepoint methods in IRBuilder accept a
FunctionCallee, which carries both the callee and function type.
This is used to add the elementtype attribute to the statepoint call.

RS4GC requires an additional tweak to actually preserve that attribute
-- previously the attributes on the call were completely overwritten.

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

2 years ago[LangRef] Require elementtype attribute for gc.statepoint intrinsic
Nikita Popov [Fri, 21 Jan 2022 14:46:00 +0000 (15:46 +0100)]
[LangRef] Require elementtype attribute for gc.statepoint intrinsic

The gc.statepoint intrinsic currently determines the target function
type based on the pointer element type of the argument. In order to
support opaque pointers, require that the argument is annotated with
an elementtype attribute.

Here's an example of the change:

    ; Before:
      %safepoint_token = tail call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0)

    ; After:
      %safepoint_token = tail call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* elementtype(i1 ()) @return_i1, i32 0, i32 0, i32 0, i32 0)

    ; After with opaque pointers:
      %safepoint_token = tail call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(i1 ()) @return_i1, i32 0, i32 0, i32 0, i32 0)

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

2 years ago[DAGCombiner] Fix dependency analysis in checkMergeStoreCandidatesForDependencies
Bjorn Pettersson [Thu, 3 Feb 2022 21:16:42 +0000 (22:16 +0100)]
[DAGCombiner] Fix dependency analysis in checkMergeStoreCandidatesForDependencies

In the aftermath of D116895 a problem was found in the analysis of
dependencies between store merge candidates in
checkMergeStoreCandidatesForDependencies, that is needed to avoid
the cycles are introduced in the DAG.

In the past it has been enough (or assumed to be enough) to start
scanning from non-chain operands when analysing the store merge
candidates for dependencies, assuming that the analysis of chain
dependencies performed when finding the candidates would cover
up for potential dependencies that exist involving the chain operands.
It was however discovered that one could end up with scenarios such
as descibed in the aarch64-checkMergeStoreCandidatesForDependencies.ll
test case, when the dependency between two stores is given by a mix
of chain operand dependencies and non-chain operand dependencies.

The fix in this patch make sure that we also account for chain operand
dependencies when doing the more elaborate analysis in
checkMergeStoreCandidatesForDependencies, no longer relying on that
the earlier check involving chain operands is enough.

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

2 years ago[ORC] Fix JITDylib debug output: don't output symbol table entry flags twice.
Lang Hames [Fri, 4 Feb 2022 07:28:25 +0000 (18:28 +1100)]
[ORC] Fix JITDylib debug output: don't output symbol table entry flags twice.

2 years ago[libc++][NFC] Use cpp17_output_iterator in tests.
Mark de Wever [Sat, 22 Jan 2022 15:37:20 +0000 (16:37 +0100)]
[libc++][NFC] Use cpp17_output_iterator in tests.

The renames the output_iterator to cpp17_output_iterator. These
iterators are still used in C++20 so it's not possible to change the
current type to the new C++20 requirements. This is done in a similar
fashion as the cpp17_input_iterator.

Reviewed By: #libc, Quuxplusone, ldionne

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

2 years ago[mlir] Add pass to privatize symbols unless excluded.
Jacques Pienaar [Fri, 4 Feb 2022 04:20:54 +0000 (20:20 -0800)]
[mlir] Add pass to privatize symbols unless excluded.

Simple pass that changes all symbols to private unless symbol is excluded (and
in which case there is no change to symbol's visibility).

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

2 years ago[SLP] Have only ready items in ready list [NFC]
Philip Reames [Fri, 4 Feb 2022 03:33:27 +0000 (19:33 -0800)]
[SLP] Have only ready items in ready list [NFC]

This adds the assertion that all items in the ready list are in-fact scheduleable entities ready to be scheduled.  This involves changing the ReadyInsts structure to be a set, and fixing a couple places where we left nodes on the list when they were no longer ready.

2 years ago[libc][Obvious] Fix a mismatch signature of HighPrecisionDecimal::should_round_up.
Tue Ly [Wed, 2 Feb 2022 15:18:28 +0000 (10:18 -0500)]
[libc][Obvious] Fix a mismatch signature of HighPrecisionDecimal::should_round_up.

Its input should be int32_t instead of uint32_t.

Reviewed By: michaelrj, sivachandra

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

2 years ago[test-release.sh] Set TEST_SUITE_HOST_CC to the release testing build compiler when...
Amy Kwan [Fri, 4 Feb 2022 03:31:44 +0000 (21:31 -0600)]
[test-release.sh] Set TEST_SUITE_HOST_CC to the release testing build compiler when compiling test-suite tools.

The tools used by test-suite are originally configured to compile with cc by
default, and this is dictated by TEST_SUITE_HOST_CC.
However, it is possible that on some systems that the version of cc may either
not be present or it may not be able to compile the tools as it may be too old,
which could be an issue seen during release testing.

This patch updates the compiler to be the default build compiler that is used
for release testing. If no such compiler it specified, then cc will be set as
the test-suite tools build compiler by default (as it already is set under
TEST_SUITE_HOST_CC).

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

2 years ago[RS4GC] Extract rematerilazable candidate search. NFC.
Serguei Katkov [Thu, 27 Jan 2022 09:23:10 +0000 (16:23 +0700)]
[RS4GC] Extract rematerilazable candidate search. NFC.

Finding re-materialization chain for derived pointer does not depend on
call site. To avoid this finding for each call site it can be extracted in
a separate routine.

Reviewers: reames, dantrushin
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D118676

2 years ago[hwasan] [nfc] simplify getAllocaSizeInBytes
Florian Mayer [Fri, 4 Feb 2022 01:42:19 +0000 (17:42 -0800)]
[hwasan] [nfc] simplify getAllocaSizeInBytes

AllocaInst::getAllocationSize implements essentially the same logic as
our custom function.

Reviewed By: hctim

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

2 years ago[OpenMP] Add Cuda path to linker wrapper tool
Joseph Huber [Thu, 3 Feb 2022 21:41:47 +0000 (16:41 -0500)]
[OpenMP] Add Cuda path to linker wrapper tool

The linker wrapper tool uses the 'nvlink' and 'ptxas' binaries to link
and assemble device files. Previously we searched for this using the
binaries in the user's path. This didn't work in cases where the user
passed in a specific Cuda path to Clang. This patch changes the linker
wrapper to accept an argument for the Cuda path we can get from Clang.
This should fix #53573.

Reviewed By: tianshilei1992

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

2 years ago[nfc][mlgo][regalloc] Cache live interval feature components
Mircea Trofin [Tue, 1 Feb 2022 02:53:54 +0000 (18:53 -0800)]
[nfc][mlgo][regalloc] Cache live interval feature components

Lazily cache the feature components of a LiveInterval.

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

2 years ago[Support] unsafe pointer arithmetic in llvm_regcomp()
Miod Vallat [Fri, 4 Feb 2022 00:50:58 +0000 (19:50 -0500)]
[Support] unsafe pointer arithmetic in llvm_regcomp()

regcomp.c uses the "start + count < end" idiom to check that there are
"count" bytes available in an array of char "start" and "end" both point
to.

This is fine, unless "start + count" goes beyond the last element of the
array. In this case, pedantic interpretation of the C standard makes
the comparison of such a pointer against "end" undefined, and optimizers
from hell will happily remove as much code as possible because of this.

An example of this occurs in regcomp.c's bothcases(), which defines
bracket[3], sets "next" to "bracket" and "end" to "bracket + 2". Then it
invokes p_bracket(), which starts with "if (p->next + 5 < p->end)"...

Because bothcases() and p_bracket() are static functions in regcomp.c,
there is a real risk of miscompilation if aggressive inlining happens.

The following diff rewrites the "start + count < end" constructs into
"end - start > count". Assuming "end" and "start" are always pointing in
the array (such as "bracket[3]" above), "end - start" is well-defined
and can be compared without trouble.

As a bonus, MORE2() implies MORE() therefore SEETWO() can be simplified
a bit.

Bug report: https://github.com/llvm/llvm-project/issues/47993

Reviewed By: MaskRay, vitalybuka

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

2 years ago[lld-macho][nfc] Eliminate InputSection::Shared
Jez Ng [Fri, 4 Feb 2022 00:53:29 +0000 (19:53 -0500)]
[lld-macho][nfc] Eliminate InputSection::Shared

Earlier in LLD's evolution, I tried to create the illusion that
subsections were indistinguishable from "top-level" sections. Thus, even
though the subsections shared many common field values, I hid those
common values away in a private Shared struct (see D105305). More
recently, however, @gkm added a public `Section` struct in D113241 that
served as an explicit way to store values that are common to an entire
set of subsections (aka InputSections). Now that we have another "common
value" struct, `Shared` has been rendered redundant. All its fields can
be moved into `Section` instead, and the pointer to `Shared` can be replaced
with a pointer to `Section`.

This `Section` pointer also has the advantage of letting us inspect other
subsections easily, simplifying the implementation of {D118798}.

P.S. I do think that having both `Section` and `InputSection` makes for
a slightly confusing naming scheme. I considered renaming `InputSection`
to `Subsection`, but that would break the symmetry with `OutputSection`.
It would also make us deviate from LLD-ELF's naming scheme.

This change is perf-neutral on my 3.2 GHz 16-Core Intel Xeon W machine:

             base           diff           difference (95% CI)
  sys_time   1.258 ± 0.031  1.248 ± 0.023  [  -1.6% ..   +0.1%]
  user_time  3.659 ± 0.047  3.658 ± 0.041  [  -0.5% ..   +0.4%]
  wall_time  4.640 ± 0.085  4.625 ± 0.063  [  -1.0% ..   +0.3%]
  samples    49             61

There's also no stat sig change in RSS (as measured by `time -l`):

           base                         diff                           difference (95% CI)
  time     998038627.097 ± 13567305.958 1003327715.556 ± 15210451.236  [  -0.2% ..   +1.2%]
  samples  31                           36

Reviewed By: #lld-macho, oontvoo

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

2 years agoRevert "[ProfileData] Read and symbolize raw memprof profiles."
Snehasish Kumar [Fri, 4 Feb 2022 00:09:23 +0000 (16:09 -0800)]
Revert "[ProfileData] Read and symbolize raw memprof profiles."

This reverts commit 26f978d4c5ad0d2217940ef7625b0c3c0d576988.

This patch added a transitive dependency on libcurl via symbolize.
See discussion
https://reviews.llvm.org/D116784#inline-1137928
https://reviews.llvm.org/D113717#3295350

2 years agogithub: Fix issue-subscriber workflow
Tom Stellard [Fri, 4 Feb 2022 00:11:04 +0000 (16:11 -0800)]
github: Fix issue-subscriber workflow

This stopped working due to additional dependencies added to github-automation.py
by daf82a51a0c2ba9990cde172a4a1b8c1004d584d

2 years ago[gn build] Set -fmsc-version=1920 on Windows
Arthur Eubanks [Thu, 3 Feb 2022 23:55:53 +0000 (15:55 -0800)]
[gn build] Set -fmsc-version=1920 on Windows

Now that the minimum version version of MSVC required to build LLVM has
been bumped, we see

  ../../llvm/include\llvm/Support/Compiler.h(94,2): error: LLVM requires
  at least VS 2019.
  #error LLVM requires at least VS 2019.

e.g. http://45.33.8.238/win/53703/step_4.txt

1920 corresponds to the earliest version of VS 2019.

Reviewed By: thakis

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

2 years agoRevert "[instrprof][NFC] Sort link components and dedupe."
Snehasish Kumar [Thu, 3 Feb 2022 23:41:24 +0000 (15:41 -0800)]
Revert "[instrprof][NFC] Sort link components and dedupe."

This reverts commit 28ba0b9f6dd6dd08c7c2380a0c00c7170d3ddf48.

clang ppc build failed
https://lab.llvm.org/buildbot#builders/121/builds/16080

2 years ago[LLDB][NativePDB] terminal entry has lower precedence than new entry
Zequan Wu [Thu, 3 Feb 2022 23:41:18 +0000 (15:41 -0800)]
[LLDB][NativePDB] terminal entry has lower precedence than new entry