1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

85299 Commits

Author SHA1 Message Date
James Molloy
e2d4fd89a3 Add default JIT LIT variable.
Patch by David Tweed!

llvm-svn: 164996
2012-10-02 10:57:08 +00:00
Chandler Carruth
78ef606f04 Turn the new SROA pass back on. Let's see if it sticks this time. =]
Again, let me know if anything breaks due to this!

llvm-svn: 164986
2012-10-02 04:24:01 +00:00
Chad Rosier
37e4157d8c Fix 80-column violations. Cleanup whitespace in generated code.
llvm-svn: 164983
2012-10-02 00:25:57 +00:00
Chad Rosier
5e80eb4c86 [ms-inline asm] Add the convertToMapAndConstraints() function that is used to
map constraints and MCInst operands to inline asm operands.  This replaces the
getMCInstOperandNum() function.

The logic to determine the constraints are not in place, so we still default to
a register constraint (i.e., "r"). Also, we no longer build the MCInst but
rather return just the opcode to get the MCInstrDesc.

llvm-svn: 164979
2012-10-01 23:45:51 +00:00
NAKAMURA Takumi
6e0f1055bb test/CodeGen/X86/red-zone2.ll: Add -mtriple=x86_64-linux, and FileCheck-ize.
llvm-svn: 164975
2012-10-01 22:48:07 +00:00
Jim Grosbach
037348ce80 MachO: direct-to-object attribute for data-in-code markers.
The target backend can support data-in-code load commands even when
the assembler doesn't, or vice-versa. Allow targets to opt-in for
direct-to-object.

PR13973.

llvm-svn: 164974
2012-10-01 22:20:54 +00:00
Reed Kotler
28ed4620db checking test case for r164811. was an omission to not check this in. this was already approved
llvm-svn: 164972
2012-10-01 21:35:06 +00:00
Chad Rosier
b475e38fc8 [ms-inline asm] Expose the getReg() function in the base class.
llvm-svn: 164969
2012-10-01 20:53:03 +00:00
Michael J. Spencer
975a363331 [Docs] Update File Headers section to cover doxygen style file level docs.
llvm-svn: 164964
2012-10-01 19:59:21 +00:00
Jordan Rose
acd391492d Re-enable support for --program-prefix.
The Apple buildbots have been modified not to pass --target,
so they shouldn't choke on a default program prefix anymore.

Patch by Rick Foos!

llvm-svn: 164956
2012-10-01 18:40:32 +00:00
Micah Villmow
892471fb4c Forgot the SPIR test case.
llvm-svn: 164949
2012-10-01 17:07:51 +00:00
Micah Villmow
c2b360eb5b Add in support for SPIR to LLVM core. This adds a new target and two new calling conventions.
llvm-svn: 164948
2012-10-01 17:01:31 +00:00
Michael Liao
f2905fc76e Fix PR13899
- Update maximal stack alignment when stack arguments are prepared before a
  call.
- Test cases are enhanced to show it's not a Win32 specific issue but a generic
  one.

llvm-svn: 164946
2012-10-01 16:44:04 +00:00
Benjamin Kramer
56415ad3cd Provide a shortcut for MCObjectStreamer when emitting fills.
Reduces runtime of i386-large-relocations.s by 10x in Release builds, even more
in Debug+Asserts builds.

llvm-svn: 164945
2012-10-01 15:14:14 +00:00
Chandler Carruth
6be8e1c6b5 Fix more misspellings found by Duncan during review.
llvm-svn: 164940
2012-10-01 12:30:45 +00:00
Chandler Carruth
7c6e0d72ed Make this plural. Spotted by Duncan in review (and a very old typo, this
is the second time I've moved this comment around...)

llvm-svn: 164939
2012-10-01 12:24:42 +00:00
Chandler Carruth
1d851e4e45 Prune some unnecessary includes.
llvm-svn: 164938
2012-10-01 12:21:54 +00:00
Chandler Carruth
93f31cefdc Fix several issues with alignment. We weren't always accounting for type
alignment requirements of the new alloca. As one consequence which was
reported as a bug by Duncan, we overaligned memcpy calls to ranges of
allocas after they were rewritten to types with lower alignment
requirements. Other consquences are possible, but I don't have any test
cases for them.

llvm-svn: 164937
2012-10-01 12:16:54 +00:00
Benjamin Kramer
41d567a2a7 TargetData: s/uint32_t/unsigned/ per Kuba's request.
llvm-svn: 164935
2012-10-01 11:56:16 +00:00
Benjamin Kramer
54a33840fc SimplifyCFG: Don't crash when forming a switch bitmap with an undef default value.
Fixes PR13985.

llvm-svn: 164934
2012-10-01 11:31:48 +00:00
Chandler Carruth
eef539908e Factor the PHI and select speculation into a separate rewriter. This
could probably be factored still further to hoist this logic into
a generic helper, but currently I don't have particularly clean ideas
about how to handle that.

This at least allows us to drop custom load rewriting from the
speculation logic, which in turn allows the existing load rewriting
logic to fire. In theory, this could enable vector promotion or other
tricks after speculation occurs, but I've not dug into such issues. This
is primarily just cleaning up the factoring of the code and the
resulting logic.

llvm-svn: 164933
2012-10-01 10:54:05 +00:00
Craig Topper
c62da8fb36 Use constants for all return values in switch. Allows clang to optimize it into a lookup table.
llvm-svn: 164926
2012-10-01 07:33:27 +00:00
Chandler Carruth
0ba7581e2f Refactor the PartitionUse structure to actually use the Use* instead of
a pair of instructions, one for the used pointer and the second for the
user. This simplifies the representation and also makes it more dense.

This was noticed because of the miscompile in PR13926. In that case, we
were running up against a fundamental "bad idea" in the speculation of
PHI and select instructions: the speculation and rewriting are
interleaved, which requires phi speculation to also perform load
rewriting! This is bad, and causes us to miss opportunities to do (for
example) vector rewriting only exposed after PHI speculation, etc etc.
It also, in the old system, required us to insert *new* load uses into
the current partition's use list, which would then be ignored during
rewriting because we had already extracted an end iterator for the use
list. The appending behavior (and much of the other oddities) stem from
the strange de-duplication strategy in the PartitionUse builder.
Amusingly, all this went without notice for so long because it could
only be triggered by having *different* GEPs into the same partition of
the same alloca, where both different GEPs were operands of a single
PHI, and where the GEP which was not encountered first also had multiple
uses within that same PHI node... Hence the insane steps required to
reproduce.

So, step one in fixing this fundamental bad idea is to make the
PartitionUse actually contain a Use*, and to make the builder do proper
deduplication instead of funky de-duplication. This is enough to remove
the appending behavior, and fix the miscompile in PR13926, but there is
more work to be done here. Subsequent commits will lift the speculation
into its own visitor. It'll be a useful step toward potentially
extracting all of the speculation logic into a generic utility
transform.

The existing PHI test case for repeated operands has been made more
extreme to catch even these issues. This test case, run through the old
pass, will exactly reproduce the miscompile from PR13926. ;] We were so
close here!

llvm-svn: 164925
2012-10-01 01:49:22 +00:00
Jakub Staszak
15c0e939cd Use dyn_cast instead of isa and cast.
No functionality change.

llvm-svn: 164924
2012-09-30 21:24:57 +00:00
Benjamin Kramer
44f4511b6a SimplifyCFG: Enumerating all predecessors of a BB can be expensive (switches), avoid it if possible.
No functionality change.

llvm-svn: 164923
2012-09-30 21:03:56 +00:00
Dmitri Gribenko
353ea39be4 RST docs: convert HTML escapes to plain text in code examples.
llvm-svn: 164922
2012-09-30 20:51:02 +00:00
Dmitri Gribenko
3d5e43c7ca Sphinx CSS: remove negative letter-spacing, it makes some fonts look really
bad.  Fonts already have appropriate tracking built-in.

llvm-svn: 164921
2012-09-30 20:43:24 +00:00
Jakub Staszak
c78b1c68c7 Fix && to && in Coding Standards.
llvm-svn: 164920
2012-09-30 20:42:13 +00:00
Craig Topper
a970c6ab45 Change getX86SubSuperRegister to take an MVT::SimpleValueType rather than an EVT and add llvm_unreachable to the switches. Helps it compile to dramatically better code.
llvm-svn: 164919
2012-09-30 19:49:56 +00:00
Benjamin Kramer
46b4cbd0a3 ArgumentPromotion: Remove ancient workaround for a bug in the C backend.
Fun fact: The CBE learned how to deal with this situation before it was removed.

llvm-svn: 164918
2012-09-30 17:31:56 +00:00
Duncan Sands
751f9472f2 Ignore apparent buffer overruns on external or weak globals. This is a major
source of false positives due to globals being declared in a header with some
kind of incomplete (small) type, but the actual definition being bigger.

llvm-svn: 164912
2012-09-30 07:30:10 +00:00
Nadav Rotem
972fdd96a1 Revert r164910 because it causes failures to several phase2 builds.
llvm-svn: 164911
2012-09-30 07:17:56 +00:00
Nadav Rotem
f7ea233f5c A DAGCombine optimization for merging consecutive stores. This optimization is not profitable in many cases
because moden processos can store multiple values in parallel, and preparing the consecutive store requires
some work.  We only handle these cases:

1. Consecutive stores where the values and consecutive loads. For example:
 int a = p->a;
 int b = p->b;
 q->a = a;
 q->b = b;

2. Consecutive stores where the values are constants. Foe example:
 q->a = 4;
 q->b = 5;

llvm-svn: 164910
2012-09-30 06:24:14 +00:00
Bob Wilson
ee6a40c517 Add LLVM support for Swift.
llvm-svn: 164899
2012-09-29 21:43:49 +00:00
Bob Wilson
fdb7fc6060 Whitespace.
llvm-svn: 164898
2012-09-29 21:27:31 +00:00
Benjamin Kramer
4a627eee1d Shrink TargetAlignElem a bit, we do a lot of searches on them.
llvm-svn: 164897
2012-09-29 19:57:14 +00:00
Chandler Carruth
477c891332 Fix a somewhat surprising miscompile where code relying on an ABI
alignment could lose it due to the alloca type moving down to a much
smaller alignment guarantee.

Now SROA will actively compute a proper alignment, factoring the target
data, any explicit alignment, and the offset within the struct. This
will in some cases lower the alignment requirements, but when we lower
them below those of the type, we drop the alignment entirely to give
freedom to the code generator to align it however is convenient.

Thanks to Duncan for the lovely test case that pinned this down. =]

llvm-svn: 164891
2012-09-29 10:41:21 +00:00
Duncan Sands
a29a3a24a7 Speculatively revert commit 164885 (nadav) in the hope of ressurecting a pile of
buildbots.  Original commit message:

A DAGCombine optimization for merging consecutive stores. This optimization is not profitable in many cases
because moden processos can store multiple values in parallel, and preparing the consecutive store requires
some work.  We only handle these cases:

1. Consecutive stores where the values and consecutive loads. For example:
  int a = p->a;
  int b = p->b;
  q->a = a;
  q->b = b;

2. Consecutive stores where the values are constants. Foe example:
  q->a = 4;
  q->b = 5;

llvm-svn: 164890
2012-09-29 10:25:35 +00:00
Craig Topper
59e472177a Tidy up to match coding standards. Remove 'else' after 'return' and moving operators to end of preceding line. No functional change intended.
llvm-svn: 164887
2012-09-29 07:18:53 +00:00
Craig Topper
36c4380c5c Replace a couple if/elses around similar calls with conditional operators on the varying arguments. No functional change.
llvm-svn: 164886
2012-09-29 06:54:22 +00:00
Nadav Rotem
37dcc09044 A DAGCombine optimization for merging consecutive stores. This optimization is not profitable in many cases
because moden processos can store multiple values in parallel, and preparing the consecutive store requires
some work.  We only handle these cases:

1. Consecutive stores where the values and consecutive loads. For example:
  int a = p->a;
  int b = p->b;
  q->a = a;
  q->b = b;

2. Consecutive stores where the values are constants. Foe example:
  q->a = 4;
  q->b = 5;

llvm-svn: 164885
2012-09-29 06:33:25 +00:00
Craig Topper
d903ec6dc2 Remove more LLVM_DELETED_FUNCTIONs from destructors to fix -std=c++11 build on gcc 4.7.
llvm-svn: 164880
2012-09-29 02:25:34 +00:00
Evan Cheng
f4c080b01e Add test case for r164850.
llvm-svn: 164867
2012-09-29 00:12:08 +00:00
Evan Cheng
baf11248e4 Do not delete BBs if their addresses are taken. rdar://12396696
llvm-svn: 164866
2012-09-28 23:58:57 +00:00
Bill Wendling
6a8730f5dd Don't use bit-wise operations to query for inclusion/exclusion of attributes.
llvm-svn: 164860
2012-09-28 22:30:18 +00:00
Evan Cheng
69a822b612 GlobalDCE should be run at -O2 / -Os to eliminate unused dtor, etc. rdar://9142819
llvm-svn: 164850
2012-09-28 21:23:26 +00:00
Akira Hatanaka
30420f3184 MIPS DSP: add operands to make sure instruction strings are being matched.
llvm-svn: 164849
2012-09-28 21:23:16 +00:00
Bill Wendling
3072860a8f Remove unused methods.
llvm-svn: 164848
2012-09-28 21:22:24 +00:00
Sean Silva
b781a853b1 docs: dedent list on index.rst
In reStructuredText, indented blocks denote block quotes [1]. This list
is not a block quote.

[1]. http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#block-quotes

llvm-svn: 164847
2012-09-28 21:18:37 +00:00
Akira Hatanaka
8c74c52ca4 MIPS DSP: other miscellaneous instructions.
llvm-svn: 164845
2012-09-28 20:50:31 +00:00