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

5191 Commits

Author SHA1 Message Date
Evan Cheng
8a30a09180 Eliminate a compile time warning.
llvm-svn: 52982
2008-07-01 21:35:46 +00:00
Owen Anderson
8564cd9dfe Add a version of AsmPrinter::EOL that takes a const char* so that we don't have to do as many implicit std::string constructions.
Unfortunately, this doesn't appear to translate to a real speedup in practice.

llvm-svn: 52981
2008-07-01 21:16:27 +00:00
Evan Cheng
9a960dc2b2 Do run ComputeLiveOutVRegInfo with -fast.
llvm-svn: 52975
2008-07-01 18:15:04 +00:00
Evan Cheng
67ce381ffe Do not use computationally expensive scheduling heuristics with -fast.
llvm-svn: 52971
2008-07-01 18:05:03 +00:00
Evan Cheng
b33d6b69ab Apply Chris' suggestion.
llvm-svn: 52970
2008-07-01 17:59:20 +00:00
Dan Gohman
e3b796a81d Minimize duplicated code in AsmPrinter::printLabel.
llvm-svn: 52944
2008-07-01 00:16:26 +00:00
Dan Gohman
c8097f8c8c Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminating
the need for a flavor operand, and add a new SDNode subclass,
LabelSDNode, for use with them to eliminate the need for a label id
operand.

Change instruction selection to let these label nodes through
unmodified instead of creating copies of them. Teach the MachineInstr
emitter how to emit a MachineInstr directly from an ISD label node.

This avoids the need for allocating SDNodes for the label id and
flavor value, as well as SDNodes for each of the post-isel label,
label id, and label flavor.

llvm-svn: 52943
2008-07-01 00:05:16 +00:00
Evan Cheng
a40bb75480 Suppress compiler warning.
llvm-svn: 52934
2008-06-30 22:33:56 +00:00
Evan Cheng
488fdf516f Don't run stack slot coloring if -fast.
llvm-svn: 52933
2008-06-30 22:33:16 +00:00
Dan Gohman
082b08f33a Use a simpler but equivalent form of RecordSource.
llvm-svn: 52931
2008-06-30 22:21:03 +00:00
Evan Cheng
3ec3837c38 Add timing report for various sub-passes under SelectionDAGISel.
llvm-svn: 52930
2008-06-30 22:10:09 +00:00
Dan Gohman
c8c04b1ff4 std::ostream and std::string microoptimizations for asm printing.
llvm-svn: 52929
2008-06-30 22:03:41 +00:00
Dan Gohman
9997cc353f Use reserve.
SelectionDAG::allnodes_size is linear, but that doesn't appear to
outweigh the benefit of reducing heap traffic. If it does become a
problem, we should teach SelectionDAG to keep a count of how many
nodes are live, because there are several other places where that
information would be useful as well.

llvm-svn: 52926
2008-06-30 21:04:06 +00:00
Dan Gohman
6cc648891b Rename ISD::LOCATION to ISD::DBG_STOPPOINT to better reflect its
purpose, and give it a custom SDNode subclass so that it doesn't
need to have line number, column number, filename string, and
directory string, all existing as individual SDNodes to be the
operands.

This was the only user of ISD::STRING, StringSDNode, etc., so
remove those and some associated code.

This makes stop-points considerably easier to read in
-view-legalize-dags output, and reduces overhead (creating new
nodes and copying std::strings into them) on code containing
debugging information.

llvm-svn: 52924
2008-06-30 20:59:49 +00:00
Evan Cheng
3f664b6fd3 Split scheduling from instruction selection.
llvm-svn: 52923
2008-06-30 20:45:06 +00:00
Dale Johannesen
30d136e2c6 No need to align the stack if there are no stack
objects.  Fixes a couple of tests on Linux.

llvm-svn: 52921
2008-06-30 20:40:16 +00:00
Evan Cheng
a83d69e3b9 Remove unneeded include.
llvm-svn: 52920
2008-06-30 20:38:22 +00:00
Dan Gohman
295abfe228 Replace some std::vectors that showed up in heap profiling with
SmallVectors. Change the signature of TargetLowering::LowerArguments
to avoid returning a vector by value, and update the two targets
which still use this directly, Sparc and IA64, accordingly.

llvm-svn: 52917
2008-06-30 20:31:15 +00:00
Dan Gohman
62c0b69aec Correct the allocation size for CCState's UsedRegs member, which
only needs one bit for each register. UsedRegs is a SmallVector
sized at 16, so this eliminates a heap allocation/free for every
call and return processed by Legalize on most targets.

llvm-svn: 52915
2008-06-30 20:25:31 +00:00
Duncan Sands
93d7b1b4fa ExpungeNode is only needed for new nodes! This
fixes CodeGen/PowerPC/2008-06-19-LegalizerCrash.ll
when using the new LegalizeTypes infrastructure.

llvm-svn: 52903
2008-06-30 16:43:45 +00:00
Duncan Sands
c68385d4b5 Support for VAARG. As noted in a comment, this is
wrong for types like x86 long double and i1, but
no worse than what is done in LegalizeDAG.

llvm-svn: 52898
2008-06-30 13:55:15 +00:00
Duncan Sands
a706115957 Support for promoting select_cc operands.
llvm-svn: 52895
2008-06-30 11:50:11 +00:00
Duncan Sands
c882a4eba9 Revert the SelectionDAG optimization that makes
it impossible to create a MERGE_VALUES node with
only one result: sometimes it is useful to be able
to create a node with only one result out of one of
the results of a node with more than one result, for
example because the new node will eventually be used
to replace a one-result node using ReplaceAllUsesWith,
cf X86TargetLowering::ExpandFP_TO_SINT.  On the other
hand, most users of MERGE_VALUES don't need this and
for them the optimization was valuable.  So add a new
utility method getMergeValues for creating MERGE_VALUES
nodes which by default performs the optimization.
Change almost everywhere to use getMergeValues (and
tidy some stuff up at the same time).

llvm-svn: 52893
2008-06-30 10:19:09 +00:00
Evan Cheng
2005804de6 - Re-apply 52748 and friends with fix. GetConstantStringInfo() returns an empty string for ConstantAggregateZero case which surprises selectiondag.
- Correctly handle memcpy from constant string which is zero-initialized.

llvm-svn: 52891
2008-06-30 07:31:25 +00:00
Chris Lattner
95fecdd63a Implement split and scalarize for SELECT_CC, fixing PR2504
llvm-svn: 52887
2008-06-30 02:43:01 +00:00
Anton Korobeynikov
6f260767ec Revert (52748 and friends):
Move GetConstantStringInfo to lib/Analysis. Remove
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.

This unbreaks llvm-gcc bootstrap.

llvm-svn: 52884
2008-06-29 17:57:03 +00:00
Chris Lattner
2deb9ae6ad Really fix the bootstrap failure.
llvm-svn: 52854
2008-06-28 06:24:50 +00:00
Chris Lattner
090d81df5e Add back the capability to include nul characters in strings with
GetConstantStringInfo.  This will hopefully restore llvm-gcc to 
happy bootstrap land.

llvm-svn: 52851
2008-06-28 05:33:32 +00:00
Dan Gohman
6b87f869e4 When folding a bitcast into a load or store, preserve the alignment
information of the original load or store, which is checked to be
at least as good, and possibly better.

llvm-svn: 52849
2008-06-28 00:45:22 +00:00
Evan Cheng
36adcb1eea Looks like this condition is inverted.
llvm-svn: 52841
2008-06-27 22:11:49 +00:00
Bill Wendling
39cc6881e1 Reduce number of times .size() is called on a vector. Rename some variables to
match normal naming scheme.

llvm-svn: 52820
2008-06-27 07:13:44 +00:00
Owen Anderson
e0604d46c2 Use a SmallSet when we can to reduce memory allocations.
This speeds up a particular testcase from 0.0302s to 0.0222s in LiveVariables.

llvm-svn: 52819
2008-06-27 07:05:59 +00:00
Chris Lattner
635da8cff5 simplify this check, GetConstantStringInfo validates that a
global is constant already.  No functionality change.

llvm-svn: 52812
2008-06-27 03:18:41 +00:00
Bill Wendling
e0ea004d40 Cruft left from patch revert...sorry. :-(
llvm-svn: 52808
2008-06-27 01:32:08 +00:00
Bill Wendling
e9909a1c2a Reverting broken patch r52803.
llvm-svn: 52806
2008-06-27 01:27:56 +00:00
Owen Anderson
242026fa70 Don't perform expensive queries checking for super and sub registers when we know that there aren't any.
This speed up LiveVariables on instcombine at -O0 -g from 0.3855s to 0.3503s.  Look for more improvements in this area soon!

llvm-svn: 52804
2008-06-27 01:22:50 +00:00
Bill Wendling
d0c2026584 - Remove a use of std::vector.
- Make sure that we're not recalculating the size of a vector
  that never changes.

llvm-svn: 52803
2008-06-27 00:56:36 +00:00
Bill Wendling
2ab62b9a92 Refactor the DebugInfoDesc stuff out of the MachineModuleInfo file. Clean up
some uses of std::vector, where it's return std::vector by value. Yuck!

llvm-svn: 52800
2008-06-27 00:09:40 +00:00
Chris Lattner
85cf534e04 duncan points out that isOperationLegal includes a check for
type legality.  Thanks Duncan!

llvm-svn: 52786
2008-06-26 17:16:00 +00:00
Owen Anderson
889d683ee8 Don't create a whole new string just to copy the elements into it.
llvm-svn: 52785
2008-06-26 17:06:02 +00:00
Dale Johannesen
f170e29cf5 Fixes the last x86-64 test failure in compat.exp:
<16 x float> is 64-byte aligned (for some reason),
which gets us into the stack realignment code.  The
computation changing FP-relative offsets to SP-relative
was broken, assiging a spill temp to a location
also used for parameter passing.  This
fixes it by rounding up the stack frame to a multiple
of the largest alignment (I concluded it wasn't fixable
without doing this, but I'm not very sure.)

llvm-svn: 52750
2008-06-26 01:51:13 +00:00
Eric Christopher
4f05c48718 Move GetConstantStringInfo to lib/Analysis. Remove
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.

llvm-svn: 52748
2008-06-26 00:31:12 +00:00
Chris Lattner
2b67ff8632 when we know the signbit of an input to uint_to_fp is zero,
change it to sint_to_fp on targets where that is cheaper (and
visaversa of course).  This allows us to compile uint_to_fp to:

_test:
	movl	4(%esp), %eax
	shrl	$23, %eax
	cvtsi2ss	%eax, %xmm0
	movl	8(%esp), %eax
	movss	%xmm0, (%eax)
	ret

instead of:

	.align	3
LCPI1_0:					##  double
	.long	0	## double least significant word 4.5036e+15
	.long	1127219200	## double most significant word 4.5036e+15
	.text
	.align	4,0x90
	.globl	_test
_test:
	subl	$12, %esp
	movl	16(%esp), %eax
	shrl	$23, %eax
	movl	%eax, (%esp)
	movl	$1127219200, 4(%esp)
	movsd	(%esp), %xmm0
	subsd	LCPI1_0, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movl	20(%esp), %eax
	movss	%xmm0, (%eax)
	addl	$12, %esp
	ret

llvm-svn: 52747
2008-06-26 00:16:49 +00:00
Owen Anderson
68f11ecb86 Remember which MachineOperand we were processing, so we don't have to scan the list to find it again later.
This speeds up live intervals from 0.37s to 0.30s on instcombine.

llvm-svn: 52745
2008-06-25 23:39:39 +00:00
Dan Gohman
d1467012f5 Fix the text in an assert string.
llvm-svn: 52744
2008-06-25 22:14:43 +00:00
Evan Cheng
71fbfe73c1 - Fix a x86 vector isel bug: illegal transformation of a vector_shuffle into a
shift.
- Add a readme entry for a missing vector_shuffle optimization that results in
  awful codegen.

llvm-svn: 52740
2008-06-25 20:52:59 +00:00
Duncan Sands
12c1bee452 Add support for expanding PPC 128 bit floats.
For this it is convenient to permit floats to
be used with EXTRACT_ELEMENT, so I tweaked
things to allow that.  I also added libcalls
for ppcf128 to i32 forms of FP_TO_XINT, since
they exist in libgcc and this case can certainly
occur (and does occur in the testsuite) - before
the i64 libcall was being used.  Also, the
XINT_TO_FP result seemed to be wrong when
the argument is an i128: the wrong fudge
factor was added (the i32 and i64 cases were
handled directly, but the i128 code fell
through to some generic softening code which
seemed to think it was i64 to f32!).  So I
fixed it by adding a fudge factor that I
found in my breakfast cereal.

llvm-svn: 52739
2008-06-25 20:24:48 +00:00
Duncan Sands
ab85726912 Add/complete support for integer and float
select_cc and friends.  This code could be
factorized a bit but I'm not sure that it's
worth it.

llvm-svn: 52724
2008-06-25 16:34:21 +00:00
Dan Gohman
404964dbc0 Remove the OrigVT member from AtomicSDNode, as it is redundant with
the base SDNode's VTList.

llvm-svn: 52722
2008-06-25 16:07:49 +00:00
Mon P Wang
7d89d61387 Added MemOperands to Atomic operations since Atomics touches memory.
Added abstract class MemSDNode for any Node that have an associated MemOperand
Changed atomic.lcs => atomic.cmp.swap, atomic.las => atomic.load.add, and
atomic.lss => atomic.load.sub

llvm-svn: 52706
2008-06-25 08:15:39 +00:00