1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

53703 Commits

Author SHA1 Message Date
Bob Wilson
641ce17702 Add -mtriple to llc commands, attempting to fix buildbot failures.
llvm-svn: 86086
2009-11-05 00:51:31 +00:00
Evan Cheng
3a05d1d9bb Code refactoring.
llvm-svn: 86085
2009-11-05 00:51:13 +00:00
Bob Wilson
d14be3d83c Attempt again to fix buildbot failures: make expected output less specific
and compile with -mtriple to specify *-apple-darwin targets.

llvm-svn: 86081
2009-11-05 00:30:35 +00:00
David Goodwin
442fe1bbf8 Correctly add chain dependencies around calls and unknown-side-effect instructions.
llvm-svn: 86080
2009-11-05 00:16:44 +00:00
Victor Hernandez
21ec158c23 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
2009-11-05 00:03:03 +00:00
Devang Patel
c69c29bc4b While calculating original type size for a derived type, handle type variants encoded as DIDerivedType appropriately.
This improves bitfield support.

llvm-svn: 86073
2009-11-04 23:48:00 +00:00
Jim Grosbach
ef37391033 Grammar.
llvm-svn: 86068
2009-11-04 23:20:40 +00:00
Chris Lattner
a003aee613 improve DSE when TargetData is not around, based on work by
Hans Wennborg!

llvm-svn: 86067
2009-11-04 23:20:12 +00:00
Jim Grosbach
2867641b64 Now that the memory leak from McCat/08-main has been fixed (86056), re-enable
aggressive testing of dynamic stack alignment.
Note that this is off by default, and enabled for LLCBETA nightly results.

llvm-svn: 86064
2009-11-04 23:11:07 +00:00
Jim Grosbach
c0cabc9119 If a function has no stack frame at all, dynamic realignment isn't necessary.
llvm-svn: 86057
2009-11-04 22:41:51 +00:00
Jim Grosbach
c8a01556f4 dynamic stack realignment necessitates scanning the floating point callee-
saved instructions even if no stack adjustment for those saves is needed.

llvm-svn: 86056
2009-11-04 22:41:00 +00:00
Devang Patel
799b8cc191 Fix DW_AT_data_member_location for bit-fields. It points to the location of annonymous field that covers respective field.
llvm-svn: 86054
2009-11-04 22:06:12 +00:00
Bob Wilson
25738f9e79 Add PowerPC codegen for indirect branches.
llvm-svn: 86050
2009-11-04 21:31:18 +00:00
Lang Hames
2b16464904 Handle empty/tombstone keys for LiveIndex more cleanly. Check for index sanity when constructing index list entries.
llvm-svn: 86049
2009-11-04 21:24:15 +00:00
Duncan Sands
7d20275318 A value is only assigned to errno if NumRead equals -1, so do
not reason based on errno if NumRead has a different value.

llvm-svn: 86046
2009-11-04 20:50:23 +00:00
Bob Wilson
9e30ecad4e Fix broken test.
llvm-svn: 86045
2009-11-04 20:04:11 +00:00
Eric Christopher
f20f6980cb Add some options to disable various code gen optimizations.
llvm-svn: 86044
2009-11-04 19:57:50 +00:00
Devang Patel
773993746e Array element size does not match array size but array is not a bitfield.
llvm-svn: 86043
2009-11-04 19:37:40 +00:00
Bob Wilson
ca42ca296d Add test for ARM indirectbr codegen.
llvm-svn: 86042
2009-11-04 19:25:34 +00:00
Jakob Stoklund Olesen
f775e222e0 Print out an informative comment for KILL instructions.
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.

llvm-svn: 86041
2009-11-04 19:24:37 +00:00
Chris Lattner
4864198071 Fix an iterator invalidation bug that happens when a hashtable
resizes in IPSCCP.  This fixes PR5394.

llvm-svn: 86036
2009-11-04 18:57:42 +00:00
Evan Cheng
e83f2304f2 Look for llvm-gcc under /Developer/usr/bin first.
llvm-svn: 86023
2009-11-04 08:36:50 +00:00
Evan Cheng
801415706c RangeIsDefinedByCopyFromReg() should check for subreg_to_reg, insert_subreg,
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.

llvm-svn: 86022
2009-11-04 08:33:14 +00:00
Chris Lattner
d8ab8fbe9f move two functions up higher in the file. Delete a useless argument
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.

llvm-svn: 86021
2009-11-04 08:05:20 +00:00
Chris Lattner
aede55dc9b filecheckize this test.
llvm-svn: 86020
2009-11-04 07:57:05 +00:00
Evan Cheng
22121f4c69 The .n suffix must go after the predicate.
llvm-svn: 86019
2009-11-04 07:38:48 +00:00
Nick Lewycky
cabcab867f The magic for our current brand of .bc files is BC. For older ones it was llvc.
When was it ever "llvm"?

llvm-svn: 86009
2009-11-04 06:15:28 +00:00
Chris Lattner
dddec653f1 make IRBuilder zap "X|0" and "X&-1" when building IR, this happens
during bitfield codegen and slows down -O0 compile times by making
useless IR.  rdar://7362516

llvm-svn: 86006
2009-11-04 05:00:12 +00:00
Daniel Dunbar
b19cc0fa91 configure: Add --with-optimize-option, for setting the default value of
OPTIMIZE_OPTION.

llvm-svn: 86005
2009-11-04 04:32:50 +00:00
Evan Cheng
2c4476c9e5 Silence implicit conversion warnings.
llvm-svn: 86000
2009-11-04 03:08:57 +00:00
Lang Hames
c42888e42a Another spurious friend declaration removed.
llvm-svn: 85997
2009-11-04 01:52:40 +00:00
Lang Hames
b63bef3da7 Removed an unnecessary friend declaration and some crufty comments from IndexListEntry.
llvm-svn: 85995
2009-11-04 01:34:22 +00:00
Douglas Gregor
4cd9c97c74 Fix CMake makefiles
llvm-svn: 85994
2009-11-04 01:32:06 +00:00
Evan Cheng
8b161e8f4f Fix test.
llvm-svn: 85986
2009-11-04 00:42:33 +00:00
Evan Cheng
1a06b12330 Use ldr.n to workaround a darwin assembler bug.
llvm-svn: 85980
2009-11-04 00:00:39 +00:00
Lang Hames
deed780bc6 The Indexes Patch.
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.

llvm-svn: 85979
2009-11-03 23:52:08 +00:00
Bob Wilson
8209e942a6 Fix branch folding bug for indirect branches: for a block containing only
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.

llvm-svn: 85975
2009-11-03 23:44:31 +00:00
Chris Lattner
b634c6cdb5 reimplement multiple return value handling in IPSCCP, making it
more aggressive an correct.  This survives building llvm in 64-bit
mode with optimizations and the built llvm passes make check.

llvm-svn: 85973
2009-11-03 23:40:48 +00:00
Evan Cheng
b50510c510 Fix t2Int_eh_sjlj_setjmp. Immediate form of orr is a 32-bit instruction. So it should be 22 bytes instead of 20 bytes long.
llvm-svn: 85965
2009-11-03 23:13:34 +00:00
Bill Wendling
eb0ca3bad7 Use llvm-gcc on newer Darwins.
llvm-svn: 85963
2009-11-03 22:50:10 +00:00
Evan Cheng
caab17007b fconsts / fconstd immediate should be proceeded with #.
llvm-svn: 85952
2009-11-03 21:59:33 +00:00
Chris Lattner
8121c7cf9c fix broken link
llvm-svn: 85951
2009-11-03 21:50:09 +00:00
Evan Cheng
d783406059 Re-apply 85799. It turns out my code isn't buggy.
llvm-svn: 85947
2009-11-03 21:40:02 +00:00
Chris Lattner
036e15ff97 fix test
llvm-svn: 85946
2009-11-03 21:26:26 +00:00
Chris Lattner
11eafaadc3 merge a test into ipsccp-basic. running llvm-ld to get one pass is... bad.
llvm-svn: 85945
2009-11-03 21:25:50 +00:00
David Goodwin
629a685f05 Do a scheduling pass ignoring anti-dependencies to identify candidate registers that should be renamed.
llvm-svn: 85939
2009-11-03 20:57:50 +00:00
Chris Lattner
10c341e8fa finish half thunk thought
llvm-svn: 85937
2009-11-03 20:52:57 +00:00
Victor Hernandez
628b65ea6e Changes requested (avoid getFunction(), avoid Type creation via isVoidTy(), and avoid redundant isFreeCall cases) in feedback to r85176
llvm-svn: 85936
2009-11-03 20:39:35 +00:00
David Goodwin
9f1cf41932 <rdar://problem/7352605>. When building schedule graph use mayAlias information to avoid chaining loads/stores of spill slots with non-aliased memory ops.
llvm-svn: 85934
2009-11-03 20:15:00 +00:00
Victor Hernandez
046375ac3f Changes (* location in pointer variables, avoiding include, and using APInt::getLimitedValue) based on feedback to r85814
llvm-svn: 85933
2009-11-03 20:02:35 +00:00