1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

2130 Commits

Author SHA1 Message Date
Dan Gohman
e84a9f3740 Eliminate a few unnecessary uses of dynamic_cast.
llvm-svn: 48318
2008-03-13 02:08:36 +00:00
Dan Gohman
548e24d9ae Fix a typo.
llvm-svn: 48317
2008-03-13 01:58:48 +00:00
Dan Gohman
971fdb877c Don't redundantly clear std::vector members in destructors.
llvm-svn: 48316
2008-03-13 01:57:34 +00:00
Dan Gohman
abf6c9aa1d 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.

llvm-svn: 48315
2008-03-13 01:48:32 +00:00
Dan Gohman
70f4b55e3f Change PMStack::push to accept a PMDataManager* instead of
a Pass*. PMDataManager* is what it actually holds, so this
makes it clearer.

llvm-svn: 48314
2008-03-13 01:21:31 +00:00
Chris Lattner
7925cc72c0 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.

llvm-svn: 48289
2008-03-12 17:45:29 +00:00
Anton Korobeynikov
38bc6e43f7 Add helper for ultimate aliasee resoltion
llvm-svn: 48255
2008-03-11 22:28:56 +00:00
Dan Gohman
2b0112a65a 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. 

llvm-svn: 48226
2008-03-11 16:41:42 +00:00
Dan Gohman
54b152cbbf Fix typos in comments.
llvm-svn: 48225
2008-03-11 16:18:48 +00:00
Dan Gohman
13e8dd3b34 Use utostr instead of a stringstream.
llvm-svn: 48198
2008-03-10 23:55:07 +00:00
Dan Gohman
0b00b3b786 Initialize ArgTypes directly instead of manually copying in the elements.
llvm-svn: 48195
2008-03-10 23:41:23 +00:00
Dan Gohman
70ab77e185 Remove an unnecessary #include
llvm-svn: 48193
2008-03-10 23:37:12 +00:00
Nick Lewycky
5dd879d5b5 Turn unwind_to into "unwinds to".
llvm-svn: 48123
2008-03-10 02:20:00 +00:00
Nick Lewycky
c64eb33c52 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.

llvm-svn: 48085
2008-03-09 05:04:48 +00:00
Dan Gohman
8ff072e188 Remove unused runPass methods.
llvm-svn: 48044
2008-03-08 01:43:56 +00:00
Devang Patel
a97b000dcc Check struct return type first.
llvm-svn: 47922
2008-03-05 00:27:05 +00:00
Devang Patel
a33f4b4cc7 Print types for all ret operands.
llvm-svn: 47911
2008-03-04 22:05:14 +00:00
Devang Patel
26d0fac377 Revert SmallVector ctor variants.
llvm-svn: 47908
2008-03-04 21:54:56 +00:00
Devang Patel
27426dedc0 Add FunctionType ctor variant that takes SmallVector params.
llvm-svn: 47895
2008-03-04 18:57:05 +00:00
Devang Patel
d0d7028a2b s/isReturnStruct()/hasStructRetAttr()/g
llvm-svn: 47857
2008-03-03 21:46:28 +00:00
Devang Patel
f5e729f70b If a function uses multive values in ret instruction then it
is returning a struct value.

llvm-svn: 47848
2008-03-03 18:58:16 +00:00
Chris Lattner
ffde7a642a Add a new ShuffleVectorInst::getMaskValue method.
llvm-svn: 47813
2008-03-02 05:28:33 +00:00
Nick Lewycky
b02fe64d8b 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.

llvm-svn: 47802
2008-03-02 02:48:09 +00:00
Nick Lewycky
c0b361a17c Print the name, not a pointer.
llvm-svn: 47796
2008-03-01 17:20:55 +00:00
Chris Lattner
64e101b2d9 Fix PR2113 by verifying allocations.
llvm-svn: 47792
2008-03-01 09:01:57 +00:00
Dan Gohman
3491cd8454 Use the new convertFromAPInt instead of convertFromZeroExtendedInteger.
llvm-svn: 47744
2008-02-29 01:42:52 +00:00
Devang Patel
351830e819 Remove dead code.
llvm-svn: 47700
2008-02-27 23:33:51 +00:00
Devang Patel
c68e26f9fe Add comment.
llvm-svn: 47653
2008-02-27 01:20:54 +00:00
Devang Patel
98774b4b6a Add assert to check return type.
llvm-svn: 47637
2008-02-26 22:55:21 +00:00
Devang Patel
5c00c6bafa Remove unncessary ReturnInst constructors.
llvm-svn: 47633
2008-02-26 22:12:58 +00:00
Devang Patel
0be97b2118 Use SmallVector while constructing ReturnInst.
llvm-svn: 47619
2008-02-26 19:38:17 +00:00
Devang Patel
e5766a12da Avoid const_casts
llvm-svn: 47616
2008-02-26 19:15:26 +00:00
Devang Patel
6d492c3caf Remove unnecessary getOperand/setOperand overriders.
Simplify getReturnValue()

llvm-svn: 47614
2008-02-26 19:08:13 +00:00
Devang Patel
e0f9c6f281 Unify to ReturnInst::init() member functions.
llvm-svn: 47611
2008-02-26 18:49:29 +00:00
Devang Patel
b35d15edf9 Optimize most common case by using single RetVal in ReturnInst.
llvm-svn: 47607
2008-02-26 17:56:20 +00:00
Devang Patel
5b3d61f5ed Pass const vectors by reference.
llvm-svn: 47577
2008-02-26 00:12:13 +00:00
Devang Patel
03a99197aa print getresult operand and its type directly.
llvm-svn: 47514
2008-02-23 01:04:26 +00:00
Devang Patel
63d29fccdf Use dyn_cast instead of isa + cast.
llvm-svn: 47511
2008-02-23 00:47:00 +00:00
Devang Patel
f674975a65 To support multiple return values, now ret instruction supports multiple operands instead of one aggregate operand.
llvm-svn: 47508
2008-02-23 00:35:18 +00:00
Dale Johannesen
ae08bdb4cf Split ParameterAttributes.h, putting the complicated
stuff into ParamAttrsList.h.  Per feedback from
ParamAttrs changes.

llvm-svn: 47504
2008-02-22 22:17:59 +00:00
Dale Johannesen
a96eb3a1d8 Pass alignment on ByVal parameters, from FE, all
the way through.  It is now used for codegen.

llvm-svn: 47484
2008-02-22 17:49:45 +00:00
Devang Patel
066973767f Print getresult instruction properly.
llvm-svn: 47473
2008-02-22 03:10:23 +00:00
Devang Patel
2754d59c53 Print ret instruction that returns aggregates.
llvm-svn: 47472
2008-02-22 02:50:49 +00:00
Devang Patel
c5dccfdd74 print getresult instruction.
llvm-svn: 47461
2008-02-21 23:02:20 +00:00
Devang Patel
298b5f1d6c Use isa<> instead of getTypeID() to check StructType.
llvm-svn: 47460
2008-02-21 22:24:17 +00:00
Devang Patel
e60ebc7744 Let invoke return aggregate value.
llvm-svn: 47425
2008-02-21 02:14:01 +00:00
Devang Patel
702c4a60a6 Let function call return aggregate.
Now, we have very first multiple return value testcase!

llvm-svn: 47424
2008-02-21 01:54:02 +00:00
Devang Patel
d2142aeb44 What if functions can return aggregate values ?
One small step towards multiple return value support.

llvm-svn: 47406
2008-02-20 22:36:03 +00:00
Devang Patel
4034343b67 getresult does not support nested aggregates.
llvm-svn: 47396
2008-02-20 19:39:41 +00:00
Devang Patel
f114189912 Verifier should use Assert1 instead of assert.
llvm-svn: 47394
2008-02-20 19:32:20 +00:00