oota-llvm.git
8 years agoFix warning on builds without asserts.
Rafael Espindola [Thu, 21 May 2015 17:09:22 +0000 (17:09 +0000)]
Fix warning on builds without asserts.

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

8 years agouse range-based for-loop
Sanjay Patel [Thu, 21 May 2015 17:04:17 +0000 (17:04 +0000)]
use range-based for-loop

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

8 years agoAvoid unnecessary section switching. NFC.
Rafael Espindola [Thu, 21 May 2015 17:00:40 +0000 (17:00 +0000)]
Avoid unnecessary section switching. NFC.

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

8 years agoRemove yet another method of creating begin and end symbol for sections.
Rafael Espindola [Thu, 21 May 2015 16:52:32 +0000 (16:52 +0000)]
Remove yet another method of creating begin and end symbol for sections.

I missed this one when first unifying how we handle begin and end symbols.

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

8 years agodon't repeat function names in comments; NFC
Sanjay Patel [Thu, 21 May 2015 16:42:22 +0000 (16:42 +0000)]
don't repeat function names in comments; NFC

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

8 years agoSize enum so we can store it as 16-bits and avoid casts. NFC
Pete Cooper [Thu, 21 May 2015 16:40:18 +0000 (16:40 +0000)]
Size enum so we can store it as 16-bits and avoid casts.  NFC

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

8 years agoUse existing helper for adding a section. NFC.
Rafael Espindola [Thu, 21 May 2015 16:19:32 +0000 (16:19 +0000)]
Use existing helper for adding a section. NFC.

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

8 years agouse range-based for-loop; NFCI
Sanjay Patel [Thu, 21 May 2015 16:00:50 +0000 (16:00 +0000)]
use range-based for-loop; NFCI

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

8 years agostd::sort must be called with a strict weak ordering.
Manuel Klimek [Thu, 21 May 2015 15:38:25 +0000 (15:38 +0000)]
std::sort must be called with a strict weak ordering.

Found by a debug enabled stl.

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

8 years agoAVX-512: Enabled SSE intrinsics on AVX-512.
Elena Demikhovsky [Thu, 21 May 2015 14:01:32 +0000 (14:01 +0000)]
AVX-512: Enabled SSE intrinsics on AVX-512.
Predicate UseAVX depricates pattern selection on AVX-512.
This predicate is necessary for DAG selection to select EVEX form.
But mapping SSE intrinsics to AVX-512 instructions is not ready yet.
So I replaced UseAVX with HasAVX for intrinsics patterns.

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

8 years agoMake Triple::parseARMArch use ARMTargetParser
Renato Golin [Thu, 21 May 2015 13:52:20 +0000 (13:52 +0000)]
Make Triple::parseARMArch use ARMTargetParser

Simplifying Triple::parseARMArch, leaving all the parsing to ARMTargetParser.

This commit also adds AArch64 detection to ARMTargetParser canonicalization,
and a two RedHat arch names (v{6,7}hl, meaning hard-float / little-endian).

Adding enough unit tests to cover the basics. Clang checks fine.

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

8 years ago[RewriteStatepointsForGC] Fix debug assertion during derivable pointer rematerialization
Igor Laevsky [Thu, 21 May 2015 13:02:14 +0000 (13:02 +0000)]
[RewriteStatepointsForGC] Fix debug assertion during derivable pointer rematerialization

Correct assertion would be that there is no other uses from chain we are currently cloning. It is ok to have other uses of values not from this chain.

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

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

8 years agoFix memory-dereferenceable.ll test
Artur Pilipenko [Thu, 21 May 2015 12:51:38 +0000 (12:51 +0000)]
Fix memory-dereferenceable.ll test

One of the testcases introduced by D9365 had incorrect !dereferenceable metadata on load. It must fail but it doesn't due to incorrect order of CHECK/CHECK-NOT commands in test. Fixed both.

Reviewed By: sanjoy

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

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

8 years agoTest commit. Fix typo in MemDerefPrinter.cpp comment.
Artur Pilipenko [Thu, 21 May 2015 11:57:38 +0000 (11:57 +0000)]
Test commit. Fix typo in MemDerefPrinter.cpp comment.

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

8 years agoRemove unnecessary FIXME comment
Renato Golin [Thu, 21 May 2015 10:47:56 +0000 (10:47 +0000)]
Remove unnecessary FIXME comment

It has been fixed by commit r237797.

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

8 years agoFixed unused variable warning in non-assert builds from rL237885
Simon Pilgrim [Thu, 21 May 2015 10:22:10 +0000 (10:22 +0000)]
Fixed unused variable warning in non-assert builds from rL237885

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

8 years ago[X86][SSE] Improve support for 128-bit vector sign extension
Simon Pilgrim [Thu, 21 May 2015 10:05:03 +0000 (10:05 +0000)]
[X86][SSE] Improve support for 128-bit vector sign extension

This patch improves support for sign extension of the lower lanes of vectors of integers by making use of the SSE41 pmovsx* sign extension instructions where possible, and optimizing the sign extension by shifts on pre-SSE41 targets (avoiding the use of i64 arithmetic shifts which require scalarization).

It converts SIGN_EXTEND nodes to SIGN_EXTEND_VECTOR_INREG where necessary, that more closely matches the pmovsx* instruction than the default approach of using SIGN_EXTEND_INREG which splits the operation (into an ANY_EXTEND lowered to a shuffle followed by shifts) making instruction matching difficult during lowering. Necessary support for SIGN_EXTEND_VECTOR_INREG has been added to the DAGCombiner.

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

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

8 years ago[mips] [IAS] Add 2 missing CHECK directives for fixups in mips-expansions.s.
Toma Tabacu [Thu, 21 May 2015 10:04:39 +0000 (10:04 +0000)]
[mips] [IAS] Add 2 missing CHECK directives for fixups in mips-expansions.s.

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

8 years ago[TableGen] Resolve complex def names inside multiclasses
Hal Finkel [Thu, 21 May 2015 04:32:56 +0000 (04:32 +0000)]
[TableGen] Resolve complex def names inside multiclasses

We had not been trying hard enough to resolve def names inside multiclasses
that had complex concatenations, etc. Now we'll try harder.

Patch by Amaury Sechet!

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

8 years agoAsmPrinter: Compute absolute label difference directly
Duncan P. N. Exon Smith [Thu, 21 May 2015 02:41:23 +0000 (02:41 +0000)]
AsmPrinter: Compute absolute label difference directly

Create a low-overhead path for `EmitLabelDifference()` that emits a
emits an absolute number when (1) the output is an object stream and (2)
the two symbols are in the same data fragment.

This drops memory usage on Mach-O from 975 MB down to 919 MB (5.8%).
The only call is when `!doesDwarfUseRelocationsAcrossSections()` --
i.e., on Mach-O -- since otherwise an absolute offset from the start of
the section needs a relocation.  (`EmitLabelDifference()` is cheaper on
ELF anyway, since it creates 1 fewer temp symbol, and it gets called far
less often.  It's not clear to me if this is even a bottleneck there.)

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

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

8 years agoMC: Initialize MCSymbolData::Offset directly
Duncan P. N. Exon Smith [Thu, 21 May 2015 01:59:58 +0000 (01:59 +0000)]
MC: Initialize MCSymbolData::Offset directly

Try to fix miscompile after r237873.  Looks like this union
initialization isn't legal (or at least not supported).

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

8 years ago[MemCpyOpt] Do move the memset, but look at its dest's dependencies.
Ahmed Bougacha [Thu, 21 May 2015 01:43:39 +0000 (01:43 +0000)]
[MemCpyOpt] Do move the memset, but look at its dest's dependencies.

In effect a partial revert of r237858, which was a dumb shortcut.
Looking at the dependencies of the destination should be the proper
fix: if the new memset would depend on anything other than itself,
the transformation isn't correct.

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

8 years agoMC: Simplify MCSymbolData initialization and remove MCSymbol pointer
Duncan P. N. Exon Smith [Thu, 21 May 2015 01:33:03 +0000 (01:33 +0000)]
MC: Simplify MCSymbolData initialization and remove MCSymbol pointer

Finally remove the `MCSymbolData::Symbol` pointer.  It was still being
used to track whether `MCSymbolData` had been initialized, but this is
better tracked by the bitfield in `MCSymbol`.

The only caller of `MCSymbolData::initialize()` was `MCAssembler`, which
(other than `Symbol`) passed in all-0 values.  Replace all that
indirection with a default constructor.

The main point is a cleanup (and there's more cleanup to do), but there
are also some small memory savings.  I measured ~989 MB down to ~975 MB,
cutting a little over 1% off the top of `llc`.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

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

8 years agoDocument the CoreCLR GC Strategy
Swaroop Sridhar [Thu, 21 May 2015 00:50:10 +0000 (00:50 +0000)]
Document the CoreCLR GC Strategy

Add notead about the CoreCLR GC Strategy to the
Garbage Collection document.

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

8 years agoMC: Make MCSymbolData::Symbol private
Duncan P. N. Exon Smith [Thu, 21 May 2015 00:49:09 +0000 (00:49 +0000)]
MC: Make MCSymbolData::Symbol private

Make the back-pointer from `MCSymbolData` to `MCSymbol` private,
preparing to remove the back pointer entirely.  I've already updated all
the users, although for now it's still used to indicate whether
`MCSymbol::Data` has been initialized.

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

8 years agoMC: Remove last use of MCSymbolData::getSymbol(), NFC
Duncan P. N. Exon Smith [Thu, 21 May 2015 00:39:24 +0000 (00:39 +0000)]
MC: Remove last use of MCSymbolData::getSymbol(), NFC

Remove the last use of `MCSymbolData::getSymbol()`.  There's some
*really* hairy stuff going on in `MachObjectWriter::WriteNList()` that I
want to come back to.  In particular, it updates `Symbol` to point at
its aliasee (if any), but leaves `Data` behind, and it's not clear
whether everything makes sense there.

For now I've left the logic unchanged by adding `OrigSymbol` and moving
the FIXME from r237750 up a bit higher.  I've filed PR23598 to track
looking into this.

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

8 years ago[MemCpyOpt] Pass Instruction to IRBuilder, no need for NextNode. NFC.
Ahmed Bougacha [Thu, 21 May 2015 00:08:35 +0000 (00:08 +0000)]
[MemCpyOpt] Pass Instruction to IRBuilder, no need for NextNode. NFC.

We're erasing the instructions anyway.

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

8 years ago[opaque pointer type] Pass explicit pointee type in another case of GEP constant...
David Blaikie [Thu, 21 May 2015 00:06:38 +0000 (00:06 +0000)]
[opaque pointer type] Pass explicit pointee type in another case of GEP constant folding

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

8 years agoFix build error
Andrew Kaylor [Wed, 20 May 2015 23:58:44 +0000 (23:58 +0000)]
Fix build error

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

8 years ago[MemCpyOpt] Don't move the memset when optimizing memset+memcpy.
Ahmed Bougacha [Wed, 20 May 2015 23:55:16 +0000 (23:55 +0000)]
[MemCpyOpt] Don't move the memset when optimizing memset+memcpy.

Fixes PR23599, another miscompile introduced by r235232: when there is
another dependency on the destination of the created memset (i.e., the
part of the original destination that the memcpy doesn't depend on)
between the memcpy and the original memset, we would insert the created
memset after the memcpy, and thus after the other dependency.

Instead, insert the created memset right after the old one.

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

8 years agoFix build warning
Andrew Kaylor [Wed, 20 May 2015 23:28:03 +0000 (23:28 +0000)]
Fix build warning

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

8 years ago[WinEH] C++ EH state numbering fixes
Andrew Kaylor [Wed, 20 May 2015 23:22:24 +0000 (23:22 +0000)]
[WinEH] C++ EH state numbering fixes

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

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

8 years ago[WinEH] Store pointers to the LSDA in the exception registration object
Reid Kleckner [Wed, 20 May 2015 23:08:04 +0000 (23:08 +0000)]
[WinEH] Store pointers to the LSDA in the exception registration object

We aren't yet emitting the LSDA yet, so this will still fail to
assemble.

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

8 years agoDon't generate comments in the DebugLocStream unless required. NFC.
Pete Cooper [Wed, 20 May 2015 22:51:27 +0000 (22:51 +0000)]
Don't generate comments in the DebugLocStream unless required.  NFC.

The ByteStreamer here wasn't taking account of whether the asm streamer was text based and verbose.  Only with that combination should we emit comments.

This change makes sure that we only actually convert a Twine to a string using Twine::str() if we need the comment.  This saves about 10000 small allocations on a test case involving the verify-use_list-order bitcode going through llc with debug info.

Note, this is NFC as the comments would ultimately never be emitted unless required.

Reviewed by Duncan Exon Smith and David Blaikie.

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

8 years agoRevert "Add bool to DebugLocDwarfExpression to control emitting comments."
Pete Cooper [Wed, 20 May 2015 22:37:48 +0000 (22:37 +0000)]
Revert "Add bool to DebugLocDwarfExpression to control emitting comments."

This reverts commit 0037b6bcbc874aa1b93d7ce3ad8dba3753ee2d9d (r237827).

David Blaikie suggested some alternatives to this which are better.  Reverting to apply a better solution later.

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

8 years agoRevert r237828 "[X86] Remove unused node after morphing it from shr to and."
Hans Wennborg [Wed, 20 May 2015 22:31:55 +0000 (22:31 +0000)]
Revert r237828 "[X86] Remove unused node after morphing it from shr to and."

This caused assertions during DAG combine: PR23601.

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

8 years ago[doc] Update Lexicon with C++ unwinder acronyms
Nick Kledzik [Wed, 20 May 2015 22:04:06 +0000 (22:04 +0000)]
[doc] Update Lexicon with C++ unwinder acronyms

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

8 years ago[opaque pointer type] Pass explicit type to Load instruction creation in AutoUpgrade
David Blaikie [Wed, 20 May 2015 21:46:30 +0000 (21:46 +0000)]
[opaque pointer type] Pass explicit type to Load instruction creation in AutoUpgrade

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

8 years ago[Target/ARM] Only enable OptimizeBarrierPass at -O1 and above.
Davide Italiano [Wed, 20 May 2015 21:40:38 +0000 (21:40 +0000)]
[Target/ARM] Only enable OptimizeBarrierPass at -O1 and above.

Ideally this is going to be and LLVM IR pass (shared, among others
with AArch64), but for the time being just enable it if consumers
ask us for optimization and not unconditionally.

Discussed with Tim Northover on IRC.

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

8 years ago[lib/Fuzzer] more docs
Kostya Serebryany [Wed, 20 May 2015 21:03:03 +0000 (21:03 +0000)]
[lib/Fuzzer] more docs

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

8 years agoAsmParser: Require a terminating null character when creating memory buffer.
Alex Lorenz [Wed, 20 May 2015 20:41:27 +0000 (20:41 +0000)]
AsmParser: Require a terminating null character when creating memory buffer.

This commit modifies the memory buffer creation in the AsmParser library so
that it requires a terminating null character. The LLLexer in the AsmParser
library checks for EOF only when it sees a null character, thus it would
be best to require it when creating a memory buffer so that the memory
buffer constructor can verify that a terminating null character is indeed
present.

Reviewers: Duncan P. N. Exon Smith, Matthias Braun

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

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

8 years ago[opaque pointer type] LoadInst: assert that the explicit type matches the implicit one
David Blaikie [Wed, 20 May 2015 20:22:31 +0000 (20:22 +0000)]
[opaque pointer type] LoadInst: assert that the explicit type matches the implicit one

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

8 years agoMC: Remove most remaining uses of MCSymbolData::getSymbol(), NFC
Duncan P. N. Exon Smith [Wed, 20 May 2015 20:18:16 +0000 (20:18 +0000)]
MC: Remove most remaining uses of MCSymbolData::getSymbol(), NFC

Remove most remaining calls to `MCSymbolData::getSymbol()`, instead
using the already available `MCSymbol` directly.

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

8 years ago[X86] Remove unused node after morphing it from shr to and.
Benjamin Kramer [Wed, 20 May 2015 20:10:26 +0000 (20:10 +0000)]
[X86] Remove unused node after morphing it from shr to and.

In some cases it won't get cleaned up properly leading to crashes
downstream. PR23353.

Based on a patch by Davide Italiano.

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

8 years agoAdd bool to DebugLocDwarfExpression to control emitting comments.
Pete Cooper [Wed, 20 May 2015 19:50:03 +0000 (19:50 +0000)]
Add bool to DebugLocDwarfExpression to control emitting comments.

DebugLocDwarfExpression::EmitOp was creating temporary strings by concatenating Twine's.

When emitting to object files, these comments are thrown away.

This commit adds a boolean to the constructor of the DwarfExpression to control whether it will actually emit
any comments.  This prevents it from even generating the temporary comments which would have been thrown away anyway.

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

8 years agoMC: Stop using MCSymbolData::getSymbol() in WinCOFF, NFC
Duncan P. N. Exon Smith [Wed, 20 May 2015 19:34:08 +0000 (19:34 +0000)]
MC: Stop using MCSymbolData::getSymbol() in WinCOFF, NFC

Move APIs over from `MCSymbolData` to `MCSymbol`.

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

8 years agoUse a SmallString buffer instead of a std::string for debug info path lookup. NFC.
Pete Cooper [Wed, 20 May 2015 19:12:14 +0000 (19:12 +0000)]
Use a SmallString buffer instead of a std::string for debug info path lookup.  NFC.

This code appends the filename to the directory then looks that up in a StringMap.  We should be using the existing Twine::toStringRef method instead of Twine::str() as most times we'll succeed in the lookup.

Its possible that we should also consider allowing StringMap to lookup a key using a Twine in addition to a StringRef but that would complicate the code with little known benefit above and beyond this change.

This saves 170k temporary allocations when running llc on the verify_use_list_order bitcode with debug info for x86.

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

8 years agoDAGCombiner: Continue combining if FoldConstantArithmetic() fails.
Matthias Braun [Wed, 20 May 2015 18:54:02 +0000 (18:54 +0000)]
DAGCombiner: Continue combining if FoldConstantArithmetic() fails.

DAG.FoldConstantArithmetic() can fail even though both operands are
Constants if OpaqueConstants are involved. Continue trying other combine
possibilities in tis case.

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

Somewhat related to PR21801 / rdar://19211454

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

8 years agoReapply r237539 with a fix for the Chromium build.
James Molloy [Wed, 20 May 2015 18:41:25 +0000 (18:41 +0000)]
Reapply r237539 with a fix for the Chromium build.

Make sure if we're truncating a constant that would then be sign extended
that the sign extension of the truncated constant is the same as the
original constant.

> Canonicalize min/max expressions correctly.
>
> This patch introduces a canonical form for min/max idioms where one operand
> is extended or truncated. This often happens when the other operand is a
> constant. For example:
>
> %1 = icmp slt i32 %a, i32 0
> %2 = sext i32 %a to i64
> %3 = select i1 %1, i64 %2, i64 0
>
> Would now be canonicalized into:
>
> %1 = icmp slt i32 %a, i32 0
> %2 = select i1 %1, i32 %a, i32 0
> %3 = sext i32 %2 to i64
>
> This builds upon a patch posted by David Majenemer
> (https://www.marc.info/?l=llvm-commits&m=143008038714141&w=2). That pass
> passively stopped instcombine from ruining canonical patterns. This
> patch additionally actively makes instcombine canonicalize too.
>
> Canonicalization of expressions involving a change in type from int->fp
> or fp->int are not yet implemented.

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

8 years agoARM: Fix comment and make it slightly more readable
Matthias Braun [Wed, 20 May 2015 18:40:06 +0000 (18:40 +0000)]
ARM: Fix comment and make it slightly more readable

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

8 years agoMC: Use MCSymbol in LocalCommon, NFC
Duncan P. N. Exon Smith [Wed, 20 May 2015 18:25:40 +0000 (18:25 +0000)]
MC: Use MCSymbol in LocalCommon, NFC

Switch from MCSymbolData to MCSymbol in LocalCommon.

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

8 years agoFix icmp lowering
Pawel Bylica [Wed, 20 May 2015 17:21:09 +0000 (17:21 +0000)]
Fix icmp lowering

Summary:
During icmp lowering it can happen that a constant value can be larger than expected (see the code around the change).
APInt::getMinSignedBits() must be checked again as the shift before can change the constant sign to positive.
I'm not sure it is the best fix possible though.

Test Plan: Regression test included.

Reviewers: resistor, chandlerc, spatel, hfinkel

Reviewed By: hfinkel

Subscribers: hfinkel, llvm-commits

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

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

8 years agoChange Function::getIntrinsicID() to return an Intrinsic::ID. NFC.
Pete Cooper [Wed, 20 May 2015 17:16:39 +0000 (17:16 +0000)]
Change Function::getIntrinsicID() to return an Intrinsic::ID.  NFC.

Now that Intrinsic::ID is a typed enum, we can forward declare it and so return it from this method.

This updates all users which were either using an unsigned to store it, or had a now unnecessary cast.

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

8 years agoTemporary delete the test while we're investigating crashes in LLVMObject it causes.
Alexey Samsonov [Wed, 20 May 2015 17:01:06 +0000 (17:01 +0000)]
Temporary delete the test while we're investigating crashes in LLVMObject it causes.

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

8 years agoMC: Add MCSymbolData back to MCAssembler dump
Duncan P. N. Exon Smith [Wed, 20 May 2015 16:34:36 +0000 (16:34 +0000)]
MC: Add MCSymbolData back to MCAssembler dump

r237490 accidentally dropped MCSymbolData from the MCAssembler dump.
Add it back underneath the MCSymbol dump.  Remove the MCSymbol dump from
MCSymbolData, since this would cause an infinite co-recursion, and
besides, that back pointer is going away.

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

8 years agoMC: Update MCAssembler to use MCSymbol, NFC
Duncan P. N. Exon Smith [Wed, 20 May 2015 16:02:11 +0000 (16:02 +0000)]
MC: Update MCAssembler to use MCSymbol, NFC

Use `MCSymbol` over `MCSymbolData` where both are needed.

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

8 years ago[YAML] Make Node's destructor non-virtual.
Benjamin Kramer [Wed, 20 May 2015 15:38:29 +0000 (15:38 +0000)]
[YAML] Make Node's destructor non-virtual.

Nodes aren't supposed to be destroyed polymorphically. Also make all subclasses
final to avoid non-virtual dtor warnings.

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

8 years agoMC: Use MCSymbol in MachObjectWriter, NFC
Duncan P. N. Exon Smith [Wed, 20 May 2015 15:16:14 +0000 (15:16 +0000)]
MC: Use MCSymbol in MachObjectWriter, NFC

Replace uses of `MCSymbolData` with `MCSymbol` where both are needed, so
we can remove the backpointer.

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

8 years agoMC: Use MCSymbol in MCObjectWriter::isWeak(), NFC
Duncan P. N. Exon Smith [Wed, 20 May 2015 15:10:03 +0000 (15:10 +0000)]
MC: Use MCSymbol in MCObjectWriter::isWeak(), NFC

Continue to prefer `MCSymbol` when we need both.

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

8 years agoGet Triple::getARMCPUForArch() to use TargetParser
Renato Golin [Wed, 20 May 2015 15:05:07 +0000 (15:05 +0000)]
Get Triple::getARMCPUForArch() to use TargetParser

First ARMTargetParser FIXME, conservatively changing the way we parse CPUs
in the back-end. Still not perfect, with a lot of special cases, but moving
towards a more generic solution.

Moving all logic to the target parser made some unwritten assumptions
about architectures in Clang to break. I've added a lot of architectures
required by Clang, and default to CPUs that Clang believes it should
(and I agree).

I've also added a lot of unit tests, with the correct CPU for each
architecture, and Clang seems to be working correctly, too.

It also became clear that using "unsigned ID" as the argument for the get
methods makes it hard to know what ID, so I also changed the argument names
to match the enum type names.

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

8 years agoUnit tests for the getSwappedBytes(double) fix from r237673.
Pawel Bylica [Wed, 20 May 2015 14:57:43 +0000 (14:57 +0000)]
Unit tests for the getSwappedBytes(double) fix from r237673.

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

8 years agoSilencing a -Wsign-compare warning; NFC.
Aaron Ballman [Wed, 20 May 2015 14:53:50 +0000 (14:53 +0000)]
Silencing a -Wsign-compare warning; NFC.

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

8 years agoAVX-512: fixed algorithm of building vectors of i1 elements
Elena Demikhovsky [Wed, 20 May 2015 14:32:03 +0000 (14:32 +0000)]
AVX-512: fixed algorithm of building vectors of i1 elements
fixed extract-insert i1 element,
load i1, zextload i1 should be with "and $1, %reg" to prevent loading garbage.
added a bunch of new tests.

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

8 years agoRevert r237789 - [mips] The naming convention for private labels is ABI dependant.
Daniel Sanders [Wed, 20 May 2015 14:18:59 +0000 (14:18 +0000)]
Revert r237789 - [mips] The naming convention for private labels is  ABI dependant.

It works, but I've noticed that I missed several callers of createMCAsmInfo()
and many don't have a TargetMachine to provide.

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

8 years ago[mips] Fix ehframe-indirect.ll test.
Daniel Sanders [Wed, 20 May 2015 13:19:19 +0000 (13:19 +0000)]
[mips] Fix ehframe-indirect.ll test.

Summary:
-check-prefix replaces the default CHECK prefix rather than adding to it and
must be explicitly re-added.

Also added the N32 cases.

Reviewers: petarj

Reviewed By: petarj

Subscribers: tberghammer, llvm-commits

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

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

8 years ago[mips] The naming convention for private labels is ABI dependant.
Daniel Sanders [Wed, 20 May 2015 13:16:42 +0000 (13:16 +0000)]
[mips] The naming convention for private labels is ABI dependant.

Summary:
For N32/N64, private labels begin with '.L' but for O32 they begin with '$'.

MCAsmInfo now has an initializer function which can be used to provide information from the TargetMachine to control the assembly syntax.

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: jfb, sandeep, llvm-commits, rafael

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

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

8 years ago[StatepointLowering] Support of the gc.relocates for invoke statepoints.
Igor Laevsky [Wed, 20 May 2015 11:37:25 +0000 (11:37 +0000)]
[StatepointLowering] Support of the gc.relocates for invoke statepoints.

This change implements support for lowering of the gc.relocates tied to the invoke statepoint.
This is acomplished by storing frame indices of the lowered values in "StatepointRelocatedValues" map inside FunctionLoweringInfo instead of storing them in per-basic block structure StatepointLowering.
After this change StatepointLowering is used only during "LowerStatepoint" call and it is not necessary to store it as a field in SelectionDAGBuilder anymore.

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

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

8 years ago[mips] [IAS] Factor out .set nomacro warning. NFC.
Toma Tabacu [Wed, 20 May 2015 08:54:45 +0000 (08:54 +0000)]
[mips] [IAS] Factor out .set nomacro warning. NFC.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

8 years ago[TableGen] Make some variable names consistent with their type names and just general...
Craig Topper [Wed, 20 May 2015 05:40:13 +0000 (05:40 +0000)]
[TableGen] Make some variable names consistent with their type names and just generally consistent across all of the overloads.

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

8 years ago[TableGen] Fix a memory leak.
Craig Topper [Wed, 20 May 2015 05:40:09 +0000 (05:40 +0000)]
[TableGen] Fix a memory leak.

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

8 years ago[TableGen] Don't override convertValue for some of the Init types when it does the...
Craig Topper [Wed, 20 May 2015 05:40:06 +0000 (05:40 +0000)]
[TableGen] Don't override convertValue for some of the Init types when it does the same thing as the base class implementation.

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

8 years ago[X86] Implement the local-exec TLS model for Windows targets
David Majnemer [Wed, 20 May 2015 04:45:26 +0000 (04:45 +0000)]
[X86] Implement the local-exec TLS model for Windows targets

We know that _tls_index is zero for local-exec TLS variables because
they are always defined in the executable.

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

8 years agoMC: Use MCSymbol in most of ELFObjectWriter, NFC
Duncan P. N. Exon Smith [Wed, 20 May 2015 04:39:01 +0000 (04:39 +0000)]
MC: Use MCSymbol in most of ELFObjectWriter, NFC

Stop using MCSymbolData where we also need MCSymbol.

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

8 years agoSupport: Introduce LLVM_FALLTHROUGH macro.
Peter Collingbourne [Wed, 20 May 2015 02:44:14 +0000 (02:44 +0000)]
Support: Introduce LLVM_FALLTHROUGH macro.

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

8 years agoAdd a GCStrategy for CoreCLR
Swaroop Sridhar [Wed, 20 May 2015 01:07:23 +0000 (01:07 +0000)]
Add a GCStrategy for CoreCLR

This change adds a new GC strategy for supporting the CoreCLR runtime.

This strategy is currently identical to Statepoint-example GC,
but is necessary for several upcoming changes specific to CoreCLR, such as:

1. Base-pointers not explicitly reported for interior pointers
2. Different format for stack-map encoding
3. Location of Safe-point polls: polls are only needed before loop-back edges and before tail-calls (not needed at function-entry)
4. Runtime specific handshake between calls to managed/unmanaged functions.

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

8 years ago[bpf] fix build
Alexei Starovoitov [Wed, 20 May 2015 00:20:26 +0000 (00:20 +0000)]
[bpf] fix build

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

8 years agoMC: Take MCSymbol in MachObjectWriter::getSymbolAddress(), NFC
Duncan P. N. Exon Smith [Wed, 20 May 2015 00:02:39 +0000 (00:02 +0000)]
MC: Take MCSymbol in MachObjectWriter::getSymbolAddress(), NFC

Pass through an `MCSymbol` instead of an `MCSymbolData` so we can get
rid of the back pointer.

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

8 years agoMC: Use MCSymbol in MCAsmLayout::getSymbolOffset(), NFC
Duncan P. N. Exon Smith [Tue, 19 May 2015 23:53:20 +0000 (23:53 +0000)]
MC: Use MCSymbol in MCAsmLayout::getSymbolOffset(), NFC

Continue to canonicalize on MCSymbol instead of MCSymbolData when both
are needed.

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

8 years ago[PlaceSafepoints] Stop special casing some intrinsics
Philip Reames [Tue, 19 May 2015 23:40:11 +0000 (23:40 +0000)]
[PlaceSafepoints] Stop special casing some intrinsics

We were special casing a handful of intrinsics as not needing a safepoint before them.  After running into another valid case - memset - I took a closer look and realized that almost no intrinsics need to have a safepoint poll before them.  Restructure the code to make that apparent so that we stop hitting these bugs.  The only intrinsics which need a safepoint poll before them are ones which can run arbitrary code.

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

8 years agoTry to fix the build with MSVC 2015 by disabling sized deallocation
Reid Kleckner [Tue, 19 May 2015 23:28:23 +0000 (23:28 +0000)]
Try to fix the build with MSVC 2015 by disabling sized deallocation

I can't actually test this properly because uninstalling MSVC 2015 CTP 6
and reinstalling the 2015 RC takes hours. I can only verify that this
doesn't mess up MSVC 2013 and 2015 CTP 6 builds, which is what I've
done.

Should fix PR23513.

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

8 years agoRevert r237539: "Reapply r237520 with another fix for infinite looping"
Hans Wennborg [Tue, 19 May 2015 23:06:30 +0000 (23:06 +0000)]
Revert r237539: "Reapply r237520 with another fix for infinite looping"

This caused PR23583.

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

8 years agoRemove a stale comment
Philip Reames [Tue, 19 May 2015 22:26:33 +0000 (22:26 +0000)]
Remove a stale comment

The todo was implemented a while ago; I just forgot to remove the comment.

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

8 years ago[lib/Fuzzer] change the meaning of -timeout flag: now timeout is applied to every...
Kostya Serebryany [Tue, 19 May 2015 22:12:57 +0000 (22:12 +0000)]
[lib/Fuzzer] change the meaning of -timeout flag: now timeout is applied to every unit of work separately

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

8 years agoAdd a comment line that was accidentally dropped in r236671.
Akira Hatanaka [Tue, 19 May 2015 21:59:11 +0000 (21:59 +0000)]
Add a comment line that was accidentally dropped in r236671.

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

8 years ago[DWARF parser] Make DWARF parser more robust against missing compile/type units.
Alexey Samsonov [Tue, 19 May 2015 21:54:32 +0000 (21:54 +0000)]
[DWARF parser] Make DWARF parser more robust against missing compile/type units.

DWARF standard claims that each compilation/type unit header in
.debug_info/.debug_types section must be followed by corresponding
compile/type unit DIE, possibly with its children. Two situations
are possible:

 * compile/type unit DIE is missing because DWARF producer failed to
   emit it.
 * DWARF parser failed to parse unit DIE correctly, for instance if it
   contains some unsupported attributes (see r237721, for instance).

In either of these cases, the library, and the tools that use it
(llvm-dwarfdump, llvm-symbolizer) should not crash. Insert appropriate
checks to protect against this.

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

8 years ago[opaque pointer type] Provide a convenience function for creating direct CallInsts...
David Blaikie [Tue, 19 May 2015 21:47:12 +0000 (21:47 +0000)]
[opaque pointer type] Provide a convenience function for creating direct CallInsts to Functions in IRBuilder

Might need a similar convenience in CallInst's ctor too, but we'll
see/will add it when it becomes useful.

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

8 years agoRevert r237708 (MIR serialization) - incremental buildbots became unstable.
Alex Lorenz [Tue, 19 May 2015 21:41:28 +0000 (21:41 +0000)]
Revert r237708 (MIR serialization) - incremental buildbots became unstable.

The incremental buildbots entered a pass-fail cycle where during the fail
cycle one of the tests from this commit fails for an unknown reason. I
have reverted this commit and will investigate the cause of this problem.

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

8 years ago[opaque pointer type] Provide the ability to pass an explicit type when creating...
David Blaikie [Tue, 19 May 2015 21:31:18 +0000 (21:31 +0000)]
[opaque pointer type] Provide the ability to pass an explicit type when creating a CallInst through IRBuilder

A use for this will be added to Clang shortly. I haven't hit the
specific cases I want to cleanup in LLVM just yet.

A utility that avoids the need for this in direct calls to
llvm::Functions will be added too - since in that case the type can be
retrieved from the llvm::Function directly.

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

8 years agoMachineInstr: Remove unused parameter.
Matthias Braun [Tue, 19 May 2015 21:22:20 +0000 (21:22 +0000)]
MachineInstr: Remove unused parameter.

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

8 years ago[Speculation] NFC: more header comments
Jingyue Wu [Tue, 19 May 2015 20:52:45 +0000 (20:52 +0000)]
[Speculation] NFC: more header comments

explaining how it differs from SpeculativeExecuteBB in SimplifyCFG.

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

8 years agoFix MIR testcase committed in r237708 - remove target triple.
Alex Lorenz [Tue, 19 May 2015 20:51:48 +0000 (20:51 +0000)]
Fix MIR testcase committed in r237708 - remove target triple.

Remove the target specific triple and datalayout from the
llvm IR in the MIR testcase file.

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

8 years agoRemove unnecessary cast. NFC
Pete Cooper [Tue, 19 May 2015 20:50:14 +0000 (20:50 +0000)]
Remove unnecessary cast.  NFC

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

8 years ago[DWARF parser] Add basic support for DWZ DWARF multifile extensions.
Alexey Samsonov [Tue, 19 May 2015 20:29:28 +0000 (20:29 +0000)]
[DWARF parser] Add basic support for DWZ DWARF multifile extensions.

This change implements basic support for DWARF alternate sections
proposal: http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open

LLVM tools now understand new forms: DW_FORM_GNU_ref_alt and
DW_FORM_GNU_strp_alt, which are used as references to .debug_info and
.debug_str sections respectively, stored in a separate file, and
possibly shared between different executables / shared objects.

llvm-dwarfdump and llvm-symbolizer don't yet know how to access this
alternate debug file (usually pointed by .gnu_debugaltlink section),
but they can at lease properly parse and dump regular files, which
refer to it.

This change should fix crashes of llvm-dwarfdump and llvm-symbolizer on
files produced by running "dwz" tool. Such files are already installed
on some modern Linux distributions.

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

8 years agoDereferenceable, dereferenceable_or_null metadata for loads
Sanjoy Das [Tue, 19 May 2015 20:10:19 +0000 (20:10 +0000)]
Dereferenceable, dereferenceable_or_null metadata for loads

Summary:
Introduce dereferenceable, dereferenceable_or_null metadata for loads
with the same semantic as corresponding attributes.

This patch depends on http://reviews.llvm.org/D9253

Patch by Artur Pilipenko!

Reviewers: hfinkel, sanjoy, reames

Reviewed By: sanjoy, reames

Subscribers: llvm-commits

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

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

8 years agouse 'auto *' for pointers; clearer usage, no deep copying
Sanjay Patel [Tue, 19 May 2015 20:10:16 +0000 (20:10 +0000)]
use 'auto *' for pointers; clearer usage, no deep copying

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

8 years agoRemove unused MCExpr.h include from MCELF.h. NFC
Pete Cooper [Tue, 19 May 2015 19:20:02 +0000 (19:20 +0000)]
Remove unused MCExpr.h include from MCELF.h.  NFC

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

8 years agotidy up
Sanjay Patel [Tue, 19 May 2015 19:10:57 +0000 (19:10 +0000)]
tidy up

1. remove duplicate local variable
2. add local variable with name to match comment
3. remove useless comment

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

8 years agoFix llc path in MIR testcases committed in r237708.
Alex Lorenz [Tue, 19 May 2015 18:45:41 +0000 (18:45 +0000)]
Fix llc path in MIR testcases committed in r237708.

I've committed testcases with local llc path by mistake.

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

8 years agouse range-based for-loop
Sanjay Patel [Tue, 19 May 2015 18:24:33 +0000 (18:24 +0000)]
use range-based for-loop

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

8 years agoRemove unused MCRelocationInfo.h include from MCDisassembler.h. NFC
Pete Cooper [Tue, 19 May 2015 18:18:49 +0000 (18:18 +0000)]
Remove unused MCRelocationInfo.h include from MCDisassembler.h.  NFC

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