Commit Graph

65 Commits

Author SHA1 Message Date
Chris Lattner
b12914bfc0 '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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:48:05 +00:00
Chris Lattner
0a8e8e1a4e Fixes for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14847 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:51:31 +00:00
Reid Spencer
ed3d16e443 Add a new, compatible, interface function for writing types as operands.
This is necessary because Types are no longer Values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14598 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 10:59:05 +00:00
Reid Spencer
2d59de545a Added #include <iostream> since this header is no longer picked up from
the Value.h header.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14597 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 10:58:20 +00:00
Misha Brukman
acc9076e86 Revert ostream back to reference: the only user (llvm-tv) no longer needs it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14029 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-04 21:10:35 +00:00
Chris Lattner
fb04197c01 Remove support for printing strings from the cached writer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14023 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-04 20:34:51 +00:00
Reid Spencer
798ff64328 Part of bug 122:
This change removes the BuildBytecodeInfo flag from the SlotCalculator
class. This flag was needed to distinguish between the Bytecode/Writer
and the AsmWriter. Now that AsmWriter doesn't use SlotCalculator, we can
remove this flag and simplify some code. Also, some minor name changes
to CachedWriter.h needed to be committed (missed in previous commit).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 07:37:11 +00:00
Misha Brukman
df3d2e95a2 * Make contained ostream not public.
* Remove various print methods that called the Value* method, just have one that
  all subclasses of Value will use anyway.
* Remove template for printing constant references
* Add methods to print char* and strings
* setStream now sets the stream on the contained AssemblyWriter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13246 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-28 19:22:58 +00:00
Misha Brukman
3f98def801 * Add ability to get and set the output stream
* New feature: outputting a Type* as symbolic, controlled via the stream
  similarly to sending std::hex to change number format


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13226 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-28 15:30:33 +00:00
Chris Lattner
0b6af79e62 Add the ability to put an annotation at the end of a basic block as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12230 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 18:51:05 +00:00
Chris Lattner
8e3eb5542b The cbackend has never had anything to do with llvm assembly writing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11411 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:19:51 +00:00
Chris Lattner
208d638fa4 Change access to the cwriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11406 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:00:45 +00:00
Chris Lattner
a25b3557a1 Remove yet another obsolete comment :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10720 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-08 22:28:45 +00:00
Brian Gaeke
33310b4e07 Fix typos. Rewrite head-of-file comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10719 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-08 22:21:59 +00:00
Brian Gaeke
d2b40b7f69 Fix typos. Regularize include guard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10718 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-08 22:21:58 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Chris Lattner
0836bf7bcf New interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9618 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 23:39:52 +00:00
John Criswell
6fbcc26f14 Added LLVM copyright header (for lack of a better term).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:19:47 +00:00
Chris Lattner
48486893f4 Standardize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:37:50 +00:00
Chris Lattner
fd479b6fd4 Workaround for bug in GCC 3.1.1 iostreams library on sparc. It apprarently
isn't flushing an ostream when it is deleted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3834 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-19 20:49:25 +00:00
Chris Lattner
8ac883939b Convert cwriter to be a pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3557 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-31 00:28:25 +00:00
Chris Lattner
917914885d Update comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3547 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-30 22:51:21 +00:00
Chris Lattner
9bb451e721 Module's do not subclass from Value, so this code caused a segfault.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3376 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-18 00:37:14 +00:00
Chris Lattner
8bf58bbc69 Regularize the Print*Passes so they have default ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3006 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 17:58:09 +00:00
Chris Lattner
46f824f21d Allow specifying a module for context instead of a slot calculator directly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2851 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 16:48:14 +00:00
Chris Lattner
7e70829632 MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:13:24 +00:00
Sumant Kowshik
9ddc86c6e5 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2552 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-08 18:09:58 +00:00
Chris Lattner
96c466b06a Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2395 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 14:57:45 +00:00
Chris Lattner
0ad0d0e09a Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2385 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 21:26:51 +00:00
Chris Lattner
09a60ac9fe Remove forward def'ns that are already in Value.h
Do not support output of Modules directly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2349 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:47:33 +00:00
Chris Lattner
f57b845547 * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2333 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 06:56:12 +00:00
Chris Lattner
fe6d2ced0e Changes to make print pass work!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2306 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 22:11:12 +00:00
Chris Lattner
e06e9146ee Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2217 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 19:59:31 +00:00
Chris Lattner
5e1cfc58c1 * Trim #includes
* Remove WriteToAssembly functions from interface
* Move operator<< definition to only allow top level operator<< on Value*'s.
  Defined in Value.h

This header file is greatly deemphasized by these changes.  Now it is only
used if custom printing through WriteTypeSymbolic or WriteAsOperand is needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2171 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:55:12 +00:00
Chris Lattner
d58243de3f s/Method/Function
Trim #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2170 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:52:58 +00:00
Chris Lattner
8d3b30ab3c Trim #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2169 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:52:32 +00:00
Chris Lattner
156ce94021 VCG output support removed because it was broken and will never be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2146 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 22:30:17 +00:00
Chris Lattner
0fc0c1d3e1 Change uses of Method to Function
Change uses of methodArgument to FunctionArgument


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1988 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 17:49:55 +00:00
Chris Lattner
e7506a366e Rename Method to Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1957 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 22:51:58 +00:00
Chris Lattner
f4de63f65f Implement a more powerful, simpler, pass system. This pass system can figure
out how to run a collection of passes optimially given their behaviors and
charactaristics.

Convert code to use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1507 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-21 07:31:50 +00:00
Chris Lattner
697954c15d Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-20 22:54:45 +00:00
Chris Lattner
e9bb2df410 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1407 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 22:26:30 +00:00
Chris Lattner
1c3d5169be Allow output of manipulators for GCC 2.96 compatibility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1365 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 18:49:33 +00:00
Chris Lattner
5818a7162d Okay, so this is a huge hack. Fixme later
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1171 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-07 05:31:53 +00:00
Chris Lattner
495d6f1933 New class to provide high performance writing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1167 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-07 04:20:50 +00:00
Chris Lattner
a828014adf Expose some more printing functionality from the assembly writer library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1030 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-29 16:36:49 +00:00
Chris Lattner
b44405a90d initial checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@902 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 20:31:42 +00:00
Chris Lattner
0f0dc4e47c Remove exception specification. Only slows code down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@746 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:25:30 +00:00
Chris Lattner
ef9c23f281 * Both Method & GlobalVariable now subclass GlobalValue
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@703 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-03 14:53:21 +00:00
Chris Lattner
b00c582b6d Commit more code over to new cast style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@697 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-02 03:41:24 +00:00