Commit Graph

53837 Commits

Author SHA1 Message Date
Chris Lattner
0ff290615f Declare classes with matched tags, pointed out by a clang++ warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 17:51:44 +00:00
Benjamin Kramer
992a637297 Teach SimplifyLibCalls to fold memcmp calls with constant arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86141 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 17:44:22 +00:00
Daniel Dunbar
f626167e69 lit: Add --param NAME=VALUE option, for test suite specific use (to communicate
arbitrary command line arguments to the test suite).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86137 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 16:27:33 +00:00
Benjamin Kramer
bcaa2157dd Do map insert+find in one step. TODO -= 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 14:33:27 +00:00
Benjamin Kramer
e9684c682a Path::createDirectoryOnDisk should ignore existing directories on win32 too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 14:32:40 +00:00
Douglas Gregor
131b0d2fcf Make two more LLVM headers standalone
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86131 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 13:39:23 +00:00
Douglas Gregor
fbe67f85b2 Make a few headers standalone. Plus, add a missing "template" keyword
that Clang diagnoses but GCC does not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86130 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 13:30:28 +00:00
Chris Lattner
e4bddf1837 merge a few crash tests into crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86119 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 05:57:34 +00:00
Mon P Wang
82c443655d Reintroduce support for overloading target intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86114 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 03:19:08 +00:00
David Goodwin
98f2f1aff8 Replace std::map.at() with std::map[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 01:45:50 +00:00
David Goodwin
54097836f3 Break anti-dependencies using free registers in a round-robin manner to avoid introducing new anti-dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86098 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 01:19:35 +00:00
Lang Hames
090780be1c Tidied some ugliness in the SlotIndex default constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 01:18:31 +00:00
Evan Cheng
517e2556e3 Now that code placement optimization pass is run for JIT, make sure it's before pre-emit passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86092 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 01:16:59 +00:00
Devang Patel
85b8de8118 Use WeakVH while storing metadata in containers.
This fixes PR5393.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86091 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 01:13:02 +00:00
Lang Hames
a0e7b02760 Removed an assert which was causing significant slowdowns in debug builds.
This assert was very conservative to begin with (the error condition is well
covered by tests elsewhere in the code) so we won't miss much by removing it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86088 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 00:52:28 +00:00
Bob Wilson
5a225cc85a Add -mtriple to llc commands, attempting to fix buildbot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86086 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 00:51:31 +00:00
Evan Cheng
9fb744e169 Code refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86085 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 00:51:13 +00:00
Bob Wilson
8a008cc49d Attempt again to fix buildbot failures: make expected output less specific
and compile with -mtriple to specify *-apple-darwin targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86081 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 00:30:35 +00:00
David Goodwin
5be870add9 Correctly add chain dependencies around calls and unknown-side-effect instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86080 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 00:16:44 +00:00
Victor Hernandez
24f934d055 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86077 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 00:03:03 +00:00
Devang Patel
61ecbd196c While calculating original type size for a derived type, handle type 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
2009-11-04 23:48:00 +00:00
Jim Grosbach
4371cda7f8 Grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86068 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 23:20:40 +00:00
Chris Lattner
40dd12e708 improve DSE when TargetData is not around, based on work by
Hans Wennborg!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86067 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 23:20:12 +00:00
Jim Grosbach
db1751a922 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86064 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 23:11:07 +00:00
Jim Grosbach
6db06a0866 If a function has no stack frame at all, dynamic realignment isn't necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86057 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 22:41:51 +00:00
Jim Grosbach
c5848f4ced dynamic stack realignment necessitates scanning the floating point callee-
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
2009-11-04 22:41:00 +00:00
Devang Patel
33db508283 Fix DW_AT_data_member_location for bit-fields. It points to the location of annonymous field that covers respective field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86054 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 22:06:12 +00:00
Bob Wilson
3d90dbee69 Add PowerPC codegen for indirect branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86050 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 21:31:18 +00:00
Lang Hames
0368e500eb Handle empty/tombstone keys for LiveIndex more cleanly. Check for index sanity when constructing index list entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86049 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 21:24:15 +00:00
Duncan Sands
7127b13342 A value is only assigned to errno if NumRead equals -1, so do
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
2009-11-04 20:50:23 +00:00
Bob Wilson
1709dd73d6 Fix broken test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86045 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 20:04:11 +00:00
Eric Christopher
522c01ac65 Add some options to disable various code gen optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 19:57:50 +00:00
Devang Patel
c416d3b25d Array element size does not match array size but array is not a bitfield.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 19:37:40 +00:00
Bob Wilson
0d48d6106e Add test for ARM indirectbr codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 19:25:34 +00:00
Jakob Stoklund Olesen
ad68264f59 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 19:24:37 +00:00
Chris Lattner
0fb7e18edd Fix an iterator invalidation bug that happens when a hashtable
resizes in IPSCCP.  This fixes PR5394.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86036 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 18:57:42 +00:00
Evan Cheng
17fc13f00a Look for llvm-gcc under /Developer/usr/bin first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86023 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 08:36:50 +00:00
Evan Cheng
50608bac2f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 08:33:14 +00:00
Chris Lattner
092543ca71 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86021 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 08:05:20 +00:00
Chris Lattner
6a4ab1e426 filecheckize this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 07:57:05 +00:00
Evan Cheng
b9f51cbe98 The .n suffix must go after the predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86019 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 07:38:48 +00:00
Nick Lewycky
e6b5a52a42 The magic for our current brand of .bc files is BC. For older ones it was llvc.
When was it ever "llvm"?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86009 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 06:15:28 +00:00
Chris Lattner
6bffa63dfe 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86006 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 05:00:12 +00:00
Daniel Dunbar
1fce948ccb configure: Add --with-optimize-option, for setting the default value of
OPTIMIZE_OPTION.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86005 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 04:32:50 +00:00
Evan Cheng
9111c4fef5 Silence implicit conversion warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86000 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 03:08:57 +00:00
Lang Hames
11d0088ec2 Another spurious friend declaration removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85997 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 01:52:40 +00:00
Lang Hames
f3a521f86a Removed an unnecessary friend declaration and some crufty comments from IndexListEntry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85995 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 01:34:22 +00:00
Douglas Gregor
dece1e217a Fix CMake makefiles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85994 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 01:32:06 +00:00
Evan Cheng
ad95ff9fab Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85986 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 00:42:33 +00:00
Evan Cheng
7883fa942f Use ldr.n to workaround a darwin assembler bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85980 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 00:00:39 +00:00