oota-llvm.git
9 years agoAVX-512: Added all forms of VPABS instruction
Elena Demikhovsky [Tue, 23 Jun 2015 08:19:46 +0000 (08:19 +0000)]
AVX-512: Added all forms of VPABS instruction
Added all intrinsics, tests for encoding, tests for intrinsics.

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

9 years agoMCExpr: Avoid UB by evaluating this shift as unsigned
Justin Bogner [Tue, 23 Jun 2015 07:32:55 +0000 (07:32 +0000)]
MCExpr: Avoid UB by evaluating this shift as unsigned

We hit undefined behaviour in some MCExpr tests when the LHS of a left
shift is -1. Twos-complement semantics are completely reasonable here,
so we should just do the shift in unsigned.

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

9 years ago[mips] Fix some UB by shifting before sign-extending
Justin Bogner [Tue, 23 Jun 2015 07:28:57 +0000 (07:28 +0000)]
[mips] Fix some UB by shifting before sign-extending

Avoid shifting a negative value by sign-extending after the shift.

Fixes a couple of tests that were failing under ubsan.

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

9 years agotest: Move target dependent test in their own folder for c API test
Justin Bogner [Tue, 23 Jun 2015 06:46:54 +0000 (06:46 +0000)]
test: Move target dependent test in their own folder for c API test

Dissasembly tests depends on target. The problem is that it disable
all tests if all targets are not compiled. This moves things around in
order to get target specific code in a target specific folder.

Patch by Amaury Sechet. Thanks!

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

9 years agoFix PR13851: Preserve metadata for the unswitched branch
Weiming Zhao [Tue, 23 Jun 2015 05:31:09 +0000 (05:31 +0000)]
Fix PR13851: Preserve metadata for the unswitched branch

This patch copies the metadata of the unswitched branch to the newly
crreated branch in loop unswitch pass.

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

9 years agoRemove broken banner.
Rafael Espindola [Tue, 23 Jun 2015 03:45:23 +0000 (03:45 +0000)]
Remove broken banner.

Thanks to Filipe Cabecinhas for noticing.

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

9 years agoAdd a test for the previous commit.
Rafael Espindola [Tue, 23 Jun 2015 03:42:44 +0000 (03:42 +0000)]
Add a test for the previous commit.

This shows how two symbols at the same address are handled.

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

9 years agoHandle multiple symbols having the same address.
Rafael Espindola [Tue, 23 Jun 2015 03:36:08 +0000 (03:36 +0000)]
Handle multiple symbols having the same address.
I will add an explicit test in a second, but this fixes the bots.

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

9 years ago[InstCombine] Optimize subtract of selects into a select of a sub
David Majnemer [Tue, 23 Jun 2015 02:49:24 +0000 (02:49 +0000)]
[InstCombine] Optimize subtract of selects into a select of a sub

This came up when examining some code generated by clang's IRGen for
certain member pointers.

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

9 years agoFix tests when X86 is not enabled.
Rafael Espindola [Tue, 23 Jun 2015 02:45:44 +0000 (02:45 +0000)]
Fix tests when X86 is not enabled.

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

9 years agoCompute correct symbol sizes for MachO and COFF.
Rafael Espindola [Tue, 23 Jun 2015 02:20:37 +0000 (02:20 +0000)]
Compute correct symbol sizes for MachO and COFF.

Before this would dump from the symbol start to the end of the section.

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

9 years agoExtract an utility for computing symbol sizes on MachO and COFF.
Rafael Espindola [Tue, 23 Jun 2015 02:08:48 +0000 (02:08 +0000)]
Extract an utility for computing symbol sizes on MachO and COFF.

I will add a second user in the next commit.

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

9 years agoAMDGPU: Use getAsInteger instead of atoi
Matt Arsenault [Tue, 23 Jun 2015 02:05:55 +0000 (02:05 +0000)]
AMDGPU: Use getAsInteger instead of atoi

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

9 years ago[FaultMaps] Move FaultMapParser to Object/
Sanjoy Das [Tue, 23 Jun 2015 01:05:26 +0000 (01:05 +0000)]
[FaultMaps] Move FaultMapParser to Object/

Summary:
That way llvm-objdump can rely on it without adding an extra dependency
on CodeGen.

This change duplicates the FaultKind enum and the code that serializes
it to a string.  I could not figure out a way to get around this without
adding a new dependency to Object

Reviewers: rafael, ab

Subscribers: llvm-commits

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

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

9 years agoFix a typo in a comment in FaultMaps.h. NFC.
Sanjoy Das [Tue, 23 Jun 2015 01:05:21 +0000 (01:05 +0000)]
Fix a typo in a comment in FaultMaps.h. NFC.

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

9 years agollvm/tools/llvm-objdump/CMakeLists.txt: Update libdeps to fix r240304.
NAKAMURA Takumi [Tue, 23 Jun 2015 00:59:12 +0000 (00:59 +0000)]
llvm/tools/llvm-objdump/CMakeLists.txt: Update libdeps to fix r240304.

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

9 years ago[x86] generalize reassociation optimization in machine combiner to 2 instructions
Sanjay Patel [Tue, 23 Jun 2015 00:39:40 +0000 (00:39 +0000)]
[x86] generalize reassociation optimization in machine combiner to 2 instructions

Currently ( D10321, http://reviews.llvm.org/rL239486 ), we can use the machine combiner pass
to reassociate the following sequence to reduce the critical path:

A = ? op ?
B = A op X
C = B op Y
-->
A = ? op ?
B = X op Y
C = A op B

'op' is currently limited to x86 AVX scalar FP adds (with fast-math on), but in theory, it could
be any associative math/logic op (see TODO in code comment).

This patch generalizes the pattern match to ignore the instruction that defines 'A'. So instead of
a sequence of 3 adds, we now only need to find 2 dependent adds and decide if it's worth
reassociating them.

This generalization has a compile-time cost because we can now match more instruction sequences
and we rely more heavily on the machine combiner to discard sequences where reassociation doesn't
improve the critical path.

For example, in the new test case:

A = M div N
B = A add X
C = B add Y

We'll match 2 reassociation patterns, but this transform doesn't reduce the critical path:

A = M div N
B = A add Y
C = B add X

We need the combiner to reject that pattern but select this:

A = M div N
B = X add Y
C = B add A

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

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

9 years agoRe-apply "InstrProf: When reading, copy the data instead of taking a reference. NFC"
Justin Bogner [Mon, 22 Jun 2015 23:58:05 +0000 (23:58 +0000)]
Re-apply "InstrProf: When reading, copy the data instead of taking a reference. NFC"

This version fixes a missing include that MSVC noticed and
clarifies the ownership of the counter buffer that's passed to
InstrProfRecord.

This restores r240206, which was reverted in r240208.

Patch by Betul Buyukkurt.

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

9 years agoInstrProf: Add a test for multiple copies of the same with different hashes
Justin Bogner [Mon, 22 Jun 2015 23:56:53 +0000 (23:56 +0000)]
InstrProf: Add a test for multiple copies of the same with different hashes

This functionality wasn't being tested.

Patch by Betul Buyukkurt.

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

9 years agoCreate Value.def helper. NFC.
Pete Cooper [Mon, 22 Jun 2015 23:48:35 +0000 (23:48 +0000)]
Create Value.def helper.  NFC.

This is similar to Metadata.def and Instructions.def but for Value's.

It will be used in upcoming commits to devirtualize the Value class.

Reviewed by Duncan Exon Smith.

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

9 years agoFix PR23914.
Evgeniy Stepanov [Mon, 22 Jun 2015 23:36:03 +0000 (23:36 +0000)]
Fix PR23914.

r226830 moved the declaration of Buf to a nested scope, resulting
in a dangling reference (in StringRef Name), and a use-after-free.

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

9 years agoCode cleanup: Remove std::move() around xvalue (NFC)
Logan Chien [Mon, 22 Jun 2015 23:16:02 +0000 (23:16 +0000)]
Code cleanup: Remove std::move() around xvalue (NFC)

Remove std::move() around xvalue so that copy elision is eligible.
In case that copy elision is not appliable, the c++ standard also
guarantees the move semantics on xvalue.  Thus, it is not necessary
to wrap Args with std::move.

This also silence a warning since r240345.

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

9 years ago[LoopDist] Improve variable names and comments in LoopVersioning class, NFC
Adam Nemet [Mon, 22 Jun 2015 22:59:40 +0000 (22:59 +0000)]
[LoopDist] Improve variable names and comments in LoopVersioning class, NFC

As with the previous patch, the goal is to turn the class into a general
loop-versioning class.  This patch removes any references to loop
distribution.

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

9 years agoModify ParseArgs to return the InputArgList by value - there's no need for dynamic...
David Blaikie [Mon, 22 Jun 2015 22:06:37 +0000 (22:06 +0000)]
Modify ParseArgs to return the InputArgList by value - there's no need for dynamic allocation/ownership here

The one caller that does anything other than keep this variable on the
stack is the single use of DerivedArgList in Clang, which is a bit more
interesting but can probably be cleaned up/simplified a bit further
(have DerivedArgList take ownership of the InputArgList rather than
needing to reference its Args indirectly) which I'll try to after this.

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

9 years ago[CMake] Treating LLVM_INCLUDE_TOOLS, which is a bool, as a string to change behaviors...
Chris Bieneman [Mon, 22 Jun 2015 21:58:02 +0000 (21:58 +0000)]
[CMake] Treating LLVM_INCLUDE_TOOLS, which is a bool, as a string to change behaviors of the build is a dirty hack. We shouldn't do it.

Summary: I don't think anyone is relying on this behavior for bootstrapping (because I don't think it works), but if you do need it, speak now or forever hold your peace.

Reviewers: chapuni, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

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

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

9 years agoRevert r240291: causes problems in self-hosted builds.
Pawel Bylica [Mon, 22 Jun 2015 21:54:07 +0000 (21:54 +0000)]
Revert r240291: causes problems in self-hosted builds.

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

9 years ago[X86][FMA4] FMA4 ops can perform unaligned folded loads.
Simon Pilgrim [Mon, 22 Jun 2015 21:49:41 +0000 (21:49 +0000)]
[X86][FMA4] FMA4 ops can perform unaligned folded loads.

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

9 years agoLinker: Do not expect comdat to exist in source module.
Peter Collingbourne [Mon, 22 Jun 2015 21:46:51 +0000 (21:46 +0000)]
Linker: Do not expect comdat to exist in source module.

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

9 years agoFix line endings (NFC)
Joseph Tremoulet [Mon, 22 Jun 2015 21:37:34 +0000 (21:37 +0000)]
Fix line endings (NFC)

I inadvertently checked these in with Windows-style line
endings in r240288.

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

9 years ago[Object] Search for architecures by name in MachOUniversalBinary::getObjectForArch()
Frederic Riss [Mon, 22 Jun 2015 21:33:24 +0000 (21:33 +0000)]
[Object] Search for architecures by name in MachOUniversalBinary::getObjectForArch()

The reason we need to search by name rather than by Triple::ArchType
is to handle subarchitecture correclty. There is no different ArchType
for the x86_64h architecture (it identifies itself as x86_64), or for
the various ARM subarches. The only way to get to the subarch slice
in an universal binary is to search by name.

This issue led to hard to debug and transient symbolication failures
in Asan tests (it mostly works, because the files are very similar).

This also affects the Profiling infrastucture as it is the other user
of that API.

Reviewers: samsonov, bogner

Subscribers: llvm-commits

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

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

9 years agoSet missing x86 arch in a CodeGen regression test.
Pawel Bylica [Mon, 22 Jun 2015 21:18:10 +0000 (21:18 +0000)]
Set missing x86 arch in a CodeGen regression test.

Fixes the regression test added in r240291.

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

9 years agotest-release.sh: Minor fixes.
Hans Wennborg [Mon, 22 Jun 2015 21:13:30 +0000 (21:13 +0000)]
test-release.sh: Minor fixes.

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

9 years ago[X86][AVX2] Added missing stack folding tests for vpshufhw/vpshuflw
Simon Pilgrim [Mon, 22 Jun 2015 21:10:42 +0000 (21:10 +0000)]
[X86][AVX2] Added missing stack folding tests for vpshufhw/vpshuflw

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

9 years agoR600/SI: Use ELF64 format instead of ELF32
Tom Stellard [Mon, 22 Jun 2015 21:03:54 +0000 (21:03 +0000)]
R600/SI: Use ELF64 format instead of ELF32

Reviewers: arsenm, rafael

Subscribers: llvm-commits

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

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

9 years agoR600: Use EM_AMDGPU for the ELF Machine type
Tom Stellard [Mon, 22 Jun 2015 21:03:52 +0000 (21:03 +0000)]
R600: Use EM_AMDGPU for the ELF Machine type

Reviewers: arsenm, rafael

Subscribers: llvm-commits

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

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

9 years agoSupport/ELF: Add EM_AMDGPU
Tom Stellard [Mon, 22 Jun 2015 21:03:47 +0000 (21:03 +0000)]
Support/ELF: Add EM_AMDGPU

Summary: This will be used by the R600 backend.

Reviewers: chandlerc, rafael

Subscribers: llvm-commits

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

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

9 years ago[X86] Teach load folding to accept scalar _Int users of MOVSS/MOVSD.
Ahmed Bougacha [Mon, 22 Jun 2015 20:51:51 +0000 (20:51 +0000)]
[X86] Teach load folding to accept scalar _Int users of MOVSS/MOVSD.

The _Int instructions are special, in that they operate on the full
VR128 instead of FR32.  The load folding then looks at MOVSS, at the
user, and bails out when it sees a size mismatch.

What we really know is that the rm_Int instructions don't load the
higher lanes, so folding is fine.

This happens for the straightforward intrinsic code, e.g.:

    _mm_add_ss(a, _mm_load_ss(p));

Fixes PR23349.

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

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

9 years agoMIR Serialization: Introduce a lexer for machine instructions.
Alex Lorenz [Mon, 22 Jun 2015 20:37:46 +0000 (20:37 +0000)]
MIR Serialization: Introduce a lexer for machine instructions.

This commit adds a function that tokenizes the string containing
the machine instruction. This commit also adds a struct called
'MIToken' which is used to represent the lexer's tokens.

Reviewers: Sean Silva

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

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

9 years agoSafeStack: Create the unsafe stack pointer on demand.
Peter Collingbourne [Mon, 22 Jun 2015 20:26:54 +0000 (20:26 +0000)]
SafeStack: Create the unsafe stack pointer on demand.

This avoids creating an unnecessary undefined reference on targets such as
NVPTX that require such references to be declared in asm output.

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

9 years agoMove MCSymbol Value in to the union of Offset and CommonSize.
Pete Cooper [Mon, 22 Jun 2015 19:57:33 +0000 (19:57 +0000)]
Move MCSymbol Value in to the union of Offset and CommonSize.

This is a reapplication of r239440 which was reverted in r239441.
There are no changes to this patch from then, but this had instead exposed
a bug in .thumb_set which was fixed in r240318.  Having fixed that bug, it
is now safe to re-apply this code.

Original commit message below:

It wasn't possible to have a variable Symbol with offset or 'isCommon' so
this just enables better packing of the MCSymbol class.

Reviewed by Rafael Espindola.

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

9 years agoChange .thumb_set to have the same error checks as .set.
Pete Cooper [Mon, 22 Jun 2015 19:35:57 +0000 (19:35 +0000)]
Change .thumb_set to have the same error checks as .set.

According to the documentation, .thumb_set is 'the equivalent of a .set directive'.

We didn't have equivalent behaviour in terms of all the errors we could throw, for
example, when a symbol is redefined.

This change refactors parseAssignment so that it can be used by .set and .thumb_set
and implements tests for .thumb_set for all the errors thrown by that method.

Reviewed by Rafael Espíndola.

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

9 years agoRemove "const" from the MachineFunction reference in VLIWPacketizerList
Krzysztof Parzyszek [Mon, 22 Jun 2015 18:59:44 +0000 (18:59 +0000)]
Remove "const" from the MachineFunction reference in VLIWPacketizerList

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

9 years agodocs: Update allowed values for LLVM_USE_SANITIZER
Justin Bogner [Mon, 22 Jun 2015 18:55:46 +0000 (18:55 +0000)]
docs: Update allowed values for LLVM_USE_SANITIZER

"Thread" and combinations of "Address" and "Undefined" have been
accepted for a while now.

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

9 years ago[x86] set default reciprocal (division and square root) codegen to match GCC
Sanjay Patel [Mon, 22 Jun 2015 18:29:44 +0000 (18:29 +0000)]
[x86] set default reciprocal (division and square root) codegen to match GCC

D8982 ( checked in at http://reviews.llvm.org/rL239001 ) added command-line
options to allow reciprocal estimate instructions to be used in place of
divisions and square roots.

This patch changes the default settings for x86 targets to allow that recip
codegen (except for scalar division because that breaks too much code) when
using -ffast-math or its equivalent.

This matches GCC behavior for this kind of codegen.

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

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

9 years agoFix MSVC build (again!).
Sanjoy Das [Mon, 22 Jun 2015 18:24:50 +0000 (18:24 +0000)]
Fix MSVC build (again!).

Remove two `typename`s that I should have removed in r240307 but left in
by mistake.

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

9 years agoDo not pass -allow-shlib-undefined to the Solaris linker.
Rafael Espindola [Mon, 22 Jun 2015 18:24:01 +0000 (18:24 +0000)]
Do not pass -allow-shlib-undefined to the Solaris linker.

Patch by Xan López.

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

9 years agoFix MSVC build.
Sanjoy Das [Mon, 22 Jun 2015 18:20:10 +0000 (18:20 +0000)]
Fix MSVC build.

I had some unnecessary `typename`s left in after addressing review.
This compiled successfully with clang++ but MSVC reported an error.  Fix
the build error by removing the redundant `typename`s.

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

9 years agoRemove the IsStreamed member variable.
Rafael Espindola [Mon, 22 Jun 2015 18:06:15 +0000 (18:06 +0000)]
Remove the IsStreamed member variable.

Having different code paths for streamed and regular bitcode reading was a
source of bugs in the past and this defines them away.

It has a small but noticeable impact on performance. I timed running
"opt -disable-output -disable-verify" on a ltoed clang. It goes from

14.752845231 seconds time elapsed   ( +-  0.16% )

to

15.012463721 seconds time elapsed   ( +-  0.11% )

Extracted from a patch by Karl Schimpf.

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

9 years ago[FaultMaps] Add a parser for the __llvm__faultmaps section.
Sanjoy Das [Mon, 22 Jun 2015 18:03:02 +0000 (18:03 +0000)]
[FaultMaps] Add a parser for the __llvm__faultmaps section.

Summary:
The parser is exercised by llvm-objdump using -print-fault-maps.  As is
probably obvious, the code itself was "heavily inspired" by
http://reviews.llvm.org/D10434.

Reviewers: reames, atrick, JosephTremoulet

Subscribers: llvm-commits

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

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

9 years ago[NFC] Capitalization in documentation.
Sanjoy Das [Mon, 22 Jun 2015 18:02:55 +0000 (18:02 +0000)]
[NFC] Capitalization in documentation.

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

9 years agoBring r240130 back.
Rafael Espindola [Mon, 22 Jun 2015 17:52:52 +0000 (17:52 +0000)]
Bring r240130 back.

Now that pr23900 is fixed, we can bring it back with no changes.

Original message:

Make all temporary symbols unnamed.

What this does is make all symbols that would otherwise start with a .L
(or L on MachO) unnamed.

Some of these symbols still show up in the symbol table, but we can just
make them unnamed.

In order to make sure we produce identical results when going thought assembly,
all .L (not just the compiler produced ones), are now unnamed.

Running llc on llvm-as.opt.bc, the peak memory usage goes from 208.24MB to
205.57MB.

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

9 years agoAvoid a Symbol -> Name -> Symbol conversion.
Rafael Espindola [Mon, 22 Jun 2015 17:46:53 +0000 (17:46 +0000)]
Avoid a Symbol -> Name -> Symbol conversion.

Before this we were producing a TargetExternalSymbol from a MCSymbol.
That meant extracting the symbol name and fetching the symbol again
down the pipeline.

This patch adds a DAG.getMCSymbol that lets the MCSymbol pass unchanged on the
DAG.

Doing so removes the need for MO_NOPREFIX and fixes the root cause of pr23900,
allowing r240130 to be committed again.

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

9 years agoMIR Serialization: Serialize machine instruction names.
Alex Lorenz [Mon, 22 Jun 2015 17:02:30 +0000 (17:02 +0000)]
MIR Serialization: Serialize machine instruction names.

This commit implements initial machine instruction serialization. It
serializes machine instruction names. The instructions are represented
using a YAML sequence of string literals and are a part of machine
basic block YAML mapping.

This commit introduces a class called 'MIParser' which will be used to
parse the machine instructions and operands.

Reviewers: Duncan P. N. Exon Smith

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

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

9 years agoFix shl folding in DAG combiner.
Pawel Bylica [Mon, 22 Jun 2015 15:58:11 +0000 (15:58 +0000)]
Fix shl folding in DAG combiner.

Summary: The code responsible for shl folding in the DAGCombiner was assuming incorrectly that all constants are less than 64 bits. This patch simply changes the way values are compared.

Test Plan: A regression test included.

Reviewers: andreadb

Reviewed By: andreadb

Subscribers: andreadb, test, llvm-commits

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

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

9 years agoAdd a triple to the test to fix it on some hosts.
Rafael Espindola [Mon, 22 Jun 2015 15:44:20 +0000 (15:44 +0000)]
Add a triple to the test to fix it on some hosts.

The slp vectorizer doesn't optimize this case in 32 bits.

Fixes PR23453.

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

9 years ago[ORC] Add NullResolver
Joseph Tremoulet [Mon, 22 Jun 2015 15:27:58 +0000 (15:27 +0000)]
[ORC] Add NullResolver

Summary:
This is an implementation of RuntimeDyld::SymbolResolver that simply
rejects all resolution requests; useful for clients that do not have any
cross-object symbol references.

Reviewers: lhames

Reviewed By: lhames

Subscribers: llvm-commits

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

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

9 years agoSupport Solaris unused sections' gc link syntax.
Rafael Espindola [Mon, 22 Jun 2015 15:06:17 +0000 (15:06 +0000)]
Support Solaris unused sections' gc link syntax.

It is not clear if this would work or not with LLVM_NO_DEAD_STRIP
binaries, so be conservative for now.

Patch by Xan López.

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

9 years ago[mips] [IAS] Add support for LAReg with identical source and destination register...
Toma Tabacu [Mon, 22 Jun 2015 13:10:23 +0000 (13:10 +0000)]
[mips] [IAS] Add support for LAReg with identical source and destination register operands.

Summary: In this case, we're supposed to load the immediate in AT and then ADDu it with the source register and put it in the destination register.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years agoAVX-512: added VPSHUFB instruction - all SKX forms
Elena Demikhovsky [Mon, 22 Jun 2015 13:00:42 +0000 (13:00 +0000)]
AVX-512: added VPSHUFB instruction - all SKX forms
Added intrinsics and encoding tests.

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

9 years agoDo not pass optimization flags to Solaris' linker.
Rafael Espindola [Mon, 22 Jun 2015 12:41:52 +0000 (12:41 +0000)]
Do not pass optimization flags to Solaris' linker.

It is not supported.

Patch by Xan López.

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

9 years agoUse right syntax to pass version script to Solaris' ld.
Rafael Espindola [Mon, 22 Jun 2015 12:34:54 +0000 (12:34 +0000)]
Use right syntax to pass version script to Solaris' ld.

Patch by Xan Lopez!

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

9 years ago[mips] [IAS] Add support for LASym with identical source and destination register...
Toma Tabacu [Mon, 22 Jun 2015 12:08:39 +0000 (12:08 +0000)]
[mips] [IAS] Add support for LASym with identical source and destination register operands.

Summary:
In this case, we're supposed to load the address of the symbol in AT and then ADDu it with the source register and
put it in the destination register.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years agoAVX-512: All forms of VCOPMRESS VEXPAND instructions,
Elena Demikhovsky [Mon, 22 Jun 2015 11:16:30 +0000 (11:16 +0000)]
AVX-512: All forms of VCOPMRESS VEXPAND instructions,
encoding tests.

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

9 years agoFixed/added namespace ending comments using clang-tidy. NFC
Alexander Kornienko [Mon, 22 Jun 2015 09:57:54 +0000 (09:57 +0000)]
Fixed/added namespace ending comments using clang-tidy. NFC

A few more files that were fixed while preparing r240270.

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

9 years agoRemoving empty directories.
Alexander Kornienko [Mon, 22 Jun 2015 09:34:18 +0000 (09:34 +0000)]
Removing empty directories.

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

9 years agoReverted AVX-512 vector shuffle
Elena Demikhovsky [Mon, 22 Jun 2015 09:01:15 +0000 (09:01 +0000)]
Reverted AVX-512 vector shuffle

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

9 years ago[X86] Allow more call sequences to use push instructions for argument passing
Michael Kuperstein [Mon, 22 Jun 2015 08:31:22 +0000 (08:31 +0000)]
[X86] Allow more call sequences to use push instructions for argument passing

This allows more call sequences to use pushes instead of movs when optimizing for size.
In particular, calling conventions that pass some parameters in registers (e.g. thiscall) are now supported.

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

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

9 years agoAVX-512: Added intrinsics for VPERMT2W/D/Q/PS/PD and
Elena Demikhovsky [Mon, 22 Jun 2015 06:45:48 +0000 (06:45 +0000)]
AVX-512: Added intrinsics for VPERMT2W/D/Q/PS/PD and
VPERMI2W/D/Q/PS/PD instructions.
Added tests.

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

9 years ago[PM/AA] Hoist the AliasResult enum out of the AliasAnalysis class.
Chandler Carruth [Mon, 22 Jun 2015 02:16:51 +0000 (02:16 +0000)]
[PM/AA] Hoist the AliasResult enum out of the AliasAnalysis class.

This will allow classes to implement the AA interface without deriving
from the class or referencing an internal enum of some other class as
their return types.

Also, to a pretty fundamental extent, concepts such as 'NoAlias',
'MayAlias', and 'MustAlias' are first class concepts in LLVM and we
aren't saving anything by scoping them heavily.

My mild preference would have been to use a scoped enum, but that
feature is essentially completely broken AFAICT. I'm extremely
disappointed. For example, we cannot through any reasonable[1] means
construct an enum class (or analog) which has scoped names but converts
to a boolean in order to test for the possibility of aliasing.

[1]: Richard Smith came up with a "solution", but it requires class
templates, and lots of boilerplate setting up the enumeration multiple
times. Something like Boost.PP could potentially bundle this up, but
even that would be quite painful and it doesn't seem realistically worth
it. The enum class solution would probably work without the need for
a bool conversion.

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

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

9 years ago[PM/AA] Rework the names and comments in AliasSetTracker to more
Chandler Carruth [Mon, 22 Jun 2015 02:12:52 +0000 (02:12 +0000)]
[PM/AA] Rework the names and comments in AliasSetTracker to more
accurately describe what is being tracked.

While these two enums do track mod/ref information and aliasing
information, they don't represent the exact same things as either the
mod/ref enums or the alias result enum in AA. They're definitions are
dominated by the structure of their lattice and the bit's various
semantics. This patch just calls them what they are and tries to spell
out usefully distinct names for these things.

This will clear the path for using a raw unscoped enum to represent some
of these concepts across LLVM's analysis library.

No functionality changed here.

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

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

9 years agoAdd the testcase from pr23900.
Rafael Espindola [Mon, 22 Jun 2015 01:29:24 +0000 (01:29 +0000)]
Add the testcase from pr23900.

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

9 years ago[X86] Code tidyup - Use SDValue bool operator. NFC.
Simon Pilgrim [Sun, 21 Jun 2015 21:34:32 +0000 (21:34 +0000)]
[X86] Code tidyup - Use SDValue bool operator. NFC.

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

9 years agoAsmPrinter: Don't emit empty .debug_loc entries
Duncan P. N. Exon Smith [Sun, 21 Jun 2015 16:54:56 +0000 (16:54 +0000)]
AsmPrinter: Don't emit empty .debug_loc entries

If we don't know how to represent a .debug_loc entry, skip the entry
entirely rather than emitting an empty one.  Similarly, if a .debug_loc
list has no entries, don't create the list.

We still want to create the variables, just in an optimized-out form
that doesn't have a DW_AT_location.

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

9 years agoAsmPrinter: Rewrite initialization of DbgVariable, NFC
Duncan P. N. Exon Smith [Sun, 21 Jun 2015 16:50:43 +0000 (16:50 +0000)]
AsmPrinter: Rewrite initialization of DbgVariable, NFC

There are three types of `DbgVariable`:
  - alloca variables, created based on the MMI table,
  - register variables, created based on DBG_VALUE instructions, and
  - optimized-out variables.

This commit reconfigures `DbgVariable` to make it easier to tell which
kind we have, and make initialization a little clearer.

For MMI/alloca variables, `FrameIndex.size()` must always equal
`Expr.size()`, and there shouldn't be an `MInsn`.  For register
variables (with a `MInsn`), `FrameIndex` must be empty, and `Expr`
should have 0 or 1 element depending on whether it has a complex
expression (registers with multiple locations use `DebugLocListIndex`).
Optimized-out variables shouldn't have any of these fields.

Moreover, this separates DBG_VALUE initialization until after the
variable is created, simplifying logic in a future commit that changes
`collectVariableInfo()` to stop creating empty .debug_loc entries/lists.

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

9 years ago[X86][SSE] Added missing stack folding test for CVTSD2SS instruction.
Simon Pilgrim [Sun, 21 Jun 2015 16:07:47 +0000 (16:07 +0000)]
[X86][SSE] Added missing stack folding test for CVTSD2SS instruction.

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

9 years agoOptTable.h: Prune a couple of \param(s), since Arg has been ArrayRef-ized. [-Wdocumen...
NAKAMURA Takumi [Sun, 21 Jun 2015 13:44:46 +0000 (13:44 +0000)]
OptTable.h: Prune a couple of \param(s), since Arg has been ArrayRef-ized. [-Wdocumentation]

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

9 years agoDevirtualize ArgList's dtor now that -Wvirtual-dtor and C++11 allow a better way...
David Blaikie [Sun, 21 Jun 2015 06:51:35 +0000 (06:51 +0000)]
Devirtualize ArgList's dtor now that -Wvirtual-dtor and C++11 allow a better way to describe this situation

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

9 years agoArrayRef-ify libDriverMain
David Blaikie [Sun, 21 Jun 2015 06:31:56 +0000 (06:31 +0000)]
ArrayRef-ify libDriverMain

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

9 years agoArrayRef-ify ParseArgs
David Blaikie [Sun, 21 Jun 2015 06:31:53 +0000 (06:31 +0000)]
ArrayRef-ify ParseArgs

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

9 years agoObject: Add load configuration structure for 64 bit PE/COFF.
Rui Ueyama [Sun, 21 Jun 2015 01:12:32 +0000 (01:12 +0000)]
Object: Add load configuration structure for 64 bit PE/COFF.

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

9 years agoSwitch lowering: add heuristic for filling leaf nodes in the weight-balanced binary...
Hans Wennborg [Sat, 20 Jun 2015 17:14:07 +0000 (17:14 +0000)]
Switch lowering: add heuristic for filling leaf nodes in the weight-balanced binary search tree

Sparse switches with profile info are lowered as weight-balanced BSTs. For
example, if the node weights are {1,1,1,1,1,1000}, the right-most node would
end up in a tree by itself, bringing it closer to the top.

However, a leaf in this BST can contain up to 3 cases, and having a single
case in a leaf node as in the example means the tree might become
unnecessarily high.

This patch adds a heauristic to the pivot selection algorithm that moves more
cases into leaf nodes unless that would lower their rank. It still doesn't
yield the optimal tree in every case, but I believe it's conservatibely correct.

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

9 years ago[X86][SSE] Fix PerformSExtCombine bug that accessed the wrong return value of an...
Simon Pilgrim [Sat, 20 Jun 2015 16:19:24 +0000 (16:19 +0000)]
[X86][SSE] Fix PerformSExtCombine bug that accessed the wrong return value of an aggregate type.

Fix to rL237885 to ensure that it accesses the correct return value of an aggregate type.

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

9 years ago[PPC] Factor vector removal into a function and remove O(n^2) behavior.
Benjamin Kramer [Sat, 20 Jun 2015 15:59:41 +0000 (15:59 +0000)]
[PPC] Factor vector removal into a function and remove O(n^2) behavior.

No functionality change intended.

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

9 years ago[SwitchLowering] Remove quadratic vector removal.
Benjamin Kramer [Sat, 20 Jun 2015 15:59:34 +0000 (15:59 +0000)]
[SwitchLowering] Remove quadratic vector removal.

This can be triggered with giant switches. No functionality change
intended.

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

9 years ago[X86][SSE][CostModel] Added full set of sitofp/uitofp costings for SSE2/AVX/AVX2...
Simon Pilgrim [Sat, 20 Jun 2015 14:58:01 +0000 (14:58 +0000)]
[X86][SSE][CostModel] Added full set of sitofp/uitofp costings for SSE2/AVX/AVX2/AVX512F.

Merged separate (but equivalent) SSE2/AVX512F tests.

Removed codegen tests since these are already done better in test/CodeGen/X86.

The actual cost values still need to be updated to match recent codegen improvements.

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

9 years agoUpdate ELFObjectWriter::reset() following r238073.
Yaron Keren [Sat, 20 Jun 2015 11:54:32 +0000 (11:54 +0000)]
Update ELFObjectWriter::reset() following r238073.

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

9 years agoRangify for loops in Inliner::runOnSCC(), NFC.
Yaron Keren [Sat, 20 Jun 2015 07:12:33 +0000 (07:12 +0000)]
Rangify for loops in Inliner::runOnSCC(), NFC.

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

9 years agoIndVarSimplify: Avoid UB from binding a reference to a null pointer
Justin Bogner [Sat, 20 Jun 2015 06:24:05 +0000 (06:24 +0000)]
IndVarSimplify: Avoid UB from binding a reference to a null pointer

Calling operator* on a WeakVH whose Value is null hits undefined
behaviour, since we bind the value to a reference. Instead, go through
`operator Value*` so that we work with the pointer itself.

Found by ubsan.

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

9 years agoReformat.
NAKAMURA Takumi [Sat, 20 Jun 2015 06:22:04 +0000 (06:22 +0000)]
Reformat.

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

9 years agoRevert r240040, "[BranchFolding] Replace custom MachineInstr with MachineInstrExpress...
NAKAMURA Takumi [Sat, 20 Jun 2015 06:21:48 +0000 (06:21 +0000)]
Revert r240040, "[BranchFolding] Replace custom MachineInstr with MachineInstrExpressionTrait"

It caused different emission between stage2 and stage3. Investigating.

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

9 years agoTargetInstrInfo.h: Fix r240192. [-Wdocumentation]
NAKAMURA Takumi [Sat, 20 Jun 2015 03:53:18 +0000 (03:53 +0000)]
TargetInstrInfo.h: Fix r240192. [-Wdocumentation]

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

9 years agoRevert "InstrProf: When reading, copy the data instead of taking a reference. NFC"
Justin Bogner [Sat, 20 Jun 2015 01:37:56 +0000 (01:37 +0000)]
Revert "InstrProf: When reading, copy the data instead of taking a reference. NFC"

Seems like MSVC doesn't like this:

  InstrProf.h(49) : error C2614: 'llvm::InstrProfRecord' : illegal member initialization: 'Hash' is not a base or member

This reverts r240206.

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

9 years agoUse correct escaping for semicolon on Windows.
Peter Collingbourne [Sat, 20 Jun 2015 01:28:20 +0000 (01:28 +0000)]
Use correct escaping for semicolon on Windows.

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

9 years agoInstrProf: When reading, copy the data instead of taking a reference. NFC
Justin Bogner [Sat, 20 Jun 2015 01:26:04 +0000 (01:26 +0000)]
InstrProf: When reading, copy the data instead of taking a reference. NFC

This consolidates the logic to read instrprof records into the on disk
hash table's lookup trait and makes us copy the counter data instead
of taking references to it as we read. This will simplify further
changes to the format.

Patch by Betul Buyukkurt.

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

9 years agoLibDriver tests require x86 target.
Peter Collingbourne [Sat, 20 Jun 2015 01:14:37 +0000 (01:14 +0000)]
LibDriver tests require x86 target.

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

9 years agoLibDriver: implement /libpath and $LIB; ignore /ignore and /machine.
Peter Collingbourne [Sat, 20 Jun 2015 00:57:12 +0000 (00:57 +0000)]
LibDriver: implement /libpath and $LIB; ignore /ignore and /machine.

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

9 years ago[MCJIT] Add a FindGlobalVariableNamed utility
Keno Fischer [Sat, 20 Jun 2015 00:55:58 +0000 (00:55 +0000)]
[MCJIT] Add a FindGlobalVariableNamed utility

Summary: This adds FindGlobalVariableNamed to ExecutionEngine
(plus implementation in MCJIT), which is an analog of
FindFunctionNamed for GlobalVariables.

Reviewers: lhames

Reviewed By: lhames

Subscribers: llvm-commits

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

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

9 years agoLowerSwitch: Avoid some undefined behaviour
Justin Bogner [Sat, 20 Jun 2015 00:28:25 +0000 (00:28 +0000)]
LowerSwitch: Avoid some undefined behaviour

When a case of INT64_MIN was followed by a case that was greater than
zero, we were overflowing a signed integer here. Since we've sorted
the cases here anyway (and thus currentValue must be greater than
nextValue) it's simple enough to avoid this by using addition rather
than subtraction.

Found by UBSAN on existing tests.

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

9 years ago[Statepoint] Remove unnecessary argument from Statepoint::getRelocates
Sanjoy Das [Sat, 20 Jun 2015 00:01:03 +0000 (00:01 +0000)]
[Statepoint] Remove unnecessary argument from Statepoint::getRelocates

NFC.

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

9 years ago[Statepoint][NFC] Fix include guard style.
Sanjoy Das [Sat, 20 Jun 2015 00:00:58 +0000 (00:00 +0000)]
[Statepoint][NFC] Fix include guard style.

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