| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
mov DWORD PTR [%ESP + 4], 1
instead of:
mov %EAX, 1
mov DWORD PTR [%ESP + 4], %EAX
llvm-svn: 13494
|
| |
|
|
|
|
| |
give the extracted function a more useful name than just foo_code.
llvm-svn: 13493
|
| |
|
|
|
|
| |
instruction in them.
llvm-svn: 13490
|
| |
|
|
|
|
|
|
|
|
| |
PHI node entries from multiple outside-the-region blocks. This also fixes
extraction of the entry block in a function. Yaay.
This has successfully block extracted all (but one) block from the score_move
function in obsequi (out of 33). Hrm, I wonder which block the bug is in. :)
llvm-svn: 13489
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add a stub for the severSplitPHINodes which will allow us to bbextract
bb's with PHI nodes in them soon.
* Remove unused arguments from findInputsOutputs
* Dramatically simplify the code in findInputsOutputs. In particular,
nothing really cares whether or not a PHI node is using something.
* Move moveCodeToFunction to after emitCallAndSwitchStatement as that's the
order they get called.
* Fix a bug where we would code extract a region that included a call to
vastart. Like 'alloca', calls to vastart must stay in the function that
they are defined in.
* Add some comments.
llvm-svn: 13482
|
| |
|
|
|
|
|
|
|
|
|
| |
from the extracted region. If the return has 0 or 1 exit blocks, the new
function returns void. If it has 2 exits, it returns bool, otherwise it
returns a ushort as before.
This allows us to use a conditional branch instruction when there are two
exit blocks, as often happens during block extraction.
llvm-svn: 13481
|
| |
|
|
|
|
|
|
|
|
|
|
| |
1. Get rid of the silly abort block. When doing bb extraction, we get one
abort block for every block extracted, which is kinda annoying.
2. If the switch ends up having a single destination, turn it into an
unconditional branch.
I would like to add support for conditional branches, but to do this we will
want to have the function return a bool instead of a ushort.
llvm-svn: 13478
|
| |
|
|
|
|
| |
phi-elimination from 0.6 to 0.54s on kc++.
llvm-svn: 13454
|
| |
|
|
|
|
|
| |
in the basic block being processed. This fixes PhiElimination on kimwitu++
from taking 105s to taking a much more reasonable 0.6s (in a debug build).
llvm-svn: 13453
|
| |
|
|
|
|
|
|
|
| |
than before. Because this is the case, we can compute the first non-phi
instruction once when de-phi'ing a block. This shaves ~4s off of
phielimination of _Z7yyparsev in kimwitu++ from 109s -> 105s. There are
still much more important gains to come.
llvm-svn: 13452
|
| |
|
|
|
|
|
| |
compiling things like 'add long %X, 1'. The problem is that we were switching
the order of the operands for longs even though we can't fold them yet.
llvm-svn: 13451
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
when we see a read of a register. This is important in cases like:
AL = ...
AH = ...
= AX
The read of AX must make both the AL and AH defs live until the use.
llvm-svn: 13444
|
| |
|
|
| |
llvm-svn: 13440
|
| |
|
|
|
|
| |
extension required)
llvm-svn: 13439
|
| |
|
|
|
|
| |
them. This should *dramatically* improve the performance of CBE compiled code on targets that depend on GCC's loop optimizations (like PPC)
llvm-svn: 13438
|
| |
|
|
| |
llvm-svn: 13437
|
| |
|
|
| |
llvm-svn: 13436
|
| |
|
|
|
|
|
| |
FindUsedTypes manipulation stuff out to be a seperate pass, and make the
main CWriter be a function pass now!
llvm-svn: 13435
|
| |
|
|
| |
llvm-svn: 13433
|
| |
|
|
| |
llvm-svn: 13432
|
| |
|
|
|
|
| |
be a conditional branch or switch.
llvm-svn: 13430
|
| |
|
|
| |
llvm-svn: 13429
|
| |
|
|
| |
llvm-svn: 13425
|
| |
|
|
| |
llvm-svn: 13424
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Flesh out the SetCC support... which currently ends in a little bit
of unfinished code (which is probably completely hilarious) for
generating the condition value splitting the basic block up into 4
blocks, like this (clearly a better API is needed for this!):
BB
cond. branch
/ / R1=1 R2=0
\ /
\ /
R=phi(R1,R2)
Other minor edits.
llvm-svn: 13423
|
| |
|
|
| |
llvm-svn: 13422
|
| |
|
|
| |
llvm-svn: 13421
|
| |
|
|
| |
llvm-svn: 13420
|
| |
|
|
| |
llvm-svn: 13419
|
| |
|
|
|
|
|
|
|
| |
Add support for branches (based loosely on X86/InstSelectSimple).
Add support for not visiting phi nodes in the first pass.
Add support for loading bools.
Flesh out support for stores.
llvm-svn: 13418
|
| |
|
|
| |
llvm-svn: 13417
|
| |
|
|
| |
llvm-svn: 13416
|
| |
|
|
|
|
|
|
|
| |
%tmp.0 = getelementptr [50 x sbyte]* %ar, uint 0, int 5 ; <sbyte*> [#uses=2]
%tmp.7 = getelementptr sbyte* %tmp.0, int 8 ; <sbyte*> [#uses=1]
together. This patch actually allows us to simplify and generalize the code.
llvm-svn: 13415
|
| |
|
|
|
|
|
|
| |
Disable the code that copies long constants to registers - it looks fishy.
Implement some simple casts: integral, smaller than longs, and equal-width
or narrowing only.
llvm-svn: 13413
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allows us to compile:
store float 10.0, float* %P
into:
mov DWORD PTR [%EAX], 1092616192
instead of:
.CPItest_0: # float 0x4024000000000000
.long 1092616192 # float 10
...
fld DWORD PTR [.CPItest_0]
fstp DWORD PTR [%EAX]
llvm-svn: 13409
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
against zero. In particular, don't emit:
mov %ESI, 0
cmp %ECX, %ESI
instead, emit:
test %ECX, %ECX
llvm-svn: 13407
|
| |
|
|
| |
llvm-svn: 13400
|
| |
|
|
| |
llvm-svn: 13391
|
| |
|
|
| |
llvm-svn: 13388
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When looking at getelementptr instructions, make sure to use a forwarded
type. We want to do this because a DerivedType may drop its uses and then
refine its users, who may then use another user who hasn't been refined yet.
By getting the forwarded type, we always ensure that we're looking at a
Type that isn't in a halfway refined state.
Now, I should be able to put this stuff in PATypeHandle, but it doesn't work
for some reason. This should do for now.
llvm-svn: 13386
|
| |
|
|
|
|
| |
workaround, use the C HUGE_VAL macro instead.
llvm-svn: 13377
|
| |
|
|
|
|
|
|
|
|
|
| |
the debugging functions that call "dot". These fixed settings have
various problems: for example, the fixed size that is set in the graph
traits classes is not appropriate for turning the dot file into a PNG,
and if TrueType font rendering is being used, the 'Courier' TrueType font
may not be installed. It seems easy enough to specify these things on the
command line, anyhow.
llvm-svn: 13366
|
| |
|
|
| |
llvm-svn: 13364
|
| |
|
|
| |
llvm-svn: 13363
|
| |
|
|
| |
llvm-svn: 13362
|
| |
|
|
|
|
|
|
|
| |
constant pool member's name.
This is intended to address Bug 333.
Also, fix an anachronistic usage of "M" as a parameter of type Function *.
llvm-svn: 13357
|
| |
|
|
|
|
|
|
|
|
|
| |
fills in a ToolArgs vector in the AbstractInterpreter if it is set. This
ToolArgs vector is used to pass additional arguments to LLI and/or LLC.
This is intended to address Bug 40.
Also, make -debug-only=toolrunner work for the LLC and CBE
AbstractInterpreters.
llvm-svn: 13356
|
| |
|
|
| |
llvm-svn: 13355
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
div:
mov %EDX, DWORD PTR [%ESP + 4]
mov %ECX, 64
mov %EAX, %EDX
sar %EDX, 31
idiv %ECX
ret
to this:
div:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, %EAX
sar %ECX, 5
shr %ECX, 26
mov %EDX, %EAX
add %EDX, %ECX
sar %EAX, 6
ret
Note that the intel compiler is currently making this:
div:
movl 4(%esp), %edx #3.5
movl %edx, %eax #4.14
sarl $5, %eax #4.14
shrl $26, %eax #4.14
addl %edx, %eax #4.14
sarl $6, %eax #4.14
ret #4.14
Which has one less register->register copy. (hint hint alkis :)
llvm-svn: 13354
|
| |
|
|
| |
llvm-svn: 13352
|