| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 93165
|
|
|
|
|
|
|
|
| |
getWhenValsUnresolved().
Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue().
llvm-svn: 93108
|
|
|
|
|
|
|
|
| |
boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for."
Patch by James Y Knight!
llvm-svn: 93079
|
|
|
|
| |
llvm-svn: 93042
|
|
|
|
| |
llvm-svn: 93039
|
|
|
|
|
|
| |
NamedMDNode record.
llvm-svn: 93037
|
|
|
|
| |
llvm-svn: 93032
|
|
|
|
| |
llvm-svn: 92931
|
|
|
|
| |
llvm-svn: 92783
|
|
|
|
| |
llvm-svn: 92761
|
|
|
|
|
|
| |
dereference the type pointer.
llvm-svn: 92726
|
|
|
|
| |
llvm-svn: 92374
|
|
|
|
|
|
|
| |
things that occur in types. "operands" are things that occur
in values.
llvm-svn: 92322
|
|
|
|
| |
llvm-svn: 92320
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
doesn't exist already, eliminate registerMDKind. Tidy up a bunch
of random stuff.
llvm-svn: 92225
|
|
|
|
|
|
| |
and simplify all the clients that use it.
llvm-svn: 92224
|
|
|
|
|
|
| |
irrelevant internal implementation details to clients.
llvm-svn: 92210
|
|
|
|
| |
llvm-svn: 92208
|
|
|
|
| |
llvm-svn: 92092
|
|
|
|
| |
llvm-svn: 92091
|
|
|
|
|
|
|
|
| |
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.
llvm-svn: 91421
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 86213
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it
for simplicity.
llvm-svn: 85699
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 85376
|
|
|
|
|
|
|
|
|
| |
In the new world order, BlockAddress can have a BasicBlock operand.
This doesn't permute much, because if you have a ConstantExpr (or
anything more specific than Constant) we still know the operand has
to be a Constant.
llvm-svn: 85375
|
|
|
|
| |
llvm-svn: 85351
|
|
|
|
|
|
|
| |
(assembler,asmprinter, bc reader+writer) and document it. Codegen
currently aborts on it.
llvm-svn: 85274
|
|
|
|
| |
llvm-svn: 85254
|
|
|
|
|
|
|
| |
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.
llvm-svn: 85176
|
|
|
|
| |
llvm-svn: 85078
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 84886
|
|
|
|
| |
llvm-svn: 84885
|
|
|
|
| |
llvm-svn: 84884
|
|
|
|
|
|
| |
vector with handler names.
llvm-svn: 84820
|
|
|
|
| |
llvm-svn: 84795
|
|
|
|
| |
llvm-svn: 84784
|
|
|
|
|
|
|
| |
Most changes are cleanup, but there is 1 correctness fix:
I fixed InstCombine so that the icmp is removed only if the malloc call is removed (which requires explicit removal because the Worklist won't DCE any calls since they can have side-effects).
llvm-svn: 84772
|
|
|
|
| |
llvm-svn: 84465
|
|
|
|
| |
llvm-svn: 84299
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
A little ugliness is accepted to keep the binary file format
compatible. No functional change yet.
llvm-svn: 84020
|
|
|
|
| |
llvm-svn: 84006
|
|
|
|
| |
llvm-svn: 84004
|