Commit Graph

53852 Commits

Author SHA1 Message Date
Dan Gohman
03e896bd60 Update various Loop optimization passes to cope with the possibility that
LoopSimplify form may not be available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 21:11:53 +00:00
David Goodwin
7040d6e2f5 Fix bug in aggressive antidep breaking; liveness was not updated correctly for regions that do not have antidep candidates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 21:06:09 +00:00
Dan Gohman
692ad8dd06 Teach LoopUnroll how to bail if LoopSimplify can't give it what it needs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86164 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 19:44:06 +00:00
Dan Gohman
6a02fc3070 Call getAnalysis<LoopInfo> the normal way, instead of asking passed-in
LoopPassManager for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 19:43:25 +00:00
Dan Gohman
e5db7c4166 InstrTypes.h includes Instruction.h, so it's not necessary to include both.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86162 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 19:42:20 +00:00
Dan Gohman
a6a4aaefee Fix IVUsers to avoid assuming that the loop has a unique backedge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86161 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 19:41:37 +00:00
Dan Gohman
6890584ab1 Delete an unused member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86160 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 19:33:15 +00:00
Dan Gohman
f17e9511f1 Factor out the predicate code for loopsimplify form exit blocks into
a separate helper function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86159 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 19:21:41 +00:00
Oscar Fuentes
b5b10c25f7 CMake: Detect dotty.
Patch by Arnaud Allard de Grandmaison!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 19:03:26 +00:00
Oscar Fuentes
20f17149a8 CMake: do not test for pthread and dl libraries on Windows (except
Cygwin). Fixes PR 5368.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86152 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 18:57:56 +00:00
Dan Gohman
c5600c89d6 Avoid printing a redundant space in SDNode->dump().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86151 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 18:49:11 +00:00
Dan Gohman
73bb251cd7 Remove uninteresting and confusing debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86149 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 18:47:09 +00:00
Douglas Gregor
9ed0d92e94 Move llvm:🆑:opt's conversion function into the base classes that
actually need that conversion function. Silences a Clang++ warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86148 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 18:30:50 +00:00
Dan Gohman
b8eb17c807 Add an assertion to catch indirectbr in SplitBlockPredecessors. This
makes several optimization passes abort in cases where they're currently
silently miscompiling code.

Remove the indirectbr assertion from SplitEdge. Indirectbr is only
a problem for critical edges, and SplitEdge defers to SplitCriticalEdge
to handle those, and SplitCriticalEdge has its own assertion for
indirectbr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86147 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 18:25:44 +00:00
Chris Lattner
6c9fab7404 add a note from PR5313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86146 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 18:19:19 +00:00
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