platform/upstream/llvm.git
8 years ago[AVR] Add a selection of CodeGen tests
Dylan McKay [Wed, 9 Nov 2016 23:46:52 +0000 (23:46 +0000)]
[AVR] Add a selection of CodeGen tests

Summary: This adds all of the CodeGen tests which currently pass.

Reviewers: arsenm, kparzysz

Subscribers: japaric, wdng

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

llvm-svn: 286418

8 years ago[AVR] Add all of the machine code test suite
Dylan McKay [Wed, 9 Nov 2016 23:46:25 +0000 (23:46 +0000)]
[AVR] Add all of the machine code test suite

Summary: This adds all of the AVR machine code tests.

Reviewers: arsenm, kparzysz

Subscribers: wdng, japaric

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

llvm-svn: 286417

8 years agoRemove an overloaded function to simplify.
Rui Ueyama [Wed, 9 Nov 2016 23:37:40 +0000 (23:37 +0000)]
Remove an overloaded function to simplify.

This version of addRegular is almost identical to the other except
it lacked "size" parameter.

llvm-svn: 286416

8 years agoAdd isHotBB helper function to ProfileSummaryInfo
Dehao Chen [Wed, 9 Nov 2016 23:36:02 +0000 (23:36 +0000)]
Add isHotBB helper function to ProfileSummaryInfo

Summary: This will unify all BB hotness checks.

Reviewers: eraman, davidxl

Subscribers: llvm-commits

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

llvm-svn: 286415

8 years agoMake OutputSectionBase a class instead of class template.
Rafael Espindola [Wed, 9 Nov 2016 23:23:45 +0000 (23:23 +0000)]
Make OutputSectionBase a class instead of class template.

The disadvantage is that we use uint64_t instad of uint32_t for some
value in 32 bit files. The advantage is a substantially simpler code,
faster builds and less code duplication.

llvm-svn: 286414

8 years agoFix weak symbol linkage in SBStructuredData, update docs.
Todd Fiala [Wed, 9 Nov 2016 23:21:04 +0000 (23:21 +0000)]
Fix weak symbol linkage in SBStructuredData, update docs.

Summary:
This change fixes an issue where I was leaking a weakly-linked symbol in
the SBAPI. It also updates the docs to call out what I did wrong.

Fixes:
rdar://28882483

Reviewers: jingham

Subscribers: lldb-commits

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

llvm-svn: 286413

8 years agoRemove extra whitespace
Adrian Prantl [Wed, 9 Nov 2016 23:10:44 +0000 (23:10 +0000)]
Remove extra whitespace

llvm-svn: 286412

8 years agoRelax testcase so it also works on Windows.
Adrian Prantl [Wed, 9 Nov 2016 23:05:16 +0000 (23:05 +0000)]
Relax testcase so it also works on Windows.

llvm-svn: 286411

8 years agoPreserve assumption cache in loop-rotate.
Eli Friedman [Wed, 9 Nov 2016 23:05:01 +0000 (23:05 +0000)]
Preserve assumption cache in loop-rotate.

No testcase included because I can't figure out how to reduce it.
(It's easy to write a testcase where rotation clones an assume,
but that doesn't actually seem to trigger the crash in opt on
its own; maybe an issue with the laziness?)

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

llvm-svn: 286410

8 years ago[Sema][NFC] Reset HasFallthroughStmt when clearing FunctionScopeInfo
Erik Pilkington [Wed, 9 Nov 2016 22:52:23 +0000 (22:52 +0000)]
[Sema][NFC] Reset HasFallthroughStmt when clearing FunctionScopeInfo

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

llvm-svn: 286409

8 years agoGlobalISel: fix typo. NFC
Tim Northover [Wed, 9 Nov 2016 22:40:02 +0000 (22:40 +0000)]
GlobalISel: fix typo. NFC

llvm-svn: 286408

8 years agoGlobalISel: translate invoke and landingpad instructions
Tim Northover [Wed, 9 Nov 2016 22:39:54 +0000 (22:39 +0000)]
GlobalISel: translate invoke and landingpad instructions

Pretty bare-bones support for exception handling (no weird MSVC stuff, no SjLj
etc), but it should get things going.

llvm-svn: 286407

8 years agoSimplify parseEmulation. NFC.
Rui Ueyama [Wed, 9 Nov 2016 22:32:43 +0000 (22:32 +0000)]
Simplify parseEmulation. NFC.

llvm-svn: 286406

8 years agoSplit OutputSection ctor. NFC.
Rui Ueyama [Wed, 9 Nov 2016 22:32:42 +0000 (22:32 +0000)]
Split OutputSection ctor. NFC.

llvm-svn: 286405

8 years ago[clang-tidy docs] Minor formatting changes.
Alexander Kornienko [Wed, 9 Nov 2016 22:31:07 +0000 (22:31 +0000)]
[clang-tidy docs] Minor formatting changes.

llvm-svn: 286404

8 years agoUpdate vectorization debug info unittest.
Dehao Chen [Wed, 9 Nov 2016 22:25:19 +0000 (22:25 +0000)]
Update vectorization debug info unittest.

Summary:
The change will test the change in r286159.
The idea behind the change: Make the dbg location different between loop header and preheader/exit. Originally, dbg location 21 exists in 3 BBs: preheader, header, critical edge (exit). Update the debug location of inside the loop header from !21 to !22 so that it will reflect the correct location.

Reviewers: probinson

Subscribers: llvm-commits

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

llvm-svn: 286403

8 years ago[InstCombine] regenerate checks; NFC
Sanjay Patel [Wed, 9 Nov 2016 22:21:58 +0000 (22:21 +0000)]
[InstCombine] regenerate checks; NFC

llvm-svn: 286402

8 years ago[ELF][MIPS] Attempt to fix buildbot
Simon Atanasyan [Wed, 9 Nov 2016 21:46:42 +0000 (21:46 +0000)]
[ELF][MIPS] Attempt to fix buildbot

llvm-svn: 286401

8 years agoUse an artificial debug location for non-virtual thunks.
Adrian Prantl [Wed, 9 Nov 2016 21:43:51 +0000 (21:43 +0000)]
Use an artificial debug location for non-virtual thunks.
Thunks are artificial and have no corresponding source location except for the
line number on the DISubprogram, which is marked as artificial.

<rdar://problem/11941095>

llvm-svn: 286400

8 years ago[InstCombine] regenerate checks; NFC
Sanjay Patel [Wed, 9 Nov 2016 21:41:34 +0000 (21:41 +0000)]
[InstCombine] regenerate checks; NFC

llvm-svn: 286399

8 years ago[ELF][MIPS] Convert .MIPS.abiflags section to synthetic input section
Simon Atanasyan [Wed, 9 Nov 2016 21:37:06 +0000 (21:37 +0000)]
[ELF][MIPS] Convert .MIPS.abiflags section to synthetic input section

Previously, we have both input and output section for .MIPS.abiflags.
Now we have only one class for .MIPS.abiflags, which is MipsAbiFlagsSection.
This class is a synthetic input section.

.MIPS.abiflags sections are handled as regular sections until
the control reaches Writer. Writer then aggregates all sections
whose type is SHT_MIPS_ABIFLAGS to create a single synthesized
input section. The synthesized section is then processed normally
as if it came from an input file.

llvm-svn: 286398

8 years ago[ELF][MIPS] Convert .reginfo and .MIPS.options sections to synthetic input sections
Simon Atanasyan [Wed, 9 Nov 2016 21:36:56 +0000 (21:36 +0000)]
[ELF][MIPS] Convert .reginfo and .MIPS.options sections to synthetic input sections

Previously, we have both input and output sections for .reginfo and
.MIPS.options. Now for each such sections we have one synthetic input
sections: MipsReginfoSection and MipsOptionsSection respectively.

Both sections are handled as regular sections until the control reaches
Writer. Writer then aggregates all sections whose type is SHT_MIPS_REGINFO
or SHT_MIPS_OPTIONS to create a single synthesized input section. In that
moment Writer also save GP0 value to the MipsGp0 field of the corresponding
ObjectFile. This value required for R_MIPS_GPREL16 and R_MIPS_GPREL32
relocations calculation.

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

llvm-svn: 286397

8 years ago[tools] Unbreak the GCC build (workaround a GCC bug).
Davide Italiano [Wed, 9 Nov 2016 21:30:33 +0000 (21:30 +0000)]
[tools] Unbreak the GCC build (workaround a GCC bug).

../tools/llvm-extract/llvm-extract.cpp: In function ‘int main(int, char**)’:
warning: ISO C++ forbids zero-size array ‘argv’ [-Wpedantic]

GCC reference bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61259

llvm-svn: 286396

8 years ago[asan/win] Use TerminateProcess when we want to exit abnormally
Reid Kleckner [Wed, 9 Nov 2016 21:27:58 +0000 (21:27 +0000)]
[asan/win] Use TerminateProcess when we want to exit abnormally

ExitProcess still runs some code which can lead to ASan interceptors
running after CHECK failure. This can lead to deadlock if it CHECK fails
again. Avoid that mess by really exiting immediately.

llvm-svn: 286395

8 years agoMake BitcodeReader::parseIdentificationBlock() robust to EOF
Mehdi Amini [Wed, 9 Nov 2016 21:26:49 +0000 (21:26 +0000)]
Make BitcodeReader::parseIdentificationBlock() robust to EOF

This method is particular: it iterates at the top-level and does
not have an enclosing block.

llvm-svn: 286394

8 years agoDisable cpio test on Windows again.
Rui Ueyama [Wed, 9 Nov 2016 20:54:01 +0000 (20:54 +0000)]
Disable cpio test on Windows again.

The last fix is unlikely to solve the issue. Reverting it to the
original file.

llvm-svn: 286393

8 years agoAttempt to fix green dragon bot.
Rui Ueyama [Wed, 9 Nov 2016 20:42:34 +0000 (20:42 +0000)]
Attempt to fix green dragon bot.

llvm-svn: 286392

8 years ago[clang-tidy docs] Recommend using add_new_check.py more
Alexander Kornienko [Wed, 9 Nov 2016 20:03:30 +0000 (20:03 +0000)]
[clang-tidy docs] Recommend using add_new_check.py more

llvm-svn: 286390

8 years agoMinor unroll pass refacoring.
Evgeny Stupachenko [Wed, 9 Nov 2016 19:56:39 +0000 (19:56 +0000)]
Minor unroll pass refacoring.

Summary:
Unrolled Loop Size calculations moved to a function.
Constant representing number of optimized instructions
 when "back edge" becomes "fall through" replaced with
 variable.
Some comments added.

Reviewers: mzolotukhin

Differential Revision: http://reviews.llvm.org/D21719

From: Evgeny Stupachenko <evstupac@gmail.com>
llvm-svn: 286389

8 years ago[Verifier] clang-format a section; NFC
Sanjoy Das [Wed, 9 Nov 2016 19:36:39 +0000 (19:36 +0000)]
[Verifier] clang-format a section; NFC

Suggested in D26438 since I'm touching related code.

llvm-svn: 286388

8 years ago[RenderScript] Fix reduction argument printing
Luke Drummond [Wed, 9 Nov 2016 19:20:39 +0000 (19:20 +0000)]
[RenderScript] Fix reduction argument printing

When placing function name breakpoints on RenderScript Reduction kernel
functions, we were not skipping over the function prologue meaning that
inspection of the arguments could be garbled as the function was not finished
setting up the stack/registers.

In
[122fe8f](https://github.com/llvm-mirror/lldb/commit/122fe8f47255ec850155495d10526fccc51f95fb)
Aidan added the `SkipPrologue` function that allows us to trivially fix up the
kernel's functions' resolved addresses, falling gracefully back to the old
behaviour if we don't know how to handle the prologue or can't resolve its
size.

llvm-svn: 286387

8 years ago[SCEV] Refactor out a useful pattern; NFC
Sanjoy Das [Wed, 9 Nov 2016 18:22:43 +0000 (18:22 +0000)]
[SCEV] Refactor out a useful pattern; NFC

llvm-svn: 286386

8 years agoRevert r286384, "X86: Introduce the "relocImm" ComplexPattern, which represents a...
Peter Collingbourne [Wed, 9 Nov 2016 18:17:50 +0000 (18:17 +0000)]
Revert r286384, "X86: Introduce the "relocImm" ComplexPattern, which represents a relocatable immediate."

Suspected to be the cause of a sanitizer-windows bot failure:
Assertion failed: isImm() && "Wrong MachineOperand accessor", file C:\b\slave\sanitizer-windows\llvm\include\llvm/CodeGen/MachineOperand.h, line 420

llvm-svn: 286385

8 years agoX86: Introduce the "relocImm" ComplexPattern, which represents a relocatable immediate.
Peter Collingbourne [Wed, 9 Nov 2016 17:51:58 +0000 (17:51 +0000)]
X86: Introduce the "relocImm" ComplexPattern, which represents a relocatable immediate.

A relocatable immediate is either an immediate operand or an operand that
can be relocated by the linker to an immediate, such as a regular symbol
in non-PIC code.

Start using relocImm for 32-bit and 64-bit MOV instructions, and for operands
of type "imm32_su". Remove a number of now-redundant patterns.

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

llvm-svn: 286384

8 years ago[Hexagon] Silence "sometimes uninitialized" warning in HexagonCopyToCombine
Krzysztof Parzyszek [Wed, 9 Nov 2016 17:50:46 +0000 (17:50 +0000)]
[Hexagon] Silence "sometimes uninitialized" warning in HexagonCopyToCombine

llvm-svn: 286383

8 years agoBitcode: Change the materializer interface to return llvm::Error.
Peter Collingbourne [Wed, 9 Nov 2016 17:49:19 +0000 (17:49 +0000)]
Bitcode: Change the materializer interface to return llvm::Error.

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

llvm-svn: 286382

8 years agoFix grammar
Philipp Stephani [Wed, 9 Nov 2016 17:47:56 +0000 (17:47 +0000)]
Fix grammar

"allow" requires a direct object in this case.

llvm-svn: 286381

8 years ago[Sparc] Unbreak test
Douglas Katzman [Wed, 9 Nov 2016 17:02:07 +0000 (17:02 +0000)]
[Sparc] Unbreak test

llvm-svn: 286380

8 years agoMake Discarded a InputSection.
Rafael Espindola [Wed, 9 Nov 2016 16:55:07 +0000 (16:55 +0000)]
Make Discarded a InputSection.

It was quite confusing that it had SectionKind of Regular, but was not
actually a InputSection.

llvm-svn: 286379

8 years ago[ELF] - Add separate form for -R alias.
George Rimar [Wed, 9 Nov 2016 16:38:15 +0000 (16:38 +0000)]
[ELF] - Add separate form for -R alias.

During link of devel/chrpath (FreeBSD port), found next issue:
/usr/bin/ld: error: unclosed comment in a linker script
/usr/bin/ld: error: line 1: unknown directive: �
/usr/bin/ld: error: �\16

Problem was not obvious and the reason was that we did not accept
the separate form of -R. While invocation line contained it:
cc -Wl,-R /usr/local/lib -o prog prog.c

CPIO file produced contained /usr/local/lib file.
Which looks because of reasons above
contained inside the content of whole lib folder,
and it then was passed as an input and
proccessed as linker script.

llvm-svn: 286378

8 years ago[Hexagon] Separate Hexagon subreg indices for different register classes
Krzysztof Parzyszek [Wed, 9 Nov 2016 16:19:08 +0000 (16:19 +0000)]
[Hexagon] Separate Hexagon subreg indices for different register classes

For pairs of 32-bit registers: isub_lo, isub_hi.
For pairs of vector registers: vsub_lo, vsub_hi.

Add generic subreg indices: ps_sub_lo, ps_sub_hi, and a function
  HexagonRegisterInfo::getHexagonSubRegIndex(RegClass, GenericSubreg)
that returns the appropriate subreg index for RegClass.

llvm-svn: 286377

8 years ago[Sparc] LLONG is not lock-free atomic on v8
Douglas Katzman [Wed, 9 Nov 2016 15:43:51 +0000 (15:43 +0000)]
[Sparc] LLONG is not lock-free atomic on v8

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

llvm-svn: 286376

8 years agoRemove TimeValue usage from lldb/Target
Pavel Labath [Wed, 9 Nov 2016 15:05:48 +0000 (15:05 +0000)]
Remove TimeValue usage from lldb/Target

It was only used for declaring unused variables. :)

llvm-svn: 286374

8 years agoRemove TimeValue usage from ObjectContainerBSDArchive
Pavel Labath [Wed, 9 Nov 2016 15:05:45 +0000 (15:05 +0000)]
Remove TimeValue usage from ObjectContainerBSDArchive

llvm-svn: 286373

8 years agoRemove unused TimeValue include
Pavel Labath [Wed, 9 Nov 2016 14:53:37 +0000 (14:53 +0000)]
Remove unused TimeValue include

llvm-svn: 286372

8 years agoRemove TimeValue usage from lldb/Host
Pavel Labath [Wed, 9 Nov 2016 14:53:32 +0000 (14:53 +0000)]
Remove TimeValue usage from lldb/Host

llvm-svn: 286371

8 years agoAdd a convenience getObj method. NFC.
Rafael Espindola [Wed, 9 Nov 2016 14:39:20 +0000 (14:39 +0000)]
Add a convenience getObj method. NFC.

llvm-svn: 286370

8 years agoRemove TimeValue usage from lldb/Interpreter
Pavel Labath [Wed, 9 Nov 2016 14:33:22 +0000 (14:33 +0000)]
Remove TimeValue usage from lldb/Interpreter

llvm-svn: 286369

8 years ago[Hexagon] Eliminate Insert4 pseudo-instruction, use combines instead
Krzysztof Parzyszek [Wed, 9 Nov 2016 14:16:29 +0000 (14:16 +0000)]
[Hexagon] Eliminate Insert4 pseudo-instruction, use combines instead

llvm-svn: 286368

8 years agoclang-format: [TypeScript] Fix bug in handling of non-null operator.
Daniel Jasper [Wed, 9 Nov 2016 14:12:55 +0000 (14:12 +0000)]
clang-format: [TypeScript] Fix bug in handling of non-null operator.

Before:
  var i = x!-1;

After:
  var i = x! - 1;

llvm-svn: 286367

8 years agoRemove TimeValue usage from lldb/Core. NFC.
Pavel Labath [Wed, 9 Nov 2016 14:04:08 +0000 (14:04 +0000)]
Remove TimeValue usage from lldb/Core. NFC.

llvm-svn: 286366

8 years ago[AST] Dump dependent scope member expression with its member name
Alex Lorenz [Wed, 9 Nov 2016 14:02:18 +0000 (14:02 +0000)]
[AST] Dump dependent scope member expression with its member name

llvm-svn: 286365

8 years ago[ELF] - Enable reproduce-error.s under windows.
George Rimar [Wed, 9 Nov 2016 13:55:30 +0000 (13:55 +0000)]
[ELF] - Enable reproduce-error.s under windows.

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

llvm-svn: 286364

8 years ago[CodeCompletion] Show block invocation results for block property setters
Alex Lorenz [Wed, 9 Nov 2016 13:43:18 +0000 (13:43 +0000)]
[CodeCompletion] Show block invocation results for block property setters

This commit changes the code completion results for block property setters:
The default block property result is now a block invocation rather than a simple
property reference.

rdar://28846196

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

llvm-svn: 286363

8 years ago[SystemZ] A few fixes in scheduler files.
Jonas Paulsson [Wed, 9 Nov 2016 12:47:57 +0000 (12:47 +0000)]
[SystemZ] A few fixes in scheduler files.

Review: U Weigand
llvm-svn: 286362

8 years agoRemove TimeValue usage from Scalar/SROA.cpp. NFC.
Pavel Labath [Wed, 9 Nov 2016 12:07:12 +0000 (12:07 +0000)]
Remove TimeValue usage from Scalar/SROA.cpp. NFC.

llvm-svn: 286361

8 years agoFix expectation in TestStaticVariables.py after rL286302
Tamas Berghammer [Wed, 9 Nov 2016 11:52:12 +0000 (11:52 +0000)]
Fix expectation in TestStaticVariables.py after rL286302

The debug info emitted by clang for static variables improved by
rL286302 and it exposed an incorrect test expactation because now LLDB
able to displays more data 9thanks to better debug info) then before.

llvm-svn: 286360

8 years agoZero-initialize chrono duration objects
Pavel Labath [Wed, 9 Nov 2016 11:43:57 +0000 (11:43 +0000)]
Zero-initialize chrono duration objects

The default duration constructor does not zero-initialize the object, we need to
do that manually.

llvm-svn: 286359

8 years ago[dsymutil] Replace TimeValue with TimePoint
Pavel Labath [Wed, 9 Nov 2016 11:43:52 +0000 (11:43 +0000)]
[dsymutil] Replace TimeValue with TimePoint

Summary:
All changes are pretty straight-forward. I chose to use TimePoints with
second precision, as that is all that seems to be required here.

Reviewers: friss, zturner

Subscribers: llvm-commits

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

llvm-svn: 286358

8 years agoReplace TimeValue with TimePoint in BuildSystem.cpp. NFC.
Pavel Labath [Wed, 9 Nov 2016 11:19:39 +0000 (11:19 +0000)]
Replace TimeValue with TimePoint in BuildSystem.cpp. NFC.

llvm-svn: 286357

8 years ago[VFS] Replace TimeValue usage with std::chrono
Pavel Labath [Wed, 9 Nov 2016 10:52:22 +0000 (10:52 +0000)]
[VFS] Replace TimeValue usage with std::chrono

Summary: NFCI

Reviewers: benlangmuir, zturner

Subscribers: cfe-commits

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

llvm-svn: 286356

8 years agoDisplay the pointer value in the libstdc++ unique_ptr summary
Pavel Labath [Wed, 9 Nov 2016 10:42:29 +0000 (10:42 +0000)]
Display the pointer value in the libstdc++ unique_ptr summary

Summary:
r284830 added a summary provider for unique_ptr in libstdc++, whose value printed
the value of the pointee. This is a bit unintuitive as it becomes unobvious that
the value actually is a pointer, and we lose the way to actually obtain the
pointer value.

Change that to print the pointer value instead. The pointee value can still be
obtained through the synthetic children.

Reviewers: tberghammer, granata.enrico

Subscribers: lldb-commits

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

llvm-svn: 286355

8 years ago[Sema] Avoid -Wshadow warnings for shadowed variables that aren't captured
Alex Lorenz [Wed, 9 Nov 2016 10:38:57 +0000 (10:38 +0000)]
[Sema] Avoid -Wshadow warnings for shadowed variables that aren't captured
by lambdas with an explicit capture list

This commit avoids the -Wshadow warning for variables which shadow variables
that aren't captured by lambdas with an explicit capture list. It provides an
additional note that points to location of the explicit capture.

The old behaviour is preserved with -Wshadow-all or -Wshadow-uncaptured-local.

rdar://17135966

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

llvm-svn: 286354

8 years ago[ELF] ARM and AArch64 undefined weak reference values
Peter Smith [Wed, 9 Nov 2016 10:22:29 +0000 (10:22 +0000)]
[ELF] ARM and AArch64 undefined weak reference values

The ARM 32 and 64-bit ABI does not use 0 for undefined weak references
that are used in PC relative relocations. In particular:
- A branch relocation to an undefined weak resolves to the next
  instruction. Effectively making the branch a no-op
- In all other cases the symbol resolves to the place so that S + A - P
  resolves to A.

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

llvm-svn: 286353

8 years agoDisable windows-only minidump plugin
Pavel Labath [Wed, 9 Nov 2016 10:16:11 +0000 (10:16 +0000)]
Disable windows-only minidump plugin

Summary:
This commit disables the windows-only minidump plugin and enables the new
cross-platform plugin for windows minidump files. Test decorators are adjusted to
reflect that: windows minidump tests can now run  on all platforms. The exception
is the tests that create minidump files, as that functionality is not available
yet.  I've checked that this works on windows and linux.

Reviewers: amccarth, zturner

Subscribers: dvlahovski, lldb-commits

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

llvm-svn: 286352

8 years ago[mips] Add non-const getter for the Elf_Mips_Options class. NFC
Simon Atanasyan [Wed, 9 Nov 2016 10:14:55 +0000 (10:14 +0000)]
[mips] Add non-const getter for the Elf_Mips_Options class. NFC

llvm-svn: 286351

8 years ago[MachineScheduler] Comments fixing.
Jonas Paulsson [Wed, 9 Nov 2016 09:59:27 +0000 (09:59 +0000)]
[MachineScheduler] Comments fixing.

The name/comment of the third argument to the ScheduleDAGMI constructor
is RemoveKillFlags and not IsPostRA. Only the comments are changed.

Review: A Trick
llvm-svn: 286350

8 years agoRemove TimeValue usage from Core/Module
Pavel Labath [Wed, 9 Nov 2016 09:59:18 +0000 (09:59 +0000)]
Remove TimeValue usage from Core/Module

Summary:
The only interesting part here is that TimePoint and TimeValue have different
natural string representations, which affects "target modules list" output. It
is now "2016-07-09 04:02:21.000000000", whereas previously in was
"Sat Jul  9 04:02:21 2016". I wanted to check if we're OK with that.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 286349

8 years ago[ELF] - Ignore -stats command line option.
George Rimar [Wed, 9 Nov 2016 08:59:59 +0000 (08:59 +0000)]
[ELF] - Ignore -stats command line option.

llvm-svn: 286348

8 years ago[ARM] Loop Strength Reduction crashes when targeting ARM or Thumb.
Alexandros Lamprineas [Wed, 9 Nov 2016 08:53:07 +0000 (08:53 +0000)]
[ARM] Loop Strength Reduction crashes when targeting ARM or Thumb.

Scalar Evolution asserts when not all the operands of an Add Recurrence
Expression are loop invariants. Loop Strength Reduction should only
create affine Add Recurrences, so that both the start and the step of
the expression are loop invariants.

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

llvm-svn: 286347

8 years agoPacify lint check
Jonas Hahnfeld [Wed, 9 Nov 2016 08:36:45 +0000 (08:36 +0000)]
Pacify lint check

llvm-svn: 286346

8 years ago[AVX-512] Add lowering to cvttpd2udq/cvttps2udq for fptoui v2f64/2f32 to 2i32
Craig Topper [Wed, 9 Nov 2016 07:48:51 +0000 (07:48 +0000)]
[AVX-512] Add lowering to cvttpd2udq/cvttps2udq for fptoui v2f64/2f32 to 2i32

This patch adds support for fptoui to 2i32 from both 2f64 and 2f32, building on Simon's change for the signed version in r284459 and using AVX-512 instructions.

If we don't have VLX support we need to use a 512-bit operation for v2f64->v2i32 and extract the result.

It also recognises that cvttpd2udq zeroes the upper 64-bits of the xmm result.

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

llvm-svn: 286345

8 years ago[X86] Lower AVX512 and SSE intrinsics for CVTTPD2DQ to X86ISD::CVTTPD2DQ.
Craig Topper [Wed, 9 Nov 2016 07:31:32 +0000 (07:31 +0000)]
[X86] Lower AVX512 and SSE intrinsics for CVTTPD2DQ to X86ISD::CVTTPD2DQ.

Summary: This allows the SSE intrinsic to use the EVEX instruction when available. It also fixes EVEX to not use a weird (v4i32 (fp_to_sint v2f64)) node and it merges some isel patterns. This also fixes some cases that weren't combining vzmovl with cvttpd2dq to remove extra moves.

Reviewers: delena, zvi, RKSimon

Subscribers: llvm-commits

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

llvm-svn: 286344

8 years ago[AVX-512] Add more varied alignments to tests for storing the lower 128-bits of a...
Craig Topper [Wed, 9 Nov 2016 05:38:47 +0000 (05:38 +0000)]
[AVX-512] Add more varied alignments to tests for storing the lower 128-bits of a 256 or 512-bit subvector extract.

llvm-svn: 286343

8 years ago[AVX-512] Use alignedstore256 in patterns that look for stores of the lower 256-bits...
Craig Topper [Wed, 9 Nov 2016 05:31:57 +0000 (05:31 +0000)]
[AVX-512] Use alignedstore256 in patterns that look for stores of the lower 256-bits of a 512-bit vector to use a 256-bit aligned store.

Previously we were only checking for 16 byte alignment instead of 32 byte alignment. Fixes PR30947.

llvm-svn: 286342

8 years ago[AVX-512] Add test cases to demonstrate PR30947. We accidentally use 32 byte aligned...
Craig Topper [Wed, 9 Nov 2016 05:31:53 +0000 (05:31 +0000)]
[AVX-512] Add test cases to demonstrate PR30947. We accidentally use 32 byte aligned store instructions when the original store was only 16 byte aligned if the store is from the lower bits of a subvector extract.

llvm-svn: 286341

8 years ago[AVX-512] Make VBMI instruction set enabling imply that the BWI instruction set is...
Craig Topper [Wed, 9 Nov 2016 04:51:03 +0000 (04:51 +0000)]
[AVX-512] Make VBMI instruction set enabling imply that the BWI instruction set is also enabled.

Summary: This is needed to make the v64i8 and v32i16 types legal for the 512-bit VBMI instructions. Fixes PR30912.

Reviewers: delena, zvi

Subscribers: RKSimon, cfe-commits

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

llvm-svn: 286340

8 years ago[AVX-512] Make VBMI instruction set enabling imply that the BWI instruction set is...
Craig Topper [Wed, 9 Nov 2016 04:50:48 +0000 (04:50 +0000)]
[AVX-512] Make VBMI instruction set enabling imply that the BWI instruction set is also enabled.

Summary:
This is needed to make the v64i8 and v32i16 types legal for the 512-bit VBMI instructions. Fixes PR30912.

Reviewers: delena, zvi

Subscribers: llvm-commits

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

llvm-svn: 286339

8 years agoScopInfo: only run code needed for ASSERT in DEBUG mode
Tobias Grosser [Wed, 9 Nov 2016 04:24:49 +0000 (04:24 +0000)]
ScopInfo: only run code needed for ASSERT in DEBUG mode

Suggested-by: Johannes Doerfert
llvm-svn: 286338

8 years ago[libc++abi] Remove the test for checking using of fallback malloc in case of dynamic...
Igor Kudrin [Wed, 9 Nov 2016 04:14:31 +0000 (04:14 +0000)]
[libc++abi] Remove the test for checking using of fallback malloc in case of dynamic memory exhaustion.

This test is too fragile and doesn't add significant value. See https://reviews.llvm.org/D26150 for some details.

llvm-svn: 286337

8 years agoDoxygen comments for avxintrin.h.
Ekaterina Romanova [Wed, 9 Nov 2016 03:58:30 +0000 (03:58 +0000)]
Doxygen comments for avxintrin.h.

Added doxygen comments to avxintrin.h's intrinsics. As of now, around 75% of the
intrinsics in this file are documented here. The patches for the other 25% will be se
nt out later.

Removed extra spaces in emmitrin.h.

Note: The doxygen comments are automatically generated based on Sony's intrinsics document.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.

llvm-svn: 286336

8 years agoWhen deciding whether to use the source remapping dictionary from
Jason Molenda [Wed, 9 Nov 2016 03:42:12 +0000 (03:42 +0000)]
When deciding whether to use the source remapping dictionary from
a dSYM per-uuid plist, only use it when the DBGVersion key has a
value of 2 or greater.

<rdar://problem/28889578>
<rdar://problem/29131339>

llvm-svn: 286335

8 years agoRevert "[CMake] Check runtimes subdir when looking for libcxx and libuwind"
Petr Hosek [Wed, 9 Nov 2016 03:38:21 +0000 (03:38 +0000)]
Revert "[CMake] Check runtimes subdir when looking for libcxx and libuwind"

This reverts commit eecb79506d88b268fb0d00cce178213b4aa17933.

llvm-svn: 286334

8 years ago[CMake] Check runtimes subdir when looking for libcxxabi
Petr Hosek [Wed, 9 Nov 2016 03:22:28 +0000 (03:22 +0000)]
[CMake] Check runtimes subdir when looking for libcxxabi

The runtimes subdir is the new location for runtimes, we should
include it when looking for libcxxabi headers.

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

llvm-svn: 286333

8 years ago[CMake] Check runtimes subdir when looking for libcxx and libuwind
Petr Hosek [Wed, 9 Nov 2016 03:22:19 +0000 (03:22 +0000)]
[CMake] Check runtimes subdir when looking for libcxx and libuwind

The runtimes subdir is the new location for runtimes, we should
include it when looking for libcxx and libunwind headers.

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

llvm-svn: 286332

8 years ago[index] Fix issue with protocol name locations in conformance list of an ObjC class...
Argyrios Kyrtzidis [Wed, 9 Nov 2016 02:47:07 +0000 (02:47 +0000)]
[index] Fix issue with protocol name locations in conformance list of an ObjC class when they come from a typedef.

The ObjC class protocol list assumes there is an associated location for each protocol but no location is provided
when the protocol list comes from a typedef, and we end up with a buffer overflow when trying to get locations for the protocol names.

Fixes crash of rdar://28980278.

llvm-svn: 286331

8 years ago[XRay][docs] Fix llvm snippets to be well-formed
Dean Michael Berris [Wed, 9 Nov 2016 02:12:13 +0000 (02:12 +0000)]
[XRay][docs] Fix llvm snippets to be well-formed

llvm-svn: 286330

8 years agoRevert "[ThinLTO] Prevent exporting of locals used/defined in module level asm"
Mehdi Amini [Wed, 9 Nov 2016 01:45:13 +0000 (01:45 +0000)]
Revert "[ThinLTO] Prevent exporting of locals used/defined in module level asm"

This reverts commit r286297.
Introduces a dependency from libAnalysis to libObject, which I missed
during the review.

llvm-svn: 286329

8 years ago[doc] Remove explicit CMake version requirement for MSVC
Mehdi Amini [Wed, 9 Nov 2016 01:44:42 +0000 (01:44 +0000)]
[doc] Remove explicit CMake version requirement for MSVC

The global minimum one is way past this version.

llvm-svn: 286328

8 years agoSplit Header into individual fields.
Rafael Espindola [Wed, 9 Nov 2016 01:42:41 +0000 (01:42 +0000)]
Split Header into individual fields.

This is similar to what was done for InputSection.

With this the various fields are stored in host order and only
converted to target order when writing.

llvm-svn: 286327

8 years agoBitcode: Remove the remnants of the BitcodeDiagnosticInfo class.
Peter Collingbourne [Wed, 9 Nov 2016 01:09:11 +0000 (01:09 +0000)]
Bitcode: Remove the remnants of the BitcodeDiagnosticInfo class.

The BitcodeReader no longer produces BitcodeDiagnosticInfo diagnostics.
The only remaining reference was in the gold plugin; the code there has been
dead since we stopped producing InvalidBitcodeSignature error codes in r225562.
While at it remove the InvalidBitcodeSignature error code.

llvm-svn: 286326

8 years agoEnable Loop Sink pass for functions that has profile.
Dehao Chen [Wed, 9 Nov 2016 00:58:19 +0000 (00:58 +0000)]
Enable Loop Sink pass for functions that has profile.

Summary: For functions with profile data, we are confident that loop sink will be optimal in sinking code.

Reviewers: davidxl, hfinkel

Subscribers: mehdi_amini, mzolotukhin, llvm-commits

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

llvm-svn: 286325

8 years agoclang-cl: Pass /Zc:threadSafeInit through to MSVC with /fallback (PR30948)
Hans Wennborg [Wed, 9 Nov 2016 00:56:42 +0000 (00:56 +0000)]
clang-cl: Pass /Zc:threadSafeInit through to MSVC with /fallback (PR30948)

llvm-svn: 286324

8 years agoBitcode: Change the BitcodeReader to use llvm::Error internally.
Peter Collingbourne [Wed, 9 Nov 2016 00:51:04 +0000 (00:51 +0000)]
Bitcode: Change the BitcodeReader to use llvm::Error internally.

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

llvm-svn: 286323

8 years agoEmit debug info for global constants whose address is taken exactly once.
Adrian Prantl [Wed, 9 Nov 2016 00:42:03 +0000 (00:42 +0000)]
Emit debug info for global constants whose address is taken exactly once.

Add a check to the DeclCache before emitting debug info for a
GlobalVariable a second time and just attach the previsously created one to it.

<rdar://problem/26721101>

llvm-svn: 286322

8 years ago[asan] Ignore host LD_LIBRARY_PATH in device tests.
Evgeniy Stepanov [Wed, 9 Nov 2016 00:33:43 +0000 (00:33 +0000)]
[asan] Ignore host LD_LIBRARY_PATH in device tests.

I'm not sure why is it there, but it is breaking tests on Android N
because of unexpected linker output about an empty LD_LIBRARY_PATH
entry.

llvm-svn: 286321

8 years ago[asan] Disable unexpected passing test.
Evgeniy Stepanov [Wed, 9 Nov 2016 00:33:41 +0000 (00:33 +0000)]
[asan] Disable unexpected passing test.

This test fails on some versions of Android and passes on other versions.
Replace XFAIL with UNSUPPORTED.

llvm-svn: 286320

8 years ago[XRay][Docs] Add documentation for XRay in LLVM
Dean Michael Berris [Wed, 9 Nov 2016 00:24:58 +0000 (00:24 +0000)]
[XRay][Docs] Add documentation for XRay in LLVM

Summary:
This is the initial version of the documentation for how to use XRay as
it stands in LLVM, Clang, and compiler-rt. We leave some room for later
expansion mentioining what is work in progress and what could be
expected moving forward.

We also give a high level overview of future work that's both ongoing
and planned.

Reviewers: echristo, dblaikie, chandlerc

Subscribers: mehdi_amini, llvm-commits

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

llvm-svn: 286319

8 years ago[ValueTracking] recognize obfuscated variants of umin/umax
Sanjay Patel [Wed, 9 Nov 2016 00:24:44 +0000 (00:24 +0000)]
[ValueTracking] recognize obfuscated variants of umin/umax

The smallest tests that expose this are codegen tests (because SelectionDAGBuilder::visitSelect() uses matchSelectPattern
to create UMAX/UMIN nodes), but it's also possible to see the effects in IR alone with folds of min/max pairs.

If these were written as unsigned compares in IR, InstCombine canonicalizes the unsigned compares to signed compares.
Ie, running the optimizer pessimizes the codegen for this case without this patch:

define <4 x i32> @umax_vec(<4 x i32> %x) {
  %cmp = icmp ugt <4 x i32> %x, <i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647>
  %sel = select <4 x i1> %cmp, <4 x i32> %x, <4 x i32> <i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647>
  ret <4 x i32> %sel
}

$ ./opt umax.ll -S | ./llc -o - -mattr=avx

vpmaxud LCPI0_0(%rip), %xmm0, %xmm0

$ ./opt -instcombine umax.ll -S | ./llc -o - -mattr=avx

vpxor %xmm1, %xmm1, %xmm1
vpcmpgtd  %xmm0, %xmm1, %xmm1
vmovaps LCPI0_0(%rip), %xmm2    ## xmm2 = [2147483647,2147483647,2147483647,2147483647]
vblendvps %xmm1, %xmm0, %xmm2, %xmm0

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

llvm-svn: 286318

8 years ago[cmake] Fix handling compiler-rt in LLVM_ENABLE_PROJECTS by turning any "-" into "_"
Mehdi Amini [Wed, 9 Nov 2016 00:23:20 +0000 (00:23 +0000)]
[cmake] Fix handling compiler-rt in LLVM_ENABLE_PROJECTS by turning any "-" into "_"

llvm-svn: 286317