oota-llvm.git
10 years agoAdd a small test showing when a linkonce_odr symbol can be hidden.
Rafael Espindola [Wed, 30 Jul 2014 15:31:21 +0000 (15:31 +0000)]
Add a small test showing when a linkonce_odr symbol can be hidden.

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

10 years agoCorrect vector type definition in LangRef.
Manuel Jacob [Wed, 30 Jul 2014 12:30:06 +0000 (12:30 +0000)]
Correct vector type definition in LangRef.

According to VectorType::isValidElementType, any integer, floating point
or pointer type is a valid vector element type.

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

10 years agoAdd BookE's wrtee and wrteei instructions.
Joerg Sonnenberger [Wed, 30 Jul 2014 10:32:51 +0000 (10:32 +0000)]
Add BookE's wrtee and wrteei instructions.

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

10 years agoSPRG 0 to 3 are valid outside BookE, so move them to the normal test
Joerg Sonnenberger [Wed, 30 Jul 2014 09:24:37 +0000 (09:24 +0000)]
SPRG 0 to 3 are valid outside BookE, so move them to the normal test
file. Add support for accessing SPRG 4 to 7 on BookE.

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

10 years agoDon't manually (and forcibly) run the verifier on the entire module from
Chandler Carruth [Wed, 30 Jul 2014 05:44:04 +0000 (05:44 +0000)]
Don't manually (and forcibly) run the verifier on the entire module from
the jump instruction table pass. First, the verifier is already built
into all the tools. The test case is adapted to just run llvm-as
demonstrating that we still catch the broken module. Second, the
verifier is *extremely* slow. This was responsible for very significant
compile time regressions.

If you have deployed a Clang binary anywhere from r210280 to this
commit, you really want to re-deploy.

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

10 years ago[MCJIT] Fix the ARM BR24 relocation in RuntimeDyldMachO.
Lang Hames [Wed, 30 Jul 2014 03:35:05 +0000 (03:35 +0000)]
[MCJIT] Fix the ARM BR24 relocation in RuntimeDyldMachO.

We now (1) correctly decode the branch immediate, (2) modify the immediate to
corretly treat it as PC-rel, and (3) properly populate the stub entry.
Previously we had been doing each of these wrong.

<rdar://problem/17750739>

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

10 years ago[PowerPC] Add JMP_SLOT relocation definitions
Hal Finkel [Wed, 30 Jul 2014 03:20:45 +0000 (03:20 +0000)]
[PowerPC] Add JMP_SLOT relocation definitions

This will be required by upcoming patches for LLDB support.

Patch by Justin Hibbits!

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

10 years agoR600/SI: Remove redundant setting of bits on instructions.
Matt Arsenault [Wed, 30 Jul 2014 03:18:57 +0000 (03:18 +0000)]
R600/SI: Remove redundant setting of bits on instructions.

neverHasSideEffects is deprecated, and hasSideEffects = 0 is already
set on the base classes of the basic ALU instruction classes. The
base classes also already set mayLoad = 0 and mayStore = 0

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

10 years ago[MCJIT] Actually remap sections based llvm-rtdyld options added in r214255.
Lang Hames [Wed, 30 Jul 2014 03:12:41 +0000 (03:12 +0000)]
[MCJIT] Actually remap sections based llvm-rtdyld options added in r214255.

This line was accidentally left out of that patch.

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

10 years agoUse range loops.
Rafael Espindola [Wed, 30 Jul 2014 01:52:40 +0000 (01:52 +0000)]
Use range loops.

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

10 years agoConvert a few more function pointer calls to just "f()".
Rafael Espindola [Wed, 30 Jul 2014 01:36:32 +0000 (01:36 +0000)]
Convert a few more function pointer calls to just "f()".

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

10 years ago[AVX512] Test that _mm512_set1_* intrinsics generate broadcasts
Adam Nemet [Wed, 30 Jul 2014 01:30:51 +0000 (01:30 +0000)]
[AVX512] Test that _mm512_set1_* intrinsics generate broadcasts

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

10 years ago[AVX512] Add missing CHECK-LABEL
Adam Nemet [Wed, 30 Jul 2014 01:30:45 +0000 (01:30 +0000)]
[AVX512] Add missing CHECK-LABEL

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

10 years agoDon't duplicate the function name in a comment.
Rafael Espindola [Wed, 30 Jul 2014 01:23:45 +0000 (01:23 +0000)]
Don't duplicate the function name in a comment.

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

10 years agoReapply "UseListOrder: Order GlobalValue uses after initializers"
Duncan P. N. Exon Smith [Wed, 30 Jul 2014 01:22:16 +0000 (01:22 +0000)]
Reapply "UseListOrder: Order GlobalValue uses after initializers"

This reverts commit r214249, reapplying r214242 and r214243, now that
r214270 has fixed the UB.

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

10 years agoUseListOrder: Fix undefined behaviour
Duncan P. N. Exon Smith [Wed, 30 Jul 2014 01:20:26 +0000 (01:20 +0000)]
UseListOrder: Fix undefined behaviour

This commit fixes undefined behaviour that caused the revert in r214249.

The problem was two unsequenced operations on a `DenseMap<>`, giving
different behaviour in GCC and Clang.  This:

    DenseMap<T*, unsigned> DM;
    for (auto &X : ...)
      DM[&X] = DM.size() + 1;

should have been:

    DenseMap<T*, unsigned> DM;
    for (auto &X : ...) {
      unsigned Size = DM.size();
      DM[&X] = Size + 1;
    }

Until r214242, this difference between compilers didn't matter.  In
r214242, `OrderMap::LastGlobalValueID` was introduced and compared
against IDs, which in GCC were off-by-one my expectations.

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

10 years agoR600/SI: Consider adjacent offsets in getLdStBaseRegImmOfs
Matt Arsenault [Wed, 30 Jul 2014 01:01:10 +0000 (01:01 +0000)]
R600/SI: Consider adjacent offsets in getLdStBaseRegImmOfs

We can treat ds_read2_* as a single offset if the offsets are adjacent.

No test since emission of read2 instructions for partially
aligned loads isn't implemented yet.

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

10 years agoAdd support for scalarizing ctlz_zero_undef
Petar Jovanovic [Wed, 30 Jul 2014 00:44:03 +0000 (00:44 +0000)]
Add support for scalarizing ctlz_zero_undef

Fix the missing case in ScalarizeVectorResult() that was exposed with
libclcore.bc in Android.

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

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

10 years agoUse function pointers with just f(1,2) instead of (*f)(1,2).
Rafael Espindola [Wed, 30 Jul 2014 00:38:58 +0000 (00:38 +0000)]
Use function pointers with just f(1,2) instead of (*f)(1,2).

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

10 years agoRevert "UseListOrder: Remove move assignment"
Duncan P. N. Exon Smith [Wed, 30 Jul 2014 00:25:33 +0000 (00:25 +0000)]
Revert "UseListOrder: Remove move assignment"

This reverts commit r214260.  Turns out move assignment *is* necessary
for MSVC [1].

[1]: http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/9631

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

10 years agoHeader hygiene: remove using directive and #undef DEBUG_TYPE once we're done.
Richard Smith [Wed, 30 Jul 2014 00:25:24 +0000 (00:25 +0000)]
Header hygiene: remove using directive and #undef DEBUG_TYPE once we're done.

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

10 years agoUseListOrder: Remove move assignment
Duncan P. N. Exon Smith [Wed, 30 Jul 2014 00:05:02 +0000 (00:05 +0000)]
UseListOrder: Remove move assignment

Remove the move assignment added in r214213, since it wasn't necessary
to fix the bots (r214224 was the magic touch).

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

10 years agoAdd rfci instruction.
Joerg Sonnenberger [Tue, 29 Jul 2014 23:45:20 +0000 (23:45 +0000)]
Add rfci instruction.

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

10 years ago[MCJIT] Add options to llvm-rtdyld to describe a phony target address space for
Lang Hames [Tue, 29 Jul 2014 23:43:13 +0000 (23:43 +0000)]
[MCJIT] Add options to llvm-rtdyld to describe a phony target address space for
use in -verify mode.

This patch adds three hidden command line options to llvm-rtdyld:

 -target-addr-start <start-addr> : Specify the start of the virtual address
                                   space on the phony target.

 -target-addr-end   <end-addr>   : Specify the end of the virtual address space
                                   on the phony target.

 -target-section-sep <sep>       : Specify the separation (in bytes) between the
                                   end of one section and the start of the next.

These options automatically default to sane values for the target platform. In
particular, they allow narrow (e.g. 32-bit, 16-bit) targets to be tested from
wider (e.g. 64-bit, 32-bit) hosts without overflowing pointers.

The section separation option defaults to zero, but can be set to a large number
(e.g. 1 << 32) to force large separations between sections in order to
stress-test large-code-model code.

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

10 years agombar without argument is equivalent to mbar 0.
Joerg Sonnenberger [Tue, 29 Jul 2014 23:31:27 +0000 (23:31 +0000)]
mbar without argument is equivalent to mbar 0.

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

10 years agoRevert "UseListOrder: Order GlobalValue uses after initializers"
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 23:31:11 +0000 (23:31 +0000)]
Revert "UseListOrder: Order GlobalValue uses after initializers"

This reverts commits r214242 and r214243 while I investigate buildbot
failures [1][2][3].  I can't reproduce these failures locally, so if
anyone can see what I've done wrong, I'd appreciate a note.

[1]: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/9840
[2]: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/14981
[3]: http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/15191

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

10 years agoRecognize BookE's mbar instruction.
Joerg Sonnenberger [Tue, 29 Jul 2014 23:16:31 +0000 (23:16 +0000)]
Recognize BookE's mbar instruction.

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

10 years agoUseListOrder: Additional test coverage for r214242
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 23:15:49 +0000 (23:15 +0000)]
UseListOrder: Additional test coverage for r214242

r214242 was subtle enough it really deserves a targeted test with
comments.  This adds some global variables that trigger the relevant
code path.  Sorry this wasn't committed with the fix.

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

10 years agoUseListOrder: Order GlobalValue uses after initializers
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 23:06:14 +0000 (23:06 +0000)]
UseListOrder: Order GlobalValue uses after initializers

To avoid unnecessary forward references, the reader doesn't process
initializers of `GlobalValue`s until after the constant pool has been
processed, and then in reverse order.  Model this when predicting
use-list order.  This gets two more Bitcode tests passing with
`llvm-uselistorder`.

Part of PR5680.

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

10 years agoUseListOrder: Create a struct around OrderMap, NFC
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 23:03:40 +0000 (23:03 +0000)]
UseListOrder: Create a struct around OrderMap, NFC

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

10 years agoFeedback on r214189, no functionality change.
Manman Ren [Tue, 29 Jul 2014 22:58:13 +0000 (22:58 +0000)]
Feedback on r214189, no functionality change.

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

10 years agoAdd missing test for r214210.
Eli Bendersky [Tue, 29 Jul 2014 22:57:59 +0000 (22:57 +0000)]
Add missing test for r214210.

Thanks dblaikie for reminding me.

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

10 years agoFix typo in alias: DSIR -> DSISR
Joerg Sonnenberger [Tue, 29 Jul 2014 22:42:44 +0000 (22:42 +0000)]
Fix typo in alias: DSIR -> DSISR

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

10 years agollvm-profdata: Clean up and reorganize some tests
Justin Bogner [Tue, 29 Jul 2014 22:29:23 +0000 (22:29 +0000)]
llvm-profdata: Clean up and reorganize some tests

This moves some tests around to make it clearer what's being tested,
and adds very rudimentary comment syntax to the text input format to
make specifying this kind of test a little bit simpler.

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

10 years agoSupport move to/from segment register.
Joerg Sonnenberger [Tue, 29 Jul 2014 22:21:57 +0000 (22:21 +0000)]
Support move to/from segment register.

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

10 years ago[MCJIT] XFAIL some RuntimeDyld tests on MIPS - RuntimeDyldChecker isn't properly
Lang Hames [Tue, 29 Jul 2014 21:48:22 +0000 (21:48 +0000)]
[MCJIT] XFAIL some RuntimeDyld tests on MIPS - RuntimeDyldChecker isn't properly
endian-aware yet, and this is causing failures when cross-linking on MIPS.

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

10 years agoUse nullptr instead of NULL.
Rafael Espindola [Tue, 29 Jul 2014 21:46:05 +0000 (21:46 +0000)]
Use nullptr instead of NULL.

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

10 years agoCoverage: improve efficiency of the counter propagation to the expansion regions.
Alex Lorenz [Tue, 29 Jul 2014 21:42:24 +0000 (21:42 +0000)]
Coverage: improve efficiency of the counter propagation to the expansion regions.

This patch reduces the complexity of the two inner loops in order to speed up
the loading of coverage data for very large functions.

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

10 years ago[MCJIT] Make sure we print the full 64-bit result of exprs in RuntimeDyldChecker.
Lang Hames [Tue, 29 Jul 2014 21:38:20 +0000 (21:38 +0000)]
[MCJIT] Make sure we print the full 64-bit result of exprs in RuntimeDyldChecker.

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

10 years agoRemove unused includes.
Rafael Espindola [Tue, 29 Jul 2014 21:38:05 +0000 (21:38 +0000)]
Remove unused includes.

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

10 years agoR600/SI: Implement getLdStBaseRegImmOfs
Matt Arsenault [Tue, 29 Jul 2014 21:34:55 +0000 (21:34 +0000)]
R600/SI: Implement getLdStBaseRegImmOfs

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

10 years agoUseListOrder: Try to resolve buildbot failure
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 21:30:21 +0000 (21:30 +0000)]
UseListOrder: Try to resolve buildbot failure

MSVC [1] thinks `UseListShuffleVector` needs a copy constructor, but I
don't.  Let's see if being explicit about `UseListOrder` is convincing.

[1]: http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/11664/steps/build_Lld/logs/stdio

Here's the failure:

C:/lld-x86_64_win7/lld-x86_64-win7/llvm.src/include\llvm/IR/UseListOrder.h(92): error C2248: 'llvm::UseListShuffleVector::operator =' : cannot access private member declared in class 'llvm::UseListShuffleVector' (C:\lld-x86_64_win7\lld-x86_64-win7\llvm.src\lib\Bitcode\Writer\ValueEnumerator.cpp) [C:\lld-x86_64_win7\lld-x86_64-win7\llvm.obj\lib\Bitcode\Writer\LLVMBitWriter.vcxproj]
          C:/lld-x86_64_win7/lld-x86_64-win7/llvm.src/include\llvm/IR/UseListOrder.h(56) : see declaration of 'llvm::UseListShuffleVector::operator ='
          C:/lld-x86_64_win7/lld-x86_64-win7/llvm.src/include\llvm/IR/UseListOrder.h(32) : see declaration of 'llvm::UseListShuffleVector'
          This diagnostic occurred in the compiler generated function 'llvm::UseListOrder &llvm::UseListOrder::operator =(const llvm::UseListOrder &)'

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

10 years agoDelete dead code.
Rafael Espindola [Tue, 29 Jul 2014 21:09:43 +0000 (21:09 +0000)]
Delete dead code.

The gold plugin doesn't call lseek or read directly any more.

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

10 years agoHave a single enum for "not a bitcode" error.
Rafael Espindola [Tue, 29 Jul 2014 21:01:24 +0000 (21:01 +0000)]
Have a single enum for "not a bitcode" error.

This is more convenient for callers. No functionality change, this will
be used in a next patch to the gold plugin.

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

10 years agoR600/SI: Enable named operand table for DS instructions
Matt Arsenault [Tue, 29 Jul 2014 21:00:56 +0000 (21:00 +0000)]
R600/SI: Enable named operand table for DS instructions

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

10 years agoRemove line with no effect
Matt Arsenault [Tue, 29 Jul 2014 21:00:53 +0000 (21:00 +0000)]
Remove line with no effect

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

10 years agogold plugin: Fix handling of corrupted bitcode files.
Rafael Espindola [Tue, 29 Jul 2014 20:46:19 +0000 (20:46 +0000)]
gold plugin: Fix handling of corrupted bitcode files.

We should still claim them and tell gold about the error.

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

10 years agoUseListShuffleVector: Remove copy constructor
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 20:45:52 +0000 (20:45 +0000)]
UseListShuffleVector: Remove copy constructor

Remove the copy constructor added in r214178 to appease MSVC17 since it
shouldn't be called at all.  My guess is that explicitly deleting it
will make the compiler happy.  To round out the operations I've also
deleted copy assignment and added move assignment.  Otherwise no
functionality change.

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

10 years agoUseListShuffleVector: Code reorganization, NFC
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 20:45:49 +0000 (20:45 +0000)]
UseListShuffleVector: Code reorganization, NFC

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

10 years ago[MCJIT] Make the RuntimeDyldChecker stub_addr builtin use file names rather than
Lang Hames [Tue, 29 Jul 2014 20:40:37 +0000 (20:40 +0000)]
[MCJIT] Make the RuntimeDyldChecker stub_addr builtin use file names rather than
full paths for its first argument.

This allows us to remove the annoying sed lines in the test cases, and write
direct references to file names in stub_addr calls (rather than <filename>
placeholders).

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

10 years agoFix FileCheck crash when empty prefix is passed.
Eli Bendersky [Tue, 29 Jul 2014 20:30:53 +0000 (20:30 +0000)]
Fix FileCheck crash when empty prefix is passed.

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

10 years agoMove the bitcode error enum to the include directory.
Rafael Espindola [Tue, 29 Jul 2014 20:22:46 +0000 (20:22 +0000)]
Move the bitcode error enum to the include directory.

This will let users in other libraries know which error occurred. In particular,
it will be possible to check if the parsing failed or if the file is not
bitcode.

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

10 years agoCoverage: fix the missing output stream in recursive call to CoverageMappingContext...
Alex Lorenz [Tue, 29 Jul 2014 19:58:16 +0000 (19:58 +0000)]
Coverage: fix the missing output stream in recursive call to CoverageMappingContext::dump

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

10 years ago[RuntimeDyld][AArch64] Make encode/decodeAddend also work on big-endian hosts.
Juergen Ributzka [Tue, 29 Jul 2014 19:57:15 +0000 (19:57 +0000)]
[RuntimeDyld][AArch64] Make encode/decodeAddend also work on big-endian hosts.

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

10 years ago[RuntimeDyld][AArch64] Make encode/decodeAddend more typesafe by using the relocation...
Juergen Ributzka [Tue, 29 Jul 2014 19:57:11 +0000 (19:57 +0000)]
[RuntimeDyld][AArch64] Make encode/decodeAddend more typesafe by using the relocation enum type. NFCI.

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

10 years agoSmall gold plugin simplifications.
Rafael Espindola [Tue, 29 Jul 2014 19:17:44 +0000 (19:17 +0000)]
Small gold plugin simplifications.

* Use a range loop.
* Store the extra options as "const char *".

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

10 years agoAdd a number of aliases for SPR access.
Joerg Sonnenberger [Tue, 29 Jul 2014 18:55:43 +0000 (18:55 +0000)]
Add a number of aliases for SPR access.

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

10 years agoR600/SI: Add isMUBUF / isMTBUF
Matt Arsenault [Tue, 29 Jul 2014 18:51:56 +0000 (18:51 +0000)]
R600/SI: Add isMUBUF / isMTBUF

Also add missing comments about how the flags work.

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

10 years agoR600/SI: Set bits on SMRD instructions
Matt Arsenault [Tue, 29 Jul 2014 18:51:54 +0000 (18:51 +0000)]
R600/SI: Set bits on SMRD instructions

Set mayStore = 0 and enable named operand table.

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

10 years agoInstall the `obj2yaml` and `yaml2obj` utilities together with other LLVM tools.
Simon Atanasyan [Tue, 29 Jul 2014 18:28:16 +0000 (18:28 +0000)]
Install the `obj2yaml` and `yaml2obj` utilities together with other LLVM tools.

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

10 years ago[Debug Info] remove DITrivialType and use null to represent unspecified param.
Manman Ren [Tue, 29 Jul 2014 18:20:39 +0000 (18:20 +0000)]
[Debug Info] remove DITrivialType and use null to represent unspecified param.

Per feedback on r214111, we are going to use null to represent unspecified
parameter. If the type array is {null}, it means a function that returns void;
If the type array is {null, null}, it means a variadic function that returns
void. In summary if we have more than one element in the type array and the last
element is null, it is a variadic function.

rdar://17628609

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

10 years agollvm-uselistorder: Fix header comments from r214144
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 17:44:26 +0000 (17:44 +0000)]
llvm-uselistorder: Fix header comments from r214144

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

10 years agoAdd a test for the mtriple plugin option.
Rafael Espindola [Tue, 29 Jul 2014 17:27:07 +0000 (17:27 +0000)]
Add a test for the mtriple plugin option.

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

10 years agoIR: Create the use-list order shuffle vector in-place
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 16:58:18 +0000 (16:58 +0000)]
IR: Create the use-list order shuffle vector in-place

Per David Blaikie's review of r214135, this is a more natural way to
initialize.

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

10 years agoProfileData: Don't redundantly default initialize a member
Justin Bogner [Tue, 29 Jul 2014 15:56:06 +0000 (15:56 +0000)]
ProfileData: Don't redundantly default initialize a member

We're default constructing RecordIterator anyway, so it needn't appear
in the mem-initializer-list.

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

10 years agoAdd rfi instruction. Based on feedback by Ulrich Weigand.
Joerg Sonnenberger [Tue, 29 Jul 2014 15:49:09 +0000 (15:49 +0000)]
Add rfi instruction. Based on feedback by Ulrich Weigand.

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

10 years ago[mips] Don't use odd-numbered single precision registers for fastcc calling
Sasa Stankovic [Tue, 29 Jul 2014 14:39:24 +0000 (14:39 +0000)]
[mips] Don't use odd-numbered single precision registers for fastcc calling
convention if -mno-odd-spreg is used.

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

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

10 years ago[PowerPC] Fix ppc64-elf-abi.ll test case on Darwin
Ulrich Weigand [Tue, 29 Jul 2014 12:48:14 +0000 (12:48 +0000)]
[PowerPC] Fix ppc64-elf-abi.ll test case on Darwin

Use full -mtriple instead of just -march to ensure Linux ABI
(ELFv1 or ELFv2) is selected.

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

10 years agoUseListShuffleVector: Add a copy constructor to appease msc17.
NAKAMURA Takumi [Tue, 29 Jul 2014 12:20:50 +0000 (12:20 +0000)]
UseListShuffleVector: Add a copy constructor to appease msc17.

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

10 years agoCodeGenPrep: fall back to MVT::Other if instruction's type isn't an EVT.
Tim Northover [Tue, 29 Jul 2014 10:20:22 +0000 (10:20 +0000)]
CodeGenPrep: fall back to MVT::Other if instruction's type isn't an EVT.

The test being performed is just an approximation anyway, so it really
shouldn't crash when things don't go entirely as expected.

Should fix PR20474.

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

10 years agoARM: add __aeabi_d2h for truncation on AEABI systems
Tim Northover [Tue, 29 Jul 2014 09:56:45 +0000 (09:56 +0000)]
ARM: add __aeabi_d2h for truncation on AEABI systems

ARM does actually define the name for this conversion, so we should use it on
"-eabi" platforms.

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

10 years agoARM: fix @llvm.convert.from.fp16 on softfloat targets.
Tim Northover [Tue, 29 Jul 2014 09:56:38 +0000 (09:56 +0000)]
ARM: fix @llvm.convert.from.fp16 on softfloat targets.

We need to make sure we use the softened version of all appropriate operands in
the libcall, or things go horribly wrong. This may entail actually executing a
1-stage softening.

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

10 years agoUseListShuffleVector::~UseListShuffleVector(): Fix inappropriate delete. It should...
NAKAMURA Takumi [Tue, 29 Jul 2014 09:54:35 +0000 (09:54 +0000)]
UseListShuffleVector::~UseListShuffleVector(): Fix inappropriate delete. It should be delete[].

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

10 years ago[autoconf] Fixup s/3.5/3.6/. Clang's ident was 3.5.0svn in autoconf build.
NAKAMURA Takumi [Tue, 29 Jul 2014 08:35:03 +0000 (08:35 +0000)]
[autoconf] Fixup s/3.5/3.6/. Clang's ident was 3.5.0svn in autoconf build.

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

10 years agoImplement AArch64 TTI interface isAsCheapAsAMove.
Jiangning Liu [Tue, 29 Jul 2014 02:09:26 +0000 (02:09 +0000)]
Implement AArch64 TTI interface isAsCheapAsAMove.

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

10 years agoAdd TargetInstrInfo interface isAsCheapAsAMove.
Jiangning Liu [Tue, 29 Jul 2014 01:55:19 +0000 (01:55 +0000)]
Add TargetInstrInfo interface isAsCheapAsAMove.

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

10 years agoBitcode: Correctly compare a Use against itself
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 01:13:56 +0000 (01:13 +0000)]
Bitcode: Correctly compare a Use against itself

Fix the sort of expected order in the reader to correctly return `false`
when comparing a `Use` against itself.

This was caught by test/Bitcode/binaryIntInstructions.3.2.ll, so I'm
adding a `RUN` line using `llvm-uselistorder` for every test in
`test/Bitcode` that passes.

A few tests still fail, so I'll investigate those next.

This is part of PR5680.

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

10 years agoFix line-endings, NFC
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 01:10:57 +0000 (01:10 +0000)]
Fix line-endings, NFC

A follow-up commit is adding a RUN line to each of these tests, so fix
the line endings first.  This is a whitespace-only change.

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

10 years agoIR: Augment debug statements for use-list order
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 01:09:46 +0000 (01:09 +0000)]
IR: Augment debug statements for use-list order

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

10 years agoDelete dead code.
Rafael Espindola [Tue, 29 Jul 2014 00:38:55 +0000 (00:38 +0000)]
Delete dead code.

It was added 12 years ago, but never used (and in the case of sort, never
implemented).

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

10 years agoFix typos / grammar.
Matt Arsenault [Tue, 29 Jul 2014 00:02:40 +0000 (00:02 +0000)]
Fix typos / grammar.

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

10 years agoFix header including itself
Matt Arsenault [Tue, 29 Jul 2014 00:02:37 +0000 (00:02 +0000)]
Fix header including itself

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

10 years agollvm-uselistorder: Add -num-shuffles option
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 23:25:21 +0000 (23:25 +0000)]
llvm-uselistorder: Add -num-shuffles option

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

10 years agoTweak llvm-nm’s -undefined-only (aka -u) printing for Mach-O files
Kevin Enderby [Mon, 28 Jul 2014 23:17:38 +0000 (23:17 +0000)]
Tweak llvm-nm’s -undefined-only (aka -u) printing for Mach-O files
to just print the symbol name.  So it matches darwin’s nm(1) -u option.

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

10 years agoClean up testing cases.
Manman Ren [Mon, 28 Jul 2014 23:16:05 +0000 (23:16 +0000)]
Clean up testing cases.

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

10 years ago[Debug Info] unique MDNodes in the enum types of each compile unit.
Manman Ren [Mon, 28 Jul 2014 23:04:20 +0000 (23:04 +0000)]
[Debug Info] unique MDNodes in the enum types of each compile unit.

The enum types array by design contains pointers to MDNodes rather than DIRefs.
Unique them when handling the enum types in DwarfDebug.

rdar://17628609

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

10 years agoRemove extra ; in testing case.
Manman Ren [Mon, 28 Jul 2014 22:46:46 +0000 (22:46 +0000)]
Remove extra ; in testing case.

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

10 years agoIR: Optimize size of use-list order shuffle vectors
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 22:41:50 +0000 (22:41 +0000)]
IR: Optimize size of use-list order shuffle vectors

Since we're storing lots of these, save two-pointers per vector with a
custom type rather than using the relatively heavy `SmallVector`.

Part of PR5680.

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

10 years ago[Debug Info] add DISubroutineType and its creation takes DITypeArray.
Manman Ren [Mon, 28 Jul 2014 22:24:06 +0000 (22:24 +0000)]
[Debug Info] add DISubroutineType and its creation takes DITypeArray.

DITypeArray is an array of DITypeRef, at its creation, we will create
DITypeRef (i.e use the identifier if the type node has an identifier).

This is the last patch to unique the type array of a subroutine type.

rdar://17628609

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

10 years agoUpdate LLVM version: 3.5 => 3.6
Hans Wennborg [Mon, 28 Jul 2014 22:10:52 +0000 (22:10 +0000)]
Update LLVM version: 3.5 => 3.6

We branched 3.5, it's now time to work on 3.6.

This is Sylvestre's patch from [1] plus regenerated configure
file by me, and minus the release notes reset, which Sean
pointed out [2] should happen later.

 1. http://reviews.llvm.org/D4660
 2. http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140721/111137.html

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

10 years agoRegenerate autoconf, previous updates to the configury haven't
Eric Christopher [Mon, 28 Jul 2014 22:00:44 +0000 (22:00 +0000)]
Regenerate autoconf, previous updates to the configury haven't
been updating configure.

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

10 years agollvm-uselistorder: Get it building in configure+make after r214125
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:47:40 +0000 (21:47 +0000)]
llvm-uselistorder: Get it building in configure+make after r214125

Somehow this wasn't being built before (only noticed now since the test
was XFAILed).

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

10 years agoBitcode: Serialize (and recover) use-list order
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:19:41 +0000 (21:19 +0000)]
Bitcode: Serialize (and recover) use-list order

Predict and serialize use-list order in bitcode.  This makes the option
`-preserve-bc-use-list-order` work *most* of the time, but this is still
experimental.

  - Builds a full value-table up front in the writer, sets up a list of
    use-list orders to write out, and discards the table.  This is a
    simpler first step than determining the order from the various
    overlapping IDs of values on-the-fly.

  - The shuffles stored in the use-list order list have an unnecessarily
    large memory footprint.

  - `blockaddress` expressions cause functions to be materialized
    out-of-order.  For now I've ignored this problem, so use-list orders
    will be wrong for constants used by functions that have block
    addresses taken.  There are a couple of ways to fix this, but I
    don't have a concrete plan yet.

  - When materializing functions lazily, the use-lists for constants
    will not be correct.  This use case is out of scope: what should the
    use-list order be, if it's incomplete?

This is part of PR5680.

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

10 years agollvm-uselistorder: Add -save-temps option
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:12:19 +0000 (21:12 +0000)]
llvm-uselistorder: Add -save-temps option

This is part of PR5680.

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

10 years agollvm-uselistorder: Check the correct flag for assembly
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:12:17 +0000 (21:12 +0000)]
llvm-uselistorder: Check the correct flag for assembly

This is part of PR5680.

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

10 years agoIR: Expose Module::rbegin() and rend()
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:09:32 +0000 (21:09 +0000)]
IR: Expose Module::rbegin() and rend()

A follow-up commit for PR5680 needs to visit functions in reverse order.
Expose iterators to allow that.

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

10 years ago[MCJIT] Remove extraneous parentheses in test case.
Lang Hames [Mon, 28 Jul 2014 21:00:48 +0000 (21:00 +0000)]
[MCJIT] Remove extraneous parentheses in test case.

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

10 years agoTest the linker plugin handling of llvm.used.
Rafael Espindola [Mon, 28 Jul 2014 20:42:29 +0000 (20:42 +0000)]
Test the linker plugin handling of llvm.used.

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

10 years ago[Debug Info] add a template class DITypedArray.
Manman Ren [Mon, 28 Jul 2014 19:33:20 +0000 (19:33 +0000)]
[Debug Info] add a template class DITypedArray.

Typedef DIArray to DITypedArray<DIDescriptor>. Also typedef DITypeArray as
DITypedArray<DITypeRef>.

This is the third of a series of patches to handle type uniqueing of the
type array for a subroutine type.

This commit should have no functionality change.

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

10 years ago[Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.
Manman Ren [Mon, 28 Jul 2014 19:14:13 +0000 (19:14 +0000)]
[Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.

This is the second of a series of patches to handle type uniqueing of the
type array for a subroutine type.

For vector and array types, getElements returns the array of subranges, so it
is a better name than getTypeArray. Even for class, struct and enum types,
getElements returns the members, which can be subprograms.

setArrays can set up to two arrays, the second is the templates.

This commit should have no functionality change.

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