oota-llvm.git
13 years agoRename this test.
Duncan Sands [Fri, 14 Jan 2011 14:16:33 +0000 (14:16 +0000)]
Rename this test.

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

13 years agoswitch the second scalarrepl pass to use SSAUpdater. We run two scalarrepl passes...
Chris Lattner [Fri, 14 Jan 2011 08:21:08 +0000 (08:21 +0000)]
switch the second scalarrepl pass to use SSAUpdater.  We run two scalarrepl passes: one
early in the cleanup code and one late interlaced with the inliner.  The second one is
important because inlining and other scalar optzns can unpin allocas, allowing them to
be split up and promoted.  While important for performance, this is also relatively
rare, and we would previously force a (non-lazy) computation of DomFrontiers, which
happened even if nothing became unpinned.

With this patch, the first pass of scalarrepl still promotes the vast bulk of allocas
in programs, but hte second pass has changed to use SSAUpdater, which is more "sparse"
and lazy.  This speeds up opt -O3 time on kimwitu++ (a c++ app) by about 1%.  The
numbers are interesting: the first pass promotes ~17500 allocas.  The second pass
promotes about 1600.  For non-C++ codes, the compile time win should be greater,
because the second pass of scalarrepl does less.

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

13 years agosplit SROA into two passes: one that uses DomFrontiers (-scalarrepl)
Chris Lattner [Fri, 14 Jan 2011 08:13:00 +0000 (08:13 +0000)]
split SROA into two passes: one that uses DomFrontiers (-scalarrepl)
and one that uses SSAUpdater (-scalarrepl-ssa)

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

13 years agoRemove casts between Value** and Constant**, which won't work if a
Jay Foad [Fri, 14 Jan 2011 08:07:43 +0000 (08:07 +0000)]
Remove casts between Value** and Constant**, which won't work if a
static_cast from Constant* to Value* has to adjust the "this" pointer.
This is groundwork for PR889.

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

13 years agoImplement full support for promoting allocas to registers using SSAUpdater
Chris Lattner [Fri, 14 Jan 2011 07:50:47 +0000 (07:50 +0000)]
Implement full support for promoting allocas to registers using SSAUpdater
instead of DomTree/DomFrontier.  This may be interesting for reducing compile
time.  This is currently disabled, but seems to work just fine.

When this is enabled, we eliminate two runs of dominator frontier, one in the
"early per-function" optimizations and one in the "interlaced with inliner"
function passes.

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

13 years agorelax testcase a bit.
Chris Lattner [Fri, 14 Jan 2011 07:46:33 +0000 (07:46 +0000)]
relax testcase a bit.

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

13 years agoTry for the third time to teach getFirstTerminator() about debug values.
Jakob Stoklund Olesen [Fri, 14 Jan 2011 06:33:45 +0000 (06:33 +0000)]
Try for the third time to teach getFirstTerminator() about debug values.

This time let's rephrase to trick gcc-4.3 into not miscompiling.

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

13 years agorevert my fastisel patch again which apparently still gives the
Chris Lattner [Fri, 14 Jan 2011 06:14:33 +0000 (06:14 +0000)]
revert my fastisel patch again which apparently still gives the
llvm-gcc-i386-linux-selfhost buildbot heartburn...

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

13 years agoreapply r123414 now that the botz are calmed down and the fix is already in.
Chris Lattner [Fri, 14 Jan 2011 04:24:28 +0000 (04:24 +0000)]
reapply r123414 now that the botz are calmed down and the fix is already in.

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

13 years agoindentation
Chris Lattner [Fri, 14 Jan 2011 04:23:53 +0000 (04:23 +0000)]
indentation

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

13 years agoCompleted :lower16: / :upper16: support for movw / movt pairs on Darwin.
Evan Cheng [Fri, 14 Jan 2011 02:38:49 +0000 (02:38 +0000)]
Completed :lower16: / :upper16: support for movw / movt pairs on Darwin.
- Fixed :upper16: fix up routine. It should be shifting down the top 16 bits first.
- Added support for Thumb2 :lower16: and :upper16: fix up.
- Added :upper16: and :lower16: relocation support to mach-o object writer.

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

13 years agoRevert r123419. It still breaks llvm-gcc-i386-linux-selfhost.
Jakob Stoklund Olesen [Fri, 14 Jan 2011 02:12:54 +0000 (02:12 +0000)]
Revert r123419. It still breaks llvm-gcc-i386-linux-selfhost.

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

13 years agor123414 broke llvm-gcc bootstrap apparently, revert
Chris Lattner [Fri, 14 Jan 2011 02:07:32 +0000 (02:07 +0000)]
r123414 broke llvm-gcc bootstrap apparently, revert

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

13 years agoSet the insertion point correctly for instructions generated by load folding:
Chris Lattner [Fri, 14 Jan 2011 01:33:40 +0000 (01:33 +0000)]
Set the insertion point correctly for instructions generated by load folding:
they should go *before* the new instruction not after it.

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

13 years agoTry again to teach getFirstTerminator() about debug values.
Jakob Stoklund Olesen [Fri, 14 Jan 2011 01:17:53 +0000 (01:17 +0000)]
Try again to teach getFirstTerminator() about debug values.

Fix some callers to better deal with debug values.

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

13 years agoRather than doing early instcombine, try doing early CSE instead. This should still...
Owen Anderson [Fri, 14 Jan 2011 00:41:11 +0000 (00:41 +0000)]
Rather than doing early instcombine, try doing early CSE instead.  This should still handle
most important simplifications, as well as resolving phase ordering issues where instcombine
would inhibit important CSE'ing opportunities, for instance on BitBench/drop3.

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

13 years agoMove some shift transforms out of instcombine and into InstructionSimplify.
Duncan Sands [Fri, 14 Jan 2011 00:37:45 +0000 (00:37 +0000)]
Move some shift transforms out of instcombine and into InstructionSimplify.
While there, I noticed that the transform "undef >>a X -> undef" was wrong.
For example if X is 2 then the top two bits must be equal, so the result can
not be anything.  I fixed this in the constant folder as well.  Also, I made
the transform for "X << undef" stronger: it now folds to undef always, even
though X might be zero.  This is in accordance with the LangRef, but I must
admit that it is fairly aggressive.  Also, I added "i32 X << 32 -> undef"
following the LangRef and the constant folder, likewise fairly aggressive.

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

13 years agoDon't bother conditionalizing the use of SROA in -O1 mode. We're already running...
Owen Anderson [Fri, 14 Jan 2011 00:36:40 +0000 (00:36 +0000)]
Don't bother conditionalizing the use of SROA in -O1 mode.  We're already running it unconditionally
later in the pipeline.

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

13 years agofix PR8961 - a fast isel miscompilation where we'd insert a new instruction
Chris Lattner [Fri, 14 Jan 2011 00:01:01 +0000 (00:01 +0000)]
fix PR8961 - a fast isel miscompilation where we'd insert a new instruction
after sext's generated for addressing that got folded.  Previously we compiled
test5 into:

_test5:                                 ## @test5
## BB#0:
        movq    -8(%rsp), %rax          ## 8-byte Reload
        movq    (%rdi,%rax), %rdi
        addq    %rdx, %rdi
        movslq  %esi, %rax
        movq    %rax, -8(%rsp)          ## 8-byte Spill
        movq    %rdi, %rax
        ret

which is insane and wrong.  Now we produce:

_test5:                                 ## @test5
## BB#0:
movslq %esi, %rax
movq (%rdi,%rax), %rax
addq %rdx, %rax
ret

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

13 years agoBetter terminator avoidance.
Jakob Stoklund Olesen [Thu, 13 Jan 2011 23:35:53 +0000 (23:35 +0000)]
Better terminator avoidance.

This approach also works when the terminator doesn't have a slot index. (Which
can happen??)

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

13 years agoAdd comment about Thumb2 fixup comments being completely bogus.
Evan Cheng [Thu, 13 Jan 2011 23:27:39 +0000 (23:27 +0000)]
Add comment about Thumb2 fixup comments being completely bogus.

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

13 years agoAdd single entry / single exit accessors.
Tobias Grosser [Thu, 13 Jan 2011 23:18:04 +0000 (23:18 +0000)]
Add single entry / single exit accessors.

Add methods for accessing the (single) entry / exit edge of a region. If no such
edge exists, null is returned.  Both accessors return the start block of the
corresponding edge. The edge can finally be formed by utilizing
Region::getEntry() or Region::getExit();

Contributed by: Andreas Simbuerger <simbuerg@fim.uni-passau.de>

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

13 years agoRecognize alternative register names like ip -> r12.
Owen Anderson [Thu, 13 Jan 2011 22:50:36 +0000 (22:50 +0000)]
Recognize alternative register names like ip -> r12.
Fixes <rdar://problem/8857982>.

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

13 years agoFix a few more places that should use MBB::getLastNonDebugInstr().
Jakob Stoklund Olesen [Thu, 13 Jan 2011 22:47:43 +0000 (22:47 +0000)]
Fix a few more places that should use MBB::getLastNonDebugInstr().

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

13 years agoAs far as I can tell, unified syntax uses c0-c15 instead of cr0-cr15 for mcr and...
Owen Anderson [Thu, 13 Jan 2011 22:38:16 +0000 (22:38 +0000)]
As far as I can tell, unified syntax uses c0-c15 instead of cr0-cr15 for mcr and friends.

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

13 years agotypo
Chris Lattner [Thu, 13 Jan 2011 22:11:56 +0000 (22:11 +0000)]
typo

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

13 years agomemcpy + metadata = bliss :)
Chris Lattner [Thu, 13 Jan 2011 22:08:15 +0000 (22:08 +0000)]
memcpy + metadata = bliss :)

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

13 years agoAdd support to the ARM MC infrastructure to support mcr and friends. This requires...
Owen Anderson [Thu, 13 Jan 2011 21:46:02 +0000 (21:46 +0000)]
Add support to the ARM MC infrastructure to support mcr and friends. This requires supporting
the symbolic immediate names used for these instructions, fixing their pretty-printers, and
adding proper encoding information for them.

With this, we can properly pretty-print and encode assembly like:
mrc p15, #0, r3, c13, c0, #3

Fixes <rdar://problem/8857858>.

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

13 years agoRelax an assertion. On archs like ARM, an immediate field may be scattered. So it...
Evan Cheng [Thu, 13 Jan 2011 21:45:26 +0000 (21:45 +0000)]
Relax an assertion. On archs like ARM, an immediate field may be scattered. So it's possible for some bits of every 8 bits to be encoded already, and the rest still needs to be fixed up.

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

13 years agoTemporary workaround for an i386 crash in LiveDebugVariables.
Jakob Stoklund Olesen [Thu, 13 Jan 2011 21:28:55 +0000 (21:28 +0000)]
Temporary workaround for an i386 crash in LiveDebugVariables.

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

13 years agoTeach frame lowering to ignore debug values after the terminators.
Jakob Stoklund Olesen [Thu, 13 Jan 2011 21:28:52 +0000 (21:28 +0000)]
Teach frame lowering to ignore debug values after the terminators.

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

13 years agoTidy comments, indentation, and 80-column violations.
Bob Wilson [Thu, 13 Jan 2011 21:10:12 +0000 (21:10 +0000)]
Tidy comments, indentation, and 80-column violations.

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

13 years agoFix whitespace.
Bob Wilson [Thu, 13 Jan 2011 20:59:44 +0000 (20:59 +0000)]
Fix whitespace.

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

13 years agoFix ARMAsmParser::ParseOperand() to allow it to parse . as a branch target and
Kevin Enderby [Thu, 13 Jan 2011 20:32:36 +0000 (20:32 +0000)]
Fix ARMAsmParser::ParseOperand() to allow it to parse . as a branch target and
directional local labels like 1f and 2b.

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

13 years agoLittle help to debug the bugpoint itself.
Devang Patel [Thu, 13 Jan 2011 19:48:54 +0000 (19:48 +0000)]
Little help to debug the bugpoint itself.
Patch by Bob Wilson.

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

13 years agoSpeculatively revert r123384 to make llvm-gcc-i386-linux-selfhost buildbot happy.
Devang Patel [Thu, 13 Jan 2011 19:27:50 +0000 (19:27 +0000)]
Speculatively revert r123384  to make llvm-gcc-i386-linux-selfhost buildbot happy.

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

13 years agoAdd some platform tests.
Oscar Fuentes [Thu, 13 Jan 2011 19:17:28 +0000 (19:17 +0000)]
Add some platform tests.

Patch by arrowdodger!

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

13 years agoWhen updating a tSpill/tRestore instruction to be a tSTRr/tLDRr, correctly
Jim Grosbach [Thu, 13 Jan 2011 19:16:48 +0000 (19:16 +0000)]
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

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

13 years agoTeach MachineBasicBlock::getFirstTerminator to ignore debug values.
Jakob Stoklund Olesen [Thu, 13 Jan 2011 18:41:05 +0000 (18:41 +0000)]
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.

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

13 years agoCheck for empty structs, and for consistency, zero-element arrays.
Bob Wilson [Thu, 13 Jan 2011 18:26:59 +0000 (18:26 +0000)]
Check for empty structs, and for consistency, zero-element arrays.

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

13 years agoExtend SROA to handle arrays accessed as homogeneous structs and vice versa.
Bob Wilson [Thu, 13 Jan 2011 17:45:11 +0000 (17:45 +0000)]
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.

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

13 years agoMake SROA more aggressive with allocas containing padding.
Bob Wilson [Thu, 13 Jan 2011 17:45:08 +0000 (17:45 +0000)]
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.

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

13 years agoDisable RTTI when building unit tests. This avoids errors at link time.
Oscar Fuentes [Thu, 13 Jan 2011 15:31:45 +0000 (15:31 +0000)]
Disable RTTI when building unit tests. This avoids errors at link time.

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

13 years agoPlatform tests for argz_* functions.
Oscar Fuentes [Thu, 13 Jan 2011 15:06:32 +0000 (15:06 +0000)]
Platform tests for argz_* functions.

Patch by arrowdodger!

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

13 years agoRemove some wrong code which fortunately was never executed (as explained in
Duncan Sands [Thu, 13 Jan 2011 10:43:08 +0000 (10:43 +0000)]
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.

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

13 years agoThe most common simplification missed by instsimplify in unoptimized bitcode
Duncan Sands [Thu, 13 Jan 2011 08:56:29 +0000 (08:56 +0000)]
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.

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

13 years agoModel :upper16: and :lower16: as ARM specific MCTargetExpr. This is a step
Evan Cheng [Thu, 13 Jan 2011 07:58:56 +0000 (07:58 +0000)]
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.

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

13 years agoExperiment with changing the default 32-bit linux stack alignment to
Eric Christopher [Thu, 13 Jan 2011 06:47:10 +0000 (06:47 +0000)]
Experiment with changing the default 32-bit linux stack alignment to
16 bytes for PR8969. Update all testcases accordingly.

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

13 years agoKeep unnamed_addr when linking.
Rafael Espindola [Thu, 13 Jan 2011 05:12:34 +0000 (05:12 +0000)]
Keep unnamed_addr when linking.

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

13 years agoReject uses of unnamed_addr in declarations.
Rafael Espindola [Thu, 13 Jan 2011 01:30:30 +0000 (01:30 +0000)]
Reject uses of unnamed_addr in declarations.

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

13 years agoAdd a FIXME and two asserts for now in the ARMAsmParser when it sees .code 16 or
Kevin Enderby [Thu, 13 Jan 2011 01:07:01 +0000 (01:07 +0000)]
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.

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

13 years agoFix r123346 to handle scalar types too.
Dan Gohman [Thu, 13 Jan 2011 01:06:51 +0000 (01:06 +0000)]
Fix r123346 to handle scalar types too.

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

13 years agoAdd missing space in debug output
Jakob Stoklund Olesen [Thu, 13 Jan 2011 00:57:35 +0000 (00:57 +0000)]
Add missing space in debug output

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

13 years agoChange call to Error() to assert()
Jason W Kim [Thu, 13 Jan 2011 00:27:00 +0000 (00:27 +0000)]
Change call to Error() to assert()

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

13 years agoStyle clean up - break up the breaks.
Jason W Kim [Thu, 13 Jan 2011 00:07:51 +0000 (00:07 +0000)]
Style clean up - break up the breaks.

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

13 years agoApply the patch from PR8958, which allows llc to get slightly
Dan Gohman [Wed, 12 Jan 2011 23:56:26 +0000 (23:56 +0000)]
Apply the patch from PR8958, which allows llc to get slightly
further on the associated testcase before aborting.

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

13 years agoSupport/Path: Deprecate PathV1::IsSymlink and replace all uses with PathV2::is_symlink.
Michael J. Spencer [Wed, 12 Jan 2011 23:55:06 +0000 (23:55 +0000)]
Support/Path: Deprecate PathV1::IsSymlink and replace all uses with PathV2::is_symlink.

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

13 years agoTry again enabling LiveDebugVariables.
Jakob Stoklund Olesen [Wed, 12 Jan 2011 23:36:21 +0000 (23:36 +0000)]
Try again enabling LiveDebugVariables.

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

13 years agoAdded clarifying comment
Jason W Kim [Wed, 12 Jan 2011 23:25:02 +0000 (23:25 +0000)]
Added clarifying comment

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

13 years agoJimG sez: "The value-kinds look like masks, but they're not consistently used
Jason W Kim [Wed, 12 Jan 2011 23:21:49 +0000 (23:21 +0000)]
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.

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

13 years agoDon't emit a DBG_VALUE for a spill slot that the rewriter decided not to use after...
Jakob Stoklund Olesen [Wed, 12 Jan 2011 23:14:07 +0000 (23:14 +0000)]
Don't emit a DBG_VALUE for a spill slot that the rewriter decided not to use after all.

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

13 years agoFix braino in dominator tree walk.
Jakob Stoklund Olesen [Wed, 12 Jan 2011 23:14:04 +0000 (23:14 +0000)]
Fix braino in dominator tree walk.

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

13 years agoSometimes, old virtual registers can linger on DBG_VALUE instructions.
Jakob Stoklund Olesen [Wed, 12 Jan 2011 22:37:49 +0000 (22:37 +0000)]
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.

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

13 years agoTeach VirtRegRewriter to update slot indexes when erasing instructions.
Jakob Stoklund Olesen [Wed, 12 Jan 2011 22:28:51 +0000 (22:28 +0000)]
Teach VirtRegRewriter to update slot indexes when erasing instructions.

It was leaving dangling pointers in the slot index maps.

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

13 years agoAnnotate VirtRegRewriter debug output with slot indexes.
Jakob Stoklund Olesen [Wed, 12 Jan 2011 22:28:48 +0000 (22:28 +0000)]
Annotate VirtRegRewriter debug output with slot indexes.

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

13 years agoVerify slot index ordering.
Jakob Stoklund Olesen [Wed, 12 Jan 2011 21:27:48 +0000 (21:27 +0000)]
Verify slot index ordering.

The slot indexes must be monotonically increasing through the function.

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

13 years agoAssert if anybody tries to put a slot index on a DBG_VALUE instruction.
Jakob Stoklund Olesen [Wed, 12 Jan 2011 21:27:45 +0000 (21:27 +0000)]
Assert if anybody tries to put a slot index on a DBG_VALUE instruction.

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

13 years agoVerify that machine instruction parent pointers are consistent.
Jakob Stoklund Olesen [Wed, 12 Jan 2011 21:27:41 +0000 (21:27 +0000)]
Verify that machine instruction parent pointers are consistent.

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

13 years agoSort the register list based on the *actual* register numbers rather than the
Bill Wendling [Wed, 12 Jan 2011 21:20:59 +0000 (21:20 +0000)]
Sort the register list based on the *actual* register numbers rather than the
enum values we give to them. <rdar://problem/8823730>

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

13 years agoUse SmallVector instead of SmallPtrSet and avoid non-deterministic behavior.
Devang Patel [Wed, 12 Jan 2011 19:12:45 +0000 (19:12 +0000)]
Use SmallVector instead of SmallPtrSet and avoid non-deterministic behavior.

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

13 years agoMostly undo r123297, but move the default case in EvaluateAsPCRel to the top
Matt Beaumont-Gay [Wed, 12 Jan 2011 18:02:55 +0000 (18:02 +0000)]
Mostly undo r123297, but move the default case in EvaluateAsPCRel to the top
of the switch block to appease GCC.

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

13 years agoAdd another note taken from the gcc bugzilla.
Nick Lewycky [Wed, 12 Jan 2011 09:06:19 +0000 (09:06 +0000)]
Add another note taken from the gcc bugzilla.

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

13 years agoImplement RETURNADDR and FRAMEADDR lowering in SPARC backend.
Venkatraman Govindaraju [Wed, 12 Jan 2011 05:08:36 +0000 (05:08 +0000)]
Implement RETURNADDR and FRAMEADDR lowering in SPARC backend.

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

13 years agoRemove SPARC backend getpcx instruction's Uses. Also, insert an assert to
Venkatraman Govindaraju [Wed, 12 Jan 2011 03:52:59 +0000 (03:52 +0000)]
Remove SPARC backend getpcx instruction's Uses. Also, insert an assert to
ensure %o7 is not assigned as the destination of getpcx instruction.

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

13 years agorevert 123144, reenabling the rest of memset formation.
Chris Lattner [Wed, 12 Jan 2011 03:25:15 +0000 (03:25 +0000)]
revert 123144, reenabling the rest of memset formation.

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

13 years agoFix SPARC backend call instruction so that arguments passed through registers
Venkatraman Govindaraju [Wed, 12 Jan 2011 03:18:21 +0000 (03:18 +0000)]
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.

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

13 years agorevert r123146 which disabled code that wasn't the root cause
Chris Lattner [Wed, 12 Jan 2011 01:52:23 +0000 (01:52 +0000)]
revert r123146 which disabled code that wasn't the root cause
of the bootstrap miscompare issue.

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

13 years agorevert r123149, reenabling an improvement to memcpyopt that wasn't
Chris Lattner [Wed, 12 Jan 2011 01:43:46 +0000 (01:43 +0000)]
revert r123149, reenabling an improvement to memcpyopt that wasn't
the source of the bootstrap problem.

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

13 years agoPrefer llvm_unreachable to assert(0)
Matt Beaumont-Gay [Wed, 12 Jan 2011 01:42:42 +0000 (01:42 +0000)]
Prefer llvm_unreachable to assert(0)

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

13 years ago1. Support ELF pcrel relocations for movw/movt:
Jason W Kim [Wed, 12 Jan 2011 00:19:25 +0000 (00:19 +0000)]
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)

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

13 years agoWorkaround for bug 8721.
Jason W Kim [Tue, 11 Jan 2011 23:53:41 +0000 (23:53 +0000)]
Workaround for bug 8721.
.s Test added.

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

13 years agoThe world is not ready for LiveDebugVariables yet.
Jakob Stoklund Olesen [Tue, 11 Jan 2011 23:20:33 +0000 (23:20 +0000)]
The world is not ready for LiveDebugVariables yet.

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

13 years agoRemove the PR8954 workaround.
Jakob Stoklund Olesen [Tue, 11 Jan 2011 22:56:41 +0000 (22:56 +0000)]
Remove the PR8954 workaround.

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

13 years agoFix a non-deterministic loop in llvm::MergeBlockIntoPredecessor.
Jakob Stoklund Olesen [Tue, 11 Jan 2011 22:54:38 +0000 (22:54 +0000)]
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.

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

13 years agoEnable LiveDebugVariables by default.
Jakob Stoklund Olesen [Tue, 11 Jan 2011 22:45:28 +0000 (22:45 +0000)]
Enable LiveDebugVariables by default.

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

13 years agoSPARC backend: correct ICC/FCC uses for ADDX and SELECT_CC
Venkatraman Govindaraju [Tue, 11 Jan 2011 22:38:28 +0000 (22:38 +0000)]
SPARC backend: correct ICC/FCC uses for ADDX and SELECT_CC

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

13 years agoDial back the speculative fix for PR8954 a bit, so that we only recompute dominators
Cameron Zwarich [Tue, 11 Jan 2011 22:14:42 +0000 (22:14 +0000)]
Dial back the speculative fix for PR8954 a bit, so that we only recompute dominators
once at the beginning of GVN instead of once per iteration.

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

13 years agoDon't insert DBG_VALUE instructions after the first terminator.
Jakob Stoklund Olesen [Tue, 11 Jan 2011 22:11:16 +0000 (22:11 +0000)]
Don't insert DBG_VALUE instructions after the first terminator.

For one, MachineBasicBlock::getFirstTerminator() doesn't understand what is
happening, and it also makes sense to have all control flow run through the
DBG_VALUE.

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

13 years agoClean up ARM subtarget code by using Triple ADT.
Evan Cheng [Tue, 11 Jan 2011 21:46:47 +0000 (21:46 +0000)]
Clean up ARM subtarget code by using Triple ADT.

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

13 years agoAppropriately truncate debug info range in dwarf output.
Devang Patel [Tue, 11 Jan 2011 21:42:10 +0000 (21:42 +0000)]
Appropriately truncate debug info range in dwarf output.
This is not yet completely enabled.

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

13 years agoPut the Dominator improvements back in. They were not the cause of bootstrap miscompa...
Jakob Stoklund Olesen [Tue, 11 Jan 2011 21:23:09 +0000 (21:23 +0000)]
Put the Dominator improvements back in. They were not the cause of bootstrap miscomparisons.

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

13 years agoAttempt to fix the bootstrap buildbot. Rafael says this works for him on x86-64 Linux.
Cameron Zwarich [Tue, 11 Jan 2011 20:23:34 +0000 (20:23 +0000)]
Attempt to fix the bootstrap buildbot. Rafael says this works for him on x86-64 Linux.

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

13 years agoSpeculatively revert the recent improvements to Dominators.h in an attempt to track...
Jakob Stoklund Olesen [Tue, 11 Jan 2011 19:26:30 +0000 (19:26 +0000)]
Speculatively revert the recent improvements to Dominators.h in an attempt to track down the gcc bootstrap miscompare.

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

13 years agoMcARM: Fill in GetMnemonicAcceptInfo().
Daniel Dunbar [Tue, 11 Jan 2011 19:06:29 +0000 (19:06 +0000)]
McARM: Fill in GetMnemonicAcceptInfo().

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

13 years agoMcARM: Write a silly Python script to compute some hard coded info from the
Daniel Dunbar [Tue, 11 Jan 2011 19:06:26 +0000 (19:06 +0000)]
McARM: Write a silly Python script to compute some hard coded info from the
generated ARM match table, which is substantially more efficient than dealing
with tblgen.

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

13 years agoRemove dead variable, const-ref-ize an APInt.
Owen Anderson [Tue, 11 Jan 2011 18:26:37 +0000 (18:26 +0000)]
Remove dead variable, const-ref-ize an APInt.

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

13 years agothis pass claims to preserve scev, make sure to tell it about deletions.
Chris Lattner [Tue, 11 Jan 2011 18:14:50 +0000 (18:14 +0000)]
this pass claims to preserve scev, make sure to tell it about deletions.

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

13 years agoFix a comment: We now have intrinsics for vcvtr.
Bob Wilson [Tue, 11 Jan 2011 17:56:41 +0000 (17:56 +0000)]
Fix a comment: We now have intrinsics for vcvtr.

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

13 years agosome comment improvements.
Chris Lattner [Tue, 11 Jan 2011 17:11:59 +0000 (17:11 +0000)]
some comment improvements.

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

13 years agoFix PR8946, a missing reg/reg form of movdqu.
Chris Lattner [Tue, 11 Jan 2011 17:04:55 +0000 (17:04 +0000)]
Fix PR8946, a missing reg/reg form of movdqu.

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