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

91600 Commits

Author SHA1 Message Date
Rafael Espindola
c3bc22082f Collect the Addend for external relocs.
This fixes 2013-04-04-RelocAddend.ll. We don't have a testcase for non external
relocs with an Addend. I will try to write one.

llvm-svn: 180767
2013-04-30 01:29:57 +00:00
Vincent Lejeune
8054d1e2f8 R600: Always use texture cache for compute shaders
This will improve the performance of memory reads.

llvm-svn: 180762
2013-04-30 00:14:44 +00:00
Vincent Lejeune
29f24e0ce8 R600: use native for alu
llvm-svn: 180761
2013-04-30 00:14:38 +00:00
Vincent Lejeune
c6ba980992 R600: Packetize instructions
llvm-svn: 180760
2013-04-30 00:14:27 +00:00
Vincent Lejeune
176c8200bc R600: Rework Scheduling to handle difference between VLIW4 and VLIW5 chips
llvm-svn: 180759
2013-04-30 00:14:17 +00:00
Vincent Lejeune
7878fed9de R600: Add a Bank Swizzle operand
llvm-svn: 180758
2013-04-30 00:14:08 +00:00
Vincent Lejeune
b2f40c2a8c R600: Take inner dependency into tex/vtx clauses
llvm-svn: 180757
2013-04-30 00:14:00 +00:00
Vincent Lejeune
4d300cefe8 R600: Turn TEX/VTX into native instructions
llvm-svn: 180756
2013-04-30 00:13:53 +00:00
Vincent Lejeune
e641cd06c9 R600: Add FetchInst bit to instruction defs to denote vertex/tex instructions
v2[Vincent Lejeune]: Split FetchInst into usesTextureCache/usesVertexCache

llvm-svn: 180755
2013-04-30 00:13:39 +00:00
Michael Liao
3db1a24464 Rewrite test in FileCheck instead of grep in X86 codegen
llvm-svn: 180754
2013-04-30 00:13:38 +00:00
Vincent Lejeune
1b276d48e1 R600: Add some new processor variants
llvm-svn: 180753
2013-04-30 00:13:27 +00:00
Vincent Lejeune
fabf120f32 R600: Clean up instruction class definitions
llvm-svn: 180752
2013-04-30 00:13:20 +00:00
Vincent Lejeune
f8d86cf88b R600: config section now reports use of killgt
llvm-svn: 180751
2013-04-30 00:13:13 +00:00
Bill Wendling
4bc92c258f Revert the command line option patch. However, keep the part that makes this pass on Windows. I.e., we don't emit the target dependent attributes in a comment before the function.
llvm-svn: 180750
2013-04-29 23:48:06 +00:00
Manman Ren
180923f053 TBAA: remove !tbaa from testing cases if not used.
This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.

llvm-svn: 180745
2013-04-29 22:58:55 +00:00
Bill Wendling
e24a89874b Duplicate a testcase.
llvm-svn: 180744
2013-04-29 22:42:47 +00:00
Manman Ren
13b2364d24 TBAA: remove !tbaa from testing cases if not used.
This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.

llvm-svn: 180743
2013-04-29 22:42:01 +00:00
Michael Liao
4e03c7690d Rewrite some tests with FileCHeck in X86 codegen
- Revise previous patches of the same purpose by fixing
  *) grep <PA> | not grep <PB> semantically is not the same as
     CHECK: <PA>{{^<PB>.*$}} as the former will check all occurrences of <PA>
     while the later only check the first match. As the result, CHECK needs
     putting in all place where <PA> occurs.
  *) grep <PA> | count <N> needs a final CHECK-NOT of the same pattern.
     (As 'CHECK-<N>' is proposed for discussion, converting 'grep | count <N>'
      where N > 1 is postponed.)

llvm-svn: 180742
2013-04-29 22:41:29 +00:00
Adrian Prantl
d599fd59f3 Improve documentation.
llvm-svn: 180738
2013-04-29 22:25:52 +00:00
Bill Wendling
7a4381d8d9 Emit the TLS initialization function pointers into the correct section.
The `llvm.tls_init_funcs' (created by the front-end) holds pointers to the TLS
initialization functions. These need to be placed into the correct section so
that they are run before `main()'.

<rdar://problem/13733006>

llvm-svn: 180737
2013-04-29 22:25:40 +00:00
Rafael Espindola
d175d83203 Add getSymbolAlignment to the ObjectFile interface.
For regular object files this is only meaningful for common symbols. An object
file format with direct support for atoms should be able to provide alignment
information for all symbols.

This replaces getCommonSymbolAlignment and fixes
test-common-symbols-alignment.ll on darwin. This also includes a fix to
MachOObjectFile::getSymbolFlags. It was marking undefined symbols as common
(already tested by existing mcjit tests now that it is used).

llvm-svn: 180736
2013-04-29 22:24:22 +00:00
Tom Stellard
33e7a52e1c R600: Use correct CF_END instruction on Northern Island GPUs
llvm-svn: 180735
2013-04-29 22:23:58 +00:00
Tom Stellard
a22d2b47f3 R600: Fix encoding of CF_END_{EG, R600} instructions
The EOP bit was not being encoded.

llvm-svn: 180734
2013-04-29 22:23:54 +00:00
Rafael Espindola
7d9df9376a Rationalize what is public in RuntimeDyldMachO and RuntimeDyldELF.
The implemented RuntimeDyldImpl interface is public. Everything else is private.
Since these classes are not inherited from (yet), there is no need to have
protected members.

llvm-svn: 180733
2013-04-29 22:06:33 +00:00
Arnold Schwaighofer
d0c38e0586 SimplifyCFG: If convert single conditional stores
This resurrects r179957, but adds code that makes sure we don't touch
atomic/volatile stores:

This transformation will transform a conditional store with a preceeding
uncondtional store to the same location:

 a[i] =
 may-alias with a[i] load
 if (cond)
   a[i] = Y

into an unconditional store.

 a[i] = X
 may-alias with a[i] load
 tmp = cond ? Y : X;
 a[i] = tmp

We assume that on average the cost of a mispredicted branch is going to be
higher than the cost of a second store to the same location, and that the
secondary benefits of creating a bigger basic block for other optimizations to
work on outway the potential case where the branch would be correctly predicted
and the cost of the executing the second store would be noticably reflected in
performance.

hmmer's execution time improves by 30% on an imac12,2 on ref data sets. With
this change we are on par with gcc's performance (gcc also performs this
transformation). There was a 1.2 % performance improvement on a ARM swift chip.
Other tests in the test-suite+external seem to be mostly uninfluenced in my
experiments:
This optimization was triggered on 41 tests such that the executable was
different before/after the patch. Only 1 out of the 40 tests (dealII) was
reproducable below 100% (by about .4%). Given that hmmer benefits so much I
believe this to be a fair trade off.

llvm-svn: 180731
2013-04-29 21:28:24 +00:00
Rafael Espindola
5189efa685 Disable the MCJIT tests on 32 bit darwin.
I recently enabled them on 32 and 64 bit darwin, but it looks like 32 bit is
still fairly broken.

llvm-svn: 180730
2013-04-29 21:09:32 +00:00
Rafael Espindola
1d9ec9b43d Remove unused method.
llvm-svn: 180729
2013-04-29 20:00:27 +00:00
Rafael Espindola
3a846aeccf Update the documentation.
llvm-svn: 180725
2013-04-29 19:33:51 +00:00
Rafael Espindola
7b7ac69f21 Use a RelocationRef instead of a relocation_iterator.
No functionality change.

llvm-svn: 180723
2013-04-29 19:03:21 +00:00
Reid Kleckner
3bf655a0d0 Revert "revert r179735, it has no testcases, and doesn't really make sense."
This un-reverts r179735 and reverts commit r180574.

This fixes assertion failures for me locally and should fix the failures
on Windows reported widely on llvm-dev.  We should check if the bots
caught this and if so why not.

llvm-svn: 180722
2013-04-29 18:23:53 +00:00
Andrew Kaylor
36788b2f65 Exposing MCJIT through C API
Re-submitting with fix for OCaml dependency problems (removing dependency on SectionMemoryManager when it isn't used).

Patch by Fili Pizlo

llvm-svn: 180720
2013-04-29 17:49:40 +00:00
Rafael Espindola
eda9da47d6 Propagate relocation info to resolveRelocation.
This gets most of the MCJITs tests passing with MachO.

llvm-svn: 180716
2013-04-29 17:24:34 +00:00
Rafael Espindola
a4349f8ad0 Replace ObjRelocationInfo with relocation_iterator.
For MachO we need information that is not represented in ObjRelocationInfo.
Instead of copying the bits we think are needed from a relocation_iterator,
just pass the relocation_iterator down to the format specific functions.

No functionality change yet as we still drop the information once
processRelocationRef returns.

llvm-svn: 180711
2013-04-29 14:44:23 +00:00
Michael Gottesman
0543b120fa Add in some conditional compilation in order to silence an unused variable warning.
llvm-svn: 180700
2013-04-29 07:29:08 +00:00
Michael Gottesman
e93cabd1a0 [objc-arc] Apply the RV optimization to retains next to calls in ObjCARCContract instead of ObjCARCOpts.
Turning retains into retainRV calls disrupts the data flow analysis in
ObjCARCOpts. Thus we move it as late as we can by moving it into
ObjCARCContract.

We leave in the conversion from retainRV -> retain in ObjCARCOpt since
it enables the dataflow analysis.

rdar://10813093

llvm-svn: 180698
2013-04-29 06:53:53 +00:00
Michael Gottesman
ec7753e9cf Added statistics to count the number of retains/releases before/after optimization.
llvm-svn: 180697
2013-04-29 06:16:57 +00:00
Michael Gottesman
cc8f06860a Removed trailing whitespace.
llvm-svn: 180696
2013-04-29 06:16:55 +00:00
Michael Gottesman
b46ef21453 Fix for r180693. = /.
llvm-svn: 180694
2013-04-29 05:25:39 +00:00
Michael Gottesman
740a406cde [objc-arc-annotations] Moved the disabling of call movement to ConnectTDBUTraversals so that I can prevent Changed = true from being set. This prevents an infinite loop.
llvm-svn: 180693
2013-04-29 05:13:13 +00:00
Benjamin Kramer
0276e2b56d Inline variable into the #ifdef block where it's used.
llvm-svn: 180688
2013-04-28 07:47:04 +00:00
Jia Liu
9699f4d800 AArch64 InstrFormats:
delete blank.

llvm-svn: 180687
2013-04-28 01:45:11 +00:00
Joerg Sonnenberger
70f0a24009 Fix typo. Stupid me.
llvm-svn: 180686
2013-04-27 22:32:54 +00:00
Eric Christopher
5eefad4587 Regen.
llvm-svn: 180685
2013-04-27 22:23:16 +00:00
Joerg Sonnenberger
3486008857 Only use cxxabi.h's demangler, if it is actually available.
llvm-svn: 180684
2013-04-27 22:12:32 +00:00
Ulrich Weigand
7e7b549cf2 Handle tied sub-operands in AsmMatcherEmitter
The problem this patch addresses is the handling of register tie
constraints in AsmMatcherEmitter, where one operand is tied to a
sub-operand of another operand.  The typical scenario for this to
happen is the tie between the "write-back" register of a pre-inc
instruction, and the base register sub-operand of the memory address
operand of that instruction.

The current AsmMatcherEmitter code attempts to handle tied
operands by emitting the operand as usual first, and emitting
a CVT_Tied node when handling the second (tied) operand.  However,
this really only works correctly if the tied operand does not
have sub-operands (and isn't a sub-operand itself).  Under those
circumstances, a wrong MC operand list is generated.

In discussions with Jim Grosbach, it turned out that the MC operand
list really ought not to contain tied operands in the first place;
instead, it ought to consist of exactly those operands that are
named in the AsmString.  However, getting there requires significant
rework of (some) targets.

This patch fixes the immediate problem, and at the same time makes
one (small) step in the direction of the long-term solution, by
implementing two changes:

1. Restricts the AsmMatcherEmitter handling of tied operands to
   apply solely to simple operands (not complex operands or
   sub-operand of such).

This means that at least we don't get silently corrupt MC operand
lists as output.  However, if we do have tied sub-operands, they
would now no longer be handled at all, except for:

2. If we have an operand that does not occur in the AsmString,
   and also isn't handled as tied operand, simply emit a dummy
   MC operand (constant 0).

This works as long as target code never attempts to access
MC operands that do no not occur in the AsmString (and are
not tied simple operands), which happens to be the case for
all targets where this situation can occur (ARM and PowerPC).

[ Note that this change means that many of the ARM custom
  converters are now superfluous, since the implement the
  same "hack" now performed already by common code. ]

Longer term, we ought to fix targets to never access *any*
MC operand that does not occur in the AsmString (including
tied simple operands), and then finally completely remove
all such operands from the MC operand list.

Patch approved by Jim Grosbach.

llvm-svn: 180677
2013-04-27 18:48:23 +00:00
Shuxin Yang
cb9d06c59b Fix a XOR reassociation bug.
When Reassociator optimize "(x | C1)" ^ "(X & C2)", it may swap the two
subexpressions, however, it forgot to swap cached constants (of C1 and C2)
accordingly.

rdar://13739160

llvm-svn: 180676
2013-04-27 18:02:12 +00:00
Dmitri Gribenko
6b661ad8e1 Documentation: end option description with a period
Patch by Dimitry Andric.

llvm-svn: 180675
2013-04-27 16:34:24 +00:00
Tim Northover
26886c81b9 AArch64: convert MC-layer test to .s file
The CodeGen aspects of this test are already covered by cfi-frame.ll;
making it an assembly file reduces the risk of incidental changes
affecting the test.

llvm-svn: 180671
2013-04-27 11:56:14 +00:00
Michael Gottesman
9bb7d81aae [objc-arc] Test cleanups.
Mainly adding paranoid checks for the closing brace of a function to
help with FileCheck error readability. Also some other minor changes.

No actual CHECK changes.

llvm-svn: 180668
2013-04-27 05:25:54 +00:00
Andrew Trick
b90f16d802 Generalize the MachineTraceMetrics public API.
Naturally, we should be able to pass in extra instructions, not just
extra blocks.

llvm-svn: 180667
2013-04-27 03:54:20 +00:00