Chris Lattner
d141d16ed7
Change the MemoryBuffer::getFile* methods to take just a pointer to the
...
start of a filename, not a filename+length. All clients can produce a
null terminated name, and the system api's require null terminated
strings anyway.
llvm-svn: 49041
2008-04-01 18:04:03 +00:00
Nate Begeman
610aa2511c
Don't eliminate bitcast instructions that change the type of a pointer
...
llvm-svn: 48971
2008-03-31 00:22:16 +00:00
Duncan Sands
39afad0613
Fix comment typo.
...
llvm-svn: 48967
2008-03-30 19:38:55 +00:00
Nick Lewycky
96038a0528
Update example to new syntax.
...
llvm-svn: 48910
2008-03-28 06:46:51 +00:00
Dan Gohman
2b96ce84aa
Add explicit keywords.
...
llvm-svn: 48801
2008-03-25 22:06:05 +00:00
Evan Cheng
8cb64d8e8b
Handle a special case xor undef, undef -> 0. Technically this should be transformed to undef. But this is such a common idiom (misuse) we are going to handle it.
...
llvm-svn: 48792
2008-03-25 20:08:07 +00:00
Bill Wendling
b433b67093
Fix PR2062: Don't build Intrinsics.gen in the source directory. Do it in the
...
object directory.
llvm-svn: 48766
2008-03-25 09:12:48 +00:00
Dan Gohman
fec60bb357
Shrink the size of AllocationInst by using its SubclassData
...
field to store the alignment value instead of haing a
separate field.
llvm-svn: 48727
2008-03-24 16:55:58 +00:00
Gordon Henriksen
52f3a08237
Objective Caml bindings for basic block, function, global, and arg iterators.
...
llvm-svn: 48711
2008-03-23 22:21:29 +00:00
Anton Korobeynikov
5dfc7591ef
Fix merge error
...
llvm-svn: 48687
2008-03-22 08:50:08 +00:00
Anton Korobeynikov
25a0157827
Add testcase for prev. commit. Minor fixes
...
llvm-svn: 48686
2008-03-22 08:37:05 +00:00
Anton Korobeynikov
197f07a72b
Aliasing chains cleanups: update langref, add check into verifier
...
llvm-svn: 48685
2008-03-22 08:36:14 +00:00
Anton Korobeynikov
06f3b7f4ee
Support chained aliases for LLVM IR printing. This fixes PR2145
...
llvm-svn: 48684
2008-03-22 08:17:17 +00:00
Anton Korobeynikov
6ba56eb5e7
Slightly increase default set size. It's cheap and won't hurt.
...
llvm-svn: 48682
2008-03-22 07:48:40 +00:00
Dan Gohman
a363ba510c
Don't include <map> in Pass.h, which doesn't need it. This requires
...
adding <map> to many files that actually do need it.
llvm-svn: 48667
2008-03-21 23:51:57 +00:00
Duncan Sands
a53967843f
Make it possible to get an empty struct using
...
the new StructType::get method. The second NULL
is to pacify the gcc warning mechanism. This
patch compiles but is otherwise untested.
llvm-svn: 48645
2008-03-21 15:53:17 +00:00
Evan Cheng
4ae9fee64c
Undo 48570. Correctly match mmx shift instructions with an immediate operand.
...
llvm-svn: 48627
2008-03-21 00:40:09 +00:00
Devang Patel
1b64c7d1e5
These passes preserve CFG.
...
This patch fixes Benchmarks/Trimaran/enc-pc1/enc-pc1 failure reported by Grawp-PIC i386 nightly tester
llvm-svn: 48623
2008-03-20 23:27:18 +00:00
Devang Patel
f15fe34521
Restore isCFGOnly property of various analysis passes.
...
llvm-svn: 48579
2008-03-20 02:25:21 +00:00
Devang Patel
e4f39224eb
Keep track of analysis information inherited from Module pass manager.
...
llvm-svn: 48576
2008-03-20 01:09:53 +00:00
Evan Cheng
6f729b2820
Add intrinsics to match mmx shift builtin's with immediate operand.
...
llvm-svn: 48569
2008-03-19 23:38:52 +00:00
Devang Patel
3af681c5fb
#if 1 .. #endif markers do not add any value.
...
llvm-svn: 48560
2008-03-19 22:24:25 +00:00
Devang Patel
5e8cbbea65
PassInfo keep tracks whether a pass is an analysis pass or not.
...
llvm-svn: 48554
2008-03-19 21:56:59 +00:00
Chris Lattner
1642451cf7
add some convenience methods for creating GEP instructions and
...
struct types. Patch by David Chisnall, with some tweaks.
llvm-svn: 48531
2008-03-19 05:06:05 +00:00
Gordon Henriksen
e4b3339de8
C bindings for Module-, Function-, and BasicBlock::iterator.
...
llvm-svn: 48528
2008-03-19 03:47:18 +00:00
Gordon Henriksen
15006d5da0
C and Objective Caml bindings for the various getParent methods of the IR.
...
Based on Erick Tryzelaar's patch.
llvm-svn: 48523
2008-03-19 01:11:35 +00:00
Devang Patel
38f181fa8c
Do not use virtual function to identify an analysis pass.
...
llvm-svn: 48520
2008-03-19 00:48:41 +00:00
Devang Patel
811ca3ddba
Identify Analysis pass.
...
Do not run analysis pass again if analysis info is still available.
This fixes PR1441.
llvm-svn: 48476
2008-03-18 00:39:19 +00:00
Gordon Henriksen
caeafc4911
C and Objective Caml bindings for PassManagers.
...
llvm-svn: 48413
2008-03-16 04:20:44 +00:00
Gordon Henriksen
7ebaba8579
Expose Module::dump via C and Ocaml.
...
Patch by Erick Tryzelaar.
llvm-svn: 48379
2008-03-14 23:58:56 +00:00
Dan Gohman
37a26f973f
Update comments; getPassName no longer uses RTTI.
...
llvm-svn: 48369
2008-03-14 18:27:04 +00:00
Chris Lattner
a14cdebdd9
move a bunch of trivial methods to be inline.
...
llvm-svn: 48326
2008-03-13 05:00:21 +00:00
Chris Lattner
d4a9aafc3f
Various improvements suggested by Duncan
...
llvm-svn: 48325
2008-03-13 04:33:03 +00:00
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