447762da85 
								
							 
						 
						
							
							
								
								Merge System into Support.  
							
							... 
							
							
							
							llvm-svn: 120298 
							
						 
						
							2010-11-29 18:16:10 +00:00  
				
					
						
							
							
								 
						
							
								6c18d1aac0 
								
							 
						 
						
							
							
								
								Get rid of static constructors for pass registration.  Instead, every pass exposes an initializeMyPassFunction(), which  
							
							... 
							
							
							
							must be called in the pass's constructor.  This function uses static dependency declarations to recursively initialize
the pass's dependencies.
Clients that only create passes through the createFooPass() APIs will require no changes.  Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.
I have tested this with all standard configurations of clang and llvm-gcc on Darwin.  It is possible that there are problems
with the static dependencies that will only be visible with non-standard options.  If you encounter any crash in pass
registration/creation, please send the testcase to me directly.
llvm-svn: 116820 
							
						 
						
							2010-10-19 17:21:58 +00:00  
				
					
						
							
							
								 
						
							
								3bd97fec8f 
								
							 
						 
						
							
							
								
								Straighten out any triple strings passed on the command line before  
							
							... 
							
							
							
							they hit the rest of the system.
llvm-svn: 112344 
							
						 
						
							2010-08-28 01:30:02 +00:00  
				
					
						
							
							
								 
						
							
								33e81a8221 
								
							 
						 
						
							
							
								
								Most of bugpoint now only needs to know the pass names.  
							
							... 
							
							
							
							llvm-svn: 110534 
							
						 
						
							2010-08-08 03:55:08 +00:00  
				
					
						
							
							
								 
						
							
								bbdce49c2a 
								
							 
						 
						
							
							
								
								Run opt instead of bugpoint itself.  
							
							... 
							
							
							
							llvm-svn: 110524 
							
						 
						
							2010-08-07 23:03:21 +00:00  
				
					
						
							
							
								 
						
							
								a7aed18624 
								
							 
						 
						
							
							
								
								Reapply r110396, with fixes to appease the Linux buildbot gods.  
							
							... 
							
							
							
							llvm-svn: 110460 
							
						 
						
							2010-08-06 18:33:48 +00:00  
				
					
						
							
							
								 
						
							
								bda59bd247 
								
							 
						 
						
							
							
								
								Revert r110396 to fix buildbots.  
							
							... 
							
							
							
							llvm-svn: 110410 
							
						 
						
							2010-08-06 00:23:35 +00:00  
				
					
						
							
							
								 
						
							
								755aceb5d0 
								
							 
						 
						
							
							
								
								Don't use PassInfo* as a type identifier for passes.  Instead, use the address of the static  
							
							... 
							
							
							
							ID member as the sole unique type identifier.  Clean up APIs related to this change.
llvm-svn: 110396 
							
						 
						
							2010-08-05 23:42:04 +00:00  
				
					
						
							
							
								 
						
							
								824edeb842 
								
							 
						 
						
							
							
								
								Revert bugpoint change due to buildbot breakage.  
							
							... 
							
							
							
							--- Reverse-merging r110333 into '.':
U    tools/bugpoint/BugDriver.h
U    tools/bugpoint/OptimizerDriver.cpp
U    tools/bugpoint/bugpoint.cpp
U    tools/bugpoint/BugDriver.cpp
llvm-svn: 110341 
							
						 
						
							2010-08-05 16:26:32 +00:00  
				
					
						
							
							
								 
						
							
								86d7095eac 
								
							 
						 
						
							
							
								
								Run opt instead of bugpoint itself.  
							
							... 
							
							
							
							Fixes PR753.
llvm-svn: 110333 
							
						 
						
							2010-08-05 15:25:38 +00:00  
				
					
						
							
							
								 
						
							
								81781220d2 
								
							 
						 
						
							
							
								
								Speculatively revert r108813, in an attempt to get the self-host buildbots working again.  I don't see why this patch  
							
							... 
							
							
							
							would cause them to fail the way they are, but none of the other intervening patches seem likely either.
llvm-svn: 108818 
							
						 
						
							2010-07-20 08:26:15 +00:00  
				
					
						
							
							
								 
						
							
								8dc129325f 
								
							 
						 
						
							
							
								
								Reapply r108794, a fix for the failing test from last time.  
							
							... 
							
							
							
							llvm-svn: 108813 
							
						 
						
							2010-07-20 06:52:42 +00:00  
				
					
						
							
							
								 
						
							
								4a35d6f8cd 
								
							 
						 
						
							
							
								
								Revert r108794, "Separate PassInfo into two classes: a constructor-free  
							
							... 
							
							
							
							superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is
breaking teh everything.
llvm-svn: 108805 
							
						 
						
							2010-07-20 03:06:07 +00:00  
				
					
						
							
							
								 
						
							
								e7c5fe586a 
								
							 
						 
						
							
							
								
								Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).  
							
							... 
							
							
							
							llvm-svn: 108794 
							
						 
						
							2010-07-20 01:19:58 +00:00  
				
					
						
							
							
								 
						
							
								6ba630b077 
								
							 
						 
						
							
							
								
								Remove use of exceptions from bugpoint. No deliberate functionality change!  
							
							... 
							
							
							
							llvm-svn: 101013 
							
						 
						
							2010-04-12 05:08:25 +00:00  
				
					
						
							
							
								 
						
							
								71bd0f4eda 
								
							 
						 
						
							
							
								
								Bugpoint's default memory limit (100MB) was too low for valgrind, so  
							
							... 
							
							
							
							this patch raises the default to 800MB when valgrind's active.  800
was chosen semi-arbitrarily.
llvm-svn: 98905 
							
						 
						
							2010-03-19 00:09:28 +00:00  
				
					
						
							
							
								 
						
							
								edcbfe8529 
								
							 
						 
						
							
							
								
								only print the override triple if it exists!  
							
							... 
							
							
							
							llvm-svn: 80534 
							
						 
						
							2009-08-31 03:22:35 +00:00  
				
					
						
							
							
								 
						
							
								8575a60d33 
								
							 
						 
						
							
							
								
								Change bugpoint to use Triple to make runtime decisions.  
							
							... 
							
							
							
							- This is cleaner, and makes bugpoint match the host instead of the build
   architecture.
 - Patch by Sandeep Patel!
llvm-svn: 79309 
							
						 
						
							2009-08-18 03:35:57 +00:00  
				
					
						
							
							
								 
						
							
								86ec7bae4f 
								
							 
						 
						
							
							
								
								MSVC warning fixes; patch by Stein Roger!  
							
							... 
							
							
							
							llvm-svn: 78405 
							
						 
						
							2009-08-07 20:50:09 +00:00  
				
					
						
							
							
								 
						
							
								a30c0a1b3e 
								
							 
						 
						
							
							
								
								Pass true to the Internalize parameter of createStandardLTOPasses,  
							
							... 
							
							
							
							to match llvm-ld's default behavior.
llvm-svn: 77273 
							
						 
						
							2009-07-27 23:23:47 +00:00  
				
					
						
							
							
								 
						
							
								7369951bfe 
								
							 
						 
						
							
							
								
								Add -std-{compile,link}-opts to bugpoint.  
							
							... 
							
							
							
							- Sheesh.
llvm-svn: 76402 
							
						 
						
							2009-07-20 07:01:01 +00:00  
				
					
						
							
							
								 
						
							
								ee05152cfa 
								
							 
						 
						
							
							
								
								Convert more tools code from cerr and cout to errs() and outs().  
							
							... 
							
							
							
							llvm-svn: 76070 
							
						 
						
							2009-07-16 15:30:09 +00:00  
				
					
						
							
							
								 
						
							
								19251ec836 
								
							 
						 
						
							
							
								
								To simplify the upcoming context-on-type change, switch all command line tools to using the default global context for now.  
							
							... 
							
							
							
							This will let us to hardwire stuff to the global context in the short term while the API is sorted out.
llvm-svn: 75846 
							
						 
						
							2009-07-15 22:16:10 +00:00  
				
					
						
							
							
								 
						
							
								d8db376071 
								
							 
						 
						
							
							
								
								Use errs() instead of std::cerr.  
							
							... 
							
							
							
							llvm-svn: 75791 
							
						 
						
							2009-07-15 16:35:29 +00:00  
				
					
						
							
							
								 
						
							
								1cf085d558 
								
							 
						 
						
							
							
								
								Hold the LLVMContext by reference rather than by pointer.  
							
							... 
							
							
							
							llvm-svn: 74640 
							
						 
						
							2009-07-01 21:22:36 +00:00  
				
					
						
							
							
								 
						
							
								6773d388aa 
								
							 
						 
						
							
							
								
								Add a pointer to the owning LLVMContext to Module.  This requires threading LLVMContext through a lot  
							
							... 
							
							
							
							of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.
Patches for Clang and LLVM-GCC to follow.
llvm-svn: 74614 
							
						 
						
							2009-07-01 16:58:40 +00:00  
				
					
						
							
							
								 
						
							
								6019e07b3b 
								
							 
						 
						
							
							
								
								Improve bugpoint's error messages when it runs out of memory,  
							
							... 
							
							
							
							or when some other std::exception is thrown.
llvm-svn: 70175 
							
						 
						
							2009-04-27 01:30:37 +00:00  
				
					
						
							
							
								 
						
							
								e3fc2d13be 
								
							 
						 
						
							
							
								
								Change various llvm utilities to use PrettyStackTraceProgram in  
							
							... 
							
							
							
							their main routines.  This makes the tools print their argc/argv
commands if they crash.
llvm-svn: 66248 
							
						 
						
							2009-03-06 05:34:10 +00:00  
				
					
						
							
							
								 
						
							
								c3aa8f7bab 
								
							 
						 
						
							
							
								
								fix bugpoint url, patch by Pieter de Bie!  
							
							... 
							
							
							
							llvm-svn: 64022 
							
						 
						
							2009-02-07 18:56:30 +00:00  
				
					
						
							
							
								 
						
							
								02d2bc8d3e 
								
							 
						 
						
							
							
								
								Fix a missing space in the description of the find-bugs option.  
							
							... 
							
							
							
							llvm-svn: 47271 
							
						 
						
							2008-02-18 17:15:45 +00:00  
				
					
						
							
							
								 
						
							
								345353d6b4 
								
							 
						 
						
							
							
								
								remove attributions from tools.  
							
							... 
							
							
							
							llvm-svn: 45421 
							
						 
						
							2007-12-29 20:44:31 +00:00  
				
					
						
							
							
								 
						
							
								2c6a821fd7 
								
							 
						 
						
							
							
								
								Move the space in overview output for commands out of each of the  
							
							... 
							
							
							
							commands and into the common code.
llvm-svn: 42752 
							
						 
						
							2007-10-08 15:45:12 +00:00  
				
					
						
							
							
								 
						
							
								d01defedf6 
								
							 
						 
						
							
							
								
								Add possibility to set memory limit for binaries run via libSystem. This  
							
							... 
							
							
							
							is especially needed for bugpoint. This partly implements PR688
llvm-svn: 34349 
							
						 
						
							2007-02-16 19:11:07 +00:00  
				
					
						
							
							
								 
						
							
								76d4632d92 
								
							 
						 
						
							
							
								
								make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.  
							
							... 
							
							
							
							With this change, I can now move -stats to print when llvm_shutdown is called.
llvm-svn: 32250 
							
						 
						
							2006-12-06 01:18:01 +00:00  
				
					
						
							
							
								 
						
							
								0d630c33b2 
								
							 
						 
						
							
							
								
								Need <iostream> for the time being.  
							
							... 
							
							
							
							llvm-svn: 31821 
							
						 
						
							2006-11-17 10:09:22 +00:00  
				
					
						
							
							
								 
						
							
								a322366501 
								
							 
						 
						
							
							
								
								For PR885:  
							
							... 
							
							
							
							Consolidate the LinkAllAnalyses.h and LinkAllPasses.h headers into one
so there is no dupliation.
llvm-svn: 29787 
							
						 
						
							2006-08-21 05:34:03 +00:00  
				
					
						
							
							
								 
						
							
								c46c03834c 
								
							 
						 
						
							
							
								
								This commit adds a new feature called find-bugs. The find-bugs option can be invoked on a .bc file from the command like with -find-bugs and a list of passes you wish to test. This procedure takes the set of optimization passes the user specifies, randomizes the passes, runs the passes on the specified .bc file, compiles the program, and finally runs the program checking its output vs the .bc file with no optimizations. This process repeats until either the user kills bugpoint or an error occurs in the optimizations, program complitation, or the running of the program. If an error occurs, bugpoint attempts to diagnose the error by eliminating passes that are not at fault and code that is not needed.  
							
							... 
							
							
							
							llvm-svn: 29703 
							
						 
						
							2006-08-15 16:40:49 +00:00  
				
					
						
							
							
								 
						
							
								20ec1654b1 
								
							 
						 
						
							
							
								
								Teach bugpoint to kill optimization passes that run over the timeout limit,  
							
							... 
							
							
							
							which allows it to debug optimizer infinite loops.  This patch is contributed
by Nick Lewycky, thanks!
llvm-svn: 28763 
							
						 
						
							2006-06-13 03:10:48 +00:00  
				
					
						
							
							
								 
						
							
								c1588f624c 
								
							 
						 
						
							
							
								
								Make sure this tool links in all of libVMCore.a because it can --load  
							
							... 
							
							
							
							shared objects.
llvm-svn: 28720 
							
						 
						
							2006-06-07 23:06:50 +00:00  
				
					
						
							
							
								 
						
							
								ffac286737 
								
							 
						 
						
							
							
								
								Move ToolRunner.(cpp|h) into the bugpoint directory  
							
							... 
							
							
							
							llvm-svn: 28699 
							
						 
						
							2006-06-06 22:30:59 +00:00  
				
					
						
							
							
								 
						
							
								c67a060a51 
								
							 
						 
						
							
							
								
								Convert llvm.cs.uiuc.edu -> llvm.org  
							
							... 
							
							
							
							llvm-svn: 26748 
							
						 
						
							2006-03-14 05:54:52 +00:00  
				
					
						
							
							
								 
						
							
								842118ce95 
								
							 
						 
						
							
							
								
								For PR351:  
							
							... 
							
							
							
							Generally, remove use of fork/exec from bugpoint in favor of the portable
sys::Program::ExecuteAndWait method. This change requires two new options
to bugpoint to tell it that it is running in "child" mode. In this mode,
it reads its input and runs the passes. The result code signals to the
parent instance of bugpoint what happened (success, fail, crash).
This change should make bugpoint usable on Win32 systems.
llvm-svn: 24961 
							
						 
						
							2005-12-22 20:02:55 +00:00  
				
					
						
							
							
								 
						
							
								652ce549ec 
								
							 
						 
						
							
							
								
								Link to archive versions of libraries instead of the relinked ones  
							
							... 
							
							
							
							llvm-svn: 23925 
							
						 
						
							2005-10-24 01:05:53 +00:00  
				
					
						
							
							
								 
						
							
								beb01faea3 
								
							 
						 
						
							
							
								
								When the user hits ctrl-c, bugpoint should attempt to stop reduction as  
							
							... 
							
							
							
							quickly as possible and output what it has so far.  If they hit it twice,
bugpoint is killed.
llvm-svn: 22579 
							
						 
						
							2005-08-02 02:16:17 +00:00  
				
					
						
							
							
								 
						
							
								650ba8eb56 
								
							 
						 
						
							
							
								
								Remove trailing whitespace  
							
							... 
							
							
							
							llvm-svn: 21428 
							
						 
						
							2005-04-22 00:00:37 +00:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								a079b69981 
								
							 
						 
						
							
							
								
								For PR351:  
							
							... 
							
							
							
							* sys::PreventCoreFiles -> sys::Process::PreventCoreFiles
llvm-svn: 19162 
							
						 
						
							2004-12-27 06:18:02 +00:00  
				
					
						
							
							
								 
						
							
								db1fca91af 
								
							 
						 
						
							
							
								
								llvm/Config/unistd.h has gone away, far, far away  
							
							... 
							
							
							
							llvm-svn: 19068 
							
						 
						
							2004-12-20 05:36:57 +00:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								6aa3c83f8d 
								
							 
						 
						
							
							
								
								* Convert "\n" -> '\n'  
							
							... 
							
							
							
							* Print out another '\n' after printing out program execution status
* Make sure code wraps at 80 cols
llvm-svn: 15123 
							
						 
						
							2004-07-23 01:30:49 +00:00  
				
					
						
							
							
								 
						
							
								ec2a1566cc 
								
							 
						 
						
							
							
								
								Add -load option  
							
							... 
							
							
							
							llvm-svn: 14740 
							
						 
						
							2004-07-11 01:08:19 +00:00  
				
					
						
							
							
								 
						
							
								278f5152d3 
								
							 
						 
						
							
							
								
								Header file moved  
							
							... 
							
							
							
							llvm-svn: 13813 
							
						 
						
							2004-05-27 05:41:36 +00:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								3562c2dd9f 
								
							 
						 
						
							
							
								
								Make ToolExecutionError inherit std::exception and implement its  
							
							... 
							
							
							
							interface: getMessage() is gone, use what() instead.
llvm-svn: 11621 
							
						 
						
							2004-02-19 07:39:26 +00:00  
				
					
						
							
							
								 
						
							
								947143df0e 
								
							 
						 
						
							
							
								
								Catch exception and print message as appropriate  
							
							... 
							
							
							
							llvm-svn: 11594 
							
						 
						
							2004-02-18 20:22:11 +00:00  
				
					
						
							
							
								 
						
							
								eb89dbada8 
								
							 
						 
						
							
							
								
								Bugpoint will be throwing exceptions soon, perpare for the worst.  
							
							... 
							
							
							
							llvm-svn: 11584 
							
						 
						
							2004-02-18 17:32:54 +00:00  
				
					
						
							
							
								 
						
							
								960707c335 
								
							 
						 
						
							
							
								
								Put all LLVM code into the llvm namespace, as per bug 109.  
							
							... 
							
							
							
							llvm-svn: 9903 
							
						 
						
							2003-11-11 22:41:34 +00:00  
				
					
						
							
							
								 
						
							
								ebec8030d6 
								
							 
						 
						
							
							
								
								fix file headers  
							
							... 
							
							
							
							llvm-svn: 9293 
							
						 
						
							2003-10-20 17:57:13 +00:00  
				
					
						
							
							
								 
						
							
								09344dcf97 
								
							 
						 
						
							
							
								
								Added copyright header to all C++ source files.  
							
							... 
							
							
							
							llvm-svn: 9291 
							
						 
						
							2003-10-20 17:47:21 +00:00  
				
					
						
							
							
								 
						
							
								849619e23e 
								
							 
						 
						
							
							
								
								Add usage blurb  
							
							... 
							
							
							
							llvm-svn: 9246 
							
						 
						
							2003-10-18 21:55:35 +00:00  
				
					
						
							
							
								 
						
							
								46e18d437e 
								
							 
						 
						
							
							
								
								Bugpoint has the ability of generating a plethora of core files, so to  
							
							... 
							
							
							
							avoid filling up the disk, set the max core file size to 0.
llvm-svn: 8503 
							
						 
						
							2003-09-12 20:42:57 +00:00  
				
					
						
							
							
								 
						
							
								0c2305b110 
								
							 
						 
						
							
							
								
								Re-grouped and alphabetized headers for easier reading and cleaner style.  
							
							... 
							
							
							
							llvm-svn: 7689 
							
						 
						
							2003-08-07 21:19:30 +00:00  
				
					
						
							
							
								 
						
							
								f9010058d2 
								
							 
						 
						
							
							
								
								Moved definition of InputArgv into ExecutionDriver.cpp -- it is only used there.  
							
							... 
							
							
							
							llvm-svn: 7427 
							
						 
						
							2003-07-30 17:59:23 +00:00  
				
					
						
							
							
								 
						
							
								c65effdd23 
								
							 
						 
						
							
							
								
								Add variable to capture arguments that should be passed to the user program  
							
							... 
							
							
							
							This is unused so far.
llvm-svn: 7422 
							
						 
						
							2003-07-30 17:36:07 +00:00  
				
					
						
							
							
								 
						
							
								d792c9bb46 
								
							 
						 
						
							
							
								
								Major addition to bugpoint: ability to debug code generators (LLC and LLI).  
							
							... 
							
							
							
							The C backend is assumed correct and is used to generate shared objects to be
loaded by the other two code generators.
LLC debugging should be functional now, LLI needs a few more additions to work,
the major one is renaming of external functions to call the JIT lazy function
resolver.
Bugpoint now has a command-line switch -mode with options 'compile' and
'codegen' to debug appropriate portions of tools.
ExecutionDriver.cpp: Added implementations of AbstractInterpreter for LLC and
GCC, broke out common code within other tools, and added ability to generate C
code with CBE individually, without executing the program, and the GCC tool can
generate executables shared objects or executables.
If no reference output is specified to Bugpoint, it will be generated with CBE,
because it is already assumed to be correct for the purposes of debugging using
this method. As a result, many functions now accept as an optional parameter a
shared object to be loaded in, if specified.
llvm-svn: 7293 
							
						 
						
							2003-07-24 18:17:43 +00:00  
				
					
						
							
							
								 
						
							
								9e97f4acb6 
								
							 
						 
						
							
							
								
								Bugpoint is always verbose, eliminate option  
							
							... 
							
							
							
							llvm-svn: 5989 
							
						 
						
							2003-05-03 03:18:41 +00:00  
				
					
						
							
							
								 
						
							
								73a6bdd958 
								
							 
						 
						
							
							
								
								Initial checkin of bugpoint  
							
							... 
							
							
							
							llvm-svn: 4789 
							
						 
						
							2002-11-20 22:28:10 +00:00