oota-llvm.git
13 years agoAdd support to encode function's template parameters.
Devang Patel [Tue, 5 Apr 2011 22:52:06 +0000 (22:52 +0000)]
Add support to encode function's template parameters.

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

13 years agoGive RSBS and RSCS the pseudo treatment.
Owen Anderson [Tue, 5 Apr 2011 22:42:54 +0000 (22:42 +0000)]
Give RSBS and RSCS the pseudo treatment.

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

13 years agoARM disassembler was erroneously accepting an invalid RSC instruction.
Johnny Chen [Tue, 5 Apr 2011 22:18:07 +0000 (22:18 +0000)]
ARM disassembler was erroneously accepting an invalid RSC instruction.
Added checks for regs which should not be 15.

rdar://problem/9237734

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

13 years agoremove postdom frontiers, because it is dead. Forward dom frontiers are
Chris Lattner [Tue, 5 Apr 2011 21:57:17 +0000 (21:57 +0000)]
remove postdom frontiers, because it is dead.  Forward dom frontiers are
still used by RegionInfo :(

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

13 years agodocs/ReleaseNotes.html: Please use proper *Heading* elements instead of classified...
NAKAMURA Takumi [Tue, 5 Apr 2011 21:55:14 +0000 (21:55 +0000)]
docs/ReleaseNotes.html: Please use proper *Heading* elements instead of classified div.

It would be better to browse without stylesheet. (eg. on ViewVC)

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

13 years agoARM disassembler was erroneously accepting an invalid LSL instruction.
Johnny Chen [Tue, 5 Apr 2011 21:49:44 +0000 (21:49 +0000)]
ARM disassembler was erroneously accepting an invalid LSL instruction.
For register-controlled shifts, we should check that the encoding constraint
Inst{7} = 0 and Inst{4} = 1 is satisfied.

rdar://problem/9237693

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

13 years agoFix bugs in the pseuo-ization of ADCS/SBCS pointed out by Jim, as well as doing the...
Owen Anderson [Tue, 5 Apr 2011 21:48:57 +0000 (21:48 +0000)]
Fix bugs in the pseuo-ization of ADCS/SBCS pointed out by Jim, as well as doing the expansion earlier (using a custom inserter) to allow for the chance of predicating these instructions.

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

13 years agoremove graphprinter support for domfrontier.
Chris Lattner [Tue, 5 Apr 2011 21:43:56 +0000 (21:43 +0000)]
remove graphprinter support for domfrontier.

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

13 years agoThese tests no longer require linear scan because reserved register coalescing is...
Jakob Stoklund Olesen [Tue, 5 Apr 2011 21:40:41 +0000 (21:40 +0000)]
These tests no longer require linear scan because reserved register coalescing is now universal.

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

13 years agoRun LiveDebugVariables in RegAllocBasic and RegAllocGreedy.
Jakob Stoklund Olesen [Tue, 5 Apr 2011 21:40:37 +0000 (21:40 +0000)]
Run LiveDebugVariables in RegAllocBasic and RegAllocGreedy.

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

13 years agoonly 7 more weeks to go.
Chris Lattner [Tue, 5 Apr 2011 21:37:08 +0000 (21:37 +0000)]
only 7 more weeks to go.

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

13 years agoRefactor.
Devang Patel [Tue, 5 Apr 2011 21:08:24 +0000 (21:08 +0000)]
Refactor.

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

13 years agoDocument llvm/ADT/IntEqClasses.h in ProgrammersManual.html
Jakob Stoklund Olesen [Tue, 5 Apr 2011 20:56:08 +0000 (20:56 +0000)]
Document llvm/ADT/IntEqClasses.h in ProgrammersManual.html

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

13 years agoAdd an assertion instead of crashing when the scavenger goes past the end
Bob Wilson [Tue, 5 Apr 2011 20:44:15 +0000 (20:44 +0000)]
Add an assertion instead of crashing when the scavenger goes past the end
of a basic block.

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

13 years agoFix typos. Adjust some whitespace for style. No functionality change.
Nick Lewycky [Tue, 5 Apr 2011 20:39:27 +0000 (20:39 +0000)]
Fix typos. Adjust some whitespace for style. No functionality change.

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

13 years agoThe r128085 checkin modified the operand ordering for MRC/MRC2 instructions.
Johnny Chen [Tue, 5 Apr 2011 20:32:23 +0000 (20:32 +0000)]
The r128085 checkin modified the operand ordering for MRC/MRC2 instructions.
Modify DisassembleCoprocessor() of ARMDisassemblerCore.cpp to react to the change.

rdar://problem/9236873

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

13 years agoAdd support for detection of Intel SandyBridge.
Roman Divacky [Tue, 5 Apr 2011 20:25:36 +0000 (20:25 +0000)]
Add support for detection of Intel SandyBridge.

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

13 years agoFix one more batch of X86 tests to be register allocation dependent.
Jakob Stoklund Olesen [Tue, 5 Apr 2011 20:20:30 +0000 (20:20 +0000)]
Fix one more batch of X86 tests to be register allocation dependent.

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

13 years agoWhen dead code elimination removes all but one use, try to fold the single def into...
Jakob Stoklund Olesen [Tue, 5 Apr 2011 20:20:26 +0000 (20:20 +0000)]
When dead code elimination removes all but one use, try to fold the single def into the remaining use.

Rematerialization can leave single-use loads behind that we might as well fold whenever possible.

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

13 years agoDo not emit empty name.
Devang Patel [Tue, 5 Apr 2011 20:14:13 +0000 (20:14 +0000)]
Do not emit empty name.

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

13 years agoARM disassembler should flag (rGPRRegClassID, r13|r15) as an error.
Johnny Chen [Tue, 5 Apr 2011 19:42:11 +0000 (19:42 +0000)]
ARM disassembler should flag (rGPRRegClassID, r13|r15) as an error.

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

13 years agoFix a typo.
Andrew Trick [Tue, 5 Apr 2011 19:13:11 +0000 (19:13 +0000)]
Fix a typo.

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

13 years agoAdded *hidden* flags -print-options and -print-all-options so
Andrew Trick [Tue, 5 Apr 2011 18:54:36 +0000 (18:54 +0000)]
Added *hidden* flags -print-options and -print-all-options so
developers can see if their driver changed any cl::Option's. The
current implementation isn't perfect but handles most kinds of
options. This is nice to have when decomposing the stages of
compilation and moving between different drivers. It's also a good
sanity check when comparing results produced by different command line
invocations that are expected to produce the comparable results.

Note: This is not an attempt to prolong the life of cl::Option. On the
contrary, it's a placeholder for a feature that must exist when
cl::Option is replaced by a more appropriate framework. A new
framework needs: a central option registry, dynamic name lookup,
non-global containers of option values (e.g. per-module,
per-function), *and* the ability to print options values and their defaults at
any point during compilation.

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

13 years agoLDRD now prints out two dst registers.
Johnny Chen [Tue, 5 Apr 2011 18:53:14 +0000 (18:53 +0000)]
LDRD now prints out two dst registers.

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

13 years agoFix test-llvm failures.
Johnny Chen [Tue, 5 Apr 2011 18:41:40 +0000 (18:41 +0000)]
Fix test-llvm failures.

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

13 years agowhitespace
Andrew Trick [Tue, 5 Apr 2011 18:41:31 +0000 (18:41 +0000)]
whitespace

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

13 years agoAn MCDisassembler has the option to not implement
Shantonu Sen [Tue, 5 Apr 2011 18:40:45 +0000 (18:40 +0000)]
An MCDisassembler has the option to not implement
getEDInfo(), in which case this code would dereference
NULL. EDInst can already handle NULL info, so avoid
the dereference and pass NULL through.

Reviewed by Sean Callanan

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

13 years agoMake second source operand of LDRD pre/post explicit.
Jim Grosbach [Tue, 5 Apr 2011 18:40:13 +0000 (18:40 +0000)]
Make second source operand of LDRD pre/post explicit.

Finish what r128736 started.

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

13 years agomore notes to self.
Chris Lattner [Tue, 5 Apr 2011 18:38:45 +0000 (18:38 +0000)]
more notes to self.

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

13 years agoConstants with multiple encodings (ARM):
Johnny Chen [Tue, 5 Apr 2011 18:02:46 +0000 (18:02 +0000)]
Constants with multiple encodings (ARM):
An alternative syntax is available for a modified immediate constant that permits the programmer to specify
the encoding directly. In this syntax, #<const> is instead written as #<byte>,#<rot>, where:

    <byte> is the numeric value of abcdefgh, in the range 0-255
    <rot> is twice the numeric value of rotation, an even number in the range 0-30.

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

13 years agoCheck for invalid register encodings for UMAAL and friends where:
Johnny Chen [Tue, 5 Apr 2011 17:43:10 +0000 (17:43 +0000)]
Check for invalid register encodings for UMAAL and friends where:
    if dLo == 15 || dHi == 15 || n == 15 || m == 15 then UNPREDICTABLE;
    if dHi == dLo then UNPREDICTABLE;

rdar://problem/9230202

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

13 years agoConvert ADCS and SBCS instructions into pseudos that are expanded to the ADC/ABC...
Owen Anderson [Tue, 5 Apr 2011 17:24:25 +0000 (17:24 +0000)]
Convert ADCS and SBCS instructions into pseudos that are expanded to the ADC/ABC with the appropriate S-bit input value.

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

13 years agoARM doesn't support byval yet. XFAIL this test until it does.
Stuart Hastings [Tue, 5 Apr 2011 17:16:21 +0000 (17:16 +0000)]
ARM doesn't support byval yet.  XFAIL this test until it does.

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

13 years agoRename LLVMConfig.cmake to LLVM-Config.cmake. The *Config.cmake naming
Oscar Fuentes [Tue, 5 Apr 2011 17:02:48 +0000 (17:02 +0000)]
Rename LLVMConfig.cmake to LLVM-Config.cmake. The *Config.cmake naming
scheme is used by the functionality related to find_package.

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

13 years agoEnsure all defs referring to a virtual register are marked dead by addRegisterDead().
Jakob Stoklund Olesen [Tue, 5 Apr 2011 16:53:50 +0000 (16:53 +0000)]
Ensure all defs referring to a virtual register are marked dead by addRegisterDead().

There can be multiple defs for a single virtual register when they are defining
sub-registers.

The missing <dead> flag was stopping the inline spiller from eliminating dead
code after rematerialization.

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

13 years agoPrint visibility info for external variables.
Rafael Espindola [Tue, 5 Apr 2011 15:51:32 +0000 (15:51 +0000)]
Print visibility info for external variables.

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

13 years agoUse std::unique instead of a SmallPtrSet to ensure unique instructions in UseSlots.
Jakob Stoklund Olesen [Tue, 5 Apr 2011 15:18:18 +0000 (15:18 +0000)]
Use std::unique instead of a SmallPtrSet to ensure unique instructions in UseSlots.

This allows us to always keep the smaller slot for an instruction which is what
we want when a register has early clobber defines.

Drop the UsingInstrs set and the UsingBlocks map. They are no longer needed.

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

13 years agoInstCombine optimizes gep(bitcast(x)) even when the bitcasts casts away address
Nadav Rotem [Tue, 5 Apr 2011 14:29:52 +0000 (14:29 +0000)]
InstCombine optimizes gep(bitcast(x)) even when the bitcasts casts away address
space info. We crash with an assert in this case. This change checks that the
address space of the bitcasted pointer is the same as the gep ptr.

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

13 years agodocs/ReleaseNotes.html: Add a few notes to MCCOFF and x64. FIXME: fixme!
NAKAMURA Takumi [Tue, 5 Apr 2011 08:24:22 +0000 (08:24 +0000)]
docs/ReleaseNotes.html: Add a few notes to MCCOFF and x64. FIXME: fixme!

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

13 years agodocs/GettingStarted.html: FIXME: dg, lit, and source tree layout.
NAKAMURA Takumi [Tue, 5 Apr 2011 08:24:15 +0000 (08:24 +0000)]
docs/GettingStarted.html: FIXME: dg, lit, and source tree layout.

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

13 years agoadd a bunch of notes to myself, this is not intended to be gramatic or
Chris Lattner [Tue, 5 Apr 2011 07:19:28 +0000 (07:19 +0000)]
add a bunch of notes to myself, this is not intended to be gramatic or
make sense to anyone else.

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

13 years agoStop precomputing last split points, query the SplitAnalysis cache on demand.
Jakob Stoklund Olesen [Tue, 5 Apr 2011 04:20:29 +0000 (04:20 +0000)]
Stop precomputing last split points, query the SplitAnalysis cache on demand.

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

13 years agoCache the fairly expensive last split point computation and provide a fast
Jakob Stoklund Olesen [Tue, 5 Apr 2011 04:20:27 +0000 (04:20 +0000)]
Cache the fairly expensive last split point computation and provide a fast
inlined path for the common case.

Most basic blocks don't contain a call that may throw, so the last split point
os simply the first terminator.

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

13 years agoRevamp the SjLj "dispatch setup" intrinsic.
Bill Wendling [Tue, 5 Apr 2011 01:37:43 +0000 (01:37 +0000)]
Revamp the SjLj "dispatch setup" intrinsic.

It needed to be moved closer to the setjmp statement, because the code directly
after the setjmp needs to know about values that are on the stack. Also, the
'bitcast' of the function context was causing a dead load. This wouldn't be too
horrible, except that at -O0 it wasn't optimized out, and because it wasn't
using the correct base pointer (if there is a VLA), it would try to access a
value from a garbage address.
<rdar://problem/9130540>

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

13 years agoFix up testcase for previous commit.
Eric Christopher [Tue, 5 Apr 2011 00:56:01 +0000 (00:56 +0000)]
Fix up testcase for previous commit.

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

13 years agoJust use BL all the time. It's safer that way.
Eric Christopher [Tue, 5 Apr 2011 00:39:26 +0000 (00:39 +0000)]
Just use BL all the time. It's safer that way.

Fixes rdar://9184526

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

13 years agoRevert 123704; it broke threaded LLVM.
Stuart Hastings [Tue, 5 Apr 2011 00:37:28 +0000 (00:37 +0000)]
Revert 123704; it broke threaded LLVM.

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

13 years agoFix register-dependent X86 tests.
Jakob Stoklund Olesen [Tue, 5 Apr 2011 00:32:44 +0000 (00:32 +0000)]
Fix register-dependent X86 tests.

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

13 years agoFix SRS/SRSW encoding bits.
Johnny Chen [Tue, 5 Apr 2011 00:16:18 +0000 (00:16 +0000)]
Fix SRS/SRSW encoding bits.
rdar://problem/9230801 ARM disassembler discrepancy: erroneously accepting SRS

Plus add invalid-RFEorLDMIA-arm.txt test which should have been checked in with
http://llvm.org/viewvc/llvm-project?view=rev&revision=128859.

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

13 years agoA8.6.105 MUL
Johnny Chen [Mon, 4 Apr 2011 23:57:05 +0000 (23:57 +0000)]
A8.6.105 MUL
Inst{15-12} should be specified as 0b0000.

rdar://problem/9231168 ARM disassembler discrepancy: erroneously accepting MUL

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

13 years agoAdd info on where to get 2.9 final svn sources.
Bill Wendling [Mon, 4 Apr 2011 23:42:51 +0000 (23:42 +0000)]
Add info on where to get 2.9 final svn sources.

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

13 years agoRFE encoding should also specify the "should be" encoding bits.
Johnny Chen [Mon, 4 Apr 2011 23:39:08 +0000 (23:39 +0000)]
RFE encoding should also specify the "should be" encoding bits.

rdar://problem/9229922 ARM disassembler discrepancy: erroneously accepting RFE

Also LDC/STC instructions are predicated while LDC2/STC2 instructions are not, fixed while
doing regression testings.

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

13 years agoAdd missing file from r128851.
Jim Grosbach [Mon, 4 Apr 2011 23:20:40 +0000 (23:20 +0000)]
Add missing file from r128851.

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

13 years agoLayer the memory manager between the JIT and the runtime Dyld.
Jim Grosbach [Mon, 4 Apr 2011 23:04:39 +0000 (23:04 +0000)]
Layer the memory manager between the JIT and the runtime Dyld.

The JITMemory manager references LLVM IR constructs directly, while the
runtime Dyld works at a lower level and can handle objects which may not
originate from LLVM IR. Introduce a new layer for the memory manager to
handle the interface between them. For the MCJIT, this layer will be almost
entirely simply a call-through w/ translation between the IR objects and
symbol names.

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

13 years agoMake OpcodeMask an unsigned long long literal to deal with overflow.
Joerg Sonnenberger [Mon, 4 Apr 2011 21:38:17 +0000 (21:38 +0000)]
Make OpcodeMask an unsigned long long literal to deal with overflow.

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

13 years agoAllow coalescing with reserved physregs in certain cases:
Jakob Stoklund Olesen [Mon, 4 Apr 2011 21:00:03 +0000 (21:00 +0000)]
Allow coalescing with reserved physregs in certain cases:

When a virtual register has a single value that is defined as a copy of a
reserved register, permit that copy to be joined. These virtual register are
usually copies of the stack pointer:

  %vreg75<def> = COPY %ESP; GR32:%vreg75
  MOV32mr %vreg75, 1, %noreg, 0, %noreg, %vreg74<kill>
  MOV32mi %vreg75, 1, %noreg, 8, %noreg, 0
  MOV32mi %vreg75<kill>, 1, %noreg, 4, %noreg, 0
  CALLpcrel32 ...

Coalescing these virtual registers early decreases register pressure.
Previously, they were coalesced by RALinScan::attemptTrivialCoalescing after
register allocation was completed.

The lower register pressure causes the mcinst-lowering-cmp0.ll test case to fail
because it depends on linear scan spilling a particular register.

I am deleting 2008-08-05-SpillerBug.ll because it is counting the number of
instructions emitted, and its revision history shows the 'correct' count being
edited many times.

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

13 years agoExtract physreg joining policy to a separate method.
Jakob Stoklund Olesen [Mon, 4 Apr 2011 20:59:59 +0000 (20:59 +0000)]
Extract physreg joining policy to a separate method.

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

13 years agoFix incorrect alignment for NEON VST2b32_UPD.
Johnny Chen [Mon, 4 Apr 2011 20:35:31 +0000 (20:35 +0000)]
Fix incorrect alignment for NEON VST2b32_UPD.

rdar://problem/9225433

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

13 years agoUpdate BreakpointPrinter to emit original function names only.
Devang Patel [Mon, 4 Apr 2011 19:51:17 +0000 (19:51 +0000)]
Update BreakpointPrinter to emit original function names only.

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

13 years agoInsert code in the right location when lowering PowerPC atomics.
Jakob Stoklund Olesen [Mon, 4 Apr 2011 17:57:29 +0000 (17:57 +0000)]
Insert code in the right location when lowering PowerPC atomics.

This causes defs to dominate uses, no instructions after terminators, and other
goodness.

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

13 years agoDisable the PowerPC/Atomics-64 test.
Jakob Stoklund Olesen [Mon, 4 Apr 2011 17:57:26 +0000 (17:57 +0000)]
Disable the PowerPC/Atomics-64 test.

The code inserted by PPCTargetLowering::EmitInstrWithCustomInserter for ppc64 is
wrong, and I don't know how to fix it. It seems to be using the correct register
classes for pointers, but it inserts all 32-bit instructions.

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

13 years agoRemove unused function.
Eric Christopher [Mon, 4 Apr 2011 17:36:11 +0000 (17:36 +0000)]
Remove unused function.

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

13 years ago- Implement asm parsing support for LDRSBT, LDRHT, LDRSHT and STRHT
Bruno Cardoso Lopes [Mon, 4 Apr 2011 17:18:19 +0000 (17:18 +0000)]
- Implement asm parsing support for LDRSBT, LDRHT, LDRSHT and STRHT
  also fix the encoding of the later.
- Add a new encoding bit to describe the index mode used in AM3.
- Teach printAddrMode3Operand to check by the addressing mode which
  index mode to print.
- Testcases.

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

13 years agosilence an unused function warning.
Chris Lattner [Mon, 4 Apr 2011 17:17:57 +0000 (17:17 +0000)]
silence an unused function warning.

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

13 years agoMove transformation of JmpLink and related nodes done during instruction selection...
Akira Hatanaka [Mon, 4 Apr 2011 17:11:07 +0000 (17:11 +0000)]
Move transformation of JmpLink and related nodes done during instruction selection to Legalize phase.

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

13 years agoPowerPC atomic pseudos clobber CR0, they don't read it.
Jakob Stoklund Olesen [Mon, 4 Apr 2011 17:07:09 +0000 (17:07 +0000)]
PowerPC atomic pseudos clobber CR0, they don't read it.

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

13 years agoUse X0 instead of R0 for the zero register on ppc64.
Jakob Stoklund Olesen [Mon, 4 Apr 2011 17:07:06 +0000 (17:07 +0000)]
Use X0 instead of R0 for the zero register on ppc64.

The 32-bit R0 cannot be used where a 64-bit register is expected.

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

13 years agoFix PowerPC tests to be register allocator independent.
Jakob Stoklund Olesen [Mon, 4 Apr 2011 17:07:03 +0000 (17:07 +0000)]
Fix PowerPC tests to be register allocator independent.

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

13 years agoAdd support for the VIA PadLock instructions.
Joerg Sonnenberger [Mon, 4 Apr 2011 16:58:13 +0000 (16:58 +0000)]
Add support for the VIA PadLock instructions.

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

13 years agoUse array_lengthof
Joerg Sonnenberger [Mon, 4 Apr 2011 16:25:38 +0000 (16:25 +0000)]
Use array_lengthof

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

13 years agoExpand Op0Mask by one bit in preparation for the PadLock prefixes.
Joerg Sonnenberger [Mon, 4 Apr 2011 15:58:30 +0000 (15:58 +0000)]
Expand Op0Mask by one bit in preparation for the PadLock prefixes.
Define most shift masks incrementally to reduce the redundant
hard-coding. Introduce new shift for the VEX flags to replace the
magic constant 32 in various places.

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

13 years agoStop caching basic block index ranges now that SlotIndexes can keep up.
Jakob Stoklund Olesen [Mon, 4 Apr 2011 15:32:15 +0000 (15:32 +0000)]
Stop caching basic block index ranges now that SlotIndexes can keep up.

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

13 years agoDelete leftover data members.
Jakob Stoklund Olesen [Mon, 4 Apr 2011 15:32:11 +0000 (15:32 +0000)]
Delete leftover data members.

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

13 years agoChange loops to derive the number of tables automatically
Joerg Sonnenberger [Mon, 4 Apr 2011 14:42:22 +0000 (14:42 +0000)]
Change loops to derive the number of tables automatically

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

13 years agoDragonegg release notes.
Duncan Sands [Mon, 4 Apr 2011 11:09:08 +0000 (11:09 +0000)]
Dragonegg release notes.

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

13 years agoRemove some support for ReturnInsts with multiple operands, and for
Jay Foad [Mon, 4 Apr 2011 07:44:02 +0000 (07:44 +0000)]
Remove some support for ReturnInsts with multiple operands, and for
returning a scalar value in a function whose return type is a single-
element structure or array.

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

13 years agoRegion: Allow user control the printing style of the print function.
Tobias Grosser [Mon, 4 Apr 2011 07:19:18 +0000 (07:19 +0000)]
Region: Allow user control the printing style of the print function.

Contributed by: etherzhhb@gmail.com

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

13 years agoIntrusiveRefCntPtr: in RefCountedBase and RefCountedBaseVPTR, make
Peter Collingbourne [Mon, 4 Apr 2011 00:57:03 +0000 (00:57 +0000)]
IntrusiveRefCntPtr: in RefCountedBase and RefCountedBaseVPTR, make
ref_cnt mutable and Retain/Release const to enable reference counted
pointers to const objects

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

13 years agoAttempt to fix breakage from r128782 reported by Francois Pichet on
Eli Friedman [Mon, 4 Apr 2011 00:37:38 +0000 (00:37 +0000)]
Attempt to fix breakage from r128782 reported by Francois Pichet on
llvm-commits.  (Not sure why it only breaks on Windows; maybe it has
something to do with the iterator representation...)

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

13 years agoStart migrating mach-o dumping facilities to the object file out of a
Eric Christopher [Sun, 3 Apr 2011 23:51:47 +0000 (23:51 +0000)]
Start migrating mach-o dumping facilities to the object file out of a
separate executable.

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

13 years agoMove Object.cpp out of VMCore and into Object.
Eric Christopher [Sun, 3 Apr 2011 23:07:51 +0000 (23:07 +0000)]
Move Object.cpp out of VMCore and into Object.

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

13 years agoAssorted bugfixes in object file handling:
Eric Christopher [Sun, 3 Apr 2011 22:53:19 +0000 (22:53 +0000)]
Assorted bugfixes in object file handling:

 - Adds support for sniffing PE/COFF files on win32 (.exe and .dll)
   which are COFF files that have an MS-DOS compatibility stub on
   the front of them.

 - Fixes a bug in the COFFObjectFile's support for the Microsoft COFF
   extension for long symbol names, wherein it was attempting to parse
   the leading '/' in an extended symbol name reference as part of the
   integer offset.

 - Fixes bugs in COFFObjectFile and ELFObjectFile wherein section
   and symbol iterators were being returned with uninitialized bytes;
   the type DataRefImpl is a union between 2 32-bit words (d.a and d.b)
   and a single intptr_t word (p). Only p was being initialized, so in
   32-bit builds the result would be iterators with random upper 32-bit
   words in their DataRefImpls. This caused random failures when
   seeking around in object files.

Patch by Graydon Hoare!

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

13 years agoAdd a set of C bindings for the Object interface.
Eric Christopher [Sun, 3 Apr 2011 22:34:07 +0000 (22:34 +0000)]
Add a set of C bindings for the Object interface.

Patch by Patrick Walton!

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

13 years agoRemove the LLVMContext& arguments from *Folder constructors, as they don't seem to...
Frits van Bommel [Sun, 3 Apr 2011 19:46:28 +0000 (19:46 +0000)]
Remove the LLVMContext& arguments from *Folder constructors, as they don't seem to be used anywhere.

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

13 years agoFix typos on LLVM.cmake. Export LLVM_ON_UNIX & LLVM_ON_WIN32.
Oscar Fuentes [Sun, 3 Apr 2011 16:12:38 +0000 (16:12 +0000)]
Fix typos on LLVM.cmake. Export LLVM_ON_UNIX & LLVM_ON_WIN32.

Patch by arrowdodger!

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

13 years agoPR9446: RecursivelyDeleteTriviallyDeadInstructions can delete the instruction
Eli Friedman [Sat, 2 Apr 2011 22:45:17 +0000 (22:45 +0000)]
PR9446: RecursivelyDeleteTriviallyDeadInstructions can delete the instruction
after the given instruction; make sure to handle that case correctly.
(It's difficult to trigger; the included testcase involves a dead
block, but I don't think that's a requirement.)

While I'm here, get rid of the unnecessary warning about
SimplifyInstructionsInBlock, since it should work correctly as far as I know.

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

13 years agoDon't assume something which might be a constant expression is an instruction.
Eli Friedman [Sat, 2 Apr 2011 22:11:56 +0000 (22:11 +0000)]
Don't assume something which might be a constant expression is an instruction.
Based on PR9429, but no testcase because I can't figure out how to trigger it
anymore given other changes to the relevant code.

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

13 years agoWhile SimplifyDemandedBits constant folds this, we can't rely on it here.
Benjamin Kramer [Sat, 2 Apr 2011 18:50:58 +0000 (18:50 +0000)]
While SimplifyDemandedBits constant folds this, we can't rely on it here.

It's possible to craft an input that hits the recursion limits in a way
that SimplifyDemandedBits doesn't simplify the icmp but ComputeMaskedBits
can infer which bits are zero.

No test case as it depends on too many other things. Fixes PR9609.

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

13 years agoHandle changing of LLVM_ENABLE_FFI.
Oscar Fuentes [Sat, 2 Apr 2011 13:21:12 +0000 (13:21 +0000)]
Handle changing of LLVM_ENABLE_FFI.

If someone first configure build with LLVM_ENABLE_FFI=1 and then turn it
off, the build will fail in lib/ExecutionEngine/Interpreter because
Interpreter will try still to #include <ffi/ffi.h>, but there are no
include_directories(${FFI_INCLUDE_DIR}) now.

This patch unset()'s HAVE_FFI_H and HAVE_FFI_FFI_H from cache file if
LLVM_ENABLE_FFI=0. This forces CMake to update config.h.

Patch by arrowdodger!

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

13 years agoptx: support setp's 4-operand format
Che-Liang Chiou [Sat, 2 Apr 2011 08:51:39 +0000 (08:51 +0000)]
ptx: support setp's 4-operand format

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

13 years agoUse InterferenceCache in RegAllocGreedy.
Jakob Stoklund Olesen [Sat, 2 Apr 2011 06:03:38 +0000 (06:03 +0000)]
Use InterferenceCache in RegAllocGreedy.

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

13 years agoAdd an InterferenceCache class for caching per-block interference ranges.
Jakob Stoklund Olesen [Sat, 2 Apr 2011 06:03:35 +0000 (06:03 +0000)]
Add an InterferenceCache class for caching per-block interference ranges.

When the greedy register allocator is splitting multiple global live ranges, it
tends to look at the same interference data many times. The InterferenceCache
class caches queries for unaltered LiveIntervalUnions.

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

13 years agoUse basic block numbers as indexes when mapping slot index ranges.
Jakob Stoklund Olesen [Sat, 2 Apr 2011 06:03:31 +0000 (06:03 +0000)]
Use basic block numbers as indexes when mapping slot index ranges.

This is more compact and faster than using DenseMap.

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

13 years agoDo some peephole optimizations to remove pointless VMOVs from Neon to integer
Cameron Zwarich [Sat, 2 Apr 2011 02:40:43 +0000 (02:40 +0000)]
Do some peephole optimizations to remove pointless VMOVs from Neon to integer
registers that arise from argument shuffling with the soft float ABI. These
instructions are particularly slow on Cortex A8. This fixes one half of
<rdar://problem/8674845>.

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

13 years agoAdd a RemoveFromWorklist method to DCI. This is needed to do some complicated
Cameron Zwarich [Sat, 2 Apr 2011 02:40:26 +0000 (02:40 +0000)]
Add a RemoveFromWorklist method to DCI. This is needed to do some complicated
transformations in target-specific DAG combines without causing DAGCombiner to
delete the same node twice. If you know of a better way to avoid this (see my
next patch for an example), please let me know.

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

13 years agoFixed a bug in disassembly of STR_POST, where the immediate is the second operand...
Johnny Chen [Sat, 2 Apr 2011 02:24:54 +0000 (02:24 +0000)]
Fixed a bug in disassembly of STR_POST, where the immediate is the second operand in am2offset;
instead of the second operand in addrmode_imm12.

rdar://problem/9225289

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

13 years agoUndo changes mistakenly made in revision 128750.
Akira Hatanaka [Sat, 2 Apr 2011 00:26:12 +0000 (00:26 +0000)]
Undo changes mistakenly made in revision 128750.

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

13 years agoInsert space before ';' to prevent warnings.
Akira Hatanaka [Sat, 2 Apr 2011 00:15:58 +0000 (00:15 +0000)]
Insert space before ';' to prevent warnings.

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

13 years agoFixed MOVr for "should be" encoding bits for Inst{19-16} = 0b0000.
Johnny Chen [Fri, 1 Apr 2011 23:30:25 +0000 (23:30 +0000)]
Fixed MOVr for "should be" encoding bits for Inst{19-16} = 0b0000.

rdar://problem/9224276

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

13 years agoMOVs should have Inst{19-16} as 0b0000, otherwise, the instruction is UNPREDICTABLE.
Johnny Chen [Fri, 1 Apr 2011 23:15:50 +0000 (23:15 +0000)]
MOVs should have Inst{19-16} as 0b0000, otherwise, the instruction is UNPREDICTABLE.

rdar://problem/9224120

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