Commit Graph

40830 Commits

Author SHA1 Message Date
Benjamin Kramer
44cbde85ba MCELF: Count the section orders properly. Patch by Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111517 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 13:44:49 +00:00
Jim Grosbach
a0fc005321 Update local stack block allocation to let PEI do the allocs if no additional
base registers were required. This will allow for slightly better packing
of the locals when alignment padding is necessary after callee saved registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111508 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 02:47:08 +00:00
Dan Gohman
8a757aeac4 Revert r111199; it breaks -debug-pass=Structure output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111500 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 01:29:07 +00:00
Chris Lattner
59f8a6a666 fix PR7465, mishandling of lcall and ljmp: intersegment long
call and jumps.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111496 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 01:18:43 +00:00
Dan Gohman
694a15eabe Process the step before the start, because it's usually the simpler
of the two.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111495 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 01:02:31 +00:00
Chris Lattner
efbdc8e236 minor progress towards fixing PR7465
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111494 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 01:00:34 +00:00
Eric Christopher
456144eb14 Add an AddOptionalDefs method and use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111489 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 00:37:05 +00:00
Bill Wendling
f0e132c385 Add the "isCompare" attribute to the defm instead of each individual instr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111481 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 00:05:48 +00:00
Jakob Stoklund Olesen
7552a3df39 Don't call Predicate_* in Mips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111468 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:56:46 +00:00
Eric Christopher
d96b02b3d6 Remove extra header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111456 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:38:16 +00:00
Jim Grosbach
cd799ce8f8 Add a newline to debug output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111453 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:14:02 +00:00
Chris Lattner
2215c607c3 refix PR1143 by making basicaa analyze zexts of indices aggresively,
which I broke with a recent patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111452 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:09:49 +00:00
Evan Cheng
c3439ad63f If any def of a machine-sink candidate has local uses, it's obviously not safe to sink it to a successor block. This bug has been hidden because a later check for critical-edge disable these illegal optimizations. This patch should significantly reduce the amount of time spent on checking dominator information for obviously unsafe sinking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111450 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:09:25 +00:00
Chris Lattner
ff2efb9f9c GetLinearExpression is only called when TD is non-null, pass as
a reference instead of pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111445 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 22:52:09 +00:00
Chris Lattner
8807e9fbdf rework GEP decomposition to make a new VariableGEPIndex struct instead of
using a pair.  This tidies up the code a bit.  While setting things up, add
a (currently unused) field to keep track of how the value is extended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111444 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 22:47:56 +00:00
Jim Grosbach
2b1e202e1c Enable ARM base register reuse to local stack slot allocation. Whenever a new
frame index reference to an object in the local block is seen, check if
it's near enough to any previously allocaated base register to re-use.

rdar://8277890



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111443 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 22:44:49 +00:00
Dan Gohman
2499990699 Make raw_fd_ostream consider itself the owner of STDOUT_FILENO when
constructed with an output filename of "-". In particular, allow the
file descriptor to be closed, and close the file descriptor in the
destructor if it hasn't been explicitly closed already, to ensure
that any write errors are detected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111436 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 22:26:19 +00:00
Chris Lattner
30963fbe8f move gep decomposition out of ValueTracking into BasicAA. The form of
decomposition that it is doing is very basicaa specific and is only used
by basicaa.

Now with less tree breakingness.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 22:07:29 +00:00
Dan Gohman
d77e5a8176 Tidy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111432 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 22:04:43 +00:00
Bill Wendling
ad422718f9 Minor simplification. Gets rid of a needless temporary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111430 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 21:32:07 +00:00
Owen Anderson
b81fd62a66 Use ConstantRange to propagate information through value definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111425 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 21:11:37 +00:00
Jakob Stoklund Olesen
ff3ae8691c Thinking about it, we don't need MachineDominatorTree after all. The DomValue
map discovers the iterated dominance frontier for free.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111400 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 20:29:53 +00:00
Jakob Stoklund Olesen
cf16bea74e Revert r111394. It was too aggressive.
We must complete the DFS, otherwise we might miss needed phi-defs, and
prematurely color live ranges with a non-dominating value.

This is not a big deal since we get to color more of the CFG and the next
mapValue call will be faster.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111397 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 20:06:05 +00:00
Jakob Stoklund Olesen
4d440bd786 Aggressively prune the DFS when inserting phi-defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 19:00:11 +00:00
Jakob Stoklund Olesen
1407c84242 Add the LiveIntervalMap class. Don't hook it up yet.
LiveIntervalMap maps values from a parent LiveInterval to a child interval that
is a strict subset. It will create phi-def values as needed to preserve the
VNInfo SSA form in the child interval.

This leads to an algorithm very similar to the one in SSAUpdaterImpl.h, but with
enough differences that the code can't be reused:

- We don't need to manipulate PHI instructions.
- LiveIntervals have kills.
- We have MachineDominatorTree.
- We can use df_iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111393 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 19:00:08 +00:00
Daniel Dunbar
4ae56d725d Revert r111375, "move gep decomposition out of ValueTracking into BasicAA. The
form of", it doesn't pass tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111385 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 18:43:08 +00:00
Bill Wendling
3d7ff08c82 Improve whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111384 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 18:41:13 +00:00
Bill Wendling
86b98b5874 Marked with ATTRIBUTE_USED so that clang doesn't complain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111383 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 18:40:57 +00:00
Owen Anderson
00ac77ef88 Inform LazyValueInfo whenever a block is deleted, to avoid dangling pointer issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111382 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 18:39:01 +00:00
Daniel Dunbar
c983b20661 MC/ELF: Allow null values in virtual sections, ELF doesn't use special
directives for putting contents in .bss, for example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111376 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 18:22:37 +00:00
Chris Lattner
6b63037306 move gep decomposition out of ValueTracking into BasicAA. The form of
decomposition that it is doing is very basicaa specific and is only used
by basicaa.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111375 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 18:22:17 +00:00
Jim Grosbach
74d803a58c Add hook for re-using virtual base registers for local stack slot access.
Nothing fancy, just ask the target if any currently available base reg
is in range for the instruction under consideration and use the first one
that is. Placeholder ARM implementation simply returns false for now.

ongoing saga of rdar://8277890



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111374 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 17:57:37 +00:00
Jakob Stoklund Olesen
9ac248848f Preserve subregs on PHI source operands. Patch by Krister Wombell!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111366 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 16:09:47 +00:00
Kalle Raiskila
ca9460f5a0 Fix a bug with insertelement on SPU.
The previous algorithm in LowerVECTOR_SHUFFLE 
didn't check all requirements for "monotonic" shuffles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111361 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 10:20:29 +00:00
Kalle Raiskila
86a791284a Remove all traces of v2[i,f]32 on SPU.
The "half vectors" are now widened to full size by the legalizer.
The only exception is in parameter passing, where half vectors are 
expanded. This causes changes to some dejagnu tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111360 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 10:04:39 +00:00
Kalle Raiskila
44ff5f5435 Change SPU C calling convention to match that described in
"SPU Application Binary Interface Specification, v1.9" by
IBM. 
Specifically: use r3-r74 to pass parameters and the return value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111358 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 09:50:30 +00:00
Chris Lattner
91b2307a89 fix PR7589: In brief:
gep P, (zext x) != gep P, (sext x)

DecomposeGEPExpression was getting this wrong, confusing
basicaa.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111352 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 04:28:19 +00:00
Chris Lattner
2fa7b48eb5 Fix PR7755: knowing something about an inval for a pred
from the LHS should disable reconsidering that pred on the
RHS.  However, knowing something about the pred on the RHS
shouldn't disable subsequent additions on the RHS from
happening.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111349 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 03:14:36 +00:00
Chris Lattner
c7e31fcf49 fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111348 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 03:13:35 +00:00
Chris Lattner
2bde78206d remove some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111345 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 02:42:11 +00:00
Chris Lattner
473fc96889 remove some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111344 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 02:41:56 +00:00
Chris Lattner
0d857cf8d1 remove some code that is dead now that lea's are modeled with segment registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111343 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 02:40:44 +00:00
Chris Lattner
3126f1c028 remove dead prototype.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111342 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 02:37:06 +00:00
Bob Wilson
2003bcfbd2 Expand ZERO_EXTEND operations for NEON vector types.
Testcase from Nick Lewycky.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111341 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 01:45:52 +00:00
Dan Gohman
d2da32711d Revert r111321. This doesn't fix a problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111339 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 01:34:52 +00:00
Chris Lattner
5083912dd7 stomp some more undefined behavior, PR7775.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111337 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 00:33:47 +00:00
Chris Lattner
7942e3c412 include config.h to get config params, hopefully unbreaking mingw builder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111325 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 23:22:10 +00:00
Chris Lattner
93d81b697c Fix the rest of rdar://8318441 which happens when a raw_fd_ostream
(e.g. errs()) fails in close() due to (e.g.) a broken pipe.  As
previously written, the had_error() flag would get set and then
the raw_ostream dtor would report a fatal error.  There is nothing
the client can do about this and we have no way to report the error,
so just eat it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111321 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 23:11:56 +00:00
Chris Lattner
73ebaff79f report_fatal_error can't use errs(), because errs() can call
into report_fatal_error.  Just blast the string to stderr with write(2)
and hope for the best!  Part of rdar://8318441


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111320 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 23:03:53 +00:00
Eric Christopher
68c23f8616 Temporarily revert r110987 as it's causing some miscompares in
vector heavy code.  I'll re-enable when we've tracked down the problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111318 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 22:55:27 +00:00