summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/PruneEH.cpp
Commit message (Collapse)AuthorAge
* [C++] Use 'nullptr'. Transforms edition.Craig Topper2014-04-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207196 91177308-0d34-0410-b5e6-96231b3b80d8
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-22
| | | | | | | | | | | | | | | | | definition below all of the header #include lines, lib/Transforms/... edition. This one is tricky for two reasons. We again have a couple of passes that define something else before the includes as well. I've sunk their name macros with the DEBUG_TYPE. Also, InstCombine contains headers that need DEBUG_TYPE, so now those headers #define and #undef DEBUG_TYPE around their code, leaving them well formed modular headers. Fixing these headers was a large motivation for all of these changes, as "leaky" macros of this form are hard on the modules implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206844 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-05
| | | | | | class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202953 91177308-0d34-0410-b5e6-96231b3b80d8
* [Modules] Move CFG.h to the IR library as it defines graph traits overChandler Carruth2014-03-04
| | | | | | IR types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202827 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Split the CallGraph out from the ModulePass which creates theChandler Carruth2013-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CallGraph. This makes the CallGraph a totally generic analysis object that is the container for the graph data structure and the primary interface for querying and manipulating it. The pass logic is separated into its own class. For compatibility reasons, the pass provides wrapper methods for most of the methods on CallGraph -- they all just forward. This will allow the new pass manager infrastructure to provide its own analysis pass that constructs the same CallGraph object and makes it available. The idea is that in the new pass manager, the analysis pass's 'run' method returns a concrete analysis 'result'. Here, that result is a 'CallGraph'. The 'run' method will typically do only minimal work, deferring much of the work into the implementation of the result object in order to be lazy about computing things, but when (like DomTree) there is *some* up-front computation, the analysis does it prior to handing the result back to the querying pass. I know some of this is fairly ugly. I'm happy to change it around if folks can suggest a cleaner interim state, but there is going to be some amount of unavoidable ugliness during the transition period. The good thing is that this is very limited and will naturally go away when the old pass infrastructure goes away. It won't hang around to bother us later. Next up is the initial new-PM-style call graph analysis. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195722 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge CallGraph and BasicCallGraph.Rafael Espindola2013-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193734 91177308-0d34-0410-b5e6-96231b3b80d8
* PruneEH: Only merge attribute sets when used. No functionality change.Benjamin Kramer2013-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184041 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove addRetAttributes and addFnAttributes, which aren't useful abstractions.Bill Wendling2013-01-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173992 91177308-0d34-0410-b5e6-96231b3b80d8
* More encapsulation work.Bill Wendling2013-01-22
| | | | | | | | Use the AttributeSet when we're talking about more than one attribute. Add a function that adds a single attribute. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173196 91177308-0d34-0410-b5e6-96231b3b80d8
* Move CallGraphSCCPass.h into the Analysis tree; that's where theChandler Carruth2013-01-07
| | | | | | implementation lives already. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171746 91177308-0d34-0410-b5e6-96231b3b80d8
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-02
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-19
| | | | | | single attribute in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170502 91177308-0d34-0410-b5e6-96231b3b80d8
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-07
| | | | | | in the near future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169651 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-03
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the Attributes::Builder outside of the Attributes class and into its ↵Bill Wendling2012-10-15
| | | | | | own class named AttrBuilder. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165960 91177308-0d34-0410-b5e6-96231b3b80d8
* Attributes RewriteBill Wendling2012-10-15
| | | | | | | | | | | Convert the internal representation of the Attributes class into a pointer to an opaque object that's uniqued by and stored in the LLVMContext object. The Attributes class then becomes a thin wrapper around this opaque object. Eventually, the internal representation will be expanded to include attributes that represent code generation options, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165917 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the bitwise assignment OR operator from the Attributes class. Replace ↵Bill Wendling2012-10-14
| | | | | | it with the equivalent from the builder class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165895 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the enum value of the attributes when adding them to the attributes builder.Bill Wendling2012-10-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165494 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert to using the Attributes::Builder class to create attributes.Bill Wendling2012-10-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165468 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵Sylvestre Ledru2012-09-27
| | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164768 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo 'iff' => 'if'Sylvestre Ledru2012-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164767 91177308-0d34-0410-b5e6-96231b3b80d8
* [unwind removal] We no longer have 'unwind' instructions being generated, soBill Wendling2012-02-06
| | | | | | | remove the code that handles them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149901 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark the SCC as "might unwind" if we run into a 'resume' instruction.Bill Wendling2011-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137627 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
* When deleting a basic block, remove call edges only for non-intrinsics.John McCall2011-06-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132803 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve line number information.Devang Patel2011-05-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131112 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused STL header includes.Jay Foad2011-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-19
| | | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
* CallGraphSCC passes implicity require CallGraph analysis.Owen Anderson2010-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116443 91177308-0d34-0410-b5e6-96231b3b80d8
* Now with fewer extraneous semicolons!Owen Anderson2010-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115996 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r110396 to fix buildbots.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-05
| | | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109045 91177308-0d34-0410-b5e6-96231b3b80d8
* introduce a new CallGraphSCC class, and pass it aroundChris Lattner2010-04-16
| | | | | | | | | 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
* Finally land the InvokeInst operand reordering.Gabor Greif2010-03-24
| | | | | | | | | | | | | I have audited all getOperandNo calls now, fixing hidden assumptions. CallSite related uglyness will be eliminated successively. Note this patch has a long and griveous history, for all the back-and-forths have a look at CallSite.h's log. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99399 91177308-0d34-0410-b5e6-96231b3b80d8
* backing out r99170 because it still fails on clang-x86_64-darwin10-fntGabor Greif2010-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99171 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that hopefully all direct accesses to InvokeInst operands are fixedGabor Greif2010-03-22
| | | | | | | | we can reapply the InvokeInst operand reordering patch. (see r98957). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99170 91177308-0d34-0410-b5e6-96231b3b80d8
* back out r98957, it broke ↵Gabor Greif2010-03-19
| | | | | | http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98958 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit r80858 again (which has been backed out in r80871).Gabor Greif2010-03-19
| | | | | | | | | | | | | This time I did a self-hosted bootstrap on Linux x86-64, with no problems. Let's see how darwin 64-bit self-hosting goes. At the first sign of failure I'll back this out. Maybe the valgrind bots give me a hint of what may be wrong (it at all). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98957 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-25
| | | | | | | VISIBILITY_HIDDEN removal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85043 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-25
| | | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85042 91177308-0d34-0410-b5e6-96231b3b80d8
* back out my recent commit (r80858), it seems to break self-hosting ↵Gabor Greif2009-09-03
| | | | | | buildbot's stage 2 configure git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80871 91177308-0d34-0410-b5e6-96231b3b80d8
* re-commit r66920 (which has been backed out in r66953) I may have more luck ↵Gabor Greif2009-09-03
| | | | | | this time. I'll back out if needed... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80858 91177308-0d34-0410-b5e6-96231b3b80d8
* Change CallGraphNode to maintain it's Function as an AssertingVHChris Lattner2009-09-01
| | | | | | | | | | | | | for sanity. This didn't turn up any bugs. Change CallGraphNode to maintain its "callsite" information in the call edges list as a WeakVH instead of as an instruction*. This fixes a broad class of dangling pointer bugs, and makes CallGraph have a number of useful invariants again. This fixes the class of problem indicated by PR4029 and PR3601. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80663 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some nasty callgraph dangling pointer problems in Chris Lattner2009-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
* Move more code back to 2.5 APIs.Owen Anderson2009-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77635 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the Pass+Context magic.Owen Anderson2009-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
* More LLVMContext-ification.Owen Anderson2009-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74811 91177308-0d34-0410-b5e6-96231b3b80d8