1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

24497 Commits

Author SHA1 Message Date
Evan Cheng
84612a59c2 Better implementation of truncate. ISel matches it to a pseudo instruction
that gets emitted as movl (for r32 to i16, i8) or a movw (for r16 to i8). And
if the destination gets allocated a subregister of the source operand, then
the instruction will not be emitted at all.

llvm-svn: 28119
2006-05-05 05:40:20 +00:00
Chris Lattner
4978a4f2f4 New note, Nate, please check to see if I'm full of it :)
llvm-svn: 28118
2006-05-05 05:36:15 +00:00
Jeff Cohen
953baf0494 Fix VC++ compilation error.
llvm-svn: 28117
2006-05-05 01:47:05 +00:00
Nate Begeman
60c4e49b4e Somehow, I missed this part of the checkin a couple days ago
llvm-svn: 28116
2006-05-05 01:13:11 +00:00
Chris Lattner
56694d0bb0 Sink noop copies into the basic block that uses them. This reduces the number
of cross-block live ranges, and allows the bb-at-a-time selector to always
coallesce these away, at isel time.

This reduces the load on the coallescer and register allocator.  For example
on a codec on X86, we went from:

   1643 asm-printer           - Number of machine instrs printed
    419 liveintervals         - Number of loads/stores folded into instructions
   1144 liveintervals         - Number of identity moves eliminated after coalescing
   1022 liveintervals         - Number of interval joins performed
    282 liveintervals         - Number of intervals after coalescing
   1304 liveintervals         - Number of original intervals
     86 regalloc              - Number of times we had to backtrack
1.90232 regalloc              - Ratio of intervals processed over total intervals
     40 spiller               - Number of values reused
    182 spiller               - Number of loads added
    121 spiller               - Number of stores added
    132 spiller               - Number of register spills
      6 twoaddressinstruction - Number of instructions commuted to coalesce
    360 twoaddressinstruction - Number of two-address instructions

to:

   1636 asm-printer           - Number of machine instrs printed
    403 liveintervals         - Number of loads/stores folded into instructions
   1155 liveintervals         - Number of identity moves eliminated after coalescing
   1033 liveintervals         - Number of interval joins performed
    279 liveintervals         - Number of intervals after coalescing
   1312 liveintervals         - Number of original intervals
     76 regalloc              - Number of times we had to backtrack
1.88998 regalloc              - Ratio of intervals processed over total intervals
      1 spiller               - Number of copies elided
     41 spiller               - Number of values reused
    191 spiller               - Number of loads added
    114 spiller               - Number of stores added
    128 spiller               - Number of register spills
      4 twoaddressinstruction - Number of instructions commuted to coalesce
    356 twoaddressinstruction - Number of two-address instructions

On this testcase, this change provides a modest reduction in spill code,
regalloc iterations, and total instructions emitted.  It increases the number
of register coallesces.

llvm-svn: 28115
2006-05-05 01:04:50 +00:00
Chris Lattner
56ae04a191 Add a helper method.
llvm-svn: 28114
2006-05-05 00:51:42 +00:00
Chris Lattner
db59f434fd wrap long line
llvm-svn: 28113
2006-05-04 23:35:31 +00:00
Chris Lattner
bf8f91715e Adjust to use proper TargetData copy ctor
llvm-svn: 28112
2006-05-04 21:18:40 +00:00
Chris Lattner
9f535ef329 Fix this to be a proper copy ctor
llvm-svn: 28111
2006-05-04 21:17:35 +00:00
Chris Lattner
db888e7880 Final pass of minor cleanups for MachineInstr
llvm-svn: 28110
2006-05-04 19:36:09 +00:00
Evan Cheng
ceb7645d40 Initial support for register pressure aware scheduling. The register reduction
scheduler can go into a "vertical mode" (i.e. traversing up the two-address
chain, etc.) when the register pressure is low.
This does seem to reduce the number of spills in the cases I've looked at. But
with x86, it's no guarantee the performance of the code improves.
It can be turned on with -sched-vertically option.

llvm-svn: 28108
2006-05-04 19:16:39 +00:00
Chris Lattner
32adc4592f Remove redundancy and a level of indirection when creating machine operands
llvm-svn: 28107
2006-05-04 19:14:44 +00:00
Chris Lattner
27d69eb53d Move register numbers out of "extra" into "contents". Other minor cleanup.
llvm-svn: 28106
2006-05-04 18:25:20 +00:00
Chris Lattner
075404adaa Remove and simplify some more machineinstr/machineoperand stuff.
llvm-svn: 28105
2006-05-04 18:16:01 +00:00
Chris Lattner
eb41c99161 Rename MO_VirtualRegister -> MO_Register. Clean up immediate handling.
llvm-svn: 28104
2006-05-04 18:05:43 +00:00
Chris Lattner
57eca0ab4f remove hasAllocatedReg
llvm-svn: 28103
2006-05-04 17:56:20 +00:00
Chris Lattner
685568510a Move some methods out of MachineInstr into MachineOperand
llvm-svn: 28102
2006-05-04 17:52:23 +00:00
Chris Lattner
55938f67ae Fix Transforms/InstCombine/2006-05-04-DemandedBitCrash.ll
llvm-svn: 28101
2006-05-04 17:33:35 +00:00
Chris Lattner
058c9af16b new testcase that crashes the instcombine pass
llvm-svn: 28100
2006-05-04 17:33:24 +00:00
Chris Lattner
97f1af2f14 There shalt be only one "immediate" operand type!
llvm-svn: 28099
2006-05-04 17:21:20 +00:00
Chris Lattner
51b0cac238 Change "value" in MachineOperand to be a GlobalValue, as that is the only
thing that can be in it.  Remove a dead method.

llvm-svn: 28098
2006-05-04 17:02:51 +00:00
Chris Lattner
20affbd29a Revert Nate's CR patch from last night, which caused many regressions (e.g. fhourstones).
Loading and storing off R0 isn't what we wanted.  Also, taking some CR's out of
CRRC seems to cause failures as well.  Further investigation is required.

llvm-svn: 28097
2006-05-04 16:56:45 +00:00
Jeff Cohen
097cc5d00b Make external globals public; other minor cleanup.
llvm-svn: 28096
2006-05-04 16:20:22 +00:00
Jeff Cohen
a954c15ea1 Make Intel syntax the default when LLVM is built with VC++.
llvm-svn: 28095
2006-05-04 16:19:27 +00:00
Chris Lattner
a39a7f900f Remove a bunch more dead V9 specific stuff
llvm-svn: 28094
2006-05-04 01:26:39 +00:00
Chris Lattner
c779fca289 Remove a bunch more SparcV9 specific stuff
llvm-svn: 28093
2006-05-04 01:15:02 +00:00
Chris Lattner
ed58ec2a57 Remove some more V9-specific stuff.
llvm-svn: 28092
2006-05-04 00:49:59 +00:00
Chris Lattner
0f89e6b11d Remove some more unused stuff from MachineInstr that was leftover from V9.
llvm-svn: 28091
2006-05-04 00:44:25 +00:00
Chris Lattner
b14a767a3e Simplify handling of relocations
llvm-svn: 28090
2006-05-04 00:42:08 +00:00
Evan Cheng
ef2fbe7460 Use movsd to shuffle in the lowest two elements of a v4f32 / v4i32 vector when
movlps cannot be used (e.g. when load from m64 has multiple uses).

llvm-svn: 28089
2006-05-03 20:32:03 +00:00
Chris Lattner
f89e1162ad Change from using MachineRelocation ctors to using static methods
in MachineRelocation to create Relocations.

llvm-svn: 28088
2006-05-03 20:30:20 +00:00
Chris Lattner
326eedfa77 minor cleanups, no functionality change
llvm-svn: 28087
2006-05-03 18:55:56 +00:00
Chris Lattner
662f66bfcd Cleanup the internal implementation of MachineRelocation. No interface or
functionality changes.

llvm-svn: 28086
2006-05-03 18:52:31 +00:00
Reid Spencer
f1f21b12c7 Attempt to get this script working on Darwin.
llvm-svn: 28085
2006-05-03 18:16:01 +00:00
Reid Spencer
9ee2fec714 For PR764:
Don't check in the LibDeps.txt and FinalLibDeps.txt files to CVS because
the content differs from platform to platform. Instead, adjust the makefile
so that a dummy llvm-config is built if Perl is not available.

llvm-svn: 28084
2006-05-03 17:49:50 +00:00
Chris Lattner
87fa1cef04 inline a simple method
llvm-svn: 28083
2006-05-03 17:21:32 +00:00
Chris Lattner
d36b66d6dc Suck block address tracking out of targets into the JIT Emitter. This
simplifies the MachineCodeEmitter interface just a little bit and makes
BasicBlocks work like constant pools and jump tables.

llvm-svn: 28082
2006-05-03 17:10:41 +00:00
Chris Lattner
b12bd9d7a7 Fix a bug in Owen's checkin that broke the CBE on all non sparc v9 platforms.
llvm-svn: 28081
2006-05-03 05:48:41 +00:00
Nate Begeman
a4ea552058 Teach the x86 jit how to handle jump tables not directly used by a jump
instruction.

llvm-svn: 28080
2006-05-03 04:52:47 +00:00
Nate Begeman
95a4f191e0 Finish up the initial jump table implementation by allowing jump tables to
not be 100% dense.  Increase the minimum threshold for the number of cases
in a switch statement from 4 to 6 in order to create a jump table.

llvm-svn: 28079
2006-05-03 03:48:02 +00:00
Evan Cheng
7e45e4d5c8 A few instruction scheduling test cases.
llvm-svn: 28077
2006-05-03 02:11:36 +00:00
Evan Cheng
2922daab4b Bottom up register pressure reduction work: clean up some hacks and enhanced
the heuristic to further reduce spills for several test cases. (Note, it may
not necessarily translate to runtime win!)

llvm-svn: 28076
2006-05-03 02:10:45 +00:00
Evan Cheng
ca3dc213dc Set isStore of instructions with ISD::TRUNCSTORE root node.
llvm-svn: 28075
2006-05-03 02:08:34 +00:00
Owen Anderson
71bc529dfa Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.
This fixes PR 759.

llvm-svn: 28074
2006-05-03 01:29:57 +00:00
Chris Lattner
be9958e6f7 Align function bodies correctly.
llvm-svn: 28073
2006-05-03 01:03:20 +00:00
Chris Lattner
1bfcd5b981 Add a new emitAlignment method
llvm-svn: 28072
2006-05-03 01:01:51 +00:00
Chris Lattner
c43d309514 Simplify some code. Don't add memory blocks to the Blocks list twice.
llvm-svn: 28071
2006-05-03 00:54:49 +00:00
Chris Lattner
95f75d0506 Add assertions that verify that the actual arguments to a call or invoke match
the prototype of the called function.

llvm-svn: 28070
2006-05-03 00:48:22 +00:00
Chris Lattner
06ccac43d7 Change the BasicBlockAddrs map to be a vector, indexed by MBB number.
llvm-svn: 28069
2006-05-03 00:32:55 +00:00
Chris Lattner
28ac95615b Keep the alpha JIT similar to the PPC/X86 jits
llvm-svn: 28068
2006-05-03 00:31:21 +00:00