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

13 years agoRework CrashRecoveryContextCleanup to provide a simpler way to create cleanup objects...
Ted Kremenek [Tue, 22 Mar 2011 01:15:10 +0000 (01:15 +0000)]
Rework CrashRecoveryContextCleanup to provide a simpler way to create cleanup objects, and provide a new cleanup for
decrementing reference counts of objects with intrusive reference counts.

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

13 years agoRelax access control on 'Release' method of RefCountedBase.
Ted Kremenek [Tue, 22 Mar 2011 01:15:07 +0000 (01:15 +0000)]
Relax access control on 'Release' method of RefCountedBase.

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

13 years agoHook up the MCJIT to the RuntimeDyld library.
Jim Grosbach [Tue, 22 Mar 2011 01:06:42 +0000 (01:06 +0000)]
Hook up the MCJIT to the RuntimeDyld library.

Lots of cleanup to make the interfaces prettier, use the JITMemoryManager,
handle multiple functions and modules, etc.. This gets far enough that
the MCJIT compiles and runs code, though.

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

13 years agoClear map after use.
Jakob Stoklund Olesen [Tue, 22 Mar 2011 01:03:24 +0000 (01:03 +0000)]
Clear map after use.

This is likely to fix the segfault in llvm-gcc-x86_64-darwin10-cross-mingw32.

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

13 years agoInitialize HasError.
Jim Grosbach [Tue, 22 Mar 2011 00:42:19 +0000 (00:42 +0000)]
Initialize HasError.

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

13 years agoAvoid -Wunused-variable in -asserts builds
Matt Beaumont-Gay [Tue, 22 Mar 2011 00:37:28 +0000 (00:37 +0000)]
Avoid -Wunused-variable in -asserts builds

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

13 years agoDont emit 'DBG_VALUE %noreg, ...' to terminate user variable ranges.
Jakob Stoklund Olesen [Tue, 22 Mar 2011 00:21:41 +0000 (00:21 +0000)]
Dont emit 'DBG_VALUE %noreg, ...' to terminate user variable ranges.

These ranges get completely jumbled by the post-ra scheduler, and it is not
really reasonable to expect it to make sense of them.

Instead, teach DwarfDebug to notice when user variables in registers are
clobbered, and terminate the ranges there.

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

13 years agoFix fast-isel address mode folding to avoid folding instructions
Dan Gohman [Tue, 22 Mar 2011 00:04:35 +0000 (00:04 +0000)]
Fix fast-isel address mode folding to avoid folding instructions
outside of the current basic block. This fixes PR9500, rdar://9156159.

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

13 years agoAdd support for Thumb interworking addresses for symbol offsets that get constant...
Owen Anderson [Mon, 21 Mar 2011 23:13:43 +0000 (23:13 +0000)]
Add support for Thumb interworking addresses for symbol offsets that get constant folded very early.
This fixes SPASS with -integrated-as.  <rdar://problem/9165399>

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

13 years agoTry again to make this test darwin only.
Devang Patel [Mon, 21 Mar 2011 23:11:08 +0000 (23:11 +0000)]
Try again to make this test darwin only.

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

13 years agoBuild the new RuntimeDyld library.
Oscar Fuentes [Mon, 21 Mar 2011 23:07:53 +0000 (23:07 +0000)]
Build the new RuntimeDyld library.

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

13 years agoRemoved workaround for unspecified build problem on MinGW.
Oscar Fuentes [Mon, 21 Mar 2011 22:53:51 +0000 (22:53 +0000)]
Removed workaround for unspecified build problem on MinGW.

Tested that MinGW/MSYS builds fine without that.

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

13 years agoLibrary-ize the dyld components of llvm-rtdyld.
Jim Grosbach [Mon, 21 Mar 2011 22:15:52 +0000 (22:15 +0000)]
Library-ize the dyld components of llvm-rtdyld.

Move the dynamic linking functionality of the llvm-rtdyld program into an
ExecutionEngine support library. Update llvm-rtdyld to just load an object
file into memory, use the library to process it, then run the _main()
function, if one is found.

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

13 years agoSimplify.
Devang Patel [Mon, 21 Mar 2011 22:04:45 +0000 (22:04 +0000)]
Simplify.

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

13 years agoFix INT_MIN gotcha pointed out by Eli Friedman.
Nick Lewycky [Mon, 21 Mar 2011 21:40:32 +0000 (21:40 +0000)]
Fix INT_MIN gotcha pointed out by Eli Friedman.

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

13 years agoForce x86_64.
Devang Patel [Mon, 21 Mar 2011 21:37:52 +0000 (21:37 +0000)]
Force x86_64.

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

13 years agoCall static functions so that they aren't left unused.
Bill Wendling [Mon, 21 Mar 2011 21:08:27 +0000 (21:08 +0000)]
Call static functions so that they aren't left unused.

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

13 years agoEnable this test only for Darwin.
Devang Patel [Mon, 21 Mar 2011 20:32:56 +0000 (20:32 +0000)]
Enable this test only for Darwin.

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

13 years agoProvide a means for CrashRecovery clients to determine if code is currently running...
Ted Kremenek [Mon, 21 Mar 2011 18:38:03 +0000 (18:38 +0000)]
Provide a means for CrashRecovery clients to determine if code is currently running while crash recovery cleanups are being processed.

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

13 years agoAllow a client to clear an IntrustiveRefCntPtr (deliberately leaking the referenced...
Ted Kremenek [Mon, 21 Mar 2011 18:37:59 +0000 (18:37 +0000)]
Allow a client to clear an IntrustiveRefCntPtr (deliberately leaking the referenced object).

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

13 years agoFix unused param warning.
Eric Christopher [Mon, 21 Mar 2011 18:06:32 +0000 (18:06 +0000)]
Fix unused param warning.

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

13 years agoGrammar-o.
Eric Christopher [Mon, 21 Mar 2011 18:06:21 +0000 (18:06 +0000)]
Grammar-o.

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

13 years agoFix typos in assert messages.
Jay Foad [Mon, 21 Mar 2011 16:38:22 +0000 (16:38 +0000)]
Fix typos in assert messages.

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

13 years agoMore cleanups to the OptimizeEmptyGlobalCXXDtors GlobalOpt function.
Anders Carlsson [Mon, 21 Mar 2011 14:54:40 +0000 (14:54 +0000)]
More cleanups to the OptimizeEmptyGlobalCXXDtors GlobalOpt function.

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

13 years agoA WIP commit of the InstAlias printing cleanup. This code will soon replace the
Bill Wendling [Mon, 21 Mar 2011 08:59:17 +0000 (08:59 +0000)]
A WIP commit of the InstAlias printing cleanup. This code will soon replace the
code below it. Even though it looks very similar, it will match more precisely
and geneate better functions in the long run.

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

13 years agoAdd the IAPrinter class.
Bill Wendling [Mon, 21 Mar 2011 08:40:31 +0000 (08:40 +0000)]
Add the IAPrinter class.

This is a helper class that will make it easier to say which InstAliases can be
printed and which cannot (because of ambiguity).

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

13 years ago* Add classes that support the "feature" information.
Bill Wendling [Mon, 21 Mar 2011 08:31:53 +0000 (08:31 +0000)]
* Add classes that support the "feature" information.
* Move the code that emits the reg in reg class matching into its own function.

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

13 years agoWe need to pass the TargetMachine object to the InstPrinter if we are printing
Bill Wendling [Mon, 21 Mar 2011 04:13:46 +0000 (04:13 +0000)]
We need to pass the TargetMachine object to the InstPrinter if we are printing
the alias of an InstAlias instead of the thing being aliased. Because we need to
know the features that are valid for an InstAlias.

This is part of a work-in-progress.

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

13 years agoAs suggested by Nick Lewycky, ignore debugging intrinsics when trying to decide wheth...
Anders Carlsson [Mon, 21 Mar 2011 02:42:27 +0000 (02:42 +0000)]
As suggested by Nick Lewycky, ignore debugging intrinsics when trying to decide whether a destructor is empty or not.

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

13 years agoFix comments
Nick Lewycky [Mon, 21 Mar 2011 02:26:01 +0000 (02:26 +0000)]
Fix comments

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

13 years agoThis README entry was fixed recently.
Eli Friedman [Mon, 21 Mar 2011 01:33:03 +0000 (01:33 +0000)]
This README entry was fixed recently.

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

13 years agoRe-apply r127953 with fixes: eliminate empty return block if it has no predecessors...
Evan Cheng [Mon, 21 Mar 2011 01:19:09 +0000 (01:19 +0000)]
Re-apply r127953 with fixes: eliminate empty return block if it has no predecessors; update dominator tree if cfg is modified.

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

13 years agoDon't try to eliminate invokes to __cxa_atexit.
Anders Carlsson [Sun, 20 Mar 2011 20:21:33 +0000 (20:21 +0000)]
Don't try to eliminate invokes to __cxa_atexit.

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

13 years agoDon't segfault on mutual recursion, as pointed out by Frits.
Anders Carlsson [Sun, 20 Mar 2011 20:16:43 +0000 (20:16 +0000)]
Don't segfault on mutual recursion, as pointed out by Frits.

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

13 years agoAddress comments from Frits van Bommel.
Anders Carlsson [Sun, 20 Mar 2011 19:51:13 +0000 (19:51 +0000)]
Address comments from Frits van Bommel.

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

13 years agoProcess all dead defs after rematerializing during splitting.
Jakob Stoklund Olesen [Sun, 20 Mar 2011 19:46:23 +0000 (19:46 +0000)]
Process all dead defs after rematerializing during splitting.

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

13 years agoWrite the section table and the section data in the same order that
Rafael Espindola [Sun, 20 Mar 2011 18:44:20 +0000 (18:44 +0000)]
Write the section table and the section data in the same order that
gun as does. This makes it a lot easier to compare the output of both
as the addresses are now a lot closer.

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

13 years agoAdd an optimization to GlobalOpt that eliminates calls to __cxa_atexit, if the functi...
Anders Carlsson [Sun, 20 Mar 2011 17:59:11 +0000 (17:59 +0000)]
Add an optimization to GlobalOpt that eliminates calls to __cxa_atexit, if the function passed is empty.

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

13 years agoAvoid initializing posix_spawn_file_actions_t if not used.
Benjamin Kramer [Sun, 20 Mar 2011 15:52:24 +0000 (15:52 +0000)]
Avoid initializing posix_spawn_file_actions_t if not used.

- glibc falls back to fork+exec if a file actions object is present.
- On BSDs this saves a malloc.

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

13 years agoIf a class inherits from RefCountedBaseVPTR allow all its subclasses to be used with...
Argyrios Kyrtzidis [Sun, 20 Mar 2011 06:14:56 +0000 (06:14 +0000)]
If a class inherits from RefCountedBaseVPTR allow all its subclasses to be used with IntrusiveRefCntPtr.

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

13 years agoAlso eliminate redundant spills downstream of inserted reloads.
Jakob Stoklund Olesen [Sun, 20 Mar 2011 05:44:58 +0000 (05:44 +0000)]
Also eliminate redundant spills downstream of inserted reloads.

This can happen when multiple sibling registers are spilled after live range
splitting.

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