Victor Hernandez
673c036bc7
Remove FreeInst.
...
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.
llvm-svn: 85176
2009-10-26 23:43:48 +00:00
Devang Patel
9027c8f10f
Do not use expensive sort().
...
llvm-svn: 85130
2009-10-26 17:09:00 +00:00
Nick Lewycky
2b8400628d
Remove includes of Support/Compiler.h that are no longer needed after the
...
VISIBILITY_HIDDEN removal.
llvm-svn: 85043
2009-10-25 06:57:41 +00:00
Nick Lewycky
711c726c97
Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
...
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
2009-10-25 06:33:48 +00:00
Nick Lewycky
cacdc4d65a
Remove ICmpInst::isSignedPredicate which was a reimplementation
...
CmpInst::isSigned.
llvm-svn: 85037
2009-10-25 05:20:17 +00:00
Nick Lewycky
a16e115bd4
Sink isTrueWhenEqual from ICmpInst to CmpInst. Add a matching isFalseWhenEqual
...
which is equal to !isTrueWhenEqual for ints but not for floats.
llvm-svn: 85036
2009-10-25 03:50:03 +00:00
Dan Gohman
e970f8a450
Make DominanceFrontierBase::print's output prettier.
...
llvm-svn: 85011
2009-10-24 20:01:11 +00:00
Victor Hernandez
e8998896f5
Auto-upgrade free instructions to calls to the builtin free function.
...
Update all analysis passes and transforms to treat free calls just like FreeInst.
Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised.
llvm-svn: 84987
2009-10-24 04:23:03 +00:00
Victor Hernandez
8428eb5720
Remove AllocationInst. Since MallocInst went away, AllocaInst is the only subclass of AllocationInst, so it no longer is necessary.
...
llvm-svn: 84969
2009-10-23 21:09:37 +00:00
Devang Patel
5c461d6dcd
Hide MetadataContext implementation details.
...
llvm-svn: 84886
2009-10-22 19:36:54 +00:00
Devang Patel
2a0e2f1794
Fix getMDs() interface such that it does not expose implementation details.
...
llvm-svn: 84885
2009-10-22 18:55:16 +00:00
Devang Patel
1fa3e26912
Using TrackingVH instead of WeakVH or WeakMetadataVH.
...
llvm-svn: 84884
2009-10-22 18:25:28 +00:00
Devang Patel
944cbf7647
Sort handler names to ensure deterministic behavior.
...
llvm-svn: 84878
2009-10-22 17:40:37 +00:00
Devang Patel
6df2865e24
Fix getHandlerNames() interface. Now it populate clinet supplied small vector with handler names.
...
llvm-svn: 84820
2009-10-22 01:01:24 +00:00
Devang Patel
125861a48c
Use StringRef to construct MDString.
...
llvm-svn: 84811
2009-10-22 00:22:05 +00:00
Devang Patel
068e5420ce
Remove meaningless const.
...
Pass StringRef by value.
llvm-svn: 84804
2009-10-22 00:10:15 +00:00
Devang Patel
f9d56f4830
Derive metadata hierarchy from Value instead of User.
...
llvm-svn: 84801
2009-10-21 23:57:35 +00:00
Benjamin Kramer
1af3b8ca4d
Fix thinko noticed by Chris.
...
llvm-svn: 84797
2009-10-21 23:29:32 +00:00
Dale Johannesen
2bb120a97f
Rename msasm to alignstack per review.
...
llvm-svn: 84795
2009-10-21 23:28:00 +00:00
Benjamin Kramer
87ca5b37b6
Remove pointless return; at end of function.
...
llvm-svn: 84794
2009-10-21 23:27:54 +00:00
Benjamin Kramer
a5cb240184
Simplify code. No intended functionality change.
...
llvm-svn: 84790
2009-10-21 22:55:51 +00:00
Devang Patel
7e3d4b199c
Use StringRef.
...
llvm-svn: 84786
2009-10-21 21:57:13 +00:00
Devang Patel
d10159397a
Do not use SmallVector to store MDNode elements.
...
llvm-svn: 84784
2009-10-21 21:25:09 +00:00
Devang Patel
7137e5f065
Incorporate various suggestions Chris gave during metadata review.
...
- i < getNumElements() instead of getNumElements() > i
- Make setParent() private
- Fix use of resizeOperands
- Reset HasMetadata bit after removing all metadata attached to an instruction
- Efficient use of iterators
llvm-svn: 84765
2009-10-21 17:33:41 +00:00
Devang Patel
7edc7aa34d
Cosmetic changes.
...
s/validName/isValidName/g
s/with an Instruction/to an Instruction/g
s/RegisterMDKind/registerMDKind/g
llvm-svn: 84689
2009-10-20 22:50:27 +00:00
Owen Anderson
fb4db70d0f
Banish ConstantsLock. It's serving no purpose other than slowing things down
...
at the moment.
llvm-svn: 84529
2009-10-19 20:11:52 +00:00
Chris Lattner
1971f7636b
various cleanups.
...
llvm-svn: 84471
2009-10-19 07:10:59 +00:00
Nick Lewycky
4f6c397742
Fix test/Bindings/Ocaml/vmcore.ml. When IRBuilder::CreateMalloc was removed,
...
LLVMBuildMalloc was reimplemented but with the bug that it didn't insert the
resulting instruction.
llvm-svn: 84374
2009-10-17 23:52:26 +00:00
Chris Lattner
2c890dc2b4
Teach vm core to more aggressively fold 'trunc' constantexprs,
...
allowing it to simplify the crazy constantexprs in the testcases
down to something sensible. This allows -std-compile-opts to
completely "devirtualize" the pointers to member functions in
the testcase from PR5176.
llvm-svn: 84368
2009-10-17 21:53:27 +00:00
Nick Lewycky
92413b8e2e
Emit newlines at the end of instructions too.
...
llvm-svn: 84348
2009-10-17 19:43:45 +00:00
Daniel Dunbar
d0736f38d7
Remove unnecessary include.
...
llvm-svn: 84336
2009-10-17 18:11:57 +00:00
Victor Hernandez
a25a2890fa
Remove MallocInst from LLVM Instructions.
...
llvm-svn: 84299
2009-10-17 01:18:07 +00:00
Victor Hernandez
4d7283f82c
Autoupgrade malloc insts to malloc calls.
...
Update testcases that rely on malloc insts being present.
Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step.
llvm-svn: 84292
2009-10-17 00:00:19 +00:00
Devang Patel
95b6efe972
Add copyMD to copy metadata from one instruction to another instruction.
...
llvm-svn: 84113
2009-10-14 17:02:49 +00:00
Duncan Sands
4fcf6123dd
I don't see any point in having both eh.selector.i32 and eh.selector.i64,
...
so get rid of eh.selector.i64 and rename eh.selector.i32 to eh.selector.
Likewise for eh.typeid.for. This aligns us with gcc, which always uses a
32 bit value for the selector on all platforms. My understanding is that
the register allocator used to assert if the selector intrinsic size didn't
match the pointer size, and this was the reason for introducing the two
variants. However my testing shows that this is no longer the case (I
fixed some bugs in selector lowering yesterday, and some more today in the
fastisel path; these might have caused the original problems).
llvm-svn: 84106
2009-10-14 16:11:37 +00:00
Dale Johannesen
7db511a23e
Add an "msasm" flag to inline asm as suggested in PR 5125.
...
A little ugliness is accepted to keep the binary file format
compatible. No functional change yet.
llvm-svn: 84020
2009-10-13 20:46:56 +00:00
Devang Patel
729589a539
Copy metadata when value is RAUW'd. It is debatable whether this is the right approach for custom metadata data in general. However, right now the only custom data user, "dbg", expects this behavior while FE is constructing llvm IR with debug info.
...
llvm-svn: 83977
2009-10-13 17:00:54 +00:00
Nick Lewycky
ee0c1726d8
Force memory use markers to have a ConstantInt for the size argument.
...
llvm-svn: 83960
2009-10-13 07:57:33 +00:00
Jeffrey Yasskin
7d85d5a366
Fix http://llvm.org/PR5160 , to let CallbackVHs modify other ValueHandles on the
...
same Value without breaking things.
llvm-svn: 83861
2009-10-12 17:43:32 +00:00
Chris Lattner
b2e0e6c46b
add some more hooks to the C bindings, patch by Kenneth Uildriks!
...
llvm-svn: 83821
2009-10-12 04:01:02 +00:00
Dan Gohman
68e044e81a
Add a form of addPreserved which takes a string argument, to allow passes
...
to declare that they preserve other passes without needing to pull in
additional header file or library dependencies. Convert MachineFunctionPass
and CodeGenLICM to make use of this.
llvm-svn: 83555
2009-10-08 17:00:02 +00:00
Devang Patel
c411175393
Do not assume that the module is set.
...
llvm-svn: 83462
2009-10-07 16:37:55 +00:00
Duncan Sands
27cb155f76
Make getPointerTo return a const PointerType* rather than
...
an unqualified PointerType* because it seems more correct.
llvm-svn: 83454
2009-10-07 07:35:19 +00:00
Duncan Sands
2400ad7236
Introduce and use convenience methods for getting pointer types
...
where the element is of a basic builtin type. For example, to get
an i8* use getInt8PtrTy.
llvm-svn: 83379
2009-10-06 15:40:36 +00:00
Chris Lattner
a3cf123e86
strength reduce a ton of type equality tests to check the typeid (Through
...
the new predicates I added) instead of going through a context and doing a
pointer comparison. Besides being cheaper, this allows a smart compiler
to turn the if sequence into a switch.
llvm-svn: 83297
2009-10-05 05:54:46 +00:00
Nick Lewycky
5bf0eb2dd5
Requires element types in a constant initializer to match the element types of
...
of the constant. This reverts r6544 and r7428.
llvm-svn: 83270
2009-10-03 19:30:43 +00:00
Devang Patel
43ce9e3e75
Check for null MDNode element while printing comment.
...
llvm-svn: 83172
2009-09-30 21:26:51 +00:00
Jeffrey Yasskin
2d4f3f6704
Assert that ConstantArrays are created with correctly-typed elements.
...
llvm-svn: 83168
2009-09-30 21:08:08 +00:00
Devang Patel
24270e88cc
Print tag name for MDNodes that are used to encode debug info.
...
llvm-svn: 83160
2009-09-30 20:16:54 +00:00
Devang Patel
c1e370a29c
Lookup handler name only when assertions are enabled.
...
llvm-svn: 83114
2009-09-29 22:05:52 +00:00