platform/upstream/llvm.git
5 years ago[analyzer] Enable subcheckers to possess checker options
Kristof Umann [Mon, 4 Mar 2019 00:28:16 +0000 (00:28 +0000)]
[analyzer] Enable subcheckers to possess checker options

Under the term "subchecker", I mean checkers that do not have a checker class on
their own, like unix.MallocChecker to unix.DynamicMemoryModeling.

Since a checker object was required in order to retrieve checker options,
subcheckers couldn't possess options on their own.

This patch is also an excuse to change the argument order of getChecker*Option,
it always bothered me, now it resembles the actual command line argument
(checkername:option=value).

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

llvm-svn: 355297

5 years ago[WebAssembly] Delete ThrowUnwindDest map from WasmEHFuncInfo
Heejin Ahn [Sun, 3 Mar 2019 22:35:56 +0000 (22:35 +0000)]
[WebAssembly] Delete ThrowUnwindDest map from WasmEHFuncInfo

Summary:
Before when we implemented the first EH proposal, 'catch <tag>'
instruction may not catch an exception so there were multiple EH pads an
exception can unwind to. That means a BB could have multiple EH pad
successors.

Now after we switched to the new proposal, every 'catch' instruction
catches an exception, and there is only one catchpad per catchswitch, so
we at most have one EH pad successor, making `ThrowUnwindDest` map in
`WasmEHInfo` unnecessary.

Keeping `ThrowUnwindDest` map in `WasmEHInfo` has its own problems,
because other optimization passes can split a BB that contains possibly
throwing calls (previously invokes), and we have to update the map every
time that happens, which is not easy for common CodeGen passes.

This also correctly updates successor info in LateEHPrepare when we add
a rethrow instruction.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

Tags: #llvm

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

llvm-svn: 355296

5 years ago[X86] Regenerate test to get the full FP operands printed. NFC
Craig Topper [Sun, 3 Mar 2019 20:28:52 +0000 (20:28 +0000)]
[X86] Regenerate test to get the full FP operands printed. NFC

Missed when I updated the printer to print implicit %st operand on binops.

llvm-svn: 355295

5 years agoModules: Document that ReadASTCore exits its final loop via `return`, NFC
Duncan P. N. Exon Smith [Sun, 3 Mar 2019 20:17:53 +0000 (20:17 +0000)]
Modules: Document that ReadASTCore exits its final loop via `return`, NFC

The final loop never breaks.  Document that by following it with
llvm_unreachable.

llvm-svn: 355294

5 years ago[InstCombine] remove stale FIXME comment from test; NFC
Sanjay Patel [Sun, 3 Mar 2019 19:08:54 +0000 (19:08 +0000)]
[InstCombine] remove stale FIXME comment from test; NFC

llvm-svn: 355293

5 years ago[ValueTracking] do not try to peek through bitcasts in computeKnownBitsFromAssume()
Sanjay Patel [Sun, 3 Mar 2019 18:59:33 +0000 (18:59 +0000)]
[ValueTracking] do not try to peek through bitcasts in computeKnownBitsFromAssume()

There are no tests for this case, and I'm not sure how it could ever work,
so I'm just removing this option from the matcher. This should fix PR40940:
https://bugs.llvm.org/show_bug.cgi?id=40940

llvm-svn: 355292

5 years agoAdd extra ops in add to sub transform test in order to enforce proper operand orderin...
Amaury Sechet [Sun, 3 Mar 2019 15:11:13 +0000 (15:11 +0000)]
Add extra ops in add to sub transform test in order to enforce proper operand ordering. NFC

llvm-svn: 355291

5 years ago[DemandedBits] Remove some redundancy in the work list
Fangrui Song [Sun, 3 Mar 2019 14:50:01 +0000 (14:50 +0000)]
[DemandedBits] Remove some redundancy in the work list

InputIsKnownDead check is shared by all operands. Compute it once.

For non-integer instructions, use Visited.insert(I).second to replace a
find() and an insert().

llvm-svn: 355290

5 years agoRemove unused variable. NFCI.
Simon Pilgrim [Sun, 3 Mar 2019 14:23:07 +0000 (14:23 +0000)]
Remove unused variable. NFCI.

llvm-svn: 355289

5 years ago[X86] getShuffleScalarElt - peek through insert/extract subvector nodes.
Simon Pilgrim [Sun, 3 Mar 2019 14:11:05 +0000 (14:11 +0000)]
[X86] getShuffleScalarElt - peek through insert/extract subvector nodes.

llvm-svn: 355288

5 years ago[X86] Pull out combineToConsecutiveLoads helper. NFCI.
Simon Pilgrim [Sun, 3 Mar 2019 13:53:27 +0000 (13:53 +0000)]
[X86] Pull out combineToConsecutiveLoads helper. NFCI.

llvm-svn: 355287

5 years agoRemove large amount of empty lines mid-file. NFC
Kristina Brooks [Sun, 3 Mar 2019 13:21:38 +0000 (13:21 +0000)]
Remove large amount of empty lines mid-file. NFC

llvm-svn: 355286

5 years ago[lldb] [Process/gdb-remote] Use '127.0.0.1' in ConnectLocally()
Michal Gorny [Sun, 3 Mar 2019 12:42:43 +0000 (12:42 +0000)]
[lldb] [Process/gdb-remote] Use '127.0.0.1' in ConnectLocally()

Use '127.0.0.1' instead of 'localhost' in ConnectLocally() function
as this is the specific address the server is bound to.  Using
'localhost' may involve trying IPv6 first which may accidentally be used
by another service.

While technically it might be interesting to support IPv6 here, it would
need to be supported properly, with the connection copying family
and address from the listening socket, and possibly without relying
on existence of 'localhost' at all.

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

llvm-svn: 355285

5 years ago[DemandedBits] Optimize a find()+insert pattern with try_emplace and APInt::operator|=
Fangrui Song [Sun, 3 Mar 2019 11:12:57 +0000 (11:12 +0000)]
[DemandedBits] Optimize a find()+insert pattern with try_emplace and APInt::operator|=

llvm-svn: 355284

5 years ago[llvm] [Support] Reimplement getMainExecutable() using sysctl on NetBSD
Michal Gorny [Sun, 3 Mar 2019 10:06:40 +0000 (10:06 +0000)]
[llvm] [Support] Reimplement getMainExecutable() using sysctl on NetBSD

Use sysctl() to implement getMainExecutable() on NetBSD, rather than
trying to guess the correct path from argv[0].  This is one
of the fixes to recent clang-check-mac-libcxx-fixed-compilation-db.cpp
test failure on NetBSD.

This has been historically done on both FreeBSD and NetBSD in r303015,
and reverted in r303285 due to buggy implementation on FreeBSD.
However, FWIK the NetBSD implementation does not suffer from the same
bugs and is more reliable than playing with argv[0].

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

llvm-svn: 355283

5 years ago[clang] [ToolChains/NetBSD] Support relative libc++ header path
Michal Gorny [Sun, 3 Mar 2019 10:06:34 +0000 (10:06 +0000)]
[clang] [ToolChains/NetBSD] Support relative libc++ header path

Support locating the libc++ header files relatively to the clang
executable, in addition to the default system path.  This is meant
to cover two use cases: running just-built clang from the install
directory, and running installed clang from non-standard location
(e.g. /usr/local).

This is the first step towards ensuring that tests of more LLVM projects
can work out-of-the-box within the build tree, and use the correct set
of headers (rather than e.g. mixing just-built clang+libcxx with system
install of libcxx).  It avoids requiring the user to hack around missing
include paths, or LLVM build system to replicate system-specific C++
library defaults in order to append appropriate paths implicitly.

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

llvm-svn: 355282

5 years ago[X86] Prefer VPBLENDD for v2i64/v4i64 blends with AVX2.
Craig Topper [Sun, 3 Mar 2019 00:18:07 +0000 (00:18 +0000)]
[X86] Prefer VPBLENDD for v2i64/v4i64 blends with AVX2.

We were using VPBLENDW for v2i64 and VBLENDPD for v4i64. VPBLENDD has better throughput than VPBLENDW on some CPUs so it makes sense to use it when possible. VBLENDPD will probably become VBLENDD during execution domain fixing, but we might as well use integer in isel while we can.

This should work around some issues with the domain fixing pass prefering PBLENDW when we start with PBLENDW. There may still be some v8i16 cases that could use PBLENDD.

llvm-svn: 355281

5 years agoTweak r355278 for compatibility with gcc 6 and earlier.
James Y Knight [Sat, 2 Mar 2019 21:55:36 +0000 (21:55 +0000)]
Tweak r355278 for compatibility with gcc 6 and earlier.

llvm-svn: 355280

5 years agoTweak r355278 for compatibility with gcc 6 and earlier.
James Y Knight [Sat, 2 Mar 2019 21:20:30 +0000 (21:20 +0000)]
Tweak r355278 for compatibility with gcc 6 and earlier.

llvm-svn: 355279

5 years agoMake the new SanitizerMask code added in r355190 constexpr.
James Y Knight [Sat, 2 Mar 2019 20:22:48 +0000 (20:22 +0000)]
Make the new SanitizerMask code added in r355190 constexpr.

Then, as a consequence, remove the complex set of workarounds for
initialization order -- which are apparently not 100% reliable.

The only downside is that some of the member functions are now
specific to kNumElem == 2, and will need to be updated if that
constant is increased in the future.

Unfortunately, the current code caused an initialization-order runtime
failure for me in some compilation modes. It appears that in a
toolchain without init-array enabled, the order of initialization of
static data members of a template can be reversed w.r.t. the order
within a file.

This caused e.g. SanitizerKind::CFI to be initialized to 0.

I'm not quite sure if that is an allowable ordering variation, or
nonconforming behavior, but in any case, making everything constexpr
eliminates the possibility of such an issue.

llvm-svn: 355278

5 years agoAdd test case for add to sub transformation. NFC
Amaury Sechet [Sat, 2 Mar 2019 20:12:25 +0000 (20:12 +0000)]
Add test case for add to sub transformation. NFC

llvm-svn: 355277

5 years agoReinstate UNSUPPORTED: linux on stop-hook-threads.test
Pavel Labath [Sat, 2 Mar 2019 19:58:10 +0000 (19:58 +0000)]
Reinstate UNSUPPORTED: linux on stop-hook-threads.test

This stanza was removed in r355213, but it seems that patch did not
fully fix the problem, as the test still fails sporadically
(particularly under heavy load) on linux.

llvm-svn: 355276

5 years agogn build: Add a cfi/sources target.
Nico Weber [Sat, 2 Mar 2019 18:29:56 +0000 (18:29 +0000)]
gn build: Add a cfi/sources target.

This build target is currently unused, but after r355144 the sync script
started complaining about cfi.cpp not being listed, and this makes the
script happy again.

llvm-svn: 355275

5 years ago[lldb] [lit] Pass -pthread on NetBSD as well
Michal Gorny [Sat, 2 Mar 2019 16:48:44 +0000 (16:48 +0000)]
[lldb] [lit] Pass -pthread on NetBSD as well

llvm-svn: 355274

5 years ago[lldb] [lldbtest] Fix getBuildFlags() not to use libstdc++ on NetBSD
Michal Gorny [Sat, 2 Mar 2019 16:46:29 +0000 (16:46 +0000)]
[lldb] [lldbtest] Fix getBuildFlags() not to use libstdc++ on NetBSD

Remove the code forcing -stdlib=libstdc++ on NetBSD in getBuildFlags()
method.  NetBSD uses libc++ everywhere else, and using libstdc++ here
causes lang/cpp/dynamic-value to fail to build.

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

llvm-svn: 355273

5 years ago[InstCombine] move add after smin/smax
Sanjay Patel [Sat, 2 Mar 2019 16:45:10 +0000 (16:45 +0000)]
[InstCombine] move add after smin/smax

Follow-up to rL355221.
This isn't specifically called for within PR14613,
but we'll get there eventually if it's not already
requested in some other bug report.

https://rise4fun.com/Alive/5b0

  Name: smax
  Pre: WillNotOverflowSignedSub(C1,C0)
  %a = add nsw i8 %x, C0
  %cond = icmp sgt i8 %a, C1
  %r = select i1 %cond, i8 %a, i8 C1
  =>
  %c2 = icmp sgt i8 %x, C1-C0
  %u2 = select i1 %c2, i8 %x, i8 C1-C0
  %r = add nsw i8 %u2, C0

  Name: smin
  Pre: WillNotOverflowSignedSub(C1,C0)
  %a = add nsw i32 %x, C0
  %cond = icmp slt i32 %a, C1
  %r = select i1 %cond, i32 %a, i32 C1
  =>
  %c2 = icmp slt i32 %x, C1-C0
  %u2 = select i1 %c2, i32 %x, i32 C1-C0
  %r = add nsw i32 %u2, C0

llvm-svn: 355272

5 years ago[InstCombine] add tests for add+smin/smax; NFC
Sanjay Patel [Sat, 2 Mar 2019 16:45:05 +0000 (16:45 +0000)]
[InstCombine] add tests for add+smin/smax; NFC

llvm-svn: 355271

5 years agoFix gcc build for r355249
Pavel Labath [Sat, 2 Mar 2019 16:23:07 +0000 (16:23 +0000)]
Fix gcc build for r355249

automatic move should not fire when returning type T in a function with
result type Expected<T>. Some compilers seem to allow that nonetheless.

llvm-svn: 355270

5 years agoAdd test case for add to sub transformation. NFC
Amaury Sechet [Sat, 2 Mar 2019 14:28:59 +0000 (14:28 +0000)]
Add test case for add to sub transformation. NFC

llvm-svn: 355269

5 years agoFix update_mir_test_checks.py to run on python3
Simon Pilgrim [Sat, 2 Mar 2019 11:14:01 +0000 (11:14 +0000)]
Fix update_mir_test_checks.py to run on python3

Split off from D58817

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

llvm-svn: 355268

5 years agoUse SDValue::getConstantOperandAPInt helper where possible. NFCI.
Simon Pilgrim [Sat, 2 Mar 2019 11:11:22 +0000 (11:11 +0000)]
Use SDValue::getConstantOperandAPInt helper where possible. NFCI.

llvm-svn: 355267

5 years ago[clang-format] clang-format off/on not respected when using C Style comments
Paul Hoad [Sat, 2 Mar 2019 09:08:51 +0000 (09:08 +0000)]
[clang-format] clang-format off/on not respected when using C Style comments

Summary:
If the clang-format on/off is in a /* comment */ then the sorting of headers is not ignored

PR40901 - https://bugs.llvm.org/show_bug.cgi?id=40901

Reviewers: djasper, klimek, JonasToth, krasimir, alexfh

Reviewed By: alexfh

Subscribers: alexfh, cfe-commits, llvm-commits

Tags: #clang, #clang-tools-extra

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

llvm-svn: 355266

5 years ago[Transforms] fix typo in test case. NFC.
Xing GUO [Sat, 2 Mar 2019 08:32:32 +0000 (08:32 +0000)]
[Transforms] fix typo in test case. NFC.

llvm-svn: 355265

5 years ago[Codegen] fix typos in test case
Xing GUO [Sat, 2 Mar 2019 08:03:59 +0000 (08:03 +0000)]
[Codegen] fix typos in test case

llvm-svn: 355264

5 years ago[WebAssembly] Fix crash when __wasm_call_ctor is GCd in programs containing static...
Sam Clegg [Sat, 2 Mar 2019 04:55:02 +0000 (04:55 +0000)]
[WebAssembly] Fix crash when __wasm_call_ctor is GCd in programs containing static init/fini

Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

Tags: #llvm

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

llvm-svn: 355263

5 years ago[llvm-objdump] Should print unknown d_tag in hex format
Xing GUO [Sat, 2 Mar 2019 04:20:28 +0000 (04:20 +0000)]
[llvm-objdump] Should print unknown d_tag in hex format

Summary:
Currently, `llvm-objdump` prints "unknown" instead of d_tag value in hex format. Because getDynamicTagAsString returns "unknown" rather than empty
string.

Reviewers: grimar, jhenderson

Reviewed By: jhenderson

Subscribers: rupprecht, llvm-commits

Tags: #llvm

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

llvm-svn: 355262

5 years ago[WebAssembly] Expand operations not supported by SIMD
Thomas Lively [Sat, 2 Mar 2019 03:32:25 +0000 (03:32 +0000)]
[WebAssembly] Expand operations not supported by SIMD

Summary:
This prevents crashes in instruction selection when these operations
are used. The tests check that the scalar version of the instruction
is used where applicable, although some expansions do not use the
scalar version.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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

llvm-svn: 355261

5 years ago[X86] Improve use of SHLD/SHRD
Amaury Sechet [Sat, 2 Mar 2019 02:44:16 +0000 (02:44 +0000)]
[X86] Improve use of SHLD/SHRD

Summary:
This extends the variety of pattern that can generate a SHLD instead of using two shifts.

This fixes a regression that would be introduced by D57367 or D33587

Reviewers: RKSimon, craig.topper

Subscribers: llvm-commits

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

llvm-svn: 355260

5 years ago[SCEV] Handle case where MaxBECount is less precise than ExactBECount for OR.
Florian Hahn [Sat, 2 Mar 2019 02:31:44 +0000 (02:31 +0000)]
[SCEV] Handle case where MaxBECount is less precise than ExactBECount for OR.

In some cases, MaxBECount can be less precise than ExactBECount for AND
and OR (the AND case was PR26207). In the OR test case, both ExactBECounts are
undef, but MaxBECount are different, so we hit the assertion below. This
patch uses the same solution the AND case already uses.

Assertion failed:
   ((isa<SCEVCouldNotCompute>(ExactNotTaken) || !isa<SCEVCouldNotCompute>(MaxNotTaken))
     && "Exact is not allowed to be less precise than Max"), function ExitLimit

This patch also consolidates test cases for both AND and OR in a single
test case.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13245

Reviewers: sanjoy, efriedma, mkazantsev

Reviewed By: sanjoy

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

llvm-svn: 355259

5 years agoAdd test case for truncate funnel shifts. NFC
Amaury Sechet [Sat, 2 Mar 2019 02:24:36 +0000 (02:24 +0000)]
Add test case for truncate funnel shifts. NFC

llvm-svn: 355258

5 years ago[SCEV] Remove undef check for SCEVConstant (NFC)
Florian Hahn [Sat, 2 Mar 2019 01:57:28 +0000 (01:57 +0000)]
[SCEV] Remove undef check for SCEVConstant (NFC)

The value stored in SCEVConstant is of type ConstantInt*, which can
never be UndefValue. So we should never hit that code.

Reviewers: mkazantsev, sanjoy

Reviewed By: sanjoy

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

llvm-svn: 355257

5 years agoRevert "[sanitizer] Fix return type of __bzero and __aeabi_mem* interceptors."
Evgeniy Stepanov [Sat, 2 Mar 2019 01:33:52 +0000 (01:33 +0000)]
Revert "[sanitizer] Fix return type of __bzero and __aeabi_mem* interceptors."

Breaks TSan on Mac, which does
  return REAL(func)(...
in COMMON_INTERCEPTOR_ENTER, which is not OK when REAL(func) has return
type of void.

llvm-svn: 355256

5 years agoRevert "[DWARFFormValue] Cleanup DWARFFormValue interface. (2/2) (NFC)"
Vlad Tsyrklevich [Sat, 2 Mar 2019 01:10:00 +0000 (01:10 +0000)]
Revert "[DWARFFormValue] Cleanup DWARFFormValue interface. (2/2) (NFC)"

This reverts commit r355233, it was causing UBSan failures.

llvm-svn: 355255

5 years agoRevert "[WebAssembly][WIP] Expand operations not supported by SIMD"
Thomas Lively [Sat, 2 Mar 2019 00:55:16 +0000 (00:55 +0000)]
Revert "[WebAssembly][WIP] Expand operations not supported by SIMD"

This was accidentally committed without tests or review.

llvm-svn: 355254

5 years agolib/Header: Simplify CMakeLists.txt
Tom Stellard [Sat, 2 Mar 2019 00:50:13 +0000 (00:50 +0000)]
lib/Header: Simplify CMakeLists.txt

Summary:
Replace cut and pasted code with cmake macros and reduce the number of
install commands.  This fixes an issue where the headers were being
installed twice.

This clean up should also make future modifications easier, like
adding a cmake option to install header files into a custom resource
directory.

Reviewers: chandlerc, smeenai, mgorny, beanz, phosek

Reviewed By: smeenai

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 355253

5 years ago[ProfileData] Sort FuncData before iteration to remove non-determinism
Mandeep Singh Grang [Sat, 2 Mar 2019 00:47:43 +0000 (00:47 +0000)]
[ProfileData] Sort FuncData before iteration to remove non-determinism

Reviewers: rsmith, bogner, dblaikie

Reviewed By: dblaikie

Subscribers: Hahnfeld, jdoerfert, vsk, dblaikie, cfe-commits

Tags: #clang

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

llvm-svn: 355252

5 years agoRevert "Revert "[sanitizers] Don't use Windows Trace Logging on MinGW""
Vlad Tsyrklevich [Sat, 2 Mar 2019 00:46:54 +0000 (00:46 +0000)]
Revert "Revert "[sanitizers] Don't use Windows Trace Logging on MinGW""

This reverts my orignal revert in r355250, I misread the buildbot logs.
Volodymyr's commit in r355244 fixed the build.

llvm-svn: 355251

5 years agoRevert "[sanitizers] Don't use Windows Trace Logging on MinGW"
Vlad Tsyrklevich [Sat, 2 Mar 2019 00:39:36 +0000 (00:39 +0000)]
Revert "[sanitizers] Don't use Windows Trace Logging on MinGW"

This reverts commits r355236 and r355244, they broke the Linux sanitizer
build.

llvm-svn: 355250

5 years ago[Reproducers] Capture and replay interpreter commands.
Jonas Devlieghere [Sat, 2 Mar 2019 00:20:26 +0000 (00:20 +0000)]
[Reproducers] Capture and replay interpreter commands.

This patch adds the necessary logic to capture and replay commands
entered into the command interpreter. A DataRecorder shadows the input
and writes its data to a know file. During replay this file is used as
the command interpreter's input.

It's possible to the command interpreter more than once, with a
different input source. We support this scenario by using multiple
buffers. The synchronization for this takes place at the SB layer, where
we create a new recorder every time the debugger input is changed.
During replay we use the corresponding buffer as input.

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

llvm-svn: 355249

5 years ago[WebAssembly] Temporarily disable bulk-memory with -pthread
Thomas Lively [Sat, 2 Mar 2019 00:18:09 +0000 (00:18 +0000)]
[WebAssembly] Temporarily disable bulk-memory with -pthread

Summary:
To prevent the instability of bulk-memory in the wasm backend from
blocking separate pthread testing, temporarily remove the logic that
adds -mbulk-memory in the presence of -pthread. Since browsers will
ship bulk memory before or alongside threads, this change will be
reverted as soon as bulk memory has stabilized in the backend.

Reviewers: sbc100

Subscribers: dschuff, jgravelle-google, aheejin, sunfish, jfb, cfe-commits

Tags: #clang

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

llvm-svn: 355248

5 years ago[WebAssembly][WIP] Expand operations not supported by SIMD
Thomas Lively [Sat, 2 Mar 2019 00:18:07 +0000 (00:18 +0000)]
[WebAssembly][WIP] Expand operations not supported by SIMD

llvm-svn: 355247

5 years ago[llvm] Fix typo: 's/analsyis/analysis/' [NFC]
Mandeep Singh Grang [Sat, 2 Mar 2019 00:14:10 +0000 (00:14 +0000)]
[llvm] Fix typo: 's/analsyis/analysis/' [NFC]

llvm-svn: 355246

5 years ago[tblgen] Track CodeInit origins when possible
Daniel Sanders [Sat, 2 Mar 2019 00:12:57 +0000 (00:12 +0000)]
[tblgen] Track CodeInit origins when possible

Summary:
Add an SMLoc to CodeInit that records the source line it originated from.
This allows tablegen to point precisely at portions of code when reporting
errors within the CodeInit. For example, in the upcoming GlobalISel
combiner, it can report undefined expansions and point at the instance of
the expansion. This is achieved using something like:
  SMLoc::getFromPointer(SMLoc::getPointer() +
                        (StringRef - CodeInit::getValue()))

The location is lost when producing a CodeInit by string concatenation so
a fallback SMLoc is required (e.g. the Record::getLoc()) but that's pretty
rare for CodeInits.

There's a reasonable case for extending tracking of a couple other Init
objects, for example StringInit's are often parsed and it would be good to
point inside the string when reporting errors about that. However, location
tracking also harms de-duplication. This is fine for CodeInit where there's
only a few hundred of them (~160 for X86) and it may be worth it for
StringInit (~86k up to ~1.9M for roughly 15MB increase for X86).
However the origin tracking would be a _terrible_ idea for IntInit, BitInit,
and UnsetInit. I haven't measured either of those three but BitInit would
most likely be on the order of increasing the current 2 BitInit values up
to billions.

Reviewers: volkan, aditya_nandakumar, bogner, paquette, aemerson

Reviewed By: paquette

Subscribers: javed.absar, kristof.beyls, dexonsmith, llvm-commits, kristina

Tags: #llvm

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

llvm-svn: 355245

5 years ago[sanitizers] Fix build on macOS with LogFullErrorReport redefinition error.
Volodymyr Sapsai [Sat, 2 Mar 2019 00:05:04 +0000 (00:05 +0000)]
[sanitizers] Fix build on macOS with LogFullErrorReport redefinition error.

macOS has implementation of LogFullErrorReport and

    INLINE void LogFullErrorReport(const char *buffer) {}

was causing

> compiler-rt/lib/sanitizer_common/sanitizer_mac.cc:658:6: error: redefinition of 'LogFullErrorReport'

Fixup for r355236.

rdar://problem/48526020

llvm-svn: 355244

5 years agollvm-dwarfdump: Add new variable, parameter and inlining statistics; also function...
Caroline Tice [Fri, 1 Mar 2019 23:51:54 +0000 (23:51 +0000)]
llvm-dwarfdump: Add new variable, parameter and inlining statistics; also function source location statistics.

Add statistics for abstract origins, function, variable and parameter
locations; break the 'variable' counts down into variables and
parameters. Also update call site counting to check for
DW_AT_call_{file,line} in addition to DW_TAG_call_site.

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

llvm-svn: 355243

5 years ago[NFC][Sanitizer] Replace last uses of old Unwind API
Julian Lettner [Fri, 1 Mar 2019 23:50:47 +0000 (23:50 +0000)]
[NFC][Sanitizer] Replace last uses of old Unwind API

Replace remaining uses of old Unwind API in unit tests.

Allows us to remove the old API and WillUseFastUnwind can be made
private.

Reviewed By: vitalybuka

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

llvm-svn: 355242

5 years ago[libc++abi] Specify unwind lib before other system libraries when linking
Louis Dionne [Fri, 1 Mar 2019 22:55:15 +0000 (22:55 +0000)]
[libc++abi] Specify unwind lib before other system libraries when linking

This matters on OSX because static linking orders is also the order dyld
uses to search for libs (the default - Two-level namespace). If system
libs (including unwind lib) are specified before local unwind lib, local
unwind lib would never be picked up by dyld.

Before:
  $ otool -L lib/libc++abi.dylib
  @rpath/libc++abi.1.dylib (compatibility version 1.0.0, current version 1.0.0)
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
  @rpath/libunwind.1.dylib (compatibility version 1.0.0, current version 1.0.0)

After:
  $ otool -L lib/libc++abi.dylib
  @rpath/libc++abi.1.dylib (compatibility version 1.0.0, current version 1.0.0)
  @rpath/libunwind.1.dylib (compatibility version 1.0.0, current version 1.0.0)
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)

Thanks to Yuanfang Chen for the patch.
Differential Revision: https://reviews.llvm.org/D57496

llvm-svn: 355241

5 years ago[WebAssebmly] Allow __wasm_call_ctors to be GC'ed
Sam Clegg [Fri, 1 Mar 2019 22:35:47 +0000 (22:35 +0000)]
[WebAssebmly] Allow __wasm_call_ctors to be GC'ed

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

llvm-svn: 355240

5 years ago[NFC][Sanitizer] Test unexpectedly passes on ppc64be bot
Julian Lettner [Fri, 1 Mar 2019 22:35:40 +0000 (22:35 +0000)]
[NFC][Sanitizer] Test unexpectedly passes on ppc64be bot

llvm-svn: 355239

5 years agoDelete commented-out code.
Adrian Prantl [Fri, 1 Mar 2019 22:30:31 +0000 (22:30 +0000)]
Delete commented-out code.

llvm-svn: 355238

5 years ago[CMake] Don't use llvm_replace_compiler_option
Martin Storsjo [Fri, 1 Mar 2019 22:30:17 +0000 (22:30 +0000)]
[CMake] Don't use llvm_replace_compiler_option

Building compiler-rt standalone outside of the main llvm
tree is supported, and in this case, the llvm cmake modules
are unavailable. (And even if they are available, it requires
including LLVMProcessSources.cmake, which currently isn't
included.)

This fixes building compiler-rt standalone with MSVC/clang-cl.

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

llvm-svn: 355237

5 years ago[sanitizers] Don't use Windows Trace Logging on MinGW
Martin Storsjo [Fri, 1 Mar 2019 22:30:14 +0000 (22:30 +0000)]
[sanitizers] Don't use Windows Trace Logging on MinGW

mingw-w64 currently is lacking the headers for this feature.

Make the include lowercase at the same time. We consistently
use lowercase for windows header includes, as windows itself is
case insensitive, the SDK headers (in general, not necessarily
considering this particular header) aren't consistent among themselves
about what the proper canonical capitalization for headers are,
and MinGW uses all lowercase names for the headers (as it is often
used on case sensitive filesystems).

In case mingw-w64 later gets this header, we can revert this
(but keep the include lowercased).

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

llvm-svn: 355236

5 years agoTry to fix Windows bots after r355226.
Paul Robinson [Fri, 1 Mar 2019 22:28:13 +0000 (22:28 +0000)]
Try to fix Windows bots after r355226.

Windows has two path separator characters.

llvm-svn: 355235

5 years ago[NFC][Sanitizer][Windows] Fix refactoring oversight
Julian Lettner [Fri, 1 Mar 2019 22:26:45 +0000 (22:26 +0000)]
[NFC][Sanitizer][Windows] Fix refactoring oversight

Fix mistake in previous commit: 9fe3b4906f351292691cd594b30fe6cf7230b94d

llvm-svn: 355234

5 years ago[DWARFFormValue] Cleanup DWARFFormValue interface. (2/2) (NFC)
Jonas Devlieghere [Fri, 1 Mar 2019 22:14:24 +0000 (22:14 +0000)]
[DWARFFormValue] Cleanup DWARFFormValue interface. (2/2) (NFC)

Continues the work started in r354941. Changes (all but one) uses of the
extractValue to static createFromData.

llvm-svn: 355233

5 years ago[NFC][Sanitizer] Make GetStackTrace a private method of BufferedStackTrace
Julian Lettner [Fri, 1 Mar 2019 22:10:49 +0000 (22:10 +0000)]
[NFC][Sanitizer] Make GetStackTrace a private method of BufferedStackTrace

GetStackTrace is a implementation detail of BufferedStackTrace. Make it
a private method.

Reviewed By: vitalybuka

Differential-Revision: https://reviews.llvm.org/D58753
llvm-svn: 355232

5 years ago[sanitizer] Fix return type of __bzero and __aeabi_mem* interceptors.
Evgeniy Stepanov [Fri, 1 Mar 2019 21:59:18 +0000 (21:59 +0000)]
[sanitizer] Fix return type of __bzero and __aeabi_mem* interceptors.

llvm-svn: 355231

5 years agoRevert "[sanitizer] Fix return type of __bzero and __aeabi_mem* interceptors."
Evgeniy Stepanov [Fri, 1 Mar 2019 21:49:40 +0000 (21:49 +0000)]
Revert "[sanitizer] Fix return type of __bzero and __aeabi_mem* interceptors."

This change is incomplete.

llvm-svn: 355230

5 years ago[OPENMP] Deal with additional store inserted by Clang under -fno-PIC for PowerPC.
Stefan Pintilie [Fri, 1 Mar 2019 21:16:45 +0000 (21:16 +0000)]
[OPENMP] Deal with additional store inserted by Clang under -fno-PIC for PowerPC.

Changing the default from -fPIC to -fno-PIC on PowerPC exposed an issue in
OpenMP for PowerPC.
The issue is reported here:
https://bugs.llvm.org/show_bug.cgi?id=40082

This is a fix for that issue.
Also removed the XFAIL from the two tests that were failing under -fno-PIC.

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

llvm-svn: 355229

5 years ago[X86] Remove IntrArgMemOnly from target specific gather/scatter intrinsics
Craig Topper [Fri, 1 Mar 2019 21:02:40 +0000 (21:02 +0000)]
[X86] Remove IntrArgMemOnly from target specific gather/scatter intrinsics

IntrArgMemOnly implies that only memory pointed to by pointer typed arguments will be accessed. But these intrinsics allow you to pass null to the pointer argument and put the full address into the index argument. Other passes won't be able to understand this.

A colleague found that ISPC was creating gathers like this and then dead store elimination removed some stores because it didn't understand what the gather was doing since the pointer argument was null.

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

llvm-svn: 355228

5 years ago[X86] Add test case for D58805. NFC
Craig Topper [Fri, 1 Mar 2019 21:02:34 +0000 (21:02 +0000)]
[X86] Add test case for D58805. NFC

This demonstrates dead store elimination removing a store that may alias a gather that uses null as its base.

llvm-svn: 355227

5 years ago[DWARF] Make -g with empty assembler source work better.
Paul Robinson [Fri, 1 Mar 2019 20:58:04 +0000 (20:58 +0000)]
[DWARF] Make -g with empty assembler source work better.

This was sometimes causing clang or llvm-mc to crash, and in other
cases could emit a bogus DWARF line-table header. I did an interim
patch in r352541; this patch should be a cleaner and more complete
fix, and retains the test.

Addresses PR40538.

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

llvm-svn: 355226

5 years ago[sanitizer] Fix return type of __bzero and __aeabi_mem* interceptors.
Evgeniy Stepanov [Fri, 1 Mar 2019 20:54:16 +0000 (20:54 +0000)]
[sanitizer] Fix return type of __bzero and __aeabi_mem* interceptors.

They return void, unlike memset/memcpy/memmove.

llvm-svn: 355225

5 years ago[TableGen][SelectionDAG][X86] Add specific isel matchers for immAllZerosV/immAllOnesV...
Craig Topper [Fri, 1 Mar 2019 20:18:38 +0000 (20:18 +0000)]
[TableGen][SelectionDAG][X86] Add specific isel matchers for immAllZerosV/immAllOnesV. Remove bitcasts from X86 patterns that are no longer necessary.

Previously we had build_vector PatFrags that called ISD::isBuildVectorAllZeros/Ones. Internally the ISD::isBuildVectorAllZeros/Ones look through bitcasts, but we aren't able to take advantage of that in isel. Instead of we have to canonicalize the types of the all zeros/ones build_vectors and insert bitcasts. Then we have to pattern match those exact bitcasts.

By emitting specific matchers for these 2 nodes, we can make isel look through any bitcasts without needing to explicitly match them. We should also be able to remove the canonicalization to vXi32 from lowering, but I've left that for a follow up.

This removes something like 40,000 bytes from the X86 isel table.

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

llvm-svn: 355224

5 years ago[ValueTracking] Known bits support for unsigned saturating add/sub
Nikita Popov [Fri, 1 Mar 2019 20:07:04 +0000 (20:07 +0000)]
[ValueTracking] Known bits support for unsigned saturating add/sub

We have two sources of known bits:

1. For adds leading ones of either operand are preserved. For sub
leading zeros of LHS and leading ones of RHS become leading zeros in
the result.

2. The saturating math is a select between add/sub and an all-ones/
zero value. As such we can carry out the add/sub known bits
calculation, and only preseve the known one/zero bits respectively.

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

llvm-svn: 355223

5 years ago[InstCombine] Extend saturating idempotent atomicrmw transform to FP
Philip Reames [Fri, 1 Mar 2019 19:50:36 +0000 (19:50 +0000)]
[InstCombine] Extend saturating idempotent atomicrmw transform to FP

I'm assuming that the nan propogation logic for InstructonSimplify's handling of fadd and fsub is correct, and applying the same to atomicrmw.

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

llvm-svn: 355222

5 years ago[InstCombine] move add after umin/umax
Sanjay Patel [Fri, 1 Mar 2019 19:42:40 +0000 (19:42 +0000)]
[InstCombine] move add after umin/umax

In the motivating cases from PR14613:
https://bugs.llvm.org/show_bug.cgi?id=14613
...moving the add enables us to narrow the
min/max which eliminates zext/trunc which
enables signficantly better vectorization.
But that bug is still not completely fixed.

https://rise4fun.com/Alive/5KQ

  Name: umax
  Pre: C1 u>= C0
  %a = add nuw i8 %x, C0
  %cond = icmp ugt i8 %a, C1
  %r = select i1 %cond, i8 %a, i8 C1
  =>
  %c2 = icmp ugt i8 %x, C1-C0
  %u2 = select i1 %c2, i8 %x, i8 C1-C0
  %r = add nuw i8 %u2, C0

  Name: umin
  Pre: C1 u>= C0
  %a = add nuw i32 %x, C0
  %cond = icmp ult i32 %a, C1
  %r = select i1 %cond, i32 %a, i32 C1
  =>
  %c2 = icmp ult i32 %x, C1-C0
  %u2 = select i1 %c2, i32 %x, i32 C1-C0
  %r = add nuw i32 %u2, C0

llvm-svn: 355221

5 years ago[InstCombine] add tests for umin/umax narrowing (PR14613); NFC
Sanjay Patel [Fri, 1 Mar 2019 19:42:34 +0000 (19:42 +0000)]
[InstCombine] add tests for umin/umax narrowing (PR14613); NFC

llvm-svn: 355220

5 years agoRevert "[MIPS GlobalISel] Fix mul operands"
Vlad Tsyrklevich [Fri, 1 Mar 2019 18:58:22 +0000 (18:58 +0000)]
Revert "[MIPS GlobalISel] Fix mul operands"

This reverts commit r355178, it is causing ASan failures on the
sanitizer bots.

llvm-svn: 355219

5 years agoELF: Change FileSize back to a uint64_t.
Peter Collingbourne [Fri, 1 Mar 2019 18:53:41 +0000 (18:53 +0000)]
ELF: Change FileSize back to a uint64_t.

This lets us detect file size overflows when creating a 64-bit binary on
a 32-bit machine.

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

llvm-svn: 355218

5 years ago[LICM] Infer proper alignment from loads during scalar promotion
Philip Reames [Fri, 1 Mar 2019 18:45:05 +0000 (18:45 +0000)]
[LICM] Infer proper alignment from loads during scalar promotion

This patch fixes an issue where we would compute an unnecessarily small alignment during scalar promotion when no store is not to be guaranteed to execute, but we've proven load speculation safety. Since speculating a load requires proving the existing alignment is valid at the new location (see Loads.cpp), we can use the alignment fact from the load.

For non-atomics, this is a performance problem. For atomics, this is a correctness issue, though an *incredibly* rare one to see in practice. For atomics, we might not be able to lower an improperly aligned load or store (i.e. i32 align 1). If such an instruction makes it all the way to codegen, we *may* fail to codegen the operation, or we may simply generate a slow call to a library function. The part that makes this super hard to see in practice is that the memory location actually *is* well aligned, and instcombine knows that. So, to see a failure, you have to have a) hit the bug in LICM, b) somehow hit a depth limit in InstCombine/ValueTracking to avoid fixing the alignment, and c) then have generated an instruction which fails codegen rather than simply emitting a slow libcall. All around, pretty hard to hit.

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

llvm-svn: 355217

5 years ago[PGO] Remove the default parameter in ProfileSummary API. NFC
Rong Xu [Fri, 1 Mar 2019 18:36:24 +0000 (18:36 +0000)]
[PGO] Remove the default parameter in ProfileSummary API. NFC

Remove the default parameter in setProfileSummary() and getSummary().
This is a follow-up of r355131.

llvm-svn: 355216

5 years ago[Tests] More missing atomicrmw combines
Philip Reames [Fri, 1 Mar 2019 18:24:05 +0000 (18:24 +0000)]
[Tests] More missing atomicrmw combines

llvm-svn: 355215

5 years ago[msan] Add an interceptor for ttyname().
Evgeniy Stepanov [Fri, 1 Mar 2019 18:22:44 +0000 (18:22 +0000)]
[msan] Add an interceptor for ttyname().

llvm-svn: 355214

5 years agoResubmit r354706 with a fix for process launch.
Jim Ingham [Fri, 1 Mar 2019 18:13:38 +0000 (18:13 +0000)]
Resubmit r354706 with a fix for process launch.

When the debugger is run in sync mode, you need to
be able to tell whether a hijacked resume is for some
special purpose (like waiting for the SIGSTOP on attach)
or just to perform a synchronous resume.  Target::Launch was doing
that wrong, and that caused stop-hooks on process launch
in source files to behave incorrectly.

<rdar://problem/48115661>

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

llvm-svn: 355213

5 years ago[Tests] Add tests for missed optimizations of saturating and idempotent FP atomicrmws
Philip Reames [Fri, 1 Mar 2019 18:10:37 +0000 (18:10 +0000)]
[Tests] Add tests for missed optimizations of saturating and idempotent FP atomicrmws

llvm-svn: 355212

5 years ago[lld][test] Fix tests. llvm-readobj now emits symbol section names.
Matt Davis [Fri, 1 Mar 2019 18:01:41 +0000 (18:01 +0000)]
[lld][test] Fix tests. llvm-readobj now emits symbol section names.

This is the result of patch 99e9c4cad08164b9c0ca565ab9ad48ce132e98e5
See the related patch https://reviews.llvm.org/D58796

llvm-svn: 355211

5 years ago[InstCombine] Extend "idempotent" atomicrmw optimizations to floating point
Philip Reames [Fri, 1 Mar 2019 18:00:07 +0000 (18:00 +0000)]
[InstCombine] Extend "idempotent" atomicrmw optimizations to floating point

An idempotent atomicrmw is one that does not change memory in the process of execution.  We have already added handling for the various integer operations; this patch extends the same handling to floating point operations which were recently added to IR.

Note: At the moment, we canonicalize idempotent fsub to fadd when ordering requirements prevent us from using a load.  As discussed in the review, I will be replacing this with canonicalizing both floating point ops to integer ops in the near future.

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

llvm-svn: 355210

5 years ago[PGO] Use the explicit parameter in ProfileSummary API. NFC
Rong Xu [Fri, 1 Mar 2019 17:50:20 +0000 (17:50 +0000)]
[PGO] Use the explicit parameter in ProfileSummary API. NFC

Use the explicit parameter in setProfileSummary() and getSummary().
This is a follow-up of r355131.

llvm-svn: 355209

5 years agoRevert "[WebAssembly] Lower SIMD shifts since they are fixed in V8"
Thomas Lively [Fri, 1 Mar 2019 17:43:55 +0000 (17:43 +0000)]
Revert "[WebAssembly] Lower SIMD shifts since they are fixed in V8"

They weren't fixed in V8. Oops.

llvm-svn: 355208

5 years ago[llvm-readobj] Display section names for STT_SECTION symbols.
Matt Davis [Fri, 1 Mar 2019 17:31:32 +0000 (17:31 +0000)]
[llvm-readobj] Display section names for STT_SECTION symbols.

Summary:
This patch will obtain the section name for symbols that refer to a section.  Prior to this patch the Name field for STT_SECTIONs was blank, now it is populated.

Before:
```
Symbol table '.symtab' contains 6 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 0000000000000000     0 SECTION LOCAL  DEFAULT    1
     2: 0000000000000000     0 SECTION LOCAL  DEFAULT    3
     3: 0000000000000000     0 SECTION LOCAL  DEFAULT    4
     4: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _GLOBAL_OFFSET_TABLE_
     5: 0000000000000000     0 TLS     GLOBAL DEFAULT  UND sym
```

With this patch:
```
Symbol table '.symtab' contains 6 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 0000000000000000     0 SECTION LOCAL  DEFAULT    1 .text
     2: 0000000000000000     0 SECTION LOCAL  DEFAULT    3 .data
     3: 0000000000000000     0 SECTION LOCAL  DEFAULT    4 .bss
     4: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _GLOBAL_OFFSET_TABLE_
     5: 0000000000000000     0 TLS     GLOBAL DEFAULT  UND sym
```

This fixes PR40788

Reviewers: jhenderson, rupprecht, espindola

Reviewed By: rupprecht

Subscribers: emaste, javed.absar, arichardson, MaskRay, llvm-commits

Tags: #llvm

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

llvm-svn: 355207

5 years ago[InstCombine] add tests for add+umin/umax canonicalization; NFC
Sanjay Patel [Fri, 1 Mar 2019 17:29:10 +0000 (17:29 +0000)]
[InstCombine] add tests for add+umin/umax canonicalization; NFC

Fixing this should solve the biggest part of the vector problems seen in:
https://bugs.llvm.org/show_bug.cgi?id=14613

llvm-svn: 355206

5 years agoHide two unused debugging methods, NFCI.
Jonas Hahnfeld [Fri, 1 Mar 2019 17:15:21 +0000 (17:15 +0000)]
Hide two unused debugging methods, NFCI.

GCC correctly moans that PlainCFGBuilder::isExternalDef(llvm::Value*) and
StackSafetyDataFlowAnalysis::verifyFixedPoint() are defined but not used
in Release builds. Hide them behind 'ifndef NDEBUG'.

llvm-svn: 355205

5 years agoReland "[compiler-rt] Intercept the bcmp() function."
Clement Courbet [Fri, 1 Mar 2019 16:42:08 +0000 (16:42 +0000)]
Reland "[compiler-rt] Intercept the bcmp() function."

Fix test issues on darwin: The REQUIRES for the test should be the same as the
guard for whether we intercept bcmp.

llvm-svn: 355204

5 years ago[scudo][standalone] Fix tests makefile
Kostya Kortchinsky [Fri, 1 Mar 2019 15:46:23 +0000 (15:46 +0000)]
[scudo][standalone] Fix tests makefile

Summary:
A missing `STATIC` entailed some annoying to debug failures wrt 32 vs 64
binaries. Additionally I noticed I was using the wrong variable (the Scudo
one as opposed to the Scudo Standalone one).

See https://reviews.llvm.org/D58184#1412417 and below for discussion.

Reviewers: vitalybuka, eugenis, brzycki

Reviewed By: vitalybuka, brzycki

Subscribers: mgorny, delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 355203

5 years agoTry to fix NetBSD buildbot breakage introduced in D57463.
Manman Ren [Fri, 1 Mar 2019 15:25:24 +0000 (15:25 +0000)]
Try to fix NetBSD buildbot breakage introduced in D57463.

By including the header file in the source.

llvm-svn: 355202

5 years ago[ARM] Fix FP16 stack loads/stores for Thumb2 with frame pointer
Oliver Stannard [Fri, 1 Mar 2019 14:20:28 +0000 (14:20 +0000)]
[ARM] Fix FP16 stack loads/stores for Thumb2 with frame pointer

The new addressing mode added for the v8.2A FP16 instructions uses bit 8 of the
immediate to encode the sign of the offset, like the other FP loads/stores, so
need to be treated the same way.

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

llvm-svn: 355201

5 years ago[clangd] Enable SuggestMissingIncludes by default.
Eric Liu [Fri, 1 Mar 2019 14:17:55 +0000 (14:17 +0000)]
[clangd] Enable SuggestMissingIncludes by default.

Summary: This seems to work stably now. Turn on by default.

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 355200

5 years ago[ARM] Consider undefined-on-NaN conditions in checkVSELConstraints
Oliver Stannard [Fri, 1 Mar 2019 13:58:25 +0000 (13:58 +0000)]
[ARM] Consider undefined-on-NaN conditions in checkVSELConstraints

This function was not checking for the condition code variants which are
undefined if either input is NaN, so we were missing selection of the VSEL
instruction in some cases when using -fno-honor-nans or -ffast-math.

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

llvm-svn: 355199

5 years ago[X86] Regenerate legalize test files
Simon Pilgrim [Fri, 1 Mar 2019 13:13:40 +0000 (13:13 +0000)]
[X86] Regenerate legalize test files

Noticed while getting update_mir_test_checks.py to work on python3

llvm-svn: 355198