Commit Graph

2469 Commits

Author SHA1 Message Date
Chris Lattner
54a30b9639 TargetData doesn't know the alignment of vectors :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26884 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-20 01:51:46 +00:00
Chris Lattner
fb194b9e73 Add very basic support for VECTOR_SHUFFLE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26880 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 23:56:04 +00:00
Chris Lattner
4d3abee618 Allow SCALAR_TO_VECTOR to be custom lowered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26867 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 06:47:21 +00:00
Chris Lattner
ce87215131 Add SCALAR_TO_VECTOR support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26866 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 06:31:19 +00:00
Chris Lattner
74881908fe Don't bother storing undef elements of BUILD_VECTOR's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26858 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 05:46:04 +00:00
Chris Lattner
5fcd0350be Implement expand of BUILD_VECTOR containing variable elements.
This implements CodeGen/Generic/vector.ll:test_variable_buildvector


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26852 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 04:18:56 +00:00
Chris Lattner
ca24244234 fold insertelement(buildvector) -> buildvector if the inserted element # is
a constant.  This implements test_constant_insert in CodeGen/Generic/vector.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26851 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 01:27:56 +00:00
Chris Lattner
2332b9f16f implement basic support for INSERT_VECTOR_ELT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26849 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 01:17:20 +00:00
Chris Lattner
b2827b0901 Rename ConstantVec -> BUILD_VECTOR and VConstant -> VBUILD_VECTOR. Allow*BUILD_VECTOR to take variable inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26847 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 00:52:58 +00:00
Chris Lattner
23d564c11f implement vector.ll:test_undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26845 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 00:20:20 +00:00
Chris Lattner
4794a6b6a0 Fix the remaining bugs in the vector expansion rework I commited yesterday.
This fixes CodeGen/Generic/vector.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26843 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 00:07:49 +00:00
Chris Lattner
c7029805ef Change the structure of lowering vector stuff. Note: This breaks some
things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26840 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-18 01:44:44 +00:00
Chris Lattner
0c486bdc22 add a couple enum values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26830 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-17 19:53:59 +00:00
Nate Begeman
81e8097377 Remove BRTWOWAY*
Make the PPC backend not dependent on BRTWOWAY_CC and make the branch
selector smarter about the code it generates, fixing a case in the
readme.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26814 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-17 01:40:33 +00:00
Chris Lattner
6cb7004c34 Fix a problem fully scalarizing values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26811 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-16 23:05:19 +00:00
Chris Lattner
199862b749 Add support for CopyFromReg from vector values. Note: this doesn't support
illegal vector types yet!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26799 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-16 19:57:50 +00:00
Chris Lattner
3c38449be6 Teach CreateRegForValue how to handle vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26798 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-16 19:51:18 +00:00
Chris Lattner
3a59358499 set TransformToType correctly for vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26797 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-16 19:50:01 +00:00
Chris Lattner
28b5b1c7b5 add support for vector->vector casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26788 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 22:19:46 +00:00
Chris Lattner
06ac6ab938 Add a note, this code should be moved to the dag combiner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26787 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 22:19:18 +00:00
Jim Laskey
9d0ff8e6f9 Expand subprogram and added block descriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26782 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 19:09:58 +00:00
Jim Laskey
2140798cc4 1. Use null for serialized empty strings.
2. Allow for user defined debug descriptors.
3. Allow for user augmented fields on debug descriptors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26760 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 18:37:57 +00:00
Evan Cheng
30b37b5f29 Add LSR hooks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26740 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 23:18:16 +00:00
Chris Lattner
ac0f8f2929 make sure dead token factor nodes are removed by the dag combiner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26731 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 18:37:30 +00:00
Jim Laskey
f4321a3a43 Handle the removal of the debug chain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 13:07:37 +00:00
Chris Lattner
947c28935d Fold X+Y -> X|Y when safe. This implements:
Regression/CodeGen/PowerPC/and_add.ll

a case that occurs with dynamic allocas of constant size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26727 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 06:51:27 +00:00
Chris Lattner
b6b17ffbc6 I can't convince myself that this is safe, remove the recursive call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26725 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 06:42:16 +00:00
Chris Lattner
79dbea5ab4 add a couple of missing folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26724 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 06:26:26 +00:00
Chris Lattner
8f4191d619 For targets with FABS/FNEG support, lower copysign to an integer load,
a select and FABS/FNEG.

This speeds up a trivial (aka stupid) copysign benchmark I wrote from 6.73s
to 2.64s, woo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26723 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 06:08:38 +00:00
Chris Lattner
fc3549ee8c Don't advance the hazard recognizer when there are no hazards and no instructions
to be emitted.

Don't add one to the latency of a completed instruction if the latency of the
op is 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26718 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-12 09:01:41 +00:00
Chris Lattner
b2215030d6 Chain operands aren't real uses: they don't require the full latency of the
predecessor to finish before they can start.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26717 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-12 03:52:09 +00:00
Chris Lattner
53fbf2a8e8 As a pending queue data structure to keep track of instructions whose
operands have all issued, but whose results are not yet available.  This
allows us to compile:

int G;
int test(int A, int B, int* P) {
   return (G+A)*(B+1);
}

to:

_test:
        lis r2, ha16(L_G$non_lazy_ptr)
        addi r4, r4, 1
        lwz r2, lo16(L_G$non_lazy_ptr)(r2)
        lwz r2, 0(r2)
        add r2, r2, r3
        mullw r3, r2, r4
        blr

instead of this, which has a stall between the lis/lwz:

_test:
        lis r2, ha16(L_G$non_lazy_ptr)
        lwz r2, lo16(L_G$non_lazy_ptr)(r2)
        addi r4, r4, 1
        lwz r2, 0(r2)
        add r2, r2, r3
        mullw r3, r2, r4
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26716 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-12 00:38:57 +00:00
Chris Lattner
8469031622 rename priorityqueue -> availablequeue. When a node is scheduled, remember
which cycle it lands on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26714 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 22:44:37 +00:00
Chris Lattner
c1c078c170 Make CurrCycle a local var instead of an instance var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26713 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 22:34:41 +00:00
Chris Lattner
7d82b00048 Move some methods around so that BU specific code is together, TD specific code
is together, and direction independent code is together.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26712 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 22:28:35 +00:00
Chris Lattner
309cf8a713 merge preds/chainpreds -> preds set
merge succs/chainsuccs -> succs set

This has no functionality change, simplifies the code, and reduces the size
of sunits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26711 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 22:24:20 +00:00
Evan Cheng
0937103368 Added a parameter to control whether Constant::getStringValue() would chop
off the result string at the first null terminator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26704 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 23:52:03 +00:00
Chris Lattner
7d74d1145f scrape out bits of llvm-db
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26701 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 22:48:19 +00:00
Chris Lattner
a34b6f8713 Move simple-selector-specific types to the simple selector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26693 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:51:18 +00:00
Chris Lattner
20a4921791 Simplify the interface to the schedulers, to not pass the selected heuristicin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26692 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:49:12 +00:00
Chris Lattner
2f5806c2b3 Move some simple-sched-specific instance vars to the simple scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26690 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:42:02 +00:00
Chris Lattner
1e433c59e0 prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26689 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:37:35 +00:00
Chris Lattner
e76074ab89 move some simple scheduler methods into the simple scheduler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26688 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:35:21 +00:00
Chris Lattner
8c7ef0599c Make EmitNode take a SDNode instead of a NodeInfo*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26687 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:28:36 +00:00
Chris Lattner
df3750642a Move the VRBase field from NodeInfo to being a separate, explicit, map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26686 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:25:12 +00:00
Chris Lattner
8d41651da7 no need to build groups anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26684 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:15:58 +00:00
Chris Lattner
b2042e31a7 Create SUnits directly from the SelectionDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26683 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:13:32 +00:00
Chris Lattner
be24e5996c Push PrepareNodeInfo/IdentifyGroups down the inheritance hierarchy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26682 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 06:34:51 +00:00
Chris Lattner
da4ff69153 Teach the latency scheduler some new tricks. In particular, to break ties,
keep track of a sense of "mobility", i.e. how many other nodes scheduling one
node will free up.  For something like this:

float testadd(float *X, float *Y, float *Z, float *W, float *V) {
  return (*X+*Y)*(*Z+*W)+*V;
}

For example, this makes us schedule *X then *Y, not *X then *Z.  The former
allows us to issue the add, the later only lets us issue other loads.

This turns the above code from this:

_testadd:
        lfs f0, 0(r3)
        lfs f1, 0(r6)
        lfs f2, 0(r4)
        lfs f3, 0(r5)
        fadds f0, f0, f2
        fadds f1, f3, f1
        lfs f2, 0(r7)
        fmadds f1, f0, f1, f2
        blr

into this:

_testadd:
        lfs f0, 0(r6)
        lfs f1, 0(r5)
        fadds f0, f1, f0
        lfs f1, 0(r4)
        lfs f2, 0(r3)
        fadds f1, f2, f1
        lfs f2, 0(r7)
        fmadds f1, f1, f0, f2
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26680 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 05:51:05 +00:00
Chris Lattner
f83a47d905 add an aggregate method for reinserting scheduled nodes, add a callback for
priority impls that want to be notified when a node is scheduled


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26678 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 04:32:49 +00:00
Jeff Cohen
9630d271c5 Fix VC++ build breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26676 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 03:57:45 +00:00
Chris Lattner
59bcce5ae5 remove dbg_declare, it's not used yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 20:02:42 +00:00
Chris Lattner
2695de410d back out my previous hack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 17:48:46 +00:00
Chris Lattner
8c84f3f0df remove temporary option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26646 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 17:31:22 +00:00
Chris Lattner
8bf586f305 temporary hack to get the build working again, apparently a header
commit was forgotten


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26642 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 17:11:08 +00:00
Jim Laskey
54689c2bee Move bit field endianness to backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26639 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 13:28:47 +00:00
Chris Lattner
571340633f yes yes, enabled debug output is bad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26637 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 07:39:25 +00:00
Chris Lattner
6a4b70bbcf switch the t-d scheduler to use a really dumb and trivial critical path
latency priority function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 07:38:27 +00:00
Chris Lattner
477ef6d8cb Pull latency information for target instructions out of the latency tables. :)
Only enable this with -use-sched-latencies, I'll enable it by default with a
clean nightly tester run tonight.

PPC is the only target that provides latency info currently.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26634 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 07:15:18 +00:00
Chris Lattner
e70f671b97 don't copy all itinerary data
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26633 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 07:13:00 +00:00
Chris Lattner
0324ba8f02 PriorityQueue is an instance var, use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26632 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 06:48:37 +00:00
Chris Lattner
e87c5c8088 add some comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26631 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 06:37:29 +00:00
Chris Lattner
e32178dd32 Refactor the priority mechanism one step further: now that it is a separate
class, sever its implementation from the interface.  Now we can provide new
implementations of the same interface (priority computation) without touching
the scheduler itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26630 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 06:35:14 +00:00
Jim Laskey
21b6c9d647 Get rid of the multiple copies of getStringValue. Now a Constant:: method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26616 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 18:11:07 +00:00
Chris Lattner
49eee4a26f Split the priority function computation and priority queue management out
of the ScheduleDAGList class into a new SchedulingPriorityQueue class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26613 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 05:18:27 +00:00
Chris Lattner
c45a59bb32 switch from an explicitly managed list of SUnits to a simple vector of sunits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26612 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 04:54:34 +00:00
Chris Lattner
6a67b3a4e6 Shrinkify some fields, fit to 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26611 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 04:41:06 +00:00
Chris Lattner
6b24af87e6 revert the previous patch, didn't mean to check it in yet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26610 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 04:39:05 +00:00
Chris Lattner
5874f82564 remove "Slot", it is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26609 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 04:37:58 +00:00
Chris Lattner
b0d21ef20c Change the interface for getting a target HazardRecognizer to be more clean.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26608 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 04:25:59 +00:00
Jim Laskey
2b0e309640 libstdc++-v3 was failing to build. Needed to handle composite types with empty
members (running into a zero initializer.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26607 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 02:07:02 +00:00
Jim Laskey
7809811e4e Use "llvm.metadata" section for debug globals. Filter out these globals in the
asm printer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26599 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 22:00:35 +00:00
Jim Laskey
e8c3e3b51c Switch to using a numeric id for anchors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26598 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 20:53:47 +00:00
Jim Laskey
20c3ed8166 Bitfield support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26593 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 15:51:33 +00:00
Chris Lattner
b2d635803d Fix some formatting, when looking for hazards, prefer target nodes over
things like copyfromreg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26586 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 05:40:43 +00:00
Chris Lattner
6af7ef8da8 update file comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26573 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-06 17:58:04 +00:00
Evan Cheng
adc5e5c85f Remove some code that doesn't make sense
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26572 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-06 07:31:44 +00:00
Evan Cheng
6b36ce9202 Remove SUnit::Priority1: it is re-calculated on demand as number of live
range to be generated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26570 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-06 06:08:54 +00:00
Chris Lattner
03fc53c174 Hoist the HazardRecognizer out of the ScheduleDAGList.cpp file to where
targets can implement them.  Make the top-down scheduler non-g5-specific.

Remove the old testing hazard recognizer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26569 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-06 00:22:00 +00:00
Chris Lattner
67727308fa Comment fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26567 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:59:20 +00:00
Chris Lattner
3c232c83be Don't depend on the C99 copysign function, implement it ourselves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26566 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:57:58 +00:00
Chris Lattner
a93dfcd40a When a hazard recognizer needs noops to be inserted, do so. This represents
noops as null pointers in the instruction sequence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26564 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:51:47 +00:00
Chris Lattner
6cc3f0a774 Implement G5HazardRecognizer as a trivial thing that wants 5 cycles between
copyfromreg nodes.  Clearly useful!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26559 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:13:56 +00:00
Chris Lattner
ad0f78ace2 Add basic hazard recognizer support. noop insertion isn't complete yet though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26558 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 22:45:01 +00:00
Jeff Cohen
3d68e15c20 Fix VC++ compilation error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26554 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 21:43:37 +00:00
Chris Lattner
a5de484bc7 Split the list scheduler into top-down and bottom-up pieces. The priority
function of the top-down scheduler are completely bogus currently, and
having (future) PPC specific in this file is also wrong, but this is a
small incremental step.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26552 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 21:10:33 +00:00
Chris Lattner
41f5ea0665 Move the available queue to being inside the ListSchedule method, since it
bounds its lifetime.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26550 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 20:21:55 +00:00
Chris Lattner
cac7059d0f Reinstate this now that the offending opposite xform has been removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26548 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 19:53:55 +00:00
Chris Lattner
c1d9f1de41 Do not fold (add (shl x, c1), (shl c2, c1)) -> (shl (add x, c2), c1),
we want to canonicalize the other way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26547 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 19:52:57 +00:00
Chris Lattner
5267651057 print arbitrary constant pool entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26545 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 09:38:03 +00:00
Evan Cheng
9176b0169c Back out fold (shl (add x, c1), c2) -> (add (shl x, c2), c1<<c2) for now.
It's causing an infinite loop compiling ldecod on x86 / Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26544 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 07:30:16 +00:00
Chris Lattner
12d830346b Add some simple copysign folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26543 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 05:30:57 +00:00
Chris Lattner
a09f848c11 Codegen copysign[f] into a FCOPYSIGN node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26542 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 05:09:38 +00:00
Chris Lattner
a1deca3cd6 fold (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2)
fold (shl (add x, c1), c2) -> (add (shl x, c2), c1<<c2)

This allows us to compile CodeGen/PowerPC/addi-reassoc.ll into:

_test1:
        slwi r2, r4, 4
        add r2, r2, r3
        lwz r3, 36(r2)
        blr
_test2:
        mulli r2, r4, 5
        add r2, r2, r3
        lbz r2, 11(r2)
        extsb r3, r2
        blr

instead of:

_test1:
        addi r2, r4, 2
        slwi r2, r2, 4
        add r2, r3, r2
        lwz r3, 4(r2)
        blr
_test2:
        addi r2, r4, 2
        mulli r2, r2, 5
        add r2, r3, r2
        lbz r2, 1(r2)
        extsb r3, r2
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26535 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 23:33:26 +00:00
Jim Laskey
b80af6f572 Added support for dwarf block data entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26509 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 21:00:14 +00:00
Jim Laskey
f01e547700 Adding basic structure support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26505 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 15:06:57 +00:00
Evan Cheng
3e1ce5a44d Add more vector NodeTypes: VSDIV, VUDIV, VAND, VOR, and VXOR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26504 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 07:01:07 +00:00
Evan Cheng
33143dce15 Number of NodeTypes now exceeds 128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26503 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 06:58:59 +00:00
Evan Cheng
bfa284f697 SDOperand::isOperand should not be a forwarding. It must check *this against N's operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26502 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 06:42:32 +00:00
Evan Cheng
80d8eaae05 Added isOperand(N): true if this is an operand of N
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26501 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 06:24:54 +00:00