1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 14:32:51 +01:00
Commit Graph

2479 Commits

Author SHA1 Message Date
Reid Spencer
da2e8b9943 First version of the MappedFile abstraction for operating system idependent
mapping of files. This first version uses mmap where its available. The
class needs to implement an alternate mechanism based on malloc'd memory
and file reading/writing for platforms without virtual memory.

llvm-svn: 16649
2004-10-04 11:08:32 +00:00
Reid Spencer
d2bedc512d First version of a support utility to provide generalized compression in
LLVM that handles availability and unavailability of bzip2 and zlib.

llvm-svn: 16648
2004-10-04 10:49:41 +00:00
Alkis Evlogimenos
bbc01f13fc Add const version of getLastBlock() member function.
llvm-svn: 16625
2004-09-30 21:42:02 +00:00
Alkis Evlogimenos
dbf62db0d0 Remove whitespace from the end of the line.
llvm-svn: 16624
2004-09-30 21:39:47 +00:00
Brian Gaeke
63338063d0 Add accessor function prototypes for reoptimizer support passes.
Make accessors return FunctionPass* as appropriate.

llvm-svn: 16619
2004-09-30 20:13:55 +00:00
Chris Lattner
89a80a46f1 Be consistent with our naming
llvm-svn: 16552
2004-09-28 18:37:00 +00:00
Chris Lattner
c92b280e0d Capture information about whether the target instructions have delay slots
llvm-svn: 16550
2004-09-28 18:33:50 +00:00
Alkis Evlogimenos
4f5920aaef Add includes and use std:: for standard library calls to make code
compile on windows. This patch was contributed by Paolo Invernizzi.

llvm-svn: 16539
2004-09-28 14:42:44 +00:00
Alkis Evlogimenos
adea49eec0 Use class instead of struct for defining classes. This unbreaks the
build on windows. Patch contributed by Paolo Invernizzi!

llvm-svn: 16531
2004-09-28 01:59:17 +00:00
Reid Spencer
0dbad34203 Clean up the interface of TimeValue:
- get rid of unneeded constructors
- get rid of duplicate methods/constructors/operators
- normalize to LLVM coding standards
- wrap to 80 columns.

Many thanks to Alkis Evlogimenos for his suggestions.

llvm-svn: 16514
2004-09-25 08:29:54 +00:00
Reid Spencer
894f394594 Initial implementation of the TimeValue abstraction.
llvm-svn: 16511
2004-09-24 23:25:19 +00:00
John Criswell
8e633294c2 Updated the last two header files so that they are configured with
AC_CONFIG_HEADERS.  This should prevent LLVM from needlessly re-compiling
on a re-configure.

llvm-svn: 16510
2004-09-24 21:19:06 +00:00
John Criswell
bd7cfd3d74 Modified hash_map and hash_set configuration so that they are not
regenerated on every run of configure.

llvm-svn: 16509
2004-09-24 18:28:00 +00:00
John Criswell
52263072bc Configure Datatypes.h.in with AC_CONFIG_HEADERS. This should prevent it
from being re-generated if the new version is identical to the old version.
Hence, it should save us some recompiling after re-configures.

llvm-svn: 16506
2004-09-24 13:28:51 +00:00
Reid Spencer
67f6472f19 Change Value from a "struct" to a "class" so that VC 7.1 doesn't generate
missing symbols when its referenced as a class.

llvm-svn: 16496
2004-09-23 14:49:45 +00:00
Reid Spencer
8304ac75a2 Update to add the HAVE_UINT64_T test and the STACK_DIRECTION indicator.
llvm-svn: 16480
2004-09-22 15:32:08 +00:00
Reid Spencer
182e31bdc5 The alloca function, strangely enough, is found in the malloc.h header file
on MINGW platform. Provide an #elseif case to #include malloc.h for this
platform if malloc.h is found.

Patch provided by Henrik Bach. Thanks Henrik!

llvm-svn: 16479
2004-09-22 15:28:32 +00:00
Chris Lattner
43c0372c0b 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Chris Lattner
a4d3f95fa3 Do not prototype any of these passes as returning Pass*. Instead, be specific
llvm-svn: 16431
2004-09-20 04:41:39 +00:00
Chris Lattner
110bbafcf7 Add CallGraphNode::removeAnyCallEdgeTo method
llvm-svn: 16398
2004-09-18 21:34:34 +00:00
Chris Lattner
e9772b7a63 Implement new changeFunction method, nuke a never implemented one.
Add comments and doxygenify others.

llvm-svn: 16387
2004-09-18 00:22:43 +00:00
Chris Lattner
33596a1fba Make sure to update the list end when an element is removed from it. This
fixes a crash in LICM when processing povray.

llvm-svn: 16367
2004-09-15 17:00:41 +00:00
Chris Lattner
12d1ccfbd8 Add an optional argument to PromoteMemToReg
llvm-svn: 16346
2004-09-15 01:02:30 +00:00
Chris Lattner
20b39fdfb9 Add an AliasSetTracker::copyValue method
llvm-svn: 16343
2004-09-14 19:15:12 +00:00
Chris Lattner
f1450e2a51 Remove unused pass
llvm-svn: 16338
2004-09-14 16:34:08 +00:00
Reid Spencer
7bd9d86b65 Okay, the list of link-time passes wasn't such a hot idea. Its prone to
error. We'll strategize on this when we have multiple front ends to deal
with. For now llvm-ld just runs a standard set of transforms.

llvm-svn: 16333
2004-09-14 05:43:23 +00:00
Reid Spencer
28035a5b25 Add the GetLibraryPath method.
llvm-svn: 16322
2004-09-13 23:46:23 +00:00
Reid Spencer
4a1593ebd2 Add support for the link-time pass list to Modules.
llvm-svn: 16321
2004-09-13 23:44:23 +00:00
Reid Spencer
ce7c15737a Simplify the sys::Memory interface per Chris' request.
llvm-svn: 16318
2004-09-13 22:38:11 +00:00
Reid Spencer
2114c143cf Clean up the interface and implementation of sys::Program so that it is
cleanly dissociated from the sys::Path class.

llvm-svn: 16315
2004-09-13 21:48:44 +00:00
Misha Brukman
fa5efa6399 * Fix grammar
* Convert tabs to spaces

llvm-svn: 16300
2004-09-12 22:40:40 +00:00
Reid Spencer
c362a7299b Fix the replace method to assert if an item was erased from the set but not
found in the vector. Previously, it just ignored this condition.

llvm-svn: 16296
2004-09-11 20:38:25 +00:00
Reid Spencer
3655235d99 Correct the interface of a function to use the correct typedef for an
argument so that it will always compile.

llvm-svn: 16284
2004-09-11 04:29:13 +00:00
Reid Spencer
605f05bd5a Implement the remove method for deleting entries from the SetVector.
llvm-svn: 16283
2004-09-11 04:25:58 +00:00
Reid Spencer
9531457813 Make the dependent libraries list use a SetVector instead of a regular
vector so that duplicate libraries never occur within a module.

llvm-svn: 16280
2004-09-11 04:22:14 +00:00
Reid Spencer
a166926577 Initial commit of a file to declare the interface for platform independent
support for various memory allocation operations.

llvm-svn: 16279
2004-09-11 04:20:58 +00:00
Reid Spencer
af9d3fdc9d Add methods for detecting file types by magic number, getting the file name
suffix for shared objects, and stripping a path down to its base name.

llvm-svn: 16278
2004-09-11 04:19:17 +00:00
Reid Spencer
455a47373b Add methods for detecting different kinds of files by their magic number,
getting the suffix for shared objects, and extracting the basename from a
path.

llvm-svn: 16277
2004-09-11 04:18:05 +00:00
Chris Lattner
4c2703cbea Add missing #include
llvm-svn: 16256
2004-09-09 02:37:56 +00:00
Reid Spencer
cfc37650dd Add HAS_U_INT64_T
llvm-svn: 16184
2004-09-05 16:41:11 +00:00
Misha Brukman
8d8cc63851 I was actually wrong in my "simplification".
llvm-svn: 16156
2004-09-03 19:46:43 +00:00
Misha Brukman
16145fa607 Simplify check for uint64_t and u_int64_t
llvm-svn: 16155
2004-09-03 19:44:28 +00:00
Reid Spencer
610817d50b Provide correct definition of uint64_t for platforms that have only
u_int64_t defined.

llvm-svn: 16154
2004-09-03 19:37:39 +00:00
Alkis Evlogimenos
0c50e0f211 Fixes to make LLVM compile with vc7.1.
Patch contributed by Paolo Invernizzi!

llvm-svn: 16152
2004-09-03 18:19:51 +00:00
John Criswell
b92941018c Added u_int64_t because some systems use that instead of uint64_t.
llvm-svn: 16144
2004-09-02 18:41:30 +00:00
Alkis Evlogimenos
2fd7ccfb9c Pull in definition of std::unary_function.
llvm-svn: 16140
2004-09-02 03:24:45 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer
7043c4670f Initial commit for platform independent system configuration support.
llvm-svn: 16128
2004-08-31 18:13:52 +00:00
Nate Begeman
440c16066f Update doxygen comment now that getSpillSize is supposed to return value in bits
llvm-svn: 16101
2004-08-29 21:59:26 +00:00
Reid Spencer
9954f96013 Put the lib/System interface functions in llvm::sys namespace.
llvm-svn: 16083
2004-08-29 19:19:07 +00:00
Reid Spencer
114a2123ac Initial commit of the platform agnostic interface to finding and executing
programs.

llvm-svn: 16080
2004-08-29 05:29:35 +00:00
Reid Spencer
923b7083e0 Add a function to remove whole directorys on fatal signal.
Doxygenify function comments.

llvm-svn: 16079
2004-08-29 05:27:15 +00:00
Reid Spencer
f7b4fa2e24 Revise the design of the Path concept per peer review. Too many changes to
note individually but these essence of it is to not derive from
std::string, clarify the interface, and provide better documentation.
There is now also (untested) implementations for AIX, Darwin, and SunOS.

llvm-svn: 16078
2004-08-29 05:24:01 +00:00
Alkis Evlogimenos
003c38c6dd Add getLastBlock member. This is useful when growing a densemap keyed
on MachineBasicBlocks.

llvm-svn: 16069
2004-08-27 04:02:35 +00:00
Alkis Evlogimenos
877fe7d13c Add MachineBasicBlock2IndexFunctor. This is useful for densemaps from
MachineBasicBlocks to an arbitrary type.

llvm-svn: 16068
2004-08-27 04:00:26 +00:00
Alkis Evlogimenos
03913413da Use newly added API in MRegisterInfo and don't expose the allocatable
register set anymore. Its users now use the MRegisterInfo API.

llvm-svn: 16061
2004-08-26 22:23:32 +00:00
Alkis Evlogimenos
100c89e9ea Add getAllocatableSet() function.
llvm-svn: 16059
2004-08-26 22:21:04 +00:00
Reid Spencer
a50f1b794a Initial implementation of the Path operating system concept.
llvm-svn: 16048
2004-08-25 06:20:07 +00:00
Reid Spencer
efd00af68d Add a function that gets just the dependent libraries from a bytecode file.
Doxygenify comments.

llvm-svn: 16039
2004-08-24 22:49:07 +00:00
Reid Spencer
a3a84e2e08 Provide a method for wholesale extraction of the dependent libraries.
llvm-svn: 16038
2004-08-24 22:47:39 +00:00
Reid Spencer
1605d22f77 Give the -time-passes tool option a global storage location so that its
value can be discovered by the various LLVM tools.

llvm-svn: 16032
2004-08-24 17:52:35 +00:00
Reid Spencer
0d6613d183 Dump the DependentLibsBlockID, its not a block, its just a list inside the
globals info block. Add an enumerator for getting the number of enumerators
so we can range check in assertions.

llvm-svn: 15980
2004-08-21 20:42:28 +00:00
Reid Spencer
d73bd282d7 Add new methods:
- get the total number of types in the global type list
- handle dependent libraries
- handle target triple

llvm-svn: 15978
2004-08-21 20:41:12 +00:00
Reid Spencer
f6a56abd4d Bytecode Analyzer cleanup:
- don't save the "dump" output, just emit it
- record the bc version number
- record info about the dependent libraries and target triple
- use the correct enumeration as the index on the block size map

llvm-svn: 15977
2004-08-21 20:40:08 +00:00
Brian Gaeke
01636f4e0f Packed types, brought to you by Brad Jones
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
Brian Gaeke
9e089c115d M_DUMMY_PHI_FLAG is no longer used to distinguish V9::PHI. Get rid of it and
its TargetInstrInfo accessor.

llvm-svn: 15907
2004-08-18 20:04:28 +00:00
Chris Lattner
4987b24267 All targets are now allowed to have their own MachineFunctionInfo objects,
also, make getInfo do some checking and cast to the appropriate concrete type.

llvm-svn: 15903
2004-08-18 18:13:16 +00:00
Brian Gaeke
af14dcae5d M_PSEUDO_FLAG is no longer used. Get rid of it and its accessor.
llvm-svn: 15902
2004-08-18 17:44:17 +00:00
Chris Lattner
17411aae8b Alkis pointed out that this is not a character (we actually support strings)
and as such, we should use self revealing names.  Hey, makes sense to me!

llvm-svn: 15896
2004-08-18 02:22:34 +00:00
Chris Lattner
34334091d5 new method
llvm-svn: 15895
2004-08-17 21:38:51 +00:00
Chris Lattner
659175521b Add support for alignment
llvm-svn: 15888
2004-08-17 19:14:29 +00:00
Chris Lattner
41fd07b81e Add punctuation, add a new method
llvm-svn: 15886
2004-08-17 19:12:44 +00:00
Misha Brukman
d89d44e7ec Ultra-doxygenify some function header comments.
llvm-svn: 15884
2004-08-17 17:52:36 +00:00
Chris Lattner
05683db298 Allow targets to specify a comment character
llvm-svn: 15879
2004-08-17 16:26:36 +00:00
Chris Lattner
1c87acdfa8 Add missing \t
llvm-svn: 15871
2004-08-17 06:48:34 +00:00
Chris Lattner
0b1a8c9b57 Add some hooks
llvm-svn: 15867
2004-08-17 06:36:27 +00:00
Chris Lattner
43960d806a Allow an arbitrary prefix.
llvm-svn: 15864
2004-08-17 06:06:37 +00:00
Chris Lattner
1362ba130b We now allow targets to use any prefix they want for global symbols. Lets
hear it for ".".

llvm-svn: 15863
2004-08-17 06:06:19 +00:00
Chris Lattner
5420524642 Some asmweriters want an _ prefix
llvm-svn: 15844
2004-08-17 02:28:12 +00:00
Chris Lattner
aac51aa3d8 Initial implementation of the asmprinter base class
llvm-svn: 15838
2004-08-16 23:15:22 +00:00
Chris Lattner
195a408814 Fit into 80 lines, add a gross hack for MachineFunctionInfo
llvm-svn: 15832
2004-08-16 22:35:26 +00:00
Chris Lattner
e6de0fa4a8 These files now live in lib/Target/SparcV9
llvm-svn: 15831
2004-08-16 21:56:15 +00:00
Reid Spencer
8b1c93c9fb Back out include/llvm/System changes until a satisfactory solution can
be determined.

llvm-svn: 15817
2004-08-16 07:10:09 +00:00
Chris Lattner
94c82ae3a2 Flags and TSFlags were (thankfully) never used, so remove them. But wait,
not so fast, add some fields for spill slot size and alignment

llvm-svn: 15803
2004-08-16 01:07:53 +00:00
Chris Lattner
0d16641abb Add new TargetRegisterClass::contains method
llvm-svn: 15783
2004-08-15 22:19:38 +00:00
Chris Lattner
6f1512829d Implement a long overdue FIXME, by changing these methods to return void.
llvm-svn: 15778
2004-08-15 22:14:19 +00:00
Chris Lattner
f0e1b33f6c Remove helper method
llvm-svn: 15776
2004-08-15 22:02:36 +00:00
Chris Lattner
9e7147dc23 Eliminate the RegisterClass argument, since it can easily be derived from
the regno

llvm-svn: 15773
2004-08-15 21:55:29 +00:00
Alkis Evlogimenos
dbe432aee7 Make this compile on gc 3.4.1 (static_cast to non-const type was not
allowed).

llvm-svn: 15766
2004-08-15 09:18:55 +00:00
Reid Spencer
4f35f90cec First version of a class to represent the notion of an operating system
path to a file or directory and some rudimentary operations on them.

llvm-svn: 15762
2004-08-15 08:13:01 +00:00
Reid Spencer
bbd423eea8 First version of a class to represent operating system and lib/System
error codes in a platform independent way.

llvm-svn: 15761
2004-08-15 08:12:14 +00:00
Nate Begeman
cbc21460f2 Elminiate MachineFunction& argument from eliminateFrameIndex
llvm-svn: 15736
2004-08-14 22:00:10 +00:00
Chris Lattner
872e4a14da Add a pass
llvm-svn: 15713
2004-08-13 03:03:44 +00:00
Chris Lattner
009bda369a Allow targets to specify particular stack slots that certain physregs must
be spilled into.

llvm-svn: 15702
2004-08-12 19:01:55 +00:00
Chris Lattner
837ab8fcf6 Remove dead methods
llvm-svn: 15698
2004-08-12 18:37:15 +00:00
Chris Lattner
8af864daa3 Remove dead methods
llvm-svn: 15691
2004-08-12 17:58:27 +00:00
Misha Brukman
eac800ff93 Add new constructor.
llvm-svn: 15632
2004-08-10 23:10:21 +00:00
Chris Lattner
0b9b58e550 Add standard print/dump methods to CallGraph classes.
llvm-svn: 15569
2004-08-08 03:27:49 +00:00
Chris Lattner
c53f15303d Move method out of line
llvm-svn: 15497
2004-08-04 18:49:52 +00:00
Alkis Evlogimenos
f846e483bb Remove uneeded getValues() functions.
llvm-svn: 15488
2004-08-04 08:47:21 +00:00
Brian Gaeke
69f47e236f getResultPos() is dead.
llvm-svn: 15484
2004-08-04 08:06:30 +00:00
Brian Gaeke
464b5b8f1a These headers have been moved/merged into other files.
llvm-svn: 15477
2004-08-04 07:37:56 +00:00
Chris Lattner
a5d89de2da New methods
llvm-svn: 15462
2004-08-04 04:45:42 +00:00
Chris Lattner
83c911936d Minor efficiency improvements
llvm-svn: 15461
2004-08-04 04:45:29 +00:00
Chris Lattner
9b6089d893 Now that ConstantPointerRef is gone, it is the case that all operands of constants
are themselves constants.  This should allow us to reduce a significant amount
of casting in the sourcebase.

llvm-svn: 15459
2004-08-04 02:43:00 +00:00
Chris Lattner
a81b270e18 Add a special version of getType for ConstantPointerNull, exposing the fact
that all Null pointers have pointer type

llvm-svn: 15458
2004-08-04 02:42:17 +00:00
Chris Lattner
ee276368a4 The Type* is redundant with the TypeSlot
llvm-svn: 15451
2004-08-04 00:18:37 +00:00
Tanya Lattner
763a90b5fa Adding friend MSSchedule for ModuloScheduling pass.
llvm-svn: 15407
2004-08-01 18:57:38 +00:00
Chris Lattner
e8b9d3f67c Fix warning
llvm-svn: 15406
2004-08-01 18:17:36 +00:00
Chris Lattner
00ff5a4e35 Expose breakcriticaledges as a functionpass
llvm-svn: 15370
2004-07-31 10:02:24 +00:00
Chris Lattner
ab1daf9f8a New pass
llvm-svn: 15367
2004-07-31 09:59:14 +00:00
Chris Lattner
0829da11d7 Expose some helpful methods
llvm-svn: 15366
2004-07-31 09:59:04 +00:00
Alkis Evlogimenos
e28642a6a5 Change signature to take two basic blocks: the target and the one
where the goto will be appended.

llvm-svn: 15361
2004-07-31 09:37:52 +00:00
Alkis Evlogimenos
b338ca7306 Doxygenify some comments.
llvm-svn: 15360
2004-07-31 08:57:27 +00:00
Alkis Evlogimenos
6308a8a8e0 Remove const from iterators passed by value.
llvm-svn: 15359
2004-07-31 08:55:23 +00:00
Alkis Evlogimenos
2ca8d29454 Add declarations for insertGoto and reverseBranchCondition.
llvm-svn: 15358
2004-07-31 08:52:30 +00:00
Chris Lattner
d46a44390f Add new M_BARRIER_FLAG flag, and isBarrier() method to TargetInstrInfo
opCode -> Opcode

llvm-svn: 15353
2004-07-31 02:06:48 +00:00
Chris Lattner
6f4beb3664 Add some machine CFG related stuff
llvm-svn: 15352
2004-07-31 01:59:11 +00:00
Misha Brukman
33a80cd54d Enable compilation.
llvm-svn: 15344
2004-07-30 14:33:07 +00:00
Chris Lattner
ace669f381 Check in some useful helper routines for doing ML-style pattern matching on
the LLVM IR.

llvm-svn: 15341
2004-07-30 07:45:00 +00:00
Chris Lattner
a5e7a83fa9 I demand the ability to say 'if (isa<Value>(V))'!
llvm-svn: 15340
2004-07-30 06:59:15 +00:00
Alkis Evlogimenos
fb27f702ca Merge i*.h headers into Instructions.h as part of bug403.
llvm-svn: 15325
2004-07-29 12:17:34 +00:00
Brian Gaeke
99f18cc97f TargetInstrInfo::hasOperandInterlock() is always true, because it is
never overridden by any target.

llvm-svn: 15308
2004-07-28 19:24:48 +00:00
Brian Gaeke
1ec15e0428 ConstantTypeMustBeLoaded has been incorporated into SparcV9PreSelection, its
only user.

llvm-svn: 15294
2004-07-27 21:43:38 +00:00
Brian Gaeke
a71776e676 As it happens, none of these TargetInstrInfo methods which are only
used in the SparcV9 backend really have anything to do with
TargetInstrInfo, so we're converting them into regular old global
functions and moving their declarations to SparcV9InstrSelectionSupport.h.
(They're mostly used as helper functions for SparcV9InstrSelection.)

llvm-svn: 15277
2004-07-27 17:43:22 +00:00
Brian Gaeke
45adb41f46 Make the create...() functions for some of these passes return a FunctionPass *.
llvm-svn: 15276
2004-07-27 17:43:21 +00:00
Chris Lattner
de0fddf8ee Add a note
llvm-svn: 15257
2004-07-27 04:00:54 +00:00
Chris Lattner
7d98fd121c Fix out of date comment
llvm-svn: 15256
2004-07-27 03:04:30 +00:00
Chris Lattner
f08a512d4d New methods
llvm-svn: 15229
2004-07-26 05:50:09 +00:00
Reid Spencer
eb9a1c53b7 Reduce the footprint of the dependent library interface
Document the dependent library interface
Constify the std::string& parameters in the dep lib interface.

llvm-svn: 15215
2004-07-25 21:28:19 +00:00
Reid Spencer
2e6721531f bug 263:
The necessary changes to module in order to support both target triples and
a list of dependent libraries.

llvm-svn: 15207
2004-07-25 17:52:27 +00:00
Reid Spencer
415011884f bug 402:
A new set of block identifiers has been added for version 1.3 so that the
range of values can fit within 5 bits. This aids in halving the size of
block headers.

llvm-svn: 15206
2004-07-25 17:50:00 +00:00
Chris Lattner
31d9cbf7bb Add support for free instructions
llvm-svn: 15197
2004-07-25 07:57:37 +00:00
Chris Lattner
30a4ae76ad Provide timeout values to all abstract interpreters
llvm-svn: 15159
2004-07-24 07:48:50 +00:00
Misha Brukman
29445f8a8b * Add a BoolAlignment field to TargetData, default is 1 byte
* Fix spacing

llvm-svn: 15119
2004-07-23 01:08:13 +00:00
Chris Lattner
d1cfccd01e New prototype
llvm-svn: 15102
2004-07-22 08:07:30 +00:00
Chris Lattner
e3adc34ea7 Clean up reference counting to stop "leaking" alias sets
llvm-svn: 15099
2004-07-22 07:58:18 +00:00
Alkis Evlogimenos
b5f60641f4 Add Iterative scan register allocator.
llvm-svn: 15068
2004-07-21 08:24:35 +00:00
Chris Lattner
67c1deddfc Add a bunch of new functionality, primarily to do with removing aliasing
pointers from an AST.

llvm-svn: 15065
2004-07-21 07:03:57 +00:00
Chris Lattner
f9976c5dbf Make the AST interface a bit richer by returning whether an insertion caused
an insertion or not (because the pointer set already existed).

llvm-svn: 15064
2004-07-21 05:18:04 +00:00
Misha Brukman
f1dcfcbb96 Tabs to spaces.
llvm-svn: 15010
2004-07-19 21:22:02 +00:00
Misha Brukman
ab7bc6af0d Convert tabs to spaces; fix name of function in assert() description.
llvm-svn: 15009
2004-07-19 21:11:45 +00:00
Chris Lattner
58a6310e16 Fix comment
llvm-svn: 15002
2004-07-19 13:28:39 +00:00
Chris Lattner
773c66b02c Delete 4 methods, make clients use hte mark* methods directly
llvm-svn: 14999
2004-07-19 07:52:25 +00:00
Chris Lattner
22728e2f27 There is no need to store the MBB along with the MI any more, we can now
ask instructions for their parent.

llvm-svn: 14998
2004-07-19 07:04:55 +00:00
Chris Lattner
6c34920110 Simplify the interface to LiveVariables::addVirtualRegister(Killed|Dead)
llvm-svn: 14997
2004-07-19 06:55:21 +00:00
Chris Lattner
53fa752649 Remove the DefBlock element of VarInfo. DefBlock is always DefInst->getParent()
llvm-svn: 14996
2004-07-19 06:26:50 +00:00
Chris Lattner
5a4eaff632 inline classof implementations, eliminate use of virtual methods.
classof<ConstantXXX> is now MUCH faster than it used to be.

llvm-svn: 14986
2004-07-19 00:58:47 +00:00
Chris Lattner
64444580a8 eliminate isConstantExpr, changes to isa<Constant> implementation
llvm-svn: 14985
2004-07-19 00:58:02 +00:00
Chris Lattner
07963adecb Add new enum entries for ConstantAggregateZeroVal/ConstantExprVal and
rename ConstantVal to SimpleConstantVal

llvm-svn: 14984
2004-07-19 00:57:40 +00:00
Chris Lattner
2196acc9f2 Change method to return void. Inline dtor
llvm-svn: 14982
2004-07-19 00:55:19 +00:00
Chris Lattner
40107200fc Remove dead file
llvm-svn: 14981
2004-07-18 23:44:15 +00:00
Reid Spencer
a9c7165018 Add a missing space to align comments.
llvm-svn: 14955
2004-07-18 00:56:58 +00:00
Reid Spencer
79ff7a8ec9 Fix typeos in comments.
llvm-svn: 14954
2004-07-18 00:55:49 +00:00
Reid Spencer
d7fbd79a5b bug 122:
remove redundant isa<GlobalValue>
ensure isa<GlobalValue> case is processed before is<Constant>

llvm-svn: 14926
2004-07-17 23:36:58 +00:00
Reid Spencer
fe177d219a bug 122:
- Add ValueListTy to TypeTy so that the bcreader can have its own User
  category that won't get factored into any optimizations or cleanup.
- Correct an isa_impl to correctly include GlobalValue now that it isa
  Constant.

llvm-svn: 14925
2004-07-17 23:34:47 +00:00
Reid Spencer
b0ee45b970 bug 122:
Remove redundancy in User::classof(Value*); GlobalValue isa Constant now.

llvm-svn: 14924
2004-07-17 23:32:11 +00:00
Reid Spencer
e45193c610 Fix a comment.
llvm-svn: 14923
2004-07-17 23:30:45 +00:00
Reid Spencer
c197914ffd bug 122:
We don't need to keep track of CPRs any more.

llvm-svn: 14922
2004-07-17 23:30:11 +00:00
Reid Spencer
058e3a12ce bug 122:
Now that GlobalVariable is a constant (via derivation from GlobalValue),
override the replaceUsesOfWithOnConstant method.

llvm-svn: 14921
2004-07-17 23:29:46 +00:00
Reid Spencer
bedeb65525 bug 122:
- derive from Constant
- declare needed overrides from Constant class

llvm-svn: 14920
2004-07-17 23:28:28 +00:00
Reid Spencer
51fd2506ad ****** ABOLISH ConstantPointerRef *****
llvm-svn: 14919
2004-07-17 23:26:57 +00:00
Reid Spencer
cb46bb8158 Extend constructor so that it can support GlobalValue's (with names).
Make GlobalValue a "classof" Constant
Fix the classof(Value*) to include GlobalValue's

llvm-svn: 14918
2004-07-17 23:26:12 +00:00
Reid Spencer
0338d6578b Constant value not needed after CPR's disappear.
llvm-svn: 14917
2004-07-17 23:23:30 +00:00
Reid Spencer
38fe11e63e Added a README to point users to the documentation on the design of this
library which is a prerequisite for maintaining the library.

llvm-svn: 14909
2004-07-17 08:39:53 +00:00
Alkis Evlogimenos
ddd1db50f9 Add convinience constructor for function calls with two args.
llvm-svn: 14885
2004-07-16 12:04:28 +00:00
Chris Lattner
c19f2134fc Final fix for PR341: eliminate operator<<(ostream, Value*). Clients should
now send references to ostreams instead of pointers.  Sending pointers to
ostreams will print their addresses.

llvm-svn: 14849
2004-07-15 02:54:36 +00:00
Chris Lattner
94212f7102 Fixes for PR341
llvm-svn: 14847
2004-07-15 02:51:31 +00:00
Chris Lattner
5ab6b23a7d Fix for PR341
llvm-svn: 14846
2004-07-15 02:50:38 +00:00
Chris Lattner
26e5829b8f Yeah, how about those 'primative' types huh?
llvm-svn: 14836
2004-07-15 01:15:53 +00:00
Chris Lattner
9e4dad1400 Make PATypeHolder and friends return non-const pointers to the types they
hold.  Because types are basically immutable anyway, they should not be
referenced as "const Type*" everywhere.  Just "Type*" should suffice!

llvm-svn: 14824
2004-07-14 20:10:26 +00:00
Chris Lattner
91169a26b5 * Change code to use a static_cast instead of reinterpret_cast
* Add comments
* Add two new gep ctors for the very common case of creating a two operand
  GEP instruction.

llvm-svn: 14820
2004-07-14 18:13:54 +00:00
Chris Lattner
10686c55cc Add a helper method. The StructType element is completely redundant in most
cases

llvm-svn: 14777
2004-07-12 20:36:08 +00:00
Chris Lattner
528291513f Add a missing #include
llvm-svn: 14773
2004-07-12 20:25:33 +00:00
Chris Lattner
4d2009965c Implement a new method useful for things like the inliner
llvm-svn: 14768
2004-07-12 01:17:52 +00:00
Chris Lattner
050495885f Add a new listener class for things that want to be informed about new
targets that are loaded

llvm-svn: 14758
2004-07-11 06:02:59 +00:00
Chris Lattner
2ea95d837e Delete the allocate*TargetMachine functions. Move options to a header file
that makes sense.

llvm-svn: 14754
2004-07-11 04:15:52 +00:00
Chris Lattner
2a79beb587 Add a new TargetNameParser class, which is useful for parsing options.
Add two methods which are useful for autoselecting targets.

llvm-svn: 14748
2004-07-11 03:59:46 +00:00
Chris Lattner
195638502a First cut at TargetMachineRegistry and RegisterTarget classes
llvm-svn: 14742
2004-07-11 02:43:43 +00:00
Chris Lattner
8b4d801eab Add two new "virtual static" methods to the TargetMachine class
llvm-svn: 14741
2004-07-11 02:43:07 +00:00
Chris Lattner
a46346890c Removed unneeded forward decl
llvm-svn: 14727
2004-07-09 17:02:57 +00:00
Chris Lattner
d3f73edc53 Remove unused method
llvm-svn: 14726
2004-07-09 16:48:13 +00:00
Chris Lattner
235331d922 Eliminate the UID field in the Type class, bringing it down to 28 bytes.
llvm-svn: 14709
2004-07-08 22:31:37 +00:00
Chris Lattner
c03416c90a Add a new method
llvm-svn: 14705
2004-07-08 22:09:07 +00:00
Misha Brukman
54115c22de Fix spelling of `equivalent'
llvm-svn: 14697
2004-07-08 17:45:18 +00:00
Chris Lattner
1aeb7ed7e4 isSigned/isUnsigned/isInteger methods do not need to be virtual
llvm-svn: 14694
2004-07-08 17:29:36 +00:00
Chris Lattner
74df119be3 Update comment.
Remove unused forward decl of Value.h
Make Type 32 bytes instead of 36 bytes

llvm-svn: 14692
2004-07-08 16:09:38 +00:00
Chris Lattner
c301c035d2 This file uses the Value class without a forward decl
llvm-svn: 14691
2004-07-08 15:54:29 +00:00
Alkis Evlogimenos
e7e19f771f Add viewCFG() and viewCFGOnly() APIs.
llvm-svn: 14679
2004-07-08 00:47:58 +00:00
Chris Lattner
c2b3e11473 All of these now live in the DataStructure directory
llvm-svn: 14664
2004-07-07 06:32:53 +00:00
Chris Lattner
bd3218fef2 Move DSA headers into Analysis/DataStructure to make it more obvious
what is implemented by the DataStructure library.

llvm-svn: 14662
2004-07-07 06:29:26 +00:00
Chris Lattner
fb2f56c7c8 As much as I hate to say it, the whole setNode interface for DSNodeHandles
is HOPELESSLY broken.  The problem is that the embedded getNode call can
change the offset of the node handle in unpredictable ways.

As it turns out, all of the clients of this method really want to set
both the node and the offset, thus it is more efficient (and less buggy)
to just do both of them in one method call.  This fixes some obscure bugs
handling non-forwarded node handles.

llvm-svn: 14660
2004-07-07 06:12:52 +00:00
Reid Spencer
3e8a01d80f Remove definition and use of OtherVal enumerator. This just fixes a thinko.
llvm-svn: 14634
2004-07-06 01:30:36 +00:00
Reid Spencer
37b31cbcba Move SlotCalculator.h to lib/Bytecode/Writer since that is the only place
that needs it after the Type != Value changes (bug 122).

llvm-svn: 14605
2004-07-04 11:36:31 +00:00
Reid Spencer
725398ad54 Make all the virtual function (except destructor) inline so there are
default implementations without taking up a ton of space in a .cpp file.

llvm-svn: 14603
2004-07-04 11:29:56 +00:00
Reid Spencer
a53681ae93 Add a new, compatible, interface function for writing types as operands.
This is necessary because Types are no longer Values.

llvm-svn: 14598
2004-07-04 10:59:05 +00:00
Reid Spencer
925f7fd54c Added #include <iostream> since this header is no longer picked up from
the Value.h header.

llvm-svn: 14597
2004-07-04 10:58:20 +00:00
Reid Spencer
678b551d2b - Remove enumerator TypeVal since Values can't be types any more
- Remove isa_impl relationship between Types and Values
- Add OtherVal so "other" users can interact with Values.

llvm-svn: 14596
2004-07-04 10:52:28 +00:00
Reid Spencer
eb12af7769 There is no longer a "Type" primitive type because Values and Types are
now distinct.

llvm-svn: 14595
2004-07-04 10:50:43 +00:00
Reid Spencer
ff486345fd Constify usage of Type* on the interface to ensure SymbolTable doesn't
modify types (it never should). Clean up some comments.

llvm-svn: 14594
2004-07-04 10:49:41 +00:00