1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

69103 Commits

Author SHA1 Message Date
Devang Patel
8e59113036 Speculatively revert r123384 to make llvm-gcc-i386-linux-selfhost buildbot happy.
llvm-svn: 123389
2011-01-13 19:27:50 +00:00
Oscar Fuentes
9618cded65 Add some platform tests.
Patch by arrowdodger!

llvm-svn: 123388
2011-01-13 19:17:28 +00:00
Jim Grosbach
767dfbf685 When updating a tSpill/tRestore instruction to be a tSTRr/tLDRr, correctly
set up the source operands. The original instr has an immediate operand that
should be replaced with the frame reg operand rather than just adding the
reg operand. Previously, the instruction ended up with too many operands
causing an assert() when adding the default predicate. rdar://8825456

llvm-svn: 123387
2011-01-13 19:16:48 +00:00
Jakob Stoklund Olesen
6aa35206e7 Teach MachineBasicBlock::getFirstTerminator to ignore debug values.
It will still return an iterator that points to the first terminator or end(),
but there may be DBG_VALUE instructions following the first terminator.

llvm-svn: 123384
2011-01-13 18:41:05 +00:00
Bob Wilson
fbab825516 Check for empty structs, and for consistency, zero-element arrays.
llvm-svn: 123383
2011-01-13 18:26:59 +00:00
Bob Wilson
3b0197489e Extend SROA to handle arrays accessed as homogeneous structs and vice versa.
This is a minor extension of SROA to handle a special case that is
important for some ARM NEON operations.  Some of the NEON intrinsics
return multiple values, which are handled as struct types containing
multiple elements of the same vector type.  The corresponding return
types declared in the arm_neon.h header have equivalent arrays.  We
need SROA to recognize that it can split up those arrays and structs
into separate vectors, even though they are not always accessed with
the same type.  SROA already handles loads and stores of an entire
alloca by using insertvalue/extractvalue to access the individual
pieces, and that code works the same regardless of whether the type
is a struct or an array.  So, all that needs to be done is to check
for compatible arrays and homogeneous structs.

llvm-svn: 123381
2011-01-13 17:45:11 +00:00
Bob Wilson
9f8d730f9b Make SROA more aggressive with allocas containing padding.
SROA only split up structs and arrays one level at a time, so padding can
only cause trouble if it is located in between the struct or array elements.

llvm-svn: 123380
2011-01-13 17:45:08 +00:00
Oscar Fuentes
8d5e1d912b Disable RTTI when building unit tests. This avoids errors at link time.
llvm-svn: 123377
2011-01-13 15:31:45 +00:00
Oscar Fuentes
f975a7423b Platform tests for argz_* functions.
Patch by arrowdodger!

llvm-svn: 123376
2011-01-13 15:06:32 +00:00
Duncan Sands
69fbfa2b0e Remove some wrong code which fortunately was never executed (as explained in
the comment I added): an extern weak global may have a null address.

llvm-svn: 123373
2011-01-13 10:43:08 +00:00
Duncan Sands
36b007d63b The most common simplification missed by instsimplify in unoptimized bitcode
is "X != 0 -> X" when X is a boolean.  This occurs a lot because of the way
llvm-gcc converts gcc's conditional expressions.  Add this, and a few other
similar transforms for completeness.

llvm-svn: 123372
2011-01-13 08:56:29 +00:00
Evan Cheng
cc474b4864 Model :upper16: and :lower16: as ARM specific MCTargetExpr. This is a step
in the right direction. It eliminated some hacks and will unblock codegen
work. But it's far from being done. It doesn't reject illegal expressions,
e.g. (FOO - :lower16:BAR). It also doesn't work in Thumb2 mode at all.

llvm-svn: 123369
2011-01-13 07:58:56 +00:00
Eric Christopher
3821f63f4b Experiment with changing the default 32-bit linux stack alignment to
16 bytes for PR8969. Update all testcases accordingly.

llvm-svn: 123367
2011-01-13 06:47:10 +00:00
Rafael Espindola
0272c002ae Keep unnamed_addr when linking.
llvm-svn: 123364
2011-01-13 05:12:34 +00:00
Rafael Espindola
f6cae95276 Reject uses of unnamed_addr in declarations.
llvm-svn: 123358
2011-01-13 01:30:30 +00:00
Kevin Enderby
1f82daa2d8 Add a FIXME and two asserts for now in the ARMAsmParser when it sees .code 16 or
.code 32 if the TargetMachine's isThumb() boolean does not match.  The correct
fix is to switch ARM subtargets at that point and is tracked by rdar://8856789
which is bigger task.

llvm-svn: 123353
2011-01-13 01:07:01 +00:00
Dan Gohman
f4ec824435 Fix r123346 to handle scalar types too.
llvm-svn: 123352
2011-01-13 01:06:51 +00:00
Jakob Stoklund Olesen
6cdcc6287b Add missing space in debug output
llvm-svn: 123351
2011-01-13 00:57:35 +00:00
Jason W Kim
af9782e470 Change call to Error() to assert()
llvm-svn: 123350
2011-01-13 00:27:00 +00:00
Jason W Kim
3b5ac1631f Style clean up - break up the breaks.
llvm-svn: 123347
2011-01-13 00:07:51 +00:00
Dan Gohman
5bbd766a7b Apply the patch from PR8958, which allows llc to get slightly
further on the associated testcase before aborting.

llvm-svn: 123346
2011-01-12 23:56:26 +00:00
Michael J. Spencer
b9cf8adbe7 Support/Path: Deprecate PathV1::IsSymlink and replace all uses with PathV2::is_symlink.
llvm-svn: 123345
2011-01-12 23:55:06 +00:00
Jakob Stoklund Olesen
3987889b61 Try again enabling LiveDebugVariables.
llvm-svn: 123342
2011-01-12 23:36:21 +00:00
Jason W Kim
5c1d7cc0ca Added clarifying comment
llvm-svn: 123341
2011-01-12 23:25:02 +00:00
Jason W Kim
6464be5b92 JimG sez: "The value-kinds look like masks, but they're not consistently used
that way, unfortunately. If you want to change them to work additively instead
of a one-variant-kind-per-symbolref, that's great and I completely agree it's
worth doing, but it really should be a separate patch. Until then, this isn't
correct."

So I am reverting this bit until a more opportune time.

llvm-svn: 123340
2011-01-12 23:21:49 +00:00
Jakob Stoklund Olesen
953b1b115d Don't emit a DBG_VALUE for a spill slot that the rewriter decided not to use after all.
llvm-svn: 123339
2011-01-12 23:14:07 +00:00
Jakob Stoklund Olesen
48c7a5cf7e Fix braino in dominator tree walk.
llvm-svn: 123338
2011-01-12 23:14:04 +00:00
Jakob Stoklund Olesen
7a13190a2e Sometimes, old virtual registers can linger on DBG_VALUE instructions.
Make sure we don't crash in that case, but simply turn them into %noreg instead.

llvm-svn: 123335
2011-01-12 22:37:49 +00:00
Jakob Stoklund Olesen
59d3b89873 Teach VirtRegRewriter to update slot indexes when erasing instructions.
It was leaving dangling pointers in the slot index maps.

llvm-svn: 123334
2011-01-12 22:28:51 +00:00
Jakob Stoklund Olesen
8c5c268f05 Annotate VirtRegRewriter debug output with slot indexes.
llvm-svn: 123333
2011-01-12 22:28:48 +00:00
Jakob Stoklund Olesen
c1a042a528 Verify slot index ordering.
The slot indexes must be monotonically increasing through the function.

llvm-svn: 123324
2011-01-12 21:27:48 +00:00
Jakob Stoklund Olesen
22bdcea2fd Assert if anybody tries to put a slot index on a DBG_VALUE instruction.
llvm-svn: 123323
2011-01-12 21:27:45 +00:00
Jakob Stoklund Olesen
764cce86f0 Verify that machine instruction parent pointers are consistent.
llvm-svn: 123322
2011-01-12 21:27:41 +00:00
Bill Wendling
e82361731d Sort the register list based on the *actual* register numbers rather than the
enum values we give to them. <rdar://problem/8823730>

llvm-svn: 123321
2011-01-12 21:20:59 +00:00
Devang Patel
52db9b4821 Use SmallVector instead of SmallPtrSet and avoid non-deterministic behavior.
llvm-svn: 123318
2011-01-12 19:12:45 +00:00
Matt Beaumont-Gay
fc76b0ce6e Mostly undo r123297, but move the default case in EvaluateAsPCRel to the top
of the switch block to appease GCC.

llvm-svn: 123317
2011-01-12 18:02:55 +00:00
Nick Lewycky
fb3f7c11f1 Add another note taken from the gcc bugzilla.
llvm-svn: 123315
2011-01-12 09:06:19 +00:00
Venkatraman Govindaraju
2d89fea217 Implement RETURNADDR and FRAMEADDR lowering in SPARC backend.
llvm-svn: 123310
2011-01-12 05:08:36 +00:00
Venkatraman Govindaraju
59e9ffc998 Remove SPARC backend getpcx instruction's Uses. Also, insert an assert to
ensure %o7 is not assigned as the destination of getpcx instruction.

llvm-svn: 123304
2011-01-12 03:52:59 +00:00
Chris Lattner
fdef60bef7 revert 123144, reenabling the rest of memset formation.
llvm-svn: 123302
2011-01-12 03:25:15 +00:00
Venkatraman Govindaraju
816f7dfed0 Fix SPARC backend call instruction so that arguments passed through registers
are correctly marked as used instead of passing all possible argument registers
as used.  

llvm-svn: 123301
2011-01-12 03:18:21 +00:00
Chris Lattner
e288204194 revert r123146 which disabled code that wasn't the root cause
of the bootstrap miscompare issue.

llvm-svn: 123299
2011-01-12 01:52:23 +00:00
Chris Lattner
c7a5a12af5 revert r123149, reenabling an improvement to memcpyopt that wasn't
the source of the bootstrap problem.

llvm-svn: 123298
2011-01-12 01:43:46 +00:00
Matt Beaumont-Gay
033b288e84 Prefer llvm_unreachable to assert(0)
llvm-svn: 123297
2011-01-12 01:42:42 +00:00
Jason W Kim
ae183f9862 1. Support ELF pcrel relocations for movw/movt:
R_ARM_MOVT_PREL and R_ARM_MOVW_PREL_NC.
2. Fix minor bug in ARMAsmPrinter - treat bitfield flag as a bitfield, not an enum.
3. Add support for 3 new elf section types (no-ops)

llvm-svn: 123294
2011-01-12 00:19:25 +00:00
Jason W Kim
db6eddeea3 Workaround for bug 8721.
.s Test added.

llvm-svn: 123292
2011-01-11 23:53:41 +00:00
Jakob Stoklund Olesen
1f7052b53b The world is not ready for LiveDebugVariables yet.
llvm-svn: 123290
2011-01-11 23:20:33 +00:00
Jakob Stoklund Olesen
b935aa1678 Remove the PR8954 workaround.
llvm-svn: 123288
2011-01-11 22:56:41 +00:00
Jakob Stoklund Olesen
37fe53c1a9 Fix a non-deterministic loop in llvm::MergeBlockIntoPredecessor.
DT->changeImmediateDominator() trivially ignores identity updates, so there is
really no need for the uniqueing provided by SmallPtrSet.

I expect this to fix PR8954.

llvm-svn: 123286
2011-01-11 22:54:38 +00:00
Jakob Stoklund Olesen
d7a523358c Enable LiveDebugVariables by default.
llvm-svn: 123282
2011-01-11 22:45:28 +00:00