platform/upstream/llvm.git
3 years ago[libcxx][Arm] Move buildbot flags into cmake files
David Spickett [Wed, 17 Mar 2021 11:09:41 +0000 (11:09 +0000)]
[libcxx][Arm] Move buildbot flags into cmake files

Reviewed By: #libc, Mordante, curdeius

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

3 years ago[mlir][Linalg] NFC - Expose helper function `substituteMin`.
Nicolas Vasilache [Fri, 19 Mar 2021 16:21:15 +0000 (16:21 +0000)]
[mlir][Linalg] NFC - Expose helper function `substituteMin`.

3 years ago[dfsan] Add origin ABI wrappers
Jianzhou Zhao [Wed, 17 Mar 2021 16:22:01 +0000 (16:22 +0000)]
[dfsan] Add origin ABI wrappers

supported: dl_get_tls_static_info, calloc, clock_gettime,
dfsan_set_write_callback, dl_iterato_phdr, dlopen, memcpy,
memmove, memset, pread, read, strcat, strdup, strncpy

This is a part of https://reviews.llvm.org/D95835.

Reviewed By: morehouse

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

3 years ago[RGT] Recode more unreachable assertions and tautologies
Paul Robinson [Fri, 19 Mar 2021 14:43:36 +0000 (07:43 -0700)]
[RGT] Recode more unreachable assertions and tautologies

Count iterations of zero-trip loops and assert the count is zero,
rather than asserting inside the loop.
Unreachable functions should use llvm_unreachable.
Remove tautological 'if' statements, even when they're following a
pattern of checks.

Found by the Rotten Green Tests project.

3 years ago[DAG] computeKnownBits - add ISD::MULHS/MULHU/SMUL_LOHI/UMUL_LOHI handling
Simon Pilgrim [Fri, 19 Mar 2021 16:02:31 +0000 (16:02 +0000)]
[DAG] computeKnownBits - add ISD::MULHS/MULHU/SMUL_LOHI/UMUL_LOHI handling

Reuse the existing KnownBits multiplication code to handle the 'extend + multiply + extract high bits' pattern for multiply-high ops.

Noticed while looking at the codegen for D88785 / D98587 - the patch helps division-by-constant expansion code in particular, which suggests that we might have some further KnownBits div/rem cases we could handle - but this was far easier to implement.

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

3 years ago[AMDGPU] Add atomic optimizer nouse tests
Jay Foad [Thu, 18 Mar 2021 17:00:14 +0000 (17:00 +0000)]
[AMDGPU] Add atomic optimizer nouse tests

Add some atomic optimizer tests where there is no use of the result of
the atomic operation, which is a common case in real code. NFC.

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

3 years ago[AMDGPU] Remove dead glc1 handing in asm parser. NFC.
Stanislav Mekhanoshin [Fri, 19 Mar 2021 15:36:03 +0000 (08:36 -0700)]
[AMDGPU] Remove dead glc1 handing in asm parser. NFC.

3 years ago[clang][ASTImporter] Add import support for SourceLocExpr.
Balázs Kéri [Fri, 19 Mar 2021 14:46:20 +0000 (15:46 +0100)]
[clang][ASTImporter] Add import support for SourceLocExpr.

It is possible that imported `SourceLocExpr` can cause not expected behavior (if `__builtin_LINE()` is used together with `__LINE__` for example) but still it may be worth to import these because some projects use it.

Reviewed By: teemperor

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

3 years agopropose Chocolately as package manager
Christian Kühnel [Wed, 24 Feb 2021 14:50:02 +0000 (15:50 +0100)]
propose Chocolately as package manager

Installing the Unix tools on Windows is quite painful. To make things easier,
I explained how to use a package manager or a Docker image.

Note: This still uses the GNUWin tools as explained on this page. Once we
replace these with something else, we would also need to update the
installation commands.

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

3 years ago[libc++] Consistency on _LIBCPP_CLANG_VER tests in <type_traits>.
Arthur O'Dwyer [Tue, 16 Mar 2021 16:51:24 +0000 (12:51 -0400)]
[libc++] Consistency on _LIBCPP_CLANG_VER tests in <type_traits>.

This came out of my review comments on D97283.

This patch re-enables the use of `__is_fundamental`, `__is_signed`, etc.
on non-Clang compilers. Previously, when we found that a builtin didn't
work on old Clangs, we had been reacting by limiting its use to new Clangs
(i.e., we'd also stop using it on new GCCs and new MSVCs, just because of
the old Clang bug). I claim that this was unintentional.

Notice that on Apple Clang, `_LIBCPP_COMPILER_CLANG` is defined and
`_LIBCPP_CLANG_VER` is not defined (therefore `0` in arithmetic expressions).
We assume that Apple Clang has all the bugs of all the Clangs.

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

3 years ago[DAG] Fold shuffle(bop(shuffle(x,y),shuffle(z,w)),undef) -> bop(shuffle'(x,y),shuffle...
Simon Pilgrim [Fri, 19 Mar 2021 13:34:47 +0000 (13:34 +0000)]
[DAG] Fold shuffle(bop(shuffle(x,y),shuffle(z,w)),undef) -> bop(shuffle'(x,y),shuffle'(z,w))

Followup to D96345, handle unary shuffles of binops (as well as binary shuffles) if we can merge the shuffle with inner operand shuffles.

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

3 years ago[libcxx] [test] Fix weakly_canonical for windows
Martin Storsjö [Wed, 14 Oct 2020 12:37:13 +0000 (15:37 +0300)]
[libcxx] [test] Fix weakly_canonical for windows

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

3 years ago[libcxx] [test] Avoid race conditions between tests regarding temp directories
Martin Storsjö [Tue, 16 Mar 2021 12:37:28 +0000 (14:37 +0200)]
[libcxx] [test] Avoid race conditions between tests regarding temp directories

Prior to e0d01294bc124211a8ffb55e69162eb34a242680, all tests used a
random directory name, but now it is deterministic, based on the
test name. This change was done under the assumption that the filename
portion of the cwd is unique across tests that use the filesystem
test temporary directories.

When running tests locally, the cwd of the test is something like
"<build-dir>/test/<test path>/Output/copy_assign.pass.cpp.dir",
and the filename portion, "copy_assign.pass.cpp.dir", is used as
base for the temp directory names.

The change noted that there's a risk for race conditions if multiple
threads within one test try to create temp directories in parallel, but
that doesn't really happen in practice.

However, if running tests with a large number of parallel workers,
multiple tests with the same filename portion, e.g. "copy_assign.pass.cpp.dir",
can run in parallel, leading to race conditions across processes.

Therefore, add a hash of the full cwd to distinguish such cases
from each other.

Secondly, don't use two separate levels of temporary directories
(<base>/static_env.0). When cleaning up, only the individual
directory is removed, leaving the empty intermediate directory
behind littering the temp directory.

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

3 years ago[libcxx] [test] Fix windows errors in fs.op.rename
Martin Storsjö [Fri, 26 Feb 2021 13:10:53 +0000 (15:10 +0200)]
[libcxx] [test] Fix windows errors in fs.op.rename

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

3 years ago[TableGen] Improve handling of template arguments
Paul C. Anagnostopoulos [Thu, 25 Feb 2021 21:33:08 +0000 (16:33 -0500)]
[TableGen] Improve handling of template arguments

This requires changes to TableGen files and some C++ files due to
incompatible multiclass template arguments that slipped through
before the improved handling.

3 years ago[M68k] Replace unknown operand with explicit type
Ricky Taylor [Wed, 17 Mar 2021 21:34:36 +0000 (21:34 +0000)]
[M68k] Replace unknown operand with explicit type

Replace the unknown operand used for immediate operands for DIV/MUL with a fixed 16-bit immediate.

This is required since the assembly parser generator requires that all operands are typed.

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

3 years ago[WoA][MSVC] Use default linker setting in MSVC-compatible driver [take 2]
Maxim Kuvyrkov [Fri, 19 Mar 2021 13:37:19 +0000 (13:37 +0000)]
[WoA][MSVC] Use default linker setting in MSVC-compatible driver [take 2]

At the moment "link.exe" is hard-coded as default linker in MSVC.cpp,
so there's no way to use LLD as default linker for MSVC driver.

This patch adds checking of CLANG_DEFAULT_LINKER to MSVC.cpp and
updates unit-tests that expect link.exe linker to explicitly select it
via -fuse-ld=link, so that buildbots and other builds that set
-DCLANG_DEFAULT_LINKER=foobar don't fail these tests.

This is a squash of
- https://reviews.llvm.org/D98493 (MSVC.cpp change) and
- https://reviews.llvm.org/D98862 (unit-tests change)

Reviewed By: maxim-kuvyrkov

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

3 years agoSupport intrinsic overloading on unnamed types
Jeroen Dobbelaere [Fri, 19 Mar 2021 13:34:25 +0000 (14:34 +0100)]
Support intrinsic overloading on unnamed types

This patch adds support for intrinsic overloading on unnamed types.

This fixes PR38117 and PR48340 and will also be needed for the Full Restrict Patches (D68484).

The main problem is that the intrinsic overloading name mangling is using 's_s' for unnamed types.
This can result in identical intrinsic mangled names for different function prototypes.

This patch changes this by adding a '.XXXXX' to the intrinsic mangled name when at least one of the types is based on an unnamed type, ensuring that we get a unique name.

Implementation details:
- The mapping is created on demand and kept in Module.
- It also checks for existing clashes and recycles potentially existing prototypes and declarations.
- Because of extra data in Module, Intrinsic::getName needs an extra Module* argument and, for speed, an optional FunctionType* argument.
- I still kept the original two-argument 'Intrinsic::getName' around which keeps the original behavior (providing the base name).
-- Main reason is that I did not want to change the LLVMIntrinsicGetName version, as I don't know how acceptable such a change is
-- The current situation already has a limitation. So that should not get worse with this patch.
- Intrinsic::getDeclaration and the verifier are now using the new version.

Other notes:
- As far as I see, this should not suffer from stability issues. The count is only added for prototypes depending on at least one anonymous struct
- The initial count starts from 0 for each intrinsic mangled name.
- In case of name clashes, existing prototypes are remembered and reused when that makes sense.

Reviewed By: fhahn

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

3 years ago[mlir] Rename gpu-to-llvm pass implementation file
Christian Sigg [Fri, 19 Mar 2021 09:11:51 +0000 (10:11 +0100)]
[mlir] Rename gpu-to-llvm pass implementation file

Also remove populate patterns function and binary annotation name option.

Reviewed By: ftynse

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

3 years agoAutomate common diagnostic checking for statement attributes
Aaron Ballman [Fri, 19 Mar 2021 12:33:27 +0000 (08:33 -0400)]
Automate common diagnostic checking for statement attributes

Clang currently automates a fair amount of diagnostic checking for
declaration attributes based on the declarations in Attr.td. It checks
for things like subject appertainment, number of arguments, language
options, etc. This patch uses the same machinery to perform diagnostic
checking on statement attributes.

3 years ago[PowerPC] Fix the check for 16-bit signed field in peephole
Nemanja Ivanovic [Fri, 19 Mar 2021 11:24:42 +0000 (06:24 -0500)]
[PowerPC] Fix the check for 16-bit signed field in peephole

When a D-Form instruction is fed by an add-immediate, we attempt
to merge the two immediates to form a single displacement so we
can remove the add-immediate.

However, we don't check whether the new displacement fits into
a 16-bit signed immediate field early enough. Namely, we do a
sign-extend from 16 bits first which will discard high bits and
then we check whether the result is a 16-bit signed immediate.
It of course will always be.

Move the check prior to the sign extend to ensure we are checking
the correct value.

Fixes https://bugs.llvm.org/show_bug.cgi?id=49640

3 years ago[SystemZ][z/OS] Distinguish between text and binary files on z/OS
Abhina Sreeskantharajan [Fri, 19 Mar 2021 12:09:01 +0000 (08:09 -0400)]
[SystemZ][z/OS] Distinguish between text and binary files on z/OS

This patch consists of the initial changes to help distinguish between text and binary content correctly on z/OS. I would like to get feedback from Windows users on setting OF_None for all ToolOutputFiles. This seems to have been done as an optimization to prevent CRLF translation on Windows in the past.

Reviewed By: zibi

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

3 years ago[X86, NFC] Update stack-clash tests using the automated tooling
Simonas Kazlauskas [Fri, 19 Mar 2021 00:18:34 +0000 (02:18 +0200)]
[X86, NFC] Update stack-clash tests using the automated tooling

This is in preparation of changes in this area (such as D98789 and D98906).

Reviewed By: RKSimon

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

3 years ago[M68k] Convert register Aliases to AltNames
Ricky Taylor [Thu, 11 Mar 2021 20:37:00 +0000 (20:37 +0000)]
[M68k] Convert register Aliases to AltNames

This makes it simpler to determine when two registers are actually the
same vs just partially aliasing.

The only real caveat is that it becomes impossible to know which name
was used for the register previously. (i.e. parsing assembly and then
disassembling it can result in the register name changing.)

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

3 years ago[M68k] Introduce DReg bead
Ricky Taylor [Thu, 11 Mar 2021 20:35:04 +0000 (20:35 +0000)]
[M68k] Introduce DReg bead

This is required in order to determine during disassembly whether a
Reg bead without associated DA bead is referring to a data register.

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

3 years ago[AMDGPU] Remove some redundant code. NFC.
Jay Foad [Fri, 19 Mar 2021 09:27:11 +0000 (09:27 +0000)]
[AMDGPU] Remove some redundant code. NFC.

This is redundant because we have already checked that we can't handle
divergent 64-bit atomic operands.

3 years ago[AMDGPU] Skip building some IR if it won't be used. NFC.
Jay Foad [Thu, 18 Mar 2021 17:16:48 +0000 (17:16 +0000)]
[AMDGPU] Skip building some IR if it won't be used. NFC.

3 years ago[AMDGPU] Remove duplicate test functions. NFC.
Jay Foad [Thu, 18 Mar 2021 16:52:04 +0000 (16:52 +0000)]
[AMDGPU] Remove duplicate test functions. NFC.

3 years ago[AMDGPU] Sink Intrinsic::getDeclaration calls to where they are used. NFC.
Jay Foad [Thu, 18 Mar 2021 16:13:16 +0000 (16:13 +0000)]
[AMDGPU] Sink Intrinsic::getDeclaration calls to where they are used. NFC.

3 years agoRevert "[lit] Handle plain negations directly in the internal shell"
Martin Storsjö [Fri, 19 Mar 2021 10:30:08 +0000 (12:30 +0200)]
Revert "[lit] Handle plain negations directly in the internal shell"

This reverts commit d09adfd3993cbc1043b4d20232bce8bd774232cc.

That commit caused failures in
clang-tidy/infrastructure/validate-check-names.cpp on windows
buildbots.

That change exposed a surprising issue, not directly related to
this change in itself, but in how TestRunner quotes command line
arguments that later are going to be interpreted by a msys based
tool (like grep.exe, when provided by Git for Windows). This
worked accidentally before, when grep was invoked via not.exe
which took a more conservative approach to windows argument quoting.

3 years ago[LLDB] Skip TestExitDuringExpression on aarch64/linux buildbot
Muhammad Omair Javaid [Fri, 19 Mar 2021 10:29:53 +0000 (15:29 +0500)]
[LLDB] Skip TestExitDuringExpression on aarch64/linux buildbot

TestExitDuringExpression test_exit_before_one_thread_unwind fails
sporadically on both Arm and AArch64 linux buildbots.
This seems like a thread timing issue. I am marking it skip for now.

3 years ago[docs] Add calendar info for SVE sync-ups
Kristof Beyls [Fri, 19 Mar 2021 09:27:34 +0000 (10:27 +0100)]
[docs] Add calendar info for SVE sync-ups

3 years ago[KnownBits] Add knownbits analysis for mulhs/mulu 'multiply high' instructions
Simon Pilgrim [Thu, 18 Mar 2021 22:36:01 +0000 (22:36 +0000)]
[KnownBits] Add knownbits analysis for mulhs/mulu 'multiply high' instructions

Split off from D98857

https://reviews.llvm.org/D98866

3 years ago[mlir] Add a roundtrip test for 'linalg.tiled_loop' on buffers.
Alexander Belyaev [Thu, 18 Mar 2021 21:35:48 +0000 (22:35 +0100)]
[mlir] Add a roundtrip test for 'linalg.tiled_loop' on buffers.

https://llvm.discourse.group/t/rfc-add-linalg-tileop/2833

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

3 years ago[mlir] Remove ConvertKernelFuncToBlob
Christian Sigg [Fri, 19 Mar 2021 08:27:55 +0000 (09:27 +0100)]
[mlir] Remove ConvertKernelFuncToBlob

All users have been converted to gpu::SerializeToBlobPass.

Reviewed By: ftynse

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

3 years ago[NVPTX] Fix warning, remove extra ";" [NFC]
Mikael Holmen [Fri, 19 Mar 2021 08:26:14 +0000 (09:26 +0100)]
[NVPTX] Fix warning, remove extra ";" [NFC]

gcc complained with
../lib/Target/NVPTX/NVPTXLowerArgs.cpp:203:2: warning: extra ';' [-Wpedantic]
  203 | };
      |  ^

3 years ago[InstCombine] Add unit test with @llvm.annotation.
Clement Courbet [Fri, 19 Mar 2021 07:47:28 +0000 (08:47 +0100)]
[InstCombine] Add unit test with @llvm.annotation.

In preparation for https://reviews.llvm.org/D98925

3 years ago[lit] Pass the USERPROFILE variable through on Windows
Martin Storsjö [Thu, 18 Mar 2021 12:08:10 +0000 (14:08 +0200)]
[lit] Pass the USERPROFILE variable through on Windows

When running in a Windows Container, the Git for Windows Unix tools
(C:\Program Files\Git\usr\bin) just hang if this variable isn't
passed through.

Currently, running the LLVM/clang tests in a Windows Container fails
if that directory is added to the path, but succeeds after this change.
(After this change, the previously used GnuWin tools can be left out
entirely, too, as lit automatically picks up the Git for Windows tools
if necessary.)

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

3 years ago[libcxx] [test] Explicitly check that some env vars are ignored in the temp_dir_path...
Martin Storsjö [Tue, 16 Mar 2021 11:19:11 +0000 (13:19 +0200)]
[libcxx] [test] Explicitly check that some env vars are ignored in the temp_dir_path test

This was suggested in the review of D98139.

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

3 years ago[lit] Handle plain negations directly in the internal shell
Martin Storsjö [Thu, 18 Mar 2021 07:44:01 +0000 (09:44 +0200)]
[lit] Handle plain negations directly in the internal shell

Keep running "not --crash" via the external "not" executable, but
for plain negations, and for cases that use the shell "!" operator,
just skip that argument and invert the return code.

The libcxx tests only use the shell operator "!" for negations,
never the "not" executable, because libcxx tests can be run without
having a fully built llvm tree available providing the "not"
executable.

This allows using the internal shell for libcxx tests.

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

3 years ago[Test] Precommit one more test
Max Kazantsev [Fri, 19 Mar 2021 07:25:08 +0000 (14:25 +0700)]
[Test] Precommit one more test

3 years ago[mlir] Remove mlir-rocm-runner
Christian Sigg [Fri, 19 Mar 2021 07:22:50 +0000 (00:22 -0700)]
[mlir] Remove mlir-rocm-runner

This change combines for ROCm what was done for CUDA in D97463, D98203, D98360, and D98396.

I did not try to compile SerializeToHsaco.cpp or test mlir/test/Integration/GPU/ROCM because I don't have an AMD card. I fixed the things that had obvious bit-rot though.

Reviewed By: whchung

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

3 years ago[Test] Precommit test
Max Kazantsev [Fri, 19 Mar 2021 07:17:35 +0000 (14:17 +0700)]
[Test] Precommit test

3 years ago[NFC] Move function up in code
Max Kazantsev [Fri, 19 Mar 2021 07:03:31 +0000 (14:03 +0700)]
[NFC] Move function up in code

3 years ago[NFC] Factor out utility function for finding common dom of user set
Max Kazantsev [Fri, 19 Mar 2021 06:07:57 +0000 (13:07 +0700)]
[NFC] Factor out utility function for finding common dom of user set

3 years agoRevert "[WoA][MSVC] Use default linker setting in MSVC-compatible driver"
Petr Hosek [Fri, 19 Mar 2021 06:42:31 +0000 (23:42 -0700)]
Revert "[WoA][MSVC] Use default linker setting in MSVC-compatible driver"

This reverts commit ace56d41aca8cac7cead9c2c97278aa50fc945b1 which
broke builders that set CLANG_DEFAULT_LINKER.

3 years ago[X86] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off builds
Fangrui Song [Fri, 19 Mar 2021 06:22:58 +0000 (23:22 -0700)]
[X86] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off builds

3 years ago[mlir] Support use-def cycles in graph regions during regionDCE
Andrew Young [Fri, 19 Mar 2021 03:06:02 +0000 (20:06 -0700)]
[mlir] Support use-def cycles in graph regions during regionDCE

When deleting operations in DCE, the algorithm uses a post-order walk of
the IR to ensure that value uses were erased before value defs. Graph
regions do not have the same structural invariants as SSA CFG, and this
post order walk could delete value defs before uses.  This problem is
guaranteed to occur when there is a cycle in the use-def graph.

This change stops DCE from visiting the operations and blocks in any
meaningful order.  Instead, we rely on explicitly dropping all uses of a
value before deleting it.

Reviewed By: mehdi_amini, rriddle

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

3 years ago[mlir] Fix Python bindings tests failure in Debug mode after D98474
Vladislav Vinogradov [Fri, 19 Mar 2021 05:32:19 +0000 (05:32 +0000)]
[mlir] Fix Python bindings tests failure in Debug mode after D98474

Add extra `type.isa<FloatType>()` check to  `FloatAttr::get(Type, double)` method.
Otherwise it tries to call `type.cast<FloatType>()`, which fails with assertion in Debug mode.

The `!type.isa<FloatType>()` case just redirercts the call to `FloatAttr::get(Type, APFloat)`,
which will perform the actual check and emit appropriate error.

Reviewed By: mehdi_amini

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

3 years ago[IndVars] Provide eliminateIVComparison with context
Max Kazantsev [Fri, 19 Mar 2021 05:00:06 +0000 (12:00 +0700)]
[IndVars] Provide eliminateIVComparison with context

We can prove more predicates when we have a context when eliminating ICmp.
As first (and very obvious) approximation we can use the ICmp instruction itself,
though in the future we are going to use a common dominator of all its users.
Need some refactoring before that.

Observed ~0.5% negative compile time impact.

Differential Revision: https://reviews.llvm.org/D98697
Reviewed By: lebedev.ri

3 years ago[UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug...
Hongtao Yu [Wed, 17 Mar 2021 18:17:17 +0000 (11:17 -0700)]
[UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

C functions may be declared and defined in different prototypes like below. This patch unifies the checks for mangling names in symbol linkage name emission and debug linkage name emission so that the two names are consistent.

static int go(int);

static int go(a) int a;
{
  return a;
}

Test Plan:

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

3 years ago[CSSPGO] Add attribute metadata for context profile
Wenlei He [Sat, 20 Feb 2021 06:46:30 +0000 (22:46 -0800)]
[CSSPGO] Add attribute metadata for context profile

This changes adds attribute field for metadata of context profile. Currently we have an inline attribute that indicates whether the leaf frame corresponding to a context profile was inlined in previous build.

This will be used to help estimating inlining and be taken into account when trimming context. Changes for that in llvm-profgen will follow. It will also help tuning.

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

3 years ago[SCEV] Add false->any implication
Max Kazantsev [Fri, 19 Mar 2021 04:29:48 +0000 (11:29 +0700)]
[SCEV] Add false->any implication

By definition of Implication operator, `false -> true` and `false -> false`. It means that
`false` implies any predicate, no matter true or false. We don't need to go any further
trying to prove the statement we need and just always say that `false` implies it in this case.

In practice it means that we are trying to prove something guarded by `false` condition,
which means that this code is unreachable, and we can safely prove any fact or perform any
transform in this code.

Differential Revision: https://reviews.llvm.org/D98706
Reviewed By: lebedev.ri

3 years agoFix example in documentation.
Richard Smith [Fri, 19 Mar 2021 03:06:11 +0000 (20:06 -0700)]
Fix example in documentation.

3 years agoImprove documentation for the [[clang::lifetimebound]] attribute.
Richard Smith [Fri, 19 Mar 2021 02:58:21 +0000 (19:58 -0700)]
Improve documentation for the [[clang::lifetimebound]] attribute.

3 years agoDon't assume that stepping out of a function will land on the next line.
Jim Ingham [Fri, 19 Mar 2021 00:44:17 +0000 (17:44 -0700)]
Don't assume that stepping out of a function will land on the next line.

For instance, some recent clang emits this code on x86_64:

    0x100002b99 <+57>: callq  0x100002b40               ; step_out_of_here at main.cpp:11
->  0x100002b9e <+62>: xorl   %eax, %eax
    0x100002ba0 <+64>: popq   %rbp
    0x100002ba1 <+65>: retq

and the "xorl %eax, %eax" is attributed to the same line as the callq.  Since
step out is supposed to stop just on returning from the function, you can't guarantee
it will end up on the next line.  I changed the test to check that we were either
on the call line or on the next line, since either would be right depending on the
debug information.

3 years agoAdd a couple of missing attribute query methods [NFC]
Philip Reames [Fri, 19 Mar 2021 00:33:12 +0000 (17:33 -0700)]
Add a couple of missing attribute query methods [NFC]

3 years ago[WebAssembly] Remove experimental instructions from wasm_simd128.h
Thomas Lively [Fri, 19 Mar 2021 00:13:50 +0000 (17:13 -0700)]
[WebAssembly] Remove experimental instructions from wasm_simd128.h

These experimental builtin functions and the feature macro they were gated
behind have been removed.

Reviewed By: aheejin

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

3 years ago[RISCV] Spilling for Zvlsseg registers.
Hsiangkai Wang [Mon, 15 Mar 2021 05:58:11 +0000 (13:58 +0800)]
[RISCV] Spilling for Zvlsseg registers.

For Zvlsseg, we create several tuple register classes. When spilling for
these tuple register classes, we need to iterate NF times to load/store
these tuple registers.

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

3 years ago[SanitizerCoverage] Make __start_/__stop_ symbols extern_weak
Fangrui Song [Thu, 18 Mar 2021 23:46:04 +0000 (16:46 -0700)]
[SanitizerCoverage] Make __start_/__stop_ symbols extern_weak

On ELF, we place the metadata sections (`__sancov_guards`, `__sancov_cntrs`,
`__sancov_bools`, `__sancov_pcs` in section groups (either `comdat any` or
`comdat noduplicates`).

With `--gc-sections`, LLD since D96753 and GNU ld `-z start-stop-gc` may garbage
collect such sections. If all `__sancov_bools` are discarded, LLD will error
`error: undefined hidden symbol: __start___sancov_cntrs` (other sections are similar).

```
% cat a.c
void discarded() {}
% clang -fsanitize-coverage=func,trace-pc-guard -fpic -fvisibility=hidden a.c -shared -fuse-ld=lld -Wl,--gc-sections
...
ld.lld: error: undefined hidden symbol: __start___sancov_guards
>>> referenced by a.c
>>>               /tmp/a-456662.o:(sancov.module_ctor_trace_pc_guard)
```

Use the `extern_weak` linkage (lowered to undefined weak symbols) to avoid the
undefined error.

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

3 years ago[RISCV] Correct the output chain in lowerFixedLengthVectorMaskedLoadToRVV
Craig Topper [Thu, 18 Mar 2021 23:22:19 +0000 (16:22 -0700)]
[RISCV] Correct the output chain in lowerFixedLengthVectorMaskedLoadToRVV

We returned the input chain instead of the output chain from the
new load. This bypasses the load in the chain. I haven't found a
good way to test this yet. IR order prevents my initial attempts
at causing reordering.

3 years ago[dfsan] Add -dfsan-fast-8-labels flag
George Balatsouras [Tue, 16 Mar 2021 19:05:15 +0000 (12:05 -0700)]
[dfsan] Add -dfsan-fast-8-labels flag

This is only adding support to the dfsan instrumentation pass but not
to the runtime.

Added more RUN lines for testing: for each instrumentation test that
had a -dfsan-fast-16-labels invocation, a new invocation was added
using fast8.

Reviewed By: stephan.yichao.zhao

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

3 years ago[mlir][tosa] Add lowering for tosa.rescale to linalg.generic
Rob Suderman [Thu, 18 Mar 2021 23:14:05 +0000 (16:14 -0700)]
[mlir][tosa] Add lowering for tosa.rescale to linalg.generic

This adds a tosa.apply_scale operation that handles the scaling operation
common to quantized operatons. This scalar operation is lowered
in TosaToStandard.

We use a separate ApplyScale factorization as this is a replicable pattern
within TOSA. ApplyScale can be reused within pool/convolution/mul/matmul
for their quantized variants.

Tests are added to both tosa-to-standard and tosa-to-linalg-on-tensors
that verify each pass is correct.

Reviewed By: silvas

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

3 years agoRecommit "[AArch64][GlobalISel] Fold constants into G_GLOBAL_VALUE"
Jessica Paquette [Thu, 18 Mar 2021 22:34:37 +0000 (15:34 -0700)]
Recommit "[AArch64][GlobalISel] Fold constants into G_GLOBAL_VALUE"

This reverts commit 962b73dd0fc3906980e597f72a35eee7121cc5e2.

This commit was reverted because of some internal SPEC test failures.

It turns out that this wasn't actually relevant to anything in open source, so
it's safe to recommit this.

3 years ago[mlir][tosa] Add tosa.concat to subtensor inserts lowering
Rob Suderman [Wed, 17 Mar 2021 20:41:53 +0000 (13:41 -0700)]
[mlir][tosa] Add tosa.concat to subtensor inserts lowering

Includes lowering for tosa.concat with indice computation with subtensor insert
operations. Includes tests along two different indices.

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

3 years agoFix test case in b4a8c0ebb6d4
Yuanfang Chen [Thu, 18 Mar 2021 22:52:14 +0000 (15:52 -0700)]
Fix test case in b4a8c0ebb6d4

3 years ago[DAGCombiner][RISCV] Teach visitMGATHER/MSCATTER to remove gather/scatters with all...
Craig Topper [Thu, 18 Mar 2021 22:29:52 +0000 (15:29 -0700)]
[DAGCombiner][RISCV] Teach visitMGATHER/MSCATTER to remove gather/scatters with all zeros masks that use SPLAT_VECTOR.

Previously only all zeros BUILD_VECTOR was recognized.

3 years ago[LTO][MC] Discard non-prevailing defined symbols in module-level assembly
Yuanfang Chen [Thu, 18 Mar 2021 22:32:29 +0000 (15:32 -0700)]
[LTO][MC] Discard non-prevailing defined symbols in module-level assembly

This is the alternative approach to D96931.

In LTO, for each module with inlineasm block, prepend directive ".lto_discard <sym>, <sym>*" to the beginning of the inline
asm.  ".lto_discard" is both a module inlineasm block marker and (optionally) provides a list of symbols to be discarded.

In MC while emitting for inlineasm, discard symbol binding & symbol
definitions according to ".lto_disard".

Reviewed By: MaskRay

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

3 years ago[OpenMP] Fixed a crash in hidden helper thread
Shilei Tian [Thu, 18 Mar 2021 22:25:21 +0000 (18:25 -0400)]
[OpenMP] Fixed a crash in hidden helper thread

It is reported that after enabling hidden helper thread, the program
can hit the assertion `new_gtid < __kmp_threads_capacity` sometimes. The root
cause is explained as follows. Let's say the default `__kmp_threads_capacity` is
`N`. If hidden helper thread is enabled, `__kmp_threads_capacity` will be offset
to `N+8` by default. If the number of threads we need exceeds `N+8`, e.g. via
`num_threads` clause, we need to expand `__kmp_threads`. In
`__kmp_expand_threads`, the expansion starts from `__kmp_threads_capacity`, and
repeatedly doubling it until the new capacity meets the requirement. Let's
assume the new requirement is `Y`.  If `Y` happens to meet the constraint
`(N+8)*2^X=Y` where `X` is the number of iterations, the new capacity is not
enough because we have 8 slots for hidden helper threads.

Here is an example.
```
#include <vector>

int main(int argc, char *argv[]) {
  constexpr const size_t N = 1344;
  std::vector<int> data(N);

#pragma omp parallel for
  for (unsigned i = 0; i < N; ++i) {
    data[i] = i;
  }

#pragma omp parallel for num_threads(N)
  for (unsigned i = 0; i < N; ++i) {
    data[i] += i;
  }

  return 0;
}
```
My CPU is 20C40T, then `__kmp_threads_capacity` is 160. After offset,
`__kmp_threads_capacity` becomes 168. `1344 = (160+8)*2^3`, then the assertions
hit.

Reviewed By: protze.joachim

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

3 years ago[SelectionDAG] Don't pass a scalable vector to MachinePointerInfo::getWithOffset...
Craig Topper [Thu, 18 Mar 2021 20:19:42 +0000 (13:19 -0700)]
[SelectionDAG] Don't pass a scalable vector to MachinePointerInfo::getWithOffset in a unit test.

Suppresses an implicit TypeSize to uint64_t conversion warning.

We might be able to just not offset it since we're writing to a
Fixed stack object, but I wasn't sure so I just did what
DAGTypeLegalizer::IncrementPointer does.

Reviewed By: sdesmalen

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

3 years ago[lli] Add Orc greedy mode as -jit-kind=orc
Stefan Gränitz [Thu, 18 Mar 2021 16:50:48 +0000 (17:50 +0100)]
[lli] Add Orc greedy mode as -jit-kind=orc

In the existing OrcLazy mode, modules go through partitioning and outgoing calls are replaced by reexport stubs that resolve on call-through. In greedy mode that this patch unlocks for lli, modules materialize as a whole and trigger materialization for all required symbols recursively. This is useful for testing (e.g. D98785) and it's more similar to the way MCJIT works.

3 years ago[mlir] Fix build failure due to 1a572f4
thomasraoux [Thu, 18 Mar 2021 21:57:19 +0000 (14:57 -0700)]
[mlir] Fix build failure due to 1a572f4

3 years ago[AMDGPU] Remove cpol, tfe, and swz from MUBUF patterns
Stanislav Mekhanoshin [Mon, 15 Mar 2021 22:08:53 +0000 (15:08 -0700)]
[AMDGPU] Remove cpol, tfe, and swz from MUBUF patterns

These are always selected as 0 anyway.

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

3 years agoRevert "Revert "[mlir] Add linalg.fill bufferization conversion""
Lei Zhang [Thu, 18 Mar 2021 21:21:16 +0000 (17:21 -0400)]
Revert "Revert "[mlir] Add linalg.fill bufferization conversion""

This reverts commit c69550c132e5f6eea025ba1f52bd2eb632599d46 with
proper fix applied.

3 years agoRevert "[mlir] Add linalg.fill bufferization conversion"
Mehdi Amini [Thu, 18 Mar 2021 21:18:07 +0000 (21:18 +0000)]
Revert "[mlir] Add linalg.fill bufferization conversion"

This reverts commit 32a744ab20f37681f71ca9098625994515f0f4ab.

CI is broken:

test/Dialect/Linalg/bufferize.mlir:274:12: error: CHECK: expected string not found in input
 // CHECK: %[[MEMREF:.*]] = tensor_to_memref %[[IN]] : memref<?xf32>
           ^

3 years ago[AArch64][compiler-rt] Strip PAC from the link register.
Daniel Kiss [Mon, 15 Mar 2021 09:24:44 +0000 (10:24 +0100)]
[AArch64][compiler-rt] Strip PAC from the link register.

-mbranch-protection protects the LR on the stack with PAC.
When the frames are walked the LR need to be cleared.
This inline assembly later will be replaced with a new builtin.

Test: build with  -DCMAKE_C_FLAGS="-mbranch-protection=standard".

Reviewed By: kubamracek

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

3 years agoRevert "[AArch64][compiler-rt] Strip PAC from the link register."
Daniel Kiss [Thu, 18 Mar 2021 20:55:39 +0000 (21:55 +0100)]
Revert "[AArch64][compiler-rt] Strip PAC from the link register."

This reverts commit ad40453fc425ee8e1fe43c7bb6e3c1c3afa9cc3b.

3 years ago[lldb] Move Apple simulators test targets under API
Jonas Devlieghere [Thu, 18 Mar 2021 20:54:56 +0000 (13:54 -0700)]
[lldb] Move Apple simulators test targets under API

Move the Apple simulators test targets as they only matter for the API
tests.

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

3 years ago[mlir] Add linalg.fill bufferization conversion
Eugene Zhulenev [Mon, 15 Mar 2021 23:52:31 +0000 (16:52 -0700)]
[mlir] Add linalg.fill bufferization conversion

`BufferizeAnyLinalgOp` fails because `FillOp` is not a `LinalgGenericOp` and it fails while reading operand sizes attribute.

Reviewed By: nicolasvasilache

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

3 years ago[clang-cl] make -ffile-compilation-dir a CoreOption.
Zequan Wu [Thu, 18 Mar 2021 19:27:42 +0000 (12:27 -0700)]
[clang-cl] make -ffile-compilation-dir a CoreOption.

Let clang-cl accepts `-ffile-compilation-dir` flag.

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

3 years ago[mlir] Add vector op support to cuda-runner including vector.print
thomasraoux [Thu, 18 Mar 2021 19:59:49 +0000 (12:59 -0700)]
[mlir] Add vector op support to cuda-runner including vector.print

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

3 years ago[lldb] Fix flakyness in TestGdbRemote_vContThreads
Pavel Labath [Thu, 18 Mar 2021 18:40:48 +0000 (19:40 +0100)]
[lldb] Fix flakyness in TestGdbRemote_vContThreads

The cause is the non-async-signal-safety printf function (et al.). If
the test managed to interrupt the process and inject a signal before the
printf("@started") call returned (but after it has actually written the
output), that string could end up being printed twice (presumably,
because the function did not manage the clear the userspace buffer, and
so the print call in the signal handler would print it once again).

This patch fixes the issue by replacing the printf call in the signal
handler with a sprintf+write combo, which should not suffer from that
problem (though I wouldn't go as far as to call it async signal safe).

3 years ago[SimplifyCFG] add tests for branch cond merging with prof metadata; NFC
Sanjay Patel [Thu, 18 Mar 2021 19:19:00 +0000 (15:19 -0400)]
[SimplifyCFG] add tests for branch cond merging with prof metadata; NFC

See PR49336.

3 years ago[mlir][linalg] Extend linalg vectorization to support non-identity input maps
thomasraoux [Tue, 16 Mar 2021 21:14:51 +0000 (14:14 -0700)]
[mlir][linalg] Extend linalg vectorization to support non-identity input maps

This propagates the affine map to transfer_read op in case it is not a
minor identity map.

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

3 years agoRevert "[VPlan] Add plain text (not DOT's digraph) dumps"
Mehdi Amini [Thu, 18 Mar 2021 19:20:39 +0000 (19:20 +0000)]
Revert "[VPlan] Add plain text (not DOT's digraph) dumps"

This reverts commit 6b053c9867a3ede32e51cef3ed972d5ce5b38bc0.
The build is broken:

ld.lld: error: undefined symbol: llvm::VPlan::printDOT(llvm::raw_ostream&) const
>>> referenced by LoopVectorize.cpp
>>>               LoopVectorize.cpp.o:(llvm::LoopVectorizationPlanner::printPlans(llvm::raw_ostream&)) in archive lib/libLLVMVectorize.a

3 years ago[SystemZ][z/OS] vasprintf fix libc++
Muiez Ahmed [Thu, 18 Mar 2021 18:23:55 +0000 (14:23 -0400)]
[SystemZ][z/OS] vasprintf fix libc++

The aim is to use the correct vasprintf implementation for z/OS libc++, where a copy of va_list ap is needed. In particular, it avoids the potential that the initial internal call to vsnprintf will modify ap and the subsequent call to vsnprintf will use that modified ap.

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

3 years ago[VPlan] Add plain text (not DOT's digraph) dumps
Andrei Elovikov [Thu, 18 Mar 2021 18:32:34 +0000 (11:32 -0700)]
[VPlan] Add plain text (not DOT's digraph) dumps

I foresee two uses for this:
1) It's easier to use those in debugger.
2) Once we start implementing more VPlan-to-VPlan transformations (especially
   inner loop massaging stuff), using the vectorized LLVM IR as CHECK targets in
   LIT test would become too obscure. I can imagine that we'd want to CHECK
   against VPlan dumps after multiple transformations instead. That would be
   easier with plain text dumps than with DOT format.

Reviewed By: fhahn

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

3 years ago[WebAssembly] Finalize SIMD names and opcodes
Thomas Lively [Thu, 18 Mar 2021 18:21:24 +0000 (11:21 -0700)]
[WebAssembly] Finalize SIMD names and opcodes

Updates the names (e.g. widen => extend, saturate => sat) and opcodes of all
SIMD instructions to match the finalized SIMD spec. Deliberately does not change
the public interface in wasm_simd128.h yet; that will require more care.

Depends on D98466.

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

3 years ago[WebAssembly] Remove experimental SIMD instructions
Thomas Lively [Thu, 18 Mar 2021 18:21:24 +0000 (11:21 -0700)]
[WebAssembly] Remove experimental SIMD instructions

Removes the instruction definitions, intrinsics, and builtins for qfma/qfms,
signselect, and prefetch instructions, which were not included in the final
WebAssembly SIMD spec.

Depends on D98457.

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

3 years ago[flang] Refine symbol sorting
peter klausler [Thu, 18 Mar 2021 17:26:23 +0000 (10:26 -0700)]
[flang] Refine symbol sorting

Replace semantics::SymbolSet with alternatives that clarify
whether the set should order its contents by source position
or not.  This matters because positionally-ordered sets must
not be used for Symbols that might be subjected to name
replacement during name resolution, and address-ordered
sets must not be used (without sorting) in circumstances
where the order of their contents affects the output of the
compiler.

All set<> and map<> instances in the compiler that are keyed
by Symbols now have explicit Compare types in their template
instantiations.  Symbol::operator< is no more.

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

3 years ago[mlir] Fix typo in SCF.cpp (NFC)
lorenzo chelini [Thu, 18 Mar 2021 18:15:33 +0000 (19:15 +0100)]
[mlir] Fix typo in SCF.cpp (NFC)

3 years agoFix typo: `char` should be `TS`
Jorg Brown [Thu, 18 Mar 2021 18:00:07 +0000 (11:00 -0700)]
Fix typo: `char` should be `TS`

3 years ago[CMake][runtimes] Add file level dependency to merge_archives commands
Markus Böck [Thu, 18 Mar 2021 17:51:10 +0000 (18:51 +0100)]
[CMake][runtimes] Add file level dependency to merge_archives commands

Both libc++ and libc++abi have options of merging with another archive. In the case of libc++abi, libunwind can be merged into it and in the case of libc++, libc++abi can be merged into it.

This is realized using add_custom_command with POST_BUILD and the usage of the CMake generator expression TARGET_LINKER_FILE in the arguments. For such generator expressions CMake doc states: "This target-level dependency does NOT add a file-level dependency that would cause the custom command to re-run whenever the executable is recompiled" [1]

This patch adds a DEPENDS argument to both add_custom_command invocations so that the archives also have a file-level dependency on the target they are merging with. That way, changes in say, libunwind source code, will be updated in the libc++abi and/or libc++ static libraries as well.

[1] https://cmake.org/cmake/help/v3.20/command/add_custom_command.html

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

3 years ago[libc++] Future-proof generate_feature_test_macro_components.py against long names.
Arthur O'Dwyer [Thu, 18 Mar 2021 14:28:56 +0000 (10:28 -0400)]
[libc++] Future-proof generate_feature_test_macro_components.py against long names.

`__cpp_lib_default_template_type_for_algorithm_values` is 52 characters long,
which is enough to reduce the multiplier to less-than-zero, producing an empty
string between the name of the macro and its numeric value. Ensure there's
always a space between the name of the macro and its value.

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

3 years ago[docs] Document regular LLVM sync-ups
Kristof Beyls [Wed, 17 Mar 2021 16:55:56 +0000 (17:55 +0100)]
[docs] Document regular LLVM sync-ups

This documents current regular LLVM sync-ups that are happening in the
Getting Involved section.

I hope this gives a bit more visibility to regular sync-ups that are
happening in the LLVM community, documenting another way communication
in the community happens.
Of course the downside is that this is another location that sync-up
metadata needs to be maintained. That being said, the structure as
proposed means that no changes are needed once a new sync-up is added,
apart from maybe removing the entry once it becomes clear that that
particular sync-up series is completely cancelled.

Documenting a few pointers on how current sync-ups happen may also
encourage others to organize useful sync-ups on specific topics.

I've started with adding the sync-ups I'm aware of. There's a good
chance I've missed some.

If most sync-ups end up having a public google calendar, we could also
create and maintain a public google calendar that shows all events
happening in the LLVM community, including dev meetings, sync-ups,
socials, etc - assuming that would be valuable.

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

3 years ago[libc++] Remove the Docker files for BuildBot
Louis Dionne [Tue, 2 Mar 2021 17:44:43 +0000 (12:44 -0500)]
[libc++] Remove the Docker files for BuildBot

We don't use them anymore since we're using the BuildKite setup.

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

3 years ago[WebAssembly] Remove unimplemented-simd target feature
Thomas Lively [Thu, 18 Mar 2021 17:23:12 +0000 (10:23 -0700)]
[WebAssembly] Remove unimplemented-simd target feature

Now that the WebAssembly SIMD specification is finalized and engines are
generally up-to-date, there is no need for a separate target feature for gating
SIMD instructions that engines have not implemented. With this change,
v128.const is now enabled by default with the simd128 target feature.

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

3 years ago[llvm][AArch64][SVE] Lower fixed length vector fabs
Peter Waller [Thu, 11 Mar 2021 17:29:32 +0000 (17:29 +0000)]
[llvm][AArch64][SVE] Lower fixed length vector fabs

Seemingly striaghtforward.

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

3 years ago[ELF] Change --shuffle-sections=<seed> to --shuffle-sections=<section-glob>=<seed>
Fangrui Song [Thu, 18 Mar 2021 17:18:19 +0000 (10:18 -0700)]
[ELF] Change --shuffle-sections=<seed> to --shuffle-sections=<section-glob>=<seed>

`--shuffle-sections=<seed>` applies to all sections.  The new
`--shuffle-sections=<section-glob>=<seed>` makes shuffling selective.  To the
best of my knowledge, the option is only used as debugging, so just drop the
original form.

`--shuffle-sections '.init_array*=-1'` `--shuffle-sections '.fini_array*=-1'`.
reverses static constructors/destructors of the same priority.
Useful to detect some static initialization order fiasco.

`--shuffle-sections '.data*=-1'`
reverses `.data*` sections. Useful to detect unfunded pointer comparison results
of two unrelated objects.

If certain sections have an intrinsic order, the old form cannot be used.

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

3 years ago[libcxx] updates the feature-test macro generator
Christopher Di Bella [Wed, 17 Mar 2021 18:11:31 +0000 (18:11 +0000)]
[libcxx] updates the feature-test macro generator

D97015 didn't correctly update `generate_feature_test_macro_components.py`.

Reviewed By: ldionne, Quuxplusone, #libc, Mordante

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