1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
Commit Graph

1998 Commits

Author SHA1 Message Date
Chris Lattner
ba703c3f17 Remove obsolete scoped pred and succ iterator typedefs
llvm-svn: 8810
2003-10-01 22:28:39 +00:00
Chris Lattner
c228625040 Use graph traits to perform generic interval construction
llvm-svn: 8809
2003-10-01 22:28:00 +00:00
Chris Lattner
679ad2c46d Add graph traits specializations for intervals
llvm-svn: 8808
2003-10-01 22:27:36 +00:00
Chris Lattner
c3767eab12 Forward declare a class
llvm-svn: 8797
2003-09-30 20:15:40 +00:00
Chris Lattner
d63bd276f0 This got merged into Passes.h
llvm-svn: 8796
2003-09-30 20:15:32 +00:00
Chris Lattner
08d6f140ab Include the sparc register in this file
llvm-svn: 8794
2003-09-30 20:14:43 +00:00
Chris Lattner
f6f3a5505a Update comment
llvm-svn: 8783
2003-09-30 18:44:27 +00:00
Chris Lattner
4e4c763dfc Standardize header file comments
llvm-svn: 8782
2003-09-30 18:37:50 +00:00
Chris Lattner
d2a392eef1 Add a file header
llvm-svn: 8781
2003-09-30 18:28:53 +00:00
Chris Lattner
166b62e171 Remove unused header
llvm-svn: 8780
2003-09-30 18:19:13 +00:00
Chris Lattner
0c15a20712 Fix header comment
llvm-svn: 8779
2003-09-30 18:12:25 +00:00
Chris Lattner
1ea5d5a0c0 Fix header, remove dead decl
llvm-svn: 8777
2003-09-30 18:06:51 +00:00
Chris Lattner
7d059b8c3d Fix header file comment
llvm-svn: 8776
2003-09-30 18:05:30 +00:00
Chris Lattner
633b14c13b make the header comment more useful
llvm-svn: 8774
2003-09-30 17:53:30 +00:00
Misha Brukman
a081e4323f Abstracted away the process of running our tools + gcc from bugpoint.
llvm-svn: 8753
2003-09-29 22:38:57 +00:00
Misha Brukman
04a97743ca Tersified and fixed whitespace (tabs -> spaces).
llvm-svn: 8752
2003-09-29 22:37:57 +00:00
Brian Gaeke
16e30e5c84 Fix a typo I happened to notice.
Rename include guards in the "usual" manner.

llvm-svn: 8695
2003-09-24 04:09:50 +00:00
Misha Brukman
7623477716 Added doxygen comments for the streaming module provider.
llvm-svn: 8672
2003-09-22 23:40:38 +00:00
Misha Brukman
a0fb45ff4b Added functions to perform streaming function loading, doxygenified comments.
llvm-svn: 8670
2003-09-22 23:36:33 +00:00
Misha Brukman
26a7c3e066 Converted tabs to spaces.
llvm-svn: 8669
2003-09-22 23:35:54 +00:00
Misha Brukman
f49d1804d5 Materialize the module before releasing it.
llvm-svn: 8668
2003-09-22 23:35:23 +00:00
Chris Lattner
d6c9d2ca72 Add prototype
llvm-svn: 8640
2003-09-21 00:28:18 +00:00
Chris Lattner
b12a8a6177 Switch from using CallInst's to represent call sites to using the LLVM
CallSite class.  Now we can represent function calls by invoke instructions
too!

llvm-svn: 8629
2003-09-20 16:34:13 +00:00
Chris Lattner
d4de2760aa Rename Function::getEntryNode -> getEntryBlock
llvm-svn: 8625
2003-09-20 14:39:18 +00:00
Chris Lattner
6f06eb4eb3 Rename getEntryNode -> getEntryBlock()
llvm-svn: 8624
2003-09-20 14:36:49 +00:00
Chris Lattner
b64863a2f3 Cleanup header file
llvm-svn: 8622
2003-09-20 14:35:38 +00:00
Chris Lattner
bf7dd80e7c Expose the TCE pass
llvm-svn: 8619
2003-09-20 05:14:13 +00:00
Chris Lattner
dc73981ba4 Fix header, fix broken friend decl
llvm-svn: 8616
2003-09-20 03:34:44 +00:00
Chris Lattner
3e98c3aaeb Unsquishify
llvm-svn: 8612
2003-09-20 01:23:29 +00:00
Misha Brukman
fb31f22b76 Abstract interface for module providers, e.g. streaming bytecode reader.
llvm-svn: 8593
2003-09-18 16:16:32 +00:00
John Criswell
e1ccc5a286 In ExecWait(), made the child process exit if it can't execve() the new
program.
Added the use of const (which compiles and is hopefully correct).
Added comments.

llvm-svn: 8585
2003-09-17 19:02:49 +00:00
John Criswell
391b64574d Added the ExecWait() function.
llvm-svn: 8578
2003-09-17 15:14:25 +00:00
Chris Lattner
0d28d582e1 Add new deleteBody method
llvm-svn: 8571
2003-09-17 04:58:43 +00:00
Chris Lattner
2233d8b00a Do not segfault when the post-dominator tree is empty (ie, there are no return
or unwind instructions in the function)

llvm-svn: 8537
2003-09-15 15:47:40 +00:00
Chris Lattner
0c3066b0ae Add prototype for the lowersetjmp pass
llvm-svn: 8522
2003-09-15 05:05:23 +00:00
Chris Lattner
27fcbcd3a3 Get rid of the whole "Node2" business, rename getNode() ->getBlock() to
be more descriptive

llvm-svn: 8468
2003-09-11 16:25:06 +00:00
Chris Lattner
e7c33c0f65 Rework dominator and post dominator information so that we do not have to
unify all exit nodes of a function to compute post-dominance information.
This does not work with functions that have both unwind and return nodes,
because we cannot unify these blocks.  The new implementation is better
anyway. :)

llvm-svn: 8459
2003-09-10 20:36:51 +00:00
Chris Lattner
ee577bdc08 Expand the pass to unify all of the unwind blocks as well
llvm-svn: 8456
2003-09-10 20:34:51 +00:00
Brian Gaeke
7eaecc239a Make createVerifierPass return a FunctionPass *.
llvm-svn: 8449
2003-09-10 19:37:04 +00:00
Chris Lattner
dbca8de747 Fix spello
llvm-svn: 8432
2003-09-10 05:30:09 +00:00
Chris Lattner
58d4183a25 Fix spell-o's
llvm-svn: 8431
2003-09-10 05:29:43 +00:00
Chris Lattner
620f051422 Spelling fixes
llvm-svn: 8429
2003-09-10 05:24:09 +00:00
Chris Lattner
8c119fc9af Fix bug: InstCombine/2003-09-09-VolatileLoadElim.ll
Loads "mayWriteToMemory" if they are volatile

llvm-svn: 8422
2003-09-09 18:16:08 +00:00
Chris Lattner
4a708f1061 Eliminate the unwind intrinsic, it is now an instruction
llvm-svn: 8412
2003-09-08 19:44:47 +00:00
Chris Lattner
a1ae09f681 add support for the unwind inst
llvm-svn: 8406
2003-09-08 18:54:16 +00:00
Chris Lattner
3aeba4c6fc Add the unwind instruction class
llvm-svn: 8405
2003-09-08 18:54:09 +00:00
Chris Lattner
56bc7d4056 Add new unwind instruction. Happily there was a slot leftover from when the
'not' instruction was removed long ago

llvm-svn: 8404
2003-09-08 18:54:01 +00:00
Chris Lattner
2916eafa42 Add support for volatile loads/stores
llvm-svn: 8393
2003-09-08 17:45:59 +00:00
Brian Gaeke
83d2306098 No longer used
llvm-svn: 8374
2003-09-05 19:43:45 +00:00
Brian Gaeke
8e1bb0bcb2 Make getOperandValue and executeCastOperation methods of Interpreter.
This lets us protect a few more ExecutionEngine methods.

llvm-svn: 8367
2003-09-05 18:55:03 +00:00
Brian Gaeke
e157a77485 Make CreateArgv part of lli rather than part of ExecutionEngine.
Switch Interpreter and JIT's "run" methods to take a Function and a vector of
 GenericValues.
Move (almost all of) the stuff that constructs a canonical call to main()
 into lli (new methods "callAsMain", "makeStringVector").
Nuke getCurrentExecutablePath(), enableTracing(), getCurrentFunction(),
 isStopped(), and many dead decls from interpreter.
Add linux strdup() support to interpreter.
Make interpreter's atexit handler runner and JIT's runAtExitHandlers() look
 more alike, in preparation for refactoring.
atexit() is spelled "atexit", not "at_exit".

llvm-svn: 8366
2003-09-05 18:42:01 +00:00
Brian Gaeke
b42efb0e33 Zap some more unused static method decls
llvm-svn: 8364
2003-09-05 06:10:50 +00:00
Chris Lattner
2deb966337 Get friendly
llvm-svn: 8356
2003-09-05 02:30:18 +00:00
Chris Lattner
849c3fbdcc Reshuffling of APIs
llvm-svn: 8354
2003-09-05 02:15:36 +00:00
Chris Lattner
802d5a1717 Remove method
llvm-svn: 8349
2003-09-04 23:43:35 +00:00
Brian Gaeke
6d7d9f9cd9 Interpreter cleanups:
Get rid of support for DebugMode (make it always off).
Mung some comments.
Get rid of interpreter's PROFILE_STRUCTURE_FIELDS and PerformExitStuff
 which have been disabled forever.
Get rid of -abort-on-exception (make it always on).
Get rid of user interaction stuff (debug mode innards).
Simplify Interpreter's callMainFunction().

llvm-svn: 8344
2003-09-04 22:21:24 +00:00
Brian Gaeke
cec978e0ed ExecutionEngine.cpp: Move execution engine creation stuff into a new
static method here.
 Remove some extra blank lines.
ExecutionEngine.h: Add its prototype.
lli.cpp: Call it.

Make creation method for each type of EE into a static method of its
own subclass.

Interpreter/Interpreter.cpp: ExecutionEngine::createInterpreter -->
 Interpreter::create
Interpreter/Interpreter.h: Likewise.
JIT/JIT.cpp: ExecutionEngine::createJIT --> VM::create
JIT/VM.h: Likewise.

llvm-svn: 8343
2003-09-03 20:34:19 +00:00
Chris Lattner
2229f417a0 New method
llvm-svn: 8331
2003-09-02 21:54:56 +00:00
Chris Lattner
4636773d5b Remove the "recursive bit", not only is it unused by anyone, it was also
not correctly calculated, and calculating it wrong for fun seems rather
pointless.

llvm-svn: 8329
2003-09-02 21:40:33 +00:00
John Criswell
6927aeed1e Added the MakeFileReadable() method.
llvm-svn: 8327
2003-09-02 21:09:30 +00:00
John Criswell
7b83fe6beb Added the MakeFileExecutable() method. This method takes a filename and
gives it execute access while respecting the user's umask.

llvm-svn: 8324
2003-09-02 20:14:57 +00:00
Chris Lattner
1ae014f939 The description is no longer stored directly in the type.
llvm-svn: 8319
2003-09-02 16:28:03 +00:00
Chris Lattner
f993c53f49 Dead header file
llvm-svn: 8317
2003-09-01 20:46:08 +00:00
Chris Lattner
603a7af227 Add RPR prototype here
llvm-svn: 8314
2003-09-01 20:44:42 +00:00
Chris Lattner
8ec3783590 Remove dead file
llvm-svn: 8313
2003-09-01 20:41:21 +00:00
Chris Lattner
feebbdd6d1 No longer require an OptInfo
llvm-svn: 8310
2003-09-01 20:40:43 +00:00
Chris Lattner
87d223c70e Remove header files that were privatized
llvm-svn: 8307
2003-09-01 20:33:38 +00:00
Chris Lattner
aeb98733eb This file is never #included
llvm-svn: 8300
2003-09-01 20:19:31 +00:00
Chris Lattner
ed0dcf3cf0 This file is just a subset of Cilkifier.h
llvm-svn: 8286
2003-09-01 16:42:43 +00:00
Chris Lattner
ef379b667e Other minor cleanups while I'm in the area
llvm-svn: 8284
2003-09-01 16:38:43 +00:00
Chris Lattner
eaed5602a7 Fix spell-o
llvm-svn: 8283
2003-09-01 16:35:30 +00:00
Chris Lattner
2ef2a63728 Change the RaiseAllocations pass from being a BasicBlockPass to being a Pass
llvm-svn: 8279
2003-09-01 03:14:00 +00:00
Chris Lattner
f72da72785 Rename TarjanSCCIterator -> scc_iterator
* Increases consistency with other iterators (e.g. df_iterator, po_iterator...)
  * It's shorter
  * We don't name classes by the implementation, we name it for the interface!

llvm-svn: 8273
2003-08-31 20:01:57 +00:00
Chris Lattner
076533d11b ELIMINATE the SCC class completely. One less thing deriving from std::vector
llvm-svn: 8272
2003-08-31 19:55:31 +00:00
Chris Lattner
44378dc381 Move the HasLoop method from the SCC class to the iterator class
llvm-svn: 8268
2003-08-31 19:51:22 +00:00
Chris Lattner
05498bc768 Remove explicit passing of SCC's around as objects.
llvm-svn: 8267
2003-08-31 19:46:48 +00:00
Chris Lattner
d96c9204b6 This should use Support/iterator, not <iterator>
llvm-svn: 8266
2003-08-31 19:46:22 +00:00
Chris Lattner
0295b0692d Cleanups, move the getAnalysisUsage method to the .cpp file
llvm-svn: 8265
2003-08-31 19:41:17 +00:00
Chris Lattner
dbde8ba630 Fix an FLAT OUT WRONG comment
llvm-svn: 8263
2003-08-31 19:37:29 +00:00
Chris Lattner
a8dc1ecf58 * Cleanups
* operator* now returns a reference to the current SCC, instead of a possibly
  null pointer

llvm-svn: 8261
2003-08-31 19:34:27 +00:00
Chris Lattner
7dac86e5f5 Add accessor function for the PruneEH pass
llvm-svn: 8254
2003-08-31 16:30:25 +00:00
Chris Lattner
7407775435 Minor simplification
llvm-svn: 8251
2003-08-31 02:50:07 +00:00
Chris Lattner
0fd60ef271 Initial checkin of the CallGraphSCCPass class
llvm-svn: 8247
2003-08-31 01:54:59 +00:00
Chris Lattner
7250c86571 Remove usage of unsigned long: unsigned should be enough!
Remove explicit use of a stack<>, use a vector instead

llvm-svn: 8246
2003-08-31 01:48:21 +00:00
Chris Lattner
31b633bf65 This file uses cerr without including <iostream>. Since it's just for debugging, comment it out
llvm-svn: 8245
2003-08-31 01:45:00 +00:00
Chris Lattner
b860fafea2 s/Meth/F
llvm-svn: 8244
2003-08-31 01:38:00 +00:00
Chris Lattner
84474d02d0 Add new helper function which makes it even easier to do this sort of thing
llvm-svn: 8237
2003-08-31 00:19:18 +00:00
Chris Lattner
3521199bc1 Remove automagic support for Modules. Noone uses it now anyways, and GCC 3.4 doesn't want us to do this unless Module has been #included
llvm-svn: 8216
2003-08-29 14:48:21 +00:00
Chris Lattner
5ec6f80964 Move getAnalysisToUpdate to after the definition of AnalysisResolver.
GCC 3.4 apparently wants classes to be DEFINED before they are USED.  What is
it smoking.

llvm-svn: 8213
2003-08-29 14:26:51 +00:00
Chris Lattner
926a2197ec Fix compilation problems with G++ 3.4
llvm-svn: 8212
2003-08-29 14:22:29 +00:00
Chris Lattner
51f4550b50 Allow for "unsafe" replaceAllUsesWith operatations, for use during type resolution
llvm-svn: 8208
2003-08-29 05:36:05 +00:00
Chris Lattner
d5c685b6fc Add new method
llvm-svn: 8204
2003-08-29 05:08:31 +00:00
Tanya Lattner
ff06e1a796 Moved index in BB to common graph class.
llvm-svn: 8175
2003-08-28 15:31:28 +00:00
Misha Brukman
c2bdd7230c Spell `incompatible' correctly.
llvm-svn: 8163
2003-08-27 18:26:28 +00:00
Tanya Lattner
68f651356f *** empty log message ***
llvm-svn: 8161
2003-08-27 15:52:23 +00:00
Tanya Lattner
93162e16d6 Cleaned up the code (spacing, not needed headers) and changed ostream function. Also made some functions inline.
llvm-svn: 8154
2003-08-27 02:45:08 +00:00
Tanya Lattner
9353c099ac SchedGraphCommon header file. Contains class definition for SchedGraphCommon which is used by SchedGraph and ModuloSchedGraph (coming soon).
llvm-svn: 8149
2003-08-25 23:12:23 +00:00
Chris Lattner
e7a3a51c77 As it turns out, things will be simpler than I first expected. We no longer
need any exception handling intrinsics beyond llvm.unwind. (yaay)

llvm-svn: 8145
2003-08-25 22:35:01 +00:00
Chris Lattner
24b58d4b81 Targets now configure themselves based on the source module, not on the
ad-hoc "Config" flags

llvm-svn: 8134
2003-08-24 19:50:53 +00:00
Chris Lattner
90253d18b1 Targets should configure themselves based on the module, not some wierd flags
llvm-svn: 8131
2003-08-24 19:49:07 +00:00
Chris Lattner
c6135a9ea7 Allow modules to have 'any' pointer size and endianness.
llvm-svn: 8117
2003-08-24 13:46:37 +00:00
Chris Lattner
33a8b49795 rethrow is really the language independent primitive here. "throw" can be written
in terms of it and llvm.exc.setcurrent.

Rework these intrinsics.

llvm-svn: 8109
2003-08-24 12:24:03 +00:00
Chris Lattner
e61cdf5a6e Add versions of InlineFunction which work on Invoke instructions and general call sites
llvm-svn: 8105
2003-08-24 06:58:32 +00:00
Chris Lattner
6fe728600d Initial support for recognizing LLVM exception handling intrinsics
llvm-svn: 8102
2003-08-24 05:30:29 +00:00
Chris Lattner
851a6f8d37 Allow specifying the name for the newly split basic block
llvm-svn: 8097
2003-08-24 03:41:39 +00:00
Chris Lattner
028e23f032 Add period
llvm-svn: 8090
2003-08-23 23:15:10 +00:00
Chris Lattner
367cef7b75 Rename SwitchInst::dest_push_back -> addCase
Add new removeCase method

llvm-svn: 8088
2003-08-23 23:14:37 +00:00
Chris Lattner
035a14e67f Of course, the copy ctor really should copy the operand as well
llvm-svn: 8077
2003-08-23 20:06:38 +00:00
Chris Lattner
2e682be3b2 Add more methods to be more value-like
llvm-svn: 8074
2003-08-23 19:51:10 +00:00
Chris Lattner
9b93eff8bb Initial checkin of ValueHolder helper class
llvm-svn: 8073
2003-08-23 19:43:18 +00:00
Chris Lattner
8e9740071f Add missing #include
llvm-svn: 8063
2003-08-22 23:08:55 +00:00
Chris Lattner
805dd2d1d7 Changes to work better with GCC3.4/LLVM G++
llvm-svn: 8054
2003-08-22 14:26:59 +00:00
Misha Brukman
cda7f97dbb The word dependent' has no a'.
llvm-svn: 8030
2003-08-21 22:14:26 +00:00
John Criswell
8bc390da1b The JIT now passes the environment pointer to the main() function when it
starts a program.  This allows the GNU env program to compile and JIT under
LLVM.

llvm-svn: 8022
2003-08-21 21:12:30 +00:00
Chris Lattner
e28c0bf667 Remove unused file
llvm-svn: 8021
2003-08-21 20:54:51 +00:00
Chris Lattner
5a88c2d371 Make assertion message more helpful in a case that might happen...
llvm-svn: 7975
2003-08-19 21:57:00 +00:00
Chris Lattner
2e6dfe808d Add new methods, update comments
llvm-svn: 7962
2003-08-18 22:10:57 +00:00
Chris Lattner
2c6666efc6 Add intrinsics for the llvm.sig(set|long)jmp functions
llvm-svn: 7949
2003-08-18 15:41:24 +00:00
Misha Brukman
56f7db4178 Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
0674b75f99 Fix bug: LoopPreheaders/2003-08-15-PreheadersFail.ll
llvm-svn: 7915
2003-08-16 20:57:16 +00:00
Brian Gaeke
294589d7f6 lib/Support/CommandLine.cpp:
Many changes suggested by Chris. It's okay, I'll recover from the emotional
damage...maybe someday. :-)

Collapse ParseCStringVector into ParseStringVector.  Comment it.
Make it take a const input.
Use std::string::npos instead of -1 (what a mouthful!)
Make ParseEnvironmentOptions take const inputs.
Check its args at the very beginning.
Strdup all the contents of newArgv and free them all at the end.

include/Support/CommandLine.h:
Constify progName and envVar arguments to ParseEnvironmentOptions().

llvm-svn: 7905
2003-08-15 21:05:57 +00:00
Misha Brukman
52b0a71cee hash_map and hash_set:
* Define HASH_NAMESPACE to `std' in the case of pre-3.0 GCC compilers
* Add comments to clarify the intent of all the #ifdef madness
* Add VIM directive to highlight files as C++

llvm-svn: 7903
2003-08-15 20:01:10 +00:00
Misha Brukman
2416155d3d Reordered includes to be consistent with the LLVM style.
llvm-svn: 7887
2003-08-15 17:52:02 +00:00
Chris Lattner
09d58b8157 Remove extraneous #include
llvm-svn: 7881
2003-08-15 05:21:30 +00:00
Chris Lattner
d929db2450 Add support for basic blocks, unary/binary unspecs, conditional branches, ...
llvm-svn: 7874
2003-08-15 04:52:51 +00:00
Chris Lattner
6b9c20230f Remove extraneous cl:: namespace qualifiers
llvm-svn: 7852
2003-08-14 22:04:41 +00:00
Brian Gaeke
1fea9addaa Add support for reading command line arguments from an environment variable.
llvm-svn: 7851
2003-08-14 22:00:59 +00:00
Brian Gaeke
4651096037 Factory methods for function passes now return type FunctionPass *.
llvm-svn: 7839
2003-08-14 06:09:32 +00:00
Brian Gaeke
4d260a9317 Add new method to FunctionPassManager to add ImmutablePasses.
llvm-svn: 7838
2003-08-14 06:07:57 +00:00
Brian Gaeke
77c65be59e Factory methods for FunctionPasses now return type FunctionPass *.
llvm-svn: 7823
2003-08-13 18:18:15 +00:00
Brian Gaeke
2e59087317 Deconstify parameter to getPointerToFunction().
llvm-svn: 7822
2003-08-13 18:17:54 +00:00
Brian Gaeke
299cf12f45 addPassesToJITCompile and addPassesToEmitMachineCode now take a
FunctionPassManager, to support function-at-a-time compilation and
 emission of code.

llvm-svn: 7821
2003-08-13 18:17:27 +00:00
John Criswell
64631c7abe Removing the pool allocator from the main CVS tree.
Use the poolalloc module in CVS from now on.

llvm-svn: 7810
2003-08-13 15:36:15 +00:00
Vikram S. Adve
1e41dd39ae Make MInst2LVSetBI and MInst2LVSetAI be hash_maps instead of maps.
Add some comments and non-const methods to fix constness problems.

llvm-svn: 7797
2003-08-12 23:39:08 +00:00
Brian Gaeke
4243c7aa6a Add FunctionPassManager - it's like a PassManager, but it only deals in
FunctionPasses.

llvm-svn: 7778
2003-08-12 17:22:39 +00:00
Brian Gaeke
0c25ceaba7 If we can't find INT64_MAX, set it to a reasonable default value,
instead of printing out an (incorrect) #error message.

llvm-svn: 7744
2003-08-11 20:04:57 +00:00
Chris Lattner
f918b0a5fc Add support to the mangler for targets which require _'s on global symbols
llvm-svn: 7741
2003-08-11 19:34:29 +00:00
Chris Lattner
49f6244b56 Initial checkin of SelectionDAG header file
llvm-svn: 7716
2003-08-11 14:56:26 +00:00
Misha Brukman
ca83e0d56b Remove references to `bugpoint' from the now-generic system utilities.
llvm-svn: 7693
2003-08-07 21:33:33 +00:00
Misha Brukman
1e83bc90b9 Moved removeFile() and getUniqueFilename() into FileUtilities.
llvm-svn: 7691
2003-08-07 21:28:50 +00:00
Sumant Kowshik
154c4b21ec Added a flag which is set when all data structures are not pool allocated
llvm-svn: 7660
2003-08-07 04:37:52 +00:00
Chris Lattner
142e03de74 There was no reason for these to be bit-fields, they just need to be unique.
Also, add an isVoid item

llvm-svn: 7659
2003-08-07 00:17:00 +00:00
Chris Lattner
9d58af6fcf Add a bunch of new Alpha Intrinsics for Rahul Joshi
llvm-svn: 7646
2003-08-06 20:08:25 +00:00
Chris Lattner
138a3fc9ab Completely eliminate the per-machine-instruction regsUsed set.
This substantially shrinks the size of each machine instruction, which should
make allocation faster and the cache footprint of the machine code lighter.

Here are some timings for code generation of the larger benchmarks we have.
This are timings of code generation phases of the X86 JIT, when compiled in
debug mode:

		Before	After	Diff
164.gzip:
  InstSel	0.0878	0.0722	-21.6%
  RegAlloc	0.2031	0.1757	-15.6%
  TOTAL		0.5585	0.4999	-11.7%
Ptrdist-bc:
  InstSel	0.0878	0.0722	-21.6%
  RegAlloc	0.2070	0.1933	- 7.1%
  TOTAL		0.6972	0.6464	- 7.9%
197.parser:
  InstSel	0.2148	0.2148	- 0.0%
  RegAlloc	0.4941	0.4277	-15.5%
  TOTAL		1.3749	1.2851	- 7.0%
175.vpr:
  InstSel	0.2519	0.2109	-19.4%
  RegAlloc	0.5976	0.5663	- 5.5%
  TOTAL		1.6933	1.6347	- 3.5%
254.gap:
  InstSel	1.1328	0.9921	-14.2%
  RegAlloc	2.6933	2.4804	- 8.6%
  TOTAL		7.7871	7.2499	- 7.4%

llvm-svn: 7622
2003-08-05 22:39:13 +00:00
Chris Lattner
a826c8d485 Do not insert physical regsiters into the regsUsed set
llvm-svn: 7617
2003-08-05 21:55:20 +00:00
Chris Lattner
bd872cdaaf Add a comment to the method decl
llvm-svn: 7609
2003-08-05 18:38:16 +00:00
Chris Lattner
8da1b00db6 Remove unused method
llvm-svn: 7608
2003-08-05 17:09:08 +00:00
Sumant Kowshik
9d60ea4810 Added declaration of mergeInGlobalsGraph
llvm-svn: 7607
2003-08-05 17:06:18 +00:00
Chris Lattner
b047a0d449 All callers of these methods actually wanted them to preserve the flags,
so get rid of the def/use parameters that were getting passed in.

**** This now changes the semantics of these methods to preserve the flags,
     not clobber them!

llvm-svn: 7602
2003-08-05 16:58:46 +00:00
Sumant Kowshik
d0be623358 Added the declaration of InlineIndirectCalls
llvm-svn: 7601
2003-08-05 16:56:59 +00:00
Chris Lattner
4c675245b9 The NOOP instruction is no longer needed. Instead, use the
TargetInstrInfo::isNOPinstr method

llvm-svn: 7530
2003-08-03 18:52:15 +00:00
Chris Lattner
7ab0de6845 CVS, please don't tell us that we have a new config.h file, everyone knows that.
llvm-svn: 7527
2003-08-03 18:31:38 +00:00
Chris Lattner
1dd4e725c7 Move debugging support out of Statistic.h into Debug.h, implement the new DEBUG_TYPE facilities
llvm-svn: 7490
2003-08-01 22:12:40 +00:00
Chris Lattner
b3eb22c644 Including statistics into an anonymous namespace that gets #included into
every file is a bad idea.

llvm-svn: 7489
2003-08-01 22:12:07 +00:00
Chris Lattner
a1e4389087 New file
llvm-svn: 7482
2003-08-01 20:28:55 +00:00
Chris Lattner
2e42e72132 This file doesn't need this include
llvm-svn: 7479
2003-08-01 19:16:18 +00:00
Tanya Lattner
f3da6ac76f Renamed trapping instruction function to be more consistent with other functions in the file.
llvm-svn: 7448
2003-07-31 05:08:02 +00:00
Tanya Lattner
8c2ac118ce Added function to determine if an Instruction may trap.
llvm-svn: 7442
2003-07-31 04:05:50 +00:00
Chris Lattner
1fd37738b6 Code generation passes don't need access to raw LLVM types, this method is unnecessary.
llvm-svn: 7412
2003-07-30 05:29:45 +00:00
Vikram S. Adve
b73a1c0085 Unify all constant evaluations that depend on register size
in TargetInstrInfo::ConvertConstantToIntType.

llvm-svn: 7398
2003-07-29 20:30:20 +00:00
Vikram S. Adve
e02f966e3e Moved insertCallerSavingCode() to PhyRegAlloc and
moved isRegVolatile and modifiedByCall here: they are all
machine independent.  Remove all uses of PhyRegAlloc.

llvm-svn: 7387
2003-07-29 19:41:23 +00:00
Vikram S. Adve
37047489b7 Don't require a BB to look-up live variables, unless they may need to
be recomputed.

llvm-svn: 7384
2003-07-29 19:32:04 +00:00
John Criswell
b3b18df383 Enable JIT when the platform supports it.
Select /localhome/$USER when it exists.
Fix the checks for bidirectional and forward iterators so that they work with
version of GCC prior to 3.x.

llvm-svn: 7383
2003-07-29 19:11:58 +00:00
Chris Lattner
9b62a24451 Fix copy and paste-o
llvm-svn: 7378
2003-07-29 05:15:44 +00:00
Chris Lattner
396841f185 Move value type enums to CodeGen/ValueTypes.h
llvm-svn: 7376
2003-07-29 05:13:34 +00:00
Chris Lattner
337787e85b Define target value types in a form usable by target-independent code
llvm-svn: 7375
2003-07-29 05:13:09 +00:00
Chris Lattner
f4b6e59dfa Add alpha intrinsics, contributed by Rahul Joshi
llvm-svn: 7372
2003-07-28 21:18:21 +00:00
Misha Brukman
d36940e9ec Lined things up in a more aesthetically pleasing way.
llvm-svn: 7365
2003-07-28 19:17:53 +00:00
Misha Brukman
88c077722e Removed extra parenthesis and fixed spelling.
llvm-svn: 7359
2003-07-28 16:53:28 +00:00
Tanya Lattner
8a8e6e6ed3 Need to include <string> to fix compile error on Sun
llvm-svn: 7358
2003-07-28 16:42:33 +00:00
Chris Lattner
a522d0ebf9 Code generation phases are not allowed to modify the LLVM representation.
Because of this, we'll make the MBB->BB mapping const as it should be

llvm-svn: 7351
2003-07-26 23:30:37 +00:00
Chris Lattner
e99fa3f42e Whoops, this one was needed
llvm-svn: 7346
2003-07-26 23:18:11 +00:00
Chris Lattner
9224631d6b Remove extraneous #includes
llvm-svn: 7341
2003-07-26 23:00:29 +00:00
Chris Lattner
2bf24be50e Remove #includes
llvm-svn: 7339
2003-07-26 22:56:46 +00:00
Vikram S. Adve
73f410f53f Change the way unused regs. are marked and found to consider regType
info (since multiple reg types may share the same reg class).
Remove machine-specific regalloc. methods that are no longer needed.

llvm-svn: 7328
2003-07-25 21:01:43 +00:00
Vikram S. Adve
19309fca4b Add an assertion.
llvm-svn: 7326
2003-07-25 20:58:57 +00:00
Brian Gaeke
2742a70083 Forward-declare class Module to make the header file self-contained.
llvm-svn: 7319
2003-07-25 20:20:53 +00:00
Chris Lattner
d68c05b473 More cassert inclusion for GCC 3.3
llvm-svn: 7318
2003-07-25 18:06:53 +00:00
Chris Lattner
be4a5081d1 #include <cassert> as necessary...
llvm-svn: 7315
2003-07-25 17:58:41 +00:00
Chris Lattner
a0b09ab5d9 Fix another accessibility problem illuminated by GCC 3.3
llvm-svn: 7314
2003-07-25 17:49:28 +00:00
Chris Lattner
715b7be844 Fix visibility problem exposed by GCC 3.3
llvm-svn: 7313
2003-07-25 17:46:25 +00:00
Chris Lattner
56c01f1a1e Remove inline declarations that GCC 3.3 doesn't like without a body
llvm-svn: 7312
2003-07-25 17:39:33 +00:00
Chris Lattner
d776276bda Regardless of whether C provides assert.h, C++ source can always include
<cassert>, making this header unneeded.

llvm-svn: 7311
2003-07-25 17:35:03 +00:00
Chris Lattner
9390472890 Use the C++ <cassert> header, not the C <assert.h> header
llvm-svn: 7310
2003-07-25 17:34:17 +00:00
Chris Lattner
1adb1fcb82 This header works with GCC 3.3
llvm-svn: 7309
2003-07-25 17:33:45 +00:00
Chris Lattner
754138fc7d Add includes of assert
llvm-svn: 7307
2003-07-25 17:23:27 +00:00
Chris Lattner
63d911d12e Fix accessibility problems GCC 3.3
llvm-svn: 7306
2003-07-25 17:23:13 +00:00
Chris Lattner
fa412837cb Add assert.h include
llvm-svn: 7305
2003-07-25 16:47:07 +00:00
Chris Lattner
72684e9492 Convert to C++ style comments
llvm-svn: 7304
2003-07-25 15:08:08 +00:00
Vikram S. Adve
be5721dddb Include vector into these two files to ensure that specializations like
stl_bvector.h are correctly included into *anything* that includes hash_map
or hash_set.  ext/hash_map includes stl_vector.h directly and leaves
out the specializations, causing truly nasty bugs due to inconsistent
versions of vector<> being used for vector<bool> in different files.

llvm-svn: 7303
2003-07-25 14:06:13 +00:00
Brian Gaeke
d9979a5529 Cleanups:
Mangler.cpp: Constify parameter to makeNameProper, and use const_iterator.
 Make Count an unsigned int, and use utostr().
 Don't name parameters things that start with underscore.
Mangler.h: All of the above, and also: Add Emacs mode-line.  Include <set>.

llvm-svn: 7301
2003-07-24 21:37:57 +00:00
Brian Gaeke
e5ae59ad05 Factor out name-mangling from X86/Printer, which is derived from CWriter,
into this new support class.

llvm-svn: 7300
2003-07-24 20:20:58 +00:00
Chris Lattner
04652336b2 Add support for ~ operator on constants
llvm-svn: 7258
2003-07-23 17:21:17 +00:00
Chris Lattner
1351c304dc Remove redundant const qualifiers from cast<> expressions
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Chris Lattner
913c260d94 Add more doxygen comments, add new ConstantInt::getRawValue method
llvm-svn: 7244
2003-07-23 14:49:06 +00:00
Anand Shukla
351c0f6342 Added special consideration for instrumentation strategy
llvm-svn: 7208
2003-07-20 15:39:30 +00:00
Vikram S. Adve
2d617afa1a (1) Added DSGraph::cloneReachableSubgraph and DSGraph::cloneReachableNodes
to clone the subgraph reachable from a set of root nodes, into the
    current graph, merging the global nodes into those in the current graph.
(2) Added DSGraph::updateFromGlobalGraph() to rematerialize nodes from the
    globals graph into the current graph in both BU and TD passes.
(3) Added hash_set<const GlobalValue*> InlinedGlobals: a set of globals to
    track which globals have been inlined into the current graph from
    callers or callees.  In the TD pass, such globals are up-to-date and
    do not need to be rematerialized from the GlobalsGraph.
(4) Added StripIncompleteBit/KeepIncompleteBit to remove incomplete bit
    when cloning nodes into the globals graph.

llvm-svn: 7190
2003-07-16 21:45:15 +00:00
Misha Brukman
5de3e14206 The word separate' only has one e'.
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
Vikram S. Adve
d8b600cb85 Values stored in CallArgsDescriptor cannot be const.
llvm-svn: 7156
2003-07-10 19:46:15 +00:00
Vikram S. Adve
6aa3abf7fa Change interface to MachineInstr::substituteValue to specify more precisely
which args can be substituted: defsOnly, defsAndUses or usesOnly.

llvm-svn: 7154
2003-07-10 19:45:07 +00:00
Misha Brukman
c12238543a Lowercase versions of `occurrence' need to be spelled correctly, too.
llvm-svn: 7142
2003-07-10 17:05:26 +00:00
Misha Brukman
14194dcdae Occurrence' has no a' and the `r' is doubled.
llvm-svn: 7140
2003-07-10 16:49:51 +00:00
Chris Lattner
727a2aaf1e INCLUDE_PARENT_GRAPH is required
llvm-svn: 7089
2003-07-02 23:57:21 +00:00
Chris Lattner
05ead58250 Remove dead method
llvm-svn: 7083
2003-07-02 23:43:06 +00:00
Chris Lattner
fd4af836c2 Add new methods
llvm-svn: 7057
2003-07-02 04:37:00 +00:00
Chris Lattner
9e36c26ed9 Disable the parent graph code when not compiled in DEBUG mode
llvm-svn: 7056
2003-07-02 04:33:55 +00:00
Vikram S. Adve
e133e7d852 Leak fix: delete old objects before reallocation in an assignment operator!
llvm-svn: 7055
2003-07-02 01:25:44 +00:00
Chris Lattner
a80bdacdce TD pass keeps track of which functions have complete arguments
llvm-svn: 7048
2003-07-01 21:12:10 +00:00
Chris Lattner
215aabe53f Add new operator= impl
llvm-svn: 7047
2003-07-01 21:11:59 +00:00
Chris Lattner
c5f892c867 Ok, I'm a moron. Fixed now
llvm-svn: 7035
2003-07-01 17:15:11 +00:00
Chris Lattner
c09d40c234 Fix major problem that was causing all kinds of nasty foldings
llvm-svn: 7034
2003-07-01 17:10:50 +00:00
Chris Lattner
e0dbd43e2f Add new methods to BUDS for keeping track of a precise call graph
llvm-svn: 7028
2003-07-01 16:27:15 +00:00
John Criswell
258dfc0319 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner
cb32be085b Add new method
llvm-svn: 7007
2003-06-30 05:57:30 +00:00
Chris Lattner
6de58997b5 Be more const correct
llvm-svn: 7004
2003-06-30 05:27:05 +00:00
Chris Lattner
8ef5ebb1d7 Constness changes
llvm-svn: 7002
2003-06-30 05:10:09 +00:00
Chris Lattner
e6df85809f Substantial revamp: DSGraphs now may contain the graphs for multiple functions
in the same graph

llvm-svn: 6991
2003-06-30 03:14:23 +00:00
Chris Lattner
e0e0686413 Add argument
llvm-svn: 6990
2003-06-30 03:13:36 +00:00
Chris Lattner
ff71b43ac7 Remove prototype for dead method
llvm-svn: 6989
2003-06-30 03:13:28 +00:00
Chris Lattner
4b3d2c7c90 Add support for gathering sets of must aliases
llvm-svn: 6971
2003-06-29 00:23:11 +00:00
Chris Lattner
c059f6cce9 Add new DSGraph::ScalarMapTy typedef to avoid pulling representation issues
into callers of getScalarMap

llvm-svn: 6944
2003-06-28 21:57:13 +00:00
Chris Lattner
3b60ccaedb Add new 'isComplete' method
llvm-svn: 6943
2003-06-28 21:56:42 +00:00
Chris Lattner
4d3ee0f3b1 Add support for 'unsigned' command line arguments
llvm-svn: 6928
2003-06-28 15:47:20 +00:00
Brian Gaeke
6f2c46cd52 Nice tasty llc fixes. These should fix LLC for x86 for everything in
SingleSource except oopack and Oscar.  (Sorry, Oscar.)

include/llvm/Target/TargetInstrInfo.h: Remove virtual print method. Add
 accessors for ImplicitUses/Defs.
lib/Target/TargetInstrInfo.cpp: Remove virtual print method. If you
 really wanted this, just use MI->print(O, TM); instead...
lib/Target/X86:
FloatingPoint.cpp: ...like this.
X86InstrInfo.h: Remove virtual print method. Define the PrintImplUses
 target-specific flag bit.
X86InstrInfo.def: Add the PrintImplUses flag to all the instructions
 which implicitly use CL, because the assembler needs to see the CL in
 order to generate the right instruction.
Printer.cpp: Ditch fnIndex at Chris's request. Now we use CurrentFnName
  to name constants in the constant pool for each function instead. This
  avoids keeping state between runOnMachineFunction() invocations, which
  is a no-no. Having MangledGlobals be global is a bogon I'd like to get
  rid of too, but making it a static member of Printer causes link errors
  (why???).
 Make NumberForBB into a member of Printer instead of a global, too.
 Make printOp and printMemReference into methods of Printer.
 X86InstrInfo::print is now Printer::printMachineInstruction, because
  TargetInstrInfo::print is history. (Because of this, we have to qualify
  the names of some TargetInstrInfo methods we call.)
 Print out the ImplicitUses field of any instruction we print that has
  the PrintImplUses bit set.

llvm-svn: 6924
2003-06-27 00:00:48 +00:00
Chris Lattner
e3d0b99978 Add argument to DAE to allow operation on non-internal functions
llvm-svn: 6895
2003-06-25 04:12:49 +00:00
Chris Lattner
6c260f1c5c Add prototype for tail-dup pass
llvm-svn: 6847
2003-06-22 20:10:42 +00:00
Chris Lattner
3f347a99a0 Get rid of WORDSIZE macro which can pollute untold numbers of translation units
llvm-svn: 6843
2003-06-22 03:09:10 +00:00
Chris Lattner
6c12776232 Remove a ton of extraneous #includes
llvm-svn: 6842
2003-06-22 03:08:05 +00:00
Chris Lattner
7a098ad5dc Whoops, accidentally lost a #include
llvm-svn: 6841
2003-06-22 03:04:58 +00:00
Chris Lattner
ddfeef3d7a Remove support for the MultiObject flag, which was just fundamentally broken
llvm-svn: 6839
2003-06-22 03:03:24 +00:00
Chris Lattner
d07e211972 Lots of changes to make the NodeType field private to DSNode.
Add new MultiObject flag

llvm-svn: 6793
2003-06-19 21:14:22 +00:00
Chris Lattner
b03ec62b2b Update comments
llvm-svn: 6785
2003-06-19 17:03:00 +00:00
Chris Lattner
75e1e892a6 Detemplatize the PATypeHandle class, which was only really instantiated on 'Type'.
llvm-svn: 6774
2003-06-18 19:22:36 +00:00
Chris Lattner
67594b9975 * Add new CallSite::get factory method
* add new setCalledFunction method
* FIX arg_end method which was horribly broken!

llvm-svn: 6758
2003-06-17 22:16:59 +00:00
Chris Lattner
8903500053 Add new op_erase method
llvm-svn: 6757
2003-06-17 22:15:55 +00:00
Chris Lattner
5615d77ee1 Make sure accessor is properly doxygenized. It wants two lines
llvm-svn: 6756
2003-06-17 21:44:51 +00:00
Chris Lattner
260440f727 Add accessor
llvm-svn: 6755
2003-06-17 21:44:31 +00:00
Chris Lattner
8b6107ebf2 Make CallSite's default constructable, copyable, and assignable (explicitly)
llvm-svn: 6749
2003-06-17 19:50:28 +00:00
Brian Gaeke
e231d9ad37 Regularize the names of #include-guards.
llvm-svn: 6732
2003-06-17 00:35:55 +00:00
Brian Gaeke
4681b27a92 Isolate machine-dependent use of <alloca.h> in "Support/Alloca.h",
so that we can easily change its use to be conditional on the result of
an autoconf test later.

llvm-svn: 6723
2003-06-16 21:54:01 +00:00
Brian Gaeke
2bbe853b9c Whoops. I didn't mean to step on John's changes.
llvm-svn: 6722
2003-06-16 21:18:20 +00:00
Brian Gaeke
3576ca2d21 This version supports FreeBSD.
llvm-svn: 6721
2003-06-16 21:14:57 +00:00
Chris Lattner
f6973b0f28 Add prototype for the new DAE pass
llvm-svn: 6703
2003-06-16 12:16:52 +00:00
John Criswell
7e0327045f Changed the LITTLE_ENDIAN and BIG_ENDIAN macros to ENDIAN_LITTLE and ENDIAN_BIG.
This will prevent them from conflicting with macros defined by the system
header files.
When autoconf comes, this will look a lot nicer.

llvm-svn: 6684
2003-06-11 19:44:51 +00:00
John Criswell
4781723de6 Included assert.h so that the code compiles under newer versions of GCC.
llvm-svn: 6682
2003-06-11 14:01:36 +00:00
Sumant Kowshik
a961b3c083 Made changes suggested by Chris
llvm-svn: 6606
2003-06-04 08:03:57 +00:00
Sumant Kowshik
9336b0901b Made changes suggested by Chris; Renamed 'union' function to unionSetsWith
llvm-svn: 6605
2003-06-04 08:00:05 +00:00
Chris Lattner
9bd4cfa823 Add new setCondition member
llvm-svn: 6603
2003-06-04 05:08:31 +00:00
Chris Lattner
7aaea42f1e Minor cleanups:
* Document the MOTy namespace correctly for doxygen
  * Eliminate usage of the MachineOpCode typedef, which should eventually
    be eliminated entirely.

llvm-svn: 6584
2003-06-03 15:42:53 +00:00
Chris Lattner
846c593142 Remove use of enum
llvm-svn: 6582
2003-06-03 15:41:45 +00:00
Chris Lattner
b91ad88918 There are now no uses of NonCopyableV
llvm-svn: 6580
2003-06-03 15:30:48 +00:00
Chris Lattner
775ec2f5fe Add doxygen comment for namespace
llvm-svn: 6579
2003-06-03 15:30:37 +00:00
Chris Lattner
b563188e45 Add comment for doxygen for namespace
llvm-svn: 6578
2003-06-03 15:30:13 +00:00
Chris Lattner
506de1c176 Minor cleanups:
* LLVM #include should use "", not <>
  * Fix line wrapping
  * Remove noncopyable base class to improve doxygen output

llvm-svn: 6577
2003-06-03 15:30:01 +00:00
Chris Lattner
b1c22980b1 Remove noncopyable base class as it was making the doxygen docs harder to read
llvm-svn: 6576
2003-06-03 15:29:12 +00:00
Chris Lattner
347bd5fb6f Remove noncopyableV base classes, as they were confusing the doxygen documentation,
making it harder to read.

llvm-svn: 6575
2003-06-03 15:28:40 +00:00
Chris Lattner
68f1b02a60 Remove NonCopyable base class to clean up doxygen output
llvm-svn: 6551
2003-06-02 22:07:37 +00:00
Chris Lattner
d94534c537 Hack up MachineCodeEmitter to actually be target independent.
llvm-svn: 6514
2003-06-01 23:20:02 +00:00
Tanya Lattner
eaa01f0821 Fixed comment width, changed arg to be const, fixed indentation, removed unnecessary includes.
llvm-svn: 6476
2003-05-31 20:01:37 +00:00
Vikram S. Adve
9625e27034 Made a single common InvalidRegNum = -1.
llvm-svn: 6473
2003-05-31 07:44:07 +00:00
Vikram S. Adve
2c9fc5ded3 Renamed a variable.
llvm-svn: 6472
2003-05-31 07:43:41 +00:00
Vikram S. Adve
c40874054e Support for annul/pred and other future flags on op codes.
Support for recording the physical register for implcit references.

llvm-svn: 6471
2003-05-31 07:43:01 +00:00
Vikram S. Adve
d43c10b583 Added MachineCodeForInstruction object as an argument to
TmpInstruction constructors because every TmpInstruction object has
to be registered with a MachineCodeForInstruction to prevent leaks.
This simplifies the user's code.

llvm-svn: 6469
2003-05-31 07:41:24 +00:00
Misha Brukman
c5a1e94883 Added saveBBreferences() for BasicBlock resolution.
llvm-svn: 6451
2003-05-30 20:32:45 +00:00
Tanya Lattner
ceefb5002a Sorry, correcting small typo.
llvm-svn: 6433
2003-05-30 15:53:50 +00:00
Tanya Lattner
117f7c0082 Added support for cloning a trace.
llvm-svn: 6430
2003-05-30 15:48:23 +00:00
Sumant Kowshik
d26d2d9d2b Implementation of Equivalence Classes
llvm-svn: 6422
2003-05-29 22:44:25 +00:00
Sumant Kowshik
f022bd6bf3 Changes to support function pointers
llvm-svn: 6421
2003-05-29 22:43:46 +00:00
Chris Lattner
d3eae6379d Don't require the user to do something like isa<foo>(II->get()). The ->get
should be implicit.

llvm-svn: 6395
2003-05-29 15:08:33 +00:00
Chris Lattner
12d13d5751 dyn_cast_or_null should work just the same as dyn_cast does
llvm-svn: 6394
2003-05-29 15:07:48 +00:00
Chris Lattner
47842943a5 Doxygenify comments
llvm-svn: 6393
2003-05-29 15:06:40 +00:00
Misha Brukman
ef428e8dca Fixed misspelling and broke a line that was wrapping.
llvm-svn: 6391
2003-05-29 05:00:14 +00:00
Misha Brukman
6e0ae68c05 Defines a pass-through debugging emitter -- it writes to a file for inspection
and to memory to test execution (using a passed-in code emitter).

llvm-svn: 6365
2003-05-27 21:46:56 +00:00
Misha Brukman
2f45624868 Allow allocation of a Sparc TargetMachine.
llvm-svn: 6364
2003-05-27 21:46:07 +00:00
Chris Lattner
593cb8cafe Expose proto for SRoA pass.
llvm-svn: 6348
2003-05-27 15:52:45 +00:00
Vikram S. Adve
73ee5ff6b8 (1) Added special register class containing (for now) %fsr.
Fixed spilling of %fcc[0-3] which are part of %fsr.

(2) Moved some machine-independent reg-class code to class TargetRegInfo
    from SparcReg{Class,}Info.

llvm-svn: 6343
2003-05-27 00:07:13 +00:00
Vikram S. Adve
ab50c0aee5 Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
and related functions and flags.  Fixed several bugs where only
"isDef" was being checked, not "isDefAndUse".

llvm-svn: 6342
2003-05-27 00:06:48 +00:00
Vikram S. Adve
e3af518f95 Make case of GetNumOfInt/FloatArgRegs functions to be use lower case
like all the other functions.

llvm-svn: 6326
2003-05-25 16:02:05 +00:00
Misha Brukman
6ffaa5b188 Reword to remove reference to how things worked in the past.
llvm-svn: 6323
2003-05-24 01:08:43 +00:00
Misha Brukman
151f7484ab NOP instructions are pseudo-instructions. We should not have them explicitly in
our representation, since they are usually special cases of already-existing
instructions.

This abstracts away methods that let a pass create and verify a NOP instruction,
without relying on a `NOP' enum to be in existence in the target's instruction
info descriptor.

llvm-svn: 6319
2003-05-24 00:08:39 +00:00
Chris Lattner
9cdb6fdeaa Remove some cruft, add some methods to allow implementation of bugfix for
Bug: Linker/2003-04-26-NullPtrLinkProblem.ll

llvm-svn: 6313
2003-05-23 20:02:05 +00:00
Chris Lattner
e7c3c48fb4 Minor rewording/cleanups
llvm-svn: 6311
2003-05-23 17:13:15 +00:00
Chris Lattner
aaf60fb906 Remove long dead code
llvm-svn: 6307
2003-05-22 22:00:54 +00:00
Chris Lattner
9581bba352 Add support for a new "CommaSeparated" modifier
llvm-svn: 6293
2003-05-22 20:25:57 +00:00
Chris Lattner
1358ad783e New method
llvm-svn: 6259
2003-05-21 17:49:08 +00:00
Misha Brukman
825e174bf7 Hopefully, the final fix for `[Pp]ropogate'.
llvm-svn: 6251
2003-05-20 21:01:22 +00:00
Misha Brukman
74cf3f5246 s/convertable/convertible/g
llvm-svn: 6248
2003-05-20 18:45:36 +00:00
Misha Brukman
ecdaad27d6 The plural of `Pass' is Passes, not Pass's.
llvm-svn: 6247
2003-05-20 18:39:06 +00:00
Chris Lattner
435e5592a9 Add support for setjmp/longjmp primitives
Patch checked in for Bill Wendling :)

llvm-svn: 6241
2003-05-17 22:26:33 +00:00
Chris Lattner
0619ee9f39 Add some methods to make type safety a bit easier
llvm-svn: 6198
2003-05-14 17:49:52 +00:00
Chris Lattner
afc685b278 Beef up interface, move getVarInfo out-of-line.
llvm-svn: 6114
2003-05-12 14:23:04 +00:00
Chris Lattner
d06c47110a Expand API for updating live var info.
Expose iterators, not const-iterators.
Rename method that was VERY misleading

llvm-svn: 6108
2003-05-12 03:51:30 +00:00
Chris Lattner
46f2fc75da Make sure that globals are emitted AFTER the passmanager is set up for the JIT,
because the globals may refer to functions that need to be compiled!

llvm-svn: 6105
2003-05-12 02:14:34 +00:00
Joel Stanley
14866a103c Fixed comment.
llvm-svn: 6072
2003-05-10 01:56:42 +00:00
Chris Lattner
c2861218f5 Update out of date comment
llvm-svn: 6070
2003-05-09 22:16:18 +00:00
Chris Lattner
8c98a8f5bd Updates to match recent timer updates
llvm-svn: 6069
2003-05-09 20:44:22 +00:00
Chris Lattner
451890e365 Add new method to check to see if a global is available
llvm-svn: 6058
2003-05-09 03:29:03 +00:00
Chris Lattner
3160b1235e Allow const functions
llvm-svn: 6056
2003-05-09 03:27:41 +00:00
Chris Lattner
836e8c1f2a Fix bug in last checkin
llvm-svn: 6055
2003-05-08 22:00:52 +00:00
Chris Lattner
7c8bf633a5 Add new methods for stub generation
llvm-svn: 6053
2003-05-08 21:53:57 +00:00
Chris Lattner
ba9142280a Add a pointersize/endianness safe load routine to match the store routine
llvm-svn: 6042
2003-05-08 16:52:16 +00:00
Chris Lattner
6b02f9dcc3 Initial support for intrinsic functions
llvm-svn: 6033
2003-05-08 03:34:12 +00:00
Chris Lattner
1ea6fe252b Initial checkin for LLVM intrinsic functions
llvm-svn: 6032
2003-05-08 03:33:54 +00:00
Chris Lattner
1c7dcb91d4 Add support for the new VarArgInst instruction, reindent some stuff
llvm-svn: 6028
2003-05-08 02:43:06 +00:00
Chris Lattner
bb2a0102ae Add new VarArgInst class for the va_arg instruction
llvm-svn: 6027
2003-05-08 02:42:50 +00:00
Chris Lattner
d2fae9f27c Add comments, add a vector to keep track of which registers are allocatable
llvm-svn: 6014
2003-05-07 20:07:58 +00:00
Chris Lattner
ff78e3f3e4 Fix memory corruption problem
llvm-svn: 6003
2003-05-06 18:45:02 +00:00
Misha Brukman
0cd9e6371c It's 'separate'. The 'i.e.' is kinda nit-picking, but think of it this way:
'separate' is the one causing you to recompile all your passes anyway.

llvm-svn: 5992
2003-05-03 03:31:06 +00:00
Chris Lattner
bbe1aba425 Remove two fields from TargetData which are target specific.
llvm-svn: 5963
2003-04-26 20:11:09 +00:00
Chris Lattner
97c9c55218 Revert last checkin. Note that PHI nodes can use basic blocks also!
llvm-svn: 5956
2003-04-26 17:38:26 +00:00
Chris Lattner
e833466012 Remove long-dead obsolete cruft
llvm-svn: 5955
2003-04-25 23:39:08 +00:00
Chris Lattner
a550ee6b5d Fix method name type-o
llvm-svn: 5933
2003-04-25 05:23:27 +00:00
Chris Lattner
d9a8a29c6f *** Huge: Make constantexprs be handled correctly, conservatively
llvm-svn: 5923
2003-04-25 02:51:46 +00:00
Chris Lattner
a106185aa1 Default ctor doesn't provide name
llvm-svn: 5921
2003-04-25 02:50:19 +00:00
Chris Lattner
55a4aea29b Add new targetdata ctor to create a targetdata appropriate to the module
llvm-svn: 5902
2003-04-24 19:08:45 +00:00
Chris Lattner
9485cd4e9b Remove support for "targetdata pass ctors"
llvm-svn: 5901
2003-04-24 18:41:30 +00:00
Chris Lattner
9c67ad476b LevelRaise now gets TD from passmanager
llvm-svn: 5897
2003-04-24 18:25:42 +00:00
Chris Lattner
a568a9261a Kill unneccesary &*
llvm-svn: 5870
2003-04-23 16:35:30 +00:00
Chris Lattner
0a9913935f Add stub to create lowerSwitches pass
llvm-svn: 5866
2003-04-23 16:24:19 +00:00
Chris Lattner
d767c0847c Allow autoconversion from ilist_iterator<T> to T* in a dyn_cast and friends
llvm-svn: 5862
2003-04-23 16:17:53 +00:00
Chris Lattner
e60fff42cc Allow dyn_cast to operate on things that aren't OBVIOUSLY a pointer type.
These things can be converted to a pointer, like ilist_iterators

llvm-svn: 5861
2003-04-23 16:17:28 +00:00
Chris Lattner
85d01fed47 Add information about the module source
llvm-svn: 5837
2003-04-22 18:03:13 +00:00
Chris Lattner
b5fc5522fb Add support for tracking whether a module is 64/32 bit and big/little endian
Also add a moduleID field which can be used for diagnostics

llvm-svn: 5834
2003-04-22 18:02:04 +00:00
Chris Lattner
a20c5c7083 Add prototype to read .a files
llvm-svn: 5821
2003-04-19 21:45:52 +00:00
Chris Lattner
17200af63c Add prototype for new CloneBasicBlock function
llvm-svn: 5804
2003-04-18 03:49:22 +00:00
Chris Lattner
1add946814 Don't force a ConstantPointer to be returned
llvm-svn: 5799
2003-04-17 19:22:47 +00:00
Chris Lattner
bb00f755ed Change the interface to constant expressions to allow automatic folding
llvm-svn: 5793
2003-04-16 22:40:51 +00:00
Chris Lattner
19e35f5a22 Revert modulo scheduling change that should be part of the modulo-sched pass itself,
not part of the Instruction class.

llvm-svn: 5787
2003-04-16 20:30:02 +00:00
Chris Lattner
fa4f750f3e Add new linkage types to support a real frontend
llvm-svn: 5786
2003-04-16 20:28:45 +00:00
Misha Brukman
71aef01e7e Must use std::pair instead of just 'pair'.
llvm-svn: 5767
2003-04-07 00:25:09 +00:00
Guochun Shi
59e61c4ce2 added a function and a member to the TargetSchedInfo class
which is used  by Modulo Scheduling pass

llvm-svn: 5766
2003-04-07 00:00:36 +00:00
Guochun Shi
62370b42ad added some memory for clone function
llvm-svn: 5765
2003-04-06 23:58:44 +00:00
Chris Lattner
190480ecfe Add getAnalysisUsage method
llvm-svn: 5756
2003-03-31 17:29:18 +00:00
Chris Lattner
8696069d85 Add helper method
llvm-svn: 5753
2003-03-21 21:41:02 +00:00
Chris Lattner
f472a964a9 Update comment
llvm-svn: 5752
2003-03-21 21:40:39 +00:00
Chris Lattner
cf6eb5232a Add more graph traits specializations for dominator tree nodes
llvm-svn: 5751
2003-03-20 21:21:05 +00:00
Chris Lattner
8c1c878dcb Add new chunk type
llvm-svn: 5747
2003-03-19 20:48:27 +00:00
Chris Lattner
0381679b6e Fix problems with BitSetVector that makes it not compile under GCC 3.0 and 2.95
llvm-svn: 5745
2003-03-17 18:11:27 +00:00
Chris Lattner
5e5950b7e0 Fix ConstantUInt::isAllOnesValue
llvm-svn: 5734
2003-03-10 22:39:02 +00:00
Chris Lattner
07a7a75331 Extend struct and array constants to support isNullValue
llvm-svn: 5719
2003-03-06 21:02:43 +00:00
Chris Lattner
a1d58f804e Generalize interface a bit
llvm-svn: 5711
2003-03-06 16:50:21 +00:00
Chris Lattner
480507e92d Add new getIncomingValueForBlock method
Relax a bit about constness

llvm-svn: 5709
2003-03-06 16:36:28 +00:00
Chris Lattner
92a316864d Simplify some of the PHI node interfaces
llvm-svn: 5700
2003-03-05 21:15:12 +00:00
Chris Lattner
3e34da7458 Add a few new 'add' methods. Move the iterator around
llvm-svn: 5690
2003-03-03 23:27:52 +00:00
Chris Lattner
a49e96dda5 Change the mem2reg interface to accept a TargetData argument
llvm-svn: 5685
2003-03-03 17:25:18 +00:00
Chris Lattner
41e9bb787e Don't apply type information to loads
llvm-svn: 5683
2003-03-03 17:13:22 +00:00
Chris Lattner
6046dda16e Add dump method for loops
llvm-svn: 5670
2003-02-28 16:54:37 +00:00
Chris Lattner
cffe1c533c Add graph traits specializations for loop nesting information...
llvm-svn: 5666
2003-02-28 03:05:15 +00:00
Chris Lattner
e6443c72fe Add new Loop::hasExitBlock helper method
llvm-svn: 5663
2003-02-27 22:48:28 +00:00
Chris Lattner
c37308604f Change behavior of changeExitBlock function to replace all instances of exit block
llvm-svn: 5661
2003-02-27 22:37:44 +00:00