Commit Graph

380 Commits

Author SHA1 Message Date
Dan Gohman
7f924a3116 Don't create an output stream when output is disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104875 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 19:52:20 +00:00
Dan Gohman
26a7074939 Avoid calling outs() and fouts() when the stream isn't really needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104873 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 19:47:36 +00:00
Dan Gohman
9cc1c18b7b Use regular PassManager instead of FunctionPassManager in opt, since it
isn't doing lazy streaming. This also fixes a missing doFinalization call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103774 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-14 15:36:54 +00:00
Chris Lattner
2decb22222 introduce a new CallGraphSCC class, and pass it around
to CallGraphSCCPass's instead of passing around a
std::vector<CallGraphNode*>.  No functionality change,
but now we have a much tidier interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101558 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 22:42:17 +00:00
Daniel Dunbar
8f10915145 Remove unnecessary uses of <iostream>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101338 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 03:47:24 +00:00
Dan Gohman
51ecc389a9 Trim #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99416 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 19:56:17 +00:00
Jeffrey Yasskin
bd85e8e3ad Avoid leaking the FunctionPassManager from opt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99180 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-22 15:56:04 +00:00
Benjamin Kramer
3460f221cd Avoid a dangling pointer dereference, PassManager::add can delete the Pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96576 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 12:57:05 +00:00
Jeffrey Yasskin
f0356fe140 Kill ModuleProvider and ghost linkage by inverting the relationship between
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes
GlobalValues now, and doesn't provide modules, it's renamed to
"GVMaterializer". Code that used to need a ModuleProvider to materialize
Functions can now materialize the Functions directly. Functions no longer use a
magic linkage to record that they're materializable; they simply ask the
GVMaterializer.

Because the C ABI must never change, we can't remove LLVMModuleProviderRef or
the functions that refer to it. Instead, because Module now exposes the same
functionality ModuleProvider used to, we store a Module* in any
LLVMModuleProviderRef and translate in the wrapper methods.  The bindings to
other languages still use the ModuleProvider concept.  It would probably be
worth some time to update them to follow the C++ more closely, but I don't
intend to do it.

Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 20:34:15 +00:00
Chris Lattner
43b5f9312d make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:43:08 +00:00
Chris Lattner
e73a31f667 Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 06:49:46 +00:00
Chris Lattner
476e9bd114 elimiante the dynamic_cast's from opt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 06:03:06 +00:00
Chris Lattner
6f6e87db19 simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94159 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 05:54:03 +00:00
Eli Friedman
74733a7e46 Make opt -O3 act more like clang -O3 etc., by making the inlining thresholds
match.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93798 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:38:31 +00:00
Dan Gohman
b56bf581a3 Don't create a (empty) output file, and don't warn about bitcode output
to a console, when --analyze is used.

Similarly, avoid creating an empty output file when --disable-output is used.

Print a warning when the -o option appears with either --analyze or
--disable-output, to indicate that the option is being ignored.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93685 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 17:47:24 +00:00
David Greene
08fc0d3026 Enable debug buffering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92667 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:30:32 +00:00
Chris Lattner
c0d91b75f0 when opt crashes, print its command line arguments as a pretty stack trace.
Somehow opt was missed when this was added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90912 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 00:41:28 +00:00
Tobias Grosser
56f4ef3232 Remove ShortNames from getNodeLabel in DOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:38:47 +00:00
Tobias Grosser
a10d598602 Instantiate DefaultDOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:38:13 +00:00
Kenneth Uildriks
b908f8ad6a Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85900 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03 15:29:06 +00:00
Chris Lattner
61db1a1b6a nothing opt uses can throw, remove the try block and -fexceptions when
building opt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84816 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 00:46:41 +00:00
Chris Lattner
d331cb3fde Add some command line options for twiddling the default data layout
used by opt when a module doesn't specify one.  Patch from Kenneth Uildriks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84814 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 00:44:10 +00:00
Duncan Sands
81b0b64298 There seems to be no reason for opt's -S option to be hidden.
Make it visible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 20:01:39 +00:00
Dan Gohman
ec080467f5 Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn't
working. To support this, add an is_displayed() function to raw_ostream,
and generalize Process::StandardOutIsDisplayed and friends in order to
support it.

Also, call RemoveFileOnSignal before creating a file instead of after, so
that the file isn't left behind if the program is interrupted between when
the file is created and RemoveFileOnSignal is called.

While here, add a -S to llvm-extract and port it to IRReader so that it
supports assembly input.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81568 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11 20:46:33 +00:00
Daniel Dunbar
8c042c2337 opt: Add -S option to print output as LLVM assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-05 11:34:53 +00:00
Dan Gohman
99ed416787 Use IRReader.h in opt, to support reading of LLVM Assembly files directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 16:00:08 +00:00
Chris Lattner
5095e3d1d1 Fix some nasty callgraph dangling pointer problems in
argpromotion and structretpromote.  Basically, when replacing
a function, they used the 'changeFunction' api which changes
the entry in the function map (and steals/reuses the callgraph
node).

This has some interesting effects: first, the problem is that it doesn't
update the "callee" edges in any callees of the function in the call graph.
Second, this covers for a major problem in all the CGSCC pass stuff, which 
is that it is completely broken when functions are deleted if they *don't*
reuse a CGN.  (there is a cute little fixme about this though :).

This patch changes the protocol that CGSCC passes must obey: now the CGSCC 
pass manager copies the SCC and preincrements its iterator to avoid passes
invalidating it.  This allows CGSCC passes to mutate the current SCC.  However
multiple passes may be run on that SCC, so if passes do this, they are now
required to *update* the SCC to be current when they return.

Other less interesting parts of this patch are that it makes passes update
the CG more directly, eliminates changeFunction, and requires clients of
replaceCallSite to specify the new callee CGN if they are changing it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 00:19:58 +00:00
Dan Gohman
baa26395cc Make LLVM command-line tools overwrite their output files without -f.
This is conventional command-line tool behavior. -f now just means
"enable binary output on terminals".

Add a -f option to llvm-extract and llvm-link, for consistency.

Remove F_Force from raw_fd_ostream and enable overwriting and
truncating by default. Introduce an F_Excl flag to permit users to
enable a failure when the file already exists. This flag is
currently unused.

Update Makefiles and documentation accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 15:34:52 +00:00
Dan Gohman
127dd968e0 These flushes were only needed when the code was transitioning between
std::cout and outs().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79891 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 04:13:48 +00:00
Chris Lattner
b683ea4712 eliminate the ostream version of CheckBitcodeOutputToConsole,
change the raw_ostream one to take the raw_ostream byref instead
of byptr.  Prune #includes, eliminate a use of Streams.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79863 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 21:36:09 +00:00
Chris Lattner
2e35bec78a use raw_fd_ostream instead of fstream with graphwriter,
flush the right stream in opt.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79837 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 07:31:22 +00:00
Chris Lattner
45cfe545ec Change Pass::print to take a raw ostream instead of std::ostream,
update all code that this affects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79830 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 06:03:38 +00:00
Chris Lattner
17e9edc4a7 Change raw_fd_ostream to take flags as an optional bitmask
instead of as two bools.  Use this to add a F_Append flag
which has the obvious behavior.

Other unrelated changes conflated into this patch:

1. REmove EH stuff from llvm-dis and llvm-as, the try blocks
   are dead.
2. Simplify the filename inference code in llvm-as/llvm-dis,
   because raw_fd_ostream does the right thing with '-'.
3. Switch machine verifier to use raw_ostream instead of ostream
   (Which is the thing that needed append in the first place).




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79807 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 02:51:22 +00:00
Eric Christopher
c4769ba204 Make unit-at-a-time on by default to match the behavior of llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79698 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 23:30:30 +00:00
Eric Christopher
a887ae4608 Kill trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79696 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 23:29:40 +00:00
Daniel Dunbar
3d5126fbad Switch some clients to Value::getName(), and other getName() user
simplification.
 - NFC


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76789 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 21:33:09 +00:00
Bob Wilson
d8aa9fc062 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76220 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 19:05:13 +00:00
Daniel Dunbar
adc82888b5 opt: Add -std-link-opts argument, matches llvm-ld's optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:09:39 +00:00
Dan Gohman
ac95cc79ac Convert more tools code from cerr and cout to errs() and outs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76070 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 15:30:09 +00:00
Owen Anderson
0d7c695c74 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 22:16:10 +00:00
Dan Gohman
a1bdcedc38 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75801 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:29:42 +00:00
Dan Gohman
65f57c233c Use errs() instead of std::cerr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75791 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 16:35:29 +00:00
Owen Anderson
31895e7359 Hold the LLVMContext by reference rather than by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 21:22:36 +00:00
Owen Anderson
8b477ed579 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 16:58:40 +00:00
Owen Anderson
8cbc94afb7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 17:37:09 +00:00
Daniel Dunbar
ca8131ebac Switch opt to using StandardPasses.h
- No functionality change, but please check if you don't believe me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72789 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 18:22:15 +00:00
Misha Brukman
a9f4836313 Fixed file header comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68250 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 21:37:19 +00:00
Dan Gohman
865f006bb4 Eliminate several more unnecessary intptr_t casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 05:09:16 +00:00
Duncan Sands
9e89ba31f1 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'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61525 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 16:14:43 +00:00
Devang Patel
4d6e2331c3 Enable LoopIndexSplit pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60555 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-04 21:40:31 +00:00
Devang Patel
6f9f3e1a18 Disable -loop-index-split for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60087 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 04:58:14 +00:00
Zhongxing Xu
3253f4c979 Adjust indent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60081 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 02:57:24 +00:00
Nuno Lopes
641397f2ef 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58730 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 23:03:58 +00:00
Daniel Dunbar
3b0da26e20 Move Print*Pass to use raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57946 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 03:25:22 +00:00
Daniel Dunbar
f4db3a51c7 Privatize PrintModulePass and PrintFunctionPass and add
createPrintModulePass and createPrintFunctionPass.
 - So clients who compile w/o RTTI can use them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57933 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 23:33:38 +00:00
Duncan Sands
3ee8fc9649 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56487 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-23 12:47:39 +00:00
Oscar Fuentes
3d01fc7de8 Initial support for the CMake build system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 01:08:49 +00:00
Duncan Sands
210fada2c6 Turn on the AddReadAttrs pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56345 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-19 14:34:36 +00:00
Duncan Sands
e65d39a42c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56337 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-19 07:57:09 +00:00
Devang Patel
442b1aa94b Fix comments, help messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56282 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 16:01:39 +00:00
Devang Patel
d9424edf94 Fix cut-n-pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56265 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 00:01:04 +00:00
Devang Patel
2d7551ced2 Add -O1, -O2 and -O3 that matches llvm-gcc's -O1, -O2 and -O3 respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56255 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 22:25:14 +00:00
Duncan Sands
38197fed5b End of the GlobalsModRef experiment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56222 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-15 18:42:38 +00:00
Duncan Sands
0e3b7b2f91 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56144 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 08:23:37 +00:00
Devang Patel
ff5d06d797 Backout 55429
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55432 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-27 20:51:49 +00:00
Devang Patel
9d2968c824 Add facility to create a target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55429 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-27 20:00:27 +00:00
Evan Cheng
5f2f218825 Goodbye tail duplication (for good this time).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53574 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-14 22:29:15 +00:00
Duncan Sands
56eb133095 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53525 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-13 20:14:38 +00:00
Chris Lattner
3dda08ad5d Fix PR2231 - opt -internalize -std-compile-opts should run internalize first
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53523 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-13 19:35:21 +00:00
Devang Patel
687e03b2fa Move dominator info printer into tool/opt/GraphPrinters.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52907 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 17:32:58 +00:00
Owen Anderson
c5b271072e Re-enable the newly simplified ADCE. This fixes a regression on
Dhrystone introduced by its removal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51669 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-29 08:48:21 +00:00
Owen Anderson
9e2abd3840 Remove ADCE from the optimization pipeline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51581 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-27 04:27:27 +00:00
Evan Cheng
df0457241d Re-enable tail duplication pass (now with default threshold down to 1 instruction).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51184 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-16 07:57:10 +00:00
Evan Cheng
38503d4046 Remove tail duplication pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51139 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-15 07:43:15 +00:00
Devang Patel
8ffe2e2156 Recover nestedloop regression reported by nightly tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51110 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-14 18:04:30 +00:00
Devang Patel
81a1d08cb7 Do not run instruction combiner in middle of loop optimization passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51084 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-14 00:26:11 +00:00
Owen Anderson
4982babf4a Re-enable loop deletion by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50941 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-10 07:10:24 +00:00
Owen Anderson
77a895e599 Disable loop deletion until the release branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50787 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 23:56:34 +00:00
Owen Anderson
3f3d95c75a Enable dead loop elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50682 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-05 23:38:07 +00:00
Chris Lattner
866b9e1520 move libcalls to the same place llvm-gcc has it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50593 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-02 22:05:06 +00:00
Chris Lattner
2510c3b70f enable jump threading pass by default. This causes no miscompilations
and can significantly shrinkify some code, particularly from C++ land.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50025 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 04:22:09 +00:00
Duncan Sands
fa191e4cd4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49848 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 12:03:38 +00:00
Evan Cheng
5d4ed3ba11 Move memcpy / memset optimization pass after GVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49457 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 01:33:05 +00:00
Owen Anderson
a723d1e48f Factor a bunch of functionality related to memcpy and memset transforms out of
GVN and into its own pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 08:23:16 +00:00
Chris Lattner
21c62da287 remove attributions from tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:44:31 +00:00
Chris Lattner
5116784826 remove attributions from tools/utils makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45414 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:07:17 +00:00
Dan Gohman
82a13c9c48 Move the space in overview output for commands out of each of the
commands and into the common code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42752 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-08 15:45:12 +00:00
Owen Anderson
d06eb2c879 Turn GVN on by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41787 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-08 22:23:52 +00:00
Devang Patel
305743df72 Enable loop index split pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41714 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 20:46:58 +00:00
Owen Anderson
f6a05f949f Rename FastDSE to just DSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40668 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 06:36:51 +00:00
Dan Gohman
d47cab81b6 Remove a FIXME comment that wasn't removed when the code it accompanied
was removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40591 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 15:01:09 +00:00
Owen Anderson
b63c7b695f Turn on FastDSE by default.
Note: FastDSE now equals or exceeds the results of old DSE on all of SPEC2000 and SPEC2006. Unless major problems
show up in the testers, it will likely completely replace old DSE in the near future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-17 21:59:21 +00:00
Evan Cheng
74b1e1424c Change sroa threshold back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39980 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-17 20:07:21 +00:00
Evan Cheng
a8b9a7b924 Temporarily set SROA threshold to 512.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39950 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-17 01:52:05 +00:00
Gabor Greif
a99be51bf5 Here is the bulk of the sanitizing.
Almost all occurrences of "bytecode" in the sources have been eliminated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 17:07:56 +00:00
Devang Patel
56fb164540 Fix PR1539. Add LoopPassPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37909 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 15:32:03 +00:00
Devang Patel
28552da9c3 Fix PR 1526.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37780 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-28 23:09:25 +00:00
Chris Lattner
065344dfd5 use the new MemoryBuffer interfaces to simplify error reporting in clients.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36900 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 23:45:49 +00:00
Chris Lattner
d44ae90fc8 make sure the ofstream for opt's output file is destroyed, so that the bits
actually land on disk.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36877 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:17:23 +00:00
Chris Lattner
744879ea01 switch tools to bitcode from bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36872 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 09:32:02 +00:00