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

20959 Commits

Author SHA1 Message Date
Duraid Madina
fb806bb309 add support for storing and returning bools
llvm-svn: 24228
2005-11-07 03:11:02 +00:00
Chris Lattner
fc76f9f0c1 Always compute max align.
llvm-svn: 24227
2005-11-06 17:43:20 +00:00
Chris Lattner
f0f5449612 Change a comment slightly
llvm-svn: 24226
2005-11-06 17:40:18 +00:00
Duraid Madina
f0469f0376 just some random hacking - calls (particularly indirect) need a lot of
love (especially with -sched=simple)

llvm-svn: 24225
2005-11-06 13:43:30 +00:00
Nate Begeman
aecebc076b Add the necessary support to the ISel to allow targets to codegen the new
alignment information appropriately.  Includes code for PowerPC to support
fixed-size allocas with alignment larger than the stack.  Support for
arbitrarily aligned dynamic allocas coming soon.

llvm-svn: 24224
2005-11-06 09:00:38 +00:00
Chris Lattner
d88f347ba5 minor clarity changes, no functionality difference.
llvm-svn: 24223
2005-11-06 08:23:17 +00:00
Chris Lattner
aa07ab1192 Make sure to initialize the alignment field
llvm-svn: 24222
2005-11-06 08:22:18 +00:00
Chris Lattner
bcea8db4e4 document alignment on globals, functions, and allocation instructions.
llvm-svn: 24221
2005-11-06 08:02:57 +00:00
Chris Lattner
bdf3e04a53 Minor correction
llvm-svn: 24220
2005-11-06 07:48:11 +00:00
Chris Lattner
e86e4acf28 don't misencode CC#'s
llvm-svn: 24219
2005-11-06 07:46:13 +00:00
Chris Lattner
6c8657e621 encode/decode function alignment in bc files
llvm-svn: 24218
2005-11-06 07:43:39 +00:00
Chris Lattner
aea08816e0 describe extensions to the .bc format for function/global alignment
llvm-svn: 24217
2005-11-06 07:20:25 +00:00
Chris Lattner
b456fb372d Read/write global variable alignments if present
llvm-svn: 24216
2005-11-06 07:11:04 +00:00
Chris Lattner
e859d486df add alignment info for globals and functions
llvm-svn: 24213
2005-11-06 06:52:11 +00:00
Chris Lattner
6991a6f23f print alignment info for globals and functions
llvm-svn: 24212
2005-11-06 06:48:53 +00:00
Chris Lattner
96d1807bfc regenerate
llvm-svn: 24211
2005-11-06 06:46:53 +00:00
Chris Lattner
8cda8020c7 Allow globals to have an alignment specified. Switch to using isPowerOf2_32
at Jim's request for the checking code.

llvm-svn: 24210
2005-11-06 06:46:28 +00:00
Chris Lattner
0505c89e9c allow functions and modules to have an explicit alignment
llvm-svn: 24209
2005-11-06 06:44:42 +00:00
Chris Lattner
f98cdabb75 regenerate
llvm-svn: 24208
2005-11-06 06:34:34 +00:00
Chris Lattner
e09addd94b factor optional alignment
llvm-svn: 24207
2005-11-06 06:34:12 +00:00
Duraid Madina
cf11aefc91 ask for 16-byte aligned jmpbufs. This should unbreak C++ on IA64 (and
a bunch of other things) but is currently ignored by the code
generator.

llvm-svn: 24206
2005-11-06 04:29:30 +00:00
Chris Lattner
46da94a1c4 enumerate non-standard argument encoding cases, such as alignment info for
allocations

llvm-svn: 24205
2005-11-05 22:32:06 +00:00
Chris Lattner
dada9d949f rearrange some info about the instruction encoding
llvm-svn: 24204
2005-11-05 22:20:06 +00:00
Chris Lattner
76a2afc0d3 Write/read allocation instruction alignment info to .bc files.
llvm-svn: 24203
2005-11-05 22:08:14 +00:00
Chris Lattner
28c9ac03ef new testcase
llvm-svn: 24202
2005-11-05 22:07:30 +00:00
Chris Lattner
cfaf9f14c0 add an accessor
llvm-svn: 24201
2005-11-05 21:58:30 +00:00
Chris Lattner
c6ef0112c0 verify that alignments are always a power of 2
llvm-svn: 24200
2005-11-05 21:57:54 +00:00
Chris Lattner
a0d532c757 regenerate
llvm-svn: 24199
2005-11-05 21:54:23 +00:00
Chris Lattner
f2e7f355a0 Verify that alignment amounts are a power of 2
llvm-svn: 24198
2005-11-05 21:54:03 +00:00
Chris Lattner
8eee9a6234 fix printing the alignment directive
llvm-svn: 24197
2005-11-05 21:20:34 +00:00
Nate Begeman
f299b9fb03 Add support alignment of allocation instructions.
Add support for specifying alignment and size of setjmp jmpbufs.

No targets currently do anything with this information, nor is it presrved
in the bytecode representation.  That's coming up next.

llvm-svn: 24196
2005-11-05 09:21:28 +00:00
Chris Lattner
dc19995e25 add a case Nate sent me
llvm-svn: 24195
2005-11-05 08:57:56 +00:00
Chris Lattner
0bd3e3230c Implement Transforms/TailCallElim/return-undef.ll, a trivial case
that has been sitting in my inbox since May 18. :)

llvm-svn: 24194
2005-11-05 08:21:11 +00:00
Chris Lattner
f94c31b160 New testcase
llvm-svn: 24191
2005-11-05 08:20:28 +00:00
Chris Lattner
4352c050d1 Turn sdiv into udiv if both operands have a clear sign bit. This occurs
a few times in crafty:

OLD:    %tmp.36 = div int %tmp.35, 8            ; <int> [#uses=1]
NEW:    %tmp.36 = div uint %tmp.35, 8           ; <uint> [#uses=0]
OLD:    %tmp.19 = div int %tmp.18, 8            ; <int> [#uses=1]
NEW:    %tmp.19 = div uint %tmp.18, 8           ; <uint> [#uses=0]
OLD:    %tmp.117 = div int %tmp.116, 8          ; <int> [#uses=1]
NEW:    %tmp.117 = div uint %tmp.116, 8         ; <uint> [#uses=0]
OLD:    %tmp.92 = div int %tmp.91, 8            ; <int> [#uses=1]
NEW:    %tmp.92 = div uint %tmp.91, 8           ; <uint> [#uses=0]

Which all turn into shrs.

llvm-svn: 24190
2005-11-05 07:40:31 +00:00
Chris Lattner
297e545d4b Turn srem -> urem when neither input has their sign bit set. This triggers
8 times in vortex, allowing the srems to be turned into shrs:

OLD:    %tmp.104 = rem int %tmp.5.i37, 16               ; <int> [#uses=1]
NEW:    %tmp.104 = rem uint %tmp.5.i37, 16              ; <uint> [#uses=0]
OLD:    %tmp.98 = rem int %tmp.5.i24, 16                ; <int> [#uses=1]
NEW:    %tmp.98 = rem uint %tmp.5.i24, 16               ; <uint> [#uses=0]
OLD:    %tmp.91 = rem int %tmp.5.i19, 8         ; <int> [#uses=1]
NEW:    %tmp.91 = rem uint %tmp.5.i19, 8                ; <uint> [#uses=0]
OLD:    %tmp.88 = rem int %tmp.5.i14, 8         ; <int> [#uses=1]
NEW:    %tmp.88 = rem uint %tmp.5.i14, 8                ; <uint> [#uses=0]
OLD:    %tmp.85 = rem int %tmp.5.i9, 1024               ; <int> [#uses=2]
NEW:    %tmp.85 = rem uint %tmp.5.i9, 1024              ; <uint> [#uses=0]
OLD:    %tmp.82 = rem int %tmp.5.i, 512         ; <int> [#uses=2]
NEW:    %tmp.82 = rem uint %tmp.5.i1, 512               ; <uint> [#uses=0]
OLD:    %tmp.48.i = rem int %tmp.5.i.i161, 4            ; <int> [#uses=1]
NEW:    %tmp.48.i = rem uint %tmp.5.i.i161, 4           ; <uint> [#uses=0]
OLD:    %tmp.20.i2 = rem int %tmp.5.i.i, 4              ; <int> [#uses=1]
NEW:    %tmp.20.i2 = rem uint %tmp.5.i.i, 4             ; <uint> [#uses=0]

it also occurs 9 times in gcc, but with odd constant divisors (1009 and 61)
so the payoff isn't as great.

llvm-svn: 24189
2005-11-05 07:28:37 +00:00
Jim Laskey
5a3005b7d0 Fix logic bug in finding retry slot in tally.
llvm-svn: 24188
2005-11-05 00:01:25 +00:00
Jim Laskey
305647f84e Fix a warning
llvm-svn: 24187
2005-11-04 18:26:02 +00:00
Duraid Madina
c2c2e353ee oops, forgot to load GP for indirect calls, though the old code now commented
out failed (e.g. methcall) - now the code compiles, though it's not quite
right just yet (tm) ;)

would fix this but it's 3am! :O

llvm-svn: 24186
2005-11-04 17:55:53 +00:00
Duraid Madina
e8456a9175 kill redundant SP/GP/RP save/restores across calls
llvm-svn: 24183
2005-11-04 10:01:10 +00:00
Duraid Madina
1c632094d4 add support for loading bools
llvm-svn: 24182
2005-11-04 09:59:06 +00:00
Jim Laskey
670144ec9e Scheduling now uses itinerary data.
llvm-svn: 24180
2005-11-04 04:05:35 +00:00
Jeff Cohen
16669485c1 <cassert> no longer required to make VC++ happy.
llvm-svn: 24177
2005-11-04 02:59:16 +00:00
Duraid Madina
feeaabd6f1 change NULL to 0, unbreaks the ppc target when building on ia64
llvm-svn: 24176
2005-11-04 01:45:04 +00:00
Duraid Madina
f5824e4fa3 fun with predicates! (add TRUNC i64->i1, AND i1 i1, fix XOR i1 i1)
llvm-svn: 24175
2005-11-04 00:57:56 +00:00
Jim Laskey
42681c1d58 1. Remove ranges from itinerary data.
2. Tidy up the subtarget emittined code.

llvm-svn: 24172
2005-11-03 22:47:41 +00:00
Chris Lattner
99bd05542a Fix mac os spelling
llvm-svn: 24171
2005-11-03 22:33:48 +00:00
Chris Lattner
af918d3cb2 Add more bison versions, thanks to Vladimir
llvm-svn: 24169
2005-11-03 18:32:06 +00:00
Chris Lattner
197956dfca Per bug 655, give people more options in case 1.35 doesn't build on their
system.

llvm-svn: 24168
2005-11-03 18:28:22 +00:00
Duraid Madina
4adb8143ce add pattern to load constant 0 into a predicate reg
llvm-svn: 24164
2005-11-03 10:09:32 +00:00