Daniel Dunbar
5899dda08c
Switch some clients to Value::getName(), and other getName() user
...
simplification.
- NFC
llvm-svn: 76789
2009-07-22 21:33:09 +00:00
Bob Wilson
46f079e33f
Fix a crash in SROA. The FunctionPass::doInitialization method was never
...
being called so that Context was never initialized. I'm not sure if this
is the right fix but at least it keeps opt from crashing.
llvm-svn: 76220
2009-07-17 19:05:13 +00:00
Daniel Dunbar
41f9a3afdb
opt: Add -std-link-opts argument, matches llvm-ld's optimizations.
...
llvm-svn: 76199
2009-07-17 18:09:39 +00:00
Dan Gohman
ee05152cfa
Convert more tools code from cerr and cout to errs() and outs().
...
llvm-svn: 76070
2009-07-16 15:30:09 +00:00
Owen Anderson
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
Dan Gohman
607818a2c1
Add a Force option to raw_fd_ostream to specify whether opening
...
an existing file is considered an error. Convert several tools
to use raw_fd_ostream instead of std::ostream, and to use this
new option instead of doing a manual check.
llvm-svn: 75801
2009-07-15 17:29:42 +00:00
Dan Gohman
d8db376071
Use errs() instead of std::cerr.
...
llvm-svn: 75791
2009-07-15 16:35:29 +00:00
Owen Anderson
1cf085d558
Hold the LLVMContext by reference rather than by pointer.
...
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Owen Anderson
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
Owen Anderson
b70adf2b92
Get rid of the global CFGOnly flag by threading a ShortNames parameters through the GraphViz rendering code.
...
Update other uses in the codebase for this change.
llvm-svn: 74084
2009-06-24 17:37:09 +00:00
Daniel Dunbar
94c7b791b1
Switch opt to using StandardPasses.h
...
- No functionality change, but please check if you don't believe me.
llvm-svn: 72789
2009-06-03 18:22:15 +00:00
Misha Brukman
7182686dbf
Fixed file header comment.
...
llvm-svn: 68250
2009-04-01 21:37:19 +00:00
Dan Gohman
38a9631d5f
Eliminate several more unnecessary intptr_t casts.
...
llvm-svn: 64888
2009-02-18 05:09:16 +00:00
Duncan Sands
44c8cd97a5
Rename AddReadAttrs to FunctionAttrs, and teach it how
...
to work out (in a very simplistic way) which function
arguments (pointer arguments only) are only dereferenced
and so do not escape. Mark such arguments 'nocapture'.
llvm-svn: 61525
2008-12-31 16:14:43 +00:00
Devang Patel
8c84d28250
Enable LoopIndexSplit pass.
...
llvm-svn: 60555
2008-12-04 21:40:31 +00:00
Devang Patel
3bc9e25df2
Disable -loop-index-split for now.
...
llvm-svn: 60087
2008-11-26 04:58:14 +00:00
Zhongxing Xu
50e6f82ce4
Adjust indent.
...
llvm-svn: 60081
2008-11-26 02:57:24 +00:00
Nuno Lopes
0460bb27e0
fix memory leak in pass manager when adding an analysis pass that already existed. as pass manager takes ownership of the added passes, it has to delete the pass if it isnt added to the pass list
...
tweak the opt tool so that it doesnt access a Pass after the ownership was taken by the pass manager
llvm-svn: 58730
2008-11-04 23:03:58 +00:00
Daniel Dunbar
81b5fa5620
Move Print*Pass to use raw_ostream.
...
llvm-svn: 57946
2008-10-22 03:25:22 +00:00
Daniel Dunbar
54d5b9ea2c
Privatize PrintModulePass and PrintFunctionPass and add
...
createPrintModulePass and createPrintFunctionPass.
- So clients who compile w/o RTTI can use them.
llvm-svn: 57933
2008-10-21 23:33:38 +00:00
Duncan Sands
9c40c28926
Rationalize the names of passes that print information:
...
-callgraph => print-callgraph
-callscc => print-callgraph-sccs
-cfgscc => print-cfg-sccs
-externalfnconstants => print-externalfnconstants
-print => print-function
-print-alias-sets (no change)
-print-callgraph => dot-callgraph
-print-cfg => dot-cfg
-print-cfg-only => dot-cfg-only
-print-dom-info (no change)
-printm => print-module
-printusedtypes => print-used-types
llvm-svn: 56487
2008-09-23 12:47:39 +00:00
Oscar Fuentes
a229b3c9a7
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Duncan Sands
5408dfd3b8
Turn on the AddReadAttrs pass.
...
llvm-svn: 56345
2008-09-19 14:34:36 +00:00
Duncan Sands
938e8f60d6
Teach -callgraph to always print the callgraph (as the
...
description says it does), not just when -analyze is
used as well. This means printing to stderr, so adjust
some tests.
llvm-svn: 56337
2008-09-19 07:57:09 +00:00
Devang Patel
7293f0f344
Fix comments, help messages.
...
llvm-svn: 56282
2008-09-17 16:01:39 +00:00
Devang Patel
11b862aed5
Fix cut-n-pasto.
...
llvm-svn: 56265
2008-09-17 00:01:04 +00:00
Devang Patel
9966ccffb4
Add -O1, -O2 and -O3 that matches llvm-gcc's -O1, -O2 and -O3 respectively.
...
llvm-svn: 56255
2008-09-16 22:25:14 +00:00
Duncan Sands
18da83555f
End of the GlobalsModRef experiment.
...
llvm-svn: 56222
2008-09-15 18:42:38 +00:00
Duncan Sands
fa1472fd55
Give GlobalsModRef a whirl in the nightly testers.
...
I placed it just before GVN because that it is the
pass most likely to benefit from it. Some quick
and dirty testing confirms that this is a decent
place for it.
llvm-svn: 56144
2008-09-12 08:23:37 +00:00
Devang Patel
d3a1b46aad
Backout 55429
...
llvm-svn: 55432
2008-08-27 20:51:49 +00:00
Devang Patel
fdef44d7c4
Add facility to create a target.
...
llvm-svn: 55429
2008-08-27 20:00:27 +00:00
Evan Cheng
4015ae1d2c
Goodbye tail duplication (for good this time).
...
llvm-svn: 53574
2008-07-14 22:29:15 +00:00
Duncan Sands
2e6f7b49bf
Fix comment.
...
llvm-svn: 53525
2008-07-13 20:14:38 +00:00
Chris Lattner
501c3b67fd
Fix PR2231 - opt -internalize -std-compile-opts should run internalize first
...
llvm-svn: 53523
2008-07-13 19:35:21 +00:00
Devang Patel
81ea3bb55c
Move dominator info printer into tool/opt/GraphPrinters.cpp
...
llvm-svn: 52907
2008-06-30 17:32:58 +00:00
Owen Anderson
fd24ce0a99
Re-enable the newly simplified ADCE. This fixes a regression on
...
Dhrystone introduced by its removal.
llvm-svn: 51669
2008-05-29 08:48:21 +00:00
Owen Anderson
698e72ec2c
Remove ADCE from the optimization pipeline.
...
llvm-svn: 51581
2008-05-27 04:27:27 +00:00
Evan Cheng
c5c7a290e9
Re-enable tail duplication pass (now with default threshold down to 1 instruction).
...
llvm-svn: 51184
2008-05-16 07:57:10 +00:00
Evan Cheng
13e693f331
Remove tail duplication pass.
...
llvm-svn: 51139
2008-05-15 07:43:15 +00:00
Devang Patel
38e59eb0c7
Recover nestedloop regression reported by nightly tester.
...
llvm-svn: 51110
2008-05-14 18:04:30 +00:00
Devang Patel
a37cf46c87
Do not run instruction combiner in middle of loop optimization passes.
...
llvm-svn: 51084
2008-05-14 00:26:11 +00:00
Owen Anderson
18709fef4a
Re-enable loop deletion by default.
...
llvm-svn: 50941
2008-05-10 07:10:24 +00:00
Owen Anderson
0d84582dc0
Disable loop deletion until the release branch.
...
llvm-svn: 50787
2008-05-06 23:56:34 +00:00
Owen Anderson
7db342b0a8
Enable dead loop elimination.
...
llvm-svn: 50682
2008-05-05 23:38:07 +00:00
Chris Lattner
e3b320bd4b
move libcalls to the same place llvm-gcc has it.
...
llvm-svn: 50593
2008-05-02 22:05:06 +00:00
Chris Lattner
b15e1f963d
enable jump threading pass by default. This causes no miscompilations
...
and can significantly shrinkify some code, particularly from C++ land.
llvm-svn: 50025
2008-04-21 04:22:09 +00:00
Duncan Sands
9ed1242efc
Run SimplifyLibCalls near the beginning, not at
...
the end. It is now run at the same moment as in
llvm-gcc. Also, run StripDeadPrototypes at the
end, just before running DeadTypeElimination.
This may be useful when doing LTO. Note that
llvm-gcc runs StripDeadPrototypes but not
DeadTypeElimination.
llvm-svn: 49848
2008-04-17 12:03:38 +00:00
Evan Cheng
2025a490d0
Move memcpy / memset optimization pass after GVN.
...
llvm-svn: 49457
2008-04-10 01:33:05 +00:00
Owen Anderson
ef9a6fd5c2
Factor a bunch of functionality related to memcpy and memset transforms out of
...
GVN and into its own pass.
llvm-svn: 49419
2008-04-09 08:23:16 +00:00
Chris Lattner
345353d6b4
remove attributions from tools.
...
llvm-svn: 45421
2007-12-29 20:44:31 +00:00