oota-llvm.git
14 years agoRemove all traces of v2[i,f]32 on SPU.
Kalle Raiskila [Wed, 18 Aug 2010 10:04:39 +0000 (10:04 +0000)]
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

14 years agoChange SPU C calling convention to match that described in
Kalle Raiskila [Wed, 18 Aug 2010 09:50:30 +0000 (09:50 +0000)]
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

14 years agofix a buggy test
Chris Lattner [Wed, 18 Aug 2010 04:55:12 +0000 (04:55 +0000)]
fix a buggy test

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

14 years agofix PR7589: In brief:
Chris Lattner [Wed, 18 Aug 2010 04:28:19 +0000 (04:28 +0000)]
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

14 years agofilecheckize and detrivialize.
Chris Lattner [Wed, 18 Aug 2010 04:25:43 +0000 (04:25 +0000)]
filecheckize and detrivialize.

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

14 years agoFix PR7755: knowing something about an inval for a pred
Chris Lattner [Wed, 18 Aug 2010 03:14:36 +0000 (03:14 +0000)]
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

14 years agofit in 80 cols
Chris Lattner [Wed, 18 Aug 2010 03:13:35 +0000 (03:13 +0000)]
fit in 80 cols

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

14 years agoremove some dead code.
Chris Lattner [Wed, 18 Aug 2010 02:42:11 +0000 (02:42 +0000)]
remove some dead code.

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

14 years agoremove some dead code.
Chris Lattner [Wed, 18 Aug 2010 02:41:56 +0000 (02:41 +0000)]
remove some dead code.

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

14 years agoremove some code that is dead now that lea's are modeled with segment registers.
Chris Lattner [Wed, 18 Aug 2010 02:40:44 +0000 (02:40 +0000)]
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

14 years agoremove dead prototype.
Chris Lattner [Wed, 18 Aug 2010 02:37:06 +0000 (02:37 +0000)]
remove dead prototype.

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

14 years agoExpand ZERO_EXTEND operations for NEON vector types.
Bob Wilson [Wed, 18 Aug 2010 01:45:52 +0000 (01:45 +0000)]
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

14 years agoFix the "Finished Creating" messages for aliases to print the
Dan Gohman [Wed, 18 Aug 2010 01:35:53 +0000 (01:35 +0000)]
Fix the "Finished Creating" messages for aliases to print the
right name.

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

14 years agoRevert r111321. This doesn't fix a problem.
Dan Gohman [Wed, 18 Aug 2010 01:34:52 +0000 (01:34 +0000)]
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

14 years agostomp some more undefined behavior, PR7775.
Chris Lattner [Wed, 18 Aug 2010 00:33:47 +0000 (00:33 +0000)]
stomp some more undefined behavior, PR7775.

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

14 years agodon't emit zero bit fields with Emit, fixing undefined behavior,
Chris Lattner [Wed, 18 Aug 2010 00:29:18 +0000 (00:29 +0000)]
don't emit zero bit fields with Emit, fixing undefined behavior,
PR7778

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

14 years agoDon't pass in a null pointer to std::string's ctor, an empty string
Chris Lattner [Wed, 18 Aug 2010 00:11:25 +0000 (00:11 +0000)]
Don't pass in a null pointer to std::string's ctor, an empty string
ref should produce an empty std::string.  This fixes PR7879.

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

14 years agofix a broken link
Chris Lattner [Tue, 17 Aug 2010 23:26:04 +0000 (23:26 +0000)]
fix a broken link

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

14 years agoinclude config.h to get config params, hopefully unbreaking mingw builder.
Chris Lattner [Tue, 17 Aug 2010 23:22:10 +0000 (23:22 +0000)]
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

14 years agoFix the rest of rdar://8318441 which happens when a raw_fd_ostream
Chris Lattner [Tue, 17 Aug 2010 23:11:56 +0000 (23:11 +0000)]
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

14 years agoreport_fatal_error can't use errs(), because errs() can call
Chris Lattner [Tue, 17 Aug 2010 23:03:53 +0000 (23:03 +0000)]
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

14 years agoTemporarily revert r110987 as it's causing some miscompares in
Eric Christopher [Tue, 17 Aug 2010 22:55:27 +0000 (22:55 +0000)]
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

14 years agoTweak IVUsers' concept of "interesting" to exclude add recurrences
Dan Gohman [Tue, 17 Aug 2010 22:50:37 +0000 (22:50 +0000)]
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

14 years agoAdd materialization of virtual base registers for frame indices allocated into
Jim Grosbach [Tue, 17 Aug 2010 22:41:55 +0000 (22:41 +0000)]
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

14 years agoAdd nounwind.
Evan Cheng [Tue, 17 Aug 2010 22:35:20 +0000 (22:35 +0000)]
Add nounwind.

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

14 years agoCrashRecovery: Clear the current context on the first crash, to avoid re-entering...
Daniel Dunbar [Tue, 17 Aug 2010 22:32:39 +0000 (22:32 +0000)]
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

14 years agoCrashRecovery: Add CrashRecoveryContext::GetCurrent(), so clients can find the active...
Daniel Dunbar [Tue, 17 Aug 2010 22:32:37 +0000 (22:32 +0000)]
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

14 years agoCrashRecovery: Make CrashRecoveryContext static methods thread safe.
Daniel Dunbar [Tue, 17 Aug 2010 22:32:34 +0000 (22:32 +0000)]
CrashRecovery: Make CrashRecoveryContext static methods thread safe.

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

14 years agoMake fast scheduler handle asm clobbers correctly.
Dale Johannesen [Tue, 17 Aug 2010 22:17:24 +0000 (22:17 +0000)]
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

14 years agoRevert part of one of the prev. patches - tailjmp will follow later.
Anton Korobeynikov [Tue, 17 Aug 2010 21:08:28 +0000 (21:08 +0000)]
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

14 years agoMore fixes for win64:
Anton Korobeynikov [Tue, 17 Aug 2010 21:06:07 +0000 (21:06 +0000)]
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

14 years agoEnable more win64 calls folding opportunities.
Anton Korobeynikov [Tue, 17 Aug 2010 21:06:01 +0000 (21:06 +0000)]
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

14 years agoAdd some win64 coff goodness.
Anton Korobeynikov [Tue, 17 Aug 2010 21:05:54 +0000 (21:05 +0000)]
Add some win64 coff goodness.
Patch by Cameron Esfahani!

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

14 years agoPHI elimination shouldn't require machineloopinfo since it's used at -O0. Move the...
Evan Cheng [Tue, 17 Aug 2010 21:00:37 +0000 (21:00 +0000)]
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

14 years agoMachine CSE preserves CFG. Pass manager was freeing machineloopinfo after machine...
Evan Cheng [Tue, 17 Aug 2010 20:57:42 +0000 (20:57 +0000)]
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

14 years agoDon't call tablegen'ed Predicate_* functions in the ARM target.
Jakob Stoklund Olesen [Tue, 17 Aug 2010 20:39:04 +0000 (20:39 +0000)]
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

14 years agosilence warning
Jim Grosbach [Tue, 17 Aug 2010 20:21:30 +0000 (20:21 +0000)]
silence warning

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

14 years agoRemove dead code. Fixes a GCC warning.
Benjamin Kramer [Tue, 17 Aug 2010 19:45:05 +0000 (19:45 +0000)]
Remove dead code. Fixes a GCC warning.

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

14 years agoThis patch enables "make unittests" on enable-shared/mingw.
Anton Korobeynikov [Tue, 17 Aug 2010 19:34:40 +0000 (19:34 +0000)]
This patch enables "make unittests" on enable-shared/mingw.
Patch by Takumi Nakamura!

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

14 years agoThis patch enables ENABLE_SHARED=1 to build DLL based LLVM toolchain on MingW & Cygwin.
Anton Korobeynikov [Tue, 17 Aug 2010 19:03:03 +0000 (19:03 +0000)]
This patch enables ENABLE_SHARED=1 to build DLL based LLVM toolchain on MingW & Cygwin.
Patch by Takumi Nakamura!

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

14 years ago80 column cleanup.
Jim Grosbach [Tue, 17 Aug 2010 18:39:16 +0000 (18:39 +0000)]
80 column cleanup.

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

14 years agoSketch i386 relocations handling, from Roman Divacky.
Benjamin Kramer [Tue, 17 Aug 2010 18:20:28 +0000 (18:20 +0000)]
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

14 years agoDon't call Predicate_* methods directly from Sparc target.
Jakob Stoklund Olesen [Tue, 17 Aug 2010 18:17:12 +0000 (18:17 +0000)]
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

14 years agoAdd hook to examine an instruction referencing a frame index to determine
Jim Grosbach [Tue, 17 Aug 2010 18:13:53 +0000 (18:13 +0000)]
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

14 years agoexplicitly handle no-op cases for clarity. Fixes clang warning.
Jim Grosbach [Tue, 17 Aug 2010 18:00:41 +0000 (18:00 +0000)]
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

14 years agoUse the correct entry size for relocation entries, from Roman Divacky.
Benjamin Kramer [Tue, 17 Aug 2010 17:56:13 +0000 (17:56 +0000)]
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

14 years agoMove the decision logic whether it's a good idea to split a critical edge to clients...
Evan Cheng [Tue, 17 Aug 2010 17:43:50 +0000 (17:43 +0000)]
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

14 years agoWhen rotating loops, put the original header at the bottom of the
Dan Gohman [Tue, 17 Aug 2010 17:39:21 +0000 (17:39 +0000)]
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

14 years agoremove trailing whitespace
Jim Grosbach [Tue, 17 Aug 2010 17:37:22 +0000 (17:37 +0000)]
remove trailing whitespace

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

14 years agoDifferentiate between RELA and REL relocations, from Roman Divacky.
Benjamin Kramer [Tue, 17 Aug 2010 17:30:07 +0000 (17:30 +0000)]
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

14 years agoChange ARM PKHTB and PKHBT instructions to use a shift_imm operand to avoid
Bob Wilson [Tue, 17 Aug 2010 17:23:19 +0000 (17:23 +0000)]
Change ARM PKHTB and PKHBT instructions to use a shift_imm operand to avoid
printing "lsl #0".  This fixes the remaining parts of pr7792.  Make
corresponding changes for encoding/decoding these instructions.

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

14 years agoFix debug message.
Evan Cheng [Tue, 17 Aug 2010 17:15:14 +0000 (17:15 +0000)]
Fix debug message.

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

14 years agoadd some  's to a pre to avoid newlines being eaten
Chris Lattner [Tue, 17 Aug 2010 17:13:42 +0000 (17:13 +0000)]
add some  's to a pre to avoid newlines being eaten
and the formatting being thrown off.  I admit to not knowing
what is going on here.

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

14 years agoUse the getUniquePredecessor() utility function, instead of doing
Dan Gohman [Tue, 17 Aug 2010 17:07:02 +0000 (17:07 +0000)]
Use the getUniquePredecessor() utility function, instead of doing
what it does manually.

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

14 years agoOne baby step towards i386 ELF, from Roman Divacky.
Benjamin Kramer [Tue, 17 Aug 2010 17:02:29 +0000 (17:02 +0000)]
One baby step towards i386 ELF, from Roman Divacky.

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

14 years agofix emacs language spec's, patch by Edmund Grimley-Evans!
Chris Lattner [Tue, 17 Aug 2010 16:20:04 +0000 (16:20 +0000)]
fix emacs language spec's, patch by Edmund Grimley-Evans!

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

14 years agoWhen creating a JIT, try to load the program so that we can resolve symbols
Nick Lewycky [Tue, 17 Aug 2010 16:19:18 +0000 (16:19 +0000)]
When creating a JIT, try to load the program so that we can resolve symbols
against it. This affects Windows.

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

14 years agoRevert r111230, we have to find a better place for the host-specific code.
Benjamin Kramer [Tue, 17 Aug 2010 15:50:23 +0000 (15:50 +0000)]
Revert r111230, we have to find a better place for the host-specific code.

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

14 years agoFix failure of unittests/ExecutionEngine/JIT/MultiJITTest.cpp on
Chris Lattner [Tue, 17 Aug 2010 15:42:43 +0000 (15:42 +0000)]
Fix failure of unittests/ExecutionEngine/JIT/MultiJITTest.cpp on
cygwin when built with ENABLE_SHARED=1.  Patch by NAKAMURA Takumi!

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

14 years agoMicro-optimize MCObjectWriter to do a byteswap if necessary and then write the
Benjamin Kramer [Tue, 17 Aug 2010 13:55:45 +0000 (13:55 +0000)]
Micro-optimize MCObjectWriter to do a byteswap if necessary and then write the
whole integer to the stream instead of doing byte-sized writes.

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

14 years agoThere is this new "LLVM" compiler that supports __builtin_bswap but thinks it's gcc...
Benjamin Kramer [Tue, 17 Aug 2010 11:45:38 +0000 (11:45 +0000)]
There is this new "LLVM" compiler that supports __builtin_bswap but thinks it's gcc 4.2.

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

14 years agoAllow more cases of undef shuffle indices and add tests for them.
Bob Wilson [Tue, 17 Aug 2010 05:54:34 +0000 (05:54 +0000)]
Allow more cases of undef shuffle indices and add tests for them.

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

14 years agoAdd an option to disable codegen prepare critical edge splitting. In theory, PHI...
Evan Cheng [Tue, 17 Aug 2010 01:34:49 +0000 (01:34 +0000)]
Add an option to disable codegen prepare critical edge splitting. In theory, PHI elimination is already doing all (most?) of the splitting needed. But machine-licm and machine-sink seem to miss some important optimizations when splitting is disabled.

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

14 years agoFix typo.
Eric Christopher [Tue, 17 Aug 2010 01:30:33 +0000 (01:30 +0000)]
Fix typo.

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

14 years agoCopy over some overridden MI wrappers for ARM fast-isel. This is where
Eric Christopher [Tue, 17 Aug 2010 01:25:29 +0000 (01:25 +0000)]
Copy over some overridden MI wrappers for ARM fast-isel.  This is where
we're adding predicates and optional defs to the MachineInstrs.

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

14 years agoPHI elimination should not break back edge. It can cause some significant code placem...
Evan Cheng [Tue, 17 Aug 2010 01:20:36 +0000 (01:20 +0000)]
PHI elimination should not break back edge. It can cause some significant code placement issues. rdar://8263994

good:
LBB0_2:
  mov     r2, r0
  . . .
  mov     r1, r2
  bne     LBB0_2

bad:
LBB0_2:
  mov     r2, r0
  . . .
@ BB#3:
  mov     r1, r2
  b       LBB0_2

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

14 years agoRemove predicate workaround, we're going to require that predicate
Eric Christopher [Tue, 17 Aug 2010 01:18:37 +0000 (01:18 +0000)]
Remove predicate workaround, we're going to require that predicate
and optional def operands are handled in the backend support.

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

14 years agoMake arm fast-isel possible to enable via command line.
Eric Christopher [Tue, 17 Aug 2010 00:46:57 +0000 (00:46 +0000)]
Make arm fast-isel possible to enable via command line.

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

14 years agoTry to silence a overeager GCC warning.
Benjamin Kramer [Tue, 17 Aug 2010 00:33:24 +0000 (00:33 +0000)]
Try to silence a overeager GCC warning.

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

14 years agoA round of minor cleanups for ELFObjectWriter.
Benjamin Kramer [Tue, 17 Aug 2010 00:00:46 +0000 (00:00 +0000)]
A round of minor cleanups for ELFObjectWriter.

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

14 years agoAdd a testcase for svn 111208.
Bob Wilson [Mon, 16 Aug 2010 23:44:29 +0000 (23:44 +0000)]
Add a testcase for svn 111208.

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

14 years agoFix another iterator invalidation that caused a *really* nasty miscompilation in...
Owen Anderson [Mon, 16 Aug 2010 23:42:33 +0000 (23:42 +0000)]
Fix another iterator invalidation that caused a *really* nasty miscompilation in 403.gcc.

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

14 years agoIgnore undef shuffle indices when checking for a VTRN shuffle. Radar 8290937.
Bob Wilson [Mon, 16 Aug 2010 23:37:17 +0000 (23:37 +0000)]
Ignore undef shuffle indices when checking for a VTRN shuffle.  Radar 8290937.

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

14 years agotidy up. remove unused local.
Jim Grosbach [Mon, 16 Aug 2010 23:26:09 +0000 (23:26 +0000)]
tidy up. remove unused local.

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

14 years agoSilence warnings and simplify code. Eliminate a 32/64 bit portability issue.
Benjamin Kramer [Mon, 16 Aug 2010 23:00:12 +0000 (23:00 +0000)]
Silence warnings and simplify code. Eliminate a 32/64 bit portability issue.

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

14 years agoThe plural of analysis is analyses.
Dan Gohman [Mon, 16 Aug 2010 22:57:28 +0000 (22:57 +0000)]
The plural of analysis is analyses.

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

14 years agoMake dumpPassStructure be a PMDataManager abstraction, rather than
Dan Gohman [Mon, 16 Aug 2010 22:45:12 +0000 (22:45 +0000)]
Make dumpPassStructure be a PMDataManager abstraction, rather than
a Pass abstraction, since that's the level it's actually used at.
Rename Pass' dumpPassStructure to dumpPass.

This eliminates an awkward use of getAsPass() to convert a PMDataManager*
into a Pass* just to permit a dumpPassStructure call.

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

14 years agoBetter handle alignment requirements for local objects in pre-regalloc frame
Jim Grosbach [Mon, 16 Aug 2010 22:30:41 +0000 (22:30 +0000)]
Better handle alignment requirements for local objects in pre-regalloc frame
mapping. Have the local block track its alignment requirement, and then
apply that when the block itself is allocated. Previously, offsets could
get adjusted in PEI to be different, relative to one another, than the
block allocation thought they would be, which defeats the point of doing
the allocation this way. Continuing rdar://8277890

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

14 years agoGeneralize a pattern for PKHTB: an SRL of 16-31 bits will guarantee
Bob Wilson [Mon, 16 Aug 2010 22:26:55 +0000 (22:26 +0000)]
Generalize a pattern for PKHTB: an SRL of 16-31 bits will guarantee
that the high halfword is zero.  The shift need not be exactly 16 bits.

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

14 years agoConvert test to FileCheck.
Bob Wilson [Mon, 16 Aug 2010 22:21:13 +0000 (22:21 +0000)]
Convert test to FileCheck.

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

14 years agoMake some of PMTopLevelManager's members non-public. In particular,
Dan Gohman [Mon, 16 Aug 2010 22:03:47 +0000 (22:03 +0000)]
Make some of PMTopLevelManager's members non-public. In particular,
make its constructor protected.

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

14 years agoRemove redundant inline keywords.
Dan Gohman [Mon, 16 Aug 2010 21:57:30 +0000 (21:57 +0000)]
Remove redundant inline keywords.

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

14 years agoEliminate the TopLevelManagerType enum; instead, just make
Dan Gohman [Mon, 16 Aug 2010 21:38:42 +0000 (21:38 +0000)]
Eliminate the TopLevelManagerType enum; instead, just make
PMTopLevelManager's constructor take a PMDataManager *, which already
provides the needed abstraction support.

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

14 years agoComment out some broken/unused/useless instructions which mess up disassembly.
Eli Friedman [Mon, 16 Aug 2010 21:18:51 +0000 (21:18 +0000)]
Comment out some broken/unused/useless instructions which mess up disassembly.

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

14 years agoFixes for generation of ELF relocations. Patch by Roman Divacky.
Eli Friedman [Mon, 16 Aug 2010 21:17:09 +0000 (21:17 +0000)]
Fixes for generation of ELF relocations.  Patch by Roman Divacky.

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

14 years agoDon't attempt to SimplifyShortMoveForm in 64-bit mode.
Eli Friedman [Mon, 16 Aug 2010 21:03:32 +0000 (21:03 +0000)]
Don't attempt to SimplifyShortMoveForm in 64-bit mode.

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

14 years agoUntil uleb/sleb are MC-ized, add a hack to make them work with ELF object
Eli Friedman [Mon, 16 Aug 2010 20:08:40 +0000 (20:08 +0000)]
Until uleb/sleb are MC-ized, add a hack to make them work with ELF object
emission.

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

14 years agoFix a few warnings in and detabify MCELFStreamer and ELFObjectWriter.
Eli Friedman [Mon, 16 Aug 2010 19:15:06 +0000 (19:15 +0000)]
Fix a few warnings in and detabify MCELFStreamer and ELFObjectWriter.

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

14 years agoAdd ELF ObjectWriter and Streamer support.
Matt Fleming [Mon, 16 Aug 2010 18:57:57 +0000 (18:57 +0000)]
Add ELF ObjectWriter and Streamer support.

I forgot to add these files in commit 111172.

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

14 years agoHookup ELF support for X86.
Matt Fleming [Mon, 16 Aug 2010 18:36:14 +0000 (18:36 +0000)]
Hookup ELF support for X86.

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

14 years agoAdd ELF ObjectWriter and Streamer support.
Matt Fleming [Mon, 16 Aug 2010 18:35:43 +0000 (18:35 +0000)]
Add ELF ObjectWriter and Streamer support.

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

14 years agoLayout helper function.
Matt Fleming [Mon, 16 Aug 2010 18:35:06 +0000 (18:35 +0000)]
Layout helper function.

Introduce a helper method to add a section to the end of a layout. This
will be used by the ELF ObjectWriter code to add the metadata sections
(symbol table, etc) to the end of an object file.

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

14 years agoRecord a symbol's size which is needed for ELF symbol tables.
Matt Fleming [Mon, 16 Aug 2010 18:34:31 +0000 (18:34 +0000)]
Record a symbol's size which is needed for ELF symbol tables.

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

14 years agoELF entry size support.
Matt Fleming [Mon, 16 Aug 2010 18:33:46 +0000 (18:33 +0000)]
ELF entry size support.

Some ELF sections contain fixed-sized entries. Provide a way to record
the entry size of a section.

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

14 years agoRename sat_shift operand to shift_imm, in preparation for using it for other
Bob Wilson [Mon, 16 Aug 2010 18:27:34 +0000 (18:27 +0000)]
Rename sat_shift operand to shift_imm, in preparation for using it for other
instructions besides saturate instructions.  No functional changes.

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

14 years agoPartially revert r111155. It looks like MSVC is calling an operator<() that
Jakob Stoklund Olesen [Mon, 16 Aug 2010 18:24:54 +0000 (18:24 +0000)]
Partially revert r111155. It looks like MSVC is calling an operator<() that
clang says is unused.

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

14 years agotrack local frame size in MFI, not local to the pass, since PEI needs it.
Jim Grosbach [Mon, 16 Aug 2010 18:06:15 +0000 (18:06 +0000)]
track local frame size in MFI, not local to the pass, since PEI needs it.

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

14 years agoRevert r111031. The way LLVM defines loop invariance, the property of an
Dan Gohman [Mon, 16 Aug 2010 17:34:25 +0000 (17:34 +0000)]
Revert r111031. The way LLVM defines loop invariance, the property of an
expression being loop invariant is not equivalent to the property of
properly dominating the loop header.

Other optimizations have also made this optimization less important.

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

14 years agoRemove unused functions.
Jakob Stoklund Olesen [Mon, 16 Aug 2010 17:18:20 +0000 (17:18 +0000)]
Remove unused functions.

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

14 years agoRemove unused functions.
Jakob Stoklund Olesen [Mon, 16 Aug 2010 17:18:18 +0000 (17:18 +0000)]
Remove unused functions.

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