summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt
Commit message (Collapse)AuthorAgeFilesLines
...
* Add some command line options for twiddling the default data layoutChris Lattner2009-10-221-2/+20
| | | | | | used by opt when a module doesn't specify one. Patch from Kenneth Uildriks! llvm-svn: 84814
* There seems to be no reason for opt's -S option to be hidden.Duncan Sands2009-10-141-2/+1
| | | | | | Make it visible. llvm-svn: 84127
* Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn'tDan Gohman2009-09-111-4/+4
| | | | | | | | | | | | | | | 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. llvm-svn: 81568
* opt: Add -S option to print output as LLVM assembly.Daniel Dunbar2009-09-051-5/+14
| | | | llvm-svn: 81082
* Use IRReader.h in opt, to support reading of LLVM Assembly files directly.Dan Gohman2009-09-033-13/+6
| | | | llvm-svn: 80922
* Fix some nasty callgraph dangling pointer problems in Chris Lattner2009-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 80527
* Make LLVM command-line tools overwrite their output files without -f.Dan Gohman2009-08-252-6/+3
| | | | | | | | | | | | | | | | 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. llvm-svn: 79990
* These flushes were only needed when the code was transitioning betweenDan Gohman2009-08-241-10/+0
| | | | | | std::cout and outs(). llvm-svn: 79891
* eliminate the ostream version of CheckBitcodeOutputToConsole,Chris Lattner2009-08-231-2/+1
| | | | | | | change the raw_ostream one to take the raw_ostream byref instead of byptr. Prune #includes, eliminate a use of Streams.h llvm-svn: 79863
* use raw_fd_ostream instead of fstream with graphwriter,Chris Lattner2009-08-232-7/+8
| | | | | | flush the right stream in opt.cpp. llvm-svn: 79837
* Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner2009-08-234-29/+32
| | | | | | update all code that this affects. llvm-svn: 79830
* Change raw_fd_ostream to take flags as an optional bitmask Chris Lattner2009-08-231-2/+3
| | | | | | | | | | | | | | | | 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). llvm-svn: 79807
* Make unit-at-a-time on by default to match the behavior of llvm-gcc.Eric Christopher2009-08-211-1/+2
| | | | llvm-svn: 79698
* Kill trailing whitespace.Eric Christopher2009-08-211-25/+25
| | | | llvm-svn: 79696
* Switch some clients to Value::getName(), and other getName() userDaniel Dunbar2009-07-221-1/+1
| | | | | | | simplification. - NFC llvm-svn: 76789
* Fix a crash in SROA. The FunctionPass::doInitialization method was neverBob Wilson2009-07-171-0/+1
| | | | | | | 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
* opt: Add -std-link-opts argument, matches llvm-ld's optimizations.Daniel Dunbar2009-07-171-6/+39
| | | | llvm-svn: 76199
* Convert more tools code from cerr and cout to errs() and outs().Dan Gohman2009-07-162-32/+42
| | | | llvm-svn: 76070
* To simplify the upcoming context-on-type change, switch all command line ↵Owen Anderson2009-07-151-1/+1
| | | | | | | | 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
* Add a Force option to raw_fd_ostream to specify whether openingDan Gohman2009-07-151-18/+11
| | | | | | | | 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
* Use errs() instead of std::cerr.Dan Gohman2009-07-151-2/+3
| | | | llvm-svn: 75791
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-011-1/+1
| | | | llvm-svn: 74640
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-011-1/+3
| | | | | | | | | | 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
* Get rid of the global CFGOnly flag by threading a ShortNames parameters ↵Owen Anderson2009-06-241-1/+2
| | | | | | | | through the GraphViz rendering code. Update other uses in the codebase for this change. llvm-svn: 74084
* Switch opt to using StandardPasses.hDaniel Dunbar2009-06-031-126/+21
| | | | | | - No functionality change, but please check if you don't believe me. llvm-svn: 72789
* Fixed file header comment.Misha Brukman2009-04-011-3/+3
| | | | llvm-svn: 68250
* Eliminate several more unnecessary intptr_t casts.Dan Gohman2009-02-184-11/+11
| | | | llvm-svn: 64888
* Rename AddReadAttrs to FunctionAttrs, and teach it howDuncan Sands2008-12-311-2/+2
| | | | | | | | 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
* Enable LoopIndexSplit pass.Devang Patel2008-12-041-2/+2
| | | | llvm-svn: 60555
* Disable -loop-index-split for now.Devang Patel2008-11-261-2/+2
| | | | llvm-svn: 60087
* Adjust indent.Zhongxing Xu2008-11-261-2/+2
| | | | llvm-svn: 60081
* fix memory leak in pass manager when adding an analysis pass that already ↵Nuno Lopes2008-11-041-6/+11
| | | | | | | | 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
* Move Print*Pass to use raw_ostream.Daniel Dunbar2008-10-221-1/+2
| | | | llvm-svn: 57946
* Privatize PrintModulePass and PrintFunctionPass and addDaniel Dunbar2008-10-211-1/+1
| | | | | | | createPrintModulePass and createPrintFunctionPass. - So clients who compile w/o RTTI can use them. llvm-svn: 57933
* Rationalize the names of passes that print information:Duncan Sands2008-09-233-9/+10
| | | | | | | | | | | | | | | | | -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
* Initial support for the CMake build system.Oscar Fuentes2008-09-221-0/+9
| | | | llvm-svn: 56419
* Turn on the AddReadAttrs pass.Duncan Sands2008-09-191-1/+4
| | | | llvm-svn: 56345
* Teach -callgraph to always print the callgraph (as theDuncan Sands2008-09-191-6/+5
| | | | | | | | description says it does), not just when -analyze is used as well. This means printing to stderr, so adjust some tests. llvm-svn: 56337
* Fix comments, help messages.Devang Patel2008-09-171-4/+2
| | | | llvm-svn: 56282
* Fix cut-n-pasto.Devang Patel2008-09-171-2/+2
| | | | llvm-svn: 56265
* Add -O1, -O2 and -O3 that matches llvm-gcc's -O1, -O2 and -O3 respectively.Devang Patel2008-09-161-0/+142
| | | | llvm-svn: 56255
* End of the GlobalsModRef experiment.Duncan Sands2008-09-151-2/+0
| | | | llvm-svn: 56222
* Give GlobalsModRef a whirl in the nightly testers.Duncan Sands2008-09-121-1/+3
| | | | | | | | | 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
* Backout 55429Devang Patel2008-08-271-48/+4
| | | | llvm-svn: 55432
* Add facility to create a target.Devang Patel2008-08-271-4/+48
| | | | llvm-svn: 55429
* Goodbye tail duplication (for good this time).Evan Cheng2008-07-141-1/+0
| | | | llvm-svn: 53574
* Fix comment.Duncan Sands2008-07-131-1/+1
| | | | llvm-svn: 53525
* Fix PR2231 - opt -internalize -std-compile-opts should run internalize firstChris Lattner2008-07-131-8/+17
| | | | llvm-svn: 53523
* Move dominator info printer into tool/opt/GraphPrinters.cppDevang Patel2008-06-301-0/+32
| | | | llvm-svn: 52907
* Re-enable the newly simplified ADCE. This fixes a regression onOwen Anderson2008-05-291-1/+1
| | | | | | Dhrystone introduced by its removal. llvm-svn: 51669
OpenPOWER on IntegriCloud