1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

63554 Commits

Author SHA1 Message Date
Chris Lattner
c27b10f80d 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.

llvm-svn: 111332
2010-08-18 00:11:25 +00:00
Chris Lattner
982a804b20 fix a broken link
llvm-svn: 111326
2010-08-17 23:26:04 +00:00
Chris Lattner
116d5c1431 include config.h to get config params, hopefully unbreaking mingw builder.
llvm-svn: 111325
2010-08-17 23:22:10 +00:00
Chris Lattner
1657977d0d 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.

llvm-svn: 111321
2010-08-17 23:11:56 +00:00
Chris Lattner
659fd704e8 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

llvm-svn: 111320
2010-08-17 23:03:53 +00:00
Eric Christopher
08e9f0250a Temporarily revert r110987 as it's causing some miscompares in
vector heavy code.  I'll re-enable when we've tracked down the problem.

llvm-svn: 111318
2010-08-17 22:55:27 +00:00
Dan Gohman
ee89338e37 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.

llvm-svn: 111317
2010-08-17 22:50:37 +00:00
Jim Grosbach
ff8f931bbf 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.

llvm-svn: 111315
2010-08-17 22:41:55 +00:00
Evan Cheng
d6348fe9b2 Add nounwind.
llvm-svn: 111312
2010-08-17 22:35:20 +00:00
Daniel Dunbar
e88f283f80 CrashRecovery: Clear the current context on the first crash, to avoid re-entering it if the cleanup code crashes.
llvm-svn: 111309
2010-08-17 22:32:39 +00:00
Daniel Dunbar
b5312b0f26 CrashRecovery: Add CrashRecoveryContext::GetCurrent(), so clients can find the active context from anywhere.
llvm-svn: 111308
2010-08-17 22:32:37 +00:00
Daniel Dunbar
0fc35d7284 CrashRecovery: Make CrashRecoveryContext static methods thread safe.
llvm-svn: 111307
2010-08-17 22:32:34 +00:00
Dale Johannesen
535ca58e85 Make fast scheduler handle asm clobbers correctly.
PR 7882.  Follows suggestion by Amaury Pouly, thanks.

llvm-svn: 111306
2010-08-17 22:17:24 +00:00
Anton Korobeynikov
52c8ecf231 Revert part of one of the prev. patches - tailjmp will follow later.
llvm-svn: 111291
2010-08-17 21:08:28 +00:00
Anton Korobeynikov
f0600e9e8a 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!

llvm-svn: 111289
2010-08-17 21:06:07 +00:00
Anton Korobeynikov
f1f88db4fd Enable more win64 calls folding opportunities.
Patch by Cameron Esfahani!

llvm-svn: 111288
2010-08-17 21:06:01 +00:00
Anton Korobeynikov
8c6bfd1c24 Add some win64 coff goodness.
Patch by Cameron Esfahani!

llvm-svn: 111287
2010-08-17 21:05:54 +00:00
Evan Cheng
aea9870136 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.
llvm-svn: 111285
2010-08-17 21:00:37 +00:00
Evan Cheng
4cbb884ce2 Machine CSE preserves CFG. Pass manager was freeing machineloopinfo after machine cse before.
llvm-svn: 111281
2010-08-17 20:57:42 +00:00
Jakob Stoklund Olesen
20dbe1681b Don't call tablegen'ed Predicate_* functions in the ARM target.
llvm-svn: 111277
2010-08-17 20:39:04 +00:00
Jim Grosbach
23003dc92f silence warning
llvm-svn: 111274
2010-08-17 20:21:30 +00:00
Benjamin Kramer
5756afebba Remove dead code. Fixes a GCC warning.
llvm-svn: 111271
2010-08-17 19:45:05 +00:00
Anton Korobeynikov
16dd681b0e This patch enables "make unittests" on enable-shared/mingw.
Patch by Takumi Nakamura!

llvm-svn: 111270
2010-08-17 19:34:40 +00:00
Anton Korobeynikov
e8b4df4143 This patch enables ENABLE_SHARED=1 to build DLL based LLVM toolchain on MingW & Cygwin.
Patch by Takumi Nakamura!

llvm-svn: 111268
2010-08-17 19:03:03 +00:00
Jim Grosbach
1d9631950f 80 column cleanup.
llvm-svn: 111266
2010-08-17 18:39:16 +00:00
Benjamin Kramer
1e37b165c8 Sketch i386 relocations handling, from Roman Divacky.
Hello world builds & runs now on i386/ELF with -integrated-as.

llvm-svn: 111264
2010-08-17 18:20:28 +00:00
Jakob Stoklund Olesen
74db02758b 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.

llvm-svn: 111263
2010-08-17 18:17:12 +00:00
Jim Grosbach
4597437c58 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

llvm-svn: 111262
2010-08-17 18:13:53 +00:00
Jim Grosbach
b321adf3af explicitly handle no-op cases for clarity. Fixes clang warning.
llvm-svn: 111260
2010-08-17 18:00:41 +00:00
Benjamin Kramer
3bc7de0605 Use the correct entry size for relocation entries, from Roman Divacky.
llvm-svn: 111259
2010-08-17 17:56:13 +00:00
Evan Cheng
4223d274ca 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.
llvm-svn: 111256
2010-08-17 17:43:50 +00:00
Dan Gohman
e26025ddd0 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.

llvm-svn: 111255
2010-08-17 17:39:21 +00:00
Jim Grosbach
4cf3acbde6 remove trailing whitespace
llvm-svn: 111254
2010-08-17 17:37:22 +00:00
Benjamin Kramer
cc741eccfa Differentiate between RELA and REL relocations, from Roman Divacky.
llvm-svn: 111252
2010-08-17 17:30:07 +00:00
Bob Wilson
e382fce916 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.

llvm-svn: 111251
2010-08-17 17:23:19 +00:00
Evan Cheng
677a57e76a Fix debug message.
llvm-svn: 111250
2010-08-17 17:15:14 +00:00
Chris Lattner
c61aa15b46 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.

llvm-svn: 111249
2010-08-17 17:13:42 +00:00
Dan Gohman
aec27f6889 Use the getUniquePredecessor() utility function, instead of doing
what it does manually.

llvm-svn: 111248
2010-08-17 17:07:02 +00:00
Benjamin Kramer
2bf444b7d4 One baby step towards i386 ELF, from Roman Divacky.
llvm-svn: 111247
2010-08-17 17:02:29 +00:00
Chris Lattner
a556264e06 fix emacs language spec's, patch by Edmund Grimley-Evans!
llvm-svn: 111241
2010-08-17 16:20:04 +00:00
Nick Lewycky
510dd18c6f When creating a JIT, try to load the program so that we can resolve symbols
against it. This affects Windows.

llvm-svn: 111240
2010-08-17 16:19:18 +00:00
Benjamin Kramer
3a071817da Revert r111230, we have to find a better place for the host-specific code.
llvm-svn: 111232
2010-08-17 15:50:23 +00:00
Chris Lattner
f403684a4d Fix failure of unittests/ExecutionEngine/JIT/MultiJITTest.cpp on
cygwin when built with ENABLE_SHARED=1.  Patch by NAKAMURA Takumi!

llvm-svn: 111231
2010-08-17 15:42:43 +00:00
Benjamin Kramer
387a736204 Micro-optimize MCObjectWriter to do a byteswap if necessary and then write the
whole integer to the stream instead of doing byte-sized writes.

llvm-svn: 111230
2010-08-17 13:55:45 +00:00
Benjamin Kramer
1b8bcfbc98 There is this new "LLVM" compiler that supports __builtin_bswap but thinks it's gcc 4.2.
llvm-svn: 111228
2010-08-17 11:45:38 +00:00
Bob Wilson
6239dc42c6 Allow more cases of undef shuffle indices and add tests for them.
llvm-svn: 111226
2010-08-17 05:54:34 +00:00
Evan Cheng
908b65c371 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.
llvm-svn: 111224
2010-08-17 01:34:49 +00:00
Eric Christopher
2bf87a1c77 Fix typo.
llvm-svn: 111223
2010-08-17 01:30:33 +00:00
Eric Christopher
9a8050c4e1 Copy over some overridden MI wrappers for ARM fast-isel. This is where
we're adding predicates and optional defs to the MachineInstrs.

llvm-svn: 111222
2010-08-17 01:25:29 +00:00
Evan Cheng
0163d059e4 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

llvm-svn: 111221
2010-08-17 01:20:36 +00:00