Alkis Evlogimenos
7d7d7e89d4
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
John Criswell
b6d3cb9449
Modified the linker so that it always links in an object from an archive
...
that defines the symbol "main." This is a hack that ensures that programs
that place their main function in a library and then link it in
(i.e. Apache 2.x) get their main function linked in.
There is probably a more correct way to do this, but this works for now.
llvm-svn: 10594
2003-12-23 17:37:06 +00:00
Chris Lattner
bd03ac8567
Rename method
...
llvm-svn: 10593
2003-12-23 09:41:45 +00:00
Chris Lattner
30513e0a3a
rename ClassifyExpression -> ClassifyExpr
...
llvm-svn: 10592
2003-12-23 08:04:08 +00:00
Chris Lattner
f732b6b926
Rename ClassifyExpression -> ClassifyExpr
...
llvm-svn: 10591
2003-12-23 08:03:40 +00:00
Chris Lattner
7e755e443f
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
93bfb6c741
Remove extraneous #include
...
finegrainify namespacification
llvm-svn: 10589
2003-12-23 07:43:38 +00:00
Chris Lattner
1e74843e7c
Finegrainify namespacification
...
llvm-svn: 10588
2003-12-23 06:44:41 +00:00
Chris Lattner
0b428c107d
bug fixed
...
llvm-svn: 10587
2003-12-22 23:56:37 +00:00
Chris Lattner
c2ee05427e
Fix memory corruption bug PR193
...
llvm-svn: 10586
2003-12-22 23:49:36 +00:00
John Criswell
bd10d09b07
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
3ec903474f
Fix crash when compiling twolf.
...
llvm-svn: 10584
2003-12-22 13:54:29 +00:00
Chris Lattner
a02d5aa6ce
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
a86c4a3a01
finegrainify namespacification
...
Implement indvar analysis of getelementptr and sub expressions
llvm-svn: 10582
2003-12-22 05:26:29 +00:00
Chris Lattner
f1277450ab
new testcase for cananonicalization of subtracts
...
llvm-svn: 10581
2003-12-22 05:24:45 +00:00
Chris Lattner
6449dcefbc
Implement IndVarsSimplify/pointer-indvars.ll, transforming pointer
...
arithmetic into "array subscripts"
llvm-svn: 10580
2003-12-22 05:02:01 +00:00
Chris Lattner
bb661c18c8
finegrainify namespacification
...
add new getIntPtrType() method
llvm-svn: 10579
2003-12-22 05:01:15 +00:00
Chris Lattner
db65d6f14c
Doxygenize methods, add new getIntPtrType method
...
llvm-svn: 10578
2003-12-22 05:00:45 +00:00
Chris Lattner
a5e3418d98
New testcase to see if -indvars can promote pointer arithmetic to array accesses
...
llvm-svn: 10577
2003-12-22 05:00:13 +00:00
Chris Lattner
2d69eae755
fix grammao
...
llvm-svn: 10576
2003-12-22 04:08:12 +00:00
Chris Lattner
8e570babb0
Bug fixed
...
llvm-svn: 10575
2003-12-22 04:06:24 +00:00
Chris Lattner
5abdc6fd3d
The GCC problem is not specific to suse
...
llvm-svn: 10574
2003-12-22 04:06:12 +00:00
Chris Lattner
d3678bc7c5
Fix PR194
...
llvm-svn: 10573
2003-12-22 03:58:44 +00:00
Misha Brukman
69aa1ccb07
Really release memory used by functions. Patch by Chris.
...
llvm-svn: 10572
2003-12-22 03:47:58 +00:00
Misha Brukman
8834af99d6
Fix the URL to check the referrer for CSS conformity.
...
llvm-svn: 10571
2003-12-21 22:53:21 +00:00
Alkis Evlogimenos
690e1b8de2
Remove verifyIntervals() since it doesn't actually work right now.
...
llvm-svn: 10570
2003-12-21 20:41:26 +00:00
Alkis Evlogimenos
2665d9c6f9
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
Chris Lattner
7b432f77ac
New testcase for PR194
...
llvm-svn: 10568
2003-12-21 19:06:15 +00:00
Alkis Evlogimenos
2103574b32
Move FP_REG_KILL closer to the return instruction.
...
llvm-svn: 10567
2003-12-21 16:47:43 +00:00
Alkis Evlogimenos
c09b77ea35
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
d8c7a7fbaa
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
2406ca8d71
Fix help string for --enable-spec2000 option
...
llvm-svn: 10564
2003-12-20 21:35:15 +00:00
Alkis Evlogimenos
27437e3318
Move FP_REG_KILL closer to the actual branch instruction.
...
llvm-svn: 10563
2003-12-20 17:28:15 +00:00
Alkis Evlogimenos
68cff6bf4d
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
6448f89cdc
Another day, another bug
...
llvm-svn: 10561
2003-12-20 10:29:02 +00:00
Chris Lattner
4cbb97bfdd
Add a new target-independent machine code freeing pass
...
llvm-svn: 10560
2003-12-20 10:20:58 +00:00
Chris Lattner
452597611f
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
b1bbd7c7f6
This should not be needed anymore
...
llvm-svn: 10558
2003-12-20 10:19:18 +00:00
Chris Lattner
5219159892
Rearrange code, indent for the namespace, add the createMachineFunctionPrinterPass
...
to passes.h, and add the machien destruction pass to Passes.h
llvm-svn: 10557
2003-12-20 10:18:58 +00:00
Chris Lattner
af4304f807
Fix memory leak in the stackifier, due to the machinebasicblocks not holding
...
instructions on an ilist
llvm-svn: 10556
2003-12-20 10:12:17 +00:00
Chris Lattner
d46cd68695
Finegrainify namespacification
...
Minor cleanups to killer pass
llvm-svn: 10555
2003-12-20 09:58:55 +00:00
Chris Lattner
9a4898939a
Hoist some sparc specific code into the sparc target
...
llvm-svn: 10554
2003-12-20 09:17:40 +00:00
Chris Lattner
9a3478e022
* Finegrainify namespacification
...
* Move sparc specific code out of generic code
* Eliminate the getOffset() method which made INVALID_FRAME_OFFSET
necessary, which made pulling in MAX_INT as a sentinal necessary.
llvm-svn: 10553
2003-12-20 09:17:07 +00:00
Chris Lattner
299517dcde
Remove sparc specific passes from public headers
...
llvm-svn: 10552
2003-12-20 09:15:21 +00:00
Chris Lattner
6800f92507
Remove a horrible API
...
llvm-svn: 10551
2003-12-20 09:15:01 +00:00
Chris Lattner
4df78f0fad
PR135 is now finally fixed
...
llvm-svn: 10550
2003-12-20 03:42:11 +00:00
Chris Lattner
fbcc0aa18d
Implement PR135, lazy emission of global variables
...
llvm-svn: 10549
2003-12-20 03:36:47 +00:00
Chris Lattner
620ac15114
Cleanups to implement PR135
...
llvm-svn: 10548
2003-12-20 03:35:50 +00:00
Chris Lattner
6bbe3ecee5
Simple refactorings to prepare for lazy global emission
...
Also, add a stat for the number of globals emitted
llvm-svn: 10547
2003-12-20 02:45:37 +00:00
Chris Lattner
dc997d9470
Simple refactorings to prepare for lazy global emission
...
llvm-svn: 10546
2003-12-20 02:45:16 +00:00
Chris Lattner
ddec71c3b6
A minor cleanup for better encapsulation
...
llvm-svn: 10545
2003-12-20 02:03:14 +00:00
Chris Lattner
9bcae072d1
Cleanup the JIT as per PR176. This renames the VM class to JIT, and merges the
...
VM.cpp and JIT.cpp files into JIT.cpp. This also splits some nasty code out
into TargetSelect.cpp so that people hopefully won't notice it. :)
llvm-svn: 10544
2003-12-20 01:46:27 +00:00
Chris Lattner
32ccf7e196
Update for changes in the JIT
...
llvm-svn: 10543
2003-12-20 01:45:17 +00:00
Chris Lattner
833c3c2597
Rip JIT specific stuff out of TargetMachine, as per PR176
...
llvm-svn: 10542
2003-12-20 01:22:19 +00:00
Chris Lattner
80a4508614
Eliminate a spurious warning
...
llvm-svn: 10540
2003-12-19 19:48:43 +00:00
Chris Lattner
fc7bdac1b3
Fix ADCE/2003-12-19-MergeReturn.llx
...
llvm-svn: 10539
2003-12-19 09:08:34 +00:00
Chris Lattner
b141a2aca6
New testcase for missed optimization
...
llvm-svn: 10538
2003-12-19 09:08:15 +00:00
Chris Lattner
b8b9163a2f
Expand on the AliasSetTracker a bit, so I can remember this next time I come back to it. :)
...
llvm-svn: 10537
2003-12-19 08:43:07 +00:00
Chris Lattner
918460190f
Remove the wierd "Operands" loop, by traversing basicblocks in reverse order
...
llvm-svn: 10536
2003-12-19 08:18:16 +00:00
Chris Lattner
86dd6d835c
Add support for people calling main recursively
...
llvm-svn: 10535
2003-12-19 07:51:46 +00:00
Chris Lattner
547192d688
Implement LICM/sink_multiple.ll, by sinking all possible instructions in the
...
loop before hoisting any.
llvm-svn: 10534
2003-12-19 07:22:45 +00:00
Chris Lattner
a2d66a5ada
New testcase
...
llvm-svn: 10533
2003-12-19 06:54:37 +00:00
Chris Lattner
3d35e879dc
Turn QOI section into CQ section (QUI can be added later if needed)
...
Add PR187
llvm-svn: 10532
2003-12-19 06:31:56 +00:00
Chris Lattner
031a3f8cc7
Generalize a special case to fix PR187
...
llvm-svn: 10531
2003-12-19 06:27:08 +00:00
Chris Lattner
91daeb5431
Factor code out into the Utils library
...
llvm-svn: 10530
2003-12-19 05:58:40 +00:00
Chris Lattner
04efa4b155
Add new function
...
llvm-svn: 10529
2003-12-19 05:56:28 +00:00
Chris Lattner
8f668f26a6
If -enable-linscan is specified, add ENABLE_LINEARSCAN=1 to the make commandline
...
llvm-svn: 10527
2003-12-19 03:47:31 +00:00
Chris Lattner
4953be9c73
Update template
...
llvm-svn: 10525
2003-12-19 03:34:46 +00:00
Alkis Evlogimenos
7139090fd2
Remove TwoAddressInstruction from the public headers and add an ID
...
instead, since this pass doesn't expose any state to its users.
llvm-svn: 10520
2003-12-18 22:40:24 +00:00
Brian Gaeke
bbe0f1d795
Add install target for libraries.
...
llvm-svn: 10519
2003-12-18 20:57:48 +00:00
Chris Lattner
8f88cdfa22
Prune some #includes
...
Add a statistic for # reloads
llvm-svn: 10518
2003-12-18 20:25:31 +00:00
John Criswell
b22e9b4b35
Reverted back to previous revision - this was previously merged
...
according to the CVS log messages.
llvm-svn: 10517
2003-12-18 17:19:19 +00:00
John Criswell
86a3a48697
Merged in RELEASE_11.
...
llvm-svn: 10516
2003-12-18 16:43:17 +00:00
Alkis Evlogimenos
e5e2bd6777
Modify linear scan register allocator to use the two-address
...
instruction pass. This also fixes all remaining bugs for this new
allocator to pass all tests under test/Programs.
llvm-svn: 10515
2003-12-18 13:15:02 +00:00
Alkis Evlogimenos
3bd69eaac5
Fix bug in reserved registers. DH actually aliases DX and EDX which
...
are not reserved registers.
llvm-svn: 10514
2003-12-18 13:12:18 +00:00
Alkis Evlogimenos
c17d57bd82
Modify local register allocator to use the two-address instruction pass.
...
llvm-svn: 10513
2003-12-18 13:08:52 +00:00
Alkis Evlogimenos
725021cb6c
Add TwoAddressInstructionPass to handle instructions that have two or
...
more operands and the two first operands are constrained to be the
same. The pass takes an instruction of the form:
a = b op c
and transforms it into:
a = b
a = a op c
and also preserves live variables.
llvm-svn: 10512
2003-12-18 13:06:04 +00:00
Alkis Evlogimenos
4d87219486
Rename LiveIntervals::expired() to LiveIntervals::expiredAt().
...
llvm-svn: 10511
2003-12-18 08:56:11 +00:00
Alkis Evlogimenos
15b8036b29
When a variable is killed and redifined in a basic block only one
...
killing instruction is tracked. This causes the LiveIntervals to
create bogus intervals. The workaound is to add a range to the
interval from the redefinition to the end of the basic block.
llvm-svn: 10510
2003-12-18 08:53:43 +00:00
Alkis Evlogimenos
40874c708f
Handle multiple virtual register definitions gracefully.
...
Move some of the longer LiveIntervals::Interval method out of the
header and add debug information to them. Fix bug and simplify range
merging code.
llvm-svn: 10509
2003-12-18 08:48:48 +00:00
Chris Lattner
b3fdf83d17
add boog
...
llvm-svn: 10508
2003-12-18 08:16:25 +00:00
Chris Lattner
9e2b42a0c8
When we delete instructions from the loop, make sure to remove them from the
...
AliasSetTracker as well.
llvm-svn: 10507
2003-12-18 08:12:32 +00:00
Chris Lattner
44fea5416d
Add a new AliassetTracker::remove method. Because we need to be able to remove
...
a pointer from an AliasSet, maintain the pointer values on a doubly linked
list instead of a singly linked list, to permit efficient removal from the
middle of the list.
llvm-svn: 10506
2003-12-18 08:11:56 +00:00
Chris Lattner
cb6dfffa63
Check in patch that Reid submitted
...
llvm-svn: 10505
2003-12-18 06:40:22 +00:00
Misha Brukman
3096ca319a
Fix the links to match our 'llvm' namespace in doxygen-generated docs.
...
llvm-svn: 10504
2003-12-17 23:10:49 +00:00
Misha Brukman
ee158ca708
* Converted C-style comments to C++
...
* Doxygenified comments
* Reordered #includes
llvm-svn: 10503
2003-12-17 22:08:20 +00:00
Misha Brukman
0f42585924
Reordered #includes.
...
llvm-svn: 10502
2003-12-17 22:06:28 +00:00
Misha Brukman
426275b96d
Doxygenified some comments, reduced extraneous space.
...
llvm-svn: 10501
2003-12-17 22:06:08 +00:00
Misha Brukman
b01a80aa94
Reorganized the Sparc backend to be more modular -- each different
...
implementation of a Target{RegInfo, InstrInfo, Machine, etc} now has a separate
header and a separate implementation file.
This means that instead of a massive SparcInternals.h that forces a
recompilation of the whole target whenever a minor detail is changed, you should
only recompile a few files.
Note that SparcInternals.h is still around; its contents should be minimized.
llvm-svn: 10500
2003-12-17 22:04:00 +00:00
Misha Brukman
423ad188da
Since we are now in the 'llvm' namespace, the mangled C++ name of structs
...
and hence the links, all change.
llvm-svn: 10495
2003-12-17 18:46:49 +00:00
John Criswell
d4e013e885
Added Stacker to Reid Spencer's list of contributions.
...
llvm-svn: 10494
2003-12-17 18:15:04 +00:00
Brian Gaeke
0a9980582d
Make getObjectType() smarter about ranlibbed Mac OS X archives.
...
llvm-svn: 10493
2003-12-17 00:18:18 +00:00
Misha Brukman
91ed92fe5f
Disable __attribute__((weak)) on Mac OS X and other lame platforms.
...
llvm-svn: 10489
2003-12-16 22:57:30 +00:00
Chris Lattner
e7670a0bbb
Add a faq entry for the demo page
...
llvm-svn: 10488
2003-12-16 22:33:55 +00:00
Brian Gaeke
b69acf9a87
Fix typo in comment.
...
llvm-svn: 10487
2003-12-16 21:55:45 +00:00
Chris Lattner
e5ac39d664
There is no reason to add -load support to LLC
...
llvm-svn: 10483
2003-12-15 23:10:25 +00:00
Misha Brukman
34cba91956
Added info about PR186: weak linkage on memory functions.
...
llvm-svn: 10479
2003-12-15 22:48:12 +00:00
Misha Brukman
97f451555d
Make all memory functions have weak linkage so that they can be overridden with
...
custom memory-management implementations (e.g., bash).
llvm-svn: 10478
2003-12-15 22:32:50 +00:00
Chris Lattner
6c08bb8b8e
Fix for PR185 & IndVarsSimplify/2003-12-15-Crash.llx
...
llvm-svn: 10473
2003-12-15 17:34:02 +00:00
Chris Lattner
98c265a382
New testcase, for PR185
...
llvm-svn: 10471
2003-12-15 17:33:41 +00:00