Brian Gaeke
5d29845f19
Cygwin defines log2 as a macro. Undef it here IFF it has already been defined,
...
so that we always get the inline function instead. Remember, kids, like it says
in the GCC manual, "An Inline Function is As Fast As a Macro."
llvm-svn: 11815
2004-02-25 01:53:45 +00:00
Brian Gaeke
eae0364189
FunctionLiveVarInfo.h moved: include/llvm/CodeGen -> lib/Target/Sparc/LiveVar
...
llvm-svn: 11804
2004-02-24 19:46:00 +00:00
Chris Lattner
9f2c8c7ea5
Add some helpful methods for dealing with switch instructions
...
llvm-svn: 11794
2004-02-24 06:26:00 +00:00
Chris Lattner
da760e3e77
Hrm, my find must have been faulty. It didn't remove these as well.
...
llvm-svn: 11788
2004-02-24 03:54:22 +00:00
Chris Lattner
8138c7e4a2
Boost is now unneeded, thanks to the fix for PR253, contributed by Reid Spencer!
...
llvm-svn: 11787
2004-02-24 03:53:00 +00:00
Chris Lattner
e532a181c7
Use the new LLVM is_class template instead of the boost one, allowing us to
...
remove our dependency on boost! Thanks to Reid Spencer for making this possible!
llvm-svn: 11785
2004-02-24 03:50:05 +00:00
Chris Lattner
341a8ac05c
Check in a new type_traits header which provides the mysterious is_class
...
template. Thanks go out to Reid Spencer for skillfully extracting this
from boost!
llvm-svn: 11784
2004-02-24 03:49:29 +00:00
Chris Lattner
54abbdd4db
Noone cares about similarity to boost
...
llvm-svn: 11783
2004-02-24 03:47:25 +00:00
Brian Gaeke
74d4e2a05c
DataTypes.h is now output from configure, and shortened
...
llvm-svn: 11778
2004-02-23 22:07:26 +00:00
Brian Gaeke
dd067686e1
Regenerated with autoheader-2.57.
...
llvm-svn: 11773
2004-02-23 21:30:39 +00:00
Brian Gaeke
6620134331
ThreadSupport.h is now output from configure.
...
llvm-svn: 11770
2004-02-23 21:30:29 +00:00
Brian Gaeke
7715d8e2ba
Renamed to hash_set.in; move to using autoconf substitution tags.
...
llvm-svn: 11765
2004-02-23 18:56:36 +00:00
Brian Gaeke
3d632e3fd5
Renamed to hash_map.in; move to using autoconf substitution tags.
...
llvm-svn: 11764
2004-02-23 18:56:35 +00:00
Brian Gaeke
13ca0bda3f
Regenerated using autoheader-2.57.
...
llvm-svn: 11762
2004-02-23 18:56:04 +00:00
Brian Gaeke
2cb1841335
Renamed from include/Support/iterator. Doxygenify comments; add autoconf substitution tags.
...
llvm-svn: 11754
2004-02-23 18:16:10 +00:00
Brian Gaeke
560c89141f
Replaced by include/Support/iterator.in.
...
llvm-svn: 11753
2004-02-23 18:16:10 +00:00
Brian Gaeke
c84da72de7
Regenerated with autoheader-2.57.
...
llvm-svn: 11752
2004-02-23 18:16:09 +00:00
Alkis Evlogimenos
9b103024ef
Refactor rewinding code for finding the first terminator of a basic
...
block into MachineBasicBlock::getFirstTerminator().
This also fixes a bug in the implementation of the above in both
RegAllocLocal and InstrSched, where instructions where added after the
terminator if the basic block's only instruction was a terminator (it
shouldn't matter for RegAllocLocal since this case never occurs in
practice).
llvm-svn: 11748
2004-02-23 18:14:48 +00:00
Alkis Evlogimenos
850bd0819f
Move LiveIntervals.h to lib/CodeGen since it shouldn't be exposed to other parts of the compiler
...
llvm-svn: 11719
2004-02-23 00:50:15 +00:00
Alkis Evlogimenos
7f7d70a53c
Move MOTy::UseType enum into MachineOperand. This eliminates the
...
switch statements in the constructors and simplifies the
implementation of the getUseType() member function. You will have to
specify defs using MachineOperand::Def instead of MOTy::Def though
(similarly for Use and UseAndDef).
llvm-svn: 11715
2004-02-22 19:23:26 +00:00
Alkis Evlogimenos
abc8efe386
Fix silly bug in implementation of getUseType(). Thanks Misha.
...
llvm-svn: 11711
2004-02-22 07:24:19 +00:00
Alkis Evlogimenos
6998610eda
When folding memory operands in machine instructions be careful to
...
leave register operands with the same use/def flags as the original
instruction.
llvm-svn: 11709
2004-02-22 06:54:26 +00:00
Chris Lattner
a3f44e7098
Significantly simplify gep_type_iterator, and make its interface more general/powerful
...
llvm-svn: 11708
2004-02-22 06:27:03 +00:00
Alkis Evlogimenos
32d12d31ae
Abstract merging of ranges away from number of slots per instruction.
...
Also make it less aggressive as the current implementation breaks in
some cases.
llvm-svn: 11696
2004-02-22 04:05:13 +00:00
Chris Lattner
7906b0bc03
Update comments and add warning
...
llvm-svn: 11691
2004-02-21 22:27:20 +00:00
Brian Gaeke
2aa4c4f955
Regenerated using autoheader-2.57.
...
llvm-svn: 11657
2004-02-20 06:40:58 +00:00
Alkis Evlogimenos
f32239a5c6
Too many changes in one commit:
...
1. LiveIntervals now implement a 4 slot per instruction model. Load,
Use, Def and a Store slot. This is required in order to correctly
represent caller saved register clobbering on function calls,
register reuse in the same instruction (def resues last use) and
also spill code added later by the allocator. The previous
representation (2 slots per instruction) was insufficient and as a
result was causing subtle bugs.
2. Fixes in spill code generation. This was the major cause of
failures in the test suite.
3. Linear scan now has core support for folding memory operands. This
is untested and not enabled (the live interval update function does
not attempt to fold loads/stores in instructions).
4. Lots of improvements in the debugging output of both live intervals
and linear scan. Give it a try... it is beautiful :-)
In summary the above fixes all the issues with the recent reserved
register elimination changes and get the allocator very close to the
next big step: folding memory operands.
llvm-svn: 11654
2004-02-20 06:15:40 +00:00
Chris Lattner
1316ee07fa
Add a method useful for updating DSA
...
llvm-svn: 11636
2004-02-19 21:27:50 +00:00
Chris Lattner
cd1fbde16a
Add a new function
...
llvm-svn: 11630
2004-02-19 20:03:08 +00:00
Chris Lattner
6c338f7627
ADd a method for when an instruction moves
...
llvm-svn: 11626
2004-02-19 18:28:22 +00:00
Chris Lattner
436ab13009
Add a MachineBasicBlock::getParent() method
...
llvm-svn: 11622
2004-02-19 16:13:54 +00:00
Alkis Evlogimenos
59c646da40
Make ToolExecutionError inherit std::exception and implement its
...
interface: getMessage() is gone, use what() instead.
llvm-svn: 11621
2004-02-19 07:39:26 +00:00
Alkis Evlogimenos
ef9c4f4339
This is needed by assignment verification in linear-scan.
...
llvm-svn: 11618
2004-02-19 01:10:55 +00:00
Chris Lattner
00012233a7
Add support for just compiling a program
...
llvm-svn: 11610
2004-02-18 23:24:29 +00:00
Alkis Evlogimenos
d4fd43dee8
Move unused typedefs in private section. Add method to return interval
...
given a register.
llvm-svn: 11608
2004-02-18 23:14:52 +00:00
Chris Lattner
15a1c4c452
Byebye method
...
llvm-svn: 11598
2004-02-18 20:38:12 +00:00
Chris Lattner
72ce97cc95
When an error occurs executing a tool, we now throw an exception instead
...
of calling exit(1).
llvm-svn: 11593
2004-02-18 20:21:57 +00:00
Chris Lattner
217adea39e
Change the order of the arguments to the ctor, allowing us to make the boolean default to true
...
llvm-svn: 11592
2004-02-18 20:20:52 +00:00
Chris Lattner
ea6910de90
Move a helper class out of bugpoint to here.
...
llvm-svn: 11582
2004-02-18 17:16:17 +00:00
Chris Lattner
34f3bce70c
eliminate a pair of really inefficient methods now that noone uses them
...
llvm-svn: 11579
2004-02-18 16:45:22 +00:00
Chris Lattner
f877cd09d0
The CBE is no longer in llvm-dis
...
llvm-svn: 11532
2004-02-17 06:39:48 +00:00
Chris Lattner
affbcb6be5
Simplify and document the new interface
...
llvm-svn: 11524
2004-02-17 05:54:26 +00:00
Alkis Evlogimenos
a479dc4715
Add LiveIntervals::Interval::empty() member function.
...
llvm-svn: 11520
2004-02-17 05:14:37 +00:00
Alkis Evlogimenos
c4ec9111bb
Add API to check and fold memory operands into instructions.
...
llvm-svn: 11519
2004-02-17 04:33:18 +00:00
Chris Lattner
0b89611d3f
Add two missing pieces from last checkin
...
llvm-svn: 11513
2004-02-17 03:03:36 +00:00
Chris Lattner
e26c3df17f
Rearrange code to eliminate warnings
...
llvm-svn: 11512
2004-02-17 02:58:36 +00:00
Alkis Evlogimenos
790b000aa7
Add LeakDetection to MachineInstr.
...
Move out of line member functions of MachineBasicBlock to
MachineBasicBlock.cpp.
llvm-svn: 11497
2004-02-16 07:17:43 +00:00
Alkis Evlogimenos
1026a01d5a
Eliminate the use of spill (reserved) registers.
...
llvm-svn: 11476
2004-02-15 10:24:21 +00:00
Chris Lattner
363cd9e4b8
Add a new ConstantAggregateZero class, to fix PR239. This makes zero
...
initializers for constant structs and arrays take constant space, instead of
space proportinal to the number of elements. This reduces the memory usage of
the LLVM compiler by hundreds of megabytes when compiling some nasty SPEC95
benchmarks.
llvm-svn: 11470
2004-02-15 05:53:04 +00:00
Chris Lattner
bbe538e930
finegrainify namespacification
...
llvm-svn: 11469
2004-02-15 05:52:36 +00:00
Chris Lattner
0f819b9523
ConstantArray::get and ConstantStruct::get now just return pointers to
...
'Constant', instead of specific subclass pointers. In the future, these will
return an instance of ConstantAggregateZero if all of the inputs are zeros.
llvm-svn: 11467
2004-02-15 04:14:47 +00:00
Chris Lattner
b8bfcaff7e
The prologue/epilogue related method calls have no reason to return a value,
...
make them return void.
llvm-svn: 11447
2004-02-14 19:49:05 +00:00
Chris Lattner
cdfcb976c7
Add llvm.memset/frameaddress/returnaddress intrinsics.
...
llvm-svn: 11431
2004-02-14 02:47:17 +00:00
Alkis Evlogimenos
fa9e207a22
Add next() and prior() iterator utility functions. Unlike std::advance
...
they do not modify the passed iterator but return a copy.
next(myIt) returns copy of myIt incremented once
next(myIt, n) returns copy of myIt incremented n times
prior(myIt) returns copy of myIt decremented once
prior(myIt, n) returns copy of myIt decremented n times
While at it remove obsolete implementation of mapped_iterator.
llvm-svn: 11429
2004-02-14 01:17:28 +00:00
Chris Lattner
1bad051558
Add method
...
llvm-svn: 11425
2004-02-14 00:30:31 +00:00
Chris Lattner
8641f2fb58
Make sure to provide a prototype for the cbackend
...
llvm-svn: 11419
2004-02-13 23:36:03 +00:00
Chris Lattner
c3f1cb677f
The cbackend has never had anything to do with llvm assembly writing
...
llvm-svn: 11411
2004-02-13 23:19:51 +00:00
Chris Lattner
d2cd0afd11
Change access to the cwriter
...
llvm-svn: 11406
2004-02-13 23:00:45 +00:00
Alkis Evlogimenos
6d6ab846af
Remove getAllocatedRegNum(). Use getReg() instead.
...
llvm-svn: 11393
2004-02-13 21:01:20 +00:00
Alkis Evlogimenos
e504fa6710
Mark MachineBasicBlock::operator[] deprecated.
...
llvm-svn: 11392
2004-02-13 20:05:56 +00:00
Alkis Evlogimenos
c109214f58
Add getNumVirtualRegs().
...
Whitespace cleanups.
llvm-svn: 11388
2004-02-13 18:07:06 +00:00
Misha Brukman
47df5a35ec
Fix spelling of `tendency'.
...
llvm-svn: 11378
2004-02-13 16:23:14 +00:00
Chris Lattner
2b87d0184b
Expose a pass ID for lower-invoke
...
llvm-svn: 11377
2004-02-13 16:16:35 +00:00
Brian Gaeke
50719e9dbc
Update the example here in the header file.
...
I don't know about you guys, but I rarely read the .html manuals :-)
llvm-svn: 11366
2004-02-13 04:49:04 +00:00
Brian Gaeke
7707461afa
Include <iosfwd>.
...
Add prototypes for MachineBasicBlock's dump() and print() methods.
llvm-svn: 11365
2004-02-13 04:40:15 +00:00
Alkis Evlogimenos
00d97b6a13
Move ilist_trairs<MachineInstr> in MachineBasicBlock.
...
llvm-svn: 11358
2004-02-12 19:12:03 +00:00
Alkis Evlogimenos
3ecdcd18c5
Add parent pointer to MachineInstr that points to owning
...
MachineBasicBlock. Also change opcode to a short and numImplicitRefs
to an unsigned char so that overall MachineInstr's size stays the
same.
llvm-svn: 11357
2004-02-12 18:49:07 +00:00
Chris Lattner
7c8aebbdbc
Add support for the llvm.memmove intrinsic.
...
Patch graciously contributed by Reid Spencer!
llvm-svn: 11354
2004-02-12 18:10:10 +00:00
Chris Lattner
d2ee2d61ac
Urg, check in header I forgot. :(
...
llvm-svn: 11353
2004-02-12 17:57:11 +00:00
Chris Lattner
ef375052c6
Rename the opCode instance variable to Opcode
...
llvm-svn: 11348
2004-02-12 16:09:53 +00:00
Chris Lattner
04c37927bd
Remove a dead field from MachineInstr!
...
llvm-svn: 11347
2004-02-12 16:05:03 +00:00
Alkis Evlogimenos
94cab18bdc
Change interface so that we can add to the end of a basic block
...
without getting an assertion from ilist that we are dereferencing
ilist<T>::end().
llvm-svn: 11345
2004-02-12 08:11:04 +00:00
Brian Gaeke
57484e290d
Add one more doxygen comment.
...
llvm-svn: 11344
2004-02-12 04:26:49 +00:00
Brian Gaeke
840e7e40fe
Express one of MachineOperand's many constructors in terms of another, by means of default arguments.
...
llvm-svn: 11343
2004-02-12 04:15:00 +00:00
Brian Gaeke
0608698c34
Remove these MachineOpCodeFlags and their accessor - they are never set.
...
llvm-svn: 11341
2004-02-12 04:00:55 +00:00
Alkis Evlogimenos
b755d35fd2
Change MachineBasicBlock's vector of MachineInstr pointers into an
...
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.
llvm-svn: 11340
2004-02-12 02:27:10 +00:00
Brian Gaeke
2e521768eb
Remove getOpCode(). Help doxygenify some comments.
...
llvm-svn: 11338
2004-02-12 01:34:03 +00:00
Chris Lattner
9250e48a76
If a node has more than 64 outgoing edges, make the edges go from the 'truncated' block,
...
instead of dropping them entirely.
llvm-svn: 11334
2004-02-11 20:44:17 +00:00
Brian Gaeke
7246d4efd0
Fix typos in comments.
...
llvm-svn: 11333
2004-02-11 19:47:43 +00:00
Chris Lattner
19d997875e
Add an important prototype
...
llvm-svn: 11320
2004-02-11 06:11:06 +00:00
Chris Lattner
427c8ee657
Factor this code out of llvm-prof
...
llvm-svn: 11314
2004-02-11 05:54:25 +00:00
Chris Lattner
2f4b3a10d8
Remove long obsolete method. switch instructions are first class entities in the CFG, and have been for a LOOOONG time.
...
llvm-svn: 11303
2004-02-11 01:17:58 +00:00
Chris Lattner
a81258a786
An initial implementation of an LLVM ProfileInfo class which is designed to
...
eventually allow Passes to use profiling information to direct them.
llvm-svn: 11294
2004-02-10 22:11:42 +00:00
Misha Brukman
a372499d7b
Sprinkle liberally with comments, saute with doxygen until readable.
...
llvm-svn: 11293
2004-02-10 21:49:59 +00:00
Misha Brukman
dede07142d
Doxygenify comment.
...
llvm-svn: 11292
2004-02-10 21:48:12 +00:00
Chris Lattner
a04a1456da
Urg, the X86 backend DOES use virtual register operands. :(
...
llvm-svn: 11288
2004-02-10 21:43:11 +00:00
Chris Lattner
286169ff60
Remove and simplify some of the bewildering collection of isFOORegister
...
methods which have strangely different semantics in different backends,
and noone knew what any did.
Getting rid of these ALSO allows the dependence of MachineInstr.h on
MRegisterInfo.h to be removed, which makes me much happier, and probably
alkis too. :)
llvm-svn: 11287
2004-02-10 21:21:17 +00:00
Chris Lattner
b38552cf42
Remove some unneeded stuff
...
llvm-svn: 11286
2004-02-10 21:19:49 +00:00
Chris Lattner
04f36062ea
Eliminate MachineOperand::isPhysicalRegister. The X86 backend should use
...
MRegisterInfo::isPhysicalRegister(MO.getReg()) and the Sparc backend should
use isMachineRegister()
llvm-svn: 11279
2004-02-10 20:42:11 +00:00
Chris Lattner
854737de3f
Simplify condition, this does not change the predicate at all though
...
llvm-svn: 11275
2004-02-10 20:30:40 +00:00
Misha Brukman
11a3e8f8d7
* Added class comments
...
* Doxygenified existing comments
* Compactified code to be more consistent
llvm-svn: 11268
2004-02-10 18:44:16 +00:00
Misha Brukman
2374a1e530
Doxygen-ify comments, make function prototypes more consistent in format.
...
llvm-svn: 11259
2004-02-10 16:39:05 +00:00
Alkis Evlogimenos
2ff7101cf2
Add global methods that prevent us from using ilist::iterators as
...
random access iterators.
llvm-svn: 11248
2004-02-09 22:40:50 +00:00
Brian Gaeke
00b2107e2a
SchedGraph doesn't need to be friends with SchedGraphNodeCommon anymore.
...
llvm-svn: 11240
2004-02-09 18:43:06 +00:00
Chris Lattner
f231cb60f4
Now that all of the derived types have disciplined interfaces, we can eliminate
...
all of the ad-hoc storage of contained types. This allows getContainedType to
not be virtual, and allows us to entirely delete the TypeIterator class.
llvm-svn: 11230
2004-02-09 05:40:24 +00:00
Chris Lattner
fd4417ba18
Increase encapsulation of the StructType class, eliminating the getElementTypes() member
...
llvm-svn: 11227
2004-02-09 04:36:50 +00:00
Chris Lattner
cb8c4b9d1b
Improve encapsulation in the FunctionType class, by adding param_(iterator/begin/end)
...
members, and eliminating the getParamTypes() method, and the associated typedef.
llvm-svn: 11223
2004-02-09 04:12:57 +00:00
Chris Lattner
68fdb35576
rename the "exceptional" destination of an invoke instruction to the 'unwind' dest
...
llvm-svn: 11202
2004-02-08 21:44:31 +00:00
Chris Lattner
32a3eb0b88
Substantially improve the DSA code by removing 'forwarding' nodes from
...
DSGraphs while they are forwarding. When the last reference to the forwarding
node is dropped, the forwarding node is autodeleted. This should simplify
removeTriviallyDead nodes, and is only (efficiently) possible because we are
using an ilist of dsnodes now.
llvm-svn: 11175
2004-02-08 01:27:18 +00:00
Chris Lattner
29067016a4
Switch the Nodes list from being an std::vector<DSNode*> to an ilist<DSNode>
...
llvm-svn: 11173
2004-02-08 00:53:26 +00:00
Chris Lattner
aaa095c8f4
One of the 'annoying' things about ilists is that the iterators don't behave
...
quite the same as for non-intrusive lists of pointers to nodes. To support
transitioning code bases, add a new 'compatibility' iterator.
llvm-svn: 11172
2004-02-08 00:51:31 +00:00
Chris Lattner
e78429de24
Change to use iterators instead of direct access
...
llvm-svn: 11170
2004-02-08 00:22:41 +00:00
Chris Lattner
48a0d7e1c0
Abstract out the Nodes collection. Instead of providing a getNodes() method,
...
provide node_begin/end iterators, which are only guaranteed to be
bidirectional, not random access.
llvm-svn: 11165
2004-02-07 23:57:09 +00:00
Chris Lattner
2199bb0c7a
Actually USE isForwarding method
...
llvm-svn: 11160
2004-02-07 23:02:32 +00:00
Chris Lattner
6337300b83
As Alkis pointed out to me, I forgot to commit this... :(
...
llvm-svn: 11159
2004-02-07 22:54:19 +00:00
Brian Gaeke
6a4cdc6ee6
Use autoconf answers from config.h (FIXME, should autoconf this file
...
directly instead).
Fix LockHolder/MutexLocker typo.
llvm-svn: 11156
2004-02-06 22:33:17 +00:00
Misha Brukman
dafb899df2
Fix grammar.
...
llvm-svn: 11153
2004-02-06 18:40:35 +00:00
Alkis Evlogimenos
676e5b8997
Modify the two address instruction pass to remove the duplicate
...
operand of the instruction and thus simplify the register allocation.
llvm-svn: 11124
2004-02-04 22:17:40 +00:00
Brian Gaeke
efde1c6bb8
Include <iosfwd> and <string> instead of <iostream>.
...
Take away the default iostream argument of createMachineFunctionPrinterPass(),
at Chris's request.
llvm-svn: 11121
2004-02-04 21:41:10 +00:00
Chris Lattner
0d6e2dfd13
Check in header file I forgot before.
...
llvm-svn: 11115
2004-02-04 03:59:08 +00:00
Chris Lattner
a762ad2a4f
Delete the BasicBlock ctor that only takes a BasicBlock to insert before. This
...
fails when the basic block points to the function->end. Instead, require that
the client pass in the function AND the basicblock to insert into.
llvm-svn: 11112
2004-02-04 03:57:34 +00:00
Alkis Evlogimenos
5e78d4bd75
When an instruction like: A += B had both A and B virtual registers
...
spilled, A was loaded from its stack location twice. This fixes the bug.
llvm-svn: 11093
2004-02-03 01:13:07 +00:00
Alkis Evlogimenos
e128cb3295
Revert changes. Will implement this using a different set of primitives
...
llvm-svn: 11091
2004-02-02 23:08:58 +00:00
Alkis Evlogimenos
e20cdc6437
Add MachineOperand::setDef() and MachineOperand::setUse() so that the
...
TwoAddressInstructionPass can correctly update use/def information.
llvm-svn: 11086
2004-02-02 21:55:18 +00:00
Brian Gaeke
a393704706
Add prototype for llvm::allocatePowerPCTargetMachine().
...
llvm-svn: 11072
2004-02-02 19:05:08 +00:00
Chris Lattner
f5812885e3
Correct the method I just added to actually return false sometimes
...
llvm-svn: 11069
2004-02-02 18:53:04 +00:00
Chris Lattner
990f40f069
Add a new method to ConstantFP
...
llvm-svn: 11068
2004-02-02 18:40:29 +00:00
Chris Lattner
7e93bb1d9e
The first half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx
...
llvm-svn: 11063
2004-02-01 22:48:09 +00:00
Alkis Evlogimenos
0ec32d4118
Add MRegisterInfo::getNumRegs().
...
llvm-svn: 11058
2004-02-01 17:14:20 +00:00
Chris Lattner
fd937e9d01
Add comments
...
llvm-svn: 11042
2004-02-01 00:32:48 +00:00
Alkis Evlogimenos
d1ec5f36ee
Merge safe parts from last night's buggy commit. These do not break
...
any test cases :-)
llvm-svn: 11032
2004-01-31 19:59:32 +00:00
Chris Lattner
dadbb4da4d
Add two static methods to avoid having client code explicitly compare against
...
FirstVirtualRegister
llvm-svn: 11031
2004-01-31 19:57:11 +00:00
Alkis Evlogimenos
b9df133d67
Revert last night's changes as they broke some tests. Will remerge parts of the patch.
...
llvm-svn: 11029
2004-01-31 14:37:41 +00:00
Alkis Evlogimenos
c0db519832
Several performance enhancements and cleanups from Chris.
...
Simplification of LiveIntervals::Interval::overlaps() and addition of
examples to overlaps() and liveAt() to make them clearer.
llvm-svn: 11028
2004-01-31 04:56:07 +00:00
Chris Lattner
bb4d6f00f9
Add a new pointsToConstantMemory method to the AliasAnalysis interface
...
which can be implemented to improve the quality of mod-ref information.
llvm-svn: 11020
2004-01-30 22:15:41 +00:00
Chris Lattner
8671a315d5
Add a new lazily constructed mapping from Idx's the MBB they represent
...
llvm-svn: 11017
2004-01-30 22:08:09 +00:00
Brian Gaeke
9cf840250b
Give clients of MachineFunctionPrinter the ability to specify a banner and
...
choose an ostream.
llvm-svn: 11016
2004-01-30 21:53:46 +00:00
Misha Brukman
64f7595915
Doxygenify comments.
...
llvm-svn: 11014
2004-01-30 17:22:50 +00:00
Chris Lattner
fc239578ad
Keep track of all of the globals inserted into the scalar map
...
llvm-svn: 10995
2004-01-28 03:01:22 +00:00
Chris Lattner
268db40292
Pull the ScalarMap out into something that is more structured than what we had
...
before. This allows us to have a place to implement optimizations in a
structured way.
llvm-svn: 10994
2004-01-28 02:42:12 +00:00
Chris Lattner
2ead39d5c8
Minor tweaks
...
llvm-svn: 10983
2004-01-27 21:49:42 +00:00
Chris Lattner
16a5e6bf33
Add comments, allow DSNode "copy ctor" to ignore outgoing links, add more
...
structured access to the globals list, add a couple helper methods.
llvm-svn: 10982
2004-01-27 21:49:25 +00:00
Chris Lattner
95d03595ae
* cloneReachable* and clonePartiallyInto are not obsolete
...
* Make AssertNodeInGraph not be HORRIBLY time consuming
* Eliminate the dead mergeInGlobalsGraph method
*** Add the definition for the new ReachabilityCloner class
llvm-svn: 10981
2004-01-27 21:48:35 +00:00
Alkis Evlogimenos
2a8df1739b
Fix failing test cases with joined live intervals. It turns out that
...
when joining we need to check if we overlap with the second interval
or any of its aliases.
Also make joining intervals the default.
llvm-svn: 10973
2004-01-23 13:37:51 +00:00
Chris Lattner
de6ca7bf30
Add new flag, other minor modifications
...
llvm-svn: 10969
2004-01-23 01:42:32 +00:00
Chris Lattner
99f9b84640
Fix grammar
...
llvm-svn: 10968
2004-01-23 01:42:16 +00:00
Alkis Evlogimenos
b4745bda05
Add option to join live intervals. Two intervals are joined if there
...
is a move between two registers, at least one of the registers is
virtual and the two live intervals do not overlap.
This results in about 40% reduction in intervals, 30% decrease in the
register allocators running time and a 20% increase in peephole
optimizations (mainly move eliminations).
The option can be enabled by passing -join-liveintervals where
appropriate.
llvm-svn: 10965
2004-01-22 23:08:45 +00:00
Chris Lattner
a72f3a387a
Eliminated the CompletedNodes argument to the cloneReachable* methods. This
...
map was only used to implement a marginal GlobalsGraph optimization, and it
actually slows the analysis down (due to the overhead of keeping it), so just
eliminate it entirely.
llvm-svn: 10955
2004-01-22 16:56:13 +00:00
Chris Lattner
7348bd20b1
It doesn't make sense for one side to be const, but not the other.
...
llvm-svn: 10952
2004-01-22 16:08:51 +00:00
Chris Lattner
5f0e00c8b2
Remove const qualifier (all Value*'s are nonconst in DSA, so it's not clear
...
why this one was)
Add new method proto
llvm-svn: 10950
2004-01-22 15:26:52 +00:00
Chris Lattner
f2a7d96dde
Specialize std::swap correctly
...
llvm-svn: 10949
2004-01-22 15:26:15 +00:00
Misha Brukman
38664cbb8b
To materialize a module, you need to know what functions NEED to be read and
...
which ones don't, which is state that the parent class doesn't know without
knowing the implementation. Let the children classes implement
materializeModule().
llvm-svn: 10942
2004-01-21 22:54:10 +00:00
Misha Brukman
26b6be3053
If you call abort(), #include <cstdlib>
...
llvm-svn: 10941
2004-01-21 22:50:12 +00:00
Brian Gaeke
4838716cc4
Regenerated using autoconf-2.57 and autoheader-2.57.
...
llvm-svn: 10934
2004-01-21 19:39:29 +00:00
Chris Lattner
3910d21d01
Move SlotCalculator.h from include/llvm to include/llvm/Analysis
...
llvm-svn: 10930
2004-01-20 19:50:12 +00:00
Tanya Lattner
33079fad04
Moved iterators to common file.
...
llvm-svn: 10925
2004-01-20 17:49:42 +00:00
Chris Lattner
64a4d5c1e4
add a method proto, make a method not inline
...
llvm-svn: 10921
2004-01-20 00:54:47 +00:00
Chris Lattner
d9e314f73e
Add enum for compaction table.
...
llvm-svn: 10916
2004-01-18 21:09:23 +00:00
Chris Lattner
695d454b4f
Add support for representing the "compaction table"
...
Change protected members to private. Nothing should subclass SlotCalculator
llvm-svn: 10912
2004-01-18 21:03:49 +00:00
Chris Lattner
9108f1462c
fix copy-and-pasto
...
llvm-svn: 10907
2004-01-17 22:48:06 +00:00
Chris Lattner
c5d5cc7b8f
Revision of Brian's threading support library to be a bit more generic and
...
platform independent. This code is completely untested (but never used),
and needs autoconf support for detecting pthreads, but it's a start, and
deletes two emails from my inbox. :)
llvm-svn: 10906
2004-01-17 19:54:29 +00:00
Alkis Evlogimenos
38f0f867b3
Fold open interval ends handling into
...
LiveIntervals::Interval::expiredAt() and simplify regalloc code.
llvm-svn: 10894
2004-01-16 20:17:05 +00:00
Alkis Evlogimenos
61db3621bd
Use a list instead of a vector to store intervals. This will be needed
...
when we join intervals and one of the two will need to be removed.
llvm-svn: 10892
2004-01-16 16:06:59 +00:00
Brian Gaeke
1c65ca3a84
Remove configure support for endianness checking, the need for which
...
Chris has helpfully expunged.
llvm-svn: 10873
2004-01-15 06:22:37 +00:00
Chris Lattner
0184383aa7
Remove ENDIAN_* support. LLVM does not need it anymore.
...
llvm-svn: 10872
2004-01-15 06:13:58 +00:00
Chris Lattner
4a78294f54
Remove broken doxygen comments
...
llvm-svn: 10869
2004-01-15 04:37:10 +00:00
Chris Lattner
71acf2763d
Improve comments, add support for remembering the constants strings that
...
are to be emitted.
llvm-svn: 10866
2004-01-14 23:37:43 +00:00
Chris Lattner
7ad2ec9e20
add support for -- for symmetry
...
llvm-svn: 10865
2004-01-14 23:37:22 +00:00
Chris Lattner
599ab961c4
Add new ConstantArray::isString(), as the conditions for using getString()
...
are complex enough to check that it should be a seperate method.
While I'm here, improve ConstantArray::getNullValue a bit, though the
FIXME is still quite valid.
llvm-svn: 10850
2004-01-14 17:06:21 +00:00
Chris Lattner
bcd7372d19
The only clients of the slot calculator are now the asmwriter and bcwriter.
...
Since this really only makes sense for these two, change hte instance variable
to reflect whether we are writing a bytecode file or not. This makes it
reasonable to add bcwriter specific stuff to it as necessary.
llvm-svn: 10837
2004-01-14 02:49:34 +00:00
Alkis Evlogimenos
c73c31a496
Remove allocatable registers vector. It is already provided by
...
LiveVariables.
llvm-svn: 10830
2004-01-13 22:10:43 +00:00
Brian Gaeke
fafbbe908d
Regenerated using autoheader-2.57.
...
llvm-svn: 10817
2004-01-13 07:09:57 +00:00
Chris Lattner
ebdd628dbf
Add new method
...
llvm-svn: 10809
2004-01-12 23:18:06 +00:00
Chris Lattner
f6f9aafee4
Move this file to lib/VMCore
...
llvm-svn: 10804
2004-01-12 20:47:29 +00:00
Chris Lattner
0c243f5c04
Eliminate a lot of out-of-date comments, and all of the wierd overloaded
...
operator constant folding stuff.
llvm-svn: 10803
2004-01-12 20:43:44 +00:00
Chris Lattner
cf1d9df549
The getShift method is no obsolete
...
llvm-svn: 10797
2004-01-12 19:37:26 +00:00
Chris Lattner
98a45667fb
llvm::ConstantFoldInstruction
...
llvm-svn: 10787
2004-01-12 18:25:56 +00:00
Chris Lattner
28e5347635
Move prototype of llvm::ConstantFoldInstruction
...
llvm-svn: 10786
2004-01-12 18:25:44 +00:00
Alkis Evlogimenos
ef7c077e63
Make LiveVariables::HandlePhysRegUse and
...
LiveVariables::HandlePhysRegDef private they use information that is
not in memory when LiveVariables finishes the analysis.
Also update the TwoAddressInstructionPass to not use this interface.
llvm-svn: 10755
2004-01-11 09:18:45 +00:00
Chris Lattner
95db39508d
Minor cleanup
...
llvm-svn: 10752
2004-01-10 21:40:29 +00:00
Chris Lattner
852fe1861f
Remove standard C file wrapper
...
llvm-svn: 10746
2004-01-10 19:15:00 +00:00
Chris Lattner
362ac0817b
Remove wrapper for standard C file, use <cstdlib> instead
...
llvm-svn: 10745
2004-01-10 19:12:44 +00:00
Chris Lattner
67ad3eb9f0
Dead file, use <cstring> instead of this.
...
llvm-svn: 10743
2004-01-10 19:10:22 +00:00
Chris Lattner
00f2e379c6
remove obsolete file
...
llvm-svn: 10740
2004-01-10 19:00:26 +00:00
Chris Lattner
d9020d0485
Remove an obsolete method, including its _long_ out of date comment.
...
This is an incremental step towards fixing PR82
llvm-svn: 10723
2004-01-09 05:45:58 +00:00
Chris Lattner
1013a3ae58
Remove yet another obsolete comment :)
...
llvm-svn: 10720
2004-01-08 22:28:45 +00:00
Brian Gaeke
4fecad2bb2
Fix typos. Rewrite head-of-file comment.
...
llvm-svn: 10719
2004-01-08 22:21:59 +00:00
Brian Gaeke
a1f8f69add
Fix typos. Regularize include guard.
...
llvm-svn: 10718
2004-01-08 22:21:58 +00:00
Chris Lattner
1736f44b1d
Improve encapsulation in the Loop and LoopInfo classes by eliminating the
...
getSubLoops/getTopLevelLoops methods, replacing them with iterator-based
accessors.
llvm-svn: 10714
2004-01-08 00:09:44 +00:00
Chris Lattner
2ef279d638
add new intrinsic
...
llvm-svn: 10700
2004-01-06 05:32:17 +00:00
Chris Lattner
455225f717
add new method
...
llvm-svn: 10699
2004-01-06 05:31:57 +00:00
Chris Lattner
d3277ccf56
/me slaps forehead
...
llvm-svn: 10693
2004-01-05 05:45:25 +00:00
Chris Lattner
f9d6642d90
Add some intrinsics
...
llvm-svn: 10690
2004-01-05 05:35:34 +00:00
Chris Lattner
0aaaa6b6b0
Initial implementation of some source-level debugging stuff
...
llvm-svn: 10684
2004-01-05 05:23:38 +00:00
Chris Lattner
d11cffdfc6
Add new ExecutionEngine::getGlobalValueAtAddress method, which can efficiently
...
turn a memory address back into the LLVM global object that starts at that
address. Note that this won't cause any additional datastructures to be built
for clients of the EE that don't need this information.
llvm-svn: 10673
2003-12-31 20:19:31 +00:00
Chris Lattner
a00f627c1d
* Add a new helper progress method
...
* Make sure that the user sees the 100% mark
* Don't bother printing out X.0%, just print out X%
llvm-svn: 10672
2003-12-31 10:20:38 +00:00
Chris Lattner
167644f2e1
Add some comments, add a new getGlobalVariable method
...
llvm-svn: 10670
2003-12-31 08:42:27 +00:00
Chris Lattner
3f6af8506e
* Make Module::getTypeName const
...
* Add new Module::getTypeByName method
* Group methods in Module.cpp better
llvm-svn: 10668
2003-12-31 07:09:33 +00:00
Chris Lattner
24a9176b66
Make the lookup method const.
...
llvm-svn: 10667
2003-12-31 07:08:19 +00:00
Chris Lattner
bb7e1ba75c
add new function
...
llvm-svn: 10665
2003-12-31 06:16:02 +00:00
Chris Lattner
4665cfa458
clarify comments
...
llvm-svn: 10663
2003-12-31 05:45:16 +00:00
Chris Lattner
ef4810619d
New class, useful for command-line interactive programs.
...
llvm-svn: 10662
2003-12-31 05:40:02 +00:00
Chris Lattner
fa545f3641
doxygenify
...
llvm-svn: 10661
2003-12-31 04:42:00 +00:00
Chris Lattner
ad4af70911
Add new function
...
llvm-svn: 10648
2003-12-30 07:35:47 +00:00
Chris Lattner
412295aeaa
Further revisions of the FDHandle idea. In this version we use ownership
...
semantics that are the same as those used by std::auto_ptr. This allows
copying of FDHandle's, but copying transfers ownership.
llvm-svn: 10646
2003-12-30 02:45:16 +00:00
Chris Lattner
bbc20a4d18
Add a new class useful for providing fully materialized modules to ExecutionEngine's
...
llvm-svn: 10645
2003-12-30 02:44:04 +00:00
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
f1cec019d4
add new function
...
llvm-svn: 10638
2003-12-29 05:06:38 +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