Commit Graph

40806 Commits

Author SHA1 Message Date
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
Dan Gohman
bbc1da8ded Tweak IVUsers' concept of "interesting" to exclude add recurrences
where the step value is an induction variable from an outer loop, to
avoid trouble trying to re-expand such expressions. This effectively
hides such expressions from indvars and lsr, which prevents them
from getting into trouble.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111317 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 22:50:37 +00:00
Jim Grosbach
dc140c6e7b Add materialization of virtual base registers for frame indices allocated into
the local block. Resolve references to those indices to a new base register.
For simplification and testing purposes, a new virtual base register is
allocated for each frame index being resolved. The result is truly horrible,
but correct, code that's good for exercising the new code paths.

Next up is adding thumb1 support, which should be very simple. Following that
will be adding base register re-use and implementing a reasonable ARM
heuristic for when a virtual base register should be generated at all.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111315 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 22:41:55 +00:00
Daniel Dunbar
ebe7eb884e CrashRecovery: Clear the current context on the first crash, to avoid re-entering it if the cleanup code crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111309 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 22:32:39 +00:00
Daniel Dunbar
a8fa798246 CrashRecovery: Add CrashRecoveryContext::GetCurrent(), so clients can find the active context from anywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111308 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 22:32:37 +00:00
Daniel Dunbar
c0c815e887 CrashRecovery: Make CrashRecoveryContext static methods thread safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111307 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 22:32:34 +00:00
Dale Johannesen
6cf64a631a Make fast scheduler handle asm clobbers correctly.
PR 7882.  Follows suggestion by Amaury Pouly, thanks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111306 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 22:17:24 +00:00
Anton Korobeynikov
5dad73cec8 Revert part of one of the prev. patches - tailjmp will follow later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 21:08:28 +00:00
Anton Korobeynikov
3a1e54a6b9 More fixes for win64:
- Do not clobber al during variadic calls, this is AMD64 ABI-only feature
  - Emit wincall64, where necessary
Patch by Cameron Esfahani!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111289 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 21:06:07 +00:00
Anton Korobeynikov
e9df15e65c Enable more win64 calls folding opportunities.
Patch by Cameron Esfahani!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111288 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 21:06:01 +00:00
Evan Cheng
148341cc9b PHI elimination shouldn't require machineloopinfo since it's used at -O0. Move the requirement to LiveIntervalAnalysis instead. Note this does not change the number of times machineloopinfo is computed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111285 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 21:00:37 +00:00
Evan Cheng
6542416560 Machine CSE preserves CFG. Pass manager was freeing machineloopinfo after machine cse before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111281 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 20:57:42 +00:00
Jakob Stoklund Olesen
00d3dda86f Don't call tablegen'ed Predicate_* functions in the ARM target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111277 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 20:39:04 +00:00
Jim Grosbach
8ae231a06c silence warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111274 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 20:21:30 +00:00
Benjamin Kramer
81cfb8529b Remove dead code. Fixes a GCC warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111271 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 19:45:05 +00:00
Jim Grosbach
c5ed0134a7 80 column cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111266 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 18:39:16 +00:00
Benjamin Kramer
e5b57347e9 Sketch i386 relocations handling, from Roman Divacky.
Hello world builds & runs now on i386/ELF with -integrated-as.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111264 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 18:20:28 +00:00
Jakob Stoklund Olesen
4bb862d179 Don't call Predicate_* methods directly from Sparc target.
Modernize predicates a bit.

The Predicate_* methods are not used by TableGen any longer. They are only
emitted for the sake of legacy code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111263 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 18:17:12 +00:00
Jim Grosbach
8708ead5a4 Add hook to examine an instruction referencing a frame index to determine
whether to allocate a virtual frame base register to resolve the frame
index reference in it. Implement a simple version for ARM to aid debugging.

In LocalStackSlotAllocation, scan the function for frame index references
to local frame indices and ask the target whether to allocate virtual
frame base registers for any it encounters. Purely infrastructural for
debug output. Next step is to actually allocate base registers, then add
intelligent re-use of them.

rdar://8277890



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111262 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 18:13:53 +00:00
Jim Grosbach
3edb904927 explicitly handle no-op cases for clarity. Fixes clang warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111260 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 18:00:41 +00:00
Benjamin Kramer
299fbe3a5a Use the correct entry size for relocation entries, from Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111259 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 17:56:13 +00:00
Evan Cheng
e008384508 Move the decision logic whether it's a good idea to split a critical edge to clients. Also fixed an erroneous check. An edge is only a back edge when the from and to blocks are in the same loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111256 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 17:43:50 +00:00
Dan Gohman
fc8042a122 When rotating loops, put the original header at the bottom of the
loop, making the resulting loop significantly less ugly.  Also, zap
its trivial PHI nodes, since it's easy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111255 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 17:39:21 +00:00
Jim Grosbach
37e59c059c remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111254 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 17:37:22 +00:00
Benjamin Kramer
377a572d9b Differentiate between RELA and REL relocations, from Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111252 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 17:30:07 +00:00