Commit Graph

34182 Commits

Author SHA1 Message Date
Dan Gohman
0baf2a302f Minor cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90253 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 19:16:15 +00:00
Dan Gohman
241c595786 Trim an unnecessary #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 19:13:27 +00:00
Devang Patel
c09ddc1c79 Clear function specific containers while processing end of a function, even if DW_TAG_subprogram for current function is not found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 18:13:48 +00:00
Jim Grosbach
d122874996 Thumb1 exception handling setjmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 18:10:36 +00:00
Johnny Chen
b731e87649 For VLDM/VSTM (Advanced SIMD), set encoding bits Inst{11-8} to 0b1011.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90243 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 17:37:06 +00:00
Jakob Stoklund Olesen
8f72235a77 Move PHIElimination::isLiveOut method to LiveVariables.
We want LiveVariables clients to use methods rather than accessing the
getVarInfo data structure directly. That way it will be possible to change the
LiveVariables representation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 17:13:31 +00:00
Chris Lattner
855d9da596 fix 255.vortex again, third time's the charm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90217 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 07:33:32 +00:00
Chris Lattner
46875c0bfb fix PR5640 by tracking whether a block is the header of a loop more
precisely, which prevents us from infinitely peeling the loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90211 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 06:04:43 +00:00
Jakob Stoklund Olesen
579d6d9fe3 Use CFG connectedness as a secondary sort key when deciding the order of copy coalescing.
This means that well connected blocks are copy coalesced before the less connected blocks. Connected blocks are more difficult to
coalesce because intervals are more complicated, so handling them first gives a greater chance of success.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 03:03:00 +00:00
Dan Gohman
261a7d983d Devang pointed out that this code should use DIScope instead of
DICompileUnit. This code now prints debug filenames successfully.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90181 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 00:45:56 +00:00
Evan Cheng
a4025df42d Fix PR5614: parts of a physical register def may be killed the rest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90180 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 00:44:45 +00:00
Johnny Chen
208d76cad9 For VMOV (immediate), make some of the encoding bits (cmode and op) unspecified.
For VMOVv*i[16,32], op bit is don't care, and some cmode bits vary depending on
the immediate values.

Ref: Table A7-15 Modified immediate values for Advanced SIMD instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 00:02:02 +00:00
Devang Patel
deea564e53 If pointer type has a name then do not ignore the name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 23:56:56 +00:00
Dan Gohman
39a1fab856 Minor whitespace fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90166 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 23:33:53 +00:00
Dan Gohman
22f6526081 Fix a minor inconsistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90165 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 23:33:37 +00:00
Jakob Stoklund Olesen
ce7a663140 New virtual registers created for spill intervals should inherit allocation hints from the original register.
This helps us avoid silly copies when rematting values that are copied to a physical register:

leaq	_.str44(%rip), %rcx
movq	%rcx, %rsi
call	_strcmp

becomes:

leaq	_.str44(%rip), %rsi
call	_strcmp

The coalescer will not touch the movq because that would tie down the physical register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 22:55:54 +00:00
Bob Wilson
3858225afc Reprioritize tests for tail duplication to be aggressive about indirect
branches even when optimizing for code size.  Unless we find evidence to the
contrary in the future, the special treatment for indirect branches does not
have a significant effect on code size, and performance still matters with -Os.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90147 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 18:56:45 +00:00
Bob Wilson
15217e63bc Remove isProfitableToDuplicateIndirectBranch target hook. It is profitable
for all the processors where I have tried it, and even when it might not help
performance, the cost is quite low.  The opportunities for duplicating
indirect branches are limited by other factors so code size does not change
much due to tail duplicating indirect branches aggressively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 18:35:03 +00:00
Bob Wilson
afa1df467b Fix some more ARM unified syntax warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90141 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 17:47:19 +00:00
Tobias Grosser
ab01069fcd Fix last DOTGraphTraits problems in CompilationGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90136 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 13:34:51 +00:00
Tobias Grosser
b5eedf2c1c Remove forgotten ShortNames in Trie and CompilationGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90135 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 13:14:13 +00:00
Tobias Grosser
56f4ef3232 Remove ShortNames from getNodeLabel in DOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:38:47 +00:00
Tobias Grosser
a10d598602 Instantiate DefaultDOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:38:13 +00:00
Tobias Grosser
2833fac273 Small PostDominatorTree improvements
* Do not SEGFAULT if tree entryNode() is NULL
 * Print function names in dotty printer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90130 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:06:37 +00:00
Nick Lewycky
f58e86d762 Revert r90107, fixing test/Transforms/GVN/2009-11-29-ReverseMap.ll and the
llvm-gcc build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90113 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 07:05:51 +00:00
Mon P Wang
cd6e725f21 Added support to allow clients to custom widen. For X86, custom widen vectors for
divide/remainder since these operations can trap by unroll them and adding undefs
for the resulting vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90108 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 02:42:02 +00:00
Chris Lattner
366429b400 reapply r90093 with an addition of keeping the forward
and reverse nonlocal memdep maps in synch, this should
fix 255.vortex.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 02:26:29 +00:00
Nick Lewycky
fac554a131 Teach ConstantFolding to do a better job when folding gep(bitcast).
This permits the devirtualization of llvm.org/PR3100#c9 when compiled by clang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 21:40:55 +00:00
Benjamin Kramer
e6f329476c Revert r90089 for now, it's breaking selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 21:17:48 +00:00
Chris Lattner
ae3d24880d revert this patch for now, it causes failures of:
LLVM::Transforms/GVN/2009-02-17-LoadPRECrash.ll
    LLVM::Transforms/GVN/2009-06-17-InvalidPRE.ll



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90096 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 21:14:59 +00:00
Chris Lattner
1903d97c2c Fix a really nasty caching bug I introduced in memdep. An entry
was being added to the Result vector, but not being put in the
cache.  This means that if the cache was reused wholesale for a
later query that it would be missing this entry and we'd do an
incorrect load elimination.

Unfortunately, it's not really possible to write a useful 
testcase for this, but this unbreaks 255.vortex.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 21:09:36 +00:00
Benjamin Kramer
4aac07e898 Fix two FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 20:29:30 +00:00
Nick Lewycky
2eac9493fc Detabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90085 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 18:10:39 +00:00
Benjamin Kramer
18eaefd25e Remove dead returns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 17:42:58 +00:00
Kovarththanan Rajaratnam
d614673bb8 This patch ensures that Path::GetMainExecutable is able to handle the
case where realpath() fails. When this occurs we segfault trying to
create a std::string from a NULL pointer.

Fixes PR5635.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 17:19:48 +00:00
Chris Lattner
cd188e9665 add testcases for the foo_with_overflow op xforms added recently and
fix bugs exposed by the tests.  Testcases from Alastair Lynn!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90056 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 02:57:29 +00:00
Chris Lattner
d4137f40da update and consolidate the load pre notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90050 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 02:19:52 +00:00
Chris Lattner
3f40e23392 Implement PR5634.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90046 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 00:51:17 +00:00
Nick Lewycky
d801c10de6 Teach memdep to look for memory use intrinsics during dependency queries. Fixes
PR5574.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90045 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 21:27:49 +00:00
Chris Lattner
0c264b16b0 reenable load address insertion in load pre. This allows us to
handle cases like this:
void test(int N, double* G) {
  long j;
  for (j = 1; j < N - 1; j++)
      G[j+1] = G[j] + G[j+1];
}

where G[1] isn't live into the loop.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 16:08:18 +00:00
Chris Lattner
dd696052f0 Enhance InsertPHITranslatedPointer to be able to return a list of newly
inserted instructions.  No functionality change until someone starts using it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90039 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 15:39:14 +00:00
Chris Lattner
ab9530ee5d implement a FIXME: limit the depth that DecomposeGEPExpression goes the same
way that getUnderlyingObject does it. 

This fixes the 'DecomposeGEPExpression and getUnderlyingObject disagree!' 
assertion on sqlite3.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90038 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 15:12:41 +00:00
Chris Lattner
af7a28939e enable code to handle un-phi-translatable cases more aggressively:
if we don't have an address expression available in a predecessor,
then model this as the value being clobbered at the end of the pred
block instead of being modeled as a complete phi translation failure.
This is important for PRE of loads because we want to see that the
load is available in all but this predecessor, and complete phi
translation failure results in not getting any information about
predecessors.

This doesn't do anything until I renable code insertion since PRE
now sees that it is available in all but one predecessors, but can't
insert the addressing in the predecessor that is missing it to 
eliminate the redundancy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90037 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 14:54:10 +00:00
Chris Lattner
971fd57f7d disable value insertion for now, I need to figure out how
to inform GVN about the newly inserted values.  This fixes 
PR5631.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 22:50:07 +00:00
Chris Lattner
6f7b210b25 Rework InsertPHITranslatedPointer to handle the recursive case, this
fixes PR5630 and sets the stage for the next phase of goodness (testcase
pending).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90019 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 22:05:15 +00:00
Chris Lattner
5141421e38 recursively phi translate bitcast operands too, for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90016 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 20:25:30 +00:00
Nick Lewycky
807d2fa1eb Oops! Fix bug introduced in my recent cleanup change. Thanks to Tobias Grosser
for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90015 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 19:57:53 +00:00
Chris Lattner
11c6bab704 add support for recursive phi translation and phi
translation of add with immediate.  This allows us
to optimize this function:

void test(int N, double* G) {
  long j;
  G[1] = 1;
    for (j = 1; j < N - 1; j++)
        G[j+1] = G[j] + G[j+1];
}

to only do one load every iteration of the loop.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90013 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 19:11:31 +00:00
Chris Lattner
8aee8efc0c factor some logic out of instcombine into a new SimplifyAddInst method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 17:42:22 +00:00
Chris Lattner
1d159838a3 add a deadargelim note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90009 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 17:12:30 +00:00