Adjust usage of the ExecuteAndWait function to use the last argument which
is the ErrMsg string. This is necessitated because this function no longer
throws exceptions on error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29791 91177308-0d34-0410-b5e6-96231b3b80d8
Remove all exception code from Program.inc and implement its new interface
with an ErrMsg string argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29790 91177308-0d34-0410-b5e6-96231b3b80d8
Make sys::Program::ExecuteAndWait not throw exceptions and update any
affected code. It now return -9999 to signal that the program couldn't be
executed. Only one case (in bugpoint) actually examines the result code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29785 91177308-0d34-0410-b5e6-96231b3b80d8
with the -verify pass option. It is also more accurate in that this option
causes a verify option to be run after every pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29782 91177308-0d34-0410-b5e6-96231b3b80d8
one-off (and broken) RunOptimizations function. Also, run some cleanup
passes after the user's loaded passes run. This make sure to clean up
any cruft left around by thos passes.
This patch was inspired by a patch submitted by Bram Adams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29781 91177308-0d34-0410-b5e6-96231b3b80d8
and a handler, which would produce errors like:
terminate called after throwing an instance of 'std::string'
we must comment out setting -fno-exceptions until PR797 is completely
fixed. Once libraries like lib/System and lib/Support are exception free,
we can turn it back on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29768 91177308-0d34-0410-b5e6-96231b3b80d8
1. Actually turn on -fno-exceptions in libraries that do not have the
REQUIRES_EH option in their Makefile. The following library file size
savings were made (DEBUG):
libLLVMDataStructure.a 525K
libLLVMCore.a 380K
libLLVMCodeGen.a 350K
libLLVMTransformUtils.a 305K
libLLVMScalarOpts.a 270K
libLLVMAnalysis.a 247K
libLLVMSelectionDAG.a 233K
libLLVMipo.a 175K
LLVMX86.o 123K
LLVMPPC.o 81K
libLLVMipa.a 17K
TOTAL 2,706K
Note that the savings is actually a little larger than this because
I didn't count any of the libraries that had small changes.
2. Remove REQUIRES_EH from the AsmParser library as it is now exception
free. This resulted in a nearly 78K drop in the size of the debug
library for AsmParser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29767 91177308-0d34-0410-b5e6-96231b3b80d8
Rid the Assembly Parser of exceptions. This is a really gross hack but it
will do until the Assembly Parser is re-written as a recursive descent.
The basic premise is that wherever the old "ThrowException" function was
called (new name: GenerateError) we set a flag (TriggerError). Every
production checks that flag and calls YYERROR if it is set. Additionally,
each call to ThrowException in the grammar is replaced with GEN_ERROR
which calls GenerateError and then YYERROR immediately. This prevents
the remaining production from continuing after an error condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29763 91177308-0d34-0410-b5e6-96231b3b80d8
Shrinkify LLVM's footprint by removing the analyze tool and moving its
functionality into the opt tool. THis eliminates one of the largest tools
from LLVM and doesn't make opt much bigger because it already included
most of the analysis passes. To get the old analyze functionality pass
the -analyze option to opt. Note that the integeration here is dead
simple. The "main" of analyze was just copied to opt and invoked if the
-analyze option was given. There may be opportunities for further
integration such as removing the distinction between transform passes
and analysis passes.
To use the analysis functionality, if you previously did this:
analyze $FNAME -domset -disable-verify
you would now do this:
opt -analyze $FNAME -domset -disable-verify
Pretty simple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29762 91177308-0d34-0410-b5e6-96231b3b80d8