1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

106085 Commits

Author SHA1 Message Date
Alex Lorenz
7adaa39434 docs: update the command guide documentation for llvm-profdata.
Differential Revision: http://reviews.llvm.org/D4726

llvm-svn: 214331
2014-07-30 20:30:11 +00:00
Louis Gerbarg
005b59a008 Fix test case introduced in r214322
This patch adds an explicit triple to the test case introduced by r214322. This
should fix build failueres that are occuring on bots that are cross building.

llvm-svn: 214330
2014-07-30 20:26:09 +00:00
Hans Wennborg
bc85414806 LangRef: add a note about the mangling-suppressing \01 prefix
Someone asked about this on IRC the other day, and I couldn't
find the magic prefix documented anywhere.

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

llvm-svn: 214329
2014-07-30 20:02:08 +00:00
Rafael Espindola
f375e42f72 Refactor duplicated code.
llvm-svn: 214328
2014-07-30 19:42:16 +00:00
Aaron Ballman
0373fb9233 Fixing a few -Woverloaded-virtual warnings by exposing the hidden virtual function as well. No functional changes intended.
llvm-svn: 214325
2014-07-30 19:23:59 +00:00
Louis Gerbarg
909cb65fe7 Retain alignment requirements for load->selects modified by DAGCombine
DAGCombine may choose to rewrite graphs where two loads feed a select into
graphs where a select of two addresses feed a load. While it sanity checks the
loads to make sure they are broadly equivalent it currently just uses the
alignment restriction of the left node. In cases where the right node has
stronger alignment requiresment this may lead to bad codegen, such as generating
an aligned load where an unaligned load is required. This patch makes the
combine generate a load with an alignment that is the same as whichever is more
restrictive of the two alignments.

Tests included.

rdar://17762530

llvm-svn: 214322
2014-07-30 18:24:41 +00:00
Duncan P. N. Exon Smith
789d5bf211 UseListOrder: Visit global values
When predicting use-list order, we visit functions in reverse order
followed by `GlobalValue`s and write out use-lists at the first
opportunity.  In the reader, this will translate to *after* the last use
has been added.

For this to work, we actually need to descend into `GlobalValue`s.
Added a targeted test in `use-list-order.ll` and `RUN` lines to the
newly passing tests in `test/Bitcode`.

There are two remaining failures in `test/Bitcode`:

  - blockaddress.ll: I haven't thought through how to model the way
    block addresses change the order of use-lists (or how to work around
    it).

  - metadata-2.ll: There's an old-style `@llvm.used` global array here
    that I suspect the .ll parser isn't upgrading properly.  When it
    round-trips through bitcode, the .bc reader *does* upgrade it, so
    the extra variable (`i8* null`) has an extra use, and the shuffle
    vector doesn't match.

    I think the fix is to upgrade old-style global arrays (or reject
    them?) in the .ll parser.

This is part of PR5680.

llvm-svn: 214321
2014-07-30 17:51:09 +00:00
Duncan P. N. Exon Smith
26315bc9ac Fix line endings before adding RUN lines, NFC
llvm-svn: 214320
2014-07-30 17:49:00 +00:00
Duncan P. N. Exon Smith
4af7ebf31b Rename llvm-uselistorder => verify-uselistorder
llvm-svn: 214318
2014-07-30 17:11:27 +00:00
Duncan P. N. Exon Smith
b6bcf3312a llvm-uselistorder: Improve the tool description
llvm-svn: 214317
2014-07-30 16:59:19 +00:00
Duncan P. N. Exon Smith
a5a28761a7 llvm-uselistorder: Fix memory leak from r214125
Turns out `parseBitcodeFile()` does *not* take ownership of the buffer.
This was already clear in the header docs, but I obviously didn't read
them (having noticed that it gets stored in a `unique_ptr<>`).

llvm-svn: 214313
2014-07-30 16:50:22 +00:00
Rafael Espindola
efac481bb2 Add the missing hasLinkOnceODRLinkage predicate.
llvm-svn: 214312
2014-07-30 15:57:51 +00:00
Rafael Espindola
baab42a761 Add a small test showing when a linkonce_odr symbol can be hidden.
llvm-svn: 214311
2014-07-30 15:31:21 +00:00
Manuel Jacob
e21aa5698e Correct vector type definition in LangRef.
According to VectorType::isValidElementType, any integer, floating point
or pointer type is a valid vector element type.

llvm-svn: 214302
2014-07-30 12:30:06 +00:00
Joerg Sonnenberger
270c5a66fb Add BookE's wrtee and wrteei instructions.
llvm-svn: 214297
2014-07-30 10:32:51 +00:00
Joerg Sonnenberger
577206124d 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.

llvm-svn: 214295
2014-07-30 09:24:37 +00:00
Chandler Carruth
c9d7906c01 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.

llvm-svn: 214287
2014-07-30 05:44:04 +00:00
Lang Hames
926cf02e43 [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>

llvm-svn: 214285
2014-07-30 03:35:05 +00:00
Hal Finkel
b7aa9aa0dd [PowerPC] Add JMP_SLOT relocation definitions
This will be required by upcoming patches for LLDB support.

Patch by Justin Hibbits!

llvm-svn: 214284
2014-07-30 03:20:45 +00:00
Matt Arsenault
a82949eb53 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

llvm-svn: 214283
2014-07-30 03:18:57 +00:00
Lang Hames
e0efab6e8e [MCJIT] Actually remap sections based llvm-rtdyld options added in r214255.
This line was accidentally left out of that patch.

llvm-svn: 214282
2014-07-30 03:12:41 +00:00
Rafael Espindola
d95a431fd9 Use range loops.
llvm-svn: 214280
2014-07-30 01:52:40 +00:00
Rafael Espindola
9f7e19243c Convert a few more function pointer calls to just "f()".
llvm-svn: 214276
2014-07-30 01:36:32 +00:00
Adam Nemet
53ebec6583 [AVX512] Test that _mm512_set1_* intrinsics generate broadcasts
llvm-svn: 214275
2014-07-30 01:30:51 +00:00
Adam Nemet
29f192c73f [AVX512] Add missing CHECK-LABEL
llvm-svn: 214273
2014-07-30 01:30:45 +00:00
Rafael Espindola
d5c0acb861 Don't duplicate the function name in a comment.
llvm-svn: 214272
2014-07-30 01:23:45 +00:00
Duncan P. N. Exon Smith
1d7b0f97dd Reapply "UseListOrder: Order GlobalValue uses after initializers"
This reverts commit r214249, reapplying r214242 and r214243, now that
r214270 has fixed the UB.

llvm-svn: 214271
2014-07-30 01:22:16 +00:00
Duncan P. N. Exon Smith
5d1b1e64b5 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.

llvm-svn: 214270
2014-07-30 01:20:26 +00:00
Matt Arsenault
d8f2b465a3 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.

llvm-svn: 214269
2014-07-30 01:01:10 +00:00
Petar Jovanovic
0f2b26de4c 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

llvm-svn: 214266
2014-07-30 00:44:03 +00:00
Rafael Espindola
aa8e1b8d73 Use function pointers with just f(1,2) instead of (*f)(1,2).
llvm-svn: 214265
2014-07-30 00:38:58 +00:00
Duncan P. N. Exon Smith
5ed3df063e 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

llvm-svn: 214264
2014-07-30 00:25:33 +00:00
Richard Smith
6c8f410a31 Header hygiene: remove using directive and #undef DEBUG_TYPE once we're done.
llvm-svn: 214263
2014-07-30 00:25:24 +00:00
Duncan P. N. Exon Smith
474bbf4c5a 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).

llvm-svn: 214260
2014-07-30 00:05:02 +00:00
Joerg Sonnenberger
db7b2c7644 Add rfci instruction.
llvm-svn: 214256
2014-07-29 23:45:20 +00:00
Lang Hames
b1e74ae824 [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.

llvm-svn: 214255
2014-07-29 23:43:13 +00:00
Joerg Sonnenberger
abd973f309 mbar without argument is equivalent to mbar 0.
llvm-svn: 214250
2014-07-29 23:31:27 +00:00
Duncan P. N. Exon Smith
cc8a88fa18 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

llvm-svn: 214249
2014-07-29 23:31:11 +00:00
Joerg Sonnenberger
afb8bfcb47 Recognize BookE's mbar instruction.
llvm-svn: 214244
2014-07-29 23:16:31 +00:00
Duncan P. N. Exon Smith
1460a11fa9 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.

llvm-svn: 214243
2014-07-29 23:15:49 +00:00
Duncan P. N. Exon Smith
cdab8367f8 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.

llvm-svn: 214242
2014-07-29 23:06:14 +00:00
Duncan P. N. Exon Smith
589a519a8a UseListOrder: Create a struct around OrderMap, NFC
llvm-svn: 214241
2014-07-29 23:03:40 +00:00
Manman Ren
d130fd7e21 Feedback on r214189, no functionality change.
llvm-svn: 214240
2014-07-29 22:58:13 +00:00
Eli Bendersky
02bdcf05e0 Add missing test for r214210.
Thanks dblaikie for reminding me.

llvm-svn: 214239
2014-07-29 22:57:59 +00:00
Joerg Sonnenberger
5dd0828a9c Fix typo in alias: DSIR -> DSISR
llvm-svn: 214238
2014-07-29 22:42:44 +00:00
Justin Bogner
6ed5e5948b 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.

llvm-svn: 214235
2014-07-29 22:29:23 +00:00
Joerg Sonnenberger
d52d4c80b5 Support move to/from segment register.
llvm-svn: 214234
2014-07-29 22:21:57 +00:00
Lang Hames
c8d9cf454f [MCJIT] XFAIL some RuntimeDyld tests on MIPS - RuntimeDyldChecker isn't properly
endian-aware yet, and this is causing failures when cross-linking on MIPS.

llvm-svn: 214231
2014-07-29 21:48:22 +00:00
Rafael Espindola
52959c50e9 Use nullptr instead of NULL.
llvm-svn: 214229
2014-07-29 21:46:05 +00:00
Alex Lorenz
9503511918 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.

llvm-svn: 214228
2014-07-29 21:42:24 +00:00