aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update CreateMalloc so that its callers specify the size to allocate:Victor Hernandez2009-11-0519-191/+244
| | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86077 91177308-0d34-0410-b5e6-96231b3b80d8
* While calculating original type size for a derived type, handle type ↵Devang Patel2009-11-042-9/+13
| | | | | | | | | variants encoded as DIDerivedType appropriately. This improves bitfield support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86073 91177308-0d34-0410-b5e6-96231b3b80d8
* Grammar.Jim Grosbach2009-11-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86068 91177308-0d34-0410-b5e6-96231b3b80d8
* improve DSE when TargetData is not around, based on work byChris Lattner2009-11-043-6/+31
| | | | | | | Hans Wennborg! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86067 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that the memory leak from McCat/08-main has been fixed (86056), re-enableJim Grosbach2009-11-041-3/+9
| | | | | | | aggressive testing of dynamic stack alignment. Note that this is off by default, and enabled for LLCBETA nightly results. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86064 91177308-0d34-0410-b5e6-96231b3b80d8
* If a function has no stack frame at all, dynamic realignment isn't necessary.Jim Grosbach2009-11-041-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86057 91177308-0d34-0410-b5e6-96231b3b80d8
* dynamic stack realignment necessitates scanning the floating point callee-Jim Grosbach2009-11-041-2/+2
| | | | | | saved instructions even if no stack adjustment for those saves is needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86056 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix DW_AT_data_member_location for bit-fields. It points to the location of ↵Devang Patel2009-11-041-5/+12
| | | | | | annonymous field that covers respective field. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86054 91177308-0d34-0410-b5e6-96231b3b80d8
* Add PowerPC codegen for indirect branches.Bob Wilson2009-11-046-0/+100
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86050 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle empty/tombstone keys for LiveIndex more cleanly. Check for index ↵Lang Hames2009-11-042-20/+46
| | | | | | sanity when constructing index list entries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86049 91177308-0d34-0410-b5e6-96231b3b80d8
* A value is only assigned to errno if NumRead equals -1, so doDuncan Sands2009-11-041-1/+1
| | | | | | | not reason based on errno if NumRead has a different value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86046 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken test.Bob Wilson2009-11-041-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86045 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some options to disable various code gen optimizations.Eric Christopher2009-11-041-8/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86044 91177308-0d34-0410-b5e6-96231b3b80d8
* Array element size does not match array size but array is not a bitfield. Devang Patel2009-11-041-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86043 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test for ARM indirectbr codegen.Bob Wilson2009-11-041-0/+63
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86042 91177308-0d34-0410-b5e6-96231b3b80d8
* Print out an informative comment for KILL instructions.Jakob Stoklund Olesen2009-11-045-2/+18
| | | | | | | | The KILL pseudo-instruction may survive to the asm printer pass, just like the IMPLICIT_DEF. Print the KILL as a comment instead of just leaving a blank line in the output. With -asm-verbose=0, a blank line is printed, like IMPLICIT?DEF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86041 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an iterator invalidation bug that happens when a hashtableChris Lattner2009-11-041-3/+4
| | | | | | | resizes in IPSCCP. This fixes PR5394. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86036 91177308-0d34-0410-b5e6-96231b3b80d8
* Look for llvm-gcc under /Developer/usr/bin first.Evan Cheng2009-11-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86023 91177308-0d34-0410-b5e6-96231b3b80d8
* RangeIsDefinedByCopyFromReg() should check for subreg_to_reg, insert_subreg,Evan Cheng2009-11-042-6/+37
| | | | | | | | | and extract_subreg as a "copy" that defines a valno. Also fixes a typo. These two issues prevent a simple subreg coalescing from happening before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86022 91177308-0d34-0410-b5e6-96231b3b80d8
* move two functions up higher in the file. Delete a useless argumentChris Lattner2009-11-042-177/+270
| | | | | | | | | | | | | | | to EmitGEPOffset. Implement some new transforms for optimizing subtracts of two pointer to ints into the same vector. This happens for C++ iterator idioms for example, stringmap takes a const char* that points to the start and end of a string. Once inlined, we want the pointer difference to turn back into a length. This is rdar://7362831. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86021 91177308-0d34-0410-b5e6-96231b3b80d8
* filecheckize this test.Chris Lattner2009-11-041-56/+121
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86020 91177308-0d34-0410-b5e6-96231b3b80d8
* The .n suffix must go after the predicate.Evan Cheng2009-11-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86019 91177308-0d34-0410-b5e6-96231b3b80d8
* The magic for our current brand of .bc files is BC. For older ones it was llvc.Nick Lewycky2009-11-041-1/+1
| | | | | | | When was it ever "llvm"? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86009 91177308-0d34-0410-b5e6-96231b3b80d8
* make IRBuilder zap "X|0" and "X&-1" when building IR, this happensChris Lattner2009-11-041-4/+10
| | | | | | | | during bitfield codegen and slows down -O0 compile times by making useless IR. rdar://7362516 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86006 91177308-0d34-0410-b5e6-96231b3b80d8
* configure: Add --with-optimize-option, for setting the default value ofDaniel Dunbar2009-11-044-36/+73
| | | | | | OPTIMIZE_OPTION. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86005 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence implicit conversion warnings.Evan Cheng2009-11-041-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86000 91177308-0d34-0410-b5e6-96231b3b80d8
* Another spurious friend declaration removed.Lang Hames2009-11-041-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85997 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed an unnecessary friend declaration and some crufty comments from ↵Lang Hames2009-11-041-33/+0
| | | | | | IndexListEntry. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85995 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix CMake makefilesDouglas Gregor2009-11-041-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85994 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test.Evan Cheng2009-11-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85986 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ldr.n to workaround a darwin assembler bug.Evan Cheng2009-11-041-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85980 91177308-0d34-0410-b5e6-96231b3b80d8
* The Indexes Patch.Lang Hames2009-11-0320-1434/+1862
| | | | | | | | | | | | | | | | | | This introduces a new pass, SlotIndexes, which is responsible for numbering instructions for register allocation (and other clients). SlotIndexes numbering is designed to match the existing scheme, so this patch should not cause any changes in the generated code. For consistency, and to avoid naming confusion, LiveIndex has been renamed SlotIndex. The processImplicitDefs method of the LiveIntervals analysis has been moved into its own pass so that it can be run prior to SlotIndexes. This was necessary to match the existing numbering scheme. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85979 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix branch folding bug for indirect branches: for a block containing onlyBob Wilson2009-11-031-1/+2
| | | | | | | | | | | | | | | | an unconditional branch (possibly from tail merging), this code is trying to redirect all of its predecessors to go directly to the branch target, but that isn't feasible for indirect branches. The other predecessors (that don't end with indirect branches) could theoretically still be handled, but that is not easily done right now. The AnalyzeBranch interface doesn't currently let us distinguish jump table branches from indirect branches, and this code is currently handling jump tables. To avoid punting on address-taken blocks, we would have to give up handling jump tables. That seems like a bad tradeoff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85975 91177308-0d34-0410-b5e6-96231b3b80d8
* reimplement multiple return value handling in IPSCCP, making it Chris Lattner2009-11-032-127/+206
| | | | | | | | more aggressive an correct. This survives building llvm in 64-bit mode with optimizations and the built llvm passes make check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85973 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix t2Int_eh_sjlj_setjmp. Immediate form of orr is a 32-bit instruction. So ↵Evan Cheng2009-11-032-2/+2
| | | | | | it should be 22 bytes instead of 20 bytes long. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85965 91177308-0d34-0410-b5e6-96231b3b80d8
* Use llvm-gcc on newer Darwins.Bill Wendling2009-11-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85963 91177308-0d34-0410-b5e6-96231b3b80d8
* set svn:ignoreNuno Lopes2009-11-030-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85953 91177308-0d34-0410-b5e6-96231b3b80d8
* fconsts / fconstd immediate should be proceeded with #.Evan Cheng2009-11-032-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85952 91177308-0d34-0410-b5e6-96231b3b80d8
* fix broken linkChris Lattner2009-11-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85951 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply 85799. It turns out my code isn't buggy.Evan Cheng2009-11-033-21/+52
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85947 91177308-0d34-0410-b5e6-96231b3b80d8
* fix testChris Lattner2009-11-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85946 91177308-0d34-0410-b5e6-96231b3b80d8
* merge a test into ipsccp-basic. running llvm-ld to get one pass is... bad.Chris Lattner2009-11-032-21/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85945 91177308-0d34-0410-b5e6-96231b3b80d8
* Do a scheduling pass ignoring anti-dependencies to identify candidate ↵David Goodwin2009-11-0311-81/+214
| | | | | | registers that should be renamed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85939 91177308-0d34-0410-b5e6-96231b3b80d8
* finish half thunk thoughtChris Lattner2009-11-031-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85937 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes requested (avoid getFunction(), avoid Type creation via isVoidTy(), ↵Victor Hernandez2009-11-032-50/+13
| | | | | | and avoid redundant isFreeCall cases) in feedback to r85176 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85936 91177308-0d34-0410-b5e6-96231b3b80d8
* <rdar://problem/7352605>. When building schedule graph use mayAlias ↵David Goodwin2009-11-031-15/+43
| | | | | | information to avoid chaining loads/stores of spill slots with non-aliased memory ops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85934 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes (* location in pointer variables, avoiding include, and using ↵Victor Hernandez2009-11-031-39/+34
| | | | | | APInt::getLimitedValue) based on feedback to r85814 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85933 91177308-0d34-0410-b5e6-96231b3b80d8
* turn IPSCCP back on by default, try #3 or 4? Woo.Chris Lattner2009-11-032-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85929 91177308-0d34-0410-b5e6-96231b3b80d8
* fix an IPSCCP bug I introduced when I changed IPSCCP to start working on Chris Lattner2009-11-032-19/+51
| | | | | | | | | | | functions that don't have local linkage. Basically, we need to be more careful about propagating argument information to functions whose results we aren't tracking. This fixes a miscompilation of LLVMCConfigurationEmitter.cpp when built with an llvm-gcc that has ipsccp enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85923 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this code more robust by not thinking we are making progressDuncan Sands2009-11-031-1/+1
| | | | | | | if zero bytes were read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85922 91177308-0d34-0410-b5e6-96231b3b80d8