Chris Lattner
9024121340
Add trivial exception specs to produce better code since the methods cannot
...
be inlined.
llvm-svn: 10643
2003-12-29 21:43:58 +00:00
Chris Lattner
6317315a2f
Factor FDHandle out of the bytecode reader into the FileUtilities.h support
...
routines.
llvm-svn: 10642
2003-12-29 21:35:05 +00:00
Chris Lattner
2bfa334e64
implement new getToken function
...
llvm-svn: 10639
2003-12-29 05:07:02 +00:00
Chris Lattner
c37577eb9f
Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
...
implementation from the TargetMachine directly.
llvm-svn: 10636
2003-12-28 21:23:38 +00:00
Alkis Evlogimenos
8157eb7140
Reserve ECX and EDI instead of EBX and EDI. Since EBX is a callee
...
saved register it has a longer free range than ECX (which is defined
every time there is a fnuction call) which makes ECX a better register
to reserve.
llvm-svn: 10635
2003-12-28 18:03:52 +00:00
Alkis Evlogimenos
fc01aac4d8
Add coalescing to register allocator. A hint is added to each interval
...
which denotes the register we would like to be assigned to (virtual or
physical). In register allocation, if this hint exists and we can map
it to a physical register (it is either a physical register or it is a
virtual register that already got assigned to a physical one) we use
that register if it is available instead of a random one in the free
pool.
llvm-svn: 10634
2003-12-28 17:58:18 +00:00
Alkis Evlogimenos
24b3159dfc
Add TargetInstrInfo::isMoveInstr() to support coalescing in register
...
allocation.
llvm-svn: 10633
2003-12-28 17:35:08 +00:00
Chris Lattner
c487970d6b
Whoops, don't try to lower non intrinsic calls
...
llvm-svn: 10632
2003-12-28 09:53:23 +00:00
Chris Lattner
1791047661
implement support for the intrinsic lowering functionality
...
llvm-svn: 10629
2003-12-28 09:47:19 +00:00
Chris Lattner
58cbeaed27
Eliminate some code that is not needed now that we have the intrinsic lowering pass
...
llvm-svn: 10628
2003-12-28 09:46:33 +00:00
Chris Lattner
44f1ab7c2f
Pass around IntrinsicLowering instances as appropriate.
...
Reimplement the Interpreters implementation of va_* to be more direct.
llvm-svn: 10627
2003-12-28 09:44:37 +00:00
Chris Lattner
66fb20d2d3
Use the intrinsic lowering functionality
...
llvm-svn: 10626
2003-12-28 09:43:35 +00:00
Chris Lattner
068ac4236d
Move into the VMCore library
...
llvm-svn: 10623
2003-12-28 08:30:20 +00:00
Chris Lattner
57ff7c242c
Implement the default implementation of the intrinsic lowering class
...
llvm-svn: 10621
2003-12-28 08:19:41 +00:00
Chris Lattner
a8c942c188
finegrainify namespacification
...
minor cleanups
llvm-svn: 10619
2003-12-28 07:59:53 +00:00
Chris Lattner
428c27dfbf
Merging constants can cause further room for improvement. Iterate until
...
we converge
llvm-svn: 10618
2003-12-28 07:19:08 +00:00
Chris Lattner
8caf13292a
Add a note
...
llvm-svn: 10617
2003-12-28 04:03:49 +00:00
Chris Lattner
3593bb9dd6
Factor code out of LLI
...
llvm-svn: 10616
2003-12-26 06:50:30 +00:00
Chris Lattner
5ad07a3fbf
minor cleanups
...
llvm-svn: 10612
2003-12-26 06:16:00 +00:00
Chris Lattner
ddcbddf9e9
No longer run atExit functions from run()
...
rename run to runFunction
Genericize the runFunction code a little bit, though it still stinks
llvm-svn: 10610
2003-12-26 06:13:47 +00:00
Chris Lattner
d7d8336d73
No longer run atExit functions from run()
...
rename run to runFunction
llvm-svn: 10609
2003-12-26 06:13:05 +00:00
Alkis Evlogimenos
597e2f3501
Improve debugging output when choosing a register to spill.
...
llvm-svn: 10604
2003-12-24 18:53:31 +00:00
Alkis Evlogimenos
2c947a4fa0
Do a separate pass to compute spill weights because doing it inline
...
with live intervals was missing registers that were used before they
were defined (in the arbitrary order live intervals numbers
instructions).
llvm-svn: 10603
2003-12-24 15:44:53 +00:00
Chris Lattner
c09a6f0621
Right, fix the problem with invoke instructions, not just call instructions
...
llvm-svn: 10599
2003-12-23 22:18:36 +00:00
Chris Lattner
c1dd02538a
Do not delete the type holder until after the call instruction has been
...
constructed!
llvm-svn: 10598
2003-12-23 20:39:17 +00:00
Chris Lattner
defd9ccd73
Minor cleanups, plug a minor memory leak
...
llvm-svn: 10596
2003-12-23 20:05:15 +00:00
Alkis Evlogimenos
ca57dd1089
Change the way free regusters are computed and perform better
...
allocation in the presence of preallocated intervals.
llvm-svn: 10595
2003-12-23 18:00:33 +00:00
Chris Lattner
099e1f16b8
rename ClassifyExpression -> ClassifyExpr
...
llvm-svn: 10592
2003-12-23 08:04:08 +00:00
Chris Lattner
fefdb67375
More minor non-functional changes. This now computes the exit condition, though
...
it doesn't do anything with it.
llvm-svn: 10590
2003-12-23 07:47:09 +00:00
Chris Lattner
77fe880dcf
Remove extraneous #include
...
finegrainify namespacification
llvm-svn: 10589
2003-12-23 07:43:38 +00:00
Chris Lattner
5780f54596
Finegrainify namespacification
...
llvm-svn: 10588
2003-12-23 06:44:41 +00:00
Chris Lattner
30fa61ca6c
Fix memory corruption bug PR193
...
llvm-svn: 10586
2003-12-22 23:49:36 +00:00
John Criswell
8740fbd052
Reverted back to revision 1.11. The previous fix doesn't really fix
...
anything; it just causes the bug to go dormant.
llvm-svn: 10585
2003-12-22 16:22:49 +00:00
Alkis Evlogimenos
10de430568
Fix crash when compiling twolf.
...
llvm-svn: 10584
2003-12-22 13:54:29 +00:00
Chris Lattner
8ec8b9c28a
Don't mind me, I'm just refactoring away. This patch makes room for LFTR, but
...
contains no functionality changes.
llvm-svn: 10583
2003-12-22 09:53:29 +00:00
Chris Lattner
b0c30fd90f
finegrainify namespacification
...
Implement indvar analysis of getelementptr and sub expressions
llvm-svn: 10582
2003-12-22 05:26:29 +00:00
Chris Lattner
1f0b2be06c
Implement IndVarsSimplify/pointer-indvars.ll, transforming pointer
...
arithmetic into "array subscripts"
llvm-svn: 10580
2003-12-22 05:02:01 +00:00
Chris Lattner
be3440d4e3
finegrainify namespacification
...
add new getIntPtrType() method
llvm-svn: 10579
2003-12-22 05:01:15 +00:00
Chris Lattner
dfe3e25d89
Fix PR194
...
llvm-svn: 10573
2003-12-22 03:58:44 +00:00
Misha Brukman
2653aa076a
Really release memory used by functions. Patch by Chris.
...
llvm-svn: 10572
2003-12-22 03:47:58 +00:00
Alkis Evlogimenos
7062ccbc85
Remove verifyIntervals() since it doesn't actually work right now.
...
llvm-svn: 10570
2003-12-21 20:41:26 +00:00
Alkis Evlogimenos
4401d0a7a3
Change weight into a float so that we can take into account the
...
nesting level when computing it. Right now the allocator uses:
w = sum_over_defs_uses( 10 ^ nesting level );
llvm-svn: 10569
2003-12-21 20:19:10 +00:00
Alkis Evlogimenos
0e892b6337
Move FP_REG_KILL closer to the return instruction.
...
llvm-svn: 10567
2003-12-21 16:47:43 +00:00
Alkis Evlogimenos
4f98b79ef0
Add support for inactive intervals. This effectively reuses registers
...
for live ranges that fall into assigned registers' holes.
llvm-svn: 10566
2003-12-21 05:43:40 +00:00
John Criswell
80daeb4cdb
Fix PR#193.
...
Modified ReadArchiveBuffer() so that it dynamically allocates the
std::string object used to hold the bytecode object file's name. This is
necessary because it is passed by reference to the new Module that is
allocated to represent the bytecode object, and previously we were
using a std::string that disappeared on function exit.
llvm-svn: 10565
2003-12-20 22:37:29 +00:00
Alkis Evlogimenos
7b61337ce6
Move FP_REG_KILL closer to the actual branch instruction.
...
llvm-svn: 10563
2003-12-20 17:28:15 +00:00
Alkis Evlogimenos
41bd8284e3
Remove floating point killer pass. This is now implemented in the
...
instruction selector by adding a new pseudo-instruction
FP_REG_KILL. This instruction implicitly defines all x86 fp registers
and is a terminator so that passes which add machine code at the end
of basic blocks (like phi elimination) do not add instructions between
it and the branch or return instruction.
llvm-svn: 10562
2003-12-20 16:22:59 +00:00
Chris Lattner
461a62626a
Add a new target-independent machine code freeing pass
...
llvm-svn: 10560
2003-12-20 10:20:58 +00:00
Chris Lattner
ef1bfa35d0
Finally, _actually delete the machine code_ for a function, after it has
...
been emitted. Also, since the FPK pass is causing memory access violations,
disable it.
llvm-svn: 10559
2003-12-20 10:20:19 +00:00
Chris Lattner
013d4bee41
This should not be needed anymore
...
llvm-svn: 10558
2003-12-20 10:19:18 +00:00