oota-llvm.git
13 years agoAdd support in the LTO library for loading an object from the middle
Rafael Espindola [Thu, 17 Mar 2011 00:36:11 +0000 (00:36 +0000)]
Add support in the LTO library for loading an object from the middle
of an file.

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

13 years agoFix handling of @IDNTPOFF relocations, they need to get STT_TLS.
Joerg Sonnenberger [Thu, 17 Mar 2011 00:35:10 +0000 (00:35 +0000)]
Fix handling of @IDNTPOFF relocations, they need to get STT_TLS.
While here, add VK_ARM_TPOFF and VK_ARM_GOTTPOFF, too.

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

13 years agoRewrite instructions as part of ConnectedVNInfoEqClasses::Distribute.
Jakob Stoklund Olesen [Thu, 17 Mar 2011 00:23:45 +0000 (00:23 +0000)]
Rewrite instructions as part of ConnectedVNInfoEqClasses::Distribute.

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

13 years agotest/CodeGen/X86/constant-pool-remat-0.ll: FileCheck-ize and add explicit -mtriple...
NAKAMURA Takumi [Wed, 16 Mar 2011 23:01:31 +0000 (23:01 +0000)]
test/CodeGen/X86/constant-pool-remat-0.ll: FileCheck-ize and add explicit -mtriple=x86_64-linux.

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

13 years agoAdd a LiveRangeEdit delegate callback before shrinking a live range.
Jakob Stoklund Olesen [Wed, 16 Mar 2011 22:56:16 +0000 (22:56 +0000)]
Add a LiveRangeEdit delegate callback before shrinking a live range.

The register allocator needs to adjust its live interval unions when that happens.

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

13 years agoErase virtual registers that are unused after DCE.
Jakob Stoklund Olesen [Wed, 16 Mar 2011 22:56:13 +0000 (22:56 +0000)]
Erase virtual registers that are unused after DCE.

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

13 years agoTag cached interference with a user-provided tag instead of the virtual register...
Jakob Stoklund Olesen [Wed, 16 Mar 2011 22:56:11 +0000 (22:56 +0000)]
Tag cached interference with a user-provided tag instead of the virtual register number.

The live range of a virtual register may change which invalidates the cached
interference information.

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

13 years agoClarify debugging output.
Jakob Stoklund Olesen [Wed, 16 Mar 2011 22:56:08 +0000 (22:56 +0000)]
Clarify debugging output.

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

13 years agoThe x86-64 ABI says that a bool is only guaranteed to be sign-extended to a byte
Cameron Zwarich [Wed, 16 Mar 2011 22:20:18 +0000 (22:20 +0000)]
The x86-64 ABI says that a bool is only guaranteed to be sign-extended to a byte
rather than an int. Thankfully, this only causes LLVM to miss optimizations, not
generate incorrect code.

This just fixes the zext at the return. We still insert an i32 ZextAssert when
reading a function's arguments, but it is followed by a truncate and another i8
ZextAssert so it is not optimized.

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

13 years agoRename a test to be more inclusive.
Cameron Zwarich [Wed, 16 Mar 2011 22:20:12 +0000 (22:20 +0000)]
Rename a test to be more inclusive.

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

13 years agoDon't recompute something that we already have in a local variable.
Cameron Zwarich [Wed, 16 Mar 2011 22:20:07 +0000 (22:20 +0000)]
Don't recompute something that we already have in a local variable.

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

13 years agoRevert r127757, "Patch to a fix dwarf relocation problem on ARM. One-line fix
Daniel Dunbar [Wed, 16 Mar 2011 22:16:39 +0000 (22:16 +0000)]
Revert r127757, "Patch to a fix dwarf relocation problem on ARM. One-line fix
plus the test where it used to break.", which broke Clang self-host of a
Debug+Asserts compiler, on OS X.

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

13 years agoAdd XCore intrinsics for setclk, setrdy.
Richard Osborne [Wed, 16 Mar 2011 21:56:00 +0000 (21:56 +0000)]
Add XCore intrinsics for setclk, setrdy.

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

13 years agoPatch to a fix dwarf relocation problem on ARM. One-line fix plus the test where...
Renato Golin [Wed, 16 Mar 2011 21:05:52 +0000 (21:05 +0000)]
Patch to a fix dwarf relocation problem on ARM. One-line fix plus the test where it used to break.

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

13 years agoAdd a test for i1 zeroext arguments on x86-64. We currently generate code that
Cameron Zwarich [Wed, 16 Mar 2011 20:15:44 +0000 (20:15 +0000)]
Add a test for i1 zeroext arguments on x86-64. We currently generate code that
conforms to the ABI, but DAGCombine could in theory recognize the sequence of
zext asserts and truncates and generate incorrect code.

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

13 years agoAdd checkevent intrinsic to check if any resources owned by the current thread
Richard Osborne [Wed, 16 Mar 2011 18:34:00 +0000 (18:34 +0000)]
Add checkevent intrinsic to check if any resources owned by the current thread
can event.

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

13 years agotest/CodeGen/X86: FileCheck-ize and add actions for x86_64-linux and x86_64-win32.
NAKAMURA Takumi [Wed, 16 Mar 2011 13:53:07 +0000 (13:53 +0000)]
test/CodeGen/X86: FileCheck-ize and add actions for x86_64-linux and x86_64-win32.

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

13 years agotest/CodeGen/X86: Add a pattern for Win64.
NAKAMURA Takumi [Wed, 16 Mar 2011 13:52:51 +0000 (13:52 +0000)]
test/CodeGen/X86: Add a pattern for Win64.

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

13 years agotest/CodeGen/X86: FileCheck-ize and add explicit -mtriple=x86_64-linux. They are...
NAKAMURA Takumi [Wed, 16 Mar 2011 13:52:38 +0000 (13:52 +0000)]
test/CodeGen/X86: FileCheck-ize and add explicit -mtriple=x86_64-linux. They are useless to Win64 target.

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

13 years agotest/CodeGen/X86/byval*.ll: Win64 has not supported byval yet.
NAKAMURA Takumi [Wed, 16 Mar 2011 13:52:20 +0000 (13:52 +0000)]
test/CodeGen/X86/byval*.ll: Win64 has not supported byval yet.

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

13 years agotest/CodeGen/X86/dyn-stackalloc.ll: FileCheck-ize.
NAKAMURA Takumi [Wed, 16 Mar 2011 13:52:08 +0000 (13:52 +0000)]
test/CodeGen/X86/dyn-stackalloc.ll: FileCheck-ize.

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

13 years agoFix a comment.
Cameron Zwarich [Wed, 16 Mar 2011 08:13:42 +0000 (08:13 +0000)]
Fix a comment.

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

13 years agolib/Support/raw_ostream.cpp: On mingw, report_fatal_error() should not be called...
NAKAMURA Takumi [Wed, 16 Mar 2011 02:53:39 +0000 (02:53 +0000)]
lib/Support/raw_ostream.cpp: On mingw, report_fatal_error() should not be called at dtor context.

report_fatal_error() invokes exit(). We know report_fatal_error() might not write messages to stderr when any errors were detected on FD == 2.

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

13 years agoWindows/PathV2.inc: [PR8520] Recognize "NUL" as special (character) file.
NAKAMURA Takumi [Wed, 16 Mar 2011 02:53:32 +0000 (02:53 +0000)]
Windows/PathV2.inc: [PR8520] Recognize "NUL" as special (character) file.

FIXME: It is a temporal hack. We should detect as many "special file name" as possible.

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

13 years agoWindows/Path.inc: [PR6270] PathV1::makeUnique(): Give arbitrary initial seed for...
NAKAMURA Takumi [Wed, 16 Mar 2011 02:53:24 +0000 (02:53 +0000)]
Windows/Path.inc: [PR6270] PathV1::makeUnique(): Give arbitrary initial seed for workaround.

FIXME: We should use sys::fs::unique_file() in future.

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

13 years agoTidy up. Whitespace and 80 column.
Jim Grosbach [Wed, 16 Mar 2011 01:21:55 +0000 (01:21 +0000)]
Tidy up. Whitespace and 80 column.

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

13 years agoDo not accidently initialize NumDbgValueLost and NumDbgLineLost counts.
Devang Patel [Wed, 16 Mar 2011 00:27:57 +0000 (00:27 +0000)]
Do not accidently initialize NumDbgValueLost and NumDbgLineLost counts.

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

13 years agoOnly convert allocas to scalars if it is profitable. The profitability metric I
Cameron Zwarich [Wed, 16 Mar 2011 00:13:44 +0000 (00:13 +0000)]
Only convert allocas to scalars if it is profitable. The profitability metric I
chose is having a non-memcpy/memset use and being larger than any native integer
type. Originally I chose having an access of a size smaller than the total size
of the alloca, but this caused some minor issues on the spirit benchmark where
SRoA runs again after some inlining.

This fixes <rdar://problem/8613163>.

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

13 years agoAdd native integer type TargetData to some existing tests.
Cameron Zwarich [Wed, 16 Mar 2011 00:13:40 +0000 (00:13 +0000)]
Add native integer type TargetData to some existing tests.

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

13 years agoBetter use initializer lists.
Cameron Zwarich [Wed, 16 Mar 2011 00:13:37 +0000 (00:13 +0000)]
Better use initializer lists.

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

13 years agoAdd a clarifying comment.
Cameron Zwarich [Wed, 16 Mar 2011 00:13:35 +0000 (00:13 +0000)]
Add a clarifying comment.

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

13 years agoAdd TargetData::fitsInLegalInteger().
Cameron Zwarich [Wed, 16 Mar 2011 00:13:28 +0000 (00:13 +0000)]
Add TargetData::fitsInLegalInteger().

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

13 years agoThere were two issues fixed:
Johnny Chen [Tue, 15 Mar 2011 22:27:33 +0000 (22:27 +0000)]
There were two issues fixed:

1. The ARM Darwin *r9 call instructions were pseudo-ized recently.
   Modify the ARMDisassemblerCore.cpp file to accomodate the change.

2. The disassembler was unnecessarily adding 8 to the sign-extended imm24:

   imm32 = SignExtend(imm24:'00', 32); // A8.6.23 BL, BLX (immediate)
                                       // Encoding A1

   It has no business doing such.  Removed the offending logic.

Add test cases to arm-tests.txt.

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

13 years agoAdd scei vendor
John Thompson [Tue, 15 Mar 2011 21:51:56 +0000 (21:51 +0000)]
Add scei vendor

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

13 years agoThe VTBL (and VTBX) instructions are rather permissive concerning the masks they
Bill Wendling [Tue, 15 Mar 2011 21:15:20 +0000 (21:15 +0000)]
The VTBL (and VTBX) instructions are rather permissive concerning the masks they
accept. If a value in the mask is out of range, it uses the value 0, for VTBL,
or leaves the value unchanged, for VTBX.

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

13 years agoTrace back through sibling copies to hoist spills and find rematerializable defs.
Jakob Stoklund Olesen [Tue, 15 Mar 2011 21:13:25 +0000 (21:13 +0000)]
Trace back through sibling copies to hoist spills and find rematerializable defs.

After live range splitting, an original value may be available in multiple
registers. Tracing back through the registers containing the same value, find
the best place to insert a spill, determine if the value has already been
spilled, or discover a reaching def that may be rematerialized.

This is only the analysis part. The information is not used for anything yet.

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

13 years agoPreserve both isPHIDef and isDefByCopy bits when copying parent values.
Jakob Stoklund Olesen [Tue, 15 Mar 2011 21:13:22 +0000 (21:13 +0000)]
Preserve both isPHIDef and isDefByCopy bits when copying parent values.

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

13 years agolit/ProgressBar.py: [PR7919] Improve line wrap for XN-incapable terminals.
NAKAMURA Takumi [Tue, 15 Mar 2011 21:07:44 +0000 (21:07 +0000)]
lit/ProgressBar.py: [PR7919] Improve line wrap for XN-incapable terminals.

On Win32 console, emitting char to col#79 causes linefeed, and the cursor will not return to col#79 upper line with backspace.

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

13 years agoSome minor cleanups based on feedback.
Bill Wendling [Tue, 15 Mar 2011 20:47:26 +0000 (20:47 +0000)]
Some minor cleanups based on feedback.

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

13 years agoTrailing whitespae.
Jim Grosbach [Tue, 15 Mar 2011 20:25:54 +0000 (20:25 +0000)]
Trailing whitespae.

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

13 years agoClean up something noticed by Fritz.
Cameron Zwarich [Tue, 15 Mar 2011 18:42:33 +0000 (18:42 +0000)]
Clean up something noticed by Fritz.

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

13 years agoDo not form thumb2 ldrd / strd if the offset is by multiple of 4. rdar://9133587
Evan Cheng [Tue, 15 Mar 2011 18:41:52 +0000 (18:41 +0000)]
Do not form thumb2 ldrd / strd if the offset is by multiple of 4. rdar://9133587

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

13 years agoDon't indent cases in a switch, no functionality change.
Richard Osborne [Tue, 15 Mar 2011 15:55:30 +0000 (15:55 +0000)]
Don't indent cases in a switch, no functionality change.

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

13 years agoOn the XCore the scavenging slot should be closest to the SP.
Richard Osborne [Tue, 15 Mar 2011 15:10:11 +0000 (15:10 +0000)]
On the XCore the scavenging slot should be closest to the SP.

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

13 years agois_llvm_target_library: recognize libraries without the LLVM prefix.
Oscar Fuentes [Tue, 15 Mar 2011 14:53:53 +0000 (14:53 +0000)]
is_llvm_target_library: recognize libraries without the LLVM prefix.

Without this cmake fails at configuration when some target pass
"native" on LLVM_LINK_COMPONENTS and that is expanded to "X86".

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

13 years agoAdd XCore intrinsics for getps, setps, setsr and clrsr.
Richard Osborne [Tue, 15 Mar 2011 13:45:47 +0000 (13:45 +0000)]
Add XCore intrinsics for getps, setps, setsr and clrsr.

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

13 years agoPTX: Set PTX 2.0 as the minimum supported version
Justin Holewinski [Tue, 15 Mar 2011 13:24:15 +0000 (13:24 +0000)]
PTX: Set PTX 2.0 as the minimum supported version

- Remove PTX 1.4 code generation
- Change type of intrinsics to .v4.i32 instead of .v4.i16
- Add and/or/xor integer instructions

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

13 years agoSilence compiler warning about case values not being in the enumerated type
Duncan Sands [Tue, 15 Mar 2011 08:54:51 +0000 (08:54 +0000)]
Silence compiler warning about case values not being in the enumerated type
MCFixupKind.  This is the same technique that is used elsewhere in MC.

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

13 years agoAvoid a compiler warning about reg possibly being used uninitialized
Duncan Sands [Tue, 15 Mar 2011 08:41:24 +0000 (08:41 +0000)]
Avoid a compiler warning about reg possibly being used uninitialized
when building with assertions disabled.

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

13 years agoDo not add PHIs with no users when creating LCSSA form. Patch by Andrew Clinton.
Cameron Zwarich [Tue, 15 Mar 2011 07:41:25 +0000 (07:41 +0000)]
Do not add PHIs with no users when creating LCSSA form. Patch by Andrew Clinton.

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

13 years agoAdd C++ global operator {new,new[],delete,delete[]}(unsigned {int,long}) to the
Nick Lewycky [Tue, 15 Mar 2011 07:31:32 +0000 (07:31 +0000)]
Add C++ global operator {new,new[],delete,delete[]}(unsigned {int,long}) to the
memory builtins as equivalent to malloc/free.

This is different from any attribute we have. For example, you can delete the
allocators when their result is unused, but you can't collapse two calls to the
same function, even if no global/memory state has changed in between. The
noalias return states that the result does not alias any other pointer, but
instcombine optimizes malloc() as though the result is non-null for the purpose
of eliminating unused pointers.

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

13 years agoAdd a peephole optimization to optimize pairs of bitcasts. e.g.
Evan Cheng [Tue, 15 Mar 2011 05:13:13 +0000 (05:13 +0000)]
Add a peephole optimization to optimize pairs of bitcasts. e.g.
v2 = bitcast v1
...
v3 = bitcast v2
...
   = v3
=>
v2 = bitcast v1
...
   = v1
if v1 and v3 are of in the same register class.

bitcast between i32 and fp (and others) are often not nops since they
are in different register classes. These bitcast instructions are often
left because they are in different basic blocks and cannot be
eliminated by dag combine.

rdar://9104514

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

13 years ago- Add "Bitcast" target instruction property for instructions which perform
Evan Cheng [Tue, 15 Mar 2011 05:09:26 +0000 (05:09 +0000)]
- Add "Bitcast" target instruction property for instructions which perform
nothing more than a bitcast.
- Teach tablegen to automatically infer "Bitcast" property.

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

13 years agoPR9450: Make switch optimization in SimplifyCFG not dependent on the ordering
Eli Friedman [Tue, 15 Mar 2011 02:23:35 +0000 (02:23 +0000)]
PR9450: Make switch optimization in SimplifyCFG not dependent on the ordering
of pointers in an std::map.

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

13 years agosext(undef) = 0, because the top bits will all be the same.
Evan Cheng [Tue, 15 Mar 2011 02:22:10 +0000 (02:22 +0000)]
sext(undef) = 0, because the top bits will all be the same.
zext(undef) = 0, because the top bits will be zero.

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

13 years agoTestcase for r127630.
Bill Wendling [Tue, 15 Mar 2011 01:49:08 +0000 (01:49 +0000)]
Testcase for r127630.

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

13 years agoBasic sanity checks to ensure that 2- and 3-byte
Sean Callanan [Tue, 15 Mar 2011 01:32:46 +0000 (01:32 +0000)]
Basic sanity checks to ensure that 2- and 3-byte
VEX prefixes are working for triadic AVX
instructions.  This concludes the patch set to
enable AVX support for the X86 disassebler.

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

13 years agoEnabled disassembler support for AVX instructions
Sean Callanan [Tue, 15 Mar 2011 01:28:15 +0000 (01:28 +0000)]
Enabled disassembler support for AVX instructions
in the instruction tables and fixed a few bugs that
were causing decode conflicts.  Rudimentary tests
are coming up in the next patch.

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

13 years agoX86 table-generator and disassembler support for the AVX
Sean Callanan [Tue, 15 Mar 2011 01:23:15 +0000 (01:23 +0000)]
X86 table-generator and disassembler support for the AVX
instruction set.  This code adds support for the VEX prefix
and for the YMM registers accessible on AVX-enabled
architectures.  Instruction table support that enables AVX
instructions for the disassembler is in an upcoming patch.

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

13 years agoRemove getMinusSCEVForExitTest().
Andrew Trick [Tue, 15 Mar 2011 01:16:14 +0000 (01:16 +0000)]
Remove getMinusSCEVForExitTest().
This function performed acrobatics to prove no-self-wrap, which we now
have for free.

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

13 years agoFixed an ARM disassembler bug where it does not handle STRi12 correctly because an...
Johnny Chen [Tue, 15 Mar 2011 01:13:17 +0000 (01:13 +0000)]
Fixed an ARM disassembler bug where it does not handle STRi12 correctly because an extra
register operand was erroneously added.  Remove an incorrect assert which triggers the bug.

rdar://problem/9131529

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

13 years agoThere are some situations which can cause the URoR hack to infinitely recurse
Bill Wendling [Tue, 15 Mar 2011 01:03:17 +0000 (01:03 +0000)]
There are some situations which can cause the URoR hack to infinitely recurse
and then go kablooie. The problem was that it was tracking the PHI nodes anew
each time into this function. But it didn't need to. And because the recursion
didn't know that a PHINode was visited before, it would go ahead and call
itself.

There is a testcase, but unfortunately it's too big to add. This problem will go
away with the EH rewrite.
<rdar://problem/8856298>

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

13 years agoPropagate SCEV no-wrap flags whenever possible.
Andrew Trick [Tue, 15 Mar 2011 00:37:00 +0000 (00:37 +0000)]
Propagate SCEV no-wrap flags whenever possible.
This needs review.

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

13 years agoClean up ARM tail calls a bit. They're pseudo-instructions for normal branches.
Jim Grosbach [Tue, 15 Mar 2011 00:30:40 +0000 (00:30 +0000)]
Clean up ARM tail calls a bit. They're pseudo-instructions for normal branches.
Also more cleanly separate the ARM vs. Thumb functionality. Previously, the
encoding would be incorrect for some Thumb instructions (the indirect calls).

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

13 years agoIf we don't know how long a string is we can't fold an _chk version to the
Eric Christopher [Tue, 15 Mar 2011 00:25:41 +0000 (00:25 +0000)]
If we don't know how long a string is we can't fold an _chk version to the
normal version.

Fixes rdar://9123638

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

13 years agoMake llvm::Consumer a class (to remove a MSVC warning since Consumer is later forward...
Francois Pichet [Mon, 14 Mar 2011 23:07:21 +0000 (23:07 +0000)]
Make llvm::Consumer a class (to remove a MSVC warning since Consumer is later forward declared as a struct)

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

13 years agoGenerate a VTBL instruction instead of a series of loads and stores when we
Bill Wendling [Mon, 14 Mar 2011 23:02:38 +0000 (23:02 +0000)]
Generate a VTBL instruction instead of a series of loads and stores when we
can. As Nate pointed out, VTBL isn't super performant, but it *has* to be better
than this:

_shuf:
@ BB#0:       @ %entry
  push        {r4, r7, lr}
  add         r7, sp, #4
  sub         sp, #12
  mov         r4, sp
  bic         r4, r4, #7
  mov         sp, r4
  mov         r2, sp
  vmov        d16, r0, r1
  orr         r0, r2, #6
  orr         r3, r2, #7
  vst1.8      {d16[0]}, [r3]
  vst1.8      {d16[5]}, [r0]
  subs        r4, r7, #4
  orr         r0, r2, #5
  vst1.8      {d16[4]}, [r0]
  orr         r0, r2, #4
  vst1.8      {d16[4]}, [r0]
  orr         r0, r2, #3
  vst1.8      {d16[0]}, [r0]
  orr         r0, r2, #2
  vst1.8      {d16[2]}, [r0]
  orr         r0, r2, #1
  vst1.8      {d16[1]}, [r0]
  vst1.8      {d16[3]}, [r2]
  vldr.64     d16, [sp]
  vmov        r0, r1, d16
  mov         sp, r4
  pop         {r4, r7, pc}

The "illegal" testcase in vext.ll is no longer illegal.
<rdar://problem/9078775>

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

13 years agoVersion N of the llvm_unreachable patch: VC++ doesn't recognize that abort()
John McCall [Mon, 14 Mar 2011 22:41:50 +0000 (22:41 +0000)]
Version N of the llvm_unreachable patch:  VC++ doesn't recognize that abort()
doesn't return, so just go back to using the old runtime function instead
of trying to use abort() when __builtin_unreachable (or an equivalent) isn't
supported.

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

13 years agoThis patch is a big refactoring of llvm-diff. It doesn't add new features, but it...
Renato Golin [Mon, 14 Mar 2011 22:22:46 +0000 (22:22 +0000)]
This patch is a big refactoring of llvm-diff. It doesn't add new features, but it re-organizes the old features, so I can insert the MetadataEngine to use the same infrastructure.

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

13 years agoCheck that the AsmParser exists for the native target to enable initialization
Jan Sjödin [Mon, 14 Mar 2011 22:12:35 +0000 (22:12 +0000)]
Check that the AsmParser exists for the native target to enable initialization
function.

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

13 years agoFix this test up a bit.
Eric Christopher [Mon, 14 Mar 2011 21:05:21 +0000 (21:05 +0000)]
Fix this test up a bit.

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

13 years agoTrailing whitespace.
Jim Grosbach [Mon, 14 Mar 2011 20:59:06 +0000 (20:59 +0000)]
Trailing whitespace.

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

13 years agoIgnore isCodeGenOnly instructions when generating diassembly tables.
Owen Anderson [Mon, 14 Mar 2011 20:58:49 +0000 (20:58 +0000)]
Ignore isCodeGenOnly instructions when generating diassembly tables.

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

13 years agoPlace context in member variables instead of passing around pointers.
Jakob Stoklund Olesen [Mon, 14 Mar 2011 20:57:14 +0000 (20:57 +0000)]
Place context in member variables instead of passing around pointers.

Use the opportunity to get rid of the trailing underscore variable names.

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

13 years agoOkay, some compilers complain if you provide the exception-specification
John McCall [Mon, 14 Mar 2011 20:20:29 +0000 (20:20 +0000)]
Okay, some compilers complain if you provide the exception-specification
where none was before.  Just don't declare it and hope it's declared
in every translation unit that needs it.

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

13 years agoFix the exception-specification of abort() when declaring it in C++.
John McCall [Mon, 14 Mar 2011 20:10:50 +0000 (20:10 +0000)]
Fix the exception-specification of abort() when declaring it in C++.

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

13 years agoMake llvm_unreachable evaluate to __builtin_unreachable() in -Asserts
John McCall [Mon, 14 Mar 2011 20:01:21 +0000 (20:01 +0000)]
Make llvm_unreachable evaluate to __builtin_unreachable() in -Asserts
builds, which was the apparent consensus of PR8973 and llvmdev.

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

13 years agoRename members to match LLVM naming conventions more closely.
Jakob Stoklund Olesen [Mon, 14 Mar 2011 19:56:43 +0000 (19:56 +0000)]
Rename members to match LLVM naming conventions more closely.

Remove the unused reserved_ bit vector, no functional change intended.

This doesn't break 'svn blame', this file really is all my fault.

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

13 years agoRemove some dead patterns.
Jim Grosbach [Mon, 14 Mar 2011 18:34:35 +0000 (18:34 +0000)]
Remove some dead patterns.

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

13 years agoBIT_CONVERT has been renamed to BITCAST.
Evan Cheng [Mon, 14 Mar 2011 18:19:52 +0000 (18:19 +0000)]
BIT_CONVERT has been renamed to BITCAST.

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

13 years agoMinor optimization. sign-ext/anyext of undef is still undef.
Evan Cheng [Mon, 14 Mar 2011 18:15:55 +0000 (18:15 +0000)]
Minor optimization. sign-ext/anyext of undef is still undef.

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

13 years agoIndentation.
Evan Cheng [Mon, 14 Mar 2011 18:02:30 +0000 (18:02 +0000)]
Indentation.

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

13 years agoNegating a recurrence preserves no-self-wrap.
Andrew Trick [Mon, 14 Mar 2011 17:38:54 +0000 (17:38 +0000)]
Negating a recurrence preserves no-self-wrap.

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

13 years agoTrailing whitespace.
Jim Grosbach [Mon, 14 Mar 2011 17:32:49 +0000 (17:32 +0000)]
Trailing whitespace.

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

13 years agoHowFarToZero can compute a trip count as long as the recurrence has no-self-wrap.
Andrew Trick [Mon, 14 Mar 2011 17:28:02 +0000 (17:28 +0000)]
HowFarToZero can compute a trip count as long as the recurrence has no-self-wrap.

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

13 years agoAdded SCEV::NoWrapFlags to manage unsigned, signed, and self wrap
Andrew Trick [Mon, 14 Mar 2011 16:50:06 +0000 (16:50 +0000)]
Added SCEV::NoWrapFlags to manage unsigned, signed, and self wrap
properties.
Added the self-wrap flag for SCEV::AddRecExpr.
A slew of temporary FIXMEs indicate the intention of the no-self-wrap flag
without changing behavior in this revision.

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

13 years agowhitespace
Andrew Trick [Mon, 14 Mar 2011 16:48:10 +0000 (16:48 +0000)]
whitespace

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

13 years agoPTX: Emit global arrays with proper sizes
Justin Holewinski [Mon, 14 Mar 2011 15:40:11 +0000 (15:40 +0000)]
PTX: Emit global arrays with proper sizes

- Emit all arrays as type .b8 and proper sizes in bytes to conform
  to the output of nvcc

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

13 years agoPTX: Add support for sqrt/sin/cos intrinsics
Justin Holewinski [Mon, 14 Mar 2011 14:09:33 +0000 (14:09 +0000)]
PTX: Add support for sqrt/sin/cos intrinsics

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

13 years agoptx: add set.p instruction and related changes to predicate execution
Che-Liang Chiou [Mon, 14 Mar 2011 11:26:01 +0000 (11:26 +0000)]
ptx: add set.p instruction and related changes to predicate execution

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

13 years agoEmacs mode string.
Mikhail Glushenkov [Mon, 14 Mar 2011 04:20:57 +0000 (04:20 +0000)]
Emacs mode string.

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

13 years agoCorrect small comment order typo.
Francois Pichet [Mon, 14 Mar 2011 02:30:32 +0000 (02:30 +0000)]
Correct small comment order typo.

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

13 years agoThis case is solved by Scalar Replacement of Aggregates (DT) and
Jin-Gu Kang [Mon, 14 Mar 2011 01:21:00 +0000 (01:21 +0000)]
This case is solved by Scalar Replacement of Aggregates (DT) and
Early CSE pass so this patch reverts it to original source code.

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

13 years agoptx: add basic support of predicate execution
Che-Liang Chiou [Sun, 13 Mar 2011 17:26:00 +0000 (17:26 +0000)]
ptx: add basic support of predicate execution

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

13 years agoAdd comment as following:
Jin-Gu Kang [Sun, 13 Mar 2011 14:05:51 +0000 (14:05 +0000)]
Add comment as following:
load and store reference same memory location, the memory location
is represented by getelementptr with two uses (load and store) and
the getelementptr's base is alloca with single use. At this point,
instructions from alloca to store can be removed.
(this pattern is generated when bitfield is accessed.)
For example,
%u = alloca %struct.test, align 4               ; [#uses=1]
%0 = getelementptr inbounds %struct.test* %u, i32 0, i32 0;[#uses=2]
%1 = load i8* %0, align 4                       ; [#uses=1]
%2 = and i8 %1, -16                             ; [#uses=1]
%3 = or i8 %2, 5                                ; [#uses=1]
store i8 %3, i8* %0, align 4

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

13 years agoLTO is not ready for Windows.
Oscar Fuentes [Sun, 13 Mar 2011 03:06:59 +0000 (03:06 +0000)]
LTO is not ready for Windows.

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

13 years agoNow that we are deleting unused live intervals during allocation, pointers may be...
Jakob Stoklund Olesen [Sun, 13 Mar 2011 01:29:32 +0000 (01:29 +0000)]
Now that we are deleting unused live intervals during allocation, pointers may be reused.

Use the virtual register number as a cache tag instead. They are not reused.

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

13 years agoTell the register allocator about new unused virtual registers.
Jakob Stoklund Olesen [Sun, 13 Mar 2011 01:23:11 +0000 (01:23 +0000)]
Tell the register allocator about new unused virtual registers.

This allows the allocator to free any resources used by the virtual register,
including physical register assignments.

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

13 years agoBuild EnhancedDisassembly as a shared library too.
Oscar Fuentes [Sat, 12 Mar 2011 22:01:47 +0000 (22:01 +0000)]
Build EnhancedDisassembly as a shared library too.

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

13 years agoBuild CompilerDriver library.
Oscar Fuentes [Sat, 12 Mar 2011 22:01:42 +0000 (22:01 +0000)]
Build CompilerDriver library.

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