platform/upstream/llvm.git
6 years ago[OPENMP] Codegen for ctor|dtor of declare target variables.
Alexey Bataev [Wed, 28 Mar 2018 14:28:54 +0000 (14:28 +0000)]
[OPENMP] Codegen for ctor|dtor of declare target variables.

When the declare target variables are emitted for the device,
constructors|destructors for these variables must emitted and registered
by the runtime in the offloading sections.

llvm-svn: 328705

6 years ago[AMDGPU][MC][GFX9] Added s_scratch* instructions
Dmitry Preobrazhensky [Wed, 28 Mar 2018 14:08:03 +0000 (14:08 +0000)]
[AMDGPU][MC][GFX9] Added s_scratch* instructions

See bug 36836: https://bugs.llvm.org/show_bug.cgi?id=36836

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

Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 328704

6 years agoRevert "[lit] Temporarily disable shtest-timeout.py on darwin"
Dan Liew [Wed, 28 Mar 2018 13:55:13 +0000 (13:55 +0000)]
Revert "[lit] Temporarily disable shtest-timeout.py on darwin"

This reverts commit 771829b640a5494ab65c810dd6b4330522bf3a33 (rr328598)

Hopefully the test will now pass on the bots.

rdar://problem/38774530

llvm-svn: 328703

6 years ago[lit] Remove a timing senstive part of `shtest-timeout.py`
Dan Liew [Wed, 28 Mar 2018 13:55:08 +0000 (13:55 +0000)]
[lit] Remove a timing senstive part of `shtest-timeout.py`

The `shtest-timeout.py` test was failing intermittently. It looks like
the issue is that on a resource constrained system lit is unable to run
`quick_then_slow.py` twice and print out the messages the tests expects
within the one second timeout.

The underlying issue is that the test is dependent on the performance of
the host machine is a rather fragile way. This is due to hardcoding
timeout values and having assumptions that the host machine is able to
perform a certain amount of work within the hardcoded timeout values.

We could increase the timeout values but that doesn't really fix the
underlying issue. Instead this patch removes one of fragile assumptions
in the hope that this will be enough to fix the bots.
There are other fragile assumptions in this test (e.g. `quick.py` can be
executed in less than 1 second). If the bots continue to fail we'll have
to revisit this.

rdar://problem/38774530

llvm-svn: 328702

6 years ago[X86][Btver2] Moved JWriteFCmp/JWriteFCmpY classes next to each other. NFCI
Simon Pilgrim [Wed, 28 Mar 2018 13:53:21 +0000 (13:53 +0000)]
[X86][Btver2] Moved JWriteFCmp/JWriteFCmpY classes next to each other. NFCI

Renamed JWriteFPAY22 to JWriteFCmpY - we've tended to avoid latency based names

llvm-svn: 328701

6 years ago[WebAssembly] Name Config members after commandline argument. NFC
Nicholas Wilson [Wed, 28 Mar 2018 12:53:29 +0000 (12:53 +0000)]
[WebAssembly] Name Config members after commandline argument. NFC

This addresses a late review comment from D44427/rLLD328643

llvm-svn: 328700

6 years agoRevert "Reapply "[DWARFv5] Emit file 0 to the line table.""
Alexander Potapenko [Wed, 28 Mar 2018 12:36:46 +0000 (12:36 +0000)]
Revert "Reapply "[DWARFv5] Emit file 0 to the line table.""

This reverts commit r328676.

Commit r328676 broke the -no-integrated-as flag necessary to build Linux kernel with Clang:

$ cat t.c
void foo() {}
$ clang -no-integrated-as   -c  t.c -g
/tmp/t-dcdec5.s: Assembler messages:
/tmp/t-dcdec5.s:8: Error: file number less than one
clang-7.0: error: assembler command failed with exit code 1 (use -v to see invocation)

llvm-svn: 328699

6 years ago[X86][BtVer2] Fix the number of micro opcodes for AES[ENC|DEC] and other YMM instruct...
Andrea Di Biagio [Wed, 28 Mar 2018 12:12:04 +0000 (12:12 +0000)]
[X86][BtVer2] Fix the number of micro opcodes for AES[ENC|DEC] and other YMM instructions.

Similar to r328694. The number of micro opcodes should be 2 for those
instructions.

This was found when testing AVX code for BtVer2 using llvm-mca.

llvm-svn: 328698

6 years ago[MSan] Introduce ActualFnStart. NFC
Alexander Potapenko [Wed, 28 Mar 2018 11:35:09 +0000 (11:35 +0000)]
[MSan] Introduce ActualFnStart. NFC

This is a step towards the upcoming KMSAN implementation patch.
KMSAN is going to prepend a special basic block containing
tool-specific calls to each function. Because we still want to
instrument the original entry block, we'll need to store it in
ActualFnStart.

For MSan this will still be F.getEntryBlock(), whereas for KMSAN
it'll contain the second BB.

llvm-svn: 328697

6 years ago[ELF] - Linkerscript: support MIN and MAX.
George Rimar [Wed, 28 Mar 2018 11:33:00 +0000 (11:33 +0000)]
[ELF] - Linkerscript: support MIN and MAX.

Sample for the OVERLAY command from the spec
(https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/sections.html)
uses MAX command that we do not support currently:

. = 0x1000 + MAX (SIZEOF (.text0), SIZEOF (.text1));

This patch implements support for MIN and MAX.

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

llvm-svn: 328696

6 years agoRevert "[AMDGPU] For OS type AMDPAL, fixed scratch on compute shader"
Tim Renouf [Wed, 28 Mar 2018 11:21:07 +0000 (11:21 +0000)]
Revert "[AMDGPU] For OS type AMDPAL, fixed scratch on compute shader"

This reverts commit 0daf86291d3aa04d3cc280cd0ef24abdb0174981.

It was causing an assert in test/CodeGen/AMDGPU/amdpal.ll only on a
release-with-asserts build. I will resubmit the change when I have fixed
that.

Change-Id: If270594eba27a7dc4076bdeab3fa8e6bfda3288a
llvm-svn: 328695

6 years ago[X86][BtVer2] Fix the number of micro opcodes for a bunch of YMM instructions.
Andrea Di Biagio [Wed, 28 Mar 2018 10:49:33 +0000 (10:49 +0000)]
[X86][BtVer2] Fix the number of micro opcodes for a bunch of YMM instructions.

The Jaguar backend natively supports 128-bit data types. Operations on YMM
registers are split into two COPs (complex operations). Each COP consumes a slot
in the dispatch group, and in the reorder buffer.

The scheduling model for Jaguar should mark those instructions as `let
NumMicroOps = 2`.

This was found when testing AVX code for BtVer2 using llvm-mca.

llvm-svn: 328694

6 years agogdb-remote: Fix checksum verification for messages with escape chars
Pavel Labath [Wed, 28 Mar 2018 10:19:10 +0000 (10:19 +0000)]
gdb-remote: Fix checksum verification for messages with escape chars

Summary:
We've had a mismatch in the checksum computation between the sender and
receiver. The sender computed the payload checksum using the wire
encoding of the packet, while the receiver did this after expanding
un-escaping and expanding run-length-encoded sequences. This resulted in
communication breakdown if packets using these feature were sent in the
ack mode.

Normally, this did not cause any issues since the only packet we send in
the ack-mode is the QStartNoAckMode packet, but I ran into this when
debugging the lldb-server tests which (for better or worse) don't use
this mode.

According to the gdb-remote documentation "The two-digit checksum is computed as
the modulo 256 sum of all characters between the leading ‘$’ and the
trailing ‘#’", it seems that our sender is doing the right thing here.
Therefore, I fix the receiver the match the sender behavior and add a
test.

With this bug fixed, we can see that lldb-server is sending a stop-reply
after receiving the "k" in the same way as debugserver does (but we
weren't detecting this because at that point the connection was dead
already). I fix that expectation as well.

Reviewers: clayborg, jasonmolenda

Subscribers: mgorny, lldb-commits

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

llvm-svn: 328693

6 years ago[MSan] Add an isStore argument to getShadowOriginPtr(). NFC
Alexander Potapenko [Wed, 28 Mar 2018 10:17:17 +0000 (10:17 +0000)]
[MSan] Add an isStore argument to getShadowOriginPtr(). NFC

This is a step towards the upcoming KMSAN implementation patch.
The isStore argument is to be used by getShadowOriginPtrKernel(),
it is ignored by getShadowOriginPtrUserspace().

Depending on whether a memory access is a load or a store, KMSAN
instruments it with different functions, __msan_metadata_ptr_for_load_X()
and __msan_metadata_ptr_for_store_X().

Those functions may return different values for a single address,
which is necessary in the case the runtime library decides to ignore
particular accesses.

llvm-svn: 328692

6 years ago[ARM] Support float literals under XO
Christof Douma [Wed, 28 Mar 2018 10:02:26 +0000 (10:02 +0000)]
[ARM] Support float literals under XO

Follow up patch of r328313 to support the UseVMOVSR constraint. Removed
some unneeded instructions from the test and removed some stray
comments.

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

llvm-svn: 328691

6 years ago[PATCH] [RISCV] Verify the input value of -march=
Shiva Chen [Wed, 28 Mar 2018 08:29:50 +0000 (08:29 +0000)]
[PATCH] [RISCV] Verify the input value of -march=

Summary:
This patch doing more check and verify the -march= string and will issue
an error if it's a invalid combination.

Reviewers: asb, apazos

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

Patch by Kito Cheng.

llvm-svn: 328690

6 years ago[RegisterCoalescing] Don't move COPY if it would interfere with another value
Mikael Holmen [Wed, 28 Mar 2018 06:01:30 +0000 (06:01 +0000)]
[RegisterCoalescing] Don't move COPY if it would interfere with another value

Summary:
RegisterCoalescer::removePartialRedundancy tries to hoist B = A from
BB0/BB2 to BB1:

  BB1:
       ...
  BB0/BB2:  ----
       B = A;   |
       ...      |
       A = B;   |
         |-------
         |

It does so if a number of conditions are fulfilled. However, it failed
to check if B was used by any of the terminators in BB1. Since we must
insert B = A before the terminators (since it's not a terminator itself),
this means that we could erroneously insert a new definition of B before a
use of it.

Reviewers: wmi, qcolombet

Reviewed By: wmi

Subscribers: MatzeB, llvm-commits, sdardis

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

llvm-svn: 328689

6 years agoFix some handling of AST nodes with diagnostics.
Richard Trieu [Wed, 28 Mar 2018 04:16:13 +0000 (04:16 +0000)]
Fix some handling of AST nodes with diagnostics.

The diagnostic system for Clang can already handle many AST nodes.  Instead
of converting them to strings first, just hand the AST node directly to
the diagnostic system and let it handle the output.  Minor changes in some
diagnostic output.

llvm-svn: 328688

6 years ago[ORC] Fix ORC on platforms without indirection support.
Lang Hames [Wed, 28 Mar 2018 03:41:45 +0000 (03:41 +0000)]
[ORC] Fix ORC on platforms without indirection support.

Previously this crashed because a nullptr (returned by
createLocalIndirectStubsManagerBuilder() on platforms without
indirection support) functor was unconditionally invoked.

Patch by Andres Freund. Thanks Andres!

llvm-svn: 328687

6 years agoInitialize OffsetMap in a known location.
Rafael Espindola [Wed, 28 Mar 2018 03:20:18 +0000 (03:20 +0000)]
Initialize OffsetMap in a known location.

This is a small optimization and avoids the need to use call_once.

llvm-svn: 328686

6 years agoDefine a trivial method inline.
Rafael Espindola [Wed, 28 Mar 2018 03:14:11 +0000 (03:14 +0000)]
Define a trivial method inline.

llvm-svn: 328685

6 years agoStore live offsets as uint32_t.
Rafael Espindola [Wed, 28 Mar 2018 02:32:31 +0000 (02:32 +0000)]
Store live offsets as uint32_t.

We don't support input merge sections larger than 4gb, so these can be
uint32_t.

llvm-svn: 328684

6 years ago[AArch64] add ftrunc tests; NFC
Sanjay Patel [Wed, 28 Mar 2018 00:56:00 +0000 (00:56 +0000)]
[AArch64] add ftrunc tests; NFC

As suggested in D44909.

llvm-svn: 328683

6 years ago[PowerPC] add ftrunc vector tests; NFC
Sanjay Patel [Wed, 28 Mar 2018 00:49:12 +0000 (00:49 +0000)]
[PowerPC] add ftrunc vector tests; NFC

Baseline tests for vectors as suggested in D44909.

llvm-svn: 328682

6 years ago[asan] Add vfork to the list of reasons for stack errors.
Evgeniy Stepanov [Wed, 28 Mar 2018 00:45:20 +0000 (00:45 +0000)]
[asan] Add vfork to the list of reasons for stack errors.

Until we figure out what to do with it, vfork can cause stack-based
false positives.

llvm-svn: 328681

6 years ago[ObjC] Make C++ triviality type traits available to non-trivial C
Akira Hatanaka [Wed, 28 Mar 2018 00:12:08 +0000 (00:12 +0000)]
[ObjC] Make C++ triviality type traits available to non-trivial C
structs.

r326307 and r327870 made changes that allowed using non-trivial C
structs with fields qualified with __strong or __weak. This commit makes
the following C++ triviality type traits available to non-trivial C
structs:

__has_trivial_assign
__has_trivial_move_assign
__has_trivial_copy
__has_trivial_move_constructor
__has_trivial_constructor
__has_trivial_destructor

rdar://problem/33599681

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

llvm-svn: 328680

6 years ago[ELF] Fix offsets in comment of tls-got.s
Fangrui Song [Wed, 28 Mar 2018 00:03:21 +0000 (00:03 +0000)]
[ELF] Fix offsets in comment of tls-got.s

llvm-svn: 328679

6 years ago[WebAssembly] Add exception and selector intrinsics
Heejin Ahn [Tue, 27 Mar 2018 23:37:07 +0000 (23:37 +0000)]
[WebAssembly] Add exception and selector intrinsics

Summary:
Since wasm EH does not use landingpad instructions, these instructions
provide exception pointer and selector values until we lower them in
WasmEHPrepare.

Reviewers: jgravelle-google

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

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

llvm-svn: 328678

6 years agoAMDGPU: Really implement getFrameRegister
Matt Arsenault [Tue, 27 Mar 2018 23:26:59 +0000 (23:26 +0000)]
AMDGPU: Really implement getFrameRegister

Currently this seems to only really be used for debug
info.

llvm-svn: 328677

6 years agoReapply "[DWARFv5] Emit file 0 to the line table."
Paul Robinson [Tue, 27 Mar 2018 22:40:34 +0000 (22:40 +0000)]
Reapply "[DWARFv5] Emit file 0 to the line table."

DWARF v5 specifies that the root file (also given in the DW_AT_name
attribute of the compilation unit DIE) should be emitted explicitly to
the line table's list of files.  This makes the line table more
independent of the .debug_info section.

Fixes the bug found by asan. Also XFAIL the new test for Darwin, which
is stuck on DWARF v2, and fix up other tests so they stop failing on
Windows.  Last but not least, don't break "clang -g" of an assembler
file that has .file directives in it.

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

llvm-svn: 328676

6 years ago[MachineOutliner] AArch64: Don't outline ADRPs with un-outlinable operands
Jessica Paquette [Tue, 27 Mar 2018 22:23:48 +0000 (22:23 +0000)]
[MachineOutliner] AArch64: Don't outline ADRPs with un-outlinable operands

If an ADRP appears with, say, a CPI operand, we shouldn't outline it.

This moves the check for unsafe operands so that it occurs before the special-case
for ADRPs. Also add a test for outlining ADRPs.

llvm-svn: 328674

6 years ago[AMDGPU] For OS type AMDPAL, fixed scratch on compute shader
Tim Renouf [Tue, 27 Mar 2018 21:35:00 +0000 (21:35 +0000)]
[AMDGPU] For OS type AMDPAL, fixed scratch on compute shader

Summary:
For OS type AMDPAL, the scratch descriptor is loaded from offset 0 of
the GIT, whose 32 bit pointer is in s0 (s8 for gfx9 merged shaders).

This commit fixes that to use offset 0x10 instead of offset 0 for a
compute shader, per the PAL ABI spec.

Reviewers: kzhuravl, nhaehnle, timcorringham

Subscribers: kzhuravl, wdng, yaxunl, t-tye, llvm-commits, dstuttard, nhaehnle, arsenm

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

Change-Id: I93dffa647758e37f613bb5e0dfca840d82e6d26f
llvm-svn: 328673

6 years ago[Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers
Petr Hosek [Tue, 27 Mar 2018 21:33:12 +0000 (21:33 +0000)]
[Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers

This is needed in addition to fuzzer in order to use libFuzzer.

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

llvm-svn: 328672

6 years ago[Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages.
Volodymyr Sapsai [Tue, 27 Mar 2018 21:29:05 +0000 (21:29 +0000)]
[Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages.

rdar://problem/35539384

Reviewers: ahatanak, nicholas, rsmith, jkorous-apple

Reviewed By: jkorous-apple

Subscribers: cfe-commits, jkorous-apple

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

llvm-svn: 328671

6 years ago[DWARF] Suppress split line tables more carefully.
Paul Robinson [Tue, 27 Mar 2018 21:28:59 +0000 (21:28 +0000)]
[DWARF] Suppress split line tables more carefully.

If a given split type unit does not have source locations, don't have
it refer to the split line table.
If no split type unit refers to the split line table, don't emit the
line table at all.

This will save a little space on rare occasions, but also refactors
things a bit to improve which class is responsible for what.

Responding to review comments on r326395.

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

llvm-svn: 328670

6 years ago[AMDGPU] Define code object identification string used in AMDHSA runtimes.
Tony Tye [Tue, 27 Mar 2018 21:20:46 +0000 (21:20 +0000)]
[AMDGPU] Define code object identification string used in AMDHSA runtimes.

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

llvm-svn: 328669

6 years ago[CodeGen] Fixed unreachable with -print-machineinstrs and custom pseudo source value
Tim Renouf [Tue, 27 Mar 2018 21:14:04 +0000 (21:14 +0000)]
[CodeGen] Fixed unreachable with -print-machineinstrs and custom pseudo source value

Summary:
Rev 327580 "[CodeGen] Use MIR syntax for MachineMemOperand printing"
broke -print-machineinstrs for us on AMDGPU, because we have custom
pseudo source values, and MIR serialization does not implement that.

This commit at least restores the functionality of -print-machineinstrs,
even if it does not properly implement the missing MIR serialization
functionality.

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

Change-Id: I44961c0b90bf6d48c01484ed7a4e466fd300db66
llvm-svn: 328668

6 years agoInitialize variable added in r328617.
Sterling Augustine [Tue, 27 Mar 2018 21:11:57 +0000 (21:11 +0000)]
Initialize variable added in r328617.

llvm-svn: 328667

6 years ago[polly] [ScopInfo] Don't pre-compute the name of the Scop's region.
Eli Friedman [Tue, 27 Mar 2018 20:51:49 +0000 (20:51 +0000)]
[polly] [ScopInfo] Don't pre-compute the name of the Scop's region.

This gets very expensive for basic blocks which don't have a name: it
calls printAsOperand, which numbers the entire module. We don't
normally need the name anyway, though; it's only used for debug dumps,
so don't compute it by default.

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

llvm-svn: 328666

6 years ago[YAML] Remove unit test of multibyte non-printable escaping that uses C++11 escapes
Graydon Hoare [Tue, 27 Mar 2018 20:46:26 +0000 (20:46 +0000)]
[YAML] Remove unit test of multibyte non-printable escaping that uses C++11 escapes

llvm-svn: 328665

6 years ago[X86] Add WriteFMOVMSK/WriteVecMOVMSK/WriteMMXMOVMSK scheduler classes
Simon Pilgrim [Tue, 27 Mar 2018 20:38:54 +0000 (20:38 +0000)]
[X86] Add WriteFMOVMSK/WriteVecMOVMSK/WriteMMXMOVMSK scheduler classes

Currently MOVMSK instructions use the WriteVecLogic class, which is a very poor choice given that MOVMSK involves a SSE->GPR transfer.

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

llvm-svn: 328664

6 years ago[coroutines] Do not attempt to typo-correct when coroutine is looking for required...
Gor Nishanov [Tue, 27 Mar 2018 20:38:19 +0000 (20:38 +0000)]
[coroutines] Do not attempt to typo-correct when coroutine is looking for required members

When SemaCoroutine looks for await_resume, it means it. No need for helpful: "Did you mean await_ready?" messages.

Fixes PR33477 and a couple of FIXMEs in test/SemaCXX/coroutines.cpp

llvm-svn: 328663

6 years ago[DWARF][DWARF v5]: Adding support for dumping DW_RLE_offset_pair and DW_RLE_base_address
Wolfgang Pieb [Tue, 27 Mar 2018 20:27:36 +0000 (20:27 +0000)]
[DWARF][DWARF v5]: Adding support for dumping DW_RLE_offset_pair and DW_RLE_base_address

Reviewers: dblakie, aprantl

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

llvm-svn: 328662

6 years ago[YAML] Escape non-printable multibyte UTF8 in Output::scalarString.
Graydon Hoare [Tue, 27 Mar 2018 19:52:45 +0000 (19:52 +0000)]
[YAML] Escape non-printable multibyte UTF8 in Output::scalarString.

The existing YAML Output::scalarString code path includes a partial and
incorrect implementation of YAML escaping logic. In particular, the logic put
in place in rL321283 escapes non-printable bytes only if they are not part of a
multibyte UTF8 sequence; implicitly this means that all multibyte UTF8
sequences -- printable and non -- are passed through verbatim.

The simplest solution to this is to direct the Output::scalarString method to
use the standalone yaml::escape function, and this _almost_ works, except that
the existing code in that function _over_ escapes: any multibyte UTF8 sequence
is escaped, even printable ones. While this is permitted for YAML, it is also
more aggressive (and hard to read for non-English locales) than necessary,
and the entire point of rL321283 was to back off such aggressive over-escaping.

So in this change, I have both redirected Output::scalarString to use
yaml::escape _and_ modified yaml::escape to optionally restrict its escaping to
non-printables. This preserves behaviour of any existing clients while giving
them a path to more moderate escaping should they desire.

Reviewers: JDevlieghere, thegameg, MatzeB, vladimir.plyashkun

Reviewed By: thegameg

Subscribers: llvm-commits

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

llvm-svn: 328661

6 years ago80-line wrap. NFC
Xin Tong [Tue, 27 Mar 2018 19:43:02 +0000 (19:43 +0000)]
80-line wrap. NFC

llvm-svn: 328660

6 years agoAMDGPU: Fix not preserving CSR VGPR if used for SGPR spills
Matt Arsenault [Tue, 27 Mar 2018 19:42:55 +0000 (19:42 +0000)]
AMDGPU: Fix not preserving CSR VGPR if used for SGPR spills

Before this was not done if the function had no calls in it. This
is still a possible issue with any callable function, regardless
of calls present.

llvm-svn: 328659

6 years agoUse the DWARF linkage name when importing C++ methods.
Davide Italiano [Tue, 27 Mar 2018 19:40:50 +0000 (19:40 +0000)]
Use the DWARF linkage name when importing C++ methods.

When importing C++ methods into clang AST nodes from the DWARF symbol
table, preserve the DW_AT_linkage_name and use it as the linker
("asm") name for the symbol.

Concretely, this enables `expression` to call into names that use the
GNU `abi_tag` extension, and enables lldb to call into code using
std::string or std::list from recent versions of libstdc++. See
https://bugs.llvm.org/show_bug.cgi?id=35310 . It also seems broadly
more robust than relying on the DWARF->clang->codegen pipeline to
roundtrip properly, but I'm not immediately aware of any other cases
in which it makes a difference.

Patch by Nelson Elhage!

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

llvm-svn: 328658

6 years agoAMDGPU: Update datalayout for stack alignment
Matt Arsenault [Tue, 27 Mar 2018 19:26:51 +0000 (19:26 +0000)]
AMDGPU: Update datalayout for stack alignment

llvm-svn: 328657

6 years agoAMDGPU: Set natural stack alignment in DataLayout
Matt Arsenault [Tue, 27 Mar 2018 19:26:40 +0000 (19:26 +0000)]
AMDGPU: Set natural stack alignment in DataLayout

Only 4 byte alignment is ever useful, so increasing anything
beyond this may require realigning the stack.

llvm-svn: 328656

6 years ago[DWARF] Simplify DWARFAddressRange::contains
Fangrui Song [Tue, 27 Mar 2018 19:05:02 +0000 (19:05 +0000)]
[DWARF] Simplify DWARFAddressRange::contains

This transform is valid because the ranges have been validated (LowPC <= HighPC).

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

llvm-svn: 328655

6 years ago[Sema] Avoid crash for category implementation without interface
Shoaib Meenai [Tue, 27 Mar 2018 18:58:28 +0000 (18:58 +0000)]
[Sema] Avoid crash for category implementation without interface

When we have a category implementation without a corresponding interface
(which is an error by itself), semantic checks for property accesses
will attempt to access a null interface declaration and then segfault.
Error out in such cases instead.

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

llvm-svn: 328654

6 years ago[PGO] Fix branch probability remarks assert
Rong Xu [Tue, 27 Mar 2018 18:55:56 +0000 (18:55 +0000)]
[PGO] Fix branch probability remarks assert

Fixed counter/weight overflow that leads to an assertion. Also fixed the help
string for pgo-emit-branch-prob option.

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

llvm-svn: 328653

6 years agoAMDGPU: Fix crash when MachinePointerInfo invalid
Matt Arsenault [Tue, 27 Mar 2018 18:39:45 +0000 (18:39 +0000)]
AMDGPU: Fix crash when MachinePointerInfo invalid

The combine on a select of a load only triggers for
addrspace 0, and discards the MachinePointerInfo. The
conservative default needs to be used for this.

llvm-svn: 328652

6 years agoAMDGPU: Fix register name format in tests
Matt Arsenault [Tue, 27 Mar 2018 18:39:42 +0000 (18:39 +0000)]
AMDGPU: Fix register name format in tests

These were changed to match the asm output name a long time ago,
although I think the old tablegenerated names still work.

llvm-svn: 328651

6 years agoAMDGPU: Fix FP restore from being reordered with stack ops
Matt Arsenault [Tue, 27 Mar 2018 18:38:51 +0000 (18:38 +0000)]
AMDGPU: Fix FP restore from being reordered with stack ops

In a function, s5 is used as the frame base SGPR. If a function
is calling another function, during the call sequence
it is copied to a preserved SGPR and restored.

Before it was possible for the scheduler to move stack operations
before the restore of s5, since there's nothing to associate
a frame index access with the restore.

Add an implicit use of s5 to the adjcallstack pseudo which ends
the call sequence to preven this from happening. I'm not 100%
satisfied with this solution, but I'm not sure what else would be
better.

llvm-svn: 328650

6 years ago[Core] Correctly handle float division in Scalar.
Davide Italiano [Tue, 27 Mar 2018 18:37:54 +0000 (18:37 +0000)]
[Core] Correctly handle float division in Scalar.

Patch by Tom Tromey!

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

llvm-svn: 328649

6 years ago[Hexagon] Implement TTI::shouldMaximizeVectorBandwidth
Krzysztof Parzyszek [Tue, 27 Mar 2018 18:10:47 +0000 (18:10 +0000)]
[Hexagon] Implement TTI::shouldMaximizeVectorBandwidth

llvm-svn: 328648

6 years ago[Power9] Fix the resource list for the COPY instruction.
Stefan Pintilie [Tue, 27 Mar 2018 17:51:53 +0000 (17:51 +0000)]
[Power9] Fix the resource list for the COPY instruction.

The COPY instruction was listed as a 4 cycle instruction.
It is now listed correctly as a 2 cycle ALU instruction.

llvm-svn: 328647

6 years ago[HWASan] Make use-after-free c, not c++ test.
Alex Shlyapnikov [Tue, 27 Mar 2018 17:45:53 +0000 (17:45 +0000)]
[HWASan] Make use-after-free c, not c++ test.

To minimize testing surface (remove libstdc++ from the picture, for
one), make use-after-free c, not c++ test.

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

llvm-svn: 328646

6 years agoAttempt to fix clangd test on Windows by wildcarding drive letters
Reid Kleckner [Tue, 27 Mar 2018 17:44:12 +0000 (17:44 +0000)]
Attempt to fix clangd test on Windows by wildcarding drive letters

llvm-svn: 328645

6 years agoRemap values in PromotedFloats
Pirama Arumuga Nainar [Tue, 27 Mar 2018 17:42:36 +0000 (17:42 +0000)]
Remap values in PromotedFloats

Summary: When a node is about to be erased from ReplacedValues, we should also remap its corresponding values in PromotedFloats.

Patch by Yan Luo (Yan.Luo2@synopsys.com)

Reviewers: pirama

Reviewed By: pirama

Subscribers: lebedev.ri, llvm-commits

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

llvm-svn: 328644

6 years ago[WebAssembly] Add export/import for function pointer table
Nicholas Wilson [Tue, 27 Mar 2018 17:38:51 +0000 (17:38 +0000)]
[WebAssembly] Add export/import for function pointer table

This enables callback-style programming where the JavaScript environment
can call back into the Wasm environment using a function pointer
received from the module.

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

llvm-svn: 328643

6 years agoFix a reoccuring typo in load-combine tests
Artur Pilipenko [Tue, 27 Mar 2018 17:33:50 +0000 (17:33 +0000)]
Fix a reoccuring typo in load-combine tests

   %tmp = bitcast i32* %arg to i8*
   %tmp1 = getelementptr inbounds i8, i8* %tmp, i32 0
-  %tmp2 = load i8, i8* %tmp, align 1
+  %tmp2 = load i8, i8* %tmp1, align 1

This doesn't change the semantics of the tests but makes use of %tmp1 which was originally intended.

llvm-svn: 328642

6 years agoUpdate test after r328635 in LLVM
Krzysztof Parzyszek [Tue, 27 Mar 2018 17:17:39 +0000 (17:17 +0000)]
Update test after r328635 in LLVM

llvm-svn: 328641

6 years agoForce SHF_MERGE optimizations with -r.
Rafael Espindola [Tue, 27 Mar 2018 17:09:23 +0000 (17:09 +0000)]
Force SHF_MERGE optimizations with -r.

Some tools (dwarfdump for example) get confused by the current -O0 -r
output since it has multiple copies of .debug_str.

We cannot just merge sections with the same name as they can have
different sh_entsize.

We could have duplicated logic for merging sections based on name and
sh_entsize, but it seems better to just use the existing logic by
enabling optimizations.

llvm-svn: 328640

6 years ago[Hexagon] Rudimentary support for auto-vectorization for HVX
Krzysztof Parzyszek [Tue, 27 Mar 2018 17:07:52 +0000 (17:07 +0000)]
[Hexagon] Rudimentary support for auto-vectorization for HVX

This implements a set of TTI functions that the loop vectorizer uses.
The only purpose of this is to enable testing. Auto-vectorization is
disabled by default, enabled by -hexagon-autohvx.

llvm-svn: 328639

6 years ago[AArch64] Decorate AArch64 instrs with OPERAND_PCREL
Rafael Auler [Tue, 27 Mar 2018 16:58:01 +0000 (16:58 +0000)]
[AArch64] Decorate AArch64 instrs with OPERAND_PCREL

Summary:
This is a canonical way to teach objdump to print the target
symbols for branches when disassembling AArch64 code.

Reviewers: evandro, t.p.northover, espindola

Reviewed By: t.p.northover

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

llvm-svn: 328638

6 years ago[NFC] OptPassGate extracted from OptBisect
Fedor Sergeev [Tue, 27 Mar 2018 16:57:20 +0000 (16:57 +0000)]
[NFC] OptPassGate extracted from OptBisect

Summary:
This is an NFC refactoring of the OptBisect class to split it into an optional pass gate interface used by LLVMContext and the Optional Pass Bisector (OptBisect) used for debugging of optional passes.

This refactoring is needed for D44464, which introduces setOptPassGate() method to allow implementations other than OptBisect.

Patch by Yevgeny Rouban.

Reviewers: andrew.w.kaylor, fedor.sergeev, vsk, dberlin, Eugene.Zelenko, reames, skatkov
Reviewed By: fedor.sergeev
Differential Revision: https://reviews.llvm.org/D44821

llvm-svn: 328637

6 years ago[clang] Change std::sort to llvm::sort in response to r327219
Mandeep Singh Grang [Tue, 27 Mar 2018 16:50:00 +0000 (16:50 +0000)]
[clang] Change std::sort to llvm::sort in response to r327219

r327219 added wrappers to std::sort which randomly shuffle the container before
sorting.  This will help in uncovering non-determinism caused due to undefined
sorting order of objects having the same key.

To make use of that infrastructure we need to invoke llvm::sort instead of
std::sort.

llvm-svn: 328636

6 years agoUse .set instead of = when printing assignment in assembly output
Krzysztof Parzyszek [Tue, 27 Mar 2018 16:44:41 +0000 (16:44 +0000)]
Use .set instead of = when printing assignment in assembly output

On Hexagon "x = y" is a syntax used in most instructions, and is not
treated as a directive.

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

llvm-svn: 328635

6 years ago[libFuzzer] Disable optimization for exit_on_src_pos.test.
Matt Morehouse [Tue, 27 Mar 2018 16:40:34 +0000 (16:40 +0000)]
[libFuzzer] Disable optimization for exit_on_src_pos.test.

Test fails on Darwin with -O2.

llvm-svn: 328634

6 years ago[libFuzzer] Place volatile after pointer types.
Matt Morehouse [Tue, 27 Mar 2018 16:40:20 +0000 (16:40 +0000)]
[libFuzzer] Place volatile after pointer types.

For a few tests, volatile was placed before the '*' in pointer
declarations, resulting in it applying to the underlying data rather
than the pointer itself.  Placing volatile after the '*' allows us to
switch those tests to -O2.

llvm-svn: 328633

6 years ago[LV] Add TTI::shouldMaximizeVectorBandwidth to allow enabling it per target
Krzysztof Parzyszek [Tue, 27 Mar 2018 16:14:11 +0000 (16:14 +0000)]
[LV] Add TTI::shouldMaximizeVectorBandwidth to allow enabling it per target

The default implementation returns false and keeps the current behavior.

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

llvm-svn: 328632

6 years agoAdd a passing test.
Rafael Espindola [Tue, 27 Mar 2018 16:10:01 +0000 (16:10 +0000)]
Add a passing test.

I noticed that we were not testing this while working on another patch.

llvm-svn: 328631

6 years ago[HWASan] Relax use-after-free.cc test matching rules.
Alex Shlyapnikov [Tue, 27 Mar 2018 16:04:40 +0000 (16:04 +0000)]
[HWASan] Relax use-after-free.cc test matching rules.

Relax use-after-free.cc test matching rules to cover more malloc/free
interceptor names variations.

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

llvm-svn: 328630

6 years ago[llvm-mca] pass the correct set of used registers in checkRAT.
Andrea Di Biagio [Tue, 27 Mar 2018 15:23:41 +0000 (15:23 +0000)]
[llvm-mca] pass the correct set of used registers in checkRAT.

We were incorrectly initializing the array of used registers in method checkRAT.
As a consequence, the number of register file stalls was misreported.

Added a test to cover this case.

llvm-svn: 328629

6 years ago[clang-format] Refine ObjC guesser to handle child lines of child lines
Ben Hamilton [Tue, 27 Mar 2018 15:01:21 +0000 (15:01 +0000)]
[clang-format] Refine ObjC guesser to handle child lines of child lines

Summary:
This fixes an issue brought up by djasper@ in his review of D44790. We
handled top-level child lines, but if those child lines themselves
had child lines, we didn't handle them.

Rather than use recursion (which could blow out the stack), I use a
DenseSet to hold the set of lines we haven't yet checked (since order
doesn't matter), and update the set to add the children of each
line as we check it.

Test Plan: New tests added. Confirmed tests failed before fix
  and passed after fix.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 328628

6 years ago[clang-format] Do not insert space before closing brace in ObjC dict literal
Ben Hamilton [Tue, 27 Mar 2018 15:01:17 +0000 (15:01 +0000)]
[clang-format] Do not insert space before closing brace in ObjC dict literal

Summary:
Previously, `clang-format` would sometimes insert a space
before the closing brace in an Objective-C dictionary literal.

Unlike array literals (which obey `Style.SpacesInContainerLiterals`
to add a space after `[` and before `]`), Objective-C dictionary
literals currently are not meant to insert a space after `{` and before
`}`, regardless of `Style.SpacesInContainerLiterals`.

However, some constructs like `@{foo : @(bar)}` caused `clang-format`
to insert a space between `)` and `}`.

This fixes the issue and adds tests. (I understand the behavior is
not consistent between array literals and dictionary literals, but
that's existing behavior that's a much larger change.)

Test Plan: New tests added. Ran tests with:
  % make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests

Reviewers: djasper, jolesiak, Wizard

Reviewed By: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 328627

6 years agoDrop spurious break; NFC
Sven van Haastregt [Tue, 27 Mar 2018 14:57:56 +0000 (14:57 +0000)]
Drop spurious break; NFC

llvm-svn: 328626

6 years ago[scudo] Fuchsia minimal shared runtime
Kostya Kortchinsky [Tue, 27 Mar 2018 14:40:39 +0000 (14:40 +0000)]
[scudo] Fuchsia minimal shared runtime

Summary:
Fuchsia requires its Scudo shared runtime to not be C++ dependant. Since they
don't use UBSan in conjunction with Scudo, we can just remove the runtime,
and add the extra `nostdinc++` and `nostdlib++` flags. No need for Coverage
either. This allows to keep things going while working on additional splits
of sanitizer_commong and a more minimal runtime.

Reviewers: phosek, flowerhack, alekseyshl

Reviewed By: phosek, alekseyshl

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

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

llvm-svn: 328625

6 years ago[ELF] Disable ICF for synthetic sections
Andrew Ng [Tue, 27 Mar 2018 14:10:07 +0000 (14:10 +0000)]
[ELF] Disable ICF for synthetic sections

The Data member of synthetic section's is not valid and empty. The Data
member is required to be valid by ICF as it is used by ICF to determine
the equality of section contents. Therefore, exclude synthetic sections
from ICF.

Fixes bug PR36910.

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

llvm-svn: 328624

6 years agoMove a ref-counted pointer instead of copying it. NFC.
Alexander Kornienko [Tue, 27 Mar 2018 14:02:06 +0000 (14:02 +0000)]
Move a ref-counted pointer instead of copying it. NFC.

llvm-svn: 328623

6 years ago[clang-move] Fix test failing due to clang-format change
Krasimir Georgiev [Tue, 27 Mar 2018 13:39:33 +0000 (13:39 +0000)]
[clang-move] Fix test failing due to clang-format change

r328621 reverted the removal of empty lines before the closing `}` in
namespaces.

llvm-svn: 328622

6 years agoRevert "[clang-format] Remove empty lines before }[;] // comment"
Krasimir Georgiev [Tue, 27 Mar 2018 13:14:29 +0000 (13:14 +0000)]
Revert "[clang-format] Remove empty lines before }[;] // comment"

This reverts commit r327861.

The empty line before namespaces is desired in some places. We need a
better approach to handle this.

llvm-svn: 328621

6 years ago[X86][Btver2] Add MMX_PMOVMSKBrr to MOVMSK scheduler class
Simon Pilgrim [Tue, 27 Mar 2018 12:26:12 +0000 (12:26 +0000)]
[X86][Btver2] Add MMX_PMOVMSKBrr to MOVMSK scheduler class

llvm-svn: 328620

6 years ago[analyzer] LoopUnrolling: update the matched assignment operators
Peter Szecsi [Tue, 27 Mar 2018 12:16:56 +0000 (12:16 +0000)]
[analyzer] LoopUnrolling: update the matched assignment operators

Extended the matched assignment operators when checking for bound changes in a body of the loop by using the freshly added isAssignmentOperator matcher.
This covers all the (current) possible assignments, tests added as well.

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

llvm-svn: 328619

6 years ago[ASTMatchers] Add isAssignmentOperator matcher
Peter Szecsi [Tue, 27 Mar 2018 12:11:46 +0000 (12:11 +0000)]
[ASTMatchers] Add isAssignmentOperator matcher

Adding a matcher for BinaryOperator and cxxOperatorCallExpr to be able to
decide whether it is any kind of assignment operator or not. This would be
useful since allows us to easily detect assignments via matchers for static
analysis (Tidy, SA) purposes.

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

llvm-svn: 328618

6 years ago[PowerPC] Secure PLT support
Strahinja Petrovic [Tue, 27 Mar 2018 11:23:53 +0000 (11:23 +0000)]
[PowerPC] Secure PLT support

This patch supports secure PLT mode for PowerPC 32 architecture.

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

llvm-svn: 328617

6 years ago[MIPS] Add static_assert that all Fixups are handled in getFixupKind
Alexander Richardson [Tue, 27 Mar 2018 10:08:12 +0000 (10:08 +0000)]
[MIPS] Add static_assert that all Fixups are handled in getFixupKind

Summary:
I recently added a new Fixup kind to our fork of LLVM but forgot to add
it to the table in MipsAsmBackend.cpp. With this static_assert the error
would have been caught instead of zero-initializing the array entries for
the new fixups.

Reviewers: sdardis, atanasyan

Reviewed By: atanasyan

Subscribers: llvm-commits

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

llvm-svn: 328616

6 years ago[LoopUnroll][NFC] Remove redundant canPeel check
Max Kazantsev [Tue, 27 Mar 2018 09:40:51 +0000 (09:40 +0000)]
[LoopUnroll][NFC] Remove redundant canPeel check

We check `canPeel` twice: when evaluating the number of iterations to be peeled
and within the method `peelLoop` that performs peeling. This method is only
executed if the calculated peel count is positive. Thus, the check in `peelLoop` can
never fail. This patch replaces this check with an assert.

Differential Revision: https://reviews.llvm.org/D44919
Reviewed By: fhahn

llvm-svn: 328615

6 years ago[IRCE] Enable decreasing loops of non-const bound
Sam Parker [Tue, 27 Mar 2018 08:24:53 +0000 (08:24 +0000)]
[IRCE] Enable decreasing loops of non-const bound

As a follow-up to r328480, this updates the logic for the decreasing
safety checks in a similar manner:
- CanBeMax is replaced by CannotBeMaxInLoop which queries
  isLoopEntryGuardedByCond on the maximum value.
- SumCanReachMin is replaced by isSafeDecreasingBound which includes
  some logic from parseLoopStructure and, again, has been updated to
  use isLoopEntryGuardedByCond on the given bounds.

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

llvm-svn: 328613

6 years ago[NFC] Fix comments in getExact()
Max Kazantsev [Tue, 27 Mar 2018 08:13:55 +0000 (08:13 +0000)]
[NFC] Fix comments in getExact()

llvm-svn: 328612

6 years ago[SCEV] Make exact taken count calculation more optimistic
Max Kazantsev [Tue, 27 Mar 2018 07:30:38 +0000 (07:30 +0000)]
[SCEV] Make exact taken count calculation more optimistic

Currently, `getExact` fails if it sees two exit counts in different blocks. There is
no solid reason to do so, given that we only calculate exact non-taken count
for exiting blocks that dominate latch. Using this fact, we can simply take min
out of all exits of all blocks to get the exact taken count.

This patch makes the calculation more optimistic with enforcing our assumption
with asserts. It allows us to calculate exact backedge taken count in trivial loops
like

  for (int i = 0; i < 100; i++) {
    if (i > 50) break;
    . . .
  }

Differential Revision: https://reviews.llvm.org/D44676
Reviewed By: fhahn

llvm-svn: 328611

6 years ago[lld] fix data race in ICF.cpp
Bob Haarman [Tue, 27 Mar 2018 06:08:35 +0000 (06:08 +0000)]
[lld] fix data race in ICF.cpp

Summary: Fixes PR36823.

Reviewers: ruiu, pcc, rnk

Reviewed By: ruiu

Subscribers: llvm-commits

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

llvm-svn: 328610

6 years ago[SCEV] Add one more case in computeConstantDifference
Max Kazantsev [Tue, 27 Mar 2018 04:54:00 +0000 (04:54 +0000)]
[SCEV] Add one more case in computeConstantDifference

This patch teaches `computeConstantDifference` handle calculation of constant
difference between `(X + C1)` and `(X + C2)` which is `(C2 - C1)`.

Differential Revision: https://reviews.llvm.org/D43759
Reviewed By: anna

llvm-svn: 328609

6 years ago[MachineScheduler] Add itinerary to schedcover.py. Make default work in the command...
Craig Topper [Tue, 27 Mar 2018 04:26:39 +0000 (04:26 +0000)]
[MachineScheduler] Add itinerary to schedcover.py. Make default work in the command line filter

Summary:
This patch adds itinerary support to the schedcover.py script. I've been trying to use this script to figure out why SSE and AVX instructions are ending up in separate tablegen scheduler classes and sometimes its because we are using different itineraries.

Rather than using None to indicate the default scheduler model, I now use the string "default". I had to hack around the sorting a little to keep "default" at the beginning. But this also makes it so you can specify "default" on the command line to just get the defaults

I also fixed the regular expression code so that the no_default wasn't evaluated twice.

Reviewers: RKSimon, atrick, jmolloy, javed.absar

Reviewed By: javed.absar

Subscribers: llvm-commits

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

llvm-svn: 328608

6 years ago[coroutines] Fix unused warning on result of co_yield.
Eric Fiselier [Tue, 27 Mar 2018 03:33:06 +0000 (03:33 +0000)]
[coroutines] Fix unused warning on result of co_yield.

This patch follows up on r328602, which fixed the spurious unused
result warning for `co_await`.

llvm-svn: 328607

6 years ago[coroutines] Fix invalid source range in co_await call expressions.
Eric Fiselier [Tue, 27 Mar 2018 03:15:46 +0000 (03:15 +0000)]
[coroutines] Fix invalid source range in co_await call expressions.

Summary:
Currently an invalid source range is generated for the member call expressions of `co_await`. The end location of the call expression is the `co_await` token loc, while the start is the location of the operand. This causes crashes when the source range is used to produce diagnostics.

This patch fixes the issues by using the expression location instead of the token location when building the member calls.

Reviewers: GorNishanov, rsmith, vsk, aaron.ballman

Reviewed By: vsk

Subscribers: cfe-commits, modocache

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

llvm-svn: 328606

6 years agoRemove extraneous local variable. NFC.
Rui Ueyama [Tue, 27 Mar 2018 02:53:08 +0000 (02:53 +0000)]
Remove extraneous local variable. NFC.

llvm-svn: 328605

6 years agoUpdate comments.
Rui Ueyama [Tue, 27 Mar 2018 02:52:58 +0000 (02:52 +0000)]
Update comments.

llvm-svn: 328604