oota-llvm.git
13 years agoRemove PHINode::reserveOperandSpace(). Instead, add a parameter to
Jay Foad [Wed, 30 Mar 2011 11:28:46 +0000 (11:28 +0000)]
Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

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

13 years ago(Almost) always call reserveOperandSpace() on newly created PHINodes.
Jay Foad [Wed, 30 Mar 2011 11:19:20 +0000 (11:19 +0000)]
(Almost) always call reserveOperandSpace() on newly created PHINodes.

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

13 years agoRevert a minor comment change inadvertently included with r128502.
Bob Wilson [Wed, 30 Mar 2011 05:26:51 +0000 (05:26 +0000)]
Revert a minor comment change inadvertently included with r128502.

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

13 years agoTreat clones the same as their origin.
Jakob Stoklund Olesen [Wed, 30 Mar 2011 02:52:39 +0000 (02:52 +0000)]
Treat clones the same as their origin.

When DCE clones a live range because it separates into connected components,
make sure that the clones enter the same register allocator stage as the
register they were cloned from.

For instance, clones may be split even when they where created during spilling.
Other registers created during spilling are not candidates for splitting or even
(re-)spilling.

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

13 years agoRemove dead code.
Bill Wendling [Wed, 30 Mar 2011 01:03:48 +0000 (01:03 +0000)]
Remove dead code.

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

13 years agoAdd a test case for thumb stc2 instruction.
Johnny Chen [Wed, 30 Mar 2011 01:02:06 +0000 (01:02 +0000)]
Add a test case for thumb stc2 instruction.

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

13 years agoClangSAEmClangSACheckersEmitter, emit info about groups.
Argyrios Kyrtzidis [Wed, 30 Mar 2011 00:22:00 +0000 (00:22 +0000)]
ClangSAEmClangSACheckersEmitter, emit info about groups.

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

13 years agoSet the unnamed_addr only when we're creating a new GV in the dest module.
Bill Wendling [Tue, 29 Mar 2011 23:31:06 +0000 (23:31 +0000)]
Set the unnamed_addr only when we're creating a new GV in the dest module.

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

13 years agoRevert r128501. It caused test failures.
Bill Wendling [Tue, 29 Mar 2011 23:28:02 +0000 (23:28 +0000)]
Revert r128501. It caused test failures.

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

13 years agoTidy up. 80 columns and trailing whitespace.
Jim Grosbach [Tue, 29 Mar 2011 23:20:22 +0000 (23:20 +0000)]
Tidy up. 80 columns and trailing whitespace.

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

13 years agoUpdate CMake link dependency.
Francois Pichet [Tue, 29 Mar 2011 23:18:51 +0000 (23:18 +0000)]
Update CMake link dependency.

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

13 years agoAdd intrinsics @llvm.arm.neon.vmulls and @llvm.arm.neon.vmullu.* back. Frontends
Evan Cheng [Tue, 29 Mar 2011 23:06:19 +0000 (23:06 +0000)]
Add intrinsics @llvm.arm.neon.vmulls and @llvm.arm.neon.vmullu.* back. Frontends
was lowering them to sext / uxt + mul instructions. Unfortunately the
optimization passes may hoist the extensions out of the loop and separate them.
When that happens, the long multiplication instructions can be broken into
several scalar instructions, causing significant performance issue.

Note the vmla and vmls intrinsics are not added back. Frontend will codegen them
as intrinsics vmull* + add / sub. Also note the isel optimizations for catching
mul + sext / zext are not changed either.

First part of rdar://8832507, rdar://9203134

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

13 years agoWe need to copy over the unnamed_addr attribute.
Bill Wendling [Tue, 29 Mar 2011 23:05:41 +0000 (23:05 +0000)]
We need to copy over the unnamed_addr attribute.

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

13 years agoRevert accidental change to LLVMLibDeps.cmake
Matt Beaumont-Gay [Tue, 29 Mar 2011 22:42:41 +0000 (22:42 +0000)]
Revert accidental change to LLVMLibDeps.cmake

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

13 years agoQuiet a gcc warning about changed name lookup rules
Matt Beaumont-Gay [Tue, 29 Mar 2011 22:25:36 +0000 (22:25 +0000)]
Quiet a gcc warning about changed name lookup rules

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

13 years agoInstCombine: Add a few missing combines for ANDs and ORs of sign bit tests.
Benjamin Kramer [Tue, 29 Mar 2011 22:06:41 +0000 (22:06 +0000)]
InstCombine: Add a few missing combines for ANDs and ORs of sign bit tests.

On x86 we now compile "if (a < 0 && b < 0)" into
testl %edi, %esi
js IF.THEN

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

13 years agoAdding a test for "-inf" as well.
Kevin Enderby [Tue, 29 Mar 2011 21:54:10 +0000 (21:54 +0000)]
Adding a test for "-inf" as well.

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

13 years agoAdd a test case for MSRi.
Johnny Chen [Tue, 29 Mar 2011 21:52:02 +0000 (21:52 +0000)]
Add a test case for MSRi.

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

13 years agoAdd Neon SINT_TO_FP and UINT_TO_FP lowering from v4i16 to v4f32. Fixes
Cameron Zwarich [Tue, 29 Mar 2011 21:41:55 +0000 (21:41 +0000)]
Add Neon SINT_TO_FP and UINT_TO_FP lowering from v4i16 to v4f32. Fixes
<rdar://problem/8875309> and <rdar://problem/9057191>.

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

13 years agoRecompute register class and hint for registers created during spilling.
Jakob Stoklund Olesen [Tue, 29 Mar 2011 21:20:19 +0000 (21:20 +0000)]
Recompute register class and hint for registers created during spilling.

The spill weight is not recomputed for an unspillable register - it stays infinite.

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

13 years agoIn ClangSACheckersEmitter:
Argyrios Kyrtzidis [Tue, 29 Mar 2011 21:16:19 +0000 (21:16 +0000)]
In ClangSACheckersEmitter:
  - Also emit a list of packages and groups sorted by name
  - Avoid iterating over DenseSet so that the output of the arrays is deterministic.

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

13 years agoAdded support symbolic floating point constants in the MC assembler for Infinity
Kevin Enderby [Tue, 29 Mar 2011 21:11:52 +0000 (21:11 +0000)]
Added support symbolic floating point constants in the MC assembler for Infinity
and Nans with the same strings as GAS supports.  rdar://8673024

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

13 years agoAdd a thumb test file for printf (iOS 4.3).
Johnny Chen [Tue, 29 Mar 2011 21:09:30 +0000 (21:09 +0000)]
Add a thumb test file for printf (iOS 4.3).

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

13 years agoInstantiate a JITMemoryManager for MCJIT Dyld
Jim Grosbach [Tue, 29 Mar 2011 21:03:05 +0000 (21:03 +0000)]
Instantiate a JITMemoryManager for MCJIT Dyld

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

13 years agoFixed the build of Clang's unit tests on MinGW. Also removed some
Oscar Fuentes [Tue, 29 Mar 2011 20:51:08 +0000 (20:51 +0000)]
Fixed the build of Clang's unit tests on MinGW. Also removed some
unnecesary conditionals and introduced a new convenience function.

The problem was that the list of libraries for Clang's unit tests was
<clang libraries> <system libraries> <llvm libraries>. As the llvm
libraries references symbols defined on the system libraries, those
were reported as undefined.

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

13 years agoDSE: Remove an early exit optimization that depended on the ordering of a SmallPtrSet.
Benjamin Kramer [Tue, 29 Mar 2011 20:28:57 +0000 (20:28 +0000)]
DSE: Remove an early exit optimization that depended on the ordering of a SmallPtrSet.

Fixes PR9569 and will hopefully make selfhost on ASLR-enabled systems more deterministic.

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

13 years agoCheck early if this is an unsupported opcode, so that we can avoid needlessly instant...
Owen Anderson [Tue, 29 Mar 2011 20:27:38 +0000 (20:27 +0000)]
Check early if this is an unsupported opcode, so that we can avoid needlessly instantiating the base register in some cases.

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

13 years agoA8.6.188 STC, STC2
Johnny Chen [Tue, 29 Mar 2011 19:49:38 +0000 (19:49 +0000)]
A8.6.188 STC, STC2
The STC_OPTION and STC2_OPTION instructions should have their coprocessor option enclosed in {}.

rdar://problem/9200661

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

13 years agoRename invalid-VLDMSDB-arm.txt to be invalid-VLDMSDB_UPD-arm.txt.
Johnny Chen [Tue, 29 Mar 2011 19:10:06 +0000 (19:10 +0000)]
Rename invalid-VLDMSDB-arm.txt to be invalid-VLDMSDB_UPD-arm.txt.

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

13 years agoAdd and modify some tests.
Johnny Chen [Tue, 29 Mar 2011 19:08:52 +0000 (19:08 +0000)]
Add and modify some tests.

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

13 years agoFor ClangSACheckersEmitter, allow a package to belong to checker group, in which...
Argyrios Kyrtzidis [Tue, 29 Mar 2011 18:53:00 +0000 (18:53 +0000)]
For ClangSACheckersEmitter, allow a package to belong to checker group, in which all its checkers will go into the group.

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

13 years agoRemember to use the correct register when rematerializing for snippets.
Jakob Stoklund Olesen [Tue, 29 Mar 2011 17:47:02 +0000 (17:47 +0000)]
Remember to use the correct register when rematerializing for snippets.

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

13 years agoRun dead code elimination immediately after rematerialization.
Jakob Stoklund Olesen [Tue, 29 Mar 2011 17:47:00 +0000 (17:47 +0000)]
Run dead code elimination immediately after rematerialization.

This may eliminate some uses of the spilled registers, and we don't want to
insert reloads for that.

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

13 years agoAdd safety check that didn't show up in testing.
Owen Anderson [Tue, 29 Mar 2011 17:42:25 +0000 (17:42 +0000)]
Add safety check that didn't show up in testing.

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

13 years agoDocument llvm.dbg.sp, llvm.dbg.gv and llvm.dbg.enum
Devang Patel [Tue, 29 Mar 2011 17:27:08 +0000 (17:27 +0000)]
Document llvm.dbg.sp, llvm.dbg.gv and llvm.dbg.enum

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

13 years agoInline check that's used only once.
Bill Wendling [Tue, 29 Mar 2011 17:12:55 +0000 (17:12 +0000)]
Inline check that's used only once.

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

13 years agoGet rid of the non-writeback versions VLDMDB and VSTMDB, which don't actually exist.
Owen Anderson [Tue, 29 Mar 2011 16:45:53 +0000 (16:45 +0000)]
Get rid of the non-writeback versions VLDMDB and VSTMDB, which don't actually exist.

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

13 years agoRework the logic (and removing the bad check for an unreachable block) so that
Bill Wendling [Tue, 29 Mar 2011 07:28:52 +0000 (07:28 +0000)]
Rework the logic (and removing the bad check for an unreachable block) so that
the FailBB dominator is correctly calculated. Believe it or not, there isn't a
functionality change here.

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

13 years agoDo some simple copy propagation through integer loads and stores when promoting
Cameron Zwarich [Tue, 29 Mar 2011 05:19:52 +0000 (05:19 +0000)]
Do some simple copy propagation through integer loads and stores when promoting
vector types. This helps a lot with inlined functions when using the ARM soft
float ABI. Fixes <rdar://problem/9184212>.

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

13 years agoDon't try to add stack protector logic to a dead basic block. It messes up
Bill Wendling [Tue, 29 Mar 2011 05:15:48 +0000 (05:15 +0000)]
Don't try to add stack protector logic to a dead basic block. It messes up
dominator information.

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

13 years agoSpruce up the error output.
Bill Wendling [Tue, 29 Mar 2011 04:28:26 +0000 (04:28 +0000)]
Spruce up the error output.

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

13 years agoHandle the special case when all uses follow the last split point.
Jakob Stoklund Olesen [Tue, 29 Mar 2011 03:12:04 +0000 (03:12 +0000)]
Handle the special case when all uses follow the last split point.

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

13 years agoProperly enable rematerialization when spilling after live range splitting.
Jakob Stoklund Olesen [Tue, 29 Mar 2011 03:12:02 +0000 (03:12 +0000)]
Properly enable rematerialization when spilling after live range splitting.

The instruction to be rematerialized may not be the one defining the register
that is being spilled. The traceSiblingValue() function sees through sibling
copies to find the remat candidate.

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

13 years agoC-API: Include DataTypes.h instead of stdint.h.
Daniel Dunbar [Tue, 29 Mar 2011 02:30:34 +0000 (02:30 +0000)]
C-API: Include DataTypes.h instead of stdint.h.

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

13 years agoReduce test case.
Rafael Espindola [Tue, 29 Mar 2011 02:18:54 +0000 (02:18 +0000)]
Reduce test case.

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

13 years agoOptimizing (zext A + zext B) * C, to (VMULL A, C) + (VMULL B, C) during
Evan Cheng [Tue, 29 Mar 2011 01:56:09 +0000 (01:56 +0000)]
Optimizing (zext A + zext B) * C, to (VMULL A, C) + (VMULL B, C) during
isel lowering to fold the zero-extend's and take advantage of no-stall
back to back vmul + vmla:
 vmull q0, d4, d6
 vmlal q0, d5, d6
is faster than
 vaddl q0, d4, d5
 vmovl q1, d6
 vmul  q0, q0, q1

This allows us to vmull + vmlal for:
    f = vmull_u8(   vget_high_u8(s), c);
    f = vmlal_u8(f, vget_low_u8(s),  c);

rdar://9197392

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

13 years agoFix the MSVC build.
Francois Pichet [Tue, 29 Mar 2011 00:30:01 +0000 (00:30 +0000)]
Fix the MSVC build.

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

13 years agoExpoert c interface for disassembler.
Devang Patel [Tue, 29 Mar 2011 00:01:39 +0000 (00:01 +0000)]
Expoert c interface for disassembler.

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

13 years agoIn some cases, the "fail BB dominator" may be null after the BB was split (and
Bill Wendling [Mon, 28 Mar 2011 23:02:18 +0000 (23:02 +0000)]
In some cases, the "fail BB dominator" may be null after the BB was split (and
becomes reachable when before it wasn't). Check to make sure that it's not null
before trying to use it.

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

13 years agoIntegrated-As: Add support for setting the AllowTemporaryLabels flag via
Daniel Dunbar [Mon, 28 Mar 2011 22:49:19 +0000 (22:49 +0000)]
Integrated-As: Add support for setting the AllowTemporaryLabels flag via
integrated-as.

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

13 years agoMC: Add support for disabling "temporary label" behavior. Useful for debugging
Daniel Dunbar [Mon, 28 Mar 2011 22:49:15 +0000 (22:49 +0000)]
MC: Add support for disabling "temporary label" behavior. Useful for debugging
on Darwin.

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

13 years agoUnbreak CMake build.
Ted Kremenek [Mon, 28 Mar 2011 20:43:53 +0000 (20:43 +0000)]
Unbreak CMake build.

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

13 years agoRemove scripts used by TEST=dbg from here. They now live inside llvm test suite.
Devang Patel [Mon, 28 Mar 2011 20:28:30 +0000 (20:28 +0000)]
Remove scripts used by TEST=dbg from here. They now live inside llvm test suite.

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

13 years agoFix ARM disassembly for PLD/PLDW/PLI which suffers from code rot and add some test...
Johnny Chen [Mon, 28 Mar 2011 18:41:58 +0000 (18:41 +0000)]
Fix ARM disassembly for PLD/PLDW/PLI which suffers from code rot and add some test cases.
Add comments to ThumbDisassemblerCore.h for recent change made for t2PLD disassembly.

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

13 years agoAgain adding a C API to the disassembler for use by such tools as Darwin's
Kevin Enderby [Mon, 28 Mar 2011 18:25:07 +0000 (18:25 +0000)]
Again adding a C API to the disassembler for use by such tools as Darwin's
otool(1), this time with the needed fix for case sensitive file systems :) .
This is a work in progress as the interface for producing symbolic operands is
not done.  But a hacked prototype using information from the object file's
relocation entiries and replacing immediate operands with MCExpr's has been
shown to work with no changes to the instrucion printer.  These APIs will be
moved into a dynamic library at some point.

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

13 years agoRemove tabs I accidentally added.
Nick Lewycky [Mon, 28 Mar 2011 17:48:26 +0000 (17:48 +0000)]
Remove tabs I accidentally added.

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

13 years agoMake more use of PHINode::getNumIncomingValues().
Jay Foad [Mon, 28 Mar 2011 13:03:10 +0000 (13:03 +0000)]
Make more use of PHINode::getNumIncomingValues().

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

13 years agoptx: clean up branch code a bit
Che-Liang Chiou [Mon, 28 Mar 2011 10:23:13 +0000 (10:23 +0000)]
ptx: clean up branch code a bit

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

13 years agodocs/GettingStarted.html: [PR8850] Add a note for x86_64-w64-mingw32.
NAKAMURA Takumi [Mon, 28 Mar 2011 06:27:12 +0000 (06:27 +0000)]
docs/GettingStarted.html: [PR8850] Add a note for x86_64-w64-mingw32.

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

13 years agodocs/GettingStarted.html: Add blurb "--enable-shared" on cygming.
NAKAMURA Takumi [Mon, 28 Mar 2011 06:27:06 +0000 (06:27 +0000)]
docs/GettingStarted.html: Add blurb "--enable-shared" on cygming.

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

13 years agoAdd some debug output when -instcombine uses RAUW. This can make debug output for...
Frits van Bommel [Sun, 27 Mar 2011 23:32:31 +0000 (23:32 +0000)]
Add some debug output when -instcombine uses RAUW. This can make debug output for those cases much clearer since without this it only showed that the original instruction was removed, not what it was replaced with.

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

13 years agoAmend debug output.
Jakob Stoklund Olesen [Sun, 27 Mar 2011 22:49:23 +0000 (22:49 +0000)]
Amend debug output.

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

13 years agoDrop interference reassignment in favor of eviction.
Jakob Stoklund Olesen [Sun, 27 Mar 2011 22:49:21 +0000 (22:49 +0000)]
Drop interference reassignment in favor of eviction.

The reassignment phase was able to move interference with a higher spill weight,
but it didn't happen very often and it was fairly expensive.

The existing interference eviction picks up the slack.

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

13 years agoTeach the transformation that moves binary operators around selects to preserve
Nick Lewycky [Sun, 27 Mar 2011 19:51:23 +0000 (19:51 +0000)]
Teach the transformation that moves binary operators around selects to preserve
the subclass optional data.

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

13 years agoUse APInt's umul_ov instead of rolling our own overflow detection.
Benjamin Kramer [Sun, 27 Mar 2011 15:04:38 +0000 (15:04 +0000)]
Use APInt's umul_ov instead of rolling our own overflow detection.

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

13 years agoConstant folding support for calls to umul.with.overflow(), basically identical to...
Frits van Bommel [Sun, 27 Mar 2011 14:26:13 +0000 (14:26 +0000)]
Constant folding support for calls to umul.with.overflow(), basically identical to the smul.with.overflow() code.

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

13 years agoPartially revert commit 127155: I think it is much more convenient
Duncan Sands [Sun, 27 Mar 2011 13:52:32 +0000 (13:52 +0000)]
Partially revert commit 127155: I think it is much more convenient
to have structured log files rather than one big file produced by
piping output.

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

13 years agoAdd a small missed optimization: turn X == C ? X : Y into X == C ? C : Y. This
Nick Lewycky [Sun, 27 Mar 2011 07:30:57 +0000 (07:30 +0000)]
Add a small missed optimization: turn X == C ? X : Y into X == C ? C : Y. This
removes one use of X which helps it pass the many hasOneUse() checks.

In my analysis, this turns up very often where X = A >>exact B and that can't be
simplified unless X has one use (except by increasing the lifetime of A which is
generally a performance loss).

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

13 years agoFix whitespace.
NAKAMURA Takumi [Sun, 27 Mar 2011 01:44:40 +0000 (01:44 +0000)]
Fix whitespace.

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

13 years agoUse individual register classes when spilling snippets.
Jakob Stoklund Olesen [Sat, 26 Mar 2011 22:16:41 +0000 (22:16 +0000)]
Use individual register classes when spilling snippets.

The main register class may have been inflated by live range splitting, so that
register class is not necessarily valid for the snippet instructions.

Use the original register class for the stack slot interval.

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

13 years agoTurn SelectionDAGBuilder::GetRegistersForValue into a local function.
Benjamin Kramer [Sat, 26 Mar 2011 16:35:10 +0000 (16:35 +0000)]
Turn SelectionDAGBuilder::GetRegistersForValue into a local function.

It couldn't be used outside of the file because SDISelAsmOperandInfo
is local to SelectionDAGBuilder.cpp. Making it a static function avoids
a weird linkage dance.

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

13 years agoMake helper static.
Benjamin Kramer [Sat, 26 Mar 2011 12:38:19 +0000 (12:38 +0000)]
Make helper static.

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

13 years agoSimplification noticed by Frits.
Bill Wendling [Sat, 26 Mar 2011 09:32:07 +0000 (09:32 +0000)]
Simplification noticed by Frits.

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

13 years agoRework the logic that determines if a store completely overlaps an ealier store.
Bill Wendling [Sat, 26 Mar 2011 08:02:59 +0000 (08:02 +0000)]
Rework the logic that determines if a store completely overlaps an ealier store.

There are two ways that a later store can comletely overlap a previous store:

1. They both start at the same offset, but the earlier store's size is <= the
   later's size, or
2. The earlier store's offset is > the later's offset, but it's offset + size
   doesn't extend past the later's offset + size.

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

13 years agoFix a typo and add a test.
Cameron Zwarich [Sat, 26 Mar 2011 04:58:50 +0000 (04:58 +0000)]
Fix a typo and add a test.

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

13 years agoExtend Clang's TableGen emitter for attributes to support bool arguments.
Douglas Gregor [Sat, 26 Mar 2011 03:40:01 +0000 (03:40 +0000)]
Extend Clang's TableGen emitter for attributes to support bool arguments.

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

13 years agoCollect and coalesce DBG_VALUE instructions before emitting the function.
Jakob Stoklund Olesen [Sat, 26 Mar 2011 02:19:36 +0000 (02:19 +0000)]
Collect and coalesce DBG_VALUE instructions before emitting the function.

Correctly terminate the range of register DBG_VALUEs when the register is
clobbered or when the basic block ends.

The code is now ready to deal with variables that are sometimes in a register
and sometimes on the stack. We just need to teach emitDebugLoc to say 'stack
slot'.

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

13 years agoFixed the t2PLD and friends disassembly and add two test cases.
Johnny Chen [Sat, 26 Mar 2011 01:32:48 +0000 (01:32 +0000)]
Fixed the t2PLD and friends disassembly and add two test cases.

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

13 years agoFix the bfi handling for or (and a mask) (and b mask). We need the two
Eric Christopher [Sat, 26 Mar 2011 01:21:03 +0000 (01:21 +0000)]
Fix the bfi handling for or (and a mask) (and b mask). We need the two
masks to match inversely for the code as is to work. For the example given
we actually want:

bfi r0, r2, #1, #1

not #0, however, given the way the pattern is written it's not possible
at the moment.

Fixes rdar://9177502

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

13 years agoPR9561: A store with a negative offset (via GEP) could erroniously say that it
Bill Wendling [Sat, 26 Mar 2011 01:20:37 +0000 (01:20 +0000)]
PR9561: A store with a negative offset (via GEP) could erroniously say that it
completely overlaps a previous store, thus mistakenly deleting that store. Check
for this condition.

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

13 years agoRemove the files for r128308 as it is causing a buildbot failure.
Kevin Enderby [Sat, 26 Mar 2011 00:23:05 +0000 (00:23 +0000)]
Remove the files for r128308 as it is causing a buildbot failure.

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

13 years agoAdding a C API to the disassembler for use by such tools as Darwin's otool(1).
Kevin Enderby [Sat, 26 Mar 2011 00:06:33 +0000 (00:06 +0000)]
Adding a C API to the disassembler for use by such tools as Darwin's otool(1).
This is a work in progress as the interface for producing symbolic operands is
not done.  But a hacked prototype using information from the object file's
relocation entiries and replacing immediate operands with MCExpr's has been
shown to work with no changes to the instrucion printer.  These APIs will be
moved into a dynamic library at some point.

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

13 years agoAdd test for A8.6.246 UMULL to both arm-tests.txt amd thumb-tests.txt.
Johnny Chen [Fri, 25 Mar 2011 23:02:58 +0000 (23:02 +0000)]
Add test for A8.6.246 UMULL to both arm-tests.txt amd thumb-tests.txt.

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

13 years agoAdd two test cases t2SMLABT and t2SMMULR for DisassembleThumb2Mul().
Johnny Chen [Fri, 25 Mar 2011 22:43:28 +0000 (22:43 +0000)]
Add two test cases t2SMLABT and t2SMMULR for DisassembleThumb2Mul().

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

13 years agoFix DisassembleThumb2DPReg()'s handling of RegClass. Cannot hardcode GPRRegClassID.
Johnny Chen [Fri, 25 Mar 2011 22:19:07 +0000 (22:19 +0000)]
Fix DisassembleThumb2DPReg()'s handling of RegClass.  Cannot hardcode GPRRegClassID.
Also add some test cases.

rdar://problem/9189829

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

13 years agoDisassembleThumb2LdSt() did not handle t2LDRs correctly with respect to RegClass...
Johnny Chen [Fri, 25 Mar 2011 19:35:37 +0000 (19:35 +0000)]
DisassembleThumb2LdSt() did not handle t2LDRs correctly with respect to RegClass.  Add two test cases.

rdar://problem/9182892

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

13 years agoA8.6.226 TBB, TBH:
Johnny Chen [Fri, 25 Mar 2011 18:40:21 +0000 (18:40 +0000)]
A8.6.226 TBB, TBH:

Add two test cases.

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

13 years agoModify DisassembleThumb2LdStEx() to be more robust/correct in light of recent change to
Johnny Chen [Fri, 25 Mar 2011 18:29:49 +0000 (18:29 +0000)]
Modify DisassembleThumb2LdStEx() to be more robust/correct in light of recent change to
t2LDREX/t2STREX instructions.  Add two test cases.

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

13 years agoMC: Improve some diagnostics on uses of '.' pseudo-symbol.
Daniel Dunbar [Fri, 25 Mar 2011 17:47:17 +0000 (17:47 +0000)]
MC: Improve some diagnostics on uses of '.' pseudo-symbol.

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

13 years agoTidyness.
Daniel Dunbar [Fri, 25 Mar 2011 17:47:14 +0000 (17:47 +0000)]
Tidyness.

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

13 years agoAdd a note.
Benjamin Kramer [Fri, 25 Mar 2011 17:32:40 +0000 (17:32 +0000)]
Add a note.

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

13 years agoInstruction formats of SWP/SWPB were changed from LdStExFrm to MiscFrm. Modify the...
Johnny Chen [Fri, 25 Mar 2011 17:31:16 +0000 (17:31 +0000)]
Instruction formats of SWP/SWPB were changed from LdStExFrm to MiscFrm.  Modify the disassembler to handle that.

rdar://problem/9184053

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

13 years agoEmit less labels for debug info and stop emitting .loc directives for DBG_VALUEs.
Jakob Stoklund Olesen [Fri, 25 Mar 2011 17:20:59 +0000 (17:20 +0000)]
Emit less labels for debug info and stop emitting .loc directives for DBG_VALUEs.

The .dot directives don't need labels, that is a leftover from when we created
line number info manually.

Instructions following a DBG_VALUE can share its label since the DBG_VALUE
doesn't produce any code.

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

13 years agoAlso need to handle invalid imod values for CPS2p.
Johnny Chen [Fri, 25 Mar 2011 17:03:12 +0000 (17:03 +0000)]
Also need to handle invalid imod values for CPS2p.

rdar://problem/9186136

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

13 years agoUseful script for finding regressions in the nightly testsuite.
Duncan Sands [Fri, 25 Mar 2011 07:17:44 +0000 (07:17 +0000)]
Useful script for finding regressions in the nightly testsuite.
I think it was written by Pawel Worach.

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

13 years agoRemove redundant compression option.
Bill Wendling [Fri, 25 Mar 2011 06:43:59 +0000 (06:43 +0000)]
Remove redundant compression option.

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

13 years agoFix for -pre-RA-sched=source.
Andrew Trick [Fri, 25 Mar 2011 06:40:55 +0000 (06:40 +0000)]
Fix for -pre-RA-sched=source.

Yet another case of unchecked NULL node (for physreg copy).
May fix PR9509.

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

13 years agoNo functionality change, just adjust some whitespace for coding style compliance.
Nick Lewycky [Fri, 25 Mar 2011 06:05:50 +0000 (06:05 +0000)]
No functionality change, just adjust some whitespace for coding style compliance.

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

13 years agoNo functionality change. Fix up some whitespace and switch out "" for '' when
Nick Lewycky [Fri, 25 Mar 2011 06:04:26 +0000 (06:04 +0000)]
No functionality change. Fix up some whitespace and switch out "" for '' when
printing a single character.

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

13 years agoIgnore special ARM allocation hints for unexpected register classes.
Jakob Stoklund Olesen [Fri, 25 Mar 2011 01:48:18 +0000 (01:48 +0000)]
Ignore special ARM allocation hints for unexpected register classes.

Add an assertion to linear scan to prevent it from allocating registers outside
the register class.

<rdar://problem/9183021>

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