summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/PassManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-7/+4
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 94686
* elimiante the dynamic_cast's from opt.Chris Lattner2010-01-221-3/+4
| | | | llvm-svn: 94160
* eliminate a bunch more unneeded dynamic_cast's.Chris Lattner2010-01-221-13/+14
| | | | llvm-svn: 94156
* eliminate a bunch of dynamic_cast's.Chris Lattner2010-01-221-7/+20
| | | | llvm-svn: 94155
* eliminate a bunch of dynamic_cast's.Chris Lattner2010-01-221-9/+6
| | | | llvm-svn: 94154
* "In order to ease automatic bindings generation, it would be helpful if ↵Chris Lattner2010-01-091-4/+4
| | | | | | | | boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for." Patch by James Y Knight! llvm-svn: 93079
* Change errs() to dbgs().David Greene2010-01-051-29/+30
| | | | llvm-svn: 92660
* Avoid assigning to Changed when it won't be used after the return.Bill Wendling2009-12-251-2/+2
| | | | llvm-svn: 92160
* Remove useless calls to c_str().Benjamin Kramer2009-12-081-4/+3
| | | | llvm-svn: 90855
* Added debug output for inherited passes that are invalidated.Andreas Neustifter2009-12-041-1/+7
| | | | llvm-svn: 90553
* Move FunctionPassManagerImpl's dumpArguments and dumpPasses callsDan Gohman2009-11-231-3/+3
| | | | | | | out of its run function and into its doInitialization method, so that it does the dump once instead of once per function. llvm-svn: 89660
* Pass StringRef by value.Daniel Dunbar2009-11-061-4/+4
| | | | llvm-svn: 86251
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-3/+2
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Move the dominator verification code out of special code embedded withinDan Gohman2009-09-281-54/+7
| | | | | | | | | | | | the PassManager code into a regular verifyAnalysis method. Also, reorganize loop verification. Make the LoopPass infrastructure call verifyLoop as needed instead of having LoopInfo::verifyAnalysis check every loop in the function after each looop pass. Add a new command-line argument, -verify-loop-info, to enable the expensive full checking. llvm-svn: 82952
* Extend the StartPassTimer and StopPassTimer functions so that theDan Gohman2009-09-281-26/+20
| | | | | | | | code that stops the timer doesn't have to search to find the timer object before it stops the timer. This avoids a lock acquisition and a few other things done with the timer running. llvm-svn: 82949
* Extract the code for releasing a pass into a separate function, andDan Gohman2009-09-271-24/+25
| | | | | | tidy it up a little. llvm-svn: 82944
* make -debug-pass=Executions show information about what call graph nodesChris Lattner2009-09-151-4/+13
| | | | | | are in the SCC for each execution of a CGSCC pass. llvm-svn: 81838
* add some missing quotes in debug outputChris Lattner2009-09-151-2/+2
| | | | llvm-svn: 81836
* Kill off more cerr/cout uses and prune includes a bit.Benjamin Kramer2009-08-231-1/+0
| | | | llvm-svn: 79852
* Fix a bunch of namespace pollution.Dan Gohman2009-08-071-2/+2
| | | | llvm-svn: 78363
* Eliminate some uses of DOUT, cerr, and getNameStart().Daniel Dunbar2009-07-261-44/+44
| | | | llvm-svn: 77145
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-4/+4
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-4/+4
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Start converting to new error handling API.Torok Edwin2009-07-081-2/+2
| | | | | | | cerr+abort -> llvm_report_error assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included) llvm-svn: 75018
* Have scoped mutexes take referenes instead of pointers.Owen Anderson2009-07-071-2/+2
| | | | llvm-svn: 74931
* Use find instead of operator[] to test whether an element is in a std::map.Dan Gohman2009-07-011-2/+4
| | | | | | This fixes a bug that caused -debug-pass=Details to abort. llvm-svn: 74654
* Set wasRun to false here on Dan's suggestion.Torok Edwin2009-06-291-0/+1
| | | | llvm-svn: 74455
* Call doInitialization(), releaseMemory(), and doFinalization() for ↵Torok Edwin2009-06-291-1/+39
| | | | | | | | | | on-the-fly passes as well. Also don't call finalizers for LoopPass if initialization was not called. Add a unittest that tests that these methods are called, in the proper order, and the correct number of times. llvm-svn: 74438
* Add a SmartScopedLock, and use it to simplify code.Owen Anderson2009-06-181-5/+4
| | | | llvm-svn: 73722
* Move Threading.[h|cpp] from Support to System.Owen Anderson2009-06-181-1/+1
| | | | llvm-svn: 73707
* Guard mutation of the timing info global.Owen Anderson2009-06-171-0/+9
| | | | llvm-svn: 73639
* Always verify dominfo if expensive checking is enabled.Duncan Sands2009-05-221-0/+5
| | | | llvm-svn: 72253
* Clean up pass manager cache after each run.Devang Patel2009-04-011-0/+14
| | | | llvm-svn: 68254
* Use WriteAsOperand instead of manually decorating the name for thisDan Gohman2009-03-101-11/+8
| | | | | | debug output. This improves the printing of anonymous values. llvm-svn: 66561
* Sprinkle some PrettyStackEntry magic into the passmanager. With this, we nowChris Lattner2009-03-061-85/+99
| | | | | | | | | | | | | | | | get nice and happy stack traces when we crash in an optimizer or codegen. For example, an abort put in UnswitchLoops now looks like this: Stack dump: 0. Program arguments: clang pr3399.c -S -O3 1. <eof> parser at end of file 2. per-module optimization passes 3. Running pass 'CallGraph Pass Manager' on module 'pr3399.c'. 4. Running pass 'Loop Pass Manager' on function '@foo' 5. Running pass 'Unswitch loops' on basic block '%for.inc' Abort llvm-svn: 66260
* various cosmetic cleanups.Chris Lattner2009-03-061-136/+107
| | | | llvm-svn: 66254
* Reapply r64301. These uses of "inline" can cause strangeDuncan Sands2009-02-131-8/+8
| | | | | | | link-time failures when building with optimization. Just get rid of them. llvm-svn: 64449
* Revert r64300 and r64301. These were causing the following errors respectively:Bill Wendling2009-02-111-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During llvm-gcc bootstrap: Undefined symbols: "llvm::FPPassManager::doFinalization(llvm::Module&)", referenced from: (anonymous namespace)::CGPassManager::doFinalization(llvm::CallGraph&, llvm::Module&) in libLLVMipa.a(CallGraphSCCPass.o) "llvm::FPPassManager::doInitialization(llvm::Module&)", referenced from: (anonymous namespace)::CGPassManager::doInitialization(llvm::CallGraph&, llvm::Module&) in libLLVMipa.a(CallGraphSCCPass.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[3]: *** [/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/obj-llvm/Release/bin/opt] Error 1 During an LLVM release build: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-register-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenRegisterInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td llvm[3]: Building X86.td instruction names with tblgen /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-enums -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrNames.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td llvm[3]: Building X86.td instruction information with tblgen /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td llvm[3]: Building X86.td assembly writer with tblgen /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-asm-writer -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenAsmWriter.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td llvm[3]: Compiling InstructionCombining.cpp for Release build if /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~dst/Developer/usr/bin/llvm-g++-4.2 -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fno-exceptions -Woverloaded-virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter -fstrict-aliasing -Wstrict-aliasing -c -MMD -MP -MF "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.lo" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d" /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar/InstructionCombining.cpp -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o ; \ then /bin/mv -f "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Trans llvm-svn: 64311
* These uses of "inline" can cause strange link-timeDuncan Sands2009-02-111-8/+8
| | | | | | | failures when building with optimization. Just get rid of them. llvm-svn: 64301
* Rename getAnalysisToUpdate to getAnalysisIfAvailable.Duncan Sands2009-01-281-4/+4
| | | | llvm-svn: 63198
* Fix a use of an invalid iterator when -debug-pass=Details is used.Dan Gohman2008-11-061-1/+1
| | | | llvm-svn: 58816
* fix memory leak in pass manager when adding an analysis pass that already ↵Nuno Lopes2008-11-041-1/+3
| | | | | | | | 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
* Add <cstdio> include where needed by gcc-4.4.Duncan Sands2008-10-081-0/+1
| | | | | | Patch by Samuel Tardieu. llvm-svn: 57291
* Remove interfaces implemented by dead pass from the list of available passes.Devang Patel2008-10-061-7/+17
| | | | | | Patch By Matthijs Kooijman. llvm-svn: 57202
* Add assertion check.Devang Patel2008-09-091-1/+1
| | | | llvm-svn: 56016
* Simplify.Devang Patel2008-09-091-8/+2
| | | | | | Fix outdated comment. llvm-svn: 55993
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-5/+4
| | | | llvm-svn: 55779
* The pass manager is not able to schedule -loop-deletion -loop-index-split.Devang Patel2008-08-141-14/+28
| | | | | | | | | | | The loop-deletion pass does not preserve dom frontier, which is required by loop-index-split. When the PM checks dom frontier for loop-index-split, it has already verified that lcssa is availalble. However, new dom frontier forces new loop pass manager, which does not have lcssa yet. The PM should recheck availability of required analysis passes in such cases. llvm-svn: 54805
* Use SmallVector instead of std::vectorDevang Patel2008-08-121-12/+12
| | | | llvm-svn: 54685
* Use DenseMap to keep track of last users.Devang Patel2008-08-121-6/+28
| | | | | | Use inversed map for faster queries. llvm-svn: 54662
OpenPOWER on IntegriCloud