Commit Graph

2252 Commits

Author SHA1 Message Date
Devang Patel
4f4c28f75f Restore isCFGOnly property of various analysis passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48579 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 02:25:21 +00:00
Devang Patel
bed7e68498 Keep track of analysis information inherited from Module pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48576 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 01:09:53 +00:00
Evan Cheng
dff1dcac6c Add intrinsics to match mmx shift builtin's with immediate operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48569 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 23:38:52 +00:00
Devang Patel
b9c432fe77 #if 1 .. #endif markers do not add any value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 22:24:25 +00:00
Devang Patel
c758209153 PassInfo keep tracks whether a pass is an analysis pass or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48554 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 21:56:59 +00:00
Chris Lattner
d8ff3caaa0 add some convenience methods for creating GEP instructions and
struct types.  Patch by David Chisnall, with some tweaks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48531 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 05:06:05 +00:00
Gordon Henriksen
3400097966 C bindings for Module-, Function-, and BasicBlock::iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48528 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 03:47:18 +00:00
Gordon Henriksen
dc1ce7bdc6 C and Objective Caml bindings for the various getParent methods of the IR.
Based on Erick Tryzelaar's patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48523 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 01:11:35 +00:00
Devang Patel
c7fe32e840 Do not use virtual function to identify an analysis pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48520 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 00:48:41 +00:00
Devang Patel
1cee94f041 Identify Analysis pass.
Do not run analysis pass again if analysis info is still available.
This fixes PR1441.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48476 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-18 00:39:19 +00:00
Gordon Henriksen
d78c0f5a72 C and Objective Caml bindings for PassManagers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48413 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 04:20:44 +00:00
Gordon Henriksen
af59b105bb Expose Module::dump via C and Ocaml.
Patch by Erick Tryzelaar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48379 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 23:58:56 +00:00
Dan Gohman
b973d5f9b5 Update comments; getPassName no longer uses RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48369 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 18:27:04 +00:00
Chris Lattner
d5d94df73f move a bunch of trivial methods to be inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48326 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 05:00:21 +00:00
Chris Lattner
041221c097 Various improvements suggested by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48325 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 04:33:03 +00:00
Dan Gohman
59ef015c65 Eliminate a few unnecessary uses of dynamic_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48318 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 02:08:36 +00:00
Dan Gohman
9769cee9f7 Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48317 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 01:58:48 +00:00
Dan Gohman
5fe6e33ef8 Don't redundantly clear std::vector members in destructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48316 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 01:57:34 +00:00
Dan Gohman
0961ec1afe Change PMTopLevelManager's PassManagers vector element type from
Pass* to PMDataManager*. PMDataManager is more specific than Pass,
so this more accurately describes the objects that are being stored.

This eliminates the need for several dynamic_casts to PMDataManager*.
It does introduce one dynamic_cast though, in dumpPasses(). Give
this one a comment describing why a dynamic_cast is being used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48315 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 01:48:32 +00:00
Dan Gohman
c2f12ab5e5 Change PMStack::push to accept a PMDataManager* instead of
a Pass*. PMDataManager* is what it actually holds, so this
makes it clearer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48314 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 01:21:31 +00:00
Chris Lattner
58d74910c6 Reimplement the parameter attributes support, phase #1. hilights:
1. There is now a "PAListPtr" class, which is a smart pointer around
   the underlying uniqued parameter attribute list object, and manages
   its refcount.  It is now impossible to mess up the refcount.
2. PAListPtr is now the main interface to the underlying object, and
   the underlying object is now completely opaque.
3. Implementation details like SmallVector and FoldingSet are now no
   longer part of the interface.
4. You can create a PAListPtr with an arbitrary sequence of
   ParamAttrsWithIndex's, no need to make a SmallVector of a specific 
   size (you can just use an array or scalar or vector if you wish).
5. All the client code that had to check for a null pointer before
   dereferencing the pointer is simplified to just access the 
   PAListPtr directly.
6. The interfaces for adding attrs to a list and removing them is a
   bit simpler.

Phase #2 will rename some stuff (e.g. PAListPtr) and do other less 
invasive changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48289 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12 17:45:29 +00:00
Anton Korobeynikov
e846dd89c1 Add helper for ultimate aliasee resoltion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48255 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 22:28:56 +00:00
Dan Gohman
580b89992f Give PassManager and FunctionPassManager a common base class, with
add(Pass *) as a pure virtual member function. This will allow all
the various addPassesTo* functions in LLVM to avoid hard-coding what
type of PassManager is used. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48226 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 16:41:42 +00:00
Dan Gohman
b4b28231f7 Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48225 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 16:18:48 +00:00
Dan Gohman
ac9dff686f Use utostr instead of a stringstream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48198 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 23:55:07 +00:00
Dan Gohman
450e7c3c54 Initialize ArgTypes directly instead of manually copying in the elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48195 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 23:41:23 +00:00
Dan Gohman
e1ff8ec36f Remove an unnecessary #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48193 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 23:37:12 +00:00
Nick Lewycky
9be3c97183 Turn unwind_to into "unwinds to".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48123 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 02:20:00 +00:00
Nick Lewycky
c6694228fa Two things. Preserve the unwind_to when splitting a BB.
Add the ability to remove just one instance of a BB from a phi node. This fixes
the compile error in the tree now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48085 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 05:04:48 +00:00
Dan Gohman
cdff0d6b04 Remove unused runPass methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48044 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-08 01:43:56 +00:00
Devang Patel
45e99e4f29 Check struct return type first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47922 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05 00:27:05 +00:00
Devang Patel
6494768ffc Print types for all ret operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47911 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-04 22:05:14 +00:00
Devang Patel
552ec65ebd Revert SmallVector ctor variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47908 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-04 21:54:56 +00:00
Devang Patel
52f8ed8368 Add FunctionType ctor variant that takes SmallVector params.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47895 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-04 18:57:05 +00:00
Devang Patel
41e2397b72 s/isReturnStruct()/hasStructRetAttr()/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47857 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 21:46:28 +00:00
Devang Patel
d15d5e3bbe If a function uses multive values in ret instruction then it
is returning a struct value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47848 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 18:58:16 +00:00
Chris Lattner
8728f1915f Add a new ShuffleVectorInst::getMaskValue method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47813 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 05:28:33 +00:00
Nick Lewycky
fc82fabe00 Add an unwind_to field to basic blocks, making them Users instead of Values.
This is the first checkin for PR1269, the new EH infrastructure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 02:48:09 +00:00
Nick Lewycky
1038222a9b Print the name, not a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47796 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 17:20:55 +00:00
Chris Lattner
ab3b77834c Fix PR2113 by verifying allocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47792 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 09:01:57 +00:00
Dan Gohman
37a9ca5bc5 Use the new convertFromAPInt instead of convertFromZeroExtendedInteger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47744 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29 01:42:52 +00:00
Devang Patel
26c22cfbcd Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47700 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27 23:33:51 +00:00
Devang Patel
e6be34a53e Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47653 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27 01:20:54 +00:00
Devang Patel
8e50760dfe Add assert to check return type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47637 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 22:55:21 +00:00
Devang Patel
53284d39cd Remove unncessary ReturnInst constructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47633 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 22:12:58 +00:00
Devang Patel
f4511cd8fb Use SmallVector while constructing ReturnInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47619 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 19:38:17 +00:00
Devang Patel
fea9830468 Avoid const_casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47616 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 19:15:26 +00:00
Devang Patel
f8989657a7 Remove unnecessary getOperand/setOperand overriders.
Simplify getReturnValue()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47614 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 19:08:13 +00:00
Devang Patel
814ebd77b0 Unify to ReturnInst::init() member functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47611 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 18:49:29 +00:00
Devang Patel
64d4e61259 Optimize most common case by using single RetVal in ReturnInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47607 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 17:56:20 +00:00