oota-llvm.git
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

13 years agoModify the wrong logic in the assert of DisassembleThumb2LdStDual() (the register...
Johnny Chen [Fri, 25 Mar 2011 01:09:48 +0000 (01:09 +0000)]
Modify the wrong logic in the assert of DisassembleThumb2LdStDual() (the register classes were changed),
modify the comment to be up-to-date, and add a test case for A8.6.66 LDRD (immediate) Encoding T1.

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

13 years agodelegate the disassembly of t2ADR to the more generic t2ADDri12/t2SUBri12 instruction...
Johnny Chen [Fri, 25 Mar 2011 00:17:42 +0000 (00:17 +0000)]
delegate the disassembly of t2ADR to the more generic t2ADDri12/t2SUBri12 instructions, and add a test case for that.

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

13 years agoThe opcode names ("tLDM", "tLDM_UPD") used for conflict resolution have been stale...
Johnny Chen [Thu, 24 Mar 2011 23:42:31 +0000 (23:42 +0000)]
The opcode names ("tLDM", "tLDM_UPD") used for conflict resolution have been stale since
the change to ("tLDMIA", "tLDMIA_UPD").  Update the conflict resolution code and add
test cases for that.

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

13 years agoThe ARM disassembler was confused with the 16-bit tSTMIA instruction.
Johnny Chen [Thu, 24 Mar 2011 23:21:14 +0000 (23:21 +0000)]
The ARM disassembler was confused with the 16-bit tSTMIA instruction.
According to A8.6.189 STM/STMIA/STMEA (Encoding T1), there's only tSTMIA_UPD available.
Ignore tSTMIA for the decoder emitter and add a test case for that.

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

13 years agoMove test in x86 specific area.
Devang Patel [Thu, 24 Mar 2011 22:39:09 +0000 (22:39 +0000)]
Move test in x86 specific area.

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

13 years agoSuppress an unused variable warning in -asserts builds
Matt Beaumont-Gay [Thu, 24 Mar 2011 22:05:48 +0000 (22:05 +0000)]
Suppress an unused variable warning in -asserts builds

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

13 years agoHandle the added VBICiv*i* NEON instructions, too.
Johnny Chen [Thu, 24 Mar 2011 22:04:39 +0000 (22:04 +0000)]
Handle the added VBICiv*i* NEON instructions, too.

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

13 years agoTestcase for llvm-gcc commit r128230.
Eric Christopher [Thu, 24 Mar 2011 21:59:03 +0000 (21:59 +0000)]
Testcase for llvm-gcc commit r128230.

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

13 years agoPlug a leak by ThumbDisassembler::getInstruction(), thanks to Benjamin Kramer!
Johnny Chen [Thu, 24 Mar 2011 21:42:55 +0000 (21:42 +0000)]
Plug a leak by ThumbDisassembler::getInstruction(), thanks to Benjamin Kramer!

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

13 years agoT2 Load/Store Multiple:
Johnny Chen [Thu, 24 Mar 2011 21:36:56 +0000 (21:36 +0000)]
T2 Load/Store Multiple:
These instructions were changed to not embed the addressing mode within the MC instructions
We also need to update the corresponding assert stmt.  Also add a test case.

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

13 years agoPlug a leak in the arm disassembler and put the tests back.
Benjamin Kramer [Thu, 24 Mar 2011 21:14:28 +0000 (21:14 +0000)]
Plug a leak in the arm disassembler and put the tests back.

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

13 years agoAdd asm parsing support w/ testcases for strex/ldrex family of instructions
Bruno Cardoso Lopes [Thu, 24 Mar 2011 21:04:58 +0000 (21:04 +0000)]
Add asm parsing support w/ testcases for strex/ldrex family of instructions

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

13 years agoRemove these two test files as they cause llvm-i686-linux-vg_leak build to fail ...
Johnny Chen [Thu, 24 Mar 2011 20:56:23 +0000 (20:56 +0000)]
Remove these two test files as they cause llvm-i686-linux-vg_leak build to fail 'test-llvm'.
These two are test cases which should result in 'invalid instruction encoding' from running llvm-mc -disassemble.

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

13 years agoADR was added with the wrong encoding for inst{24-21}, and the ARM decoder was fooled.
Johnny Chen [Thu, 24 Mar 2011 20:42:48 +0000 (20:42 +0000)]
ADR was added with the wrong encoding for inst{24-21}, and the ARM decoder was fooled.
Set the encoding bits to {0,?,?,0}, not 0.  Plus delegate the disassembly of ADR to
the more generic ADDri/SUBri instructions, and add a test case for that.

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

13 years agoKeep track of directory namd and fIx regression caused by Rafael's patch r119613.
Devang Patel [Thu, 24 Mar 2011 20:30:50 +0000 (20:30 +0000)]
Keep track of directory namd and fIx regression caused by Rafael's patch r119613.

A better approach would be to move source id handling inside MC.

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

13 years agoClean up assembly statement separator support.
Jim Grosbach [Thu, 24 Mar 2011 18:46:34 +0000 (18:46 +0000)]
Clean up assembly statement separator support.

The MC asm lexer wasn't honoring a non-default (anything but ';') statement
separator. Fix that, and generalize a bit to support multi-character
statement separators.

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

13 years agoThe r118201 added support for VORR (immediate). Update ARMDisassemblerCore.cpp to...
Johnny Chen [Thu, 24 Mar 2011 18:40:38 +0000 (18:40 +0000)]
The r118201 added support for VORR (immediate).  Update ARMDisassemblerCore.cpp to disassemble the
VORRiv*i* instructions properly within the DisassembleN1RegModImmFrm() function.  Add a test case.

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

13 years agoAdd comments to the handling of opcode CPS3p to reject invalid instruction encoding,
Johnny Chen [Thu, 24 Mar 2011 17:04:22 +0000 (17:04 +0000)]
Add comments to the handling of opcode CPS3p to reject invalid instruction encoding,
a test case of invalid CPS3p encoding and one for invalid VLDMSDB due to regs out of range.

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

13 years agorevert r128199 until it can be made to work with Frontend/dependency-gen.c.
Andrew Trick [Thu, 24 Mar 2011 16:43:37 +0000 (16:43 +0000)]
revert r128199 until it can be made to work with Frontend/dependency-gen.c.

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

13 years agoDebug intrinsics must be skipped at the beginning and ends of blocks, lest they
Cameron Zwarich [Thu, 24 Mar 2011 16:34:59 +0000 (16:34 +0000)]
Debug intrinsics must be skipped at the beginning and ends of blocks, lest they
affect the generated code.

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

13 years agoFix typo in comment.
Jay Foad [Thu, 24 Mar 2011 16:18:19 +0000 (16:18 +0000)]
Fix typo in comment.

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

13 years agofix description, PR9542
Chris Lattner [Thu, 24 Mar 2011 16:13:31 +0000 (16:13 +0000)]
fix description, PR9542

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

13 years agoIt is enough for the CallInst to have no uses to be made a tail call with a ret
Cameron Zwarich [Thu, 24 Mar 2011 15:54:11 +0000 (15:54 +0000)]
It is enough for the CallInst to have no uses to be made a tail call with a ret
void; it doesn't need to have a void type.

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

13 years agos/UpdateDT/ModifiedDT/g
Devang Patel [Thu, 24 Mar 2011 15:35:25 +0000 (15:35 +0000)]
s/UpdateDT/ModifiedDT/g

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

13 years agoTarget/X86: [PR8777][PR8778] Tweak alloca/chkstk for Windows targets.
NAKAMURA Takumi [Thu, 24 Mar 2011 07:07:00 +0000 (07:07 +0000)]
Target/X86: [PR8777][PR8778] Tweak alloca/chkstk for Windows targets.

FIXME: Some cleanups would be needed.

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

13 years agollvm-stub.cpp: mingw-w64 tweak.
NAKAMURA Takumi [Thu, 24 Mar 2011 07:06:45 +0000 (07:06 +0000)]
llvm-stub.cpp: mingw-w64 tweak.

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

13 years agoAdd comment to clarify what MachineConstantPoolEntry::isMachineConstantPoolEntry...
Evan Cheng [Thu, 24 Mar 2011 06:28:45 +0000 (06:28 +0000)]
Add comment to clarify what MachineConstantPoolEntry::isMachineConstantPoolEntry() means.

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

13 years agoNasty bug in ARMBaseInstrInfo::produceSameValue(). The MachineConstantPoolEntry
Evan Cheng [Thu, 24 Mar 2011 06:20:03 +0000 (06:20 +0000)]
Nasty bug in ARMBaseInstrInfo::produceSameValue(). The MachineConstantPoolEntry
entries being compared may not be ARMConstantPoolValue. Without checking
whether they are ARMConstantPoolValue first, and if the stars and moons
are aligned properly, the equality test may return true (when the first few
words of two Constants' values happen to be identical) and very bad things can
happen.

rdar://9125354

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

13 years agoRemove all uses of PATH_MAX and MAXPATHLEN from PathV2.
Michael J. Spencer [Thu, 24 Mar 2011 05:23:40 +0000 (05:23 +0000)]
Remove all uses of PATH_MAX and MAXPATHLEN from PathV2.

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

13 years agoDo early taildup of ret in CodeGenPrepare for potential tail calls that have a
Cameron Zwarich [Thu, 24 Mar 2011 04:52:10 +0000 (04:52 +0000)]
Do early taildup of ret in CodeGenPrepare for potential tail calls that have a
void return type. This fixes PR9487.

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

13 years agoUse an early return instead of a long if block.
Cameron Zwarich [Thu, 24 Mar 2011 04:52:07 +0000 (04:52 +0000)]
Use an early return instead of a long if block.

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

13 years agoWhen UpdateDT is set, DT is invalid, which could cause problems when trying to
Cameron Zwarich [Thu, 24 Mar 2011 04:52:04 +0000 (04:52 +0000)]
When UpdateDT is set, DT is invalid, which could cause problems when trying to
use it later. I couldn't make a test that hits this with the current code.

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

13 years agoCheck for TLI so that -codegenprepare can be used from opt.
Cameron Zwarich [Thu, 24 Mar 2011 04:51:51 +0000 (04:51 +0000)]
Check for TLI so that -codegenprepare can be used from opt.

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

13 years agoCPS3p: Let's reject impossible imod values by returning false from the DisassembleMis...
Johnny Chen [Thu, 24 Mar 2011 02:24:36 +0000 (02:24 +0000)]
CPS3p: Let's reject impossible imod values by returning false from the DisassembleMiscFrm() function.

Fixed rdar://problem/9179416 ARM disassembler crash: "Unknown imod operand" (fuzz testing)

Opcode=98 Name=CPS3p Format=ARM_FORMAT_MISCFRM(26)
 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
-------------------------------------------------------------------------------------------------
| 1: 1: 1: 1| 0: 0: 0: 1| 0: 0: 0: 0| 0: 0: 1: 0| 0: 0: 0: 1| 1: 1: 0: 0| 1: 0: 0: 1| 0: 0: 1: 1|
-------------------------------------------------------------------------------------------------

Before:
cpsUnknown imod operand
UNREACHABLE executed at /Volumes/data/lldb/llvm/lib/Target/ARM/InstPrinter/../ARMBaseInfo.h:123!

After:
/Volumes/data/Radar/9179416/mc-input-arm.txt:1:1: warning: invalid instruction encoding
0x93 0x1c 0x2 0xf1
^

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

13 years agoLoad/Store Multiple:
Johnny Chen [Thu, 24 Mar 2011 01:40:42 +0000 (01:40 +0000)]
Load/Store Multiple:
These instructions were changed to not embed the addressing mode within the MC instructions
We also need to update the corresponding assert stmt.  Also add two test cases.

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

13 years agoSTRT and STRBT was incorrectly tagged as IndexModeNone during the refactorings (r119821).
Johnny Chen [Thu, 24 Mar 2011 01:07:26 +0000 (01:07 +0000)]
STRT and STRBT was incorrectly tagged as IndexModeNone during the refactorings (r119821).
We now tag them as IndexModePost.

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

13 years agoThe r128103 fix to cope with the removal of addressing modes from the MC instructions
Johnny Chen [Thu, 24 Mar 2011 00:28:38 +0000 (00:28 +0000)]
The r128103 fix to cope with the removal of addressing modes from the MC instructions
were incomplete.  The assert stmt needs to be updated and the operand index incrment is wrong.
Fix the bad logic and add some sanity checking to detect bad instruction encoding;
and add a test case.

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

13 years agoRuntime dylib simple ARM 24-bit branch relocation support.
Jim Grosbach [Wed, 23 Mar 2011 23:35:17 +0000 (23:35 +0000)]
Runtime dylib simple ARM 24-bit branch relocation support.

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

13 years agoEnable GlobalMerge on darwin.
Devang Patel [Wed, 23 Mar 2011 23:34:19 +0000 (23:34 +0000)]
Enable GlobalMerge on darwin.

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

13 years agoFix comments.
Jim Grosbach [Wed, 23 Mar 2011 23:32:48 +0000 (23:32 +0000)]
Fix comments.

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

13 years agoRevert r128175.
Andrew Trick [Wed, 23 Mar 2011 23:11:02 +0000 (23:11 +0000)]
Revert r128175.

I'm backing this out for the second time. It was supposed to be fixed by r128164, but the mingw self-host must be defeating the fix.

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

13 years agoCmp peephole optimization isn't always safe for signed arithmetics.
Evan Cheng [Wed, 23 Mar 2011 22:52:04 +0000 (22:52 +0000)]
Cmp peephole optimization isn't always safe for signed arithmetics.

int tries = INT_MAX;
while (tries > 0) {
      tries--;
}

The check should be:
        subs    r4, #1
        cmp     r4, #0
        bgt     LBB0_1

The subs can set the overflow V bit when r4 is INT_MAX+1 (which loop
canonicalization apparently does in this case). cmp #0 would have cleared
it while not changing the N and Z bits. Since BGT is dependent on the V
bit, i.e. (N == V) && !Z, it is not safe to eliminate the cmp #0.

rdar://9172742

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

13 years agoPR9535: add support for splitting and scalarizing vector ISD::FP_ROUND.
Eli Friedman [Wed, 23 Mar 2011 22:18:48 +0000 (22:18 +0000)]
PR9535: add support for splitting and scalarizing vector ISD::FP_ROUND.

Also cleaning up some duplicated code while I'm here.

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

13 years agoReapply Eli's r127852 now that the pre-RA scheduler can spill EFLAGS.
Andrew Trick [Wed, 23 Mar 2011 22:16:02 +0000 (22:16 +0000)]
Reapply Eli's r127852 now that the pre-RA scheduler can spill EFLAGS.
(target-specific branchless method for double-width relational comparisons on x86)

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

13 years agoSplit out relocation resolution into target-specific bits.
Jim Grosbach [Wed, 23 Mar 2011 22:06:06 +0000 (22:06 +0000)]
Split out relocation resolution into target-specific bits.

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

13 years agoThe high bit of a Thumb2 ADR's offset is stored in bit 26, not bit 25.
Owen Anderson [Wed, 23 Mar 2011 22:03:44 +0000 (22:03 +0000)]
The high bit of a Thumb2 ADR's offset is stored in bit 26, not bit 25.
This fixes 464.h264ref with the integrated assembler.

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

13 years agoFix double-free of Module.
Jim Grosbach [Wed, 23 Mar 2011 21:35:02 +0000 (21:35 +0000)]
Fix double-free of Module.

The ExecutionEngine constructor already added the module, so there's no
need to call addModule() directly. Doing so causes a double-free of the
Module at program termination.

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

13 years agoFix a bug introduced by my patch yesterday: BL is a 4-byte instructions like BLX...
Owen Anderson [Wed, 23 Mar 2011 21:19:56 +0000 (21:19 +0000)]
Fix a bug introduced by my patch yesterday: BL is a 4-byte instructions like BLX, rather than a 2-byte instruction like B.

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

13 years agoEnsure that def-side physreg copies are scheduled above any other uses
Andrew Trick [Wed, 23 Mar 2011 20:42:39 +0000 (20:42 +0000)]
Ensure that def-side physreg copies are scheduled above any other uses
so the scheduler can't create new interferences on the copies
themselves. Prior to this fix the scheduler could get stuck in a loop
creating copies.
Fixes PR9509.

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

13 years agowhitespace
Andrew Trick [Wed, 23 Mar 2011 20:40:18 +0000 (20:40 +0000)]
whitespace

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

13 years agoStart of relocation resolution for the runtime dyld library.
Jim Grosbach [Wed, 23 Mar 2011 19:52:00 +0000 (19:52 +0000)]
Start of relocation resolution for the runtime dyld library.

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

13 years agoMake sure to report any errors from the runtime dyld.
Jim Grosbach [Wed, 23 Mar 2011 19:51:34 +0000 (19:51 +0000)]
Make sure to report any errors from the runtime dyld.

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

13 years agoDon't coalesce identical DBG_VALUE instructions prematurely.
Jakob Stoklund Olesen [Wed, 23 Mar 2011 18:37:30 +0000 (18:37 +0000)]
Don't coalesce identical DBG_VALUE instructions prematurely.

Each of these instructions may have a RegsClobberInsn entry that can't be
ignored. Consecutive ranges are coalesced later when DwarfDebug::emitDebugLoc
merges entries.

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

13 years agoSupports building with a list of targets that does not contain
Oscar Fuentes [Wed, 23 Mar 2011 17:42:13 +0000 (17:42 +0000)]
Supports building with a list of targets that does not contain
X86. Fixes PR9533.

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

13 years agoPTX: Improve support for 64-bit addressing
Justin Holewinski [Wed, 23 Mar 2011 16:58:51 +0000 (16:58 +0000)]
PTX: Improve support for 64-bit addressing

- Fix bug in ADDRrr/ADDRri/ADDRii selection for 64-bit addresses
- Add comparison selection for i64
- Add zext selection for i32 -> i64
- Add shl/shr/sha support for i64

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

13 years agoRevert r128140 for now.
Anders Carlsson [Wed, 23 Mar 2011 15:51:12 +0000 (15:51 +0000)]
Revert r128140 for now.

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

13 years agoFix PR9464 by correcting some math that just happened to be right in most cases
Cameron Zwarich [Wed, 23 Mar 2011 05:25:55 +0000 (05:25 +0000)]
Fix PR9464 by correcting some math that just happened to be right in most cases
that were hit in practice.

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

13 years agoNotify the delegate before removing dead values from a live interval.
Jakob Stoklund Olesen [Wed, 23 Mar 2011 04:43:16 +0000 (04:43 +0000)]
Notify the delegate before removing dead values from a live interval.

The register allocator needs to know when the range shrinks.

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

13 years agoAllow the allocation of empty live ranges that have uses.
Jakob Stoklund Olesen [Wed, 23 Mar 2011 04:32:51 +0000 (04:32 +0000)]
Allow the allocation of empty live ranges that have uses.

Empty ranges may represent undef values.

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

13 years agoDump the register map before rewriting.
Jakob Stoklund Olesen [Wed, 23 Mar 2011 04:32:49 +0000 (04:32 +0000)]
Dump the register map before rewriting.

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

13 years agoA global variable with internal linkage where all uses are in one function and whose...
Anders Carlsson [Wed, 23 Mar 2011 02:19:48 +0000 (02:19 +0000)]
A global variable with internal linkage where all uses are in one function and whose address is never taken is a non-escaping local object and can't alias anything else.

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

13 years agoAdded block number and name to isel debug output.
Andrew Trick [Wed, 23 Mar 2011 01:38:28 +0000 (01:38 +0000)]
Added block number and name to isel debug output.

I'm tired of doing this manually for each checkout.
If anyone knows a better way debug isel for non-trivial tests feel
free to revert and let me know how to do it.

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

13 years agoUpdate the Clang attribute emitter to handle attributes of 'version'
Douglas Gregor [Wed, 23 Mar 2011 01:05:46 +0000 (01:05 +0000)]
Update the Clang attribute emitter to handle attributes of 'version'
kind, and fix serialization/deserialization of IdentifierInfo
attributes. These are requires for the new 'availability' attribute.

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

13 years agoFor ARM Disassembler, start a newline to dump the opcode and friends for an instruction.
Johnny Chen [Tue, 22 Mar 2011 23:49:46 +0000 (23:49 +0000)]
For ARM Disassembler, start a newline to dump the opcode and friends for an instruction.
Change inspired by llvm-bug 9530 submitted by Jyun-Yan You.

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

13 years agoAdd disassembly test cases for:
Johnny Chen [Tue, 22 Mar 2011 23:08:56 +0000 (23:08 +0000)]
Add disassembly test cases for:

A8.6.292 VCMPE

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

13 years agoRemove the test.
Devang Patel [Tue, 22 Mar 2011 23:07:03 +0000 (23:07 +0000)]
Remove the test.

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

13 years agoRIT_ARM_ThumbBranch32Bit relocations are not used and should never be generated.
Owen Anderson [Tue, 22 Mar 2011 22:52:54 +0000 (22:52 +0000)]
RIT_ARM_ThumbBranch32Bit relocations are not used and should never be generated.
This fixes kimwitu++, bullet, and tramp3dv4 with the ARM integrated assembler.
Fixes <rdar://problem/9165738>.

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

13 years agoReapply r128045 and r128051 with fixes.
Jakob Stoklund Olesen [Tue, 22 Mar 2011 22:33:08 +0000 (22:33 +0000)]
Reapply r128045 and r128051 with fixes.

This will extend the ranges of debug info variables in registers until they are
clobbered.

Fix 1: Don't mistake DBG_VALUE instructions referring to incoming arguments on
the stack with DBG_VALUE instructions referring to variables in the frame
pointer. This fixes the gdb test-suite failure.

Fix 2: Don't trace through copies to physical registers setting up call
arguments. These registers are call clobbered, and the source register is more
likely to be a callee-saved register that can be extended through the call
instruction.

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

13 years agoLDRT and LDRBT was incorrectly tagged as IndexModeNone during the refactorings (r119821).
Johnny Chen [Tue, 22 Mar 2011 22:28:49 +0000 (22:28 +0000)]
LDRT and LDRBT was incorrectly tagged as IndexModeNone during the refactorings (r119821).
We now tag them as IndexModePost.

This fixed http://llvm.org/bugs/show_bug.cgi?id=9530.

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

13 years agoTry to appease buildbot gods.
Devang Patel [Tue, 22 Mar 2011 22:13:17 +0000 (22:13 +0000)]
Try to appease buildbot gods.

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

13 years agoAdd a lto_codegen_compile_to_file to avoid producing a file, reading it to
Rafael Espindola [Tue, 22 Mar 2011 20:57:13 +0000 (20:57 +0000)]
Add a lto_codegen_compile_to_file to avoid producing a file, reading it to
memory and writing it back to disk.

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

13 years agoA bit more analysis of a memset-related README entry.
Eli Friedman [Tue, 22 Mar 2011 20:49:53 +0000 (20:49 +0000)]
A bit more analysis of a memset-related README entry.

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

13 years agoAdd one more test case for VFP Load/Store Multiple (vpop).
Johnny Chen [Tue, 22 Mar 2011 20:21:08 +0000 (20:21 +0000)]
Add one more test case for VFP Load/Store Multiple (vpop).

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

13 years agoA8.6.399 VSTM:
Johnny Chen [Tue, 22 Mar 2011 20:00:10 +0000 (20:00 +0000)]
A8.6.399 VSTM:
VFP Load/Store Multiple Instructions used to embed the IA/DB addressing mode within the
MC instruction; that has been changed so that now, for example, VSTMDDB_UPD and VSTMDIA_UPD
are two instructions.  Update the ARMDisassemblerCore.cpp's DisassembleVFPLdStMulFrm()
to reflect the change.

Also add a test case.

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

13 years agoMigrate the fix in r128041 to ARM's fastisel support as well.
Eric Christopher [Tue, 22 Mar 2011 19:39:17 +0000 (19:39 +0000)]
Migrate the fix in r128041 to ARM's fastisel support as well.

Fixes rdar://9169640

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

13 years agoWe don't need a null terminator for the output file.
Rafael Espindola [Tue, 22 Mar 2011 19:20:47 +0000 (19:20 +0000)]
We don't need a null terminator for the output file.

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

13 years agoRevert r128045 and r128051, debug info enhancements.
Andrew Trick [Tue, 22 Mar 2011 19:18:42 +0000 (19:18 +0000)]
Revert r128045 and r128051, debug info enhancements.

Temporarily reverting these to see if we can get llvm-objdump to link. Hopefully this is not the problem.

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

13 years agoTidy up.
Jim Grosbach [Tue, 22 Mar 2011 18:22:27 +0000 (18:22 +0000)]
Tidy up.

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

13 years agoAdd missing file from previous commit.
Jim Grosbach [Tue, 22 Mar 2011 18:21:14 +0000 (18:21 +0000)]
Add missing file from previous commit.

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

13 years agoPropogate the error message, not just the error state.
Jim Grosbach [Tue, 22 Mar 2011 18:19:42 +0000 (18:19 +0000)]
Propogate the error message, not just the error state.

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

13 years agoAdd simple arg passing to MC-JIT and support for exit() call.
Jim Grosbach [Tue, 22 Mar 2011 18:05:27 +0000 (18:05 +0000)]
Add simple arg passing to MC-JIT and support for exit() call.

Support argument passing simple, common, prototypes directly. More
complicated scenarios will require building up a stub function, which the
MC-JIT isn't set up to handle yet.

Add Intercept.cpp, which is just a copy from ExecutionEngine/JIT for now,
to handle looking looking up external symbol names. This probably more
properly belongs as part of RuntimeDyld. It'll migrate there as things
flesh out more fully.

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

13 years agoTrailing whitespace.
Jim Grosbach [Tue, 22 Mar 2011 15:21:58 +0000 (15:21 +0000)]
Trailing whitespace.

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

13 years agoChange MRC and MRC2 instructions to model the output register properly
Bruno Cardoso Lopes [Tue, 22 Mar 2011 15:06:24 +0000 (15:06 +0000)]
Change MRC and MRC2 instructions to model the output register properly

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

13 years agoptx: add analyze/insert/remove branch
Che-Liang Chiou [Tue, 22 Mar 2011 14:12:00 +0000 (14:12 +0000)]
ptx: add analyze/insert/remove branch

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

13 years agoFix comment in header.
Eric Christopher [Tue, 22 Mar 2011 08:49:56 +0000 (08:49 +0000)]
Fix comment in header.

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

13 years agoProperly initialize all fields in CrashReporterCleanupContext. This caused the build...
Ted Kremenek [Tue, 22 Mar 2011 04:33:13 +0000 (04:33 +0000)]
Properly initialize all fields in CrashReporterCleanupContext.  This caused the buildbot failure earlier.

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

13 years agoUpdated library dependencies.
Oscar Fuentes [Tue, 22 Mar 2011 03:58:55 +0000 (03:58 +0000)]
Updated library dependencies.

Now we can remove RuntimeDyld from the LLVM_LINK_COMPONENTS of
tools/lli. CMakeLists.txt LLVM_LINK_COMPONENTS shall not differ from
its companion Makefile LINK_COMPONENTS.

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

13 years agoHandle another case that Frits suggested.
Anders Carlsson [Tue, 22 Mar 2011 03:21:01 +0000 (03:21 +0000)]
Handle another case that Frits suggested.

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

13 years agoUpdate link components.
Jim Grosbach [Tue, 22 Mar 2011 03:10:14 +0000 (03:10 +0000)]
Update link components.

Also perform the required dark rituals and sacrifices to placate the buildbot
spirits. We shall see if they are appeased...

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

13 years agoTemporarily stop recovering resources in CrashRecoveryContext while I investigate...
Ted Kremenek [Tue, 22 Mar 2011 02:06:32 +0000 (02:06 +0000)]
Temporarily stop recovering resources in CrashRecoveryContext while I investigate further why this works on my machine and not on others.

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