OSDN Git Service

android-x86/external-llvm.git
8 years agoRevert r268529 because it caused use-of-uninitialized-value
Vitaly Buka [Wed, 4 May 2016 19:44:11 +0000 (19:44 +0000)]
Revert r268529 because it caused use-of-uninitialized-value

Summary: This reverts commit d88cc0862bf7da64850b89e9bb5ea9f95e7f1184.

#0 0xfed467 in llvm::ARMFrameLowering::determineCalleeSaves(llvm::MachineFunction&, llvm::BitVector&, llvm::RegScavenger*) const /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Target/ARM/ARMFrameLowering.cpp:1625:52
#1 0x330d4cc in (anonymous namespace)::PEI::runOnMachineFunction(llvm::MachineFunction&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/CodeGen/PrologEpilogInserter.cpp:186:3
#2 0x3193e12 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/CodeGen/MachineFunctionPass.cpp:60:13
#3 0x396237d in llvm::FPPassManager::runOnFunction(llvm::Function&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1526:23
#4 0x3962a23 in llvm::FPPassManager::runOnModule(llvm::Module&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1547:16
#5 0x3963d52 in runOnModule /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1603:23
#6 0x3963d52 in llvm::legacy::PassManagerImpl::run(llvm::Module&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1706
#7 0x6bb910 in compileModule(char**, llvm::LLVMContext&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/llc/llc.cpp:412:5
#8 0x6b3c25 in main /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/llc/llc.cpp:218:22
#9 0x7fd4a7d37ec4 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4)
#10 0x625c93 in _start (/mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm_build_msan/bin/llc+0x625c93)

Reviewers:

Subscribers:

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268536 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[codeview] Add a type visitor to help abstract away type stream handling
Reid Kleckner [Wed, 4 May 2016 19:39:28 +0000 (19:39 +0000)]
[codeview] Add a type visitor to help abstract away type stream handling

Summary:
Port the dumper in llvm-readobj over to it.

I'm planning to use this visitor to power type stream merging.

While we're at it, try to switch from StringRef to ArrayRef<uint8_t> in some
places.

Reviewers: zturner, amccarth

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268535 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ConstantFold] Don't try to strip fp -> int bitcasts to simplify icmps
Hal Finkel [Wed, 4 May 2016 19:37:08 +0000 (19:37 +0000)]
[ConstantFold] Don't try to strip fp -> int bitcasts to simplify icmps

ConstantFold has logic to take icmp (bitcast x to y), null and strip the
bitcast. This makes sense in general, but not if x has floating-point type. In
this case, we'd need a fcmp, not an icmp, and the code will assert. We normally
don't see this situation because we constant fold fp -> int bitcasts, however,
we'll see it for bitcasts of ppc_fp128 -> i128. This is because that bitcast is
Endian-dependent, and as a result, we don't simplify it in ConstantFold (we
could, but no one has yet added the necessary logic). Regardless, ConstantFold
should not depend on that canonicalization for correctness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268534 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[x86] add tests to show current codegen for obscured fneg/fabs
Sanjay Patel [Wed, 4 May 2016 19:06:03 +0000 (19:06 +0000)]
[x86] add tests to show current codegen for obscured fneg/fabs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268533 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MSan] [Mips64] Add tests for vararg handling.
Marcin Koscielnicki [Wed, 4 May 2016 18:39:14 +0000 (18:39 +0000)]
[MSan] [Mips64] Add tests for vararg handling.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268531 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[InstCombine] Canonicalize icmp instructions based on dominating conditions."
Balaram Makam [Wed, 4 May 2016 18:37:35 +0000 (18:37 +0000)]
Revert "[InstCombine] Canonicalize icmp instructions based on dominating conditions."

This reverts commit 573a40f79b35cf3e71db331bb00f6a84f03b835d.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268530 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Fix Scavenger assert due to underestimated stack size
Weiming Zhao [Wed, 4 May 2016 18:19:33 +0000 (18:19 +0000)]
[ARM] Fix Scavenger assert due to underestimated stack size

Summary:
Currently, when checking if a stack is "BigStack" or not, it doesn't count into spills and arguments. Therefore, LLVM won't reserve spill slot for this actually "BigStack". This may cause scavenger failure.

Reviewers: rengolin

Subscribers: aemerson, rengolin, tberghammer, danalbert, srhines, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268529 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix spelling in comment. NFC.
Simon Pilgrim [Wed, 4 May 2016 18:16:17 +0000 (18:16 +0000)]
Fix spelling in comment. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268528 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r268504
Simon Pilgrim [Wed, 4 May 2016 17:49:14 +0000 (17:49 +0000)]
Revert r268504

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268526 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdding test cases showing the behavior of LoopUnrollPass according to optnone and...
Marianne Mailhot-Sarrasin [Wed, 4 May 2016 17:45:40 +0000 (17:45 +0000)]
Adding test cases showing the behavior of LoopUnrollPass according to optnone and optsize attributes

The unroll pass was disabled by clang in /Os. Those new test cases shows that the pass will behave correctly even if it is not fully disabled. This patch is related in some way to the clang commit (http://reviews.llvm.org/D19827), which re-enables the pass in /Os.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268524 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[NVPTX:doc] Update code examples to conform to the latest IR.
Jingyue Wu [Wed, 4 May 2016 17:34:57 +0000 (17:34 +0000)]
[NVPTX:doc] Update code examples to conform to the latest IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268522 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[InstCombine] Canonicalize icmp instructions based on dominating conditions.
Balaram Makam [Wed, 4 May 2016 17:34:20 +0000 (17:34 +0000)]
[InstCombine] Canonicalize icmp instructions based on dominating conditions.

Summary:
    This patch canonicalizes conditions based on the constant range information
    of the dominating branch condition.
    For example:

      %cmp = icmp slt i64 %a, 0
      br i1 %cmp, label %land.lhs.true, label %lor.rhs
      lor.rhs:
        %cmp2 = icmp sgt i64 %a, 0

    Would now be canonicalized into:

      %cmp = icmp slt i64 %a, 0
      br i1 %cmp, label %land.lhs.true, label %lor.rhs
      lor.rhs:
        %cmp2 = icmp ne i64 %a, 0

Reviewers: mcrosier, gberry, t.p.northover, llvm-commits, reames, hfinkel, sanjoy, majnemer

Subscribers: MatzeB, majnemer, mcrosier

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268521 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Creation of minidump after compiler crash on Windows
Leny Kholodov [Wed, 4 May 2016 16:56:51 +0000 (16:56 +0000)]
[Support] Creation of minidump after compiler crash on Windows

In the current implementation compiler only prints stack trace
to console after crash. This patch adds saving of minidump
files which contain a useful subset of the information for
further debugging.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268519 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReland "Use ScopedPrinter in llvm-pdbdump"
Reid Kleckner [Wed, 4 May 2016 16:09:04 +0000 (16:09 +0000)]
Reland "Use ScopedPrinter in llvm-pdbdump"

This reverts r268508 and reinstates r268506 with an additional cast from
TypeLeafKind to unsigned to allow conversion to HexNumber.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268517 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PowerPC] Generate VSX version of splat word
Nemanja Ivanovic [Wed, 4 May 2016 16:04:02 +0000 (16:04 +0000)]
[PowerPC] Generate VSX version of splat word

This patch corresponds to review:
http://reviews.llvm.org/D18592

It allows the PPC back end to generate the xxspltw instruction where we
previously only emitted vspltw.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268516 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Regenerate vector bswap tests
Simon Pilgrim [Wed, 4 May 2016 15:45:48 +0000 (15:45 +0000)]
[X86][SSE] Regenerate vector bswap tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268514 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTypo. NFC.
Chad Rosier [Wed, 4 May 2016 15:42:29 +0000 (15:42 +0000)]
Typo. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268513 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SimplifyCFG] isSafeToSpeculateStore now ignores debug info
Hans Wennborg [Wed, 4 May 2016 15:40:57 +0000 (15:40 +0000)]
[SimplifyCFG] isSafeToSpeculateStore now ignores debug info

This patch fixes PR27615.

@llvm.dbg.value instructions no longer count towards the maximum number of
instructions to look back at in the instruction list when searching for a
store instruction. This should make the output consistent between debug and
non-debug build.

Patch by Henric Karlsson <henric.karlsson@ericsson.com>!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268512 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Use ScopedPrinter in llvm-pdbdump"
Chad Rosier [Wed, 4 May 2016 15:25:06 +0000 (15:25 +0000)]
Revert "Use ScopedPrinter in llvm-pdbdump"

This reverts commit r268506 due to build breakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268508 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse a uniform name for the load combine pass. NFC.
Chad Rosier [Wed, 4 May 2016 15:19:02 +0000 (15:19 +0000)]
Use a uniform name for the load combine pass. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268507 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse ScopedPrinter in llvm-pdbdump
Zachary Turner [Wed, 4 May 2016 15:05:12 +0000 (15:05 +0000)]
Use ScopedPrinter in llvm-pdbdump

When printing raw PDB file fields, streams, and records, use the
ScopedPrinter class so we have consistency with llvm-readobj's output
format.

For the most part this is pretty mechanical, but I had to fix up the test
file to conform to the new YAMLesque output format. i added a few
additional helper functions to the ScopedPrinter such as one to print a
dotted version, etc.

Differential Revision: http://reviews.llvm.org/D19897
Reviewed By: rnk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268506 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SelectionDAG] BITREVERSE vector legalization of bit operations
Simon Pilgrim [Wed, 4 May 2016 15:01:13 +0000 (15:01 +0000)]
[SelectionDAG] BITREVERSE vector legalization of bit operations

Vector bit operations are typically promoted instead of having custom lowering. This patch changes the isOperationLegalOrCustom tests for vector AND/OR operations to use isOperationLegalOrPromote instead, allowing the SSE implementations to stay on the simd unit.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268504 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/R600: Minor cleanup in InstrInfo
Jan Vesely [Wed, 4 May 2016 14:55:45 +0000 (14:55 +0000)]
AMDGPU/R600: Minor cleanup in InstrInfo

Use std::make_pair instead of constructor
Use C++11 loop
Reuse helper var

Reviewers: tstellardAMD

Subsribers: arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268503 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RS4GC] Use SetVector/MapVector instead of DenseSet/DenseMap to guarantee stable...
Igor Laevsky [Wed, 4 May 2016 14:55:36 +0000 (14:55 +0000)]
[RS4GC] Use SetVector/MapVector instead of DenseSet/DenseMap to guarantee stable ordering

Goal of this change is to guarantee stable ordering of the statepoint arguments and other
newly inserted values such as gc.relocates. Previously we had explicit sorting in a couple
of places. However for unnamed values ordering was partial and overall we didn't have any
strong invariant regarding it. This change switches all data structures to use SetVector's
and MapVector's which provide possibility for deterministic iteration over them.
Explicit sorting is now redundant and was removed.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268502 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoThe test files are auto-generated by update_llc_test_checks.py utility.
Elena Demikhovsky [Wed, 4 May 2016 14:31:18 +0000 (14:31 +0000)]
The test files are auto-generated by update_llc_test_checks.py utility.
No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268498 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][ias] Only round section sizes when explicitly requested.
Daniel Sanders [Wed, 4 May 2016 13:21:06 +0000 (13:21 +0000)]
[mips][ias] Only round section sizes when explicitly requested.

As requested by Rafael Espindola in his post-commit comments on r268036. This
makes the previous behaviour the default while still allowing verification of
IAS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268496 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Sparc] Allow taking of function address into a register.
Chris Dewhurst [Wed, 4 May 2016 12:11:05 +0000 (12:11 +0000)]
[Sparc] Allow taking of function address into a register.

Modification of previously existing code (variable rename only), with unit test added.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268493 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][microMIPS] Add CodeGen support for microMIPSr6 ROTR and ROTRV and add tests...
Zlatko Buljan [Wed, 4 May 2016 12:02:12 +0000 (12:02 +0000)]
[mips][microMIPS] Add CodeGen support for microMIPSr6 ROTR and ROTRV and add tests for LL, SC, SYSCALL, ROTR, ROTRV, LWM32, SWM32 and MOVEP instructions
Differential Revision: http://reviews.llvm.org/D19857

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268491 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Sparc] Implement __builtin_setjmp, __builtin_longjmp back-end.
Chris Dewhurst [Wed, 4 May 2016 09:33:30 +0000 (09:33 +0000)]
[Sparc] Implement __builtin_setjmp, __builtin_longjmp back-end.

This code implements builtin_setjmp and builtin_longjmp exception handling intrinsics for 32-bit Sparc back-ends.

The code started as a mash-up of the PowerPC and X86 versions, although there are sufficient differences to both that had to be made for Sparc handling.

Note: I have manual tests running. I'll work on a unit test and add that to the rest of this diff in the next day.

Also, this implementation is only for 32-bit Sparc. I haven't focussed on a 64-bit version, although I have left the code in a prepared state for implementing this, including detecting pointer size and comments indicating where I suspect there may be differences.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268483 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Remove -mattr=+n64 and fix indentation in tailcall.ll RUN lines. NFC.
Daniel Sanders [Wed, 4 May 2016 09:08:35 +0000 (09:08 +0000)]
[mips] Remove -mattr=+n64 and fix indentation in tailcall.ll RUN lines. NFC.

-mattr=+n64 isn't the correct way to specify the ABI and N64 is already the
default for the RUN line concerned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268482 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ConstantFolding, ValueTracking] Fold constants involving bitcasts of ConstantVector
David Majnemer [Wed, 4 May 2016 06:13:33 +0000 (06:13 +0000)]
[ConstantFolding, ValueTracking] Fold constants involving bitcasts of ConstantVector

We assumed that ConstantVectors would be rather uninteresting from the
perspective of analysis.  However, this is not the case due to a quirk
of how LLVM handles vectors of i1.  Vectors of i1 are not
ConstantDataVectors like vectors of i8, i16, i32 or i64 because i1's
SizeInBits differs from it's StoreSizeInBytes.  This leads to it being
categorized as a ConstantVector instead of a ConstantDataVector.

Instead, treat ConstantVector more uniformly.

This fixes PR27591.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268479 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-readobj] Print MIPS .MIPS.options section content
Simon Atanasyan [Wed, 4 May 2016 05:58:57 +0000 (05:58 +0000)]
[llvm-readobj] Print MIPS .MIPS.options section content

.MIPS.options section specifies miscellaneous options to be applied
to an object file. LLVM as well as modern versions of GNU tools emit
the only type of the options - ODK_REGINFO. The patch teaches llvm-readobj
to print details of the ODK_REGINFO and skip contents of other options.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268478 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[IPO/ConstantMerge] Convert to static function, to facilitate transition to the new PM.
Davide Italiano [Wed, 4 May 2016 03:21:20 +0000 (03:21 +0000)]
[IPO/ConstantMerge] Convert to static function, to facilitate transition to the new PM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268476 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMake ListScope and DictScope re-use the same code.
Zachary Turner [Wed, 4 May 2016 01:46:59 +0000 (01:46 +0000)]
Make ListScope and DictScope re-use the same code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268472 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Lower zext i1 arguments
David Majnemer [Wed, 4 May 2016 00:22:23 +0000 (00:22 +0000)]
[X86] Lower zext i1 arguments

i1 is now a legal type for X86 with AVX512.
There were some paths in X86FastISel which were not quite ready to see
an i1 value: they were not quite sure how to deal with sign/zero extends
for call arguments.
DTRT by extending to i8 for zeroext and bailing out of FastISel for
signext.

This fixes PR27591.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268470 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove (unused) "using namespace llvm;" in Support header. This caused the modules...
Richard Smith [Wed, 4 May 2016 00:21:33 +0000 (00:21 +0000)]
Remove (unused) "using namespace llvm;" in Support header. This caused the modules build to break.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268469 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[GlobalDCE, Misc] Don't remove functions referenced by ifuncs
David Majnemer [Wed, 4 May 2016 00:20:48 +0000 (00:20 +0000)]
[GlobalDCE, Misc] Don't remove functions referenced by ifuncs

We forgot to consider the target of ifuncs when considering if a
function was alive or dead.

N.B. Also update a few auxiliary tools like bugpoint and
verify-uselistorder.

This fixes PR27593.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268468 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Add a free toString function for Error
Vedant Kumar [Tue, 3 May 2016 23:32:31 +0000 (23:32 +0000)]
[Support] Add a free toString function for Error

toString() consumes an Error and returns a string representation of its
contents. This commit also adds a message() method to ErrorInfoBase for
convenience.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268465 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agollvm-pdbdump: Update libdeps.
NAKAMURA Takumi [Tue, 3 May 2016 23:25:47 +0000 (23:25 +0000)]
llvm-pdbdump: Update libdeps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268464 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoProduce another specific error message for a malformed Mach-O file when a load
Kevin Enderby [Tue, 3 May 2016 23:13:50 +0000 (23:13 +0000)]
Produce another specific error message for a malformed Mach-O file when a load
command has a size less than 8 bytes.

I think the existing test case in test/Object/macho-invalid.test for
macho64-invalid-too-small-load-command was trying to test for this but that
test case triggered a different error given how it was constructed.  So I
constructed a new test case that would trigger this specific error.

I also changed the error message to be consistent with the other malformed Mach-O
file error messages.  I also removed object_error::macho_small_load_command from
Object/Error.h as it is not needed and can just use object_error::parse_failed
and let the error message string distinguish the error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268463 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix template type deduction error on some compilers.
Zachary Turner [Tue, 3 May 2016 22:37:12 +0000 (22:37 +0000)]
Fix template type deduction error on some compilers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268458 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd opt-bisect support to additional passes that can be skipped
Andrew Kaylor [Tue, 3 May 2016 22:32:30 +0000 (22:32 +0000)]
Add opt-bisect support to additional passes that can be skipped

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268457 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove unused variable.
Zachary Turner [Tue, 3 May 2016 22:26:46 +0000 (22:26 +0000)]
Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268455 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMove CodeViewTypeStream to DebugInfo/CodeView
Zachary Turner [Tue, 3 May 2016 22:18:17 +0000 (22:18 +0000)]
Move CodeViewTypeStream to DebugInfo/CodeView

Ability to parse codeview type streams is also needed by
DebugInfoPDB for parsing PDBs, so moving this into a library
gives us this option.  Since DebugInfoPDB had already hand
rolled some code to do this, that code is now convereted over
to using this common abstraction.

Differential Revision: http://reviews.llvm.org/D19887
Reviewed By: dblaikie, amccarth

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268454 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoPM: Port LoopRotation to the new loop pass manager
Justin Bogner [Tue, 3 May 2016 22:02:31 +0000 (22:02 +0000)]
PM: Port LoopRotation to the new loop pass manager

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268452 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][XOP] Add placeholder VPERMIL2 combining tests
Simon Pilgrim [Tue, 3 May 2016 21:55:37 +0000 (21:55 +0000)]
[X86][XOP] Add placeholder VPERMIL2 combining tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268450 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoPM: Port LoopSimplifyCFG to the new pass manager
Justin Bogner [Tue, 3 May 2016 21:47:32 +0000 (21:47 +0000)]
PM: Port LoopSimplifyCFG to the new pass manager

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268446 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Tidied up SDValue's SDNode referencing. NFCI.
Simon Pilgrim [Tue, 3 May 2016 21:44:45 +0000 (21:44 +0000)]
[X86] Tidied up SDValue's SDNode referencing. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268445 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoPM: Check that loop passes preserve a basic set of analyses
Justin Bogner [Tue, 3 May 2016 21:35:08 +0000 (21:35 +0000)]
PM: Check that loop passes preserve a basic set of analyses

A loop pass that didn't preserve this entire set of passes wouldn't
play well with other loop passes, since these are generally a basic
requirement to do any interesting transformations to a loop.

Adds a helper to get the set of analyses a loop pass should preserve,
and checks that any loop pass we run satisfies the requirement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268444 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[IPO/ConstantMerge] Garbage collect dead code. NFC.
Davide Italiano [Tue, 3 May 2016 21:30:10 +0000 (21:30 +0000)]
[IPO/ConstantMerge] Garbage collect dead code. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268442 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDisable LLVM_ENABLE_TIMESTAMPS by default
Chris Bieneman [Tue, 3 May 2016 21:22:14 +0000 (21:22 +0000)]
Disable LLVM_ENABLE_TIMESTAMPS by default

This change is based on the discussion from http://lists.llvm.org/pipermail/llvm-dev/2016-May/098990.html.

The goal is to make the default LLVM configuration build deterministically.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268441 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Drop template line in favor of 'inline'
Vedant Kumar [Tue, 3 May 2016 21:04:42 +0000 (21:04 +0000)]
[Support] Drop template line in favor of 'inline'

Reviewed-by: lhames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268438 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoX86-Darwin: start emitting data-region directives for jump-tables.
Tim Northover [Tue, 3 May 2016 21:03:41 +0000 (21:03 +0000)]
X86-Darwin: start emitting data-region directives for jump-tables.

The surrounding tools can cope these days, and they were invented for a reason.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268437 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RS4GC] Add a test case around calling conventions; NFC
Sanjoy Das [Tue, 3 May 2016 20:58:10 +0000 (20:58 +0000)]
[RS4GC] Add a test case around calling conventions; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268436 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ADT] Add drop_front method to ArrayRef
Reid Kleckner [Tue, 3 May 2016 20:53:20 +0000 (20:53 +0000)]
[ADT] Add drop_front method to ArrayRef

We have it for StringRef but not ArrayRef, and ArrayRef has drop_back,
so I see no reason it shouldn't have drop_front. Splitting this out of a
change that I have that will use this funcitonality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268434 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd an address space for the X86 SS segment.
David L Kreitzer [Tue, 3 May 2016 20:16:08 +0000 (20:16 +0000)]
Add an address space for the X86 SS segment.

Patch by Michael LeMay (michael.lemay@intel.com)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268431 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[IPO/IPCP] Convert to use static functions. NFC.
Davide Italiano [Tue, 3 May 2016 20:08:24 +0000 (20:08 +0000)]
[IPO/IPCP] Convert to use static functions. NFC.

In preparation for porting this pass to the new PM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268429 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ProfileData] Propagate an error from InstrProfSymtab
Vedant Kumar [Tue, 3 May 2016 20:01:01 +0000 (20:01 +0000)]
[ProfileData] Propagate an error from InstrProfSymtab

CovMapFuncReader::get should propagate up errors from InstrProfSymtab.

This is part of a series of patches to transition ProfileData over to
the stricter Error/Expected interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268428 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[IPO/GlobalDCE] Port to the new pass manager.
Davide Italiano [Tue, 3 May 2016 19:39:15 +0000 (19:39 +0000)]
[IPO/GlobalDCE] Port to the new pass manager.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268425 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SROA] Function canConvertValue needs to check whether both NewTy and OldTy pointers are
Jack Liu [Tue, 3 May 2016 19:30:48 +0000 (19:30 +0000)]
[SROA] Function canConvertValue needs to check whether both NewTy and OldTy pointers are
pointing to the same addr space. This can prevent SROA from creating a bitcast
between pointers with different addr spaces.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268424 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert 268409 due to missing comment.
Jack Liu [Tue, 3 May 2016 19:15:02 +0000 (19:15 +0000)]
Revert 268409 due to missing comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268421 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ProfileData] Assert NoError in CoverageMappingTest
Vedant Kumar [Tue, 3 May 2016 18:49:41 +0000 (18:49 +0000)]
[ProfileData] Assert NoError in CoverageMappingTest

Check for success values in the CoverageMappingTest unit test file.

This is part of a series of patches to transition ProfileData over to
the stricter Error/Expected interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268420 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Reassociate] Remove unneeded constructor.
Davide Italiano [Tue, 3 May 2016 18:34:51 +0000 (18:34 +0000)]
[Reassociate] Remove unneeded constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268417 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ExecutionEngine] Add comment explainging that ExecutionEngine::addGlobalMapping
Lang Hames [Tue, 3 May 2016 18:19:35 +0000 (18:19 +0000)]
[ExecutionEngine] Add comment explainging that ExecutionEngine::addGlobalMapping
can only be used on named values.

https://llvm.org/bugs/PR23497

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268415 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ImplicitNullChecks] Account for implicit-defs as well when updating the liveness.
Quentin Colombet [Tue, 3 May 2016 18:09:06 +0000 (18:09 +0000)]
[ImplicitNullChecks] Account for implicit-defs as well when updating the liveness.

The replaced load may have implicit-defs and those defs may be used
in the block of the original load. Make sure to update the liveness
accordingly.

This is a generalization of r267817.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268412 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agogit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268409 91177308-0d34-0410...
Jack Liu [Tue, 3 May 2016 18:01:43 +0000 (18:01 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268409 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LICM] Kill SCEV loop dispositions if needed
Sanjoy Das [Tue, 3 May 2016 17:50:11 +0000 (17:50 +0000)]
[LICM] Kill SCEV loop dispositions if needed

SCEV caches whether SCEV expressions are loop invariant, variant or
computable.  LICM breaks this cache, almost by definition; so clear the
SCEV disposition cache if LICM changed anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268408 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse all_of instead of a raw loop; NFC
Sanjoy Das [Tue, 3 May 2016 17:50:06 +0000 (17:50 +0000)]
Use all_of instead of a raw loop; NFC

Added some tests despite being NFC, since it looks like nothing was
exercising the "all incoming values to exit PHIs are same" logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268407 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopDeletion] Clear SCEV loop dispositions
Sanjoy Das [Tue, 3 May 2016 17:50:02 +0000 (17:50 +0000)]
[LoopDeletion] Clear SCEV loop dispositions

`Loop::makeLoopInvariant` can hoist instructions out of loops, so loop
dispositions for the loop it operated on may need to be cleared.  We can
be smarter here (especially around how `forgetLoopDispositions` is
implemented), but let's be correct first.

Fixes PR27570.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268406 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SCEV] Tweak the output format and content of -analyze
Sanjoy Das [Tue, 3 May 2016 17:49:57 +0000 (17:49 +0000)]
[SCEV] Tweak the output format and content of -analyze

In the "LoopDispositions:" section:

 - Instead of printing out a list, print out a "dictionary" to make it
   obvious by inspection which disposition is for which loop.  This is
   just a cosmetic change.

 - Print dispositions for parent _and_ sibling loops.  I will use this
   to write a test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268405 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoProduce another specific error message for a malformed Mach-O file when a load
Kevin Enderby [Tue, 3 May 2016 17:16:08 +0000 (17:16 +0000)]
Produce another specific error message for a malformed Mach-O file when a load
command other than the first one is past the end of the load commands.

This is like the test case in test/Object/macho-invalid.test for
macho64-invalid-incomplete-load-command but it is the second load command
that is past the end of all the load commands instead of the first.

The code in the constructor for MachOObjectFile that loops over the load
commands used getNextLoadCommandInfo() which was not producing
a good error message.  So that was fixed and a test case was added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268403 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ProfileData] Assert NoError in InstrProfTest
Vedant Kumar [Tue, 3 May 2016 17:07:06 +0000 (17:07 +0000)]
[ProfileData] Assert NoError in InstrProfTest

Check for success values in the InstrProfTest unit test file.

This is part of a series of patches to transition ProfileData over to
the stricter Error/Expected interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268402 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ProfileData] Add error codes for compression failures
Vedant Kumar [Tue, 3 May 2016 16:53:17 +0000 (16:53 +0000)]
[ProfileData] Add error codes for compression failures

Be more specific in describing compression failures. Also, check for
this kind of error in emitNameData().

This is part of a series of patches to transition ProfileData over to
the stricter Error/Expected interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268400 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoWin packaging script: include the OpenMP run-time
Hans Wennborg [Tue, 3 May 2016 16:43:40 +0000 (16:43 +0000)]
Win packaging script: include the OpenMP run-time

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268398 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Use range loops to simplify some code in the SI Scheduler
Tom Stellard [Tue, 3 May 2016 16:30:56 +0000 (16:30 +0000)]
AMDGPU/SI: Use range loops to simplify some code in the SI Scheduler

Reviewers: arsenm, axeldavy

Subscribers: MatzeB, arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268396 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMove "Eliminate Available Externally" immediately after the inliner
Mehdi Amini [Tue, 3 May 2016 15:46:00 +0000 (15:46 +0000)]
Move "Eliminate Available Externally" immediately after the inliner

This pass is supposed to reduce the size of the IR for compile time
purpose. We should run it ASAP, except when we prepare for LTO or
ThinLTO, and we want to keep them available for link-time inline.

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

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268394 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoProvide some default values for the ThinLTO Cache pruning
Mehdi Amini [Tue, 3 May 2016 15:17:50 +0000 (15:17 +0000)]
Provide some default values for the ThinLTO Cache pruning

This control how the cache is pruned. The cache still has to
be explicitely enabled/disabled by providing a path.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268393 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSilence unused variable warning; NFC.
Aaron Ballman [Tue, 3 May 2016 15:17:25 +0000 (15:17 +0000)]
Silence unused variable warning; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268392 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Added target shuffle combine to MOVQ
Simon Pilgrim [Tue, 3 May 2016 15:05:13 +0000 (15:05 +0000)]
[X86][SSE] Added target shuffle combine to MOVQ

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268391 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFold compares irrespective of whether allocation can be elided
Anna Thomas [Tue, 3 May 2016 14:58:21 +0000 (14:58 +0000)]
Fold compares irrespective of whether allocation can be elided

Summary
When a non-escaping pointer is compared to a global value, the
comparison can be folded even if the corresponding malloc/allocation
call cannot be elided.
We need to make sure the global value is not null, since comparisons to
null cannot be folded.

In future, we should also handle cases when the the comparison
instruction dominates the pointer escape.

Reviewers: sanjoy
Subscribers s.egerton, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268390 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Sparc] Constification of TargetMachine arguments
James Y Knight [Tue, 3 May 2016 14:57:18 +0000 (14:57 +0000)]
[Sparc] Constification of TargetMachine arguments

This patch changes the TargetMachine arguments to be const. This is
required for {D19265}, and was requested to be done in a separate patch.

Patch by Jacob Hansen!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268389 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][fastisel] ADJCALLSTACKUP has a second immediate operand.
Daniel Sanders [Tue, 3 May 2016 14:19:26 +0000 (14:19 +0000)]
[mips][fastisel] ADJCALLSTACKUP has a second immediate operand.

Summary:
It's always zero for SelectionDAG and is never read by the MIPS backend so
do the same for FastISel.

Reviewers: sdardis

Subscribers: dsanders, llvm-commits, sdardis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268386 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Fix unused variable warning for release builds introduced by r268379.
Daniel Sanders [Tue, 3 May 2016 14:00:37 +0000 (14:00 +0000)]
[mips] Fix unused variable warning for release builds introduced by r268379.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268383 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Use MipsMCExpr instead of MCSymbolRefExpr for all relocations.
Daniel Sanders [Tue, 3 May 2016 13:35:44 +0000 (13:35 +0000)]
[mips] Use MipsMCExpr instead of MCSymbolRefExpr for all relocations.

Summary:
This is much closer to the way MIPS relocation expressions work
(%hi(foo + 2) rather than %hi(foo) + 2) and removes the need for the
various bodges in MipsAsmParser::evaluateRelocExpr().

Removing those bodges ensures that the constant stored in MCValue is the
full 32 or 64-bit (depending on ABI) offset from the symbol. This will be used
to correct the %hi/%lo matching needed to sort the relocation table correctly.

As part of this:
* Gave MCExpr::print() the ability to omit parenthesis when emitting a
  symbol reference inside a MipsMCExpr operator like %hi(X). Without this
  we print things like %lo(($L1)).
* %hi(%neg(%gprel(X))) is now three MipsMCExpr's instead of one. Most of
  the related special cases have been removed or moved to MipsMCExpr. We
  can remove the rest as we gain support for the less common relocations
  when they are not part of this specific combination.
* Renamed MipsMCExpr::VariantKind and the enum prefix ('VK_') to avoid confusion
  with MCSymbolRefExpr::VariantKind and its prefix (also 'VK_').
* fixup_Mips_GOT_Local and fixup_Mips_GOT_Global were found to be identical
  and merged into fixup_Mips_GOT.
* MO_GOT16 and MO_GOT turned out to be identical and have been merged into
  MO_GOT.
* VK_Mips_GOT and VK_Mips_GOT16 turned out to be the same thing so they
  have been merged into MEK_GOT

Reviewers: sdardis

Subscribers: dsanders, sdardis, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268379 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSSE3] Missing combine opportunity to simplify to a MOVQ shuffle
Simon Pilgrim [Tue, 3 May 2016 13:12:44 +0000 (13:12 +0000)]
[X86][SSSE3] Missing combine opportunity to simplify to a MOVQ shuffle

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268378 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Add support for commutative MAX/MIN . In general VMAX{PS,PD} and VMIN{PS...
Igor Breger [Tue, 3 May 2016 11:51:45 +0000 (11:51 +0000)]
[AVX512] Add support for commutative MAX/MIN . In general VMAX{PS,PD} and VMIN{PS,PD} instruction are not commutative . In combine pass only if UnsafeFPMath are used VMAX/VMAX are converted to commutative nodes VMAXC/VMAXC.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268375 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMark that SpeculativeExecution preserves Globals Alias Analysis.
Kristof Beyls [Tue, 3 May 2016 08:33:26 +0000 (08:33 +0000)]
Mark that SpeculativeExecution preserves Globals Alias Analysis.

A few benchmarks with lots of accesses to global variables in the hot
loops regressed a lot since r266399, which added the
SpeculativeExecution pass to the default pipeline. The problem is that
this pass doesn't mark Globals Alias Analysis as preserved. Globals
Alias Analysis is computed in a module pass, whereas
SpeculativeExecution is a function pass, and a lot of passes dependent
on the Globals Alias Analysis to optimize these benchmarks are also
function passes. As such, the Globals Alias Analysis information cannot
be recomputed between SpeculativeExecution and the following function
passes needing that information.

SpeculativeExecution doesn't invalidate Globals Alias Analysis, so mark
it as such to fix those performance regressions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268370 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Fix lowerV4X128VectorShuffle to select correctly input operands .
Igor Breger [Tue, 3 May 2016 08:08:44 +0000 (08:08 +0000)]
[AVX512] Fix lowerV4X128VectorShuffle to select correctly input operands .

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268368 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[lib/Object] Make this assertion more useful.
Davide Italiano [Tue, 3 May 2016 07:30:56 +0000 (07:30 +0000)]
[lib/Object] Make this assertion more useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268367 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeGen] Add some space optimized forms of EmitNode and MorphNodeTo that implicitly...
Craig Topper [Tue, 3 May 2016 05:54:13 +0000 (05:54 +0000)]
[CodeGen] Add some space optimized forms of EmitNode and MorphNodeTo that implicitly indicate the number of result VTs. This shaves about 16K off the X86 matching table taking it down to about 470K.

Overall this reduces the llc binary size with all in-tree targets by about 40K.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268365 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix uppercase typo
Matthias Braun [Tue, 3 May 2016 05:21:53 +0000 (05:21 +0000)]
Fix uppercase typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268362 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove unused header, NFC
Vedant Kumar [Tue, 3 May 2016 05:05:38 +0000 (05:05 +0000)]
Remove unused header, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268361 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64/optimizeCondBranch: Remove earlier kill flag when forming TBZ
Matthias Braun [Tue, 3 May 2016 04:54:16 +0000 (04:54 +0000)]
AArch64/optimizeCondBranch: Remove earlier kill flag when forming TBZ

This fixes -verify-machineinstrs complaints when compiling
test-suite/SingleSource/Benchmarks/Shootout-C++/wordfreq.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268360 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agotest commit
Jack Liu [Tue, 3 May 2016 04:06:24 +0000 (04:06 +0000)]
test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268358 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopUnroll] Unroll loops which have exit blocks to EH pads
David Majnemer [Tue, 3 May 2016 03:57:40 +0000 (03:57 +0000)]
[LoopUnroll] Unroll loops which have exit blocks to EH pads

We were overly cautious in our analysis of loops which have invokes
which unwind to EH pads.  The loop unroll transform is safe because it
only clones blocks in the loop body, it does not try to split critical
edges involving EH pads.  Instead, move the necessary safety check to
LoopUnswitch.

N.B. The safety check for loop unswitch is covered by an existing test
which fails without it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268357 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoChange operation_not_supported to not_supported.
Zachary Turner [Tue, 3 May 2016 00:53:16 +0000 (00:53 +0000)]
Change operation_not_supported to not_supported.

Apparently operation_not_supported is...  not supported everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268348 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[codeview] Maintain the type enum-to-classname mapping in the .def file
Reid Kleckner [Tue, 3 May 2016 00:45:14 +0000 (00:45 +0000)]
[codeview] Maintain the type enum-to-classname mapping in the .def file

This way it will be easy to stamp out something like a type visitor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268347 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoParse the TPI (type information) stream of PDB files.
Zachary Turner [Tue, 3 May 2016 00:28:21 +0000 (00:28 +0000)]
Parse the TPI (type information) stream of PDB files.

This parses the TPI stream (stream 2) from the PDB file. This stream
contains some header information followed by a series of codeview records.
There is some additional complexity here in that alongside this stream of
codeview records is a serialized hash table in order to efficiently query
the types. We parse the necessary bookkeeping information to allow us to
reconstruct the hash table, but we do not actually construct it yet as
there are still a few things that need to be understood first.

Differential Revision: http://reviews.llvm.org/D19840
Reviewed By: ruiu, rnk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268343 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMove llvm-readobj/StreamWriter to Support.
Zachary Turner [Tue, 3 May 2016 00:28:04 +0000 (00:28 +0000)]
Move llvm-readobj/StreamWriter to Support.

We wish to re-use this from llvm-pdbdump, and it provides a nice
way to print structured data in scoped format that could prove
useful for many other dumping tools as well.  Moving to support
and changing name to ScopedPrinter to better reflect its purpose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268342 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoThinLTO: do not import function whose linkage prevents inlining.
Mehdi Amini [Tue, 3 May 2016 00:27:28 +0000 (00:27 +0000)]
ThinLTO: do not import function whose linkage prevents inlining.

There is not point in importing a "weak" or a "linkonce" function
since we won't be able to inline it anyway.
We already had a targeted check for WeakAny, this is using the
same check on GlobalValue as the inline, i.e.
isMayBeOverriddenLinkage()

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268341 91177308-0d34-0410-b5e6-96231b3b80d8