platform/upstream/llvm.git
2 years ago[RISCV] Support VECTOR_REVERSE mask operation.
Lian Wang [Mon, 27 Jun 2022 08:57:20 +0000 (08:57 +0000)]
[RISCV] Support VECTOR_REVERSE mask operation.

Reviewed By: craig.topper

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

2 years ago[Alignment] Replace commonAlignment with std::min
Guillaume Chatelet [Wed, 22 Jun 2022 15:02:48 +0000 (15:02 +0000)]
[Alignment] Replace commonAlignment with std::min

`commonAlignment` is a shortcut to pick the smallest of two `Align`
objects. As-is it doesn't bring much value compared to `std::min`.

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

2 years ago[clang-cl] Add -emit-ast to clang-cl driver
Tobias Hieta [Mon, 27 Jun 2022 07:27:38 +0000 (09:27 +0200)]
[clang-cl] Add -emit-ast to clang-cl driver

Also make the output of -emit-ast end up where /o points.
The same with .plist files from the static analyzer.

These are changes needed to make it possible to do CTU static
analysing work with clang-cl.

Reviewed By: hans

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

2 years ago[Clang] Fix: Restore warning inadvertently removed by D126061.
Martin Boehme [Tue, 28 Jun 2022 06:50:59 +0000 (08:50 +0200)]
[Clang] Fix: Restore warning inadvertently removed by D126061.

Before D126061, Clang would warn about this code

```
struct X {
    [[deprecated]] struct Y {};
};
```

with the warning

    attribute 'deprecated' is ignored, place it after "struct" to apply attribute to type declaration

D126061 inadvertently caused this warning to no longer be emitted. This patch
restores the previous behavior.

The reason for the bug is that after D126061, C++11 attributes applied to a
member declaration are no longer placed in `DS.getAttributes()` but are instead
tracked in a separate list (`DeclAttrs`). In the case of a free-standing
decl-specifier-seq, we would simply ignore the contents of this list. Instead,
we now pass the list on to `Sema::ParsedFreeStandingDeclSpec()` so that it can
issue the appropriate warning.

Reviewed By: aaron.ballman

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

2 years agoReland "[X86] Support `_Float16` on SSE2 and up"
Phoebe Wang [Mon, 27 Jun 2022 13:02:57 +0000 (21:02 +0800)]
Reland "[X86] Support `_Float16` on SSE2 and up"

Enable `COMPILER_RT_HAS_FLOAT16` to solve the lit fail.

This is split from D113107 to address #56204 and https://discourse.llvm.org/t/how-to-build-compiler-rt-for-new-x86-half-float-abi/63366

Reviewed By: zahiraam, rjmccall, bkramer

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

2 years ago[CSSPGO][llvm-profgen] Reimplement SampleContextTracker using context trie
wlei [Tue, 28 Jun 2022 06:00:05 +0000 (23:00 -0700)]
[CSSPGO][llvm-profgen] Reimplement SampleContextTracker using context trie

This is the followup patch to https://reviews.llvm.org/D125246 for the `SampleContextTracker` part. Before the promotion and merging of the context is based on the SampleContext(the array of frame), this causes a lot of cost to the memory. This patch detaches the tracker from using the array ref instead to use the context trie itself. This can save a lot of memory usage and benefit both the compiler's CS inliner and llvm-profgen's pre-inliner.

One structure needs to be specially treated is the `FuncToCtxtProfiles`, this is used to get all the functionSamples for one function to do the merging and promoting. Before it search each functions' context and traverse the trie to get the node of the context. Now we don't have the context inside the profile, instead we directly use an auxiliary map `ProfileToNodeMap` for profile , it initialize to create the FunctionSamples to TrieNode relations and keep updating it during promoting and merging the node.

Moreover, I was expecting the results before and after remain the same, but I found that the order of FuncToCtxtProfiles matter and affect the results. This can happen on recursive context case, but the difference should be small. Now we don't have the context, so I just used a vector for the order, the result is still deterministic.

Measured on one huge size(12GB) profile from one of our internal service. The profile similarity difference is 99.999%, and the running time is improved by 3X(debug mode) and the memory is reduced from 170GB to 90GB.

Reviewed By: hoy, wenlei

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

2 years ago[CSSPGO][llvm-profgen] Reimplement computeSummaryAndThreshold using context trie
wlei [Fri, 24 Jun 2022 03:14:47 +0000 (20:14 -0700)]
[CSSPGO][llvm-profgen] Reimplement computeSummaryAndThreshold using context trie

Follow-up patch to https://reviews.llvm.org/D125246, support `computeSummaryAndThreshold` based on context trie.

Reviewed By: hoy, wenlei

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

2 years ago[CSSPGO][llvm-profgen] Reimplement CS profile generator using context trie
wlei [Tue, 28 Jun 2022 05:57:22 +0000 (22:57 -0700)]
[CSSPGO][llvm-profgen] Reimplement CS profile generator using context trie

Our investigation showed ProfileMap's key is the bottleneck of the memory consumption for CS profile generation on some large services. This patch tries to optimize it by storing the CS function samples using the context trie tree structure instead of the context frame array ref. Parts of code in `ContextTrieNode` are reused.

Our experiment on one internal service showed that the context key's memory can be reduced from 80GB to 300MB.

To be compatible with non-CS profiles, the profile writer still needs to use ProfileMap as input, so rebuild the ProfileMap using the context trie in `postProcessProfiles`.

The optimization is not complete yet, next step is to reimplement Pre-inliner or profile trimmer, after that, ProfileMap should be small to be written.

Reviewed By: hoy, wenlei

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

2 years agoRevert "[CoverageMapping] Remove dots from paths inside the profile"
Petr Hosek [Tue, 28 Jun 2022 06:20:54 +0000 (23:20 -0700)]
Revert "[CoverageMapping] Remove dots from paths inside the profile"

This reverts commit d1b098fc825176242afee12b8f9dc14adf5eec51 since
it is failing on Windows builders.

2 years ago[CoverageMapping] Remove dots from paths inside the profile
Petr Hosek [Tue, 22 Mar 2022 01:30:35 +0000 (18:30 -0700)]
[CoverageMapping] Remove dots from paths inside the profile

We already remove dots from collected paths and path mappings. This
makes it difficult to match paths inside the profile which contain
dots. For example, we would never match /path/to/../file.c because
the collected path is always be normalized to /path/file.c. This
change enables dot removal for paths inside the profile to address
the issue.

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

2 years ago[mlir][Vector] Fix reordering of floating point adds during lower of `vector.contract`.
Mahesh Ravishankar [Thu, 23 Jun 2022 21:06:45 +0000 (21:06 +0000)]
[mlir][Vector] Fix reordering of floating point adds during lower of `vector.contract`.

Adding the accumulator value after the `vector.contract` changes the
precision of the operation. This makes sure the accumulator is carried
through to `vector.reduce` (and down to LLVM).

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

2 years ago[LoopInterchange] New cost model for loop interchange
Congzhe Cao [Tue, 28 Jun 2022 04:06:16 +0000 (00:06 -0400)]
[LoopInterchange] New cost model for loop interchange

This is another attempt to land this patch.

The patch proposed to use a new cost model for loop interchange,
which is obtained from loop cache analysis.

Given a loopnest, what loop cache analysis returns is a vector of
loops [loop0, loop1, loop2, ...] where loop0 should be replaced as
the outermost loop, loop1 should be placed one more level inside, and
loop2 one more level inside, etc. What loop cache analysis does is not
only more comprehensive than the current cost model, it is also a "one-shot"
query which means that we only need to query it once during the entire
loop interchange pass, which is better than the current cost model where
we query it every time we check whether it is profitable to interchange
two loops. Thus complexity is reduced, especially after D120386 where we
do more interchanges to get the globally optimal loop access pattern.

Updates made to test cases are mostly minor changes and some
corrections. One change that applies to all tests is that we added an option
`-cache-line-size=64` to the RUN lines. This is ensure that loop
cache analysis receives a valid number of cache line size for correct
analysis. Test coverage for loop interchange is not reduced.

Currently we did not completely remove the legacy cost model, but
keep it as fall-back in case the new cost model did not run successfully.
This is because currently we have some limitations in delinearization, which
sometimes makes loop cache analysis bail out. The longer term goal is to
enhance delinearization and eventually remove the legacy cost model
compeletely.

Reviewed By: bmahjour, #loopoptwg

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

2 years ago[lldb] [test] Mark test_vCont_supports_t llgs-only
Michał Górny [Tue, 28 Jun 2022 04:06:54 +0000 (06:06 +0200)]
[lldb] [test] Mark test_vCont_supports_t llgs-only

Sponsored by: The FreeBSD Foundation

2 years ago[RISCV] Optimize 2x SELECT for floating-point types
LiaoChunyu [Thu, 16 Jun 2022 08:09:29 +0000 (16:09 +0800)]
[RISCV] Optimize 2x SELECT for floating-point types

Including the following opcode:
 Select_FPR16_Using_CC_GPR
 Select_FPR32_Using_CC_GPR
 Select_FPR64_Using_CC_GPR

Reviewed By: craig.topper

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

2 years ago[RISCV] Fix the problem of parsing long version numbers
Shao-Ce SUN [Tue, 28 Jun 2022 03:30:53 +0000 (11:30 +0800)]
[RISCV] Fix the problem of parsing long version numbers

For example, when parsing Zbpbo0p911, an error will be reported:
"multi-character extensions must be separated by underscores"

Reviewed By: asb

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

2 years ago[RISCV] Zero extend immediate for vget/vset builtins to match vector.insert/extract...
Craig Topper [Tue, 28 Jun 2022 03:26:33 +0000 (20:26 -0700)]
[RISCV] Zero extend immediate for vget/vset builtins to match vector.insert/extract intrinsics.

The vector.insert/extract intrinsics require an i64 immediate argument.
This fixes a crash on RV32.

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

2 years ago[LiveInterval] Simplify with partition_point. NFC
Fangrui Song [Tue, 28 Jun 2022 02:25:26 +0000 (19:25 -0700)]
[LiveInterval] Simplify with partition_point. NFC

2 years ago[libc++] Re-add transitive includes that had been removed since LLVM 14
Louis Dionne [Mon, 27 Jun 2022 19:53:41 +0000 (15:53 -0400)]
[libc++] Re-add transitive includes that had been removed since LLVM 14

This commit re-adds transitive includes that had been removed by
4cd04d1687f1c36870c8e79ca83f4b9cda571458458b558d2e2f3158c604,
and 489637e66dd3. This should cover almost all the includes that had
been removed since LLVM 14 and that would contribute to breaking user
code when releasing LLVM 15.

It is possible to disable the inclusion of these headers by defining
_LIBCPP_REMOVE_TRANSITIVE_INCLUDES. The intent is that vendors will
enable that macro and start fixing downstream issues immediately. We
can then remove the macro (and the transitive includes) by default in
a future release. That way, we will break users only once by removing
transitive includes in bulk instead of doing it bit by bit a every
release, which is more disruptive for users.

Note 1: The set of headers to re-add was found by re-generating the
        transitive include test on a checkout of release/14.x, which
        provided the list of all transitive includes we used to provide.

Note 2: Several includes of <vector>, <optional>, <array> and <unordered_map>
        have been added in this commit. These transitive inclusions were
        added when we implemented boyer_moore_searcher in <functional>.

Note 3: This is a best effort patch to try and resolve downstream breakage
        caused since branching LLVM 14. I wasn't able to perfectly mirror
        transitive includes in LLVM 14 for a few headers, so I added a
        release note explaining it. To summarize, adding boyer_moore_searcher
        created a bunch of circular dependencies, so we have to break
        backwards compatibility in a few cases.

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

2 years ago[RISCV] Fix misleading formatting and remove a dead getNode call. NFC
Craig Topper [Tue, 28 Jun 2022 01:49:31 +0000 (18:49 -0700)]
[RISCV] Fix misleading formatting and remove a dead getNode call. NFC

2 years agoAdd missing (void) for function declarations in C
David Blaikie [Tue, 28 Jun 2022 00:45:17 +0000 (00:45 +0000)]
Add missing (void) for function declarations in C

2 years agollvm-reduce: Handle reducing FP values to nan
Matt Arsenault [Thu, 9 Jun 2022 15:07:31 +0000 (11:07 -0400)]
llvm-reduce: Handle reducing FP values to nan

Prefer 0/1 over NaN, but it may make more sense to invert this as FP
operations with nan inputs can universally be folded into something
else.

2 years ago[docs] Remove outdated status update for FreeBSD
Brad Smith [Mon, 27 Jun 2022 23:37:59 +0000 (19:37 -0400)]
[docs] Remove outdated status update for FreeBSD

Reviewed By: emaste, MaskRay

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

2 years ago[test] Add -fsanitize=array-bounds test for pseudo flexible array member
Fangrui Song [Mon, 27 Jun 2022 23:40:52 +0000 (16:40 -0700)]
[test] Add -fsanitize=array-bounds test for pseudo flexible array member

This behavior (from commit 539e4a77bbabbc19f22b2bd24e04af2e432e599d in 2013) was untested.
The test can help detect regression introduced by 886715af962de2c92fac4bd37104450345711e4a

2 years ago[lldb] Use assertState in TestIgnoredExceptions
Jonas Devlieghere [Mon, 27 Jun 2022 23:30:32 +0000 (16:30 -0700)]
[lldb] Use assertState in TestIgnoredExceptions

2 years agoReland [Metadata] Add a resize capability to MDNodes and add a push_back interface...
Wolfgang Pieb [Mon, 16 May 2022 18:22:46 +0000 (11:22 -0700)]
Reland [Metadata] Add a resize capability to MDNodes and add a push_back interface to MDNode

Fixed a bug with double destruction of operands and corrected a test issue.

Note that this patch leads to a slight increase in compile time (I measured
about .3%) and a slight increase in memory usage. The increased memory usage
should be offset once resizing is used to a larger extent.

Reviewed By: dexonsmith

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

2 years ago[lit][test] relaxed GTEST_TOTAL_SHARDS checking for some googletests
Yuanfang Chen [Mon, 27 Jun 2022 23:12:45 +0000 (16:12 -0700)]
[lit][test] relaxed GTEST_TOTAL_SHARDS checking for some googletests

For machines with a small number of cores, GTEST_TOTAL_SHARDS may be
lower than 6.

2 years agoMark ASan global-location-nodebug test as unspported on win.
Mitch Phillips [Mon, 27 Jun 2022 23:03:32 +0000 (16:03 -0700)]
Mark ASan global-location-nodebug test as unspported on win.

Windows linkers don't have the easy reachable `-Wl,-S` option to strip
the binary. Disable the test for now.

2 years ago[mlir][ods] Add convertFromStorage field to parameters
Mogball [Thu, 23 Jun 2022 20:48:30 +0000 (20:48 +0000)]
[mlir][ods] Add convertFromStorage field to parameters

This patch adds a `convertFromStorage` field to attribute or type parameters that can implement more complex logic for converting from the parameter's C++ storage type (e.g. `Optional<SmallVector<T>>`) to its C++ type (e.g. `Optional<ArrayRef<T>>`).

Reviewed By: rriddle

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

2 years agoFix-forward ASan on Windows.
Mitch Phillips [Mon, 27 Jun 2022 22:51:14 +0000 (15:51 -0700)]
Fix-forward ASan on Windows.

D127911 deleted llvm.asan.globals. This had a side effect that we no
longer generated the `name` field for the `__asan_global` descriptor
from clang's decscription of the name, but the demangled name from the
LLVM IR. On Linux, this is the same as the clang-provided name. On
Windows, this includes the type, as the name in the IR is the mangled
name.

Attempt #1 to fix-forward the Windows bots by making the tests glob both
sides of the global name, thereby allowing types in the descriptor name.

2 years ago[lld][WebAssembly] Don't apply data relocations at static constructor time
Sam Clegg [Fri, 24 Jun 2022 10:04:58 +0000 (03:04 -0700)]
[lld][WebAssembly] Don't apply data relocations at static constructor time

Instead, export `__wasm_apply_data_relocs` and `__wasm_call_ctors`
separately.

This is required since user code in a shared library (such as static
constructors) should not be run until relocations have been applied to
all loaded libraries.

See: https://github.com/emscripten-core/emscripten/issues/17295

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

2 years ago[Clang][OpenMP] Don't overload "extension" in status doc
Joel E. Denny [Mon, 27 Jun 2022 22:41:17 +0000 (18:41 -0400)]
[Clang][OpenMP] Don't overload "extension" in status doc

In Clang's OpenMPSupport.rst, "extension" is currently overloaded to
describe both:

1. Standard OpenMP features that appear only in recent versions of the
   OpenMP spec.
2. Non-standard features supported by Clang.  This usage appears in
   the final table on the page.

Last fall, we discussed this issue in the OpenMP in LLVM call and
agreed it should be corrected.  This patch takes the simple approach
of dropping the word "extension" for all occurrences of the first
usage.  The result seems to read well.

Reviewed By: ABataev

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

2 years ago[libc] add printf oct conversion
Michael Jones [Tue, 14 Jun 2022 22:54:37 +0000 (15:54 -0700)]
[libc] add printf oct conversion

The oct converter handles the %o conversion.

Reviewed By: lntue

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

2 years ago[pseudo] Check follow-sets instead of tying reduce actions to lookahead tokens.
Sam McCall [Thu, 23 Jun 2022 21:55:41 +0000 (23:55 +0200)]
[pseudo] Check follow-sets instead of tying reduce actions to lookahead tokens.

Previously, the action table stores a reduce action for each lookahead
token it should allow. These tokens are the followSet(action.rule.target).

In practice, the follow sets are large, so we spend a bunch of time binary
searching around all these essentially-duplicates to check whether our lookahead
token is there.
However the number of reduces for a given state is very small, so we're
much better off linear scanning over them and performing a fast check for each.

D128318 was an attempt at this, storing a bitmap for each reduce.
However it's even more compact just to use the follow sets directly, as
there are fewer nonterminals than (state, rule) pairs. It's also faster.

This specialized approach means unbundling Reduce from other actions in
LRTable, so it's no longer useful to support it in Action. I suspect
Action will soon go away, as we store each kind of action separately.

This improves glrParse speed by 42% (3.30 -> 4.69 MB/s).
It also reduces LR table size by 59% (343 -> 142kB).

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

2 years agoHave CommandObjectParsed check for "commands that take no arguments".
Jim Ingham [Thu, 23 Jun 2022 16:33:40 +0000 (09:33 -0700)]
Have CommandObjectParsed check for "commands that take no arguments".

This is currently being done in an ad hoc way, and so for some
commands it isn't being checked.  We have the info to make this check,
since commands are supposed to add their arguments to the m_arguments
field of the CommandObject.  This change uses that info to check whether
the command received arguments in error.

A handful of commands weren't defining their argument types, I also had
to fix them.  And a bunch of commands were checking for arguments by
hand, so I removed those checks in favor of the CommandObject one.  That
also meant I had to change some tests that were checking for the ad hoc
error outputs.

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

2 years ago[asan] Add missing dependency on Demangle
Vitaly Buka [Mon, 27 Jun 2022 22:10:02 +0000 (15:10 -0700)]
[asan] Add missing dependency on Demangle

Follow up to D127911.

2 years agoDelete 'llvm.asan.globals' for global metadata.
Mitch Phillips [Mon, 27 Jun 2022 21:40:03 +0000 (14:40 -0700)]
Delete 'llvm.asan.globals' for global metadata.

Now that we have the sanitizer metadata that is actually on the global
variable, and now that we use debuginfo in order to do symbolization of
globals, we can delete the 'llvm.asan.globals' IR synthesis.

This patch deletes the 'location' part of the __asan_global that's
embedded in the binary as well, because it's unnecessary. This saves
about ~1.7% of the optimised non-debug with-asserts clang binary.

Reviewed By: vitalybuka

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

2 years ago[docs] Restore missing blank line
Vitaly Buka [Mon, 27 Jun 2022 21:19:51 +0000 (14:19 -0700)]
[docs] Restore missing blank line

Lost in resolving conflicts for cdfa15da94f06289dcf86173d18b6627f92ac403.

2 years ago[Sanitizer][Darwin] Mark test UNSUPPORTED instead of XFAIL
Julian Lettner [Mon, 27 Jun 2022 21:16:43 +0000 (14:16 -0700)]
[Sanitizer][Darwin] Mark test UNSUPPORTED instead of XFAIL

This is test is failing/passing depending on the host OS version.  Need
to investigate/fix before re-enabling.

rdar://95982696

2 years agoRevert "[clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible...
Vitaly Buka [Mon, 27 Jun 2022 20:56:11 +0000 (13:56 -0700)]
Revert "[clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays"

This reverts D126864 and related fixes.

This reverts commit 572b08790a69f955ae0cbb1b4a7d4a215f15dad9.
This reverts commit 886715af962de2c92fac4bd37104450345711e4a.

2 years ago[Sanitizer][Darwin] atos does not show line numbers for globals
Julian Lettner [Mon, 27 Jun 2022 20:58:12 +0000 (13:58 -0700)]
[Sanitizer][Darwin] atos does not show line numbers for globals

atos does not show line numbers for globals and will probably not
support this anytime soon.  Mark test UNSUPPORTED instead of XFAIL.

2 years ago[RISCV] Remove repeated calls to getSExtValue. NFC
Craig Topper [Mon, 27 Jun 2022 17:12:41 +0000 (10:12 -0700)]
[RISCV] Remove repeated calls to getSExtValue. NFC

2 years ago[RISCV] Add tests for (load (add X, [2048,4094])). NFC
Craig Topper [Mon, 27 Jun 2022 18:02:37 +0000 (11:02 -0700)]
[RISCV] Add tests for (load (add X, [2048,4094])). NFC

Offsets in the range [-4095,-2049] or [2048, 4094] are split into
two ADDIs. One of the ADDIs will be folded into the load/store
immediate through an post-isel peephole.

2 years ago[LV] Allow scalable vectorization with vscale = 1
Philip Reames [Mon, 27 Jun 2022 19:53:57 +0000 (12:53 -0700)]
[LV] Allow scalable vectorization with vscale = 1

This change is a bit subtle. If we have a type like <vscale x 1 x i64>, the vectorizer will currently reject vectorization. The reason is that a type like <1 x i64> is likely to get simply rescalarized, and the vectorizer doesn't want to be in the game of simple unrolling.

(I've given the example in terms of 1 x types which use a single register, but the same issue exists for any N x types which use N registers. e.g. RISCV LMULs.)

This change distinguishes scalable types from fixed types under the reasoning that converting to a scalable type isn't unrolling. Because the actual vscale isn't known until runtime, using a vscale type is potentially very profitable.

This makes an important, but unchecked, assumption. Specifically, the scalable type is assumed to only be legal per the cost model if there's actually a scalable register class which is distinct from the scalar domain. This is, to my knowledge, true for all targets which return non-invalid costs for scalable vector ops today, but in theory, we could have a target decide to lower scalable to fixed length vector or even scalar registers. If that ever happens, we'd need to revisit this code.

In practice, this patch unblocks scalable vectorization for ELEN types on RISCV.

Let me sketch one alternate implementation I considered. We could have restricted this to when we know a minimum value for vscale. Specifically, for the default +v extension for RISCV, we actually know that vscale >= 2 for ELEN types. However, doing it this way means we can't generate scalable vectors when using the various embedded vector extensions which have a minimum vscale of 1.

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

2 years agoAdd wait for child processe(s) to exit. (amended+clang-formatted)
Roy Sundahl [Fri, 24 Jun 2022 23:25:09 +0000 (16:25 -0700)]
Add wait for child processe(s) to exit. (amended+clang-formatted)

It was possible for the parent process to exit before the
forked child process had finished. In some shells, this
causes the pipe to close and FileCheck misses some output
from the child. Waiting for the child process to exit before
exiting the parent, assures that all output from stdout and
stderr is combined and forwarded through the pipe to FileCheck.

rdar://95241490

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

2 years ago[libc++][lit][AIX] Port tests for getting time to AIX
Xing Xue [Mon, 27 Jun 2022 20:07:27 +0000 (16:07 -0400)]
[libc++][lit][AIX] Port tests for getting time to AIX

Summary:
This patch ports libc++ LIT test cases for getting time in various locales to AIX.

Reviewed by: philnik, Mordante, libc++

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

2 years ago[libc++][lit][AIX] Port tests for money format to AIX
Xing Xue [Mon, 27 Jun 2022 19:57:54 +0000 (15:57 -0400)]
[libc++][lit][AIX] Port tests for money format to AIX

Summary:
This patch ports libc++ LIT test cases for money formats to AIX. On AIX, the money format of locale zh_CN.UTF-8 is the similar to that of en_US.UTF-8, i.e., sign, symbol, none, value.

Reviewed by: Mordante, DiggerLin, libc++

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

2 years ago[RISCV] Remove a use of getMinVLen in favor of getRealMinVLen
Philip Reames [Mon, 27 Jun 2022 19:46:09 +0000 (12:46 -0700)]
[RISCV] Remove a use of getMinVLen in favor of getRealMinVLen

The later is possibly greater than the former, and thus the assert was overly strong when a wider VLEN was set at the command line.

2 years ago[RISCV] Cost model for scalable reductions
Philip Reames [Sun, 26 Jun 2022 19:50:57 +0000 (12:50 -0700)]
[RISCV] Cost model for scalable reductions

This extends the existing cost model for reductions for scalable vectors.

The existing cost model assumes that reductions are roughly logarithmic in cost for unordered variants and linear for ordered ones. This change keeps that same basic model, and extends it out to the maximum number of elements a scalable vector could possibly have.

This results in costs which aren't terribly high for unordered reductions, but are for ordered ones. This seems about right; we want to strongly bias away from using scalable ordered reductions if the cost might be linear in VL.

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

2 years agoRevert "[X86] Support `_Float16` on SSE2 and up"
Vitaly Buka [Mon, 27 Jun 2022 19:42:08 +0000 (12:42 -0700)]
Revert "[X86] Support `_Float16` on SSE2 and up"

Breaks buildbot
https://lab.llvm.org/buildbot/#/builders/37/builds/14334

This reverts commit f5d781d6273cc56dd8b44ee9e4cfb2ae5579bb04.

2 years ago[mlir][bufferize] Improve to_tensor/to_memref folding
Matthias Springer [Mon, 27 Jun 2022 19:34:09 +0000 (21:34 +0200)]
[mlir][bufferize] Improve to_tensor/to_memref folding

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

2 years ago[test] Add workaround for flaky error we see on Windows bots
Vitaly Buka [Mon, 27 Jun 2022 19:36:33 +0000 (12:36 -0700)]
[test] Add workaround for flaky error we see on Windows bots

2 years ago[NFC][lldb] Correct Module::FindFunctions documentation
Alex Langford [Mon, 27 Jun 2022 19:32:18 +0000 (12:32 -0700)]
[NFC][lldb] Correct Module::FindFunctions documentation

Looks like a copy/paste from ModuleList::FindCompileUnits.

2 years agoFix sphinx docs build
Yuanfang Chen [Mon, 27 Jun 2022 19:22:02 +0000 (12:22 -0700)]
Fix sphinx docs build

Fix "Title underline too short."

2 years ago[Coroutine] Remove the '!func_sanitize' metadata for split functions
Yuanfang Chen [Mon, 27 Jun 2022 18:36:32 +0000 (11:36 -0700)]
[Coroutine] Remove the '!func_sanitize' metadata for split functions

There is no proper RTTI for these split functions. So just delete the
metadata.

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

Reviewed By: rjmccall

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

2 years ago[ubsan] Using metadata instead of prologue data for function sanitizer
Yuanfang Chen [Mon, 27 Jun 2022 18:33:45 +0000 (11:33 -0700)]
[ubsan] Using metadata instead of prologue data for function sanitizer

Information in the function `Prologue Data` is intentionally opaque.
When a function with `Prologue Data` is duplicated. The self (global
value) references inside `Prologue Data` is still pointing to the
original function. This may cause errors like `fatal error: error in backend: Cannot represent a difference across sections`.

This patch detaches the information from function `Prologue Data`
and attaches it to a function metadata node.

This and D116130 fix https://github.com/llvm/llvm-project/issues/49689.

Reviewed By: pcc

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

2 years ago[clang][dataflow] Add `buildAndSubstituteFlowCondition` to `DataflowEnvironment`
Wei Yi Tee [Mon, 27 Jun 2022 19:05:36 +0000 (21:05 +0200)]
[clang][dataflow] Add `buildAndSubstituteFlowCondition` to `DataflowEnvironment`

Depends On D128658

Reviewed By: gribozavr2, xazax.hun

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

2 years ago[clang][dataflow] Do not allow substitution of true/false boolean literals in `buildA...
Wei Yi Tee [Mon, 27 Jun 2022 18:53:07 +0000 (20:53 +0200)]
[clang][dataflow] Do not allow substitution of true/false boolean literals in `buildAndSubstituteFlowCondition`

Reviewed By: gribozavr2, xazax.hun

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

2 years ago[mlir][sparse] remove redundant whitespace
Aart Bik [Mon, 27 Jun 2022 18:36:35 +0000 (11:36 -0700)]
[mlir][sparse] remove redundant whitespace

Reviewed By: Peiming

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

2 years ago[MLIR][Parser] Fix AffineParser colliding bare identifiers with primitive types
Groverkss [Mon, 27 Jun 2022 18:35:20 +0000 (19:35 +0100)]
[MLIR][Parser] Fix AffineParser colliding bare identifiers with primitive types

The parser currently can't parse bare identifiers like 'i0' in affine
maps and sets, and similarly ids like f16/f32. But these bare ids are
part of the grammar - although they are primitive types.

```
error: expected bare identifier
set = affine_set<(i0, i1) : ()>
                   ^
```

This patch allows the parser for AffineMap/IntegerSet to parse bare
identifiers as defined by the grammer.

Reviewed By: bondhugula, rriddle

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

2 years ago[mlir][sparse]more integration test cases for sparse_tensor.BinaryOp
Peiming Liu [Mon, 27 Jun 2022 17:59:46 +0000 (10:59 -0700)]
[mlir][sparse]more integration test cases for sparse_tensor.BinaryOp

Adding more test cases for sparse_tensor.BinaryOp, including different cases when overlap/left/right region is implemented/empty/identity

Reviewed By: aartbik

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

2 years ago[Symbolize] Fix MarkupFilter tests for Windows.
Daniel Thornburgh [Mon, 27 Jun 2022 18:13:52 +0000 (11:13 -0700)]
[Symbolize] Fix MarkupFilter tests for Windows.

The tests use in-band ANSI color codes, while the Windows cmd console
uses an out-of-band interface for color.

2 years ago[Symbolize] Fix llvm-symbolizer --filter-markup test on Windows.
Daniel Thornburgh [Mon, 27 Jun 2022 18:13:52 +0000 (11:13 -0700)]
[Symbolize] Fix llvm-symbolizer --filter-markup test on Windows.

The tests use in-band ANSI color codes, while the Windows cmd console
uses an out-of-band interface for color.

2 years ago[BOLT] Restrict icp-inline to callsites
Amir Ayupov [Mon, 27 Jun 2022 17:30:30 +0000 (10:30 -0700)]
[BOLT] Restrict icp-inline to callsites

ICP peel for inline mode only makes sense for calls, not jump tables.
Plus, add a check that the Target BinaryFunction is found.

Reviewed By: rafauler

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

2 years ago[mlir][sparse]Add more integration tests for sparse_tensor.unary
Peiming Liu [Mon, 27 Jun 2022 17:17:58 +0000 (10:17 -0700)]
[mlir][sparse]Add more integration tests for sparse_tensor.unary

Previously, the sparse_tensor.unary integration test does not contain cases with the use of `linalg.index` (previoulsy unsupported), this commit adds test cases that use `linalg.index` operators.

Reviewed By: aartbik

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

2 years ago[gn build] Port eb5af0acf054
LLVM GN Syncbot [Mon, 27 Jun 2022 17:44:48 +0000 (17:44 +0000)]
[gn build] Port eb5af0acf054

2 years ago[Symbolize] Add log markup --filter to llvm-symbolizer.
Daniel Thornburgh [Wed, 4 May 2022 22:47:42 +0000 (22:47 +0000)]
[Symbolize] Add log markup --filter to llvm-symbolizer.

This adds a --filter option to llvm-symbolizer. This takes log-bearing
symbolizer markup from stdin and writes a human-readable version to
stdout.

For now, this only implements the "symbol" markup tag; all others are
passed through unaltered. This is a proof-of-concept bit of
functionalty; implement the various tags is more-or-less just a matter
of hooking up various parts of the Symbolize library to the architecture
established here.

Reviewed By: peter.smith

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

2 years ago[Docs] Update clang & llvm release notes for HLSL
Chris Bieneman [Thu, 16 Jun 2022 19:34:57 +0000 (14:34 -0500)]
[Docs] Update clang & llvm release notes for HLSL

Adding release note entries for LLVM & Clang to introduce the HLSL &
DirectX support that is being added.

Reviewed By: aaron.ballman, MaskRay

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

2 years ago[OpenMP] Only strip runtime attributes if needed
Joseph Huber [Mon, 27 Jun 2022 17:23:25 +0000 (13:23 -0400)]
[OpenMP] Only strip runtime attributes if needed

Summary:
Currently in OpenMPOpt we strip `noinline` attributes from runtime
functions. This is here because the device bitcode library that we link
has problems with needed definitions getting prematurely optimized out.
This is only necessary for OpenMP offloading to GPUs so we should narrow
the scope for where we spend time doing this. In the future this
shouldn't be necessary as we move to using a linked library rather than
pulling in a bitcode library in Clang.

2 years ago[libc][docs] Added fmod performance results.
Kirill Okhotnikov [Mon, 27 Jun 2022 17:30:31 +0000 (19:30 +0200)]
[libc][docs] Added fmod performance results.

2 years ago[BOLT][NFC] Add aliases for ICP flags
Amir Ayupov [Mon, 27 Jun 2022 17:29:10 +0000 (10:29 -0700)]
[BOLT][NFC] Add aliases for ICP flags

- `indirect-call-promotion` -> `icp`
- `indirect-call-promotion-mispredict-threshold` -> `icp-mp-threshold`
- `indirect-call-promotion-use-mispredicts` -> `icp-use-mp`
- `indirect-call-promotion-topn` -> `icp-topn`
- `indirect-call-promotion-calls-topn` -> `icp-calls-topn`
- `indirect-call-promotion-jump-tables-topn` -> `icp-jt-topn`
- `icp-jump-table-targets` -> `icp-jt-targets`

This also fixes an inconsistency in ICP flag names that some start with
`indirect-call-promotion` while others start with `icp`.

Reviewed By: rafauler

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

2 years ago[BOLT][NFC] Use llvm::less_first
Amir Ayupov [Mon, 27 Jun 2022 17:26:55 +0000 (10:26 -0700)]
[BOLT][NFC] Use llvm::less_first

Follow the case of https://reviews.llvm.org/D126068 and simplify call sites
with `llvm::less_first`.

Reviewed By: rafauler

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

2 years ago[NFC][SVE] Add more tests of vector compares and selects taking an immediate operand.
Paul Walker [Wed, 22 Jun 2022 15:03:44 +0000 (16:03 +0100)]
[NFC][SVE] Add more tests of vector compares and selects taking an immediate operand.

Increases coverage of predicated compares (int and fp) along with
predicated zeroing of active floating point lanes.

2 years agollvm-reduce: Check shouldKeep before trying to reduce operands
Matt Arsenault [Thu, 9 Jun 2022 15:17:09 +0000 (11:17 -0400)]
llvm-reduce: Check shouldKeep before trying to reduce operands

No point doing the more complicated check first.

2 years ago[lldb] Add a log dump command
Jonas Devlieghere [Mon, 27 Jun 2022 17:00:05 +0000 (10:00 -0700)]
[lldb] Add a log dump command

Add a log dump command to dump logs to a file. This only works for
channels that have a log handler associated that supports dumping. For
now that's limited to the circular log handler, but more could be added
in the future.

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

2 years agoRound up zero-sized symbols to 1 byte in `.debug_aranges` (without breaking other...
Patrick Walton [Mon, 27 Jun 2022 17:00:43 +0000 (10:00 -0700)]
Round up zero-sized symbols to 1 byte in `.debug_aranges` (without breaking other logic).

This commit modifies the AsmPrinter to avoid emitting any zero-sized symbols to
the .debug_aranges table, by rounding their size up to 1. Entries with zero
length violate the DWARF 5 spec, which states:

> Each descriptor is a triple consisting of a segment selector, the beginning
> address within that segment of a range of text or data covered by some entry
> owned by the corresponding compilation unit, followed by the non-zero length
> of that range.

In practice, these zero-sized entries produce annoying warnings in lld and
cause GNU binutils to truncate the table when parsing it.

Other parts of LLVM, such as DWARFDebugARanges in the DebugInfo module
(specifically the appendRange method), already avoid emitting zero-sized
symbols to .debug_aranges, but not comprehensively in the AsmPrinter. In fact,
the AsmPrinter does try to avoid emitting such zero-sized symbols when labels
aren't involved, but doesn't when the symbol to emitted is a difference of two
labels; this patch extends that logic to handle the case in which the symbol is
defined via labels.

Furthermore, this patch fixes a bug in which `available_externally` symbols
would cause unpredictable values to be emitted into the `.debug_aranges` table
under certain circumstances. In practice I don't believe that this caused
issues up until now, but the root cause of this bug--an invalid DenseMap
lookup--triggered failures in Chromium when combined with an earlier version of
this patch. Therefore, this patch fixes that bug too.

This is a revised version of diff D126257, which was reverted due to breaking
tests. The now-reverted version of this patch didn't distinguish between
symbols that didn't have their size reported to the DwarfDebug handler and
those that had their size reported to be zero. This new version of the patch
instead restricts the special handling only to the symbols whose size is
definitively known to be zero.

Reviewed By: dblaikie

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

2 years ago[libc++] Add a few missing min/max macro push/pop
Louis Dionne [Mon, 27 Jun 2022 15:37:01 +0000 (11:37 -0400)]
[libc++] Add a few missing min/max macro push/pop

Also, improve the test for nasty macros to define min and max, so this
will be caught in the future.

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

2 years ago[mlir][LLVMIR] Memorize compatible LLVM types
Min-Yih Hsu [Tue, 24 May 2022 22:24:23 +0000 (15:24 -0700)]
[mlir][LLVMIR] Memorize compatible LLVM types

This patch memorize compatible LLVM types in `LLVM::isCompatibleType` in
order to avoid redundant works.

This is especially useful when the size of program is big and there are
multiple occurrences of some deeply nested LLVM struct types, in which
case we can gain quite some speedups with this patch.

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

2 years ago[mlir][LLVMIR] Add support for va_start/copy/end intrinsics
Min-Yih Hsu [Mon, 23 May 2022 20:52:38 +0000 (13:52 -0700)]
[mlir][LLVMIR] Add support for va_start/copy/end intrinsics

This patch adds three new LLVM intrinsic operations: llvm.intr.vastart/copy/end.
And its translation from LLVM IR.

This effectively removes a restriction, imposed by 0126dcf1f0a1, where
non-external functions in LLVM dialect cannot be variadic. At that time
it was not clear how LLVM intrinsics are going to be modeled, which
indirectly affects va_start/copy/end, the core intrinsics used in
variadic functions. But since we have LLVM intrinsics as normal
MLIR operations, it's not a problem anymore.

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

2 years ago[memprof] Return an error for unsupported symbolization.
Snehasish Kumar [Fri, 24 Jun 2022 23:34:18 +0000 (16:34 -0700)]
[memprof] Return an error for unsupported symbolization.

Add a check to detect that the profiled binary was build with position
independent code. Add a test with a pie binary to which can be reused
later when support is added. Also clean up the error messages with
trailing colons.

Reviewed By: tejohnson

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

2 years ago[lldb] [llgs] Skip new vCont test on Windows
Michał Górny [Mon, 27 Jun 2022 16:22:15 +0000 (18:22 +0200)]
[lldb] [llgs] Skip new vCont test on Windows

Sponsored by: The FreeBSD Foundation

2 years ago[llvm-ar] Fix MRI ADDLIB command when used with thin archives
gbreynoo [Mon, 27 Jun 2022 16:10:11 +0000 (17:10 +0100)]
[llvm-ar] Fix MRI ADDLIB command when used with thin archives

We did not properly handle using CREATETHIN in an MRI script and
attempting to use ADDLIB to add the contents of a regular archive. This
fix outputs a meaningful error message in this case and provides some
more testing.

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

2 years agoSilence an "illegal conversion" diagnostic
Aaron Ballman [Mon, 27 Jun 2022 16:02:34 +0000 (12:02 -0400)]
Silence an "illegal conversion" diagnostic

MSVC was issuing "illegal conversion; more than one user-defined
conversion has been implicitly applied" as a warning on this code.
Explicitly calling .str() causes a StringRef to be materialized so
that a second user-defined conversion is not required.

2 years ago[Clang][OpenMP] Claim nowait clause on taskwait
Chi Chun Chen [Mon, 27 Jun 2022 16:02:39 +0000 (11:02 -0500)]
[Clang][OpenMP] Claim nowait clause on taskwait

2 years agoSilence some format specifier warnings
Aaron Ballman [Mon, 27 Jun 2022 15:52:41 +0000 (11:52 -0400)]
Silence some format specifier warnings

This solves a format specifier warning for char32_t being converted to
an unsigned integer type, and multiple format specifier warnings for
size_t being converted to long.

2 years ago[libc++][doc] Fixes a broken table entry.
Mark de Wever [Mon, 27 Jun 2022 15:42:37 +0000 (17:42 +0200)]
[libc++][doc] Fixes a broken table entry.

2 years ago[AMDGPU] Cluster stores as well as loads for GFX11
Jay Foad [Fri, 24 Jun 2022 12:26:50 +0000 (13:26 +0100)]
[AMDGPU] Cluster stores as well as loads for GFX11

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

2 years ago[Driver][test] Add libclang_rt.profile{{.*}}.a tests for NetBSD
Frederic Cambus [Sun, 26 Jun 2022 22:26:22 +0000 (00:26 +0200)]
[Driver][test] Add libclang_rt.profile{{.*}}.a tests for NetBSD

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

2 years agoAdding support for target in_reduction
Ritanya B Bharadwaj [Mon, 27 Jun 2022 15:35:30 +0000 (10:35 -0500)]
Adding support for target in_reduction

Implementing target in_reduction by wrapping target task with host task with in_reduction and if clause. This is in compliance with OpenMP 5.0 section: 2.19.5.6.
So, this

```
  for (int i=0; i<N; i++) {
    res = res+i
  }
```

will become

```

   #pragma omp task in_reduction(+:res) if(0)
   #pragma omp target map(res)
   for (int i=0; i<N; i++) {
     res = res+i
   }
```

Reviewed By: ABataev

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

2 years ago[lldb] [llgs] Support "t" vCont action
Michał Górny [Fri, 3 Jun 2022 18:21:26 +0000 (20:21 +0200)]
[lldb] [llgs] Support "t" vCont action

Implement support for the "t" action that is used to stop a thread.
Normally this action is used only in non-stop mode.  However, there's
no technical reason why it couldn't be also used in all-stop mode,
e.g. to express "resume all threads except ..." (`t:...;c`).

While at it, add a more complete test for vCont correctly resuming
a subset of program's threads.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.llvm.org/D126983

2 years ago[flang][driver] Use `-O{0|1|2|3}` to define LLVM backend pass pipeline
Andrzej Warzynski [Fri, 17 Jun 2022 13:08:42 +0000 (13:08 +0000)]
[flang][driver] Use `-O{0|1|2|3}` to define LLVM backend pass pipeline

Support for optimisation flags in LLVM Flang was originally added in
https://reviews.llvm.org/D128043. That patch focused on LLVM
middle-end/optimisation pipelines. With this patch, Flang will
additionally configure LLVM backend pass pipelines accordingly. This
behavior is consistent with Clang.

New hook is added to translate compiler optimisation flags (e.g. `-O3`)
into backend optimisation level: `getCGOptLevel`. Identical hooks are
available in Clang and LLVM. In other words, the meaning of these
optimisation flags remains consistent with other sub-projects that use
LLVM backends.

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

2 years ago[mlir][SCF][bufferize] Small simplification and more comments
Matthias Springer [Mon, 27 Jun 2022 15:02:45 +0000 (17:02 +0200)]
[mlir][SCF][bufferize] Small simplification and more comments

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

2 years ago[GlobalOpt] Fix memset handling in global ctor evaluation (PR55859)
Nikita Popov [Fri, 24 Jun 2022 14:02:28 +0000 (16:02 +0200)]
[GlobalOpt] Fix memset handling in global ctor evaluation (PR55859)

The global ctor evaluator currently handles by checking whether the
memset memory is already zero, and skips it in that case. However,
it only actually checks the first byte of the memory being set.

This patch extends the code to check all bytes being set. This is
done byte-by-byte to avoid converting undef values to zeros in
larger reads. However, the handling is still not completely correct,
because there might still be padding bytes (though probably this
doesn't matter much in practice, as I'd expect global variable
padding to be zero-initialized in practice).

Mostly fixes https://github.com/llvm/llvm-project/issues/55859.

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

2 years ago[mlir][complex] complex.arg op to calculate the angle of complex number
Lewuathe [Mon, 27 Jun 2022 12:29:15 +0000 (14:29 +0200)]
[mlir][complex] complex.arg op to calculate the angle of complex number

Add complex.arg op which calculates the angle of complex number. The op name is inspired by the function carg in libm.

See: https://sourceware.org/newlib/libm.html#carg

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

2 years ago[GlobalOpt] Add tests for memset with non-zero value (NFC)
Nikita Popov [Mon, 27 Jun 2022 14:36:10 +0000 (16:36 +0200)]
[GlobalOpt] Add tests for memset with non-zero value (NFC)

2 years ago[mlir][bufferize] Infer memory space in all bufferization patterns
Matthias Springer [Mon, 27 Jun 2022 14:28:38 +0000 (16:28 +0200)]
[mlir][bufferize] Infer memory space in all bufferization patterns

This change updates all remaining bufferization patterns (except for scf.while) and the remaining bufferization infrastructure to infer the memory space whenever possible instead of falling back to "0". (If a default memory space is set in the bufferization options, we still fall back to that value if the memory space could not be inferred.)

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

2 years agotsan: add missing guard for DumpProcessMap call
Than McIntosh [Mon, 27 Jun 2022 13:28:18 +0000 (09:28 -0400)]
tsan: add missing guard for DumpProcessMap call

Add a missing "#if !SANITIZER_GO" guard for a call to DumpProcessMap
in the Finalize hook (needed to build an updated Go race detector syso
image).

Reviewed By: dvyukov

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

2 years ago[mlir][bufferize][NFC] Change signature of allocateTensorForShapedValue
Matthias Springer [Mon, 27 Jun 2022 13:59:00 +0000 (15:59 +0200)]
[mlir][bufferize][NFC] Change signature of allocateTensorForShapedValue

Add a failure return value and bufferization options argument. This is to keep a subsequent change smaller.

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

2 years ago[X86] Support `_Float16` on SSE2 and up
Phoebe Wang [Mon, 27 Jun 2022 13:02:57 +0000 (21:02 +0800)]
[X86] Support `_Float16` on SSE2 and up

This is split from D113107 to address #56204 and https://discourse.llvm.org/t/how-to-build-compiler-rt-for-new-x86-half-float-abi/63366

Reviewed By: zahiraam, rjmccall, bkramer

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

2 years ago[libc++][NFC] Remove trailing whitespace
Louis Dionne [Mon, 27 Jun 2022 13:36:52 +0000 (09:36 -0400)]
[libc++][NFC] Remove trailing whitespace

2 years ago[Clang] Remove unused function declaration after 77475ffd22418ca72.
Florian Hahn [Mon, 27 Jun 2022 13:17:53 +0000 (14:17 +0100)]
[Clang] Remove unused function declaration after 77475ffd22418ca72.