Chris Lattner
0e3d81d8ff
Promote shifts by a constant to multiplies so that we can reassociate
...
(x<<1)+(y<<1) -> (X+Y)<<1. This implements
Transforms/Reassociate/shift-factor.ll
llvm-svn: 26753
2006-03-14 06:55:18 +00:00
Reid Spencer
728a2e9f62
Convert llvm.cs.uiuc.edu -> llvm.org
...
llvm-svn: 26748
2006-03-14 05:54:52 +00:00
Jim Laskey
11f7fe9fe5
1. Handle removal of all arguments for a morphed intrinsic.
...
2. Remove the declaration of llvm.dbg.declare.
llvm-svn: 26745
2006-03-14 02:00:35 +00:00
Evan Cheng
ae7469b2c5
PPC LSR pass should use target lowering hooks.
...
llvm-svn: 26743
2006-03-13 23:56:51 +00:00
Evan Cheng
7ec94f2ff7
Added getTargetLowering() to TargetMachine. Refactored targets to support this.
...
llvm-svn: 26742
2006-03-13 23:20:37 +00:00
Evan Cheng
99e87e9147
Update
...
llvm-svn: 26741
2006-03-13 23:19:10 +00:00
Evan Cheng
ed013bd937
Add LSR hooks.
...
llvm-svn: 26740
2006-03-13 23:18:16 +00:00
Evan Cheng
692235499c
Added target lowering hooks which LSR consults to make more intelligent
...
transformation decisions.
llvm-svn: 26738
2006-03-13 23:14:23 +00:00
Chris Lattner
d5ecfd83f1
Handle builtins that directly correspond to GCC builtins.
...
llvm-svn: 26737
2006-03-13 23:09:05 +00:00
Chris Lattner
d0505331d2
For functions that use vector registers, save VRSAVE, mark used
...
registers, and update it on entry to each function, then restore it on exit.
This compiles:
void func(vfloat *a, vfloat *b, vfloat *c) {
*a = *b * *c + *c;
}
to this:
_func:
mfspr r2, 256
oris r6, r2, 49152
mtspr 256, r6
lvx v0, 0, r5
lvx v1, 0, r4
vmaddfp v0, v1, v0, v0
stvx v0, 0, r3
mtspr 256, r2
blr
GCC produces this (which has additional stack accesses):
_func:
mfspr r0,256
stw r0,-4(r1)
oris r0,r0,0xc000
mtspr 256,r0
lvx v0,0,r5
lvx v1,0,r4
lwz r12,-4(r1)
vmaddfp v0,v0,v1,v0
stvx v0,0,r3
mtspr 256,r12
blr
llvm-svn: 26733
2006-03-13 21:52:10 +00:00
Chris Lattner
3b4ceba4ff
make sure dead token factor nodes are removed by the dag combiner.
...
llvm-svn: 26731
2006-03-13 18:37:30 +00:00
Reid Spencer
ba5d13fd59
Bring makefile back into compliance with standard by using
...
$(Echo) instead of @echo
llvm-svn: 26730
2006-03-13 17:57:31 +00:00
Jim Laskey
c741139c24
Handle the removal of the debug chain.
...
llvm-svn: 26729
2006-03-13 13:07:37 +00:00
Chris Lattner
ea1453c3dc
remove two implemented items
...
llvm-svn: 26728
2006-03-13 06:52:22 +00:00
Chris Lattner
3a3c8682b5
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.
llvm-svn: 26727
2006-03-13 06:51:27 +00:00
Chris Lattner
1782f3971d
I can't convince myself that this is safe, remove the recursive call.
...
llvm-svn: 26725
2006-03-13 06:42:16 +00:00
Chris Lattner
9d0ebb55a6
add a couple of missing folds
...
llvm-svn: 26724
2006-03-13 06:26:26 +00:00
Chris Lattner
3cb122bfa8
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.
llvm-svn: 26723
2006-03-13 06:08:38 +00:00
Chris Lattner
3aff8e6acf
Fix a couple of bugs that broke the alpha tester build
...
llvm-svn: 26722
2006-03-13 05:23:59 +00:00
Chris Lattner
9898674f99
Handle cracked instructions in dispatch group formation.
...
llvm-svn: 26721
2006-03-13 05:20:04 +00:00
Chris Lattner
ba10d4e4ab
Mark instructions that are cracked by the PPC970 decoder as such.
...
llvm-svn: 26720
2006-03-13 05:15:10 +00:00
Chris Lattner
a278639f29
Several big changes:
...
1. Use flags on the instructions in the .td file to indicate the PPC970 unit
type instead of a table in the .cpp file. Much cleaner.
2. Change the hazard recognizer to build d-groups according to the actual
algorithm used, not my flawed understanding of it.
3. Model "must be in the first slot" and "must be the only instr in a group"
accurately.
llvm-svn: 26719
2006-03-12 09:13:49 +00:00
Chris Lattner
a54a9d83c3
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.
llvm-svn: 26718
2006-03-12 09:01:41 +00:00
Chris Lattner
aea53fc36f
Chain operands aren't real uses: they don't require the full latency of the
...
predecessor to finish before they can start.
llvm-svn: 26717
2006-03-12 03:52:09 +00:00
Chris Lattner
7396b82585
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
llvm-svn: 26716
2006-03-12 00:38:57 +00:00
Chris Lattner
62eafde9c1
rename priorityqueue -> availablequeue. When a node is scheduled, remember
...
which cycle it lands on.
llvm-svn: 26714
2006-03-11 22:44:37 +00:00
Chris Lattner
04ada12cb7
Make CurrCycle a local var instead of an instance var
...
llvm-svn: 26713
2006-03-11 22:34:41 +00:00
Chris Lattner
6a9861953b
Move some methods around so that BU specific code is together, TD specific code
...
is together, and direction independent code is together.
llvm-svn: 26712
2006-03-11 22:28:35 +00:00
Chris Lattner
40c02c01a5
merge preds/chainpreds -> preds set
...
merge succs/chainsuccs -> succs set
This has no functionality change, simplifies the code, and reduces the size
of sunits.
llvm-svn: 26711
2006-03-11 22:24:20 +00:00
Chris Lattner
19b93158c1
blr is a branch too
...
llvm-svn: 26710
2006-03-11 21:49:49 +00:00
Chris Lattner
916761949b
add an example
...
llvm-svn: 26709
2006-03-11 20:20:40 +00:00
Chris Lattner
115b1be710
add a note
...
llvm-svn: 26708
2006-03-11 20:17:08 +00:00
Nate Begeman
7c2afcfc02
Fix PR681 by using the standard Lengauer and Tarjan algorithm for dominator
...
set construction, rather than intersecting various std::sets. This reduces
the memory usage for the testcase in PR681 from 496 to 26MB of ram on my
darwin system, and reduces the runtime from 32.8 to 0.8 seconds on a
2.5GHz G5. This also enables future code sharing between Dom and PostDom
now that they share near-identical implementations.
llvm-svn: 26707
2006-03-11 02:20:46 +00:00
Evan Cheng
02418117e1
Doh!
...
llvm-svn: 26705
2006-03-11 00:13:10 +00:00
Evan Cheng
57c206232d
Added a parameter to control whether Constant::getStringValue() would chop
...
off the result string at the first null terminator.
llvm-svn: 26704
2006-03-10 23:52:03 +00:00
Chris Lattner
f176c9ecac
remove some dead code
...
llvm-svn: 26703
2006-03-10 23:14:22 +00:00
Chris Lattner
02e6c29ad2
scrape out bits of llvm-db
...
llvm-svn: 26701
2006-03-10 22:48:19 +00:00
Chris Lattner
ec8860221c
Remove UnixLocalInferiorProcess: debugging via the JIT isn't a good idea.
...
Perhaps llvm-db will turn into a read debugger someday.
llvm-svn: 26700
2006-03-10 22:39:48 +00:00
Chris Lattner
2370965e55
teach the JIT to encode vector registers
...
llvm-svn: 26697
2006-03-10 20:19:50 +00:00
Chris Lattner
0a64d261e0
Move simple-selector-specific types to the simple selector.
...
llvm-svn: 26693
2006-03-10 07:51:18 +00:00
Chris Lattner
2024573f47
Simplify the interface to the schedulers, to not pass the selected heuristicin.
...
llvm-svn: 26692
2006-03-10 07:49:12 +00:00
Chris Lattner
da5f77e3cf
Move some simple-sched-specific instance vars to the simple scheduler.
...
llvm-svn: 26690
2006-03-10 07:42:02 +00:00
Chris Lattner
ec2c5aa0bb
prune #includes
...
llvm-svn: 26689
2006-03-10 07:37:35 +00:00
Chris Lattner
808cc02983
move some simple scheduler methods into the simple scheduler
...
llvm-svn: 26688
2006-03-10 07:35:21 +00:00
Chris Lattner
89a5a946f5
Make EmitNode take a SDNode instead of a NodeInfo*
...
llvm-svn: 26687
2006-03-10 07:28:36 +00:00
Chris Lattner
3f870d581e
Move the VRBase field from NodeInfo to being a separate, explicit, map.
...
llvm-svn: 26686
2006-03-10 07:25:12 +00:00
Chris Lattner
a316d82d2a
no need to build groups anymore
...
llvm-svn: 26684
2006-03-10 07:15:58 +00:00
Chris Lattner
e23afcfd6d
Create SUnits directly from the SelectionDAG.
...
llvm-svn: 26683
2006-03-10 07:13:32 +00:00
Chris Lattner
ed528a5652
Push PrepareNodeInfo/IdentifyGroups down the inheritance hierarchy
...
llvm-svn: 26682
2006-03-10 06:34:51 +00:00
Chris Lattner
920325db0a
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
llvm-svn: 26680
2006-03-10 05:51:05 +00:00
Chris Lattner
1bb3ae8dae
add an aggregate method for reinserting scheduled nodes, add a callback for
...
priority impls that want to be notified when a node is scheduled
llvm-svn: 26678
2006-03-10 04:32:49 +00:00
Jeff Cohen
5002cf68b4
Fix VC++ build breakage.
...
llvm-svn: 26676
2006-03-10 03:57:45 +00:00
Chris Lattner
a7d7a291d0
use autogenerated side-effect information
...
llvm-svn: 26673
2006-03-09 22:38:10 +00:00
Chris Lattner
f53321422d
Use autogenerated mod/ref info for intrinsics.
...
llvm-svn: 26670
2006-03-09 22:31:29 +00:00
Chris Lattner
e428e4d828
Use the autogenerated intrinsic verifier
...
llvm-svn: 26667
2006-03-09 22:06:04 +00:00
Evan Cheng
471bd00cb5
Add option -enable-x86-lsr to enable x86 loop strength reduction pass.
...
llvm-svn: 26665
2006-03-09 21:51:28 +00:00
Chris Lattner
295e7870b4
Use the function name matcher autogenerated from the .td file.
...
llvm-svn: 26664
2006-03-09 20:35:01 +00:00
Chris Lattner
1768e6c7b3
This rule also depends on tblgen
...
llvm-svn: 26662
2006-03-09 20:29:41 +00:00
Chris Lattner
c08825d684
add a note
...
llvm-svn: 26661
2006-03-09 20:13:21 +00:00
Chris Lattner
dc7268f6a3
remove dbg_declare, it's not used yet.
...
llvm-svn: 26659
2006-03-09 20:02:42 +00:00
Chris Lattner
f7471a3621
silly case insensitive file systems...
...
llvm-svn: 26658
2006-03-09 19:55:06 +00:00
Chris Lattner
617ab88e17
Build intrinsics.gen from intrinsics.td
...
llvm-svn: 26657
2006-03-09 19:53:27 +00:00
Chris Lattner
f133cc059f
autoupgrade memcpy/memmove/memset with signed counts.
...
CVS: ----------------------------------------------------------------------
llvm-svn: 26654
2006-03-09 18:42:10 +00:00
Andrew Lenharth
bbf38867f2
these are copies too
...
llvm-svn: 26653
2006-03-09 18:18:51 +00:00
Chris Lattner
e93eeb189f
remove some now-dead code
...
llvm-svn: 26652
2006-03-09 18:07:49 +00:00
Andrew Lenharth
f124519fc8
fcopysign for mixed mode
...
llvm-svn: 26651
2006-03-09 17:56:33 +00:00
Chris Lattner
d00d6b4f23
back out my previous hack
...
llvm-svn: 26650
2006-03-09 17:48:46 +00:00
Andrew Lenharth
2d36f9d389
relax fcopysign
...
llvm-svn: 26649
2006-03-09 17:47:22 +00:00
Andrew Lenharth
e08d165146
alpha and llvm have different oppinions on which arg is the sign bit
...
llvm-svn: 26647
2006-03-09 17:41:50 +00:00
Chris Lattner
4fe39d8f9e
remove temporary option
...
llvm-svn: 26646
2006-03-09 17:31:22 +00:00
Andrew Lenharth
25de2846c5
Alpha Scheduling classes
...
llvm-svn: 26643
2006-03-09 17:16:45 +00:00
Chris Lattner
f6937476d0
temporary hack to get the build working again, apparently a header
...
commit was forgotten
llvm-svn: 26642
2006-03-09 17:11:08 +00:00
Andrew Lenharth
c180d749a2
fcopysign and get rid of dsnode cruft. custom PA runtimes make this better in some senses
...
llvm-svn: 26641
2006-03-09 14:58:25 +00:00
Andrew Lenharth
78af2795b3
fcopysign support
...
llvm-svn: 26640
2006-03-09 14:57:36 +00:00
Jim Laskey
7fcf238500
Move bit field endianness to backend.
...
llvm-svn: 26639
2006-03-09 13:28:47 +00:00
Chris Lattner
f35a70d050
yes yes, enabled debug output is bad
...
llvm-svn: 26637
2006-03-09 07:39:25 +00:00
Chris Lattner
0020b50bac
switch the t-d scheduler to use a really dumb and trivial critical path
...
latency priority function.
llvm-svn: 26636
2006-03-09 07:38:27 +00:00
Chris Lattner
074a604a1b
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.
llvm-svn: 26634
2006-03-09 07:15:18 +00:00
Chris Lattner
34bfd7da1f
don't copy all itinerary data
...
llvm-svn: 26633
2006-03-09 07:13:00 +00:00
Chris Lattner
b1f716a6d1
PriorityQueue is an instance var, use it.
...
llvm-svn: 26632
2006-03-09 06:48:37 +00:00
Chris Lattner
1d9c1edaa8
add some comments
...
llvm-svn: 26631
2006-03-09 06:37:29 +00:00
Chris Lattner
2dd7bcc95b
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.
llvm-svn: 26630
2006-03-09 06:35:14 +00:00
Chris Lattner
125881e75b
Add support for 'special' llvm globals like debug info and static ctors/dtors.
...
llvm-svn: 26628
2006-03-09 06:14:35 +00:00
Chris Lattner
67a978dc1d
fix a pasto
...
llvm-svn: 26627
2006-03-09 06:09:41 +00:00
Chris Lattner
57acce1443
a couple of miscellaneous things.
...
llvm-svn: 26625
2006-03-09 01:39:46 +00:00
Jim Laskey
84a3db4538
Add #line support for CBE.
...
llvm-svn: 26621
2006-03-08 19:31:15 +00:00
Chris Lattner
0b736a0d1e
Add a helper method for running static ctors/dtors in the module.
...
llvm-svn: 26619
2006-03-08 18:42:46 +00:00
Chris Lattner
b1102a7864
add a new helper method.
...
llvm-svn: 26618
2006-03-08 18:39:13 +00:00
Jim Laskey
a1ad999bba
Get rid of the multiple copies of getStringValue. Now a Constant:: method.
...
llvm-svn: 26616
2006-03-08 18:11:07 +00:00
Duraid Madina
a3c5cd22e1
doo de doo
...
llvm-svn: 26614
2006-03-08 06:18:46 +00:00
Chris Lattner
133ec8c3f0
Split the priority function computation and priority queue management out
...
of the ScheduleDAGList class into a new SchedulingPriorityQueue class.
llvm-svn: 26613
2006-03-08 05:18:27 +00:00
Chris Lattner
46a80382ce
switch from an explicitly managed list of SUnits to a simple vector of sunits
...
llvm-svn: 26612
2006-03-08 04:54:34 +00:00
Chris Lattner
427dbaccca
Shrinkify some fields, fit to 80 columns
...
llvm-svn: 26611
2006-03-08 04:41:06 +00:00
Chris Lattner
c2fede6ffb
revert the previous patch, didn't mean to check it in yet
...
llvm-svn: 26610
2006-03-08 04:39:05 +00:00
Chris Lattner
7965026ed9
remove "Slot", it is dead
...
llvm-svn: 26609
2006-03-08 04:37:58 +00:00
Chris Lattner
3f23d22d3f
Change the interface for getting a target HazardRecognizer to be more clean.
...
llvm-svn: 26608
2006-03-08 04:25:59 +00:00
Jim Laskey
aae3375a2b
libstdc++-v3 was failing to build. Needed to handle composite types with empty
...
members (running into a zero initializer.)
llvm-svn: 26607
2006-03-08 02:07:02 +00:00
Chris Lattner
256eff3ac6
Fix a miscompilation of 188.ammp with the new CFE. 188.ammp is accessing
...
arrays out of range in a horrible way, but we shouldn't break it anyway.
Details in the comments.
llvm-svn: 26606
2006-03-08 01:05:29 +00:00
Chris Lattner
24aa564456
add a note
...
llvm-svn: 26605
2006-03-08 00:25:47 +00:00
Evan Cheng
d73d06f052
X86ISD::REP_STOS and X86ISD::REP_MOVS now produces a flag.
...
llvm-svn: 26604
2006-03-07 23:34:23 +00:00
Evan Cheng
a3e0a7f652
Use rep/stosl; and Count 0x3; rep/stosb for memset with 4 byte aligned dest.
...
and variable value.
Similarly for memcpy.
llvm-svn: 26603
2006-03-07 23:29:39 +00:00
Chris Lattner
4c47b8cd69
Two things:
...
1. Don't emit debug info, or other llvm.metadata to the .cbe.c file.
2. Mark static ctors/dtors as such, so that bugpoint works on C++ code
compiled with the new CFE.
llvm-svn: 26602
2006-03-07 22:58:23 +00:00
Jim Laskey
91d5ce2531
Use "llvm.metadata" section for debug globals. Filter out these globals in the
...
asm printer.
llvm-svn: 26599
2006-03-07 22:00:35 +00:00
Jim Laskey
eec3faecde
Switch to using a numeric id for anchors.
...
llvm-svn: 26598
2006-03-07 20:53:47 +00:00
Chris Lattner
c9039049c0
Fix ConstantMerge/2006-03-07-DontMergeDiffSections.ll, a problem Jim
...
hypotheticalized about, where we would incorrectly merge two globals in
different sections.
llvm-svn: 26597
2006-03-07 17:56:59 +00:00
Chris Lattner
27f87a6955
add another missing store.
...
llvm-svn: 26595
2006-03-07 16:26:48 +00:00
Chris Lattner
dfdeec73bc
add a couple more load/store instrs, add a newline to the end of file.
...
llvm-svn: 26594
2006-03-07 16:19:46 +00:00
Jim Laskey
da7873525e
Bitfield support.
...
llvm-svn: 26593
2006-03-07 15:51:33 +00:00
Nate Begeman
a8bc3c0c3c
This kinda sorta implements "things that have to lead a dispatch group".
...
llvm-svn: 26591
2006-03-07 08:30:27 +00:00
Chris Lattner
842436586c
add some new instructions to the classifier. With this, we correctly insert
...
a nop into Freebench/neural, which speeds it up from 136->129s (~5.4%).
llvm-svn: 26590
2006-03-07 07:14:55 +00:00
Chris Lattner
0cd4bd574c
add some comments that describe what we model
...
llvm-svn: 26588
2006-03-07 06:44:19 +00:00
Chris Lattner
4cd6cd499d
Implement a very very simple hazard recognizer for LSU rejects and ctr set/read
...
flushes
llvm-svn: 26587
2006-03-07 06:32:48 +00:00
Chris Lattner
ced780efee
Fix some formatting, when looking for hazards, prefer target nodes over
...
things like copyfromreg.
llvm-svn: 26586
2006-03-07 05:40:43 +00:00
Chris Lattner
ae34bbf56b
add a note
...
llvm-svn: 26585
2006-03-07 04:42:59 +00:00
Chris Lattner
174768dde0
add a note
...
llvm-svn: 26583
2006-03-07 02:46:26 +00:00
Evan Cheng
03940bfcfe
- Emit subsections_via_symbols for Darwin.
...
- Conditionalize Dwarf debugging output (Darwin only for now).
llvm-svn: 26582
2006-03-07 02:23:26 +00:00
Evan Cheng
2327759419
Enable Dwarf debugging info.
...
llvm-svn: 26581
2006-03-07 02:02:57 +00:00
Chris Lattner
8a548b3e7d
Teach the alignment handling code to look through constant expr casts and GEPs
...
llvm-svn: 26580
2006-03-07 01:28:57 +00:00
Chris Lattner
58fe521b5b
Teach instcombine to increase the alignment of memset/memcpy/memmove when
...
the pointer is known to come from either a global variable, alloca or
malloc. This allows us to compile this:
P = malloc(28);
memset(P, 0, 28);
into explicit stores on PPC instead of a memset call.
llvm-svn: 26577
2006-03-06 20:18:44 +00:00
Chris Lattner
86375c060a
update file comment
...
llvm-svn: 26573
2006-03-06 17:58:04 +00:00
Evan Cheng
2fad0ea044
Remove some code that doesn't make sense
...
llvm-svn: 26572
2006-03-06 07:31:44 +00:00
Evan Cheng
8fd9503fbd
Remove SUnit::Priority1: it is re-calculated on demand as number of live
...
range to be generated.
llvm-svn: 26570
2006-03-06 06:08:54 +00:00
Chris Lattner
c6d1fbab70
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.
llvm-svn: 26569
2006-03-06 00:22:00 +00:00
Chris Lattner
ca7ed30ee6
Comment fixes
...
llvm-svn: 26567
2006-03-05 23:59:20 +00:00
Chris Lattner
101ce8f304
Don't depend on the C99 copysign function, implement it ourselves.
...
llvm-svn: 26566
2006-03-05 23:57:58 +00:00
Chris Lattner
5c28fdcae8
When a hazard recognizer needs noops to be inserted, do so. This represents
...
noops as null pointers in the instruction sequence.
llvm-svn: 26564
2006-03-05 23:51:47 +00:00
Chris Lattner
af44ead7f3
implement TII::insertNoop
...
llvm-svn: 26562
2006-03-05 23:49:55 +00:00
Chris Lattner
0ee7522721
Implement G5HazardRecognizer as a trivial thing that wants 5 cycles between
...
copyfromreg nodes. Clearly useful!
llvm-svn: 26559
2006-03-05 23:13:56 +00:00
Chris Lattner
ccda7ffffd
Add basic hazard recognizer support. noop insertion isn't complete yet though.
...
llvm-svn: 26558
2006-03-05 22:45:01 +00:00
Jeff Cohen
578bf37e22
Fix VC++ compilation error.
...
llvm-svn: 26554
2006-03-05 21:43:37 +00:00
Chris Lattner
ef4bef419b
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.
llvm-svn: 26552
2006-03-05 21:10:33 +00:00
Chris Lattner
49ccda9563
Move the available queue to being inside the ListSchedule method, since it
...
bounds its lifetime.
llvm-svn: 26550
2006-03-05 20:21:55 +00:00
Chris Lattner
4957693551
add a note
...
llvm-svn: 26549
2006-03-05 20:00:08 +00:00
Chris Lattner
f2bed5f46e
Reinstate this now that the offending opposite xform has been removed.
...
llvm-svn: 26548
2006-03-05 19:53:55 +00:00
Chris Lattner
f8cbc8c4ea
Do not fold (add (shl x, c1), (shl c2, c1)) -> (shl (add x, c2), c1),
...
we want to canonicalize the other way.
llvm-svn: 26547
2006-03-05 19:52:57 +00:00
Chris Lattner
93ad7177b4
print arbitrary constant pool entries
...
llvm-svn: 26545
2006-03-05 09:38:03 +00:00
Evan Cheng
e0a6cf78f8
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.
llvm-svn: 26544
2006-03-05 07:30:16 +00:00
Chris Lattner
827e3f62b0
Add some simple copysign folds
...
llvm-svn: 26543
2006-03-05 05:30:57 +00:00
Chris Lattner
4b4b3e6cbb
Codegen copysign[f] into a FCOPYSIGN node
...
llvm-svn: 26542
2006-03-05 05:09:38 +00:00
Chris Lattner
6b0947c277
Copysign needs to be expanded everywhere. Note that Alpha and IA64 should
...
implement copysign as a native op if they have it.
llvm-svn: 26541
2006-03-05 05:08:37 +00:00
Chris Lattner
55fbd49ca9
add a note for something evan noticed
...
llvm-svn: 26539
2006-03-05 01:15:18 +00:00
Chris Lattner
43e9ec760b
Make vector narrowing more effective, implementing
...
Transforms/InstCombine/vec_narrow.ll. This add support for narrowing
extract_element(insertelement) also.
llvm-svn: 26538
2006-03-05 00:22:33 +00:00
Chris Lattner
7d2423c91f
Implemented.
...
llvm-svn: 26536
2006-03-04 23:33:44 +00:00
Chris Lattner
cd57ff4fb6
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
llvm-svn: 26535
2006-03-04 23:33:26 +00:00
Chris Lattner
805838e63e
Fix a crash compiling Obsequi
...
llvm-svn: 26529
2006-03-04 21:48:01 +00:00
Chris Lattner
7694fbc4bb
Add factoring of multiplications, e.g. turning A*A+A*B into A*(A+B).
...
Testcase here: Transforms/Reassociate/mulfactor.ll
llvm-svn: 26524
2006-03-04 09:31:13 +00:00
Chris Lattner
35dbbc5676
Add a note
...
llvm-svn: 26523
2006-03-04 08:44:51 +00:00
Chris Lattner
9cc0d5a2d7
Regenerate
...
llvm-svn: 26522
2006-03-04 07:53:41 +00:00
Chris Lattner
b780a1ecdc
Don't use invalidated iterators!
...
llvm-svn: 26521
2006-03-04 07:53:16 +00:00
Evan Cheng
65b5c2c680
Add an entry
...
llvm-svn: 26520
2006-03-04 07:49:50 +00:00