platform/upstream/llvm.git
8 years ago[windows] Remove CHECK for strdup symbol that comes from the CRT
Reid Kleckner [Tue, 11 Aug 2015 16:56:26 +0000 (16:56 +0000)]
[windows] Remove CHECK for strdup symbol that comes from the CRT

llvm-symbolizer isn't symbolizing it for some reason. I'll investigate.

llvm-svn: 244629

8 years agoDelete unused typedef.
Rafael Espindola [Tue, 11 Aug 2015 16:55:28 +0000 (16:55 +0000)]
Delete unused typedef.

llvm-svn: 244628

8 years agofixed to use FileCheck
Sanjay Patel [Tue, 11 Aug 2015 16:51:31 +0000 (16:51 +0000)]
fixed to use FileCheck

llvm-svn: 244627

8 years agoCOFF: Ignore /editandcontinue option.
Rui Ueyama [Tue, 11 Aug 2015 16:46:08 +0000 (16:46 +0000)]
COFF: Ignore /editandcontinue option.

llvm-svn: 244626

8 years agofixed to test attribute, rather than CPU
Sanjay Patel [Tue, 11 Aug 2015 16:43:18 +0000 (16:43 +0000)]
fixed to test attribute, rather than CPU

llvm-svn: 244625

8 years agoDon't report a conflict between two local symbols.
Rafael Espindola [Tue, 11 Aug 2015 16:30:34 +0000 (16:30 +0000)]
Don't report a conflict between two local symbols.

llvm-svn: 244624

8 years agoSpeculative fix for Mac build
Reid Kleckner [Tue, 11 Aug 2015 16:30:27 +0000 (16:30 +0000)]
Speculative fix for Mac build

llvm-svn: 244623

8 years agoEnable EliminateAvailableExternally pass in the LTO pipeline.
Teresa Johnson [Tue, 11 Aug 2015 16:26:41 +0000 (16:26 +0000)]
Enable EliminateAvailableExternally pass in the LTO pipeline.

Summary:
For LTO we need to enable this pass in the LTO pipeline,
as it is skipped during the "-flto -c" compile step (when PrepareForLTO is
set).

Reviewers: rnk

Subscribers: llvm-commits

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

llvm-svn: 244622

8 years agoRevert "Add non-member begin and end so that drop_begin works on iterator_range."
Rafael Espindola [Tue, 11 Aug 2015 16:26:06 +0000 (16:26 +0000)]
Revert "Add non-member begin and end so that drop_begin works on iterator_range."

This reverts commit r244620.

MSVC doesn't like it :-(

llvm-svn: 244621

8 years agoAdd non-member begin and end so that drop_begin works on iterator_range.
Rafael Espindola [Tue, 11 Aug 2015 16:12:56 +0000 (16:12 +0000)]
Add non-member begin and end so that drop_begin works on iterator_range.

llvm-svn: 244620

8 years agofix typos; NFC
Sanjay Patel [Tue, 11 Aug 2015 16:10:41 +0000 (16:10 +0000)]
fix typos; NFC

llvm-svn: 244619

8 years agoVariable names should start with an upper case letter; NFC
Sanjay Patel [Tue, 11 Aug 2015 16:05:43 +0000 (16:05 +0000)]
Variable names should start with an upper case letter; NFC

llvm-svn: 244618

8 years agofix minsize detection: minsize attribute implies optimizing for size
Sanjay Patel [Tue, 11 Aug 2015 15:56:31 +0000 (15:56 +0000)]
fix minsize detection: minsize attribute implies optimizing for size

llvm-svn: 244617

8 years ago[Windows] Use llvm-symbolizer before using dbghelp
Reid Kleckner [Tue, 11 Aug 2015 15:51:40 +0000 (15:51 +0000)]
[Windows] Use llvm-symbolizer before using dbghelp

Summary:
llvm-symbolizer understands both PDBs and DWARF, so it's a better bet if
it's available. It prints out the function parameter types and column
numbers, so I needed to churn the expected test output a bit.

This makes most of the llvm-symbolizer subprocessing code
target-independent. Pipes on all platforms use fd_t, and we can use the
portable ReadFromFile / WriteToFile wrappers in symbolizer_sanitizer.cc.
Only the pipe creation and process spawning is Windows-specific.

Please check that the libcdep layering is still correct. I don't know
how to reproduce the build configuration that relies on that.

Reviewers: samsonov

Subscribers: llvm-commits

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

llvm-svn: 244616

8 years ago[GlobalMerge] Use private linkage for MergedGlobals variables
John Brawn [Tue, 11 Aug 2015 15:48:04 +0000 (15:48 +0000)]
[GlobalMerge] Use private linkage for MergedGlobals variables

Other objects can never reference the MergedGlobals symbol so external linkage
is never needed. Using private instead of internal linkage means the object is
more similar to what it looks like when global merging is not enabled, with
the only difference being that the merged variables are addressed indirectly
relative to the start of the section they are in.

Also add aliases for merged variables with internal linkage, as this also makes
the object be more like what it is when they are not merged.

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

llvm-svn: 244615

8 years agoFix InstCombine test: invalid CHECK line slipped in r231270
Mehdi Amini [Tue, 11 Aug 2015 15:31:17 +0000 (15:31 +0000)]
Fix InstCombine test: invalid CHECK line slipped in r231270

I incorrectly wrote CHECK-NEXT with followin with ':', the check was
ignored by FileCheck.
The non-inbound GEP is folded here because the DataLayout is no longer
optional, the fold was originally guarded with a comment that said:
    We need TD information to know the pointer size unless this is inbounds.
Now we always have "TD information" and perform the fold.

Thanks Jonathan Roelofs for noticing.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 244613

8 years agoremove unnecessary settings/attributes from test case
Sanjay Patel [Tue, 11 Aug 2015 15:30:53 +0000 (15:30 +0000)]
remove unnecessary settings/attributes from test case

llvm-svn: 244612

8 years ago[RegionInfo] Verify getRegionFor
Michael Kruse [Tue, 11 Aug 2015 15:16:43 +0000 (15:16 +0000)]
[RegionInfo] Verify getRegionFor

Summary:
Check the contents of BBtoRegion during analysis verification. It only takes place if -verify-region-info is passed or LLVM is compiled with XDEBUG.

RegionBase<Tr>::verifyRegion() also checks the RegionInfoBase<Tr>::VerifyRegionInfo flag, which is redundant, but verifyRegion() is public API and might be invoked from other sites. In order to avoid behavioral change, this check is not removed. In any case, no region will be verified unless VerifyRegionInfo is set.

Reviewers: grosser

Subscribers: llvm-commits

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

llvm-svn: 244611

8 years agofix code that was accidentally commented out in previous commit
Sanjay Patel [Tue, 11 Aug 2015 15:08:29 +0000 (15:08 +0000)]
fix code that was accidentally commented out in previous commit

llvm-svn: 244610

8 years agofix typos in comments; NFC
Sanjay Patel [Tue, 11 Aug 2015 15:04:51 +0000 (15:04 +0000)]
fix typos in comments; NFC

llvm-svn: 244609

8 years agoAssign regions to all BBs from CodeGeneration
Michael Kruse [Tue, 11 Aug 2015 14:47:37 +0000 (14:47 +0000)]
Assign regions to all BBs from CodeGeneration

In order to have a valid region analysis, we assign all newly created blocks to the parent of the scop's region. This is correct for any pre-existing regions (including the scop's region and its parent), but does not discover any region inside the generated code. For Polly this is not necessary because we do not want to re-run Polly on its own generated code anyway.

Reviewers: grosser

Part of Differential Revision: http://reviews.llvm.org/D11867

llvm-svn: 244608

8 years agofix typo in comment; NFC
Sanjay Patel [Tue, 11 Aug 2015 14:45:08 +0000 (14:45 +0000)]
fix typo in comment; NFC

llvm-svn: 244607

8 years agoRevise the simplification of regions
Michael Kruse [Tue, 11 Aug 2015 14:39:21 +0000 (14:39 +0000)]
Revise the simplification of regions

The previous code had several problems:

For newly created BasicBlocks it did not (always) call RegionInfo::setRegionFor in order to update its analysis. At the moment RegionInfo does not verify its BBMap, but will in the future. This is fixed by determining the region new BBs belong to and set it accordingly. The new executeScopConditionally() requires accurate getRegionFor information.

Which block is created by SplitEdge depends on the incoming and outgoing edges of the blocks it connects, which makes handling its output more difficult than it needs to be. Especially for finding which block has been created an to assign a region to it for the setRegionFor problem above. This patch uses an implementation for splitEdge that always creates a block between the predecessor and successor. simplifyRegion has also been simplified by using SplitBlockPredecessors instead of SplitEdge. Isolating the entries and exits have been refectored into individual functions.

Previously simplifyRegion did more than just ensuring that there is only one entering and one exiting edge. It ensured that the entering block had no other outgoing edge which was necessary for executeScopConditionally(). Now the latter uses the alternative splitEdge implementation which can handle this situation so simplifyRegion really only needs to simplify the region.

Also, executeScopConditionally assumed that there can be no PHI nodes in blocks with one incoming edge. This is wrong and LCSSA deliberately produces such edges. However, previous passes ensured that there can be no such PHIs in exit nodes, but which will no longer hold in the future.

The new code that the property that it preserves the identity of region block (the property that the memory address of the BasicBlock containing the instructions remains the same; new blocks only contain PHI nodes and a terminator), especially the entry block. As a result, there is no need to update the reference to the BasicBlock of ScopStmt that contain its instructions because they have been moved to other basic blocks.

Reviewers: grosser

Part of Differential Revision: http://reviews.llvm.org/D11867

llvm-svn: 244606

8 years agodelete FIXME comment; it's fixed
Sanjay Patel [Tue, 11 Aug 2015 14:35:29 +0000 (14:35 +0000)]
delete FIXME comment; it's fixed

llvm-svn: 244605

8 years agofix minsize detection: minsize attribute implies optimizing for size
Sanjay Patel [Tue, 11 Aug 2015 14:31:14 +0000 (14:31 +0000)]
fix minsize detection: minsize attribute implies optimizing for size

llvm-svn: 244604

8 years agoadd missing test for machine combiner when optimizing for size
Sanjay Patel [Tue, 11 Aug 2015 14:29:45 +0000 (14:29 +0000)]
add missing test for machine combiner when optimizing for size

The minsize test will be fixed in the next commit.

llvm-svn: 244603

8 years ago1. Disable tests that currently cannot work on windows due to missing path canonicali...
Manuel Klimek [Tue, 11 Aug 2015 14:21:26 +0000 (14:21 +0000)]
1. Disable tests that currently cannot work on windows due to missing path canonicalization in the file manager.
2. Add better output when a clang-tidy unit test fails so it's clear what the error is.

llvm-svn: 244602

8 years ago[X86] Allow merging of immediates within a basic block for code size savings
Michael Kuperstein [Tue, 11 Aug 2015 14:10:58 +0000 (14:10 +0000)]
[X86] Allow merging of immediates within a basic block for code size savings

First step in preventing immediates that occur more than once within a single
basic block from being pulled into their users, in order to prevent unnecessary
large instruction encoding .Currently enabled only when optimizing for size.

Patch by: zia.ansari@intel.com
Differential Revision: http://reviews.llvm.org/D11363

llvm-svn: 244601

8 years agoIntroduce splitBlock and use it in splitEntryBlockForAlloca
Michael Kruse [Tue, 11 Aug 2015 14:04:06 +0000 (14:04 +0000)]
Introduce splitBlock and use it in splitEntryBlockForAlloca

RegionInfo::splitBlock did not update RegionInfo correctly. Specifically, it tried to make the new block the entry block if possible. This breaks for nested regions that have edges to the old block.

We simply do not change the entry block. Updating RegionInfo becomes trivial as both block will always be in the same region.

splitEntryBlockForAlloca makes use of the new splitBlock.

Reviewers: grosser

Part of Differential Revision: http://reviews.llvm.org/D11867

llvm-svn: 244600

8 years agoAlso ClangTidyTests requires clangLex.
NAKAMURA Takumi [Tue, 11 Aug 2015 13:16:51 +0000 (13:16 +0000)]
Also ClangTidyTests requires clangLex.

llvm-svn: 244599

8 years agoFix strict dependency uncovered by windows bot.
Manuel Klimek [Tue, 11 Aug 2015 13:11:29 +0000 (13:11 +0000)]
Fix strict dependency uncovered by windows bot.

llvm-svn: 244598

8 years agoDo not use inheriting constructors.
Manuel Klimek [Tue, 11 Aug 2015 12:59:22 +0000 (12:59 +0000)]
Do not use inheriting constructors.

llvm-svn: 244597

8 years agoDefault initialize from explicitly constructed object.
Manuel Klimek [Tue, 11 Aug 2015 12:13:15 +0000 (12:13 +0000)]
Default initialize from explicitly constructed object.

llvm-svn: 244596

8 years ago[AArch64] Match fminnum/fmaxnum for vector fminnm/fmaxnm instead of an intrinsic.
James Molloy [Tue, 11 Aug 2015 12:06:37 +0000 (12:06 +0000)]
[AArch64] Match fminnum/fmaxnum for vector fminnm/fmaxnm instead of an intrinsic.

Lower Intrinsic::aarch64_neon_fmin/fmax to fminnum/fmannum and match that instead. Minimal functional change:

  - Extra tests added because coverage of scalar fminnm/fmaxnm instructions was nonexistant.
  - f16 test updated because now we actually generate scalar fminnm/fmaxnm we no longer need to bail out to a libcall!

llvm-svn: 244595

8 years ago[AArch64] Replace the custom AArch64ISD::FMIN/MAX nodes with ISD::FMINNAN/MAXNAN
James Molloy [Tue, 11 Aug 2015 12:06:33 +0000 (12:06 +0000)]
[AArch64] Replace the custom AArch64ISD::FMIN/MAX nodes with ISD::FMINNAN/MAXNAN

NFCI. This just removes custom ISDNodes that are no longer needed.

llvm-svn: 244594

8 years ago[ARM] Match fminnan/fmaxnan for vector vmin/vmax instead of an intrinsic
James Molloy [Tue, 11 Aug 2015 12:06:28 +0000 (12:06 +0000)]
[ARM] Match fminnan/fmaxnan for vector vmin/vmax instead of an intrinsic

Lower Intrinsic::arm_neon_vmins/vmaxs to fminnan/fmaxnan and match that instead. This is important because SDAG will soon be able to select FMINNAN itself, so we need a unified lowering path for intrinsics and SDAG.

NFCI.

llvm-svn: 244593

8 years ago[ARM] Match fminnum/fmaxnum for vector vminnm/vmaxnm instead of an intrinsic
James Molloy [Tue, 11 Aug 2015 12:06:25 +0000 (12:06 +0000)]
[ARM] Match fminnum/fmaxnum for vector vminnm/vmaxnm instead of an intrinsic

Lower the intrinsic to a FMINNUM/FMAXNUM node and select that instead. This is important because soon SDAG will be able to select FMINNUM/FMAXNUM itself, so we need an integrated lowering path between SDAG and intrinsics.

NFCI.

llvm-svn: 244592

8 years ago[ARM] Replace ARMISD::VMINNM/VMAXNM with ISD::FMINNUM/FMAXNUM
James Molloy [Tue, 11 Aug 2015 12:06:22 +0000 (12:06 +0000)]
[ARM] Replace ARMISD::VMINNM/VMAXNM with ISD::FMINNUM/FMAXNUM

NFCI. This replaces another custom ISDNode with a generic equivalent.

llvm-svn: 244591

8 years ago[ARM] Replace ARMISD::FMIN/FMAX with the shiny new ISD::FMINNAN/FMAXNAN.
James Molloy [Tue, 11 Aug 2015 12:06:15 +0000 (12:06 +0000)]
[ARM] Replace ARMISD::FMIN/FMAX with the shiny new ISD::FMINNAN/FMAXNAN.

NFCI. This removes a custom ISDNode.

llvm-svn: 244590

8 years agoRevert r244516; it was causing cmake configuration failures on Windows with Visual...
Aaron Ballman [Tue, 11 Aug 2015 12:06:04 +0000 (12:06 +0000)]
Revert r244516; it was causing cmake configuration failures on Windows with Visual Studio.

http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/475

llvm-svn: 244589

8 years ago[X86] Add SAL mnemonics for Intel syntax
Marina Yatsina [Tue, 11 Aug 2015 12:05:06 +0000 (12:05 +0000)]
[X86] Add SAL mnemonics for Intel syntax

SAL and SHL instructions perform the same operation

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

llvm-svn: 244588

8 years agoFix shadowing of type with variable.
Manuel Klimek [Tue, 11 Aug 2015 12:02:28 +0000 (12:02 +0000)]
Fix shadowing of type with variable.

llvm-svn: 244587

8 years agoAdd an IncludeInserter to clang-tidy.
Manuel Klimek [Tue, 11 Aug 2015 11:37:48 +0000 (11:37 +0000)]
Add an IncludeInserter to clang-tidy.

Will be used to allow checks to insert includes at the right position.

llvm-svn: 244586

8 years agoUpdate isl to isl-0.15-117-ge42acfe
Tobias Grosser [Tue, 11 Aug 2015 11:31:18 +0000 (11:31 +0000)]
Update isl to isl-0.15-117-ge42acfe

Besides other changes this version of isl contains a fundamental fix to memory
corruption issues we have seen with imath-32 backed isl_ints.

This update also contains a fix that ensures that the schedule-tree based
version of isl's dependence analysis takes the domain of the schedule into
account.

llvm-svn: 244585

8 years ago[X86] Fix REPE, REPZ, REPNZ for intel syntax
Marina Yatsina [Tue, 11 Aug 2015 11:28:10 +0000 (11:28 +0000)]
[X86] Fix REPE, REPZ, REPNZ for intel syntax

REPE, REPZ, REPNZ, REPNE should have mnemonics for Intel syntax as well.
Currently using these instructions causes compilation errors for Intel syntax.

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

llvm-svn: 244584

8 years agoRevert "[CUDA] Add implicit __attribute__((used)) to all __global__ functions."
Daniel Jasper [Tue, 11 Aug 2015 11:02:09 +0000 (11:02 +0000)]
Revert "[CUDA] Add implicit __attribute__((used)) to all __global__ functions."

This is breaking internal test. I'll provide a reproduction.

llvm-svn: 244583

8 years ago[X86] Fix imul alias for intel syntax
Marina Yatsina [Tue, 11 Aug 2015 10:43:04 +0000 (10:43 +0000)]
[X86] Fix imul alias for intel syntax

The "imul reg, imm" alias is not defined for intel syntax.
In intel syntax there is no w/l/q suffix for the imul instruction.

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

llvm-svn: 244582

8 years agoAdd new ISD nodes: ISD::FMINNAN and ISD::FMAXNAN
James Molloy [Tue, 11 Aug 2015 09:13:05 +0000 (09:13 +0000)]
Add new ISD nodes: ISD::FMINNAN and ISD::FMAXNAN

The intention of these is to be a corollary to ISD::FMINNUM/FMAXNUM,
differing only on how NaNs are treated. FMINNUM returns the non-NaN
input (when given one NaN and one non-NaN), FMINNAN returns the NaN
input instead.

This patch includes support for scalarizing, widening and splitting
vectors, but not expansion or softening. The reason is that these
should never be needed - FMINNAN nodes are only going to be created
in one place (SDAGBuilder::visitSelect) and there we'll check if the
node is legal or custom. I could preemptively add expand and soften
code, but I'm fairly opposed to adding code I can't test. It's bad
enough I can't create tests with this patch, but at least this code
will be exercised by the ARM and AArch64 backends fairly shortly.

llvm-svn: 244581

8 years agoAdd support for floating-point minnum and maxnum
James Molloy [Tue, 11 Aug 2015 09:12:57 +0000 (09:12 +0000)]
Add support for floating-point minnum and maxnum

The select pattern recognition in ValueTracking (as used by InstCombine
and SelectionDAGBuilder) only knew about integer patterns. This teaches
it about minimum and maximum operations.

matchSelectPattern() has been extended to return a struct containing the
existing Flavor and a new enum defining the pattern's behavior when
given one NaN operand.

C minnum() is defined to return the non-NaN operand in this case, but
the idiomatic C "a < b ? a : b" would return the NaN operand.

ARM and AArch64 at least have different instructions for these different cases.

llvm-svn: 244580

8 years ago[mips] Remap move as or.
Vasileios Kalintiris [Tue, 11 Aug 2015 08:56:25 +0000 (08:56 +0000)]
[mips] Remap move as or.

Summary:
This patch remaps the assembly idiom 'move' to 'or' instead of 'daddu' or
'addu'. The use of addu/daddu instead of or as move was highlighted as a
performance issue during the analysis of a recent 64bit design. Originally
move was encoded as 'or' by binutils but was changed for the r10k cpu family
due to their pipeline which had 2 arithmetic units and a single logical unit,
and so could issue multiple (d)addu based moves at the same time but only 1
logical move.

This patch preserves the disassembly behaviour so that disassembling a old style
(d)addu move still appears as move, but assembling move always gives an or

Patch by Simon Dardis.

Reviewers: vkalintiris

Subscribers: llvm-commits

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

llvm-svn: 244579

8 years ago[X86] When optimizing for minsize, use POP for small post-call stack clean-up
Michael Kuperstein [Tue, 11 Aug 2015 08:48:48 +0000 (08:48 +0000)]
[X86] When optimizing for minsize, use POP for small post-call stack clean-up

When optimizing for size, replace "addl $4, %esp" and "addl $8, %esp"
following a call by one or two pops, respectively. We don't try to do it in
general, but only when the stack adjustment immediately follows a call - which
is the most common case.

That allows taking a short-cut when trying to find a free register to pop into,
instead of a full-blown liveness check. If the adjustment immediately follows a
call, then every register the call clobbers but doesn't define should be dead at
that point, and can be used.

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

llvm-svn: 244578

8 years agoAllow PeepholeOptimizer to fold a few more cases
Michael Kuperstein [Tue, 11 Aug 2015 08:19:43 +0000 (08:19 +0000)]
Allow PeepholeOptimizer to fold a few more cases

The condition for clearing the folding candidate list was clamped together
with the "uninteresting instruction" condition. This is too conservative,
e.g. we don't need to clear the list when encountering an IMPLICIT_DEF.

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

llvm-svn: 244577

8 years agoBlockGenerator: Do not store 'store' statements in BBMap
Tobias Grosser [Tue, 11 Aug 2015 08:13:15 +0000 (08:13 +0000)]
BlockGenerator: Do not store 'store' statements in BBMap

A store statement has no return value and can consequently not be referenced
from another statement.

llvm-svn: 244576

8 years ago[GMR] Be a bit smarter about which globals don't alias when doing recursive lookups
Michael Kuperstein [Tue, 11 Aug 2015 08:06:44 +0000 (08:06 +0000)]
[GMR] Be a bit smarter about which globals don't alias when doing recursive lookups

Should hopefully fix the remainder of PR24288.

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

llvm-svn: 244575

8 years ago[RuntimeDyld][AArch64] Add explicit addends before calling relocationValueRef.
Lang Hames [Tue, 11 Aug 2015 06:27:53 +0000 (06:27 +0000)]
[RuntimeDyld][AArch64] Add explicit addends before calling relocationValueRef.

relocationValueRef uses the addend, so it has to be set before the call.

llvm-svn: 244574

8 years agoAdd size field to library load event (MI)
Ilia K [Tue, 11 Aug 2015 06:07:14 +0000 (06:07 +0000)]
Add size field to library load event (MI)

Summary:
(This revision supersedes the abandon: http://reviews.llvm.org/D9716)
Size field is used to let the debugger attribute an address to a specific library when symbols are not available.
For example:
OpenGLESApp4.app!Cube_draw() Line 74 C
  OpenGLESApp4.app!-[GameViewController glkView:drawInRect:](GameViewController * self, SEL _cmd, GLKView * view, CGRect rect) Line 89 C++
  GLKit!<redacted>
  QuartzCore!<redacted>
  QuartzCore!<redacted>
  QuartzCore!<redacted>
  QuartzCore!<redacted>
  QuartzCore!<redacted>
  UIKit!<redacted>
  UIKit!<redacted>
  UIKit!<redacted>
  UIKit!<redacted>
  FrontBoardServices!<redacted>
  CoreFoundation!<redacted>

Patch from paulmay@microsoft.com

Reviewers: ChuckR, abidh, ki.stfu

Subscribers: greggm, lldb-commits

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

llvm-svn: 244573

8 years agoEnable five passing dsymutil tests on Windows.
Yaron Keren [Tue, 11 Aug 2015 06:05:27 +0000 (06:05 +0000)]
Enable five passing dsymutil tests on Windows.
These tests pass with Windows 7 x64 + MSYS2. I'll see if the bots like
them as well and disable the failing ones.

llvm-svn: 244572

8 years agoFix unused variable 'X' in release builds.
Nick Lewycky [Tue, 11 Aug 2015 05:57:10 +0000 (05:57 +0000)]
Fix unused variable 'X' in release builds.

llvm-svn: 244571

8 years agoWebAssembly: NFC fix release build break, unused variable.
JF Bastien [Tue, 11 Aug 2015 04:52:24 +0000 (04:52 +0000)]
WebAssembly: NFC fix release build break, unused variable.

Summary: Caused by D11914, pointed out by blaikie.

Subscribers: llvm-commits, jfb, dblaikie

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

llvm-svn: 244570

8 years agoThis patch fixes the assert in emitting captured code in the target data construct.
Michael Wong [Tue, 11 Aug 2015 04:52:01 +0000 (04:52 +0000)]
This patch fixes the assert in emitting captured code in the target data construct.
This is on behalf of Kelvin Li.
http://reviews.llvm.org/D11475

llvm-svn: 244569

8 years agoPropagate SourceLocations through to get a Loc on float_cast_overflow
Filipe Cabecinhas [Tue, 11 Aug 2015 04:19:28 +0000 (04:19 +0000)]
Propagate SourceLocations through to get a Loc on float_cast_overflow

Summary:
float_cast_overflow is the only UBSan check without a source location attached.
This patch propagates SourceLocations where necessary to get them to the
EmitCheck() call.

Reviewers: rsmith, ABataev, rjmccall

Subscribers: cfe-commits

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

llvm-svn: 244568

8 years ago[compiler-rt] Add SourceLocations for float_cast_overflow data.
Filipe Cabecinhas [Tue, 11 Aug 2015 04:19:24 +0000 (04:19 +0000)]
[compiler-rt] Add SourceLocations for float_cast_overflow data.

Summary:
Compiler-rt part of http://reviews.llvm.org/D11757
I ended up making UBSan work with both the old version and the new
version of the float_cast_overflow data (instead of just erroring with
the previous version). The old version will try to symbolize its caller.

Now we compile the float_cast_overflow tests without -g, and make sure
we have the source file+line+column.

If you think I'm trying too hard to make sure we can still use both
versions, let me know.

Reviewers: samsonov, rsmith

Subscribers: llvm-commits

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

llvm-svn: 244567

8 years ago[libFuzzer] fix docs build
Kostya Serebryany [Tue, 11 Aug 2015 04:16:37 +0000 (04:16 +0000)]
[libFuzzer] fix docs build

llvm-svn: 244566

8 years agoCOFF: Update README.
Rui Ueyama [Tue, 11 Aug 2015 03:44:51 +0000 (03:44 +0000)]
COFF: Update README.

It's no longer "new" because the old COFF linker has been removed.
Update the introduction accordingly.

llvm-svn: 244565

8 years ago[MSVC Compat] Implement __is_destructible, __is_nothrow_destructible
David Majnemer [Tue, 11 Aug 2015 03:03:28 +0000 (03:03 +0000)]
[MSVC Compat] Implement __is_destructible, __is_nothrow_destructible

Our implementations of these type trait intrinsics simply mapped them to
__has_trivial_destructor.  Instead, flesh these intrinsics out with a
full implementation which matches the standard's description.

llvm-svn: 244564

8 years ago[IR] Verify EH pad predecessors
David Majnemer [Tue, 11 Aug 2015 02:48:30 +0000 (02:48 +0000)]
[IR] Verify EH pad predecessors

Make sure that an EH pad's predecessors are using their unwind edge to
transfer control to the EH pad.

llvm-svn: 244563

8 years agoWebAssembly: add basic floating-point tests
JF Bastien [Tue, 11 Aug 2015 02:45:15 +0000 (02:45 +0000)]
WebAssembly: add basic floating-point tests

Summary: I somehow forgot to add these when I added the basic floating-point opcodes. Also remove ceil/floor/trunc/nearestint for now, and add them only when properly tested.

Subscribers: llvm-commits, sunfish, jfb

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

llvm-svn: 244562

8 years agoMake the analysis reporting test with x86 to fix the hexagon build.
Tyler Nowicki [Tue, 11 Aug 2015 01:54:48 +0000 (01:54 +0000)]
Make the analysis reporting test with x86 to fix the hexagon build.

llvm-svn: 244561

8 years ago[libFuzzer] add the list of trophies to the docs. It is incomplete, additions are...
Kostya Serebryany [Tue, 11 Aug 2015 01:53:45 +0000 (01:53 +0000)]
[libFuzzer] add the list of trophies to the docs. It is incomplete, additions are welcome :)

llvm-svn: 244560

8 years ago[libFuzzer] add -only_ascii flag
Kostya Serebryany [Tue, 11 Aug 2015 01:44:42 +0000 (01:44 +0000)]
[libFuzzer] add -only_ascii flag

llvm-svn: 244559

8 years ago[WinEHPrepare] Add rudimentary support for the new EH instructions
David Majnemer [Tue, 11 Aug 2015 01:15:26 +0000 (01:15 +0000)]
[WinEHPrepare] Add rudimentary support for the new EH instructions

This adds somewhat basic preparation functionality including:
- Formation of funclets via coloring basic blocks.
- Cloning of polychromatic blocks to ensure that funclets have unique
  program counters.
- Demotion of values used between different funclets.
- Some amount of cleanup once we have removed predecessors from basic
  blocks.
- Verification that we are left with a CFG that makes some amount of
  sense.

N.B. Arguments and numbering still need to be done.

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

llvm-svn: 244558

8 years agoExplicitly clear the MI operand list when getInstruction() is called. Call MI.clear...
Cameron Esfahani [Tue, 11 Aug 2015 01:15:07 +0000 (01:15 +0000)]
Explicitly clear the MI operand list when getInstruction() is called.  Call MI.clear() within MCD::OPC_Decode case and inside of translateInstruction() for the X86 target.  Remove now unnecessary MI.clear() from ARMDisassembler.

Summary: Explicitly clear the MI operand list when getInstruction() is called.

Reviewers: hfinkel, t.p.northover, hvarga, kparzysz, jyknight, qcolombet, uweigand

Subscribers: llvm-commits

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

llvm-svn: 244557

8 years agoPrint vectorization analysis when loop hint is specified.
Tyler Nowicki [Tue, 11 Aug 2015 01:10:08 +0000 (01:10 +0000)]
Print vectorization analysis when loop hint is specified.

This patche and a related llvm patch solve the problem of having to explicitly enable analysis when specifying a loop hint pragma to get the diagnostics. Passing AlwasyPrint as the pass name (see below) causes the front-end to print the diagnostic if the user has specified '-Rpass-analysis' without an '=<target-pass>’. Users of loop hints can pass that compiler option without having to specify the pass and they will get diagnostics for only those loops with loop hints.

llvm-svn: 244556

8 years agoPrint vectorization analysis when loop hint is specified.
Tyler Nowicki [Tue, 11 Aug 2015 01:09:15 +0000 (01:09 +0000)]
Print vectorization analysis when loop hint is specified.

This patch and a relatec clang patch solve the problem of having to explicitly enable analysis when specifying a loop hint pragma to get the diagnostics. Passing AlwasyPrint as the pass name (see below) causes the front-end to print the diagnostic if the user has specified '-Rpass-analysis' without an '=<target-pass>’. Users of loop hints can pass that compiler option without having to specify the pass and they will get diagnostics for only those loops with loop hints.

llvm-svn: 244555

8 years agoUpdate the syntax for load instruction in this example.
Nick Lewycky [Tue, 11 Aug 2015 01:05:16 +0000 (01:05 +0000)]
Update the syntax for load instruction in this example.

llvm-svn: 244554

8 years agoMoved LoopVectorizeHints and related functions before LoopVectorizationLegality and...
Tyler Nowicki [Tue, 11 Aug 2015 00:52:54 +0000 (00:52 +0000)]
Moved LoopVectorizeHints and related functions before LoopVectorizationLegality and LoopVectorizationCostModel.

llvm-svn: 244552

8 years agoWebAssembly: simply assert on SNaN and NaNs with payloads
JF Bastien [Tue, 11 Aug 2015 00:49:20 +0000 (00:49 +0000)]
WebAssembly: simply assert on SNaN and NaNs with payloads

Summary: convertToHexString doesn't represent them correctly at this point in time. This is a follow-up to sunfish's suggestion in D11914.

Subscribers: llvm-commits, sunfish, jfb

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

llvm-svn: 244551

8 years agoSimplify processLoop() by moving loop hint verification into Hints::allowVectorization().
Tyler Nowicki [Tue, 11 Aug 2015 00:35:44 +0000 (00:35 +0000)]
Simplify processLoop() by moving loop hint verification into Hints::allowVectorization().

llvm-svn: 244550

8 years ago[cmake] Hoist check for LLD sources up into root CMakeLists.txt
Reid Kleckner [Tue, 11 Aug 2015 00:33:07 +0000 (00:33 +0000)]
[cmake] Hoist check for LLD sources up into root CMakeLists.txt

We will use this for ASan on Windows soon. When the ELF port of LLD
matures, we can add other sanitizer integration tests to make sure they
work with LLD.

llvm-svn: 244549

8 years agoMIR Serialization: Serialize UsedPhysRegMask from the machine register info.
Alex Lorenz [Tue, 11 Aug 2015 00:32:49 +0000 (00:32 +0000)]
MIR Serialization: Serialize UsedPhysRegMask from the machine register info.

This commit serializes the UsedPhysRegMask register mask from the machine
register information class. The mask is serialized as an inverted
'calleeSavedRegisters' mask to keep the output minimal.

This commit also allows the MIR parser to infer this mask from the register
mask operands if the machine function doesn't specify it.

Reviewers: Duncan P. N. Exon Smith
llvm-svn: 244548

8 years ago[modules] Don't suggest deleting the module cache on an error if there is no module...
Richard Smith [Tue, 11 Aug 2015 00:32:42 +0000 (00:32 +0000)]
[modules] Don't suggest deleting the module cache on an error if there is no module cache for this build.

llvm-svn: 244547

8 years ago[sanitizers] Use portable file read/write wrappers on process pipes
Reid Kleckner [Tue, 11 Aug 2015 00:30:22 +0000 (00:30 +0000)]
[sanitizers] Use portable file read/write wrappers on process pipes

This fixes a minor error checking bug around calling
internal_read/write, and makes the code more portable for D11791.

llvm-svn: 244546

8 years agouse range-based for loops; NFCI
Sanjay Patel [Tue, 11 Aug 2015 00:26:05 +0000 (00:26 +0000)]
use range-based for loops; NFCI

llvm-svn: 244545

8 years ago[libFuzzer] don't crash if the condition in a switch has unusual type (e.g. i72)
Kostya Serebryany [Tue, 11 Aug 2015 00:24:39 +0000 (00:24 +0000)]
[libFuzzer] don't crash if the condition in a switch has unusual type (e.g. i72)

llvm-svn: 244544

8 years agoAddress post-commit review from r243378.
Sanjoy Das [Tue, 11 Aug 2015 00:20:24 +0000 (00:20 +0000)]
Address post-commit review from r243378.

This checks that bork_directive occurs exactly twice in the test output.

llvm-svn: 244543

8 years agoadd comment
Derek Schuff [Tue, 11 Aug 2015 00:19:54 +0000 (00:19 +0000)]
add comment

llvm-svn: 244542

8 years agoAdd NaCl to long double/fp128 mangling test
Derek Schuff [Tue, 11 Aug 2015 00:19:53 +0000 (00:19 +0000)]
Add NaCl to long double/fp128 mangling test

Summary:
NaCl is a platform where long double is the same as double.
Its mangling is spelled with "long double" but its ABI lowering is the same
as double.

Reviewers: rnk, chh

Subscribers: jfb, cfe-commits, dschuff

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

llvm-svn: 244541

8 years ago[LAA] Change name from addRuntimeCheck to addRuntimeChecks, NFC
Adam Nemet [Tue, 11 Aug 2015 00:09:37 +0000 (00:09 +0000)]
[LAA] Change name from addRuntimeCheck to addRuntimeChecks, NFC

This was requested by Hal in D11205.

llvm-svn: 244540

8 years ago[modules] Properly diagnose errors in module files for which we have no
Richard Smith [Tue, 11 Aug 2015 00:05:21 +0000 (00:05 +0000)]
[modules] Properly diagnose errors in module files for which we have no
corresponding include location (those specified on the command line).

llvm-svn: 244538

8 years agoFix some tabs.
Richard Smith [Tue, 11 Aug 2015 00:03:28 +0000 (00:03 +0000)]
Fix some tabs.

llvm-svn: 244537

8 years agoMIR Parser: Report an error when a stack object is redefined.
Alex Lorenz [Mon, 10 Aug 2015 23:50:41 +0000 (23:50 +0000)]
MIR Parser: Report an error when a stack object is redefined.

llvm-svn: 244536

8 years agoAdd lduw and lwua aliases for SPARCv9.
Joerg Sonnenberger [Mon, 10 Aug 2015 23:47:22 +0000 (23:47 +0000)]
Add lduw and lwua aliases for SPARCv9.

llvm-svn: 244535

8 years agoMIR Parser: Report an error when a fixed stack object is redefined.
Alex Lorenz [Mon, 10 Aug 2015 23:45:02 +0000 (23:45 +0000)]
MIR Parser: Report an error when a fixed stack object is redefined.

llvm-svn: 244534

8 years ago[Windows] Implement FileExists, ReadFromFile, and FindPathToBinary
Reid Kleckner [Mon, 10 Aug 2015 23:40:27 +0000 (23:40 +0000)]
[Windows] Implement FileExists, ReadFromFile, and FindPathToBinary

Summary: These are needed to talk to llvm-symbolizer on Windows.

Reviewers: samsonov

Subscribers: llvm-commits

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

llvm-svn: 244533

8 years agoLoad/store for float registers from/to alternate space.
Joerg Sonnenberger [Mon, 10 Aug 2015 23:33:17 +0000 (23:33 +0000)]
Load/store for float registers from/to alternate space.

llvm-svn: 244532

8 years agouse range-based for loop; NFCI
Sanjay Patel [Mon, 10 Aug 2015 23:29:41 +0000 (23:29 +0000)]
use range-based for loop; NFCI

llvm-svn: 244531

8 years agoRemove some dead code.
Richard Smith [Mon, 10 Aug 2015 23:26:54 +0000 (23:26 +0000)]
Remove some dead code.

llvm-svn: 244530

8 years agoMIR Serialization: Serialize the liveout register mask machine operands.
Alex Lorenz [Mon, 10 Aug 2015 23:24:42 +0000 (23:24 +0000)]
MIR Serialization: Serialize the liveout register mask machine operands.

llvm-svn: 244529

8 years agofix minsize detection: minsize attribute implies optimizing for size
Sanjay Patel [Mon, 10 Aug 2015 23:07:26 +0000 (23:07 +0000)]
fix minsize detection: minsize attribute implies optimizing for size

llvm-svn: 244528

8 years ago[LoopVer] Remove unused pointer partition argument, NFC.
Adam Nemet [Mon, 10 Aug 2015 23:05:31 +0000 (23:05 +0000)]
[LoopVer] Remove unused pointer partition argument, NFC.

llvm-svn: 244527