Commit Graph

63 Commits

Author SHA1 Message Date
Reid Spencer 996ec72d48 For PR351:
* Place a try/catch block around the entire tool to Make sure std::string
  exceptions are caught and printed before exiting the tool.
* Make sure we catch unhandled exceptions at the top level so that we don't
  abort with a useless message but indicate than an unhandled exception was
  generated.

llvm-svn: 19192
2004-12-30 05:36:08 +00:00
Chris Lattner 4f2cf030e8 '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
Reid Spencer 7c16caa336 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 e3263ecaf0 The functions in Signal.h are now in the llvm::sys namespace - adjust
llvm-svn: 16091
2004-08-29 19:28:55 +00:00
Chris Lattner ec2a1566cc Add -load option
llvm-svn: 14740
2004-07-11 01:08:19 +00:00
Chris Lattner 278f5152d3 Header file moved
llvm-svn: 13813
2004-05-27 05:41:36 +00:00
Chris Lattner 56bfdecbdf Make sure to print a stack trace whenever an error signal is delivered
to the tool.

llvm-svn: 11634
2004-02-19 20:33:00 +00:00
Brian Gaeke 960707c335 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner ebec8030d6 fix file headers
llvm-svn: 9293
2003-10-20 17:57:13 +00:00
John Criswell 09344dcf97 Added copyright header to all C++ source files.
llvm-svn: 9291
2003-10-20 17:47:21 +00:00
Chris Lattner df705a6d02 Add a disable-verify option
llvm-svn: 6155
2003-05-12 22:12:44 +00:00
Chris Lattner ebc5f1944e Move static stuff to an anonymous namespace
llvm-svn: 6154
2003-05-12 22:08:58 +00:00
Chris Lattner d571e2aa91 Make sure to create a target data that matches the Module's target properties.
llvm-svn: 5904
2003-04-24 19:13:02 +00:00
Chris Lattner c2be148276 Make printing messages nicer
llvm-svn: 5616
2003-02-24 20:07:54 +00:00
Chris Lattner 807a36c458 Disable timing of bytecode loader
llvm-svn: 4887
2002-12-03 19:42:26 +00:00
Chris Lattner 20362cd1e9 Add a timer to evaluate bytecode load time and space requirements
llvm-svn: 4679
2002-11-10 06:55:02 +00:00
Chris Lattner 5f827fa57b Give passnames to the printer classes
llvm-svn: 4559
2002-11-06 06:16:08 +00:00
Chris Lattner 2292e551ed - 'analyze' and 'as' now explicitly verify input because AsmParser doesn't.
llvm-svn: 3551
2002-08-30 22:54:37 +00:00
Chris Lattner f0ed55d1ee - Cleaned up the interface to AnalysisUsage to take analysis class names
instead of ::ID's.
 - Pass::getAnalysis<> now no longer takes an optional argument

llvm-svn: 3265
2002-08-08 19:01:30 +00:00
Chris Lattner ad5a79527f Changes to be GCC3.1 friendly
llvm-svn: 3187
2002-07-31 19:32:14 +00:00
Chris Lattner da4c6cc151 Print the tool name when an error comes from so that I can tell which
tool of a pipeline is having issues.

llvm-svn: 3167
2002-07-30 21:43:22 +00:00
Chris Lattner 2511b6e296 Use a module analysis
llvm-svn: 3133
2002-07-29 23:02:25 +00:00
Chris Lattner 59aa81c78e Seperate analysis wrapper stuff to AnalysisWrappers.cpp
llvm-svn: 3127
2002-07-29 21:24:10 +00:00
Chris Lattner 5768f01926 Make analyze use the Pass repository to populate it's command line argument list
llvm-svn: 3114
2002-07-27 01:08:50 +00:00
Chris Lattner 64eea749de *** empty log message ***
llvm-svn: 3105
2002-07-26 18:40:14 +00:00
Chris Lattner 42f1d37e75 Be more namespace correct
llvm-svn: 3086
2002-07-25 16:31:01 +00:00
Chris Lattner de88ac4f45 Add description to Enum options.
llvm-svn: 2987
2002-07-22 02:18:00 +00:00
Chris Lattner bf30a91f94 Convert command line option processing code over to use the syntax supported
by the CommandLine 2.0 library

llvm-svn: 2984
2002-07-22 02:10:07 +00:00
Chris Lattner 93dc95fc7d Add support for bottom up closure of ds analysis
llvm-svn: 2963
2002-07-18 06:40:56 +00:00
Chris Lattner 4734a1cd00 Rename DataStructure to LocalDataStructures
llvm-svn: 2873
2002-07-10 22:42:53 +00:00
Chris Lattner 7076ff29ed MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt

llvm-svn: 2778
2002-06-25 16:13:21 +00:00
Chris Lattner ce42e8ac31 Remove InstForest from analysis namespace
llvm-svn: 2401
2002-04-29 18:13:31 +00:00
Chris Lattner d5a847057b Eliminate duplicate or unneccesary #include's
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner 37104aace8 Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.

llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner 450bda1a42 Rename functions to be more consistend with other pass constructors
llvm-svn: 2388
2002-04-28 21:45:36 +00:00
Chris Lattner f12cc842b3 Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
llvm-svn: 2386
2002-04-28 21:27:06 +00:00
Chris Lattner 42ec334ea3 Eliminate the cfg namespace
llvm-svn: 2371
2002-04-28 16:21:53 +00:00
Chris Lattner c8e665431b * 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

llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner 1e759cb144 Add #includes
s/PrintMethodPass/PrintFunctionPass

llvm-svn: 2181
2002-04-08 22:04:24 +00:00
Chris Lattner 62b7fd136e Change references to the Method class to be references to the Function
class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.

llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner bf03a52b3b * Add support for DataStructure analysis
* Parameterize pass outputting with the printPass template, so analysis
  output can optionally take more arguments than just a stream.  The
  default output mode is just to use operator<< on the analysis.
* Remove CurrentModule hack, in favor of using printPass
* Remove special operator<<'s defined for FindUsedTypes and
  FindUnsafePointerTypes, in favor of printPass specializations
* Use std::cout instead of cout

llvm-svn: 1995
2002-03-26 22:43:12 +00:00
Chris Lattner 2a0c0c46a2 Pull callgraph out of Cfg namespace
llvm-svn: 1822
2002-03-06 17:40:37 +00:00
Chris Lattner fcd31f7534 Cleanup to build with GCC 3.0.4
llvm-svn: 1794
2002-02-24 23:25:24 +00:00
Chris Lattner 60a6591d83 Method.h no longer includes BasicBlock.h
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h

llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner 78f1087b01 Catch the parse exception if bad input is provided. Much better than an abort
llvm-svn: 1631
2002-02-01 05:09:35 +00:00
Chris Lattner 3d61db42bb Convert analyze over to use new pass framework for its analyses
llvm-svn: 1607
2002-01-31 00:46:09 +00:00
Chris Lattner 7f74a56e24 Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner 66d9ceaaba Induction variables must be phi nodes
llvm-svn: 1402
2001-12-03 17:27:42 +00:00
Chris Lattner 5de2204fe8 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes

llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner b89a7e72fb Add hooks to print natural loop information and induction variables
llvm-svn: 1389
2001-11-26 19:18:11 +00:00