oota-llvm.git
15 years agoFix PR5315, original patch by Nicolas Capens!
Eric Christopher [Fri, 6 Nov 2009 00:11:57 +0000 (00:11 +0000)]
Fix PR5315, original patch by Nicolas Capens!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86203 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor out the printing of the leading tab into printInlineAsm.
Dan Gohman [Fri, 6 Nov 2009 00:04:54 +0000 (00:04 +0000)]
Factor out the printing of the leading tab into printInlineAsm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86199 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake printImplicitDef and printKill non-virtual, since they don't
Dan Gohman [Fri, 6 Nov 2009 00:04:05 +0000 (00:04 +0000)]
Make printImplicitDef and printKill non-virtual, since they don't
need to be overridden.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86198 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse SUBREG_TO_REG instead of INSERT_SUBREG to model x86-64's
Dan Gohman [Thu, 5 Nov 2009 23:53:08 +0000 (23:53 +0000)]
Use SUBREG_TO_REG instead of INSERT_SUBREG to model x86-64's
implicit zero-extend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86196 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach LSR to avoid calling SplitCriticalEdge on edges with indirectbr.
Dan Gohman [Thu, 5 Nov 2009 23:34:59 +0000 (23:34 +0000)]
Teach LSR to avoid calling SplitCriticalEdge on edges with indirectbr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86193 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate these tests for the new label names.
Dan Gohman [Thu, 5 Nov 2009 23:31:40 +0000 (23:31 +0000)]
Update these tests for the new label names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86192 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the label name generation for address-taken labels to avoid potential
Dan Gohman [Thu, 5 Nov 2009 23:14:35 +0000 (23:14 +0000)]
Fix the label name generation for address-taken labels to avoid potential
problems with name collisions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86189 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake a few more LLVM headers parsable as standalone headers.
Douglas Gregor [Thu, 5 Nov 2009 23:01:30 +0000 (23:01 +0000)]
Make a few more LLVM headers parsable as standalone headers.

Fix some problems with the hidden copy constructors for
ImmutableMap/ImmutableSet found by Clang++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86186 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach lit's SyntaxCheckTest two new tricks:
Douglas Gregor [Thu, 5 Nov 2009 22:58:04 +0000 (22:58 +0000)]
Teach lit's SyntaxCheckTest two new tricks:
  - skip .svn directories
  - add a set of excluded filenames so we can easily skip tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86185 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded support for renumbering existing index list elements. Removed some junk from...
Lang Hames [Thu, 5 Nov 2009 22:20:57 +0000 (22:20 +0000)]
Added support for renumbering existing index list elements. Removed some junk from the initial numbering code in runOnMachineFunction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86184 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid calling getUniqueExitBlocks from within LoopSimplify, as it depends
Dan Gohman [Thu, 5 Nov 2009 21:48:32 +0000 (21:48 +0000)]
Avoid calling getUniqueExitBlocks from within LoopSimplify, as it depends
on loops having dedicated exits, which LoopSimplify can no longer always
guarantee.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86181 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLoopDeletion depends on loops having dedicated exits.
Dan Gohman [Thu, 5 Nov 2009 21:47:04 +0000 (21:47 +0000)]
LoopDeletion depends on loops having dedicated exits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86180 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe introduction of indirectbr meant the introduction of
Dan Gohman [Thu, 5 Nov 2009 21:14:46 +0000 (21:14 +0000)]
The introduction of indirectbr meant the introduction of
unsplittable critical edges, which means the introduction of
loops which cannot be transformed to LoopSimplify form. Fix
LoopSimplify to avoid transforming such loops into invalid
code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86176 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate various Loop optimization passes to cope with the possibility that
Dan Gohman [Thu, 5 Nov 2009 21:11:53 +0000 (21:11 +0000)]
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

15 years agoFix bug in aggressive antidep breaking; liveness was not updated correctly for region...
David Goodwin [Thu, 5 Nov 2009 21:06:09 +0000 (21:06 +0000)]
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

15 years agoTeach LoopUnroll how to bail if LoopSimplify can't give it what it needs.
Dan Gohman [Thu, 5 Nov 2009 19:44:06 +0000 (19:44 +0000)]
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

15 years agoCall getAnalysis<LoopInfo> the normal way, instead of asking passed-in
Dan Gohman [Thu, 5 Nov 2009 19:43:25 +0000 (19:43 +0000)]
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

15 years agoInstrTypes.h includes Instruction.h, so it's not necessary to include both.
Dan Gohman [Thu, 5 Nov 2009 19:42:20 +0000 (19:42 +0000)]
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

15 years agoFix IVUsers to avoid assuming that the loop has a unique backedge.
Dan Gohman [Thu, 5 Nov 2009 19:41:37 +0000 (19:41 +0000)]
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

15 years agoDelete an unused member variable.
Dan Gohman [Thu, 5 Nov 2009 19:33:15 +0000 (19:33 +0000)]
Delete an unused member variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86160 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor out the predicate code for loopsimplify form exit blocks into
Dan Gohman [Thu, 5 Nov 2009 19:21:41 +0000 (19:21 +0000)]
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

15 years agoCMake: Detect dotty.
Oscar Fuentes [Thu, 5 Nov 2009 19:03:26 +0000 (19:03 +0000)]
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

15 years agoCMake: do not test for pthread and dl libraries on Windows (except
Oscar Fuentes [Thu, 5 Nov 2009 18:57:56 +0000 (18:57 +0000)]
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

15 years agoAvoid printing a redundant space in SDNode->dump().
Dan Gohman [Thu, 5 Nov 2009 18:49:11 +0000 (18:49 +0000)]
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

15 years agoRemove uninteresting and confusing debug output.
Dan Gohman [Thu, 5 Nov 2009 18:47:09 +0000 (18:47 +0000)]
Remove uninteresting and confusing debug output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86149 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove llvm::cl::opt's conversion function into the base classes that
Douglas Gregor [Thu, 5 Nov 2009 18:30:50 +0000 (18:30 +0000)]
Move llvm::cl::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

15 years agoAdd an assertion to catch indirectbr in SplitBlockPredecessors. This
Dan Gohman [Thu, 5 Nov 2009 18:25:44 +0000 (18:25 +0000)]
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

15 years agoadd a note from PR5313
Chris Lattner [Thu, 5 Nov 2009 18:19:19 +0000 (18:19 +0000)]
add a note from PR5313

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86146 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDeclare classes with matched tags, pointed out by a clang++ warning.
Chris Lattner [Thu, 5 Nov 2009 17:51:44 +0000 (17:51 +0000)]
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

15 years agoTeach SimplifyLibCalls to fold memcmp calls with constant arguments.
Benjamin Kramer [Thu, 5 Nov 2009 17:44:22 +0000 (17:44 +0000)]
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

15 years agolit: Add --param NAME=VALUE option, for test suite specific use (to communicate
Daniel Dunbar [Thu, 5 Nov 2009 16:27:33 +0000 (16:27 +0000)]
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

15 years agoDo map insert+find in one step. TODO -= 2.
Benjamin Kramer [Thu, 5 Nov 2009 14:33:27 +0000 (14:33 +0000)]
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

15 years agoPath::createDirectoryOnDisk should ignore existing directories on win32 too.
Benjamin Kramer [Thu, 5 Nov 2009 14:32:40 +0000 (14:32 +0000)]
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

15 years agoMake two more LLVM headers standalone
Douglas Gregor [Thu, 5 Nov 2009 13:39:23 +0000 (13:39 +0000)]
Make two more LLVM headers standalone

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86131 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake a few headers standalone. Plus, add a missing "template" keyword
Douglas Gregor [Thu, 5 Nov 2009 13:30:28 +0000 (13:30 +0000)]
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

15 years agomerge a few crash tests into crash.ll
Chris Lattner [Thu, 5 Nov 2009 05:57:34 +0000 (05:57 +0000)]
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

15 years agoReintroduce support for overloading target intrinsics
Mon P Wang [Thu, 5 Nov 2009 03:19:08 +0000 (03:19 +0000)]
Reintroduce support for overloading target intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86114 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReplace std::map.at() with std::map[].
David Goodwin [Thu, 5 Nov 2009 01:45:50 +0000 (01:45 +0000)]
Replace std::map.at() with std::map[].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86102 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBreak anti-dependencies using free registers in a round-robin manner to avoid introdu...
David Goodwin [Thu, 5 Nov 2009 01:19:35 +0000 (01:19 +0000)]
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

15 years agoTidied some ugliness in the SlotIndex default constructor.
Lang Hames [Thu, 5 Nov 2009 01:18:31 +0000 (01:18 +0000)]
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

15 years agoNow that code placement optimization pass is run for JIT, make sure it's before pre...
Evan Cheng [Thu, 5 Nov 2009 01:16:59 +0000 (01:16 +0000)]
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

15 years agoUse WeakVH while storing metadata in containers.
Devang Patel [Thu, 5 Nov 2009 01:13:02 +0000 (01:13 +0000)]
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

15 years agoRemoved an assert which was causing significant slowdowns in debug builds.
Lang Hames [Thu, 5 Nov 2009 00:52:28 +0000 (00:52 +0000)]
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

15 years agoAdd -mtriple to llc commands, attempting to fix buildbot failures.
Bob Wilson [Thu, 5 Nov 2009 00:51:31 +0000 (00:51 +0000)]
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

15 years agoCode refactoring.
Evan Cheng [Thu, 5 Nov 2009 00:51:13 +0000 (00:51 +0000)]
Code refactoring.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86085 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAttempt again to fix buildbot failures: make expected output less specific
Bob Wilson [Thu, 5 Nov 2009 00:30:35 +0000 (00:30 +0000)]
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

15 years agoCorrectly add chain dependencies around calls and unknown-side-effect instructions.
David Goodwin [Thu, 5 Nov 2009 00:16:44 +0000 (00:16 +0000)]
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

15 years agoUpdate CreateMalloc so that its callers specify the size to allocate:
Victor Hernandez [Thu, 5 Nov 2009 00:03:03 +0000 (00:03 +0000)]
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

15 years agoWhile calculating original type size for a derived type, handle type variants encoded...
Devang Patel [Wed, 4 Nov 2009 23:48:00 +0000 (23:48 +0000)]
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

15 years agoGrammar.
Jim Grosbach [Wed, 4 Nov 2009 23:20:40 +0000 (23:20 +0000)]
Grammar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86068 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimprove DSE when TargetData is not around, based on work by
Chris Lattner [Wed, 4 Nov 2009 23:20:12 +0000 (23:20 +0000)]
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

15 years agoNow that the memory leak from McCat/08-main has been fixed (86056), re-enable
Jim Grosbach [Wed, 4 Nov 2009 23:11:07 +0000 (23:11 +0000)]
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

15 years agoIf a function has no stack frame at all, dynamic realignment isn't necessary.
Jim Grosbach [Wed, 4 Nov 2009 22:41:51 +0000 (22:41 +0000)]
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

15 years agodynamic stack realignment necessitates scanning the floating point callee-
Jim Grosbach [Wed, 4 Nov 2009 22:41:00 +0000 (22:41 +0000)]
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

15 years agoFix DW_AT_data_member_location for bit-fields. It points to the location of annonymou...
Devang Patel [Wed, 4 Nov 2009 22:06:12 +0000 (22:06 +0000)]
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

15 years agoAdd PowerPC codegen for indirect branches.
Bob Wilson [Wed, 4 Nov 2009 21:31:18 +0000 (21:31 +0000)]
Add PowerPC codegen for indirect branches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86050 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHandle empty/tombstone keys for LiveIndex more cleanly. Check for index sanity when...
Lang Hames [Wed, 4 Nov 2009 21:24:15 +0000 (21:24 +0000)]
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

15 years agoA value is only assigned to errno if NumRead equals -1, so do
Duncan Sands [Wed, 4 Nov 2009 20:50:23 +0000 (20:50 +0000)]
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

15 years agoFix broken test.
Bob Wilson [Wed, 4 Nov 2009 20:04:11 +0000 (20:04 +0000)]
Fix broken test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86045 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd some options to disable various code gen optimizations.
Eric Christopher [Wed, 4 Nov 2009 19:57:50 +0000 (19:57 +0000)]
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

15 years agoArray element size does not match array size but array is not a bitfield.
Devang Patel [Wed, 4 Nov 2009 19:37:40 +0000 (19:37 +0000)]
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

15 years agoAdd test for ARM indirectbr codegen.
Bob Wilson [Wed, 4 Nov 2009 19:25:34 +0000 (19:25 +0000)]
Add test for ARM indirectbr codegen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86042 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrint out an informative comment for KILL instructions.
Jakob Stoklund Olesen [Wed, 4 Nov 2009 19:24:37 +0000 (19:24 +0000)]
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

15 years agoFix an iterator invalidation bug that happens when a hashtable
Chris Lattner [Wed, 4 Nov 2009 18:57:42 +0000 (18:57 +0000)]
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

15 years agoLook for llvm-gcc under /Developer/usr/bin first.
Evan Cheng [Wed, 4 Nov 2009 08:36:50 +0000 (08:36 +0000)]
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

15 years agoRangeIsDefinedByCopyFromReg() should check for subreg_to_reg, insert_subreg,
Evan Cheng [Wed, 4 Nov 2009 08:33:14 +0000 (08:33 +0000)]
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

15 years agomove two functions up higher in the file. Delete a useless argument
Chris Lattner [Wed, 4 Nov 2009 08:05:20 +0000 (08:05 +0000)]
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

15 years agofilecheckize this test.
Chris Lattner [Wed, 4 Nov 2009 07:57:05 +0000 (07:57 +0000)]
filecheckize this test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86020 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe .n suffix must go after the predicate.
Evan Cheng [Wed, 4 Nov 2009 07:38:48 +0000 (07:38 +0000)]
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

15 years agoThe magic for our current brand of .bc files is BC. For older ones it was llvc.
Nick Lewycky [Wed, 4 Nov 2009 06:15:28 +0000 (06:15 +0000)]
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

15 years agomake IRBuilder zap "X|0" and "X&-1" when building IR, this happens
Chris Lattner [Wed, 4 Nov 2009 05:00:12 +0000 (05:00 +0000)]
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

15 years agoconfigure: Add --with-optimize-option, for setting the default value of
Daniel Dunbar [Wed, 4 Nov 2009 04:32:50 +0000 (04:32 +0000)]
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

15 years agoSilence implicit conversion warnings.
Evan Cheng [Wed, 4 Nov 2009 03:08:57 +0000 (03:08 +0000)]
Silence implicit conversion warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86000 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAnother spurious friend declaration removed.
Lang Hames [Wed, 4 Nov 2009 01:52:40 +0000 (01:52 +0000)]
Another spurious friend declaration removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85997 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemoved an unnecessary friend declaration and some crufty comments from IndexListEntry.
Lang Hames [Wed, 4 Nov 2009 01:34:22 +0000 (01:34 +0000)]
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

15 years agoFix CMake makefiles
Douglas Gregor [Wed, 4 Nov 2009 01:32:06 +0000 (01:32 +0000)]
Fix CMake makefiles

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85994 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix test.
Evan Cheng [Wed, 4 Nov 2009 00:42:33 +0000 (00:42 +0000)]
Fix test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85986 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse ldr.n to workaround a darwin assembler bug.
Evan Cheng [Wed, 4 Nov 2009 00:00:39 +0000 (00:00 +0000)]
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

15 years agoThe Indexes Patch.
Lang Hames [Tue, 3 Nov 2009 23:52:08 +0000 (23:52 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85979 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix branch folding bug for indirect branches: for a block containing only
Bob Wilson [Tue, 3 Nov 2009 23:44:31 +0000 (23:44 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85975 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoreimplement multiple return value handling in IPSCCP, making it
Chris Lattner [Tue, 3 Nov 2009 23:40:48 +0000 (23:40 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85973 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix t2Int_eh_sjlj_setjmp. Immediate form of orr is a 32-bit instruction. So it should...
Evan Cheng [Tue, 3 Nov 2009 23:13:34 +0000 (23:13 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85965 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse llvm-gcc on newer Darwins.
Bill Wendling [Tue, 3 Nov 2009 22:50:10 +0000 (22:50 +0000)]
Use llvm-gcc on newer Darwins.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85963 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoset svn:ignore
Nuno Lopes [Tue, 3 Nov 2009 22:07:07 +0000 (22:07 +0000)]
set svn:ignore

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85953 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofconsts / fconstd immediate should be proceeded with #.
Evan Cheng [Tue, 3 Nov 2009 21:59:33 +0000 (21:59 +0000)]
fconsts / fconstd immediate should be proceeded with #.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85952 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix broken link
Chris Lattner [Tue, 3 Nov 2009 21:50:09 +0000 (21:50 +0000)]
fix broken link

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85951 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRe-apply 85799. It turns out my code isn't buggy.
Evan Cheng [Tue, 3 Nov 2009 21:40:02 +0000 (21:40 +0000)]
Re-apply 85799. It turns out my code isn't buggy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85947 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix test
Chris Lattner [Tue, 3 Nov 2009 21:26:26 +0000 (21:26 +0000)]
fix test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85946 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomerge a test into ipsccp-basic. running llvm-ld to get one pass is... bad.
Chris Lattner [Tue, 3 Nov 2009 21:25:50 +0000 (21:25 +0000)]
merge a test into ipsccp-basic.  running llvm-ld to get one pass is... bad.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85945 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo a scheduling pass ignoring anti-dependencies to identify candidate registers that...
David Goodwin [Tue, 3 Nov 2009 20:57:50 +0000 (20:57 +0000)]
Do a scheduling pass ignoring anti-dependencies to identify candidate registers that should be renamed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85939 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofinish half thunk thought
Chris Lattner [Tue, 3 Nov 2009 20:52:57 +0000 (20:52 +0000)]
finish half thunk thought

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85937 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChanges requested (avoid getFunction(), avoid Type creation via isVoidTy(), and avoid...
Victor Hernandez [Tue, 3 Nov 2009 20:39:35 +0000 (20:39 +0000)]
Changes requested (avoid getFunction(), avoid Type creation via isVoidTy(), 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

15 years ago<rdar://problem/7352605>. When building schedule graph use mayAlias information to...
David Goodwin [Tue, 3 Nov 2009 20:15:00 +0000 (20:15 +0000)]
<rdar://problem/7352605>. When building schedule graph use mayAlias 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

15 years agoChanges (* location in pointer variables, avoiding include, and using APInt::getLimit...
Victor Hernandez [Tue, 3 Nov 2009 20:02:35 +0000 (20:02 +0000)]
Changes (* location in pointer variables, avoiding include, and using APInt::getLimitedValue) based on feedback to r85814

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85933 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoturn IPSCCP back on by default, try #3 or 4? Woo.
Chris Lattner [Tue, 3 Nov 2009 19:35:13 +0000 (19:35 +0000)]
turn IPSCCP back on by default, try #3 or 4? Woo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85929 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix an IPSCCP bug I introduced when I changed IPSCCP to start working on
Chris Lattner [Tue, 3 Nov 2009 19:24:51 +0000 (19:24 +0000)]
fix an IPSCCP bug I introduced when I changed IPSCCP to start working on
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

15 years agoMake this code more robust by not thinking we are making progress
Duncan Sands [Tue, 3 Nov 2009 19:10:22 +0000 (19:10 +0000)]
Make this code more robust by not thinking we are making progress
if zero bytes were read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85922 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoParse debug info attached with insertvalue and extractvalue instructions.
Devang Patel [Tue, 3 Nov 2009 19:06:07 +0000 (19:06 +0000)]
Parse debug info attached with insertvalue and extractvalue instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85921 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove subtarget check upper for NEON reg-reg fixup pass.
Anton Korobeynikov [Tue, 3 Nov 2009 18:46:11 +0000 (18:46 +0000)]
Move subtarget check upper for NEON reg-reg fixup pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85914 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomark some constant global const.
Chris Lattner [Tue, 3 Nov 2009 18:30:31 +0000 (18:30 +0000)]
mark some constant global const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85910 91177308-0d34-0410-b5e6-96231b3b80d8