Reid Spencer
713eedc1fb
For PR797:
...
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.
llvm-svn: 29763
2006-08-18 08:43:06 +00:00
Reid Spencer
378f7d5d20
For PR872:
...
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.
llvm-svn: 29762
2006-08-18 06:34:30 +00:00
Chris Lattner
16cf81306e
Don't pass target name into TargetData anymore, it is never used or needed.
...
llvm-svn: 28831
2006-06-16 18:23:49 +00:00
Reid Spencer
5113dc5cfe
For PR780:
...
1. Add #includes to LinkAllVMCore.h to get Mangler.o and InlineAsm.o
2. Make Mangler.h and InlineAsm.h use the macros to ensure linkage
3. Make each of the tools with --load options include LinkAllVMCore.h
This should be the last set of changes for this bug and 800.
llvm-svn: 28719
2006-06-07 23:03:13 +00:00
Owen Anderson
8c2c1e90c4
Refactor a bunch of includes so that TargetMachine.h doesn't have to include
...
TargetData.h. This should make recompiles a bit faster with my current
TargetData tinkering.
llvm-svn: 28238
2006-05-12 06:33:49 +00:00
Misha Brukman
650ba8eb56
Remove trailing whitespace
...
llvm-svn: 21428
2005-04-22 00:00:37 +00:00
Jeff Cohen
c8f1f4bc8e
Use binary mode for reading/writing bytecode files
...
llvm-svn: 19751
2005-01-22 17:36:17 +00:00
Jeff Cohen
72f8f4cc3d
Get the #ifdef right on LinkAllPasses.h.
...
llvm-svn: 19310
2005-01-06 07:01:08 +00:00
Jeff Cohen
13932fb27f
Fix minor mistakes
...
llvm-svn: 19309
2005-01-06 06:29:42 +00:00
Jeff Cohen
00d5508496
Add project opt to Visual Studio.
...
llvm-svn: 19307
2005-01-06 06:02:53 +00:00
Reid Spencer
1fbccbe786
Make opt honor the quiet option when printing the bytecode warning.
...
llvm-svn: 19294
2005-01-05 17:31:55 +00:00
Reid Spencer
c967184a50
Move the code for printing out a warning about bytecode output to a console
...
into lib/Support so it can be used with other tools.
llvm-svn: 19238
2005-01-01 23:57:01 +00:00
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
Reid Spencer
b2d0fa0823
Fix usage of changed function prototype
...
llvm-svn: 17798
2004-11-14 22:30:54 +00:00
Misha Brukman
b889b2ad97
Fix hyphenation and quoting style for great justice
...
llvm-svn: 17024
2004-10-15 23:22:48 +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
a29ca1b7df
Prune unused #include
...
llvm-svn: 14753
2004-07-11 04:05:32 +00:00
Chris Lattner
ec2a1566cc
Add -load option
...
llvm-svn: 14740
2004-07-11 01:08:19 +00:00
Chris Lattner
1553edc2da
Neuter the -q option. Stop printing the "program modified" message, ever
...
llvm-svn: 13844
2004-05-27 20:32:10 +00:00
Reid Spencer
c8878edc5a
Re-introduce the -q option and make opt always return 0, even if the
...
optimization pasess fail. This is necessary to avoid breaking feature
tests in the tests suite that depend on this behavior. *sigh*
llvm-svn: 13832
2004-05-27 16:28:54 +00:00
Reid Spencer
7873671463
Removed the -q option and the default message written to stderr. The
...
output produces confusing results in TestRunner.sh
llvm-svn: 13828
2004-05-27 08:26:22 +00:00
Chris Lattner
278f5152d3
Header file moved
...
llvm-svn: 13813
2004-05-27 05:41:36 +00:00
Chris Lattner
46e18c7f87
Fix wonky header
...
Address PR305: LLVM tools will happily spew bytecode onto your terminal
llvm-svn: 12602
2004-04-02 05:06:57 +00:00
Chris Lattner
12439ffbac
Make sure to print a stack trace whenever an error signal is delivered to the
...
tool.
llvm-svn: 11632
2004-02-19 20:32:12 +00:00
Chris Lattner
98cd4bf06f
Make 'opt -o -' work correctly instead of creating a file named './-'
...
llvm-svn: 10359
2003-12-10 14:41:33 +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
John Criswell
567fe2f312
Removed extraneous comment line.
...
llvm-svn: 9308
2003-10-20 20:40:30 +00:00
John Criswell
09344dcf97
Added copyright header to all C++ source files.
...
llvm-svn: 9291
2003-10-20 17:47:21 +00:00
Misha Brukman
d67697411a
Fix grammar.
...
llvm-svn: 9026
2003-10-10 17:56:49 +00:00
Chris Lattner
02a168310b
Kill using declarations
...
llvm-svn: 6292
2003-05-22 20:13:16 +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
aa038c856a
Remove support for "target data" pass ctors
...
llvm-svn: 5900
2003-04-24 18:36:41 +00:00
Chris Lattner
52c7138d22
Don't support codegen passes in opt
...
llvm-svn: 5797
2003-04-16 23:02:16 +00:00
Chris Lattner
f46a02c88e
Give verbose error messages if bytecode file cannot be parsed
...
llvm-svn: 5789
2003-04-16 20:51:36 +00:00
Chris Lattner
30f40d94cc
Rename -no-* to -disable-*
...
llvm-svn: 5642
2003-02-26 20:00:41 +00:00
Chris Lattner
b8450599f3
Add new -no-verify option
...
llvm-svn: 5542
2003-02-12 18:45:08 +00:00
Chris Lattner
4dbe59b5ba
Add a new -no-output option, useful for -aa-eval tests.
...
llvm-svn: 5541
2003-02-12 18:43:33 +00:00
Chris Lattner
a9d552b3a9
Rename Sparc.h TargetMachineImpls.h
...
llvm-svn: 4409
2002-10-29 20:48:09 +00:00
Vikram S. Adve
82491b79a1
Add support for optimization passes that use a TargetMachine object.
...
llvm-svn: 3752
2002-09-16 16:09:43 +00:00
Chris Lattner
b05cd8a88d
Change command line option message on -q to make it more accurate
...
llvm-svn: 3177
2002-07-31 16:52:49 +00:00
Chris Lattner
6f43f6d136
Print the tool name when an error comes from so that I can tell which
...
tool of a pipeline is having issues.
llvm-svn: 3168
2002-07-30 21:43:25 +00:00
Chris Lattner
e79bf38f4a
Factor PassNamePArser out into llvm/Support/PassNameParser.h
...
llvm-svn: 3109
2002-07-26 21:09:32 +00:00
Chris Lattner
64a6727d02
*** empty log message ***
...
llvm-svn: 3087
2002-07-25 16:31:09 +00:00
Chris Lattner
5a48a248bd
Use the pass registration mechanism to populate command line options for
...
opt, not huge explicit gross tables.
llvm-svn: 3021
2002-07-23 18:12:22 +00:00
Chris Lattner
f5cad15a67
*** empty log message ***
...
llvm-svn: 2985
2002-07-22 02:10:13 +00:00
Anand Shukla
1a26e82bd5
added emitfuncs pass, and disabled reassociate pass (needs fixing)
...
llvm-svn: 2885
2002-07-12 20:14:27 +00:00
Chris Lattner
33422fedc2
*** empty log message ***
...
llvm-svn: 2813
2002-06-30 16:25:25 +00:00
Anand Shukla
68c9977d7f
Changes for 64bit gcc
...
llvm-svn: 2797
2002-06-25 21:43:28 +00:00
Chris Lattner
113f4f4609
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
5972e5cc5c
Expose cfg simplification pass
...
llvm-svn: 2699
2002-05-21 20:05:16 +00:00
Chris Lattner
81525db280
expose LICM pass
...
llvm-svn: 2614
2002-05-10 22:44:37 +00:00
Chris Lattner
6205c268e0
Expose the lowerallocs pass
...
llvm-svn: 2602
2002-05-10 15:43:07 +00:00
Chris Lattner
35cc0d2027
Expose the pi node insertion pass.
...
llvm-svn: 2594
2002-05-10 05:41:49 +00:00
Chris Lattner
a2f3b65dec
Expose expression reassociation
...
llvm-svn: 2557
2002-05-08 22:18:34 +00:00
Chris Lattner
b4bf0c1422
Spell aggressive correctly
...
llvm-svn: 2551
2002-05-07 22:15:01 +00:00
Chris Lattner
89a20ef164
Merge all include/llvm/Transforms/Scalar/* into a single Scalar.h
...
llvm-svn: 2538
2002-05-07 20:03:27 +00:00
Chris Lattner
15435fd550
Move UnifyFunctionExitNodes to Utils library: final resting place this time
...
llvm-svn: 2531
2002-05-07 19:18:48 +00:00
Chris Lattner
7608a46cbe
Updates to move some header files out of include/llvm/Transforms into
...
the Scalar and Utils subdirectories
llvm-svn: 2523
2002-05-07 18:36:35 +00:00
Chris Lattner
b81da4b616
Expose the internalize pass.
...
llvm-svn: 2365
2002-04-28 05:49:53 +00:00
Chris Lattner
9f3b15b8fe
Expose new GCSE pass
...
llvm-svn: 2339
2002-04-28 00:48:17 +00:00
Chris Lattner
f998685cd9
s/Method/Function
...
llvm-svn: 2336
2002-04-27 07:27:19 +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
c065ad850c
Make sure that there is no case where a signal can occur leaving a partially
...
written output file. This is important because crashing testcases often write
part of a file out, and the testing harness decides the file is up-to-date next
time the test is run.
llvm-svn: 2303
2002-04-18 19:55:25 +00:00
Chris Lattner
fda0035ec9
* Add the printm pass to allow dumping the entire module after a transformation.
...
* s/Method/Function/
llvm-svn: 2234
2002-04-13 18:32:47 +00:00
Chris Lattner
b86b11a02e
Expose funcresolve pass through opt
...
llvm-svn: 2231
2002-04-12 18:21:13 +00:00
Chris Lattner
6e39131e01
s/PrintMethodPass/PrintFunctionPass
...
llvm-svn: 2182
2002-04-08 22:05:01 +00:00
Chris Lattner
b9530575ef
Add hook for pool allocation pass
...
llvm-svn: 2013
2002-03-28 18:08:07 +00:00
Chris Lattner
92c3670048
Checking for Cameron
...
llvm-svn: 2011
2002-03-28 17:56:28 +00:00
Vikram S. Adve
025fdf98b6
Rename pass to DecomposeMultiDimRefs.
...
llvm-svn: 1960
2002-03-24 03:19:54 +00:00
Chris Lattner
6ba1a5f7d9
Expose dead instruction elimination pass
...
llvm-svn: 1877
2002-03-14 22:36:15 +00:00
Chris Lattner
04805fa29c
Change over to use new style pass mechanism, now passes only expose small
...
creation functions in their public header file, unless they can help it.
llvm-svn: 1816
2002-02-26 21:46:54 +00:00
Chris Lattner
d209550828
Move ProfilePaths class into ProfilePaths library, only expose a creation function
...
llvm-svn: 1812
2002-02-26 20:04:59 +00:00
Anand Shukla
d7291473cf
Includes -paths option to trace paths in the program
...
llvm-svn: 1811
2002-02-26 19:57:59 +00:00
Chris Lattner
f608d7f4f4
* Expose the verifier pass as one that can be ran
...
* Force the verifier to run before bytecode is written
llvm-svn: 1783
2002-02-20 17:56:53 +00:00
Chris Lattner
e5e23525ec
Enable register promotion pass
...
llvm-svn: 1740
2002-02-12 17:17:33 +00:00
Chris Lattner
4db2f2cbce
Add mergereturn pass
...
llvm-svn: 1629
2002-02-01 04:54:11 +00:00
Chris Lattner
c90d6ba9a2
Convert to use new Pass framework...
...
llvm-svn: 1610
2002-01-31 00:47:12 +00:00
Chris Lattner
0e11e54d20
In an amazing fit of stupidity, I flipped the conditional and didn't test
...
it right. Sheesh :)
llvm-svn: 1550
2002-01-22 21:07:24 +00:00
Chris Lattner
3787ee6be6
Rename LowerAllocations.h to ChangeAllocations.h since it now contains the
...
RaiseAllocations pass as well.
llvm-svn: 1525
2002-01-22 01:04:08 +00:00
Chris Lattner
4f0f09757d
Pull RaiseAllocations stuff out of the CleanGCC pass into it's own pass in
...
the ChangeAllocations.h header file.
llvm-svn: 1522
2002-01-22 00:13:51 +00:00
Chris Lattner
ee965abc36
Move stuff out of the Optimizations directories into the appropriate Transforms
...
directories. Eliminate the opt namespace.
llvm-svn: 1520
2002-01-21 23:17:48 +00:00
Chris Lattner
c940c536ab
Rename SwapStructureContents -> IPO/SimpleStructMutation
...
Move MutateStructTypes.(cpp|h) -> IPO/MutateStructTypes.(cpp|h)
llvm-svn: 1510
2002-01-21 07:52:35 +00:00
Chris Lattner
0686e435d1
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.
llvm-svn: 1507
2002-01-21 07:31:50 +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
4f106568d4
Add instruction combining pass
...
Rename -mergecons to -constmerge
llvm-svn: 1478
2001-12-14 16:50:35 +00:00
Chris Lattner
28fef95650
Remove unnecesary namespace impot
...
llvm-svn: 1419
2001-12-05 06:35:30 +00:00
Chris Lattner
27ace6461f
Use new induction variable simplification code with -indvars option
...
llvm-svn: 1410
2001-12-04 04:32:04 +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
ba5220d4c4
* Add hooks to globaldce
...
* Fix ugly hacks by implementing IPOs correctly
* Use an auto_ptr to manage the module lifecycle
llvm-svn: 1395
2001-11-26 19:22:39 +00:00
Chris Lattner
bf3bfebb7b
Change swapstructs itf
...
Add nasty hack to be removed later
llvm-svn: 1356
2001-11-26 18:18:53 +00:00
Chris Lattner
fc92c5fa1a
Add hooks to call the new swap structcontents pass
...
llvm-svn: 1243
2001-11-10 07:16:10 +00:00
Chris Lattner
e326957333
Move the Raise xform from opt to transforms
...
llvm-svn: 1072
2001-11-01 02:41:09 +00:00
Chris Lattner
7a2d677332
Add hook for GCC cleanup pass
...
llvm-svn: 1060
2001-10-31 04:29:44 +00:00
Chris Lattner
3923967f1e
Fix to reference the right header
...
llvm-svn: 915
2001-10-19 15:39:14 +00:00
Chris Lattner
75c9f9f958
Expose more xforms to the opt utility
...
llvm-svn: 900
2001-10-18 20:06:45 +00:00
Chris Lattner
ed8947fb11
Use the standard header not the old one
...
llvm-svn: 886
2001-10-18 06:13:08 +00:00
Chris Lattner
6fc7ff4db8
Add support to insert trace code as an "optimization"
...
llvm-svn: 884
2001-10-18 06:05:15 +00:00
Chris Lattner
5b6026a13a
* Passes return true if they change something, not if they fail
...
* Convert opt to use Pass's and convert optimizations to pass structure
llvm-svn: 870
2001-10-18 01:31:43 +00:00
Chris Lattner
c3f679f2fe
Remove support for const pool merging, which is obsolete now.
...
llvm-svn: 471
2001-09-07 16:59:35 +00:00
Chris Lattner
3dfcf026f0
Change option name slightly
...
llvm-svn: 287
2001-07-23 23:02:51 +00:00
Chris Lattner
d5c3133364
Use the new Alias command line option
...
llvm-svn: 284
2001-07-23 20:22:30 +00:00
Chris Lattner
ab0cc40796
CommandLine library cleanup. No longer use getValue/setValue, instead, just treat the commandline
...
args as the objects they represent and the "right thing" will happen
llvm-svn: 283
2001-07-23 19:27:24 +00:00
Chris Lattner
e2472bbf6c
Moved inline/llvm/Tools/* to include/llvm/Support/*
...
llvm-svn: 279
2001-07-23 17:46:59 +00:00
Chris Lattner
0af2464a78
Large scale changes to implement new command line argument facility
...
llvm-svn: 272
2001-07-23 02:35:57 +00:00
Chris Lattner
05132dacd0
Add support to call LevelRaise
...
llvm-svn: 217
2001-07-20 19:16:47 +00:00
Chris Lattner
57f61a32b0
Include ADCE pass, rename include/Opt directory to llvm/Optimizations
...
Optimizations now in opt namespace.
Rename SCCP pass to DoSCCP
llvm-svn: 118
2001-06-30 06:38:31 +00:00
Chris Lattner
bef00adb40
Add command line arguments for Constant Pool Merging & Sparse Conditional Constant Prop
...
llvm-svn: 94
2001-06-27 23:37:58 +00:00
Chris Lattner
ac6d4fd1b1
Add stub for induction variable code
...
llvm-svn: 38
2001-06-20 19:27:34 +00:00
Chris Lattner
03d5267ba1
Removed silly test code
...
llvm-svn: 31
2001-06-13 19:55:50 +00:00
Chris Lattner
4ddc451fb3
Added a stupid testcase for iterators.
...
llvm-svn: 17
2001-06-08 00:35:25 +00:00
Chris Lattner
2f7c963559
Initial revision
...
llvm-svn: 2
2001-06-06 20:29:01 +00:00