| #
a72e1af8 |
| 25-Feb-2010 |
Nick Lewycky <[email protected]> |
Make the side-numbering of instructions used by metadata (which is needed to keep track of instructions that return void) per-function. This fixes PR5278.
This breaks backwards compatibility with th
Make the side-numbering of instructions used by metadata (which is needed to keep track of instructions that return void) per-function. This fixes PR5278.
This breaks backwards compatibility with the metadata format. That's okay because we haven't released the metadata bitcode yet.
llvm-svn: 97132
show more ...
|
| #
19d0b47b |
| 16-Feb-2010 |
Duncan Sands <[email protected]> |
There are two ways of checking for a given type, for example isa<PointerType>(T) and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris.
llvm-svn: 963
There are two ways of checking for a given type, for example isa<PointerType>(T) and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris.
llvm-svn: 96344
show more ...
|
| #
9dff9bec |
| 15-Feb-2010 |
Duncan Sands <[email protected]> |
Uniformize the names of type predicates: rather than having isFloatTy and isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96223
|
| #
392be58c |
| 12-Feb-2010 |
Chris Lattner <[email protected]> |
Add support for a union type in LLVM IR. Patch by Talin!
llvm-svn: 96011
|
| #
091217be |
| 27-Jan-2010 |
Jeffrey Yasskin <[email protected]> |
Kill ModuleProvider and ghost linkage by inverting the relationship between Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules
Kill ModuleProvider and ghost linkage by inverting the relationship between Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer.
Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it.
Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735.
llvm-svn: 94686
show more ...
|
| #
00f4747b |
| 25-Jan-2010 |
Dan Gohman <[email protected]> |
Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the case of a forward-reference, which doesn't use an "abbrev" encoding.
llvm-svn: 94454
|
| #
9e26c1cc |
| 21-Jan-2010 |
Nick Lewycky <[email protected]> |
Fix a crasher trying to fold each element in a comparison between two vectors if one of the vectors didn't have elements (such as undef). Fixes PR 6096.
Fix an issue in the constant folder where fcm
Fix a crasher trying to fold each element in a comparison between two vectors if one of the vectors didn't have elements (such as undef). Fixes PR 6096.
Fix an issue in the constant folder where fcmp (<2 x %ty>, <2 x %ty>) would have <2 x i1> type if constant folding was successful and i1 type if it wasn't. This exposed a related issue in the bitcode reader.
llvm-svn: 94069
show more ...
|
| #
108d3acb |
| 13-Jan-2010 |
Victor Hernandez <[email protected]> |
Parse function-local metadata inside function blocks
llvm-svn: 93337
|
| #
8992323b |
| 11-Jan-2010 |
Devang Patel <[email protected]> |
s/NextValueNo/NextMDValueNo while processing metadata.
llvm-svn: 93165
|
| #
b8fd152d |
| 10-Jan-2010 |
Victor Hernandez <[email protected]> |
Compute isFunctionLocal in MDNode ctor or via argument in new function getWhenValsUnresolved(). Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue().
llvm-svn: 93108
|
| #
003143c5 |
| 09-Jan-2010 |
Chris Lattner <[email protected]> |
clean up this code, add a fixme.
llvm-svn: 93042
|
| #
330cde48 |
| 09-Jan-2010 |
Devang Patel <[email protected]> |
NamedMDNode element is either null or MDNode. Otherwise this is a malformed NamedMDNode record.
llvm-svn: 93037
|
| #
6edcd399 |
| 05-Jan-2010 |
Devang Patel <[email protected]> |
Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}
llvm-svn: 92783
|
| #
e3073483 |
| 05-Jan-2010 |
Devang Patel <[email protected]> |
NamedMDNode is a collection MDNodes.
llvm-svn: 92761
|
| #
ccce8bae |
| 05-Jan-2010 |
Benjamin Kramer <[email protected]> |
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
llvm-svn: 92726
|
| #
a0566979 |
| 29-Dec-2009 |
Chris Lattner <[email protected]> |
Final step in the metadata API restructuring: move the getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it
Final step in the metadata API restructuring: move the getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext.
llvm-svn: 92259
show more ...
|
| #
2f2aa2b0 |
| 28-Dec-2009 |
Chris Lattner <[email protected]> |
This is a major cleanup of the instruction metadata interfaces that I asked Devang to do back on Sep 27. Instead of going through the MetadataContext class with methods like getMD() and getMDs(), ju
This is a major cleanup of the instruction metadata interfaces that I asked Devang to do back on Sep 27. Instead of going through the MetadataContext class with methods like getMD() and getMDs(), just ask the instruction directly for its metadata with getMetadata() and getAllMetadata().
This includes a variety of other fixes and improvements: previously all Value*'s were bloated because the HasMetadata bit was thrown into value, adding a 9th bit to a byte. Now this is properly sunk down to the Instruction class (the only place where it makes sense) and it will be folded away somewhere soon.
This also fixes some confusion in getMDs and its clients about whether the returned list is indexed by the MDID or densely packed. This is now returned sorted and densely packed and the comments make this clear.
This introduces a number of fixme's which I'll follow up on.
llvm-svn: 92235
show more ...
|
| #
7093946a |
| 28-Dec-2009 |
Chris Lattner <[email protected]> |
rename getMDKind -> getMDKindID, make it autoinsert if an MD Kind doesn't exist already, eliminate registerMDKind. Tidy up a bunch of random stuff.
llvm-svn: 92225
|
| #
f3db9152 |
| 07-Nov-2009 |
Victor Hernandez <[email protected]> |
Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.
Here is the original commit message:
This commit updates malloc optimizations to operate on malloc calls that have co
Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.
Here is the original commit message:
This commit updates malloc optimizations to operate on malloc calls that have constant int size arguments.
Update CreateMalloc so that its callers specify the size to allocate: MallocInst-autoupgrade users use non-TargetData-computed allocation sizes. Optimization uses use TargetData to compute the allocation size.
Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays. Extend getMallocType() to support malloc calls that have non-bitcast uses.
Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.
Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.
Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.
Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.
llvm-svn: 86311
show more ...
|
| #
b9f58997 |
| 06-Nov-2009 |
Victor Hernandez <[email protected]> |
Revert r86077 because it caused crashes in 179.art and 175.vpr on ARM
llvm-svn: 86213
|
| #
492ed30a |
| 05-Nov-2009 |
Victor Hernandez <[email protected]> |
Update CreateMalloc so that its callers specify the size to allocate: MallocInst-autoupgrade users use non-TargetData-computed allocation sizes. Optimization uses use TargetData to compute the alloca
Update CreateMalloc so that its callers specify the size to allocate: MallocInst-autoupgrade users use non-TargetData-computed allocation sizes. Optimization uses use TargetData to compute the allocation size.
Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays. Extend getMallocType() to support malloc calls that have non-bitcast uses.
Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.
Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.
Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.
Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.
llvm-svn: 86077
show more ...
|
| #
aa99c94e |
| 01-Nov-2009 |
Chris Lattner <[email protected]> |
Revert 85678/85680. The decision is to stay with the current form of indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it for simplicity.
llvm-svn: 85699
|
| #
b2c0e243 |
| 31-Oct-2009 |
Chris Lattner <[email protected]> |
Make blockaddress(@func, null) be valid, and make 'deleting a basic block with a blockaddress still referring to it' replace the invalid blockaddress with a new blockaddress(@func, null) instead of
Make blockaddress(@func, null) be valid, and make 'deleting a basic block with a blockaddress still referring to it' replace the invalid blockaddress with a new blockaddress(@func, null) instead of a inttoptr(1).
This changes the bitcode encoding format, and still needs codegen support (this should produce a non-zero value, referring to the entry block of the function would also be quite reasonable).
llvm-svn: 85678
show more ...
|
| #
5956dc87 |
| 28-Oct-2009 |
Chris Lattner <[email protected]> |
add bitcode reader support for blockaddress. We can now fully round trip blockaddress through .ll and .bc files, so add a testcase.
There are still a bunch of places in the optimizer and other plac
add bitcode reader support for blockaddress. We can now fully round trip blockaddress through .ll and .bc files, so add a testcase.
There are still a bunch of places in the optimizer and other places that need to be updated to work with these constructs, but at least the basics are in now.
llvm-svn: 85377
show more ...
|
| #
d04cb6d0 |
| 28-Oct-2009 |
Chris Lattner <[email protected]> |
rename indbr -> indirectbr to appease the residents of #llvm.
llvm-svn: 85351
|