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

67369 Commits

Author SHA1 Message Date
Benjamin Kramer
35b0f6e5a6 Namespacify.
llvm-svn: 120146
2010-11-25 16:42:51 +00:00
Rafael Espindola
a8488b04e1 Factor some code to parseSectionFlags and fix the default type of a section.
llvm-svn: 120145
2010-11-25 15:32:56 +00:00
Michael J. Spencer
381a26d6d8 system_error: Even more unsupported error numbers :(.
llvm-svn: 120139
2010-11-25 01:53:59 +00:00
Nick Lewycky
f6fa6b29f4 Treat a call of function pointer like a load of the pointer when considering
whether the pointer can be replaced with the global variable it is a copy of.
Fixes PR8680.

llvm-svn: 120126
2010-11-24 22:04:20 +00:00
Rafael Espindola
1a81f03f87 Behave a bit more like gnu as and use the symbol (instead of the section)
for any relocation to a symbol defined in a tls section.

llvm-svn: 120121
2010-11-24 21:57:39 +00:00
Michael J. Spencer
85afd562ff 80 col.
llvm-svn: 120111
2010-11-24 20:07:14 +00:00
Michael J. Spencer
35c7e4a3c0 google test depends on Support.
llvm-svn: 120105
2010-11-24 19:35:15 +00:00
Rafael Espindola
97690e2d7d Relocate with the symbol if the relocation is of kind NTPOFF.
Patch by David Meyer, I added the test.

llvm-svn: 120104
2010-11-24 19:23:50 +00:00
Michael J. Spencer
8c91d43a5e unittests: Add initial Path-V2 test.
llvm-svn: 120103
2010-11-24 19:20:28 +00:00
Michael J. Spencer
7d427e8f88 Path Version 2.
Based on TR2/boost filesystem (v3) API, but modified to remove exceptions.

Do not include this file directly, when it is ready, it will be included by
include/llvm/System/Path.h.

llvm-svn: 120102
2010-11-24 19:20:19 +00:00
Michael J. Spencer
1fbb121684 unittests: Add SystemTests.
llvm-svn: 120101
2010-11-24 19:20:05 +00:00
Rafael Espindola
81ecba9559 Fix and add tests for all cases in x86 and x86_64 where gnu as implicitly
sets the type of a symbol to STT_TLS.

llvm-svn: 120100
2010-11-24 18:51:21 +00:00
Rafael Espindola
38daba991e Testcase for r120017.
llvm-svn: 120099
2010-11-24 18:03:57 +00:00
Wesley Peck
66641a7c04 Updating MBlaze .mask and .frame directives to match GCC's output and fixing regression introduced in 120095 by checking MCStreamer::hasRawTextSupport.
llvm-svn: 120097
2010-11-24 16:32:35 +00:00
Wesley Peck
0e324a205e 1. Fixing error where basic block labels were not being printed out when they need to be for the MBlaze backend because AsmPrinter::isBlockOnlyReachableByFallthrough does not take into account delay slots.
2. Re-adding .mask and .frame directives in printed assembly.
3. Adding .ent and .end directives in printed assembly.
4. Minor cleanups to MBlaze backend.

llvm-svn: 120095
2010-11-24 15:39:32 +00:00
Kalle Raiskila
edb28eb356 Use i8 as SETCC result type for i1 in SPU.
llvm-svn: 120092
2010-11-24 12:59:16 +00:00
Kalle Raiskila
b017eaea7b Allow for 'fcmp ogt' in SPU.
Fix by Visa Putkinen!

llvm-svn: 120090
2010-11-24 11:42:17 +00:00
Rafael Espindola
dc299d2615 If a symbol is used as tls, mark it as tls even if not declare as so. Probably
fixes PR8659.

llvm-svn: 120076
2010-11-24 02:19:40 +00:00
NAKAMURA Takumi
2d41b5af40 include/llvm/System/system_error.h: ECANCELED is undefined on Cygwin-1.5.
llvm-svn: 120072
2010-11-24 01:29:45 +00:00
Ted Kremenek
bb322e520d Tweak ImmutableMap/ImmutableSet/ImmutableList APIs
to use lowercase letters for the start of most
method names and to replace some method names
with more descriptive names (e.g., "getLeft()"
instead of "Left()").  No real functionality
change.

llvm-svn: 120070
2010-11-24 00:54:28 +00:00
Jakob Stoklund Olesen
1cf4810406 Generalize overflowLeaf to also handle overflows in branch nodes.
This doesn't quite work yet because the calls to treeDecrement and treeIncrement
operate at the leaf level, not on pathNode(Level) as required.

llvm-svn: 120068
2010-11-24 00:03:32 +00:00
Chris Lattner
80a065b474 add a MemoryBuffer::getOpenFile method, which turns an open
file descriptor into a MemoryBuffer (and closes the FD).

llvm-svn: 120065
2010-11-23 22:20:27 +00:00
Michael J. Spencer
2057f1dc45 system_error: Add fixme.
llvm-svn: 120059
2010-11-23 21:09:11 +00:00
Duncan Sands
b4e346d867 Rename SimplifyDistributed to the more meaningfull name SimplifyByFactorizing.
llvm-svn: 120051
2010-11-23 20:42:39 +00:00
Benjamin Kramer
8d7096e8ca The srem -> urem transform is not safe for any divisor that's not a power of two.
E.g. -5 % 5 is 0 with srem and 1 with urem.

Also addresses Frits van Bommel's comments.

llvm-svn: 120049
2010-11-23 20:33:57 +00:00
Duncan Sands
42e2ffcd33 Replace calls to ConstantFoldInstruction with calls to SimplifyInstruction
in two places that are really interested in simplified instructions, not
constants.

llvm-svn: 120044
2010-11-23 20:26:33 +00:00
Duncan Sands
20cae200d0 Constant folding here is pointless, because InstructionSimplify
(which does constant folding and more) is called a few lines
later.

llvm-svn: 120042
2010-11-23 20:24:21 +00:00
Jason W Kim
b1725a8110 Move the ARM reloc constants to Support/ELF.h
llvm-svn: 120035
2010-11-23 19:40:36 +00:00
Bob Wilson
ff0e6b1252 Recognize sign/zero-extended constant BUILD_VECTORs for VMULL operations.
We need to check if the individual vector elements are sign/zero-extended
values.  For now this only handles constants values.  Radar 8687140.

llvm-svn: 120034
2010-11-23 19:38:38 +00:00
Bob Wilson
77071bcf8a Fix copy-and-paste error in exception message.
llvm-svn: 120033
2010-11-23 19:38:34 +00:00
Benjamin Kramer
c8e6037e7d InstCombine: Reduce "X shift (A srem B)" to "X shift (A urem B)" iff B is positive.
This allows to transform the rem in "1 << ((int)x % 8);" to an and.

llvm-svn: 120028
2010-11-23 18:52:42 +00:00
Duncan Sands
45b231e80f Propagate LeftDistributes and RightDistributes into their only uses.
Stylistic improvement suggested by Frits van Bommel.

llvm-svn: 120026
2010-11-23 15:28:14 +00:00
Duncan Sands
fce4583b6a Fix typo pointed out by Frits van Bommel and Marius Wachtler.
llvm-svn: 120025
2010-11-23 15:25:34 +00:00
Duncan Sands
555525adf4 Exploit distributive laws (eg: And distributes over Or, Mul over Add, etc) in a
fairly systematic way in instcombine.  Some of these cases were already dealt
with, in which case I removed the existing code.  The case of Add has a bunch of
funky logic which covers some of this plus a few variants (considers shifts to be
a form of multiplication), which I didn't touch.  The simplification performed is:
A*B+A*C -> A*(B+C).  The improvement is to do this in cases that were not already
handled [such as A*B-A*C -> A*(B-C), which was reported on the mailing list], and
also to do it more often by not checking for "only one use" if "B+C" simplifies.

llvm-svn: 120024
2010-11-23 14:23:47 +00:00
Kalle Raiskila
f71cc94c91 Division by pow-of-2 is not cheap on SPU, do it with
shifts.

llvm-svn: 120022
2010-11-23 13:27:59 +00:00
Rafael Espindola
72c8de703d Implement the rex64 prefix.
llvm-svn: 120017
2010-11-23 11:23:24 +00:00
Duncan Sands
97ada840ed Expand a little on the description of what InstructionSimplify does.
llvm-svn: 120016
2010-11-23 10:50:08 +00:00
Duncan Sands
809b3e3634 Clarify that constant folding of instructions applies when all operands
are constant.  There was in fact one exception to this (phi nodes) - so
remove that exception (InstructionSimplify handles this so there should
be no loss).

llvm-svn: 120015
2010-11-23 10:16:18 +00:00
Rafael Espindola
af4cd15f2a Invalidate the layout on any relaxation, not just Instructions. Bug found by David Meyer.
While here, remove unused argument and rename UpdateForSlide to Invalidate.

llvm-svn: 120009
2010-11-23 08:08:33 +00:00
Rafael Espindola
6f069fc35f Produce a relocation for pcrel absolute values. Based on a patch by David Meyer.
llvm-svn: 120006
2010-11-23 07:20:12 +00:00
Cameron Zwarich
1fa40011ae Optimize a common case in the Lengauer-Tarjan dominators algorithm. This gives a
9.7% speedup running domtree on test-suite.

Reviewed by Chris Lattner.

llvm-svn: 120003
2010-11-23 06:32:37 +00:00
Chris Lattner
a830fc6a45 Revert functionality doug added in r98575 that was never
documented and only used by some clang stuff I just removed.

llvm-svn: 120002
2010-11-23 06:09:51 +00:00
Rafael Espindola
a660c25883 Reuse data fragments while lowering. Patch by David Meyer.
llvm-svn: 119999
2010-11-23 05:49:35 +00:00
Zhanyong Wan
ee1d07099f Fix formatting nits in the coding standards. Reviewed by clattner.
llvm-svn: 119998
2010-11-23 05:03:07 +00:00
Chris Lattner
44b4aff9ff fix this harder.
llvm-svn: 119994
2010-11-23 04:26:12 +00:00
Chris Lattner
040c0a1c3d fix a bug I introduced on the other side of the #ifdef
llvm-svn: 119993
2010-11-23 04:19:56 +00:00
Chris Lattner
e6d7915f62 reimplement SwapByteOrder.h in terms of overloading instead of
being in terms of excessively complex template logic.

llvm-svn: 119992
2010-11-23 04:04:25 +00:00
Wesley Peck
d589353ad0 Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept.
llvm-svn: 119990
2010-11-23 03:31:01 +00:00
Chris Lattner
d935e210ee add a 'LLVMConstIntOfArbitraryPrecision' api to the C api,
patch by Greg Pfeil!

llvm-svn: 119989
2010-11-23 02:47:22 +00:00
Chris Lattner
41281bd30f duncan's spider sense was right, I completely reversed the condition
on this instcombine xform.  This fixes a miscompilation of 403.gcc.

llvm-svn: 119988
2010-11-23 02:42:04 +00:00