platform/upstream/llvm.git
5 years agovs integration: Use llvm-lib for librarian
Russell Gallop [Mon, 29 Apr 2019 10:10:17 +0000 (10:10 +0000)]
vs integration: Use llvm-lib for librarian

This uses llvm-lib.exe for the librarian instead of Visual Studio
provided lib.exe. Without this it is not possible to create static
libraries with -flto using the plugin.

Original patch by Steven Noonan

This fixes: PR41147

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

llvm-svn: 359430

5 years agogn: Fix check-clang build after r359179
Hans Wennborg [Mon, 29 Apr 2019 09:58:48 +0000 (09:58 +0000)]
gn: Fix check-clang build after r359179

llvm-svn: 359429

5 years ago[clangd] Delete config.clangd_xpc_support from test/ to unbreak check-llvm-tools
Fangrui Song [Mon, 29 Apr 2019 09:36:54 +0000 (09:36 +0000)]
[clangd] Delete config.clangd_xpc_support from test/ to unbreak check-llvm-tools

D61187 didn't delete config.clangd_xpc_support from test/
CLANGD_BUILD_XPC is defined in clangd/CMakeLists.txt and not available in test/lit.site.cfg.py.in

llvm-svn: 359428

5 years agoTry to use /proc on FreeBSD for getExecutablePath
David Chisnall [Mon, 29 Apr 2019 09:24:51 +0000 (09:24 +0000)]
Try to use /proc on FreeBSD for getExecutablePath

Currently, clang's libTooling passes this function a fake argv0, which
means that no libTooling tools can find the standard headers on FreeBSD.
With this change, these will now work on any FreeBSD systems that have
procfs mounted.  This isn't the right fix for the libTooling issue, but
it does bring the FreeBSD implementation of getExecutablePath closer to
the Linux and macOS implementations.

llvm-svn: 359427

5 years ago[DebugInfo] Terminate more location-list ranges at the end of blocks
Jeremy Morse [Mon, 29 Apr 2019 09:13:16 +0000 (09:13 +0000)]
[DebugInfo] Terminate more location-list ranges at the end of blocks

This patch fixes PR40795, where constant-valued variable locations can
"leak" into blocks placed at higher addresses. The root of this is that
DbgEntityHistoryCalculator terminates all register variable locations at
the end of each block, but not constant-value variable locations.

Fixing this requires constant-valued DBG_VALUE instructions to be
broadcast into all blocks where the variable location remains valid, as
documented in the LiveDebugValues section of SourceLevelDebugging.rst,
and correct termination in DbgEntityHistoryCalculator.

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

llvm-svn: 359426

5 years ago[DWARF] Fix dump of local/foreign TU lists in .debug_names
Fangrui Song [Mon, 29 Apr 2019 08:55:10 +0000 (08:55 +0000)]
[DWARF] Fix dump of local/foreign TU lists in .debug_names

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

llvm-svn: 359425

5 years ago[clangd] Move clangd tests to clangd directory. check-clangd is no longer part of...
Sam McCall [Mon, 29 Apr 2019 08:44:01 +0000 (08:44 +0000)]
[clangd] Move clangd tests to clangd directory. check-clangd is no longer part of check-clang-tools.

Summary:
Motivation:
 - this layout is a pain to work with
 - without a common root, it's painful to express things like "disable clangd" (D61122)
 - CMake/lit configs are a maintenance hazard, and the more the one-off hacks
   for various tools are entangled, the more we see apathy and non-ownership.

This attempts to use the bare-minimum configuration needed (while still
supporting the difficult cases: windows, standalone clang build, dynamic libs).
In particular the lit.cfg.py and lit.site.cfg.py.in are merged into lit.cfg.in.
The logic in these files is now minimal.

(Much of clang-tools-extra's lit configs can probably be cleaned up by reusing
lit.llvm.llvm_config.use_clang(), and every llvm project does its own version of
LDPATH mangling. I haven't attempted to fix any of those).

Docs are still in clang-tools-extra/docs, I don't have any plans to touch those.

Reviewers: gribozavr

Subscribers: mgorny, javed.absar, MaskRay, jkorous, arphaman, kadircet, jfb, cfe-commits, ilya-biryukov, thakis

Tags: #clang

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

llvm-svn: 359424

5 years ago[builtins] Use __APPLE__ instead of __MACH__ in check
Petr Hosek [Mon, 29 Apr 2019 08:38:43 +0000 (08:38 +0000)]
[builtins] Use __APPLE__ instead of __MACH__ in check

The latter doesn't seem to be working for all targets. This addresses
the issue introduced in r359413.

llvm-svn: 359423

5 years ago[DWARF] Delete a redundant check in getFileNameByIndex()
Fangrui Song [Mon, 29 Apr 2019 08:15:13 +0000 (08:15 +0000)]
[DWARF] Delete a redundant check in getFileNameByIndex()

llvm-svn: 359422

5 years ago[builtins] Fix the missing assembly on Darwin
Petr Hosek [Mon, 29 Apr 2019 07:45:15 +0000 (07:45 +0000)]
[builtins] Fix the missing assembly on Darwin

This was introduced in r359413.

llvm-svn: 359421

5 years ago[Windows] Dump more information about access violation exception
Aleksandr Urakov [Mon, 29 Apr 2019 07:29:25 +0000 (07:29 +0000)]
[Windows] Dump more information about access violation exception

Summary:
Dump more information about "access violation" and "in page error" exceptions to
description. Description now contains data about read/write violation type and
actual address as described at
https://docs.microsoft.com/en-us/windows/desktop/api/winnt/ns-winnt-_exception_record

Reviewers: asmith, stella.stamenova

Reviewed By: stella.stamenova

Subscribers: teemperor, amccarth, abidh, lldb-commits, aleksandr.urakov

Tags: #lldb

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

llvm-svn: 359420

5 years ago[builtins] Fix the typo in the preprocessor check
Petr Hosek [Mon, 29 Apr 2019 06:30:50 +0000 (06:30 +0000)]
[builtins] Fix the typo in the preprocessor check

This was introduced in r359413.

llvm-svn: 359419

5 years ago[X86] Remove some intel syntax aliases on (v)cvtpd2(u)dq, (v)cvtpd2ps, (v)cvt(u)qq2ps...
Craig Topper [Mon, 29 Apr 2019 06:13:41 +0000 (06:13 +0000)]
[X86] Remove some intel syntax aliases on (v)cvtpd2(u)dq, (v)cvtpd2ps, (v)cvt(u)qq2ps. Add 'x' and'y' suffix aliases to masked version of the same in att syntax.

The 128/256 bit version of these instructions require an 'x' or 'y' suffix to
disambiguate the memory form in att syntax.

We were allowing the same suffix in intel syntax, but it appears gas does not
do that.

gas does allow the 'x' and 'y' suffix on register and broadcast forms even
though its not needed. We were allowing it on unmasked register form, but not on
masked versions or on masked or unmasked broadcast form.

While there fix some test coverage holes so they can be extended with the 'x'
and 'y' suffix tests.

llvm-svn: 359418

5 years ago[llvm-nm] -print-size => --print-size
Fangrui Song [Mon, 29 Apr 2019 06:03:59 +0000 (06:03 +0000)]
[llvm-nm] -print-size => --print-size

llvm-svn: 359417

5 years ago[llvm-nm] Simplify and fix a buffer overflow
Fangrui Song [Mon, 29 Apr 2019 05:38:22 +0000 (05:38 +0000)]
[llvm-nm] Simplify and fix a buffer overflow

* char SymbolAddrStr[18] can't hold "%" PRIo64 which may need 22 characters.
* Use range-based for
* Delete unnecessary typedef
* format(...).print(Str, sizeof(Str)) + outs() << Str => outs() << format(...)
* Use cascading outs() << .. << ..
* Use iterator_range(Container &&c)
* (A & B) == B => A & B   if B is a power of 2
* replace null sentinel in constants with makeArrayRef

llvm-svn: 359416

5 years agoRemove XFail for new GCC. They fixed it
Eric Fiselier [Mon, 29 Apr 2019 04:47:57 +0000 (04:47 +0000)]
Remove XFail for new GCC. They fixed it

llvm-svn: 359415

5 years agollvm-cvtres: Attempt to make llvm-cvtres/duplicate.test work on big-endian systems
Nico Weber [Mon, 29 Apr 2019 00:51:41 +0000 (00:51 +0000)]
llvm-cvtres: Attempt to make llvm-cvtres/duplicate.test work on big-endian systems

llvm-svn: 359414

5 years ago[builtins] Use aliases for function redirects
Petr Hosek [Mon, 29 Apr 2019 00:46:23 +0000 (00:46 +0000)]
[builtins] Use aliases for function redirects

Symbol aliases are supported by all platforms that compiler-rt builtins
target, and we can use these instead of function redirects to avoid the
extra indirection.

This is part of the cleanup proposed in "[RFC] compiler-rt builtins
cleanup and refactoring".

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

llvm-svn: 359413

5 years agoAdd some lld-link 9.0 release notes
Nico Weber [Mon, 29 Apr 2019 00:42:05 +0000 (00:42 +0000)]
Add some lld-link 9.0 release notes

llvm-svn: 359412

5 years ago[builtins] Use single line C++/C99 comment style
Petr Hosek [Sun, 28 Apr 2019 22:47:49 +0000 (22:47 +0000)]
[builtins] Use single line C++/C99 comment style

Use the uniform single line C++/99 style for code comments.

This is part of the cleanup proposed in "[RFC] compiler-rt builtins
cleanup and refactoring".

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

llvm-svn: 359411

5 years ago[builtins] Reformat builtins with clang-format
Petr Hosek [Sun, 28 Apr 2019 21:53:32 +0000 (21:53 +0000)]
[builtins] Reformat builtins with clang-format

Update formatting to use the LLVM style.

This is part of the cleanup proposed in "[RFC] compiler-rt builtins
cleanup and refactoring".

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

llvm-svn: 359410

5 years ago[X86] Add PR39921 HADD pairwise reduction test and AVX2 test coverage
Simon Pilgrim [Sun, 28 Apr 2019 21:04:47 +0000 (21:04 +0000)]
[X86] Add PR39921 HADD pairwise reduction test and AVX2 test coverage

llvm-svn: 359409

5 years ago[X86][AVX] Add fast-hops target for add/fadd reduction tests
Simon Pilgrim [Sun, 28 Apr 2019 20:04:08 +0000 (20:04 +0000)]
[X86][AVX] Add fast-hops target for add/fadd reduction tests

llvm-svn: 359408

5 years ago[X86] Add PR39936 HADD Tests
Simon Pilgrim [Sun, 28 Apr 2019 20:03:11 +0000 (20:03 +0000)]
[X86] Add PR39936 HADD Tests

llvm-svn: 359407

5 years ago[X86][SSE] combineExtractVectorElt - add early-out to return zero/undef for out-of...
Simon Pilgrim [Sun, 28 Apr 2019 19:12:58 +0000 (19:12 +0000)]
[X86][SSE] combineExtractVectorElt - add early-out to return zero/undef for out-of-range extraction indices.

llvm-svn: 359406

5 years agoFix permission error while running bots
Eric Fiselier [Sun, 28 Apr 2019 17:00:46 +0000 (17:00 +0000)]
Fix permission error while running bots

llvm-svn: 359405

5 years agoattempt to unbreak build bots
Eric Fiselier [Sun, 28 Apr 2019 16:42:49 +0000 (16:42 +0000)]
attempt to unbreak build bots

llvm-svn: 359404

5 years agoAttempt to switch to auto-scaling bots
Eric Fiselier [Sun, 28 Apr 2019 15:54:50 +0000 (15:54 +0000)]
Attempt to switch to auto-scaling bots

llvm-svn: 359403

5 years ago[ConstantRange] Add makeExactNoWrapRegion()
Nikita Popov [Sun, 28 Apr 2019 15:40:56 +0000 (15:40 +0000)]
[ConstantRange] Add makeExactNoWrapRegion()

I got confused on the terminology, and the change in D60598 was not
correct. I was thinking of "exact" in terms of the result being
non-approximate. However, the relevant distinction here is whether
the result is

 * Largest range such that:
   Forall Y in Other: Forall X in Result: X BinOp Y does not wrap.
   (makeGuaranteedNoWrapRegion)
 * Smallest range such that:
   Forall Y in Other: Forall X not in Result: X BinOp Y wraps.
   (A hypothetical makeAllowedNoWrapRegion)
 * Both. (makeExactNoWrapRegion)

I'm adding a separate makeExactNoWrapRegion method accepting a
single APInt (same as makeExactICmpRegion) and using it in the
places where the guarantee is relevant.

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

llvm-svn: 359402

5 years ago[X86][AVX] Enabled AVX512F tests and add PR40815 test case
Simon Pilgrim [Sun, 28 Apr 2019 15:04:30 +0000 (15:04 +0000)]
[X86][AVX] Enabled AVX512F tests and add PR40815 test case

llvm-svn: 359401

5 years ago[X86][AVX] Combine non-lane crossing binary shuffles using X86ISD::VPERMV3
Simon Pilgrim [Sun, 28 Apr 2019 14:31:01 +0000 (14:31 +0000)]
[X86][AVX] Combine non-lane crossing binary shuffles using X86ISD::VPERMV3

Some of the combines might be further improved if we lower more shuffles with X86ISD::VPERMV3 directly, instead of waiting to combine the results.

llvm-svn: 359400

5 years ago[SelectionDAG] include FP min/max variants as binary operators
Sanjay Patel [Sun, 28 Apr 2019 13:19:29 +0000 (13:19 +0000)]
[SelectionDAG] include FP min/max variants as binary operators

The x86 test diffs don't look great because of extra move ops,
but FP min/max should clearly be included in the list.

llvm-svn: 359399

5 years ago[DAGCombiner] try repeated fdiv divisor transform before building estimate
Sanjay Patel [Sun, 28 Apr 2019 12:23:43 +0000 (12:23 +0000)]
[DAGCombiner] try repeated fdiv divisor transform before building estimate

This was originally part of D61028, but it's an independent diff.

If we try the repeated divisor reciprocal transform before producing an estimate sequence,
then we have an opportunity to use scalar fdiv. On x86, the trade-off is 1 divss vs. 5
vector FP ops in the default estimate sequence. On recent chips (Skylake, Ryzen), the
full-precision division is only 3 cycle throughput, so that's probably the better perf
default option and avoids problems from x86's inaccurate estimates.

The last 2 tests show that users still have the option to override the defaults by using
the function attributes for reciprocal estimates, but those patterns are potentially made
faster by converting the vector ops (including ymm ops) to scalar math.

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

llvm-svn: 359398

5 years ago[MCA] Fix typo in AVX2 gather tests. NFC
Andrea Di Biagio [Sun, 28 Apr 2019 10:54:45 +0000 (10:54 +0000)]
[MCA] Fix typo in AVX2 gather tests. NFC

llvm-svn: 359397

5 years ago[X86][SSE] Optimize llvm.experimental.vector.reduce.xor.vXi1 parity reduction (PR38840)
Simon Pilgrim [Sun, 28 Apr 2019 10:46:17 +0000 (10:46 +0000)]
[X86][SSE] Optimize llvm.experimental.vector.reduce.xor.vXi1 parity reduction (PR38840)

An xor reduction of a bool vector can be optimized to a parity check of the MOVMSK/BITCAST'd integer - if the population count is odd return 1, else return 0.

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

llvm-svn: 359396

5 years ago[X86][AVX] Add AVX512DQ coverage for masked memory ops tests (PR34584)
Simon Pilgrim [Sun, 28 Apr 2019 10:02:34 +0000 (10:02 +0000)]
[X86][AVX] Add AVX512DQ coverage for masked memory ops tests (PR34584)

llvm-svn: 359395

5 years ago[CMake] Don't modify `FUZZER_SUPPORTED_ARCH` is place.
Dan Liew [Sun, 28 Apr 2019 09:44:53 +0000 (09:44 +0000)]
[CMake] Don't modify `FUZZER_SUPPORTED_ARCH` is place.

On a Darwin host we were modifying the `FUZZER_SUPPORTED_ARCH` in place
which would strip out non-x86 architectures. This unhelpful if we
want to use `FUZZER_SUPPORTED_ARCH` later.

To fix this we introduce `FUZZER_TEST_ARCH` which is similar to what we
have for for the other sanitizers. For non-Darwin host platforms
`FUZZER_TEST_ARCH` is the same as `FUZZER_SUPPORTED_ARCH` but for Darwin
host platforms we use `darwin_filter_host_archs(...)` as the previous
code did.

llvm-svn: 359394

5 years ago[PowerPC][Clang] Add tests for PowerPC MMX intrinsics
Qiu Chaofan [Sun, 28 Apr 2019 06:27:33 +0000 (06:27 +0000)]
[PowerPC][Clang] Add tests for PowerPC MMX intrinsics

Add the rest of test cases covering functions defined in mmintrin.h on PowerPC.

Reviewed By: Jinsong Ji

llvm-svn: 359393

5 years ago[X86] Remove (V)MOV64toSDrr/m and (V)MOVDI2SSrr/m. Use 128-bit result MOVD/MOVQ and...
Craig Topper [Sun, 28 Apr 2019 06:25:33 +0000 (06:25 +0000)]
[X86] Remove (V)MOV64toSDrr/m and (V)MOVDI2SSrr/m. Use 128-bit result MOVD/MOVQ and COPY_TO_REGCLASS instead

Summary:
The register form of these instructions are CodeGenOnly instructions that cover
GR32->FR32 and GR64->FR64 bitcasts. There is a similar set of instructions for
the opposite bitcast. Due to the patterns using bitcasts these instructions get
marked as "bitcast" machine instructions as well. The peephole pass is able to
look through these as well as other copies to try to avoid register bank copies.

Because FR32/FR64/VR128 are all coalescable to each other we can end up in a
situation where a GR32->FR32->VR128->FR64->GR64 sequence can be reduced to
GR32->GR64 which the copyPhysReg code can't handle.

To prevent this, this patch removes one set of the 'bitcast' instructions. So
now we can only go GR32->VR128->FR32 or GR64->VR128->FR64. The instruction that
converts from GR32/GR64->VR128 has no special significance to the peephole pass
and won't be looked through.

I guess the other option would be to add support to copyPhysReg to just promote
the GR32->GR64 to a GR64->GR64 copy. The upper bits were basically undefined
anyway. But removing the CodeGenOnly instruction in favor of one that won't be
optimized seemed safer.

I deleted the peephole test because it couldn't be made to work with the bitcast
instructions removed.

The load version of the instructions were unnecessary as the pattern that selects
them contains a bitcasted load which should never happen.

Fixes PR41619.

Reviewers: RKSimon, spatel

Reviewed By: RKSimon

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 359392

5 years agoRevert rL359389: [X86][SSE] Add support for <64 x i1> bool reduction
Simon Pilgrim [Sat, 27 Apr 2019 20:44:08 +0000 (20:44 +0000)]
Revert rL359389: [X86][SSE] Add support for <64 x i1> bool reduction

Minor generalization of the existing <32 x i1> pre-AVX2 split code.
........
Causing irregular buildbot failures.

llvm-svn: 359391

5 years ago[X86][AVX] Add additional SSE/AVX expandload and compressstore targets
Simon Pilgrim [Sat, 27 Apr 2019 20:20:02 +0000 (20:20 +0000)]
[X86][AVX] Add additional SSE/AVX expandload and compressstore targets

llvm-svn: 359390

5 years ago[X86][SSE] Add support for <64 x i1> bool reduction
Simon Pilgrim [Sat, 27 Apr 2019 20:04:44 +0000 (20:04 +0000)]
[X86][SSE] Add support for <64 x i1> bool reduction

Minor generalization of the existing <32 x i1> pre-AVX2 split code.

llvm-svn: 359389

5 years ago[X86][AVX] Cleanup and add additional expandload and compressstore tests
Simon Pilgrim [Sat, 27 Apr 2019 19:57:34 +0000 (19:57 +0000)]
[X86][AVX] Cleanup and add additional expandload and compressstore tests

sort order by types and add vXi32/vXi16/vXi8 test coverage

llvm-svn: 359388

5 years agoFix UNPREDICTABLE check in EmulateInstructionARM::EmulateADDRegShift
Raphael Isemann [Sat, 27 Apr 2019 18:15:35 +0000 (18:15 +0000)]
Fix UNPREDICTABLE check in EmulateInstructionARM::EmulateADDRegShift

Summary:
As reported in LLVM bug 41487, the check in this function is wrong and should be
the same as the described check in the comment (which is correctly copied from the
ARM ISA reference).

Reviewers: #lldb, davide, JDevlieghere

Reviewed By: #lldb, davide, JDevlieghere

Subscribers: davide, javed.absar, kristof.beyls, lldb-commits

Tags: #lldb

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

llvm-svn: 359387

5 years ago[X86][AVX512] Improve vector bool reductions
Simon Pilgrim [Sat, 27 Apr 2019 17:32:46 +0000 (17:32 +0000)]
[X86][AVX512] Improve vector bool reductions

As predicate masks are legal on AVX512 targets, we avoid MOVMSK in these cases, but we can just bitcast the bool vector to the integer equivalent directly - avoiding expansion of the reduction to a shuffle pattern.

llvm-svn: 359386

5 years ago[X86] Add vector boolean reduction tests (PR38840)
Simon Pilgrim [Sat, 27 Apr 2019 16:49:54 +0000 (16:49 +0000)]
[X86] Add vector boolean reduction tests (PR38840)

AND/OR/XOR tests for the @llvm.experimental.vector.reduce intrinsics

AND/OR are pretty good (pre-AVX512), XOR (not so common but used for parity reduction) is still pretty bad.

llvm-svn: 359385

5 years ago[lli] Fix a typo in a cl::opt description.
Lang Hames [Sat, 27 Apr 2019 16:13:53 +0000 (16:13 +0000)]
[lli] Fix a typo in a cl::opt description.

Patch by Wasiher. Thanks Wasiher!

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

llvm-svn: 359384

5 years ago[llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests
Fangrui Song [Sat, 27 Apr 2019 16:12:14 +0000 (16:12 +0000)]
[llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests

llvm-svn: 359383

5 years agoFix check-prefixes typo
Simon Pilgrim [Sat, 27 Apr 2019 15:41:14 +0000 (15:41 +0000)]
Fix check-prefixes typo

llvm-svn: 359382

5 years ago[DJB] Fix variable case after D61178
Fangrui Song [Sat, 27 Apr 2019 15:33:22 +0000 (15:33 +0000)]
[DJB] Fix variable case after D61178

llvm-svn: 359381

5 years ago[llvm-nm] Support section type 'u': STB_GNU_UNIQUE
Fangrui Song [Sat, 27 Apr 2019 15:32:53 +0000 (15:32 +0000)]
[llvm-nm] Support section type 'u': STB_GNU_UNIQUE

llvm-svn: 359380

5 years ago[X86][SSE] Add initial test case for subvector insert/extract of illegal types
Simon Pilgrim [Sat, 27 Apr 2019 15:30:06 +0000 (15:30 +0000)]
[X86][SSE] Add initial test case for subvector insert/extract of illegal types

Suggested by @nikic on D59188

llvm-svn: 359379

5 years ago[X86][AVX] Merge mask select with shuffles across extract_subvector (PR40332)
Simon Pilgrim [Sat, 27 Apr 2019 13:35:32 +0000 (13:35 +0000)]
[X86][AVX] Merge mask select with shuffles across extract_subvector (PR40332)

Fixes PR40332 in the limited case where we're selecting between a target shuffle and a zero vector.

We can extend this in the future to handle more opcodes and non-zero selections.

llvm-svn: 359378

5 years ago[MCA] Add field `IsEliminated` to class Instruction. NFCI
Andrea Di Biagio [Sat, 27 Apr 2019 11:59:11 +0000 (11:59 +0000)]
[MCA] Add field `IsEliminated` to class Instruction. NFCI

llvm-svn: 359377

5 years ago[cmake] Disable a GCC optimization when building LLVM for MIPS
Simon Atanasyan [Sat, 27 Apr 2019 09:28:54 +0000 (09:28 +0000)]
[cmake] Disable a GCC optimization when building LLVM for MIPS

GCC when compiling LLVM for MIPS can introduce a jump to an uninitialized
value when shrink wrapping is enabled. As shrink wrapping is enabled in
GCC at all optimization levels, it must be disabled. This bug exists for
all versions of GCC since 4.9.2.

This partially resolves PR37701 / GCC PR target/86069.

Patch by Simon Dardis.

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

llvm-svn: 359376

5 years ago[lldb] [lit] Cleanly terminate Register tests
Michal Gorny [Sat, 27 Apr 2019 07:43:29 +0000 (07:43 +0000)]
[lldb] [lit] Cleanly terminate Register tests

Continue the Register test processes, and let them terminate cleanly
rather than implicitly terminating them along with lldb.

llvm-svn: 359375

5 years ago[sanitizer] Calculate SizeClassAllocator32::ByteMap type from Params::kSpaceSize...
Vitaly Buka [Sat, 27 Apr 2019 06:30:52 +0000 (06:30 +0000)]
[sanitizer] Calculate SizeClassAllocator32::ByteMap type from Params::kSpaceSize and Params::kRegionSizeLog

Reviewers: eugenis

Subscribers: kubamracek, cryptoad, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 359374

5 years ago[CommandObject] Use GetDebugger() helper method (NFC)
Jonas Devlieghere [Sat, 27 Apr 2019 06:19:42 +0000 (06:19 +0000)]
[CommandObject] Use GetDebugger() helper method (NFC)

In r359354 a GetDebugger() method was added to the CommandObject class,
so that we didn't have to go through the command interpreter to obtain
the script interpreter. This patch simplifies other call sites where
m_interpreter.GetDebugger() was used, and replaces them with a shorter
call to the new method.

llvm-svn: 359373

5 years ago[FormatEntity] Remove unused format type (NFC)
Jonas Devlieghere [Sat, 27 Apr 2019 05:36:57 +0000 (05:36 +0000)]
[FormatEntity] Remove unused format type (NFC)

The FormatType enum and corresponding field are unused. This patch
removes the type, field and simplifies the macros that initialize them.

llvm-svn: 359372

5 years ago[X86] Use MOVQ for i64 atomic_stores when SSE2 is enabled
Craig Topper [Sat, 27 Apr 2019 03:38:15 +0000 (03:38 +0000)]
[X86] Use MOVQ for i64 atomic_stores when SSE2 is enabled

Summary: If we have SSE2 we can use a MOVQ to store 64-bits and avoid falling back to a cmpxchg8b loop. If its a seq_cst store we need to insert an mfence after the store.

Reviewers: spatel, RKSimon, reames, jfb, efriedma

Reviewed By: RKSimon

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

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

llvm-svn: 359368

5 years agoReinstate r359059, reverted in r359361, with a fix to properly prevent
Richard Smith [Sat, 27 Apr 2019 02:58:17 +0000 (02:58 +0000)]
Reinstate r359059, reverted in r359361, with a fix to properly prevent
us emitting the operand of __builtin_constant_p if it has side-effects.

Original commit message:

Fix interactions between __builtin_constant_p and constexpr to match
current trunk GCC.

GCC permits information from outside the operand of
__builtin_constant_p (but in the same constant evaluation context) to be
used within that operand; clang now does so too. A few other minor
deviations from GCC's behavior showed up in my testing and are also
fixed (matching GCC):
  * Clang now supports nullptr_t as the argument type for
    __builtin_constant_p
    * Clang now returns true from __builtin_constant_p if called with a
    null pointer
    * Clang now returns true from __builtin_constant_p if called with an
    integer cast to pointer type

llvm-svn: 359367

5 years ago[AArch64] Initialize HasMTE
Vitaly Buka [Sat, 27 Apr 2019 02:40:01 +0000 (02:40 +0000)]
[AArch64] Initialize HasMTE

llvm-svn: 359366

5 years ago[sanitizer] NFC: add static_assert to confirm that we use reasonable ByteMap type
Vitaly Buka [Sat, 27 Apr 2019 02:13:26 +0000 (02:13 +0000)]
[sanitizer] NFC: add static_assert to confirm that we use reasonable ByteMap type

Summary: If bots work we can replace #ifs with template specialization by TwoLevelByteMapSize1.

There is known users of TwoLevelByteMap with TwoLevelByteMapSize1 equal 8,
and users of FlatByteMap with TwoLevelByteMapSize1 equal 2.

Reviewers: eugenis

Subscribers: kubamracek, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 359364

5 years agoRevert "AMDGPU: Split block for si_end_cf"
Mark Searles [Sat, 27 Apr 2019 00:51:18 +0000 (00:51 +0000)]
Revert "AMDGPU: Split block for si_end_cf"

This reverts commit 7a6ef3004655dd86d722199c471ae78c28e31bb4.

We discovered some internal test failures, so reverting for now.

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

llvm-svn: 359363

5 years ago[NFC][Sanitizer] Remove GetRealFunctionAddress and replace usages
Julian Lettner [Sat, 27 Apr 2019 00:49:14 +0000 (00:49 +0000)]
[NFC][Sanitizer] Remove GetRealFunctionAddress and replace usages

Reviewers: vitalybuka

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

llvm-svn: 359362

5 years agoRevert Fix interactions between __builtin_constant_p and constexpr to match current...
Jorge Gorbe Moya [Sat, 27 Apr 2019 00:32:04 +0000 (00:32 +0000)]
Revert Fix interactions between __builtin_constant_p and constexpr to match current trunk GCC.

This reverts r359059 (git commit 0b098754b73f3b96d00ecb1c7605760b11c90298)

llvm-svn: 359361

5 years ago[Fuchsia] Support multilib for -fsanitize=address and -fno-exceptions
Petr Hosek [Sat, 27 Apr 2019 00:25:13 +0000 (00:25 +0000)]
[Fuchsia] Support multilib for -fsanitize=address and -fno-exceptions

This introduces a support for multilibs to Fuchsia driver. Unlike the
existing multilibs that are used primarily for handling different
architecture variants, we use multilibs to handle different variants
of Clang runtime libraries: -fsanitize=address and -fno-exceptions
are the two we support initially. This replaces the existing support
for sanitized runtimes libraries that was only used by Fuchsia driver
and it also refactors some of the logic to allow sharing between GNU
and Fuchsia drivers.

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

llvm-svn: 359360

5 years ago[Driver] Support priority for multilibs
Petr Hosek [Sat, 27 Apr 2019 00:25:11 +0000 (00:25 +0000)]
[Driver] Support priority for multilibs

When more than one multilib flag matches, try to select the best
possible match based on priority. When two different multilibs with
the same same priority match, we still throw an error matching the
existing behavior.

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

llvm-svn: 359359

5 years ago[AMDGPU] gfx1010 VOPC implementation
Stanislav Mekhanoshin [Fri, 26 Apr 2019 23:16:16 +0000 (23:16 +0000)]
[AMDGPU] gfx1010 VOPC implementation

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

llvm-svn: 359358

5 years ago[ORC] Add a 'plugin' interface to ObjectLinkingLayer for events/configuration.
Lang Hames [Fri, 26 Apr 2019 22:58:39 +0000 (22:58 +0000)]
[ORC] Add a 'plugin' interface to ObjectLinkingLayer for events/configuration.

ObjectLinkingLayer::Plugin provides event notifications when objects are loaded,
emitted, and removed. It also provides a modifyPassConfig callback that allows
plugins to modify the JITLink pass configuration.

This patch moves eh-frame registration into its own plugin, and teaches
llvm-jitlink to only add that plugin when performing execution runs on
non-Windows platforms. This should allow us to re-enable the test case that was
removed in r359198.

llvm-svn: 359357

5 years ago[clang][driver] Weaken the test from 359353 to appease Windows bots
Alex Lorenz [Fri, 26 Apr 2019 22:58:31 +0000 (22:58 +0000)]
[clang][driver] Weaken the test from 359353 to appease Windows bots

llvm-svn: 359356

5 years ago[Driver] Remove unused functions (NFC)
Jonas Devlieghere [Fri, 26 Apr 2019 22:54:39 +0000 (22:54 +0000)]
[Driver] Remove unused functions (NFC)

Remove unused from the driver class. I noticed a bunch of small thing
while doing this that didn't warrant separate commits, so I've lumped
them together into this patch.

llvm-svn: 359355

5 years ago[ScriptInterpreter] Move ownership into debugger (NFC)
Jonas Devlieghere [Fri, 26 Apr 2019 22:43:16 +0000 (22:43 +0000)]
[ScriptInterpreter] Move ownership into debugger (NFC)

This is part two of the change started in r359330. This patch moves the
ownership of the script interpreter from the command interpreter into
the debugger. I would've preferred to remove the lazy initialization,
however the fact that the scripting language is set after the debugger
is created makes that tricky. So for now this does exactly the same
thing as when it was under the command interpreter. The result is that
this patch is fully NFC.

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

llvm-svn: 359354

5 years ago[driver][macOS] Link libarclite from the default toolchain when clang
Alex Lorenz [Fri, 26 Apr 2019 22:40:47 +0000 (22:40 +0000)]
[driver][macOS] Link libarclite from the default toolchain when clang
is running in a toolchain outside of xcode

'libarclite' usually lives in the same toolchain as 'clang'. However, the
Swift open source toolchains for macOS distribute Clang without 'libarclite'.
In that case, to allow the linker to find 'libarclite', we point to the
'libarclite' that should be in the XcodeDefault toolchain instead. The
path to the toolchain is inferred from the SDK path if it's specified.

https://bugs.swift.org/browse/SR-9972
rdar://49947573

llvm-svn: 359353

5 years agoRevert "[sanitizer] NFC: add static_assert to confirm that we use optimal ByteMap...
JF Bastien [Fri, 26 Apr 2019 22:29:49 +0000 (22:29 +0000)]
Revert "[sanitizer] NFC: add static_assert to confirm that we use optimal ByteMap type"

Fails on bots with:

/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-expensive/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h:69:3: error: static_assert failed due to requirement 'TwoLevelByteMapSize1 > 128' "TwoLevelByteMap should be used"
  static_assert(TwoLevelByteMapSize1 > 128, "TwoLevelByteMap should be used");
  ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-expensive/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_allocator_combined.h:29:34: note: in instantiation of template class '__sanitizer::SizeClassAllocator32<__sanitizer::AP32>' requested here
                        typename PrimaryAllocator::AddressSpaceView>::value,
                                 ^

http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive/13960/console

llvm-svn: 359352

5 years ago[GlobalISel][AArch64] Use getConstantVRegValWithLookThrough for extracts
Jessica Paquette [Fri, 26 Apr 2019 21:53:13 +0000 (21:53 +0000)]
[GlobalISel][AArch64] Use getConstantVRegValWithLookThrough for extracts

getConstantVRegValWithLookThrough does the same thing as the
getConstantValueForReg function, and has more visibility across GISel. Plus, it
supports looking through G_TRUNC, G_SEXT, and G_ZEXT. So, we get better code
reuse and more functionality for free by using it.

Add some test cases to select-extract-vector-elt.mir to show that we can now
look through those instructions.

llvm-svn: 359351

5 years agoAdd to the release notes the fact that UninitializedObject checker is now
Sylvestre Ledru [Fri, 26 Apr 2019 21:46:33 +0000 (21:46 +0000)]
Add to the release notes the fact that UninitializedObject checker is now
considered as stable

llvm-svn: 359350

5 years agoPass explicit C++ version to test
Frederic Riss [Fri, 26 Apr 2019 21:16:15 +0000 (21:16 +0000)]
Pass explicit C++ version to test

stop-hook-threads.cpp uses C++11 features, so ask for C++11 explicitely.
This isn't broken on mainstream because clang defaults to a newer C++
version now, but it breaks if testing against an older compiler.

llvm-svn: 359349

5 years ago[AArch64] Add support for MTE intrinsics
Javed Absar [Fri, 26 Apr 2019 21:08:11 +0000 (21:08 +0000)]
[AArch64] Add support for MTE intrinsics
This provides intrinsics support for Memory Tagging Extension (MTE),
which was introduced with the Armv8.5-a architecture.
These intrinsics are available when __ARM_FEATURE_MEMORY_TAGGING is defined.
Each intrinsic is described in detail in the ACLE Q1 2019 documentation:
https://developer.arm.com/docs/101028/latest
Reviewed By: Tim Nortover, David Spickett
Differential Revision: https://reviews.llvm.org/D60485

llvm-svn: 359348

5 years agoTestZMMRegister: use an integer division as intended
Frederic Riss [Fri, 26 Apr 2019 20:23:55 +0000 (20:23 +0000)]
TestZMMRegister: use an integer division as intended

llvm-svn: 359347

5 years ago[CommandInterpreter] Remove scripting language argument. (NFC)
Jonas Devlieghere [Fri, 26 Apr 2019 20:03:22 +0000 (20:03 +0000)]
[CommandInterpreter] Remove scripting language argument. (NFC)

The script language argument was passed from the debugger to the command
interpreter, only to call SetScriptLanguage on the debugger again. It
wasn't even used to initialize the script interpreter, because that
would query the debugger again. This patch removes the needless back and
forth.

llvm-svn: 359346

5 years ago[MinGW] Always emit local typeinfo
Martin Storsjo [Fri, 26 Apr 2019 19:31:51 +0000 (19:31 +0000)]
[MinGW] Always emit local typeinfo

This makes sure that code built with headers for a statically linked
libc++ also works when linking to the DLL version, when the DLL
hasn't been built with --export-all-symbols.

This matches what GCC for MinGW does for this test case.

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

llvm-svn: 359345

5 years ago[HIP] Fix visibility of `__constant__` variables.
Michael Liao [Fri, 26 Apr 2019 19:31:48 +0000 (19:31 +0000)]
[HIP] Fix visibility of `__constant__` variables.

Summary:
- `__constant__` variables should not be `hidden` as the linker may turn
  them into `LOCAL` symbols.

Reviewers: yaxunl

Subscribers: jvesely, nhaehnle, cfe-commits

Tags: #clang

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

llvm-svn: 359344

5 years ago[MinGW] Do dllexport inline methods in template instantiation
Martin Storsjo [Fri, 26 Apr 2019 19:31:46 +0000 (19:31 +0000)]
[MinGW] Do dllexport inline methods in template instantiation

Normally, in MinGW mode, inline methods aren't dllexported.

However, in the case of a dllimported template instantiation,
the inline methods aren't instantiated locally, but referenced
from the instantiation. Therefore, those methods also need to
be dllexported, in the case of an instantiation.

GCC suffers from the same issue, reported at [1], but the issue
is still unresolved there.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89088

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

llvm-svn: 359343

5 years ago[MinGW] Don't let template instantiation declarations cover nested classes
Martin Storsjo [Fri, 26 Apr 2019 19:31:39 +0000 (19:31 +0000)]
[MinGW] Don't let template instantiation declarations cover nested classes

An explicit template instantiation declaration used to let
callers assume both outer and nested classes instantiations were
defined in a different translation unit.

If the instantiation is marked dllexport, only the outer class
is exported, but the caller will try to reference the instantiation
of both outer and inner classes.

This makes MinGW mode match both MSVC and Windows Itanium, by
having instantations only cover the outer class, and locally emitting
definitions of the nested classes. Windows Itanium was changed to
use this behavious in SVN r300804.

This deviates from what GCC does, but should be safe (and only
inflate the object file size a bit, but MSVC and Windows Itanium
modes do the same), and fixes cases where inner classes aren't
dllexported.

This fixes missing references in combination with dllexported/imported
template intantiations.

GCC suffers from the same issue, reported at [1], but the issue
is still unresolved there. The issue can probably be solved either
by making dllexport cover all nested classes as well, or this
way (matching MSVC).

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89087

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

llvm-svn: 359342

5 years ago[OPENMP][NVPTX]Correctly handle L2 parallelism in SPMD mode.
Alexey Bataev [Fri, 26 Apr 2019 19:30:34 +0000 (19:30 +0000)]
[OPENMP][NVPTX]Correctly handle L2 parallelism in SPMD mode.

Summary:
The parallelLevel counter must be on per-thread basis to fully support
L2+ parallelism, otherwise we may end up with undefined behavior.
Introduce the parallelLevel on per-warp basis using shared memory. It
allows to avoid the problems with the synchronization and allows fully
support L2+ parallelism in SPMD mode with no runtime.

Reviewers: gtbercea, grokos

Subscribers: guansong, jdoerfert, caomhin, kkwli0, openmp-commits

Tags: #openmp

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

llvm-svn: 359341

5 years ago[OPENMP]Added check for non-random access types for the dependent loop
Alexey Bataev [Fri, 26 Apr 2019 19:28:37 +0000 (19:28 +0000)]
[OPENMP]Added check for non-random access types for the dependent loop
counters.

According to the OpenMP 5.0, For any associated loop where the b or lb
expression is not loop invariant with respect to the outermost loop, the
var-outer that appears in the expression may not have a random access
iterator type.

llvm-svn: 359340

5 years ago[Sanitizer][Windows] Speculative fix for broken build on Windows
Julian Lettner [Fri, 26 Apr 2019 19:06:55 +0000 (19:06 +0000)]
[Sanitizer][Windows] Speculative fix for broken build on Windows

llvm-svn: 359339

5 years ago[ASTImporter] Copy Argument Passing Restrictions setting when importing a CXXRecordDe...
Shafik Yaghmour [Fri, 26 Apr 2019 18:51:28 +0000 (18:51 +0000)]
[ASTImporter] Copy Argument Passing Restrictions setting when importing a CXXRecordDecl definition

Summary:
For a CXXRecordDecl the RecordDeclBits are stored in the DeclContext. Currently when we import the definition of a CXXRecordDecl via the ASTImporter we do not copy over this data.
This change will add support for copying the ArgPassingRestrictions from RecordDeclBits to fix an LLDB expression parsing bug where we would set it to not pass in registers.
Note, we did not copy over any other of the RecordDeclBits since we don't have tests for those. We know that copying over LoadedFieldsFromExternalStorage would be a error and that may be the case for others as well.

The companion LLDB review: https://reviews.llvm.org/D61146

Differential Review: https://reviews.llvm.org/D61140

llvm-svn: 359338

5 years ago[AsmPrinter] refactor to support %c w/ GlobalAddress'
Nick Desaulniers [Fri, 26 Apr 2019 18:45:04 +0000 (18:45 +0000)]
[AsmPrinter] refactor to support %c w/ GlobalAddress'

Summary:
Targets like ARM, MSP430, PPC, and SystemZ have complex behavior when
printing the address of a MachineOperand::MO_GlobalAddress. Move that
handling into a new overriden method in each base class. A virtual
method was added to the base class for handling the generic case.

Refactors a few subclasses to support the target independent %a, %c, and
%n.

The patch also contains small cleanups for AVRAsmPrinter and
SystemZAsmPrinter.

It seems that NVPTXTargetLowering is possibly missing some logic to
transform GlobalAddressSDNodes for
TargetLowering::LowerAsmOperandForConstraint to handle with "i" extended
inline assembly asm constraints.

Fixes:
- https://bugs.llvm.org/show_bug.cgi?id=41402
- https://github.com/ClangBuiltLinux/linux/issues/449

Reviewers: echristo, void

Reviewed By: void

Subscribers: void, craig.topper, jholewinski, dschuff, jyknight, dylanmckay, sdardis, nemanjai, javed.absar, sbc100, jgravelle-google, eraman, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, jrtc27, atanasyan, jsji, llvm-commits, kees, tpimh, nathanchance, peter.smith, srhines

Tags: #llvm

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

llvm-svn: 359337

5 years ago[Sanitizer] Fix test
Julian Lettner [Fri, 26 Apr 2019 18:39:02 +0000 (18:39 +0000)]
[Sanitizer] Fix test

I broke the build, panicked and applied the wrong fix in my previous
commit. The ASSERT was obsolete, but not the call INTERCEPT_FUNCTION.

llvm-svn: 359336

5 years ago[Sanitizer] Fix compliation error in test
Julian Lettner [Fri, 26 Apr 2019 18:27:35 +0000 (18:27 +0000)]
[Sanitizer] Fix compliation error in test

Remove obsolete assert. I missed this in my previous patch:
https://reviews.llvm.org/D61145

llvm-svn: 359335

5 years agoImplement __sanitizer::conditional<B, T, F>
Vitaly Buka [Fri, 26 Apr 2019 18:22:55 +0000 (18:22 +0000)]
Implement __sanitizer::conditional<B, T, F>

llvm-svn: 359334

5 years ago[sanitizer] NFC: add static_assert to confirm that we use optimal ByteMap type
Vitaly Buka [Fri, 26 Apr 2019 18:22:47 +0000 (18:22 +0000)]
[sanitizer] NFC: add static_assert to confirm that we use optimal ByteMap type

Summary: If bots work we can replace #ifs with template specialization by TwoLevelByteMapSize1.

Reviewers: eugenis

Subscribers: kubamracek, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 359333

5 years ago[X86][AVX] Fold extract_subvector(broadcast(x)) -> broadcast(x) iff x has one use
Simon Pilgrim [Fri, 26 Apr 2019 18:02:14 +0000 (18:02 +0000)]
[X86][AVX] Fold extract_subvector(broadcast(x)) -> broadcast(x) iff x has one use

llvm-svn: 359332

5 years ago[AArch64][GlobalISel] Select G_BSWAP for vectors of s32 and s64
Jessica Paquette [Fri, 26 Apr 2019 18:00:01 +0000 (18:00 +0000)]
[AArch64][GlobalISel] Select G_BSWAP for vectors of s32 and s64

There are instructions for these, so mark them as legal. Select the correct
instruction in AArch64InstructionSelector.cpp.

Update select-bswap.mir and arm64-rev.ll to reflect the changes.

llvm-svn: 359331

5 years ago[ScriptInterpreter] Pass the debugger instead of the command interpreter
Jonas Devlieghere [Fri, 26 Apr 2019 17:58:19 +0000 (17:58 +0000)]
[ScriptInterpreter] Pass the debugger instead of the command interpreter

As discussed in D61090, there's no good reason for the script
interpreter to depend on the command interpreter. When looking at the
code, it becomes clear that we mostly use the command interpreter as a
way to access the debugger. Hence, it makes more sense to just pass that
to the script interpreter directly.

This is part 1 out of 2. I have another patch in the pipeline that
changes the ownership of the script interpreter to the debugger as well,
but I didn't get around to finish that today.

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

llvm-svn: 359330

5 years agoFix typo in documentation.
Nick Lewycky [Fri, 26 Apr 2019 17:56:22 +0000 (17:56 +0000)]
Fix typo in documentation.

llvm-svn: 359329

5 years ago[AMDGPU] gfx1010 VOP3 and VOP3P implementation
Stanislav Mekhanoshin [Fri, 26 Apr 2019 17:56:03 +0000 (17:56 +0000)]
[AMDGPU] gfx1010 VOP3 and VOP3P implementation

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

llvm-svn: 359328

5 years agoRevert "[CMake] Fix the value of `config.target_cflags` for non-macOS Apple"
Dan Liew [Fri, 26 Apr 2019 17:53:25 +0000 (17:53 +0000)]
Revert "[CMake] Fix the value of `config.target_cflags` for non-macOS Apple"

This reverts commit 1bcdbd68616dc7f8debe126caafef7a7242a0e6b.

It's been reported that some bots are failing with this change with CMake
error like:

```
CMake Error at /b/s/w/ir/k/llvm-project/compiler-rt/cmake/config-ix.cmake:177 (message):
  Unsupported architecture: arm64
Call Stack (most recent call first):
  /b/s/w/ir/k/llvm-project/compiler-rt/cmake/config-ix.cmake:216 (get_target_flags_for_arch)
  /b/s/w/ir/k/llvm-project/compiler-rt/test/tsan/CMakeLists.txt:78 (get_test_cflags_for_apple_platform)
```

I'm reverting the patch now to unbreak builds. I will investigate properly when time permits.

rdar://problem/50124489

llvm-svn: 359327