oota-llvm.git
13 years agoAdd Win64 thiscall calling convention.
Tilmann Scheller [Wed, 2 Mar 2011 19:29:22 +0000 (19:29 +0000)]
Add Win64 thiscall calling convention.

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

13 years agoSupport for parallel compilation (/MP) when using the VS IDE.
Oscar Fuentes [Wed, 2 Mar 2011 17:47:37 +0000 (17:47 +0000)]
Support for parallel compilation (/MP) when using the VS IDE.

Patch by Erik Olofsson!

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

13 years ago[AVX] Fix mask predicates for 256-bit UNPCKLPS/D and implement
David Greene [Wed, 2 Mar 2011 17:23:43 +0000 (17:23 +0000)]
[AVX] Fix mask predicates for 256-bit UNPCKLPS/D and implement
      missing patterns for them.

      Add a SIMD test subdirectory to hold tests for SIMD instruction
      selection correctness and quality.
'

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

13 years agoptx: fix lint and compiler warnings
Che-Liang Chiou [Wed, 2 Mar 2011 07:58:46 +0000 (07:58 +0000)]
ptx: fix lint and compiler warnings

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

13 years agoAdd 64-bit addressing to PTX backend
Che-Liang Chiou [Wed, 2 Mar 2011 07:36:48 +0000 (07:36 +0000)]
Add 64-bit addressing to PTX backend

- Add '64bit' sub-target option.
- Select 32-bit/64-bit loads/stores based on '64bit' option.
- Fix function parameter order.

Patch by Justin Holewinski

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

13 years agoAdd a special streamer to libLTO that just records symbols definitions and
Rafael Espindola [Wed, 2 Mar 2011 04:14:42 +0000 (04:14 +0000)]
Add a special streamer to libLTO that just records symbols definitions and
uses.

The result produced by the streamer is used to give the linker more accurate
information and to add to llvm.compiler.used. The second improvement removes
the need for the user to add __attribute__((used)) to functions only used in
inline asm. The first one lets us build firefox with LTO on Darwin :-)

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

13 years agoFix some typos.
Cameron Zwarich [Wed, 2 Mar 2011 04:03:46 +0000 (04:03 +0000)]
Fix some typos.

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

13 years agoTeach the clang attribute emitter about InheritableParamAttr.
John McCall [Wed, 2 Mar 2011 04:00:52 +0000 (04:00 +0000)]
Teach the clang attribute emitter about InheritableParamAttr.
Intended to be atomic with clang r126828.

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

13 years agoRemove some more unused code that I missed.
Cameron Zwarich [Wed, 2 Mar 2011 03:48:29 +0000 (03:48 +0000)]
Remove some more unused code that I missed.

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

13 years agoEliminate the unused CodeGenPrepare option to split critical edges.
Cameron Zwarich [Wed, 2 Mar 2011 03:31:46 +0000 (03:31 +0000)]
Eliminate the unused CodeGenPrepare option to split critical edges.

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

13 years agoExtend initial support for primitive types in PTX backend
Che-Liang Chiou [Wed, 2 Mar 2011 03:20:28 +0000 (03:20 +0000)]
Extend initial support for primitive types in PTX backend

- Allow i16, i32, i64, float, and double types, using the native .u16,
  .u32, .u64, .f32, and .f64 PTX types.
- Allow loading/storing of all primitive types.
- Allow primitive types to be passed as parameters.
- Allow selection of PTX Version and Shader Model as sub-target attributes.
- Merge integer/floating-point test cases for load/store.
- Use .u32 instead of .s32 to conform to output from NVidia nvcc compiler.

Patch by Justin Holewinski

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

13 years agoSmall cleanup.
Bill Wendling [Wed, 2 Mar 2011 02:17:11 +0000 (02:17 +0000)]
Small cleanup.

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

13 years agoMove extendRange() into SplitEditor and delete the LiveRangeMap class.
Jakob Stoklund Olesen [Wed, 2 Mar 2011 01:59:34 +0000 (01:59 +0000)]
Move extendRange() into SplitEditor and delete the LiveRangeMap class.

Extract the updateSSA() method from the too long extendRange().

LiveOutCache can be shared among all the new intervals since there is at most
one of the new ranges live out from each basic block.

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

13 years agoQuiet a compiler warning about unused variable 'ExtVNI'.
Nick Lewycky [Wed, 2 Mar 2011 01:43:30 +0000 (01:43 +0000)]
Quiet a compiler warning about unused variable 'ExtVNI'.

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

13 years agoDon't re-use existing addrec expansions if they contain casts.
Dan Gohman [Wed, 2 Mar 2011 01:34:10 +0000 (01:34 +0000)]
Don't re-use existing addrec expansions if they contain casts.
This fixes PR9259.

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

13 years agoCatch more cases where 2-address pass should 3-addressify instructions. rdar://9002648.
Evan Cheng [Wed, 2 Mar 2011 01:08:17 +0000 (01:08 +0000)]
Catch more cases where 2-address pass should 3-addressify instructions. rdar://9002648.

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

13 years agoRename mapValue to extendRange because that is its function now.
Jakob Stoklund Olesen [Wed, 2 Mar 2011 00:49:28 +0000 (00:49 +0000)]
Rename mapValue to extendRange because that is its function now.

Simplify the signature - The return value and ParentVNI are no longer needed.

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

13 years agoSimplify LiveIntervals::shrinkToUses() a bit by using the new extendInBlock().
Jakob Stoklund Olesen [Wed, 2 Mar 2011 00:33:03 +0000 (00:33 +0000)]
Simplify LiveIntervals::shrinkToUses() a bit by using the new extendInBlock().

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

13 years agoFix typo.
Jakob Stoklund Olesen [Wed, 2 Mar 2011 00:33:01 +0000 (00:33 +0000)]
Fix typo.

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

13 years agoMake pred_iterator DefaultConstructible, and add an accessor to
Dan Gohman [Wed, 2 Mar 2011 00:11:28 +0000 (00:11 +0000)]
Make pred_iterator DefaultConstructible, and add an accessor to
retrieve the underlying getOperandNo() value.

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

13 years agoMove LiveIntervalMap::extendTo into LiveInterval itself.
Jakob Stoklund Olesen [Wed, 2 Mar 2011 00:06:15 +0000 (00:06 +0000)]
Move LiveIntervalMap::extendTo into LiveInterval itself.

This method could probably be used by LiveIntervalAnalysis::shrinkToUses, and
now it can use extendIntervalEndTo() which coalesces ranges.

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

13 years agoDelete dead code.
Jakob Stoklund Olesen [Tue, 1 Mar 2011 23:24:19 +0000 (23:24 +0000)]
Delete dead code.

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

13 years agoMove the value map from LiveIntervalMap to SplitEditor.
Jakob Stoklund Olesen [Tue, 1 Mar 2011 23:14:53 +0000 (23:14 +0000)]
Move the value map from LiveIntervalMap to SplitEditor.

The value map is currently not used, all values are 'complex mapped' and
LiveIntervalMap::mapValue is used to dig them out.

This is the first step in a series changes leading to the removal of
LiveIntervalMap. Its data structures can be shared among all the live intervals
created by a split, so it is wasteful to create a copy for each.

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

13 years agoDelete dead code.
Jakob Stoklund Olesen [Tue, 1 Mar 2011 23:14:50 +0000 (23:14 +0000)]
Delete dead code.

Local live range splitting is better driven by interference. This code was just
guessing.

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

13 years agoDrop RAGreedy::trySpillInterferences().
Jakob Stoklund Olesen [Tue, 1 Mar 2011 23:14:48 +0000 (23:14 +0000)]
Drop RAGreedy::trySpillInterferences().

This is a waste of time since we already know how to evict all interferences
which is a better approach anyway.

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

13 years agoFixes warnings emitted by Visual Studio 2010 compiler.
Oscar Fuentes [Tue, 1 Mar 2011 23:11:57 +0000 (23:11 +0000)]
Fixes warnings emitted by Visual Studio 2010 compiler.

Patch by Erik Olofsson!

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

13 years agoIf argument numbering is encoded in metadata then emit arguments' debug info in that...
Devang Patel [Tue, 1 Mar 2011 22:58:55 +0000 (22:58 +0000)]
If argument numbering is encoded in metadata then emit arguments' debug info in that order.

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

13 years agoToday, the language front ends produces llvm.dbg.* intrinsics, used to encode argumen...
Devang Patel [Tue, 1 Mar 2011 22:58:13 +0000 (22:58 +0000)]
Today, the language front ends produces llvm.dbg.* intrinsics, used to encode arguments' debug info, in order any way, most of the times. However, if a front end mix-n-matches llvm.dbg.declare and llvm.dbg.value intrinsics to encode debug info for arguments then code generator needs a way to find argument order.

Use 8 bits from line number field to keep track of argument ordering while encoding debug info for an argument. That leaves 24 bit for line no, DebugLoc also allocates 24 bit for line numbers. If a function has more than 255 arguments then rest of the arguments will be ordered by llvm.dbg.* intrinsics' ordering in IR.

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

13 years agoCmake fix for option defaults not being set correctly on first run
Oscar Fuentes [Tue, 1 Mar 2011 22:31:19 +0000 (22:31 +0000)]
Cmake fix for option defaults not being set correctly on first run

On the first cmake run before the caches has been updated with the
default options, options defined after HandleLLVMOptions are always
treated as off inside HandleLLVMOptions.

Patch by Erik Olofsson!

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

13 years agoEscape graph edge labels.
Dan Gohman [Tue, 1 Mar 2011 22:12:24 +0000 (22:12 +0000)]
Escape graph edge labels.

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

13 years agoRemove the showline argument from the SMDiagnostic constructor
Dan Gohman [Tue, 1 Mar 2011 22:11:52 +0000 (22:11 +0000)]
Remove the showline argument from the SMDiagnostic constructor
which constructs a diagnostic with no line to show.

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

13 years agoCode simplification.
Dan Gohman [Tue, 1 Mar 2011 22:07:55 +0000 (22:07 +0000)]
Code simplification.

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

13 years agoSimplify this code.
Dan Gohman [Tue, 1 Mar 2011 22:07:32 +0000 (22:07 +0000)]
Simplify this code.

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

13 years agoChange directory_entry::path() to return a const std::string & instead of
Dan Gohman [Tue, 1 Mar 2011 22:07:09 +0000 (22:07 +0000)]
Change directory_entry::path() to return a const std::string & instead of
a StringRef, for the benefit of clients that want the result as a
nul-terminated string. Clients that expect a StringRef will get one via
the implicit conversion.

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

13 years agoStop computing the number of uses twice per value in CodeGenPrepare's sinking of
Cameron Zwarich [Tue, 1 Mar 2011 21:13:53 +0000 (21:13 +0000)]
Stop computing the number of uses twice per value in CodeGenPrepare's sinking of
addressing code. On 403.gcc this almost halves CodeGenPrepare time and reduces
total llc time by 9.5%. Unfortunately, getNumUses() is still the hottest function
in llc.

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

13 years agoKeep track of which stage produced a live range, and bypass earlier stages when revis...
Jakob Stoklund Olesen [Tue, 1 Mar 2011 21:10:07 +0000 (21:10 +0000)]
Keep track of which stage produced a live range, and bypass earlier stages when revisiting.

This effectively disables the 'turbo' functionality of the greedy register
allocator where all new live ranges created by splitting would be reconsidered
as if they were originals.

There are two reasons for doing this, 1. It guarantees that the algorithm
terminates. Early versions were prone to infinite looping in certain corner
cases. 2. It is a 2x speedup. We can skip a lot of unnecessary interference
checks that won't lead to good splitting anyway.

The problem is that region splitting only gets one shot, so it should probably
be changed to target multiple physical registers at once.

Local live range splitting is still 'turbo' enabled. It only accounts for a
small fraction of compile time, so it is probably not necessary to do anything
about that.

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

13 years agoAdd datalayout information for the IEEE quad precision fp128 type.
Duncan Sands [Tue, 1 Mar 2011 20:56:50 +0000 (20:56 +0000)]
Add datalayout information for the IEEE quad precision fp128 type.

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

13 years agoRevert PathV2 changes, as sys::fs::unique_file is not finished yet.
Dan Gohman [Tue, 1 Mar 2011 19:50:55 +0000 (19:50 +0000)]
Revert PathV2 changes, as sys::fs::unique_file is not finished yet.

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

13 years agoAdded missing va_end().
Talin [Tue, 1 Mar 2011 18:00:49 +0000 (18:00 +0000)]
Added missing va_end().

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

13 years agoAdd a few missed unary cases when legalizing vector results. Put some cases
Duncan Sands [Tue, 1 Mar 2011 15:15:43 +0000 (15:15 +0000)]
Add a few missed unary cases when legalizing vector results.  Put some cases
in alphabetical order.

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

13 years agoMake InstCombiner::FoldAndOfICmps create a ConstantRange that's the
Anders Carlsson [Tue, 1 Mar 2011 15:05:01 +0000 (15:05 +0000)]
Make InstCombiner::FoldAndOfICmps create a ConstantRange that's the
intersection of the LHS and RHS ConstantRanges and return "false" when
the range is empty.

This simplifies some code and catches some extra cases.

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

13 years agoadd a missing const qualifier for consistency.
Chris Lattner [Tue, 1 Mar 2011 08:36:21 +0000 (08:36 +0000)]
add a missing const qualifier for consistency.

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

13 years agoOptimize "icmp pred (urem X, Y), Y" --> true/false depending on pred. There's
Nick Lewycky [Tue, 1 Mar 2011 08:15:50 +0000 (08:15 +0000)]
Optimize "icmp pred (urem X, Y), Y" --> true/false depending on pred. There's
more work to do here, "icmp ult (urem X, 10), 11" doesn't optimize away yet.
Fixes example 3 from PR9343!

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

13 years agotrailing whitespace.
Jim Grosbach [Tue, 1 Mar 2011 01:39:05 +0000 (01:39 +0000)]
trailing whitespace.

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

13 years agoGeneralize the register matching code in DAGISel a bit.
Jim Grosbach [Tue, 1 Mar 2011 01:37:19 +0000 (01:37 +0000)]
Generalize the register matching code in DAGISel a bit.

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

13 years agoNarrow right shifts need to encode their immediates differently from a normal
Bill Wendling [Tue, 1 Mar 2011 01:00:59 +0000 (01:00 +0000)]
Narrow right shifts need to encode their immediates differently from a normal
shift.

   16-bit: imm6<5:3> = '001', 8 - <imm> is encded in imm6<2:0>
   32-bit: imm6<5:4> = '01',16 - <imm> is encded in imm6<3:0>
   64-bit: imm6<5> = '1', 32 - <imm> is encded in imm6<4:0>

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

13 years agoAdd an obvious missing safety check to DAE::RemoveDeadArgumentsFromCallers.
Eli Friedman [Tue, 1 Mar 2011 00:33:47 +0000 (00:33 +0000)]
Add an obvious missing safety check to DAE::RemoveDeadArgumentsFromCallers.

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

13 years agoadd a note
Chris Lattner [Tue, 1 Mar 2011 00:24:51 +0000 (00:24 +0000)]
add a note

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

13 years agoUnbreak CMake build.
Ted Kremenek [Tue, 1 Mar 2011 00:02:51 +0000 (00:02 +0000)]
Unbreak CMake build.

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

13 years agoUnbreak CMake build.
Ted Kremenek [Mon, 28 Feb 2011 23:56:33 +0000 (23:56 +0000)]
Unbreak CMake build.

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

13 years agoAdd an END_WITH_NULL accessor for ConstantStruct.
Talin [Mon, 28 Feb 2011 23:53:27 +0000 (23:53 +0000)]
Add an END_WITH_NULL accessor for ConstantStruct.

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

13 years agoupdate cmake
Chris Lattner [Mon, 28 Feb 2011 22:45:25 +0000 (22:45 +0000)]
update cmake

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

13 years agoFix .fpu printing in ARM assembly, regarding bug http://llvm.org/bugs/show_bug.cgi...
Renato Golin [Mon, 28 Feb 2011 22:04:27 +0000 (22:04 +0000)]
Fix .fpu printing in ARM assembly, regarding bug llvm.org/bugs/show_bug.cgi?id=8931

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

13 years agoAdd missing whitespace in the formatting.
Kevin Enderby [Mon, 28 Feb 2011 21:45:12 +0000 (21:45 +0000)]
Add missing whitespace in the formatting.

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

13 years agoMake all static functions become static class methods. Move shared (duplicated) funct...
Jan Sjödin [Mon, 28 Feb 2011 21:45:04 +0000 (21:45 +0000)]
Make all static functions become static class methods. Move shared (duplicated) functions to new MCELF class.

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

13 years agoUse the correct shift amount type.
Owen Anderson [Mon, 28 Feb 2011 21:10:10 +0000 (21:10 +0000)]
Use the correct shift amount type.

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

13 years agoClean whitespace.
Owen Anderson [Mon, 28 Feb 2011 20:57:56 +0000 (20:57 +0000)]
Clean whitespace.

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

13 years agofix a signed comparison warning.
Chris Lattner [Mon, 28 Feb 2011 20:50:35 +0000 (20:50 +0000)]
fix a signed comparison warning.

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

13 years agoDelete obsolete test.
Dan Gohman [Mon, 28 Feb 2011 19:58:14 +0000 (19:58 +0000)]
Delete obsolete test.

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

13 years agoFix warning when building with clang++.
Owen Anderson [Mon, 28 Feb 2011 19:58:06 +0000 (19:58 +0000)]
Fix warning when building with clang++.

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

13 years agoDelete the GEPSplitter experiment.
Dan Gohman [Mon, 28 Feb 2011 19:47:47 +0000 (19:47 +0000)]
Delete the GEPSplitter experiment.

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

13 years agoDelete the SimplifyHalfPowrLibCalls pass, which was unused, and
Dan Gohman [Mon, 28 Feb 2011 19:41:14 +0000 (19:41 +0000)]
Delete the SimplifyHalfPowrLibCalls pass, which was unused, and
only existed as the result of a misunderstanding.

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

13 years agoDelete the LiveValues pass. I won't get get back to the project it
Dan Gohman [Mon, 28 Feb 2011 19:37:59 +0000 (19:37 +0000)]
Delete the LiveValues pass. I won't get get back to the project it
was started for in the foreseeable future.

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

13 years agoFix typo introduced by r126661: "Fix a typo which ..."
Jakob Stoklund Olesen [Mon, 28 Feb 2011 19:18:59 +0000 (19:18 +0000)]
Fix typo introduced by r126661: "Fix a typo which ..."

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

13 years ago[AVX] Add decode support for VUNPCKLPS/D instructions, both 128-bit
David Greene [Mon, 28 Feb 2011 19:06:56 +0000 (19:06 +0000)]
[AVX] Add decode support for VUNPCKLPS/D instructions, both 128-bit
      and 256-bit forms.  Because the number of elements in a vector
      does not determine the vector type (4 elements could be v4f32 or
      v4f64), pass the full type of the vector to decode routines.

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

13 years agoFix the arm's disassembler for blx that was building an MCInst without the
Kevin Enderby [Mon, 28 Feb 2011 18:46:31 +0000 (18:46 +0000)]
Fix the arm's disassembler for blx that was building an MCInst without the
needed two predicate operands before the imm operand.

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

13 years agoFix a typo which cause dag combine crash. rdar://9059537.
Evan Cheng [Mon, 28 Feb 2011 18:45:27 +0000 (18:45 +0000)]
Fix a typo which cause dag combine crash. rdar://9059537.

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

13 years agoSupport for byval parameters on ARM. Will be enabled by a forthcoming
Stuart Hastings [Mon, 28 Feb 2011 17:17:53 +0000 (17:17 +0000)]
Support for byval parameters on ARM.  Will be enabled by a forthcoming
patch to the front-end.  Radar 7662569.

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

13 years agoWindows codegen also dies on this, so restrict to the platform it was
Duncan Sands [Mon, 28 Feb 2011 14:22:08 +0000 (14:22 +0000)]
Windows codegen also dies on this, so restrict to the platform it was
actually tested on.

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

13 years agoAdd branch hinting for SPU.
Kalle Raiskila [Mon, 28 Feb 2011 14:08:24 +0000 (14:08 +0000)]
Add branch hinting for SPU.
The implemented algorithm is overly simplistic (just speculate all branches are
taken)- this is work in progress.

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

13 years agoMake this test x86 specific because the ARM backend can't handle it.
Duncan Sands [Mon, 28 Feb 2011 12:30:47 +0000 (12:30 +0000)]
Make this test x86 specific because the ARM backend can't handle it.

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

13 years agoTeach SimplifyCFG that (switch (select cond, X, Y)) is better expressed as a branch.
Frits van Bommel [Mon, 28 Feb 2011 09:44:07 +0000 (09:44 +0000)]
Teach SimplifyCFG that (switch (select cond, X, Y)) is better expressed as a branch.
Based on a patch by Alistair Lynn.

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

13 years agoFix comment.
Nick Lewycky [Mon, 28 Feb 2011 09:18:11 +0000 (09:18 +0000)]
Fix comment.

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

13 years agosrem doesn't actually have the same resulting sign as its numerator, you could
Nick Lewycky [Mon, 28 Feb 2011 09:17:39 +0000 (09:17 +0000)]
srem doesn't actually have the same resulting sign as its numerator, you could
also have a zero when numerator = denominator. Reverts parts of r126635 and
r126637.

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

13 years agoTeach InstCombine to fold "(shr exact X, Y) == 0" --> X == 0, fixing #1 from
Nick Lewycky [Mon, 28 Feb 2011 08:31:40 +0000 (08:31 +0000)]
Teach InstCombine to fold "(shr exact X, Y) == 0" --> X == 0, fixing #1 from
PR9343.

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

13 years agoTeach value tracking to make use of flags in more situations.
Nick Lewycky [Mon, 28 Feb 2011 08:02:21 +0000 (08:02 +0000)]
Teach value tracking to make use of flags in more situations.

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

13 years agoTeach ValueTracking to look at the dividend when determining the sign bit of an
Nick Lewycky [Mon, 28 Feb 2011 06:52:12 +0000 (06:52 +0000)]
Teach ValueTracking to look at the dividend when determining the sign bit of an
srem instruction.

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

13 years agoAdd preliminary support for .f32 in the PTX backend.
Che-Liang Chiou [Mon, 28 Feb 2011 06:34:09 +0000 (06:34 +0000)]
Add preliminary support for .f32 in the PTX backend.

- Add appropriate TableGen patterns for fadd, fsub, fmul.
- Add .f32 as the PTX type for the LLVM float type.
- Allow parameters, return values, and global variable declarations
  to accept the float type.
- Add appropriate test cases.

Patch by Justin Holewinski

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

13 years agoThe sign of an srem instruction is the sign of its dividend (the first
Nick Lewycky [Mon, 28 Feb 2011 06:20:05 +0000 (06:20 +0000)]
The sign of an srem instruction is the sign of its dividend (the first
argument), regardless of the divisor. Teach instcombine about this and fix
test7 in PR9343!

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

13 years agoDon't install libUnitTestMain.a. It might be useless without gtest headers.
NAKAMURA Takumi [Mon, 28 Feb 2011 05:18:07 +0000 (05:18 +0000)]
Don't install libUnitTestMain.a. It might be useless without gtest headers.

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

13 years agoUpdate the documentation on "How to Release LLVM". It lays out a new way of
Bill Wendling [Mon, 28 Feb 2011 01:10:44 +0000 (01:10 +0000)]
Update the documentation on "How to Release LLVM". It lays out a new way of
tagging and branching for the release. I will update this more throughout the
2.9 release process.

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

13 years agoadd the ability to walk the scope tree and insert at not-the-current
Chris Lattner [Sun, 27 Feb 2011 22:51:57 +0000 (22:51 +0000)]
add the ability to walk the scope tree and insert at not-the-current
scope.

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

13 years agoadd a data() method.
Chris Lattner [Sun, 27 Feb 2011 22:51:37 +0000 (22:51 +0000)]
add a data() method.

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

13 years agoGold now rescans archives as needed, so the pass-through options are not
Rafael Espindola [Sun, 27 Feb 2011 20:30:22 +0000 (20:30 +0000)]
Gold now rescans archives as needed, so the pass-through options are not
necessary anymore.

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

13 years agobfd was fixed, remove the work around.
Rafael Espindola [Sun, 27 Feb 2011 20:15:37 +0000 (20:15 +0000)]
bfd was fixed, remove the work around.

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

13 years agoSilence enum conversion warnings.
Benjamin Kramer [Sun, 27 Feb 2011 18:13:53 +0000 (18:13 +0000)]
Silence enum conversion warnings.

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

13 years agoLegalize support for fpextend of vector. PR9309.
Duncan Sands [Sun, 27 Feb 2011 14:41:27 +0000 (14:41 +0000)]
Legalize support for fpextend of vector.  PR9309.

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

13 years agoFix typo pointed out in pr9339.
Duncan Sands [Sun, 27 Feb 2011 13:54:01 +0000 (13:54 +0000)]
Fix typo pointed out in pr9339.

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

13 years agoInstall include/llvm/Support/LICENSE.TXT. PR9321.
Oscar Fuentes [Sun, 27 Feb 2011 13:32:50 +0000 (13:32 +0000)]
Install include/llvm/Support/LICENSE.TXT. PR9321.

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

13 years agoTarget/X86: Always emit "push/pop GPRs" in prologue/epilogue and emit "spill/reload...
NAKAMURA Takumi [Sun, 27 Feb 2011 08:47:19 +0000 (08:47 +0000)]
Target/X86: Always emit "push/pop GPRs" in prologue/epilogue and emit "spill/reload frames" for XMMs.

It improves Win64's prologue/epilogue but it would not affect ia32 and amd64 (lack of nonvolatile XMMs).

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

13 years agoFix PR9324 / <rdar://problem/9052489> by handling the case where a PHI has no uses.
Cameron Zwarich [Sun, 27 Feb 2011 08:06:01 +0000 (08:06 +0000)]
Fix PR9324 / <rdar://problem/9052489> by handling the case where a PHI has no uses.

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

13 years agoGive a test file a more sensible name so that it can hold more test cases.
Cameron Zwarich [Sun, 27 Feb 2011 08:05:57 +0000 (08:05 +0000)]
Give a test file a more sensible name so that it can hold more test cases.

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

13 years agoFix typos in the comments.
Nadav Rotem [Sun, 27 Feb 2011 07:40:43 +0000 (07:40 +0000)]
Fix typos in the comments.

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

13 years agoRegionPrinter: Ignore back edges when layouting the graph
Tobias Grosser [Sun, 27 Feb 2011 04:11:07 +0000 (04:11 +0000)]
RegionPrinter: Ignore back edges when layouting the graph

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

13 years agocmake: Add xdot.py support as it already exists in autoconf.
Tobias Grosser [Sun, 27 Feb 2011 04:11:05 +0000 (04:11 +0000)]
cmake: Add xdot.py support as it already exists in autoconf.

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

13 years agoPass the graph to the DOTGraphTraits.getEdgeAttributes().
Tobias Grosser [Sun, 27 Feb 2011 04:11:03 +0000 (04:11 +0000)]
Pass the graph to the DOTGraphTraits.getEdgeAttributes().

This follows the interface of getNodeAttributes.

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

13 years agoSupport: Add llvm::AreStatisticsEnabled().
Daniel Dunbar [Sat, 26 Feb 2011 23:17:12 +0000 (23:17 +0000)]
Support: Add llvm::AreStatisticsEnabled().

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

13 years agoAdd some DAGCombines for (adde 0, 0, glue), which are useful to optimize legalized...
Benjamin Kramer [Sat, 26 Feb 2011 22:48:07 +0000 (22:48 +0000)]
Add some DAGCombines for (adde 0, 0, glue), which are useful to optimize legalized code for large integer arithmetic.

1. Inform users of ADDEs with two 0 operands that it never sets carry
2. Fold other ADDs or ADDCs into the ADDE if possible

It would be neat if we could do the same thing for SETCC+ADD eventually, but we can't do that in target independent code.

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

13 years agoLTO uses MC now.
Rafael Espindola [Sat, 26 Feb 2011 16:44:13 +0000 (16:44 +0000)]
LTO uses MC now.

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

13 years agoA new TableGen feature! (Not turned on just yet.)
Bill Wendling [Sat, 26 Feb 2011 03:09:12 +0000 (03:09 +0000)]
A new TableGen feature! (Not turned on just yet.)

   InstAlias<{alias}, {aliasee}>;

The InstAlias instruction should be able to go from the MCInst to the
{alias}. All of the information is there to match the MCInst with the
{aliasee}. From there, it's a simple matter to emit the {alias}, with the
correct operands from the {aliasee}.

The code this patch generates can be used by the InstPrinter to automatically
print out the alias without having to write special C++ code to handle the
situation.

This is a WIP, and therefore are several limitations. For instance, it cannot
handle AsmOperands at the moment. It also doesn't know what to do when two
{alias}es match the same {aliasee}. (Currently, it just ignores those two cases
and allows the printInstruction method to handle them.)

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