1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-30 15:32:52 +01:00
Commit Graph

20499 Commits

Author SHA1 Message Date
Chris Lattner
824a8efa08 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.

llvm-svn: 23781
2005-10-18 06:04:22 +00:00
Chris Lattner
fbf3838a61 Duraid pointed out that it is impolite to emit PPC:: into the IA64 backend
llvm-svn: 23780
2005-10-18 04:41:01 +00:00
Nate Begeman
5dbcab491a 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.

llvm-svn: 23779
2005-10-18 00:56:42 +00:00
Nate Begeman
b0e319a7c7 First bits of 64 bit PowerPC stuff, currently disabled. A lot of this is
purely mechanical.

llvm-svn: 23778
2005-10-18 00:28:58 +00:00
Nate Begeman
b9627ab955 Implement some feedback from Chris re: constant canonicalization
llvm-svn: 23777
2005-10-18 00:28:13 +00:00
Nate Begeman
f495ec2497 Legalize BUILD_PAIR appropriately for upcoming 64 bit PowerPC work.
llvm-svn: 23776
2005-10-18 00:27:41 +00:00
John Criswell
1ece5aa9da Use %s instead of hard coding the input filename.
This allows the test to work when srcdir != objdir.

llvm-svn: 23775
2005-10-17 21:54:18 +00:00
Nate Begeman
b2f472ec56 fold fmul X, +2.0 -> fadd X, X;
llvm-svn: 23774
2005-10-17 20:40:11 +00:00
Chris Lattner
515ce6687d Make this work for FP constantexprs
llvm-svn: 23773
2005-10-17 20:18:38 +00:00
Chris Lattner
09b3b3d658 Oops, X+0.0 isn't foldable, but X+-0.0 is.
llvm-svn: 23772
2005-10-17 17:56:38 +00:00
Chris Lattner
00f8306943 relax this a bit, as we only support the default rounding mode
llvm-svn: 23771
2005-10-17 17:49:32 +00:00
Chris Lattner
84f1fb55c2 Apparently, people object to floating pointers. Picky picky.
llvm-svn: 23770
2005-10-17 15:19:24 +00:00
Jim Laskey
47bcddb491 As requested, a blurb on sub-targets.
llvm-svn: 23769
2005-10-17 12:19:10 +00:00
Chris Lattner
31d368acdc fix some grammar-o's I noticed
llvm-svn: 23768
2005-10-17 04:18:41 +00:00
Chris Lattner
cd78af4417 Feedback from Nate.
llvm-svn: 23767
2005-10-17 03:09:31 +00:00
Chris Lattner
f5b250fb9c Document -view-isel-dags and -view-sched-dags
llvm-svn: 23766
2005-10-17 01:40:33 +00:00
Chris Lattner
96f76f5257 Add notes about MF.viewCFG() and friends.
llvm-svn: 23765
2005-10-17 01:36:23 +00:00
Chris Lattner
27d166c9bf add a trivial fold
llvm-svn: 23764
2005-10-17 01:07:11 +00:00
Chris Lattner
7a61ff2741 Add a bunch of info about the isel autogenerator. Review appreciated!
llvm-svn: 23763
2005-10-16 20:02:19 +00:00
Chris Lattner
35e81a9487 Fill this out some more. Add description of MBB/MF. Fix some broken links,
turn some broken <a name> into <a href>'s.

llvm-svn: 23762
2005-10-16 18:31:08 +00:00
Chris Lattner
d1242aeb9a Add a stub for the TargetSubtarget class. Jim, please fill a blurb in here
when you get a chance.

llvm-svn: 23761
2005-10-16 17:06:07 +00:00
Chris Lattner
970b6b9d13 Update this significantly, mention subtarget and isel generation support.
llvm-svn: 23760
2005-10-16 17:03:22 +00:00
Nate Begeman
723637974b More PPC32 -> PPC changes, as well as merging some classes that were
redundant after the change.

llvm-svn: 23759
2005-10-16 05:39:50 +00:00
Chris Lattner
a4dc9eda40 Make the generated code significantly more memory efficient, by using
SelectNodeTo instead of getTargetNode when possible.

llvm-svn: 23758
2005-10-16 01:41:58 +00:00
Chris Lattner
1f2ca991c4 update this a little bit to talk about the dag combiner and remove inaccuracies.
This still doesn't talk about autogen much

llvm-svn: 23757
2005-10-16 00:36:38 +00:00
Chris Lattner
d22af0377d Fix this logic.
llvm-svn: 23756
2005-10-15 22:35:40 +00:00
Chris Lattner
f2d781b780 Add a case we were missing that was causing us to fail CodeGen/PowerPC/rlwinm.ll:test3
llvm-svn: 23755
2005-10-15 22:18:08 +00:00
Nate Begeman
0eeb198d81 Remove some dead code now that the dag combiner exists.
llvm-svn: 23754
2005-10-15 22:08:02 +00:00
Chris Lattner
4893eb3b04 Remove some dead code: the ORI/ORIS cases are autogen'd. This makes
SelectIntImmediateExpr dead.

llvm-svn: 23753
2005-10-15 22:06:18 +00:00
Chris Lattner
4e08151e9b prune #includes
llvm-svn: 23752
2005-10-15 21:58:54 +00:00
Chris Lattner
6f97b0bb81 These instructions are now autogenerated
llvm-svn: 23751
2005-10-15 21:44:56 +00:00
Chris Lattner
114941504c Add a pattern for FSQRTS
llvm-svn: 23750
2005-10-15 21:44:15 +00:00
Chris Lattner
c9479e899a remove dead code
llvm-svn: 23749
2005-10-15 21:40:12 +00:00
Chris Lattner
5a4ed7e8ab 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.

llvm-svn: 23748
2005-10-15 21:34:21 +00:00
Chris Lattner
346dc6fed1 Use getExtLoad here instead of getNode, as extloads produce two values. This
fixes a legalize failure on SPASS for itanium.

llvm-svn: 23747
2005-10-15 20:24:07 +00:00
Chris Lattner
b632f70353 remove broken SRA/rlwimi case
llvm-svn: 23746
2005-10-15 19:04:48 +00:00
Chris Lattner
d3946bbea6 Rename PPC32*.h to PPC*.h
This completes the grand PPC file renaming

llvm-svn: 23745
2005-10-14 23:59:06 +00:00
Chris Lattner
e870e24352 Merge PPCJITInfo.h and PPC32JITInfo.h. Note that the PowerPCJITInfo
and PPC32JITInfo classes should be merged.

llvm-svn: 23744
2005-10-14 23:53:41 +00:00
Chris Lattner
0405f3388f Rename PowerPC*.h to PPC*.h
llvm-svn: 23743
2005-10-14 23:51:18 +00:00
Chris Lattner
7bcc93b6c1 Rename PowerPCInstrBuilder.h -> PPC*
llvm-svn: 23742
2005-10-14 23:45:43 +00:00
Chris Lattner
4857375695 Nuke the PowerPCTargetMachine.h header. Note that the PowerPCTargetMachine
still should be merged into the PPC32TargetMachine class

llvm-svn: 23741
2005-10-14 23:44:05 +00:00
Chris Lattner
11127fcf98 Rename PowerPC*.td -> PPC*.td
llvm-svn: 23740
2005-10-14 23:40:39 +00:00
Chris Lattner
841f66a2d3 These are dead
llvm-svn: 23739
2005-10-14 23:38:51 +00:00
Chris Lattner
612940b7b0 Eliminate PowerPC.td and PPC32.td, consolidating them into PPC.td
llvm-svn: 23738
2005-10-14 23:37:35 +00:00
Chris Lattner
0250038010 Like the comment says...
llvm-svn: 23737
2005-10-14 22:48:24 +00:00
Chris Lattner
1f9360318d Nuke PowerPCInstrFormats.h, its contents are dead. Remove the definitions
from the .td file that correspond to it

llvm-svn: 23736
2005-10-14 22:44:13 +00:00
Nate Begeman
3b6c2df603 Properly split f32 and f64 into separate register classes for scalar sse fp
fixing a bunch of nasty hackery

llvm-svn: 23735
2005-10-14 22:06:00 +00:00
Nate Begeman
27cce12802 Remove an unnecsesary file. PPC32 and PPC64 share architected registers.
We will decide with subtarget support whether we ever use an i64 register
class.

llvm-svn: 23734
2005-10-14 18:58:46 +00:00
Chris Lattner
664dd0c80e add the integer truncate/extension operations
llvm-svn: 23733
2005-10-14 06:40:20 +00:00
Chris Lattner
19cff97f32 Make sure targets depend on TargetSelectionDAG.td
llvm-svn: 23732
2005-10-14 06:31:58 +00:00