Chris Lattner [Tue, 18 Oct 2005 16:51:22 +0000 (16:51 +0000)]
Fix the JIT encoding of LWA, LD, STD, and STDU.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23787
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Tue, 18 Oct 2005 16:23:40 +0000 (16:23 +0000)]
Checking in first round of scheduling tablegen files. Not tied in as yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23786
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Oct 2005 06:30:51 +0000 (06:30 +0000)]
add a case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23785
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Oct 2005 06:29:43 +0000 (06:29 +0000)]
Fix PR637
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23784
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Oct 2005 06:29:22 +0000 (06:29 +0000)]
Add an option to this pass. If it is set, we are allowed to internalize
all but main. If it's not set, we can still internalize, but only if an
explicit symbol list is provided.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23783
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Oct 2005 06:28:16 +0000 (06:28 +0000)]
add an option to the internalize pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23782
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Oct 2005 06:04:22 +0000 (06:04 +0000)]
Fold (select C, load A, load B) -> load (select C, A, B). This happens quite
a lot throughout many programs. In particular, specfp triggers it a bunch for
constant FP nodes when you have code like cond ? 1.0 : -1.0.
If the PPC ISel exposed the loads implicit in pic references to external globals,
we would be able to eliminate a load in cases like this as well:
%X = external global int
%Y = external global int
int* %test4(bool %C) {
%G = select bool %C, int* %X, int* %Y
ret int* %G
}
Note that this breaks things that use SrcValue's (see the fixme), but since nothing
uses them yet, this is ok.
Also, simplify some code to use hasOneUse() on an SDOperand instead of hasNUsesOfValue directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23781
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Oct 2005 04:41:01 +0000 (04:41 +0000)]
Duraid pointed out that it is impolite to emit PPC:: into the IA64 backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23780
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 18 Oct 2005 00:56:42 +0000 (00:56 +0000)]
Do the right thing and enable 64 bit regs under the control of a subtarget
option. Currently the only way to enable this is to specify the
64bitregs mattr flag. It is never enabled by default on any config yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23779
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 18 Oct 2005 00:28:58 +0000 (00:28 +0000)]
First bits of 64 bit PowerPC stuff, currently disabled. A lot of this is
purely mechanical.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23778
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 18 Oct 2005 00:28:13 +0000 (00:28 +0000)]
Implement some feedback from Chris re: constant canonicalization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23777
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 18 Oct 2005 00:27:41 +0000 (00:27 +0000)]
Legalize BUILD_PAIR appropriately for upcoming 64 bit PowerPC work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23776
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 17 Oct 2005 21:54:18 +0000 (21:54 +0000)]
Use %s instead of hard coding the input filename.
This allows the test to work when srcdir != objdir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23775
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 17 Oct 2005 20:40:11 +0000 (20:40 +0000)]
fold fmul X, +2.0 -> fadd X, X;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23774
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 17 Oct 2005 20:18:38 +0000 (20:18 +0000)]
Make this work for FP constantexprs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23773
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 17 Oct 2005 17:56:38 +0000 (17:56 +0000)]
Oops, X+0.0 isn't foldable, but X+-0.0 is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23772
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 17 Oct 2005 17:49:32 +0000 (17:49 +0000)]
relax this a bit, as we only support the default rounding mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23771
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 17 Oct 2005 15:19:24 +0000 (15:19 +0000)]
Apparently, people object to floating pointers. Picky picky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23770
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Mon, 17 Oct 2005 12:19:10 +0000 (12:19 +0000)]
As requested, a blurb on sub-targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23769
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 17 Oct 2005 04:18:41 +0000 (04:18 +0000)]
fix some grammar-o's I noticed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23768
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 17 Oct 2005 03:09:31 +0000 (03:09 +0000)]
Feedback from Nate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23767
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 17 Oct 2005 01:40:33 +0000 (01:40 +0000)]
Document -view-isel-dags and -view-sched-dags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23766
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 17 Oct 2005 01:36:23 +0000 (01:36 +0000)]
Add notes about MF.viewCFG() and friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23765
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 17 Oct 2005 01:07:11 +0000 (01:07 +0000)]
add a trivial fold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23764
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 16 Oct 2005 20:02:19 +0000 (20:02 +0000)]
Add a bunch of info about the isel autogenerator. Review appreciated!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23763
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 16 Oct 2005 18:31:08 +0000 (18:31 +0000)]
Fill this out some more. Add description of MBB/MF. Fix some broken links,
turn some broken <a name> into <a href>'s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23762
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 16 Oct 2005 17:06:07 +0000 (17:06 +0000)]
Add a stub for the TargetSubtarget class. Jim, please fill a blurb in here
when you get a chance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23761
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 16 Oct 2005 17:03:22 +0000 (17:03 +0000)]
Update this significantly, mention subtarget and isel generation support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23760
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 16 Oct 2005 05:39:50 +0000 (05:39 +0000)]
More PPC32 -> PPC changes, as well as merging some classes that were
redundant after the change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23759
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 16 Oct 2005 01:41:58 +0000 (01:41 +0000)]
Make the generated code significantly more memory efficient, by using
SelectNodeTo instead of getTargetNode when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23758
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 16 Oct 2005 00:36:38 +0000 (00:36 +0000)]
update this a little bit to talk about the dag combiner and remove inaccuracies.
This still doesn't talk about autogen much
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23757
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 15 Oct 2005 22:35:40 +0000 (22:35 +0000)]
Fix this logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23756
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 15 Oct 2005 22:18:08 +0000 (22:18 +0000)]
Add a case we were missing that was causing us to fail CodeGen/PowerPC/rlwinm.ll:test3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23755
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sat, 15 Oct 2005 22:08:02 +0000 (22:08 +0000)]
Remove some dead code now that the dag combiner exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23754
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 15 Oct 2005 22:06:18 +0000 (22:06 +0000)]
Remove some dead code: the ORI/ORIS cases are autogen'd. This makes
SelectIntImmediateExpr dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23753
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 15 Oct 2005 21:58:54 +0000 (21:58 +0000)]
prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23752
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 15 Oct 2005 21:44:56 +0000 (21:44 +0000)]
These instructions are now autogenerated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23751
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 15 Oct 2005 21:44:15 +0000 (21:44 +0000)]
Add a pattern for FSQRTS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23750
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 15 Oct 2005 21:40:12 +0000 (21:40 +0000)]
remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23749
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 15 Oct 2005 21:34:21 +0000 (21:34 +0000)]
Implement the last major missing piece in the DAG isel generator: when emitting
a pattern match, make sure to emit the (minimal number of) type checks that
verify the pattern matches this specific instruction. This allows FMA32
patterns to not match double expressions for example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23748
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 15 Oct 2005 20:24:07 +0000 (20:24 +0000)]
Use getExtLoad here instead of getNode, as extloads produce two values. This
fixes a legalize failure on SPASS for itanium.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23747
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 15 Oct 2005 19:04:48 +0000 (19:04 +0000)]
remove broken SRA/rlwimi case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23746
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 23:59:06 +0000 (23:59 +0000)]
Rename PPC32*.h to PPC*.h
This completes the grand PPC file renaming
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23745
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 23:53:41 +0000 (23:53 +0000)]
Merge PPCJITInfo.h and PPC32JITInfo.h. Note that the PowerPCJITInfo
and PPC32JITInfo classes should be merged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23744
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 23:51:18 +0000 (23:51 +0000)]
Rename PowerPC*.h to PPC*.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23743
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 23:45:43 +0000 (23:45 +0000)]
Rename PowerPCInstrBuilder.h -> PPC*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23742
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 23:44:05 +0000 (23:44 +0000)]
Nuke the PowerPCTargetMachine.h header. Note that the PowerPCTargetMachine
still should be merged into the PPC32TargetMachine class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23741
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 23:40:39 +0000 (23:40 +0000)]
Rename PowerPC*.td -> PPC*.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23740
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 23:38:51 +0000 (23:38 +0000)]
These are dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23739
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 23:37:35 +0000 (23:37 +0000)]
Eliminate PowerPC.td and PPC32.td, consolidating them into PPC.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23738
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 22:48:24 +0000 (22:48 +0000)]
Like the comment says...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23737
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 22:44:13 +0000 (22:44 +0000)]
Nuke PowerPCInstrFormats.h, its contents are dead. Remove the definitions
from the .td file that correspond to it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23736
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 14 Oct 2005 22:06:00 +0000 (22:06 +0000)]
Properly split f32 and f64 into separate register classes for scalar sse fp
fixing a bunch of nasty hackery
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23735
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 14 Oct 2005 18:58:46 +0000 (18:58 +0000)]
Remove an unnecsesary file. PPC32 and PPC64 share architected registers.
We will decide with subtarget support whether we ever use an i64 register
class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23734
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 06:40:20 +0000 (06:40 +0000)]
add the integer truncate/extension operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23733
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 06:31:58 +0000 (06:31 +0000)]
Make sure targets depend on TargetSelectionDAG.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23732
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 06:26:29 +0000 (06:26 +0000)]
These are now autogenerated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23731
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 06:25:00 +0000 (06:25 +0000)]
Now that we have int/fp lattice values, implement the SDTCisOpSmallerThanOp
type constraint. This lets tblgen realize that it doesn't need any dynamic
type checks for fextend/fround on PPC (and many other targets), because there
are only two fp types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23730
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 06:12:03 +0000 (06:12 +0000)]
Fairly serious rework of the typing code to add new int/fp lattice values.
Overall, no functionality change yet though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23729
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 05:08:37 +0000 (05:08 +0000)]
simplify the code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23728
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 04:55:50 +0000 (04:55 +0000)]
Add patterns for FP round/extend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23727
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 04:55:10 +0000 (04:55 +0000)]
add a new SDTCisOpSmallerThanOp type constraint, and implement fround/fextend in terms of it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23726
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 04:53:53 +0000 (04:53 +0000)]
Add basic support for recognizing a new SDTCisOpSmallerThanOp type constraint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23725
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 04:11:13 +0000 (04:11 +0000)]
Implement a couple of new (important) features.
1. If an operation has to be int or fp and the target only supports one
int or fp type, relize that the op has to have that type.
2. If a target has operations on multiple types, do not emit matching code
for patterns involving those operators, since we do not emit the code to
check for them yet. This prevents PPC from generating FP ops currently.
Also move some code around into more logical places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23724
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 03:54:49 +0000 (03:54 +0000)]
Do not let getLegalValueTypes return a list with duplicates in it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23723
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 14 Oct 2005 01:29:07 +0000 (01:29 +0000)]
fold sext_in_reg, sext_in_reg where both have the same VT. This was
popping up in Fourinarow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23722
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 01:28:34 +0000 (01:28 +0000)]
Allow $
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23721
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 14 Oct 2005 01:12:21 +0000 (01:12 +0000)]
Relax the checking on zextload generation a bit, since as sabre pointed out
you could be AND'ing with the result of a shift that shifts out all the
bits you care about, in addition to a constant.
Also, move over an add/sub_parts fold from legalize to the dag combiner,
where it works for things other than constants. Woot!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23720
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Oct 2005 00:33:05 +0000 (00:33 +0000)]
Fix errors when compiling with -pedantic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23719
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 Oct 2005 22:10:05 +0000 (22:10 +0000)]
Fix the trunc(load) case, finally allowing crafty and povray to pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23718
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 Oct 2005 21:52:31 +0000 (21:52 +0000)]
Fix some bugs in (sext (load x))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23717
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 Oct 2005 21:44:47 +0000 (21:44 +0000)]
When ExpandOp'ing a [SZ]EXTLOAD, make sure to remember that the chain
is also legal. Add support for ExpandOp'ing raw EXTLOADs too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23716
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 Oct 2005 20:07:41 +0000 (20:07 +0000)]
Implement PromoteOp for *EXTLOAD, allowing MallocBench/gs to Legalize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23715
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 13 Oct 2005 18:34:58 +0000 (18:34 +0000)]
Fix the remaining DAGCombiner issues pointed out by sabre. This should fix
the remainder of the failures introduced by my patch last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23714
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 Oct 2005 18:16:34 +0000 (18:16 +0000)]
Fix a minor bug in the dag combiner that broke pcompress2 and some other
tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23713
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrick Meredith [Thu, 13 Oct 2005 17:31:30 +0000 (17:31 +0000)]
Updated to be less restrictive on what is matched
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23712
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 13 Oct 2005 17:15:37 +0000 (17:15 +0000)]
Add support to Legalize for expanding i64 sextload/zextload into hi and lo
parts. This should fix the crafty and signed long long unit test failure
on x86 last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23711
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 13 Oct 2005 16:44:00 +0000 (16:44 +0000)]
Inhibit instructions from being pushed before function calls. This will
minimize unnecessary spilling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23710
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 Oct 2005 16:34:24 +0000 (16:34 +0000)]
apparently one of the makefile changes changed libprofile.so to profile.so
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23709
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrick Meredith [Thu, 13 Oct 2005 16:26:50 +0000 (16:26 +0000)]
This script is used to remove nodes with the label %tmp(.#)* and all
edges associated with said node from the dot files produced by
DSA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23708
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 Oct 2005 06:04:34 +0000 (06:04 +0000)]
Nate implemented this :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23707
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 13 Oct 2005 03:11:28 +0000 (03:11 +0000)]
Move some Legalize functionality over to the DAGCombiner where it belongs.
Kill some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23706
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 13 Oct 2005 03:10:46 +0000 (03:10 +0000)]
SimplifySelectCC is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23705
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 12 Oct 2005 23:18:53 +0000 (23:18 +0000)]
Fix a potential bug with two combine-to's back to back that chris pointed
out, where after the first CombineTo() call, the node the second CombineTo
wishes to replace may no longer exist.
Fix a very real bug with the truncated load optimization on little endian
targets, which do not need a byte offset added to the load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23704
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 12 Oct 2005 20:40:40 +0000 (20:40 +0000)]
More cool stuff for the dag combiner. We can now finally handle things
like turning:
_foo:
fctiwz f0, f1
stfd f0, -8(r1)
lwz r2, -4(r1)
rlwinm r3, r2, 0, 16, 31
blr
into
_foo:
fctiwz f0,f1
stfd f0,-8(r1)
lhz r3,-2(r1)
blr
Also removed an unncessary constraint from sra -> srl conversion, which
should take care of hte only reason we would ever need to handle sra in
MaskedValueIsZero, AFAIK.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23703
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Wed, 12 Oct 2005 18:29:35 +0000 (18:29 +0000)]
Finally committing to the new scheduler. Still -sched=none by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23702
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Wed, 12 Oct 2005 12:09:05 +0000 (12:09 +0000)]
Added graphviz/gv support for MF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23700
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Oct 2005 18:42:26 +0000 (18:42 +0000)]
this passes with the change in predicate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23699
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Oct 2005 18:41:04 +0000 (18:41 +0000)]
Fix (hopefully the last) issue where LSR is nondeterminstic. When pulling
out CSE's of base expressions it could build a result whose order was
nondet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23698
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Oct 2005 18:30:57 +0000 (18:30 +0000)]
Fix another problem where LSR was being nondeterminstic. Also remove elements
from the end of a vector instead of the beginning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23697
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Oct 2005 18:28:48 +0000 (18:28 +0000)]
lsr doesn't emit gep instructions anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23696
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Oct 2005 18:17:57 +0000 (18:17 +0000)]
Fix another lsr-is-nondeterministic case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23695
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Oct 2005 17:56:34 +0000 (17:56 +0000)]
Fix a powerpc crash on CodeGen/Generic/llvm-ct-intrinsics.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23694
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Oct 2005 06:07:15 +0000 (06:07 +0000)]
Add a canonicalization that got lost, fixing PowerPC/fold-li.ll:SUB
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23693
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Oct 2005 23:00:08 +0000 (23:00 +0000)]
clean up some corner cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23692
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Oct 2005 22:31:19 +0000 (22:31 +0000)]
Implement trivial DSE. If two stores are neighbors and store to the same
location, replace them with a new store of the last value. This occurs
in the same neighborhood in 197.parser, speeding it up about 1.5%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23691
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Oct 2005 22:04:48 +0000 (22:04 +0000)]
Add support for CombineTo, allowing the dag combiner to replace nodes with
multiple results.
Use this support to implement trivial store->load forwarding, implementing
CodeGen/PowerPC/store-load-fwd.ll. Though this is the most simple case and
can be extended in the future, it is still useful. For example, it speeds
up 197.parser by 6.2% by avoiding an LSU reject in xalloc:
stw r6, lo16(l5_end_of_array)(r2)
addi r2, r5, -4
stwx r5, r4, r2
- lwzx r5, r4, r2
- rlwinm r5, r5, 0, 0, 30
stwx r5, r4, r2
lwz r2, -4(r4)
ori r2, r2, 1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23690
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Oct 2005 21:57:37 +0000 (21:57 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23689
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 10 Oct 2005 21:26:48 +0000 (21:26 +0000)]
Teach the DAGCombiner several new tricks, teaching it how to turn
sext_inreg into zext_inreg based on the signbit (fires a lot), srem into
urem, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23688
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Oct 2005 21:21:36 +0000 (21:21 +0000)]
A testcase sitting in my tree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23687
91177308-0d34-0410-b5e6-
96231b3b80d8