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
Chris Lattner
c0fcc364c0
filecheckize
...
llvm-svn: 119987
2010-11-23 02:26:52 +00:00
Jason W Kim
287d5fb10b
Fixed some style issues (no _, no spc after !)
...
llvm-svn: 119986
2010-11-22 22:05:16 +00:00
Rafael Espindola
492580fa9a
Remove duplicated constants. Thanks to Jason for noticing it.
...
llvm-svn: 119985
2010-11-22 21:49:05 +00:00
Benjamin Kramer
b5a2a81094
InstCombine: Implement X - A*-B -> X + A*B.
...
llvm-svn: 119984
2010-11-22 20:31:27 +00:00
Jason W Kim
0941164ddb
Make the <ARCH>ELFObjectWriter statics private
...
llvm-svn: 119982
2010-11-22 18:57:00 +00:00
Jason W Kim
243d3f5d8c
Fix misplaced statics.
...
llvm-svn: 119981
2010-11-22 18:47:05 +00:00
Jason W Kim
dea9f17ab2
Kill trailing whitespace
...
llvm-svn: 119979
2010-11-22 18:42:07 +00:00
Jason W Kim
e2fece2f4c
Refactor the ELFRelocationEntry (pull up) and move the arch-specific statics to inside the class where it belongs.
...
Next step is to rationally break apart the RecordRelocation()
Probably the step will be to have 1 member function for ech slot of the ELFRelocationEntry()
llvm-svn: 119978
2010-11-22 18:41:13 +00:00
Evan Cheng
e6d55cd247
Fix epilogue codegen to avoid leaving the stack pointer in an invalid
...
state. Previously Thumb2 would restore sp from fp like this:
mov sp, r7
sub, sp, #4
If an interrupt is taken after the 'mov' but before the 'sub', callee-saved
registers might be clobbered by the interrupt handler. Instead, try
restoring directly from sp:
add sp, #4
Or, if necessary (with VLA, etc.) use a scratch register to compute sp and
then restore it:
sub.w r4, r7, #8
mov sp, r7
rdar://8465407
llvm-svn: 119977
2010-11-22 18:12:04 +00:00
Mikhail Glushenkov
cfae3f46f9
Add a newline.
...
llvm-svn: 119976
2010-11-22 17:10:20 +00:00
Mikhail Glushenkov
946fa2d2ee
llvmc: Make -march/-mcpu/-mtune behaviour more consistent with gcc.
...
llvm-svn: 119975
2010-11-22 17:10:09 +00:00
Duncan Sands
73f0559779
If a GEP index simply advances by multiples of a type of zero size,
...
then replace the index with zero.
llvm-svn: 119974
2010-11-22 16:32:50 +00:00
Kalle Raiskila
8f1131e569
Fix a bug with extractelement on SPU.
...
In the attached testcase, the element was
never extracted (missing rotate).
llvm-svn: 119973
2010-11-22 16:28:26 +00:00