oota-llvm.git
10 years agoRemove redundant flag.
Bill Wendling [Thu, 2 May 2013 22:52:47 +0000 (22:52 +0000)]
Remove redundant flag.

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

10 years agoreverting r180953
Jyotsna Verma [Thu, 2 May 2013 22:10:59 +0000 (22:10 +0000)]
reverting r180953

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

10 years agoR600: Signed literals are 64bits wide
Vincent Lejeune [Thu, 2 May 2013 21:53:03 +0000 (21:53 +0000)]
R600: Signed literals are 64bits wide

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

10 years agoR600: If previous bundle is dot4, PV valid chan is always X
Vincent Lejeune [Thu, 2 May 2013 21:52:55 +0000 (21:52 +0000)]
R600: If previous bundle is dot4, PV valid chan is always X

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

10 years agoR600: Add a test to check that use_kill is emitted
Vincent Lejeune [Thu, 2 May 2013 21:52:46 +0000 (21:52 +0000)]
R600: Add a test to check that use_kill is emitted

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

10 years agoR600: Improve asmPrint of ALU clause
Vincent Lejeune [Thu, 2 May 2013 21:52:40 +0000 (21:52 +0000)]
R600: Improve asmPrint of ALU clause

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

10 years agoR600: Prettier asmPrint of Alu
Vincent Lejeune [Thu, 2 May 2013 21:52:30 +0000 (21:52 +0000)]
R600: Prettier asmPrint of Alu

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

10 years agoHexagon: Add multiclass/encoding bits for the New-Value Jump instructions.
Jyotsna Verma [Thu, 2 May 2013 21:21:57 +0000 (21:21 +0000)]
Hexagon: Add multiclass/encoding bits for the New-Value Jump instructions.

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

10 years ago[GV] Remove dead code which is really difficult to decipher.
Shuxin Yang [Thu, 2 May 2013 21:14:31 +0000 (21:14 +0000)]
[GV] Remove dead code which is really difficult to decipher.

Actually it took me couple of hours trying to make sense of them and
only to find they are dead code.  I guess the original author used
"allSingleSucc" to indicate if there are any critial edge emanating
from some blocks, and tried to perform code motion (actually speculation)
in the presence of these critical edges; but later on he/she changed mind
and decided to perform edge-splitting first.

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

10 years agoWe don't want FP elimination when doing an Apple-style build.
Bill Wendling [Thu, 2 May 2013 21:09:03 +0000 (21:09 +0000)]
We don't want FP elimination when doing an Apple-style build.

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

10 years agoReplaced usages of size_type with size_t to be more consistent.
Aaron Ballman [Thu, 2 May 2013 20:30:27 +0000 (20:30 +0000)]
Replaced usages of size_type with size_t to be more consistent.

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

10 years agoHexagon - Add peephole optimizations for zero extends.
Pranav Bhandarkar [Thu, 2 May 2013 20:22:51 +0000 (20:22 +0000)]
Hexagon - Add peephole optimizations for zero extends.

* lib/Target/Hexagon/HexagonInstrInfo.td: Add patterns to combine a
sequence of a pair of i32->i64 extensions followed by a "bitwise or"
into COMBINE_rr.
* lib/Target/Hexagon/HexagonPeephole.cpp: Copy propagate Rx in the
instruction Rp = COMBINE_Ir_V4(0, Rx) to the uses of Rp:subreg_loreg.
* test/CodeGen/Hexagon/union-1.ll: New test.
* test/CodeGen/Hexagon/combine_ir.ll: Fix test.

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

10 years ago[mips] Fix the head Mips16RegisterInfo.cpp comment
Richard Sandiford [Thu, 2 May 2013 18:28:03 +0000 (18:28 +0000)]
[mips] Fix the head Mips16RegisterInfo.cpp comment

...aka a test commit.

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

10 years agoTBAA: remove !tbaa from testing cases if not used.
Manman Ren [Thu, 2 May 2013 18:11:35 +0000 (18:11 +0000)]
TBAA: remove !tbaa from testing cases if not used.

This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.

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

10 years agoProvide an API to temporarily suppress DebugLocations from being attached
Adrian Prantl [Thu, 2 May 2013 17:27:49 +0000 (17:27 +0000)]
Provide an API to temporarily suppress DebugLocations from being attached
to emitted instructions.  Use this if you want an instruction to be
counted towards the prologue or if there is no useful source location.

rdar://problem/13442648

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

10 years agoHexagon: Honor __builtin_expect by using branch probabilities.
Jyotsna Verma [Thu, 2 May 2013 15:39:30 +0000 (15:39 +0000)]
Hexagon: Honor __builtin_expect by using branch probabilities.

  * lib/Target/Hexagon/HexagonInstrInfo.cpp (GetDotNewPredOp):
  Given a jump opcode return the right pred.new jump opcode with
  a taken vs not-taken hint based on branch probabilities provided
  by the target independent module.
  * lib/Target/Hexagon/HexagonVLIWPacketizer.cpp: Use the above function.
  * lib/Target/Hexagon/HexagonNewValueJump.cpp(getNewvalueJumpOpcode):
  Enhance existing function use branch probabilities like
  HexagonInstrInfo::GetDotNewPredOp but for New Value (GPR) Jumps.

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

10 years agoR600: Use new tablegen syntax for patterns
Tom Stellard [Thu, 2 May 2013 15:30:12 +0000 (15:30 +0000)]
R600: Use new tablegen syntax for patterns

All but two patterns have been converted to the new syntax.  The
remaining two patterns will require COPY_TO_REGCLASS instructions, which
the VLIW DAG Scheduler cannot handle.

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

10 years agoR600/SI: remove nonsense select pattern
Tom Stellard [Thu, 2 May 2013 15:30:07 +0000 (15:30 +0000)]
R600/SI: remove nonsense select pattern

Fortunately this pattern never matched, otherwise
we would have generated incorrect code.

Signed-off-by: Christian K??nig <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180921 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdded table of contents declaration in CommandLine Library documentation.
Tobias Grosser [Thu, 2 May 2013 14:59:52 +0000 (14:59 +0000)]
Added table of contents declaration in CommandLine Library documentation.

Contributed-by: Dan Liew <daniel.liew@imperial.ac.uk>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180919 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago80-col fixup.
Michael Liao [Thu, 2 May 2013 09:22:04 +0000 (09:22 +0000)]
80-col fixup.

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

10 years agoAvoid duplicating logic on frame register selecting when lowering eh_return
Michael Liao [Thu, 2 May 2013 09:18:38 +0000 (09:18 +0000)]
Avoid duplicating logic on frame register selecting when lowering eh_return

No functionality change

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

10 years agoAvoid duplicating logic on frame register selecting when lowering frameaddr
Michael Liao [Thu, 2 May 2013 08:21:56 +0000 (08:21 +0000)]
Avoid duplicating logic on frame register selecting when lowering frameaddr

No functionality change

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

10 years agoRewrite X86 codegen regression test with FileCheck
Michael Liao [Thu, 2 May 2013 06:20:42 +0000 (06:20 +0000)]
Rewrite X86 codegen regression test with FileCheck

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

10 years agoAdd a test for the foldSelectICmpAndOr fix committed in r180779.
David Majnemer [Thu, 2 May 2013 02:44:23 +0000 (02:44 +0000)]
Add a test for the foldSelectICmpAndOr fix committed in r180779.

This tests a case where C1 and C2 were the same but X and Y were different
widths.

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

10 years agoTiedTo flag can now be placed on implicit operands. isTwoAddrUse() should look
Evan Cheng [Thu, 2 May 2013 02:07:32 +0000 (02:07 +0000)]
TiedTo flag can now be placed on implicit operands. isTwoAddrUse() should look
at all of the operands. Previously it was skipping over implicit operands which
cause infinite looping when the two-address pass try to reschedule a
two-address instruction below the kill of tied operand.

I'm unable to come up with a reasonably sized test case.
rdar://13747577

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

10 years ago[mips] Rename class and functions. Simplify code.
Akira Hatanaka [Wed, 1 May 2013 23:41:31 +0000 (23:41 +0000)]
[mips] Rename class and functions. Simplify code.

No functionality changes.

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

10 years agoThis exposes more MCJIT options via the C API:
Filip Pizlo [Wed, 1 May 2013 22:58:00 +0000 (22:58 +0000)]
This exposes more MCJIT options via the C API:

CodeModel: It's now possible to create an MCJIT instance with any CodeModel you like.  Previously it was only possible to
create an MCJIT that used CodeModel::JITDefault.

EnableFastISel: It's now possible to turn on the fast instruction selector.

The CodeModel option required some trickery.  The problem is that previously, we were ensuring future binary compatibility in
the MCJITCompilerOptions by mandating that the user bzero's the options struct and passes the sizeof() that he saw; the
bindings then bzero the remaining bits.  This works great but assumes that the bitwise zero equivalent of any field is a
sensible default value.

But this is not the case for LLVMCodeModel, or its internal equivalent, llvm::CodeModel::Model.  In both of those, the default
for a JIT is CodeModel::JITDefault (or LLVMCodeModelJITDefault), which is not bitwise zero.

Hence this change introduces LLVMInitializeMCJITCompilerOptions(), which will initialize the user's options struct with
defaults. The user will use this in the same way that they would have previously used memset() or bzero(). MCJITCAPITest.cpp
illustrates the change, as does the comment in ExecutionEngine.h.

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

10 years agoAvoid generating tempfile(s) never used
Michael Liao [Wed, 1 May 2013 22:46:50 +0000 (22:46 +0000)]
Avoid generating tempfile(s) never used

As DejaGNU is deprecated, it seems pipe-jam issue doesn't exist any more.

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

10 years agoRename 'struct LLVMTargetMachine' to 'struct LLVMOpaqueTargetMachine'.
Filip Pizlo [Wed, 1 May 2013 22:41:26 +0000 (22:41 +0000)]
Rename 'struct LLVMTargetMachine' to 'struct LLVMOpaqueTargetMachine'.
This avoids namespace collisions with llvm::LLVMTargetMachine.

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

10 years agoRevert r180737. The companion patch was reverted, and this is not relevant right...
Bill Wendling [Wed, 1 May 2013 22:32:08 +0000 (22:32 +0000)]
Revert r180737. The companion patch was reverted, and this is not relevant right now.

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

10 years agoHexagon: Use multiclass for Jump instructions.
Jyotsna Verma [Wed, 1 May 2013 21:37:34 +0000 (21:37 +0000)]
Hexagon: Use multiclass for Jump instructions.

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

10 years agoHexagon: Clear isKill flag on the predicate register in
Jyotsna Verma [Wed, 1 May 2013 21:27:30 +0000 (21:27 +0000)]
Hexagon: Clear isKill flag on the predicate register in
PredicateInstruction function.

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

10 years agoAdd support for other typeinfo encodings in the ExceptionDemo.
Rafael Espindola [Wed, 1 May 2013 21:05:05 +0000 (21:05 +0000)]
Add support for other typeinfo encodings in the ExceptionDemo.

The old jit always uses DW_EH_PE_absptr, but MCJIT can use other encodings.
This is in preparation for adding EH support to MCJIT, but not directly
related, so I am committing it first.

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

10 years agoFix file header comment.
Filip Pizlo [Wed, 1 May 2013 21:01:06 +0000 (21:01 +0000)]
Fix file header comment.

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

10 years agoThis patch breaks up Wrap.h so that it does not have to include all of
Filip Pizlo [Wed, 1 May 2013 20:59:00 +0000 (20:59 +0000)]
This patch breaks up Wrap.h so that it does not have to include all of
the things, and renames it to CBindingWrapping.h.  I also moved
CBindingWrapping.h into Support/.

This new file just contains the macros for defining different wrap/unwrap
methods.

The calls to those macros, as well as any custom wrap/unwrap definitions
(like for array of Values for example), are put into corresponding C++
headers.

Doing this required some #include surgery, since some .cpp files relied
on the fact that including Wrap.h implicitly caused the inclusion of a
bunch of other things.

This also now means that the C++ headers will include their corresponding
C API headers; for example Value.h must include llvm-c/Core.h.  I think
this is harmless, since the C API headers contain just external function
declarations and some C types, so I don't believe there should be any
nasty dependency issues here.

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

10 years agoSROA: Generate selects instead of shuffles when blending values because this is the...
Nadav Rotem [Wed, 1 May 2013 19:53:30 +0000 (19:53 +0000)]
SROA: Generate selects instead of shuffles when blending values because this is the cannonical form.
Shuffles are more difficult to lower and we usually don't touch them, while we do optimize selects more often.

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

10 years ago[inline asm] Return an undef SDValue of the expected value type, rather than
Chad Rosier [Wed, 1 May 2013 19:49:26 +0000 (19:49 +0000)]
[inline asm] Return an undef SDValue of the expected value type, rather than
report a fatal error.  This allows us to continue processing the translation
unit.  Test case to come on the clang side because we need an inline asm
diagnostics handler in place.
rdar://13446483

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

10 years agoOptimize away nop CONCAT_VECTOR nodes.
Nadav Rotem [Wed, 1 May 2013 19:18:51 +0000 (19:18 +0000)]
Optimize away nop CONCAT_VECTOR nodes.

Optimize CONCAT_VECTOR nodes that merge EXTRACT_SUBVECTOR values that extract from the same vector.

rdar://13402653
PR15866

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

10 years agoUpdating the getting started guide for Visual Studio users. Specifically, pointing...
Aaron Ballman [Wed, 1 May 2013 19:13:50 +0000 (19:13 +0000)]
Updating the getting started guide for Visual Studio users. Specifically, pointing out that you have to pass additional parameters to llvm-lit and explicitly specify python on the command line.

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

11 years agoget rid of windows warning:
Peng Cheng [Wed, 1 May 2013 15:04:18 +0000 (15:04 +0000)]
get rid of windows warning:

warning C4946: reinterpret_cast used between related classes

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

11 years agoget rid of windows warning:
Peng Cheng [Wed, 1 May 2013 15:00:07 +0000 (15:00 +0000)]
get rid of windows warning:

warning C4800: forcing value to bool 'true' or 'false' (performance warning)

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

11 years agoreplace reinterpret_cast by cast or remove reinterpret_cast to get rid of windows...
Peng Cheng [Wed, 1 May 2013 14:54:01 +0000 (14:54 +0000)]
replace reinterpret_cast by cast or remove reinterpret_cast to get rid of windows warning: warning C4946: reinterpret_cast used between related classes.

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

11 years agofix windows warning.
Peng Cheng [Wed, 1 May 2013 14:18:06 +0000 (14:18 +0000)]
fix windows warning.

warning C4244: 'argument' : conversion from 'uint64_t' to 'const unsigned int', possible loss of data

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

11 years agouse static_cast to get rid of windows warning.
Peng Cheng [Wed, 1 May 2013 14:07:02 +0000 (14:07 +0000)]
use static_cast to get rid of windows warning.

warning C4244: 'argument' : conversion from 'uint64_t' to 'const unsigned int', possible loss of data

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

11 years agoNow that the underlying issue is fixed, revert r180750 and r180722.
Rafael Espindola [Wed, 1 May 2013 13:07:03 +0000 (13:07 +0000)]
Now that the underlying issue is fixed, revert r180750 and r180722.

The cause of the windows failures was fixed by r180791. Revert to the state
after Sabre's original revert.

Original message:

revert r179735, it has no testcases, and doesn't really make sense.

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

11 years agoFix spelling
Nikola Smiljanic [Wed, 1 May 2013 13:05:43 +0000 (13:05 +0000)]
Fix spelling

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

11 years agoPut VMOVPQIto64rr in the VRPDI class.
Rafael Espindola [Wed, 1 May 2013 13:00:16 +0000 (13:00 +0000)]
Put VMOVPQIto64rr in the VRPDI class.

Patch by Joshua Magee.

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

11 years agoCorrect comment: there is no numTys parameter any more now that this is using
Duncan Sands [Wed, 1 May 2013 07:54:55 +0000 (07:54 +0000)]
Correct comment: there is no numTys parameter any more now that this is using
ArrayRef.

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

11 years agoWrap some lines to bring MCJITCAPITest into conformance with the 80 column limit.
Filip Pizlo [Wed, 1 May 2013 06:46:59 +0000 (06:46 +0000)]
Wrap some lines to bring MCJITCAPITest into conformance with the 80 column limit.

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

11 years agoForget remove the tempfile argument
Michael Liao [Wed, 1 May 2013 05:45:57 +0000 (05:45 +0000)]
Forget remove the tempfile argument

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

11 years agoMore rewrites of x86 codegen regression tests with FileCheck
Michael Liao [Wed, 1 May 2013 05:34:30 +0000 (05:34 +0000)]
More rewrites of x86 codegen regression tests with FileCheck

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

11 years agoFixes a buffer overrun where the allocated buffer wasn't large enough to accommodate...
Aaron Ballman [Wed, 1 May 2013 02:53:14 +0000 (02:53 +0000)]
Fixes a buffer overrun where the allocated buffer wasn't large enough to accommodate the closing quote escape rules in some instances.

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

11 years agoRevert "InstCombine: Fold more shuffles of shuffles."
Jim Grosbach [Wed, 1 May 2013 00:25:27 +0000 (00:25 +0000)]
Revert "InstCombine: Fold more shuffles of shuffles."

This reverts commit r180802

There's ongoing discussion about whether this is the right place to make
this transformation. Reverting for now while we figure it out.

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

11 years ago[mips] Fix handling of instructions which copy to/from accumulator registers.
Akira Hatanaka [Tue, 30 Apr 2013 23:22:09 +0000 (23:22 +0000)]
[mips] Fix handling of instructions which copy to/from accumulator registers.

Expand copy instructions between two accumulator registers before callee-saved
scan is done. Handle copies between integer GPR and hi/lo registers in
MipsSEInstrInfo::copyPhysReg. Delete pseudo-copy instructions that are not
needed.

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

11 years agoOnly pass 'returned' to target-specific lowering code when the value of entire regist...
Stephen Lin [Tue, 30 Apr 2013 22:49:28 +0000 (22:49 +0000)]
Only pass 'returned' to target-specific lowering code when the value of entire register is guaranteed to be preserved.

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

11 years agoFix a use after free. RI is freed before the call to getDebugLoc(). To
Richard Trieu [Tue, 30 Apr 2013 22:45:10 +0000 (22:45 +0000)]
Fix a use after free.  RI is freed before the call to getDebugLoc().  To
prevent this, capture the location before RI is freed.

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

11 years ago[mips] Instruction selection patterns for DSP-ASE vector select and compare
Akira Hatanaka [Tue, 30 Apr 2013 22:37:26 +0000 (22:37 +0000)]
[mips] Instruction selection patterns for DSP-ASE vector select and compare
instructions.

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

11 years agoTemporarily revert "Change the informal convention of DBG_VALUE so that we can express a"
Adrian Prantl [Tue, 30 Apr 2013 22:35:14 +0000 (22:35 +0000)]
Temporarily revert "Change the informal convention of DBG_VALUE so that we can express a"
because it breaks some buildbots.

This reverts commit 180816.

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

11 years agoChange the informal convention of DBG_VALUE so that we can express a
Adrian Prantl [Tue, 30 Apr 2013 22:16:46 +0000 (22:16 +0000)]
Change the informal convention of DBG_VALUE so that we can express a
register-indirect address with an offset of 0.
It used to be that a DBG_VALUE is a register-indirect value if the offset
(operand 1) is nonzero. The new convention is that a DBG_VALUE is
register-indirect if the first operand is a register and the second
operand is an immediate. For plain registers use the combination reg, reg.

rdar://problem/13658587

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

11 years agoMI Sched: revert a minor heuristic that snuck in with -misched-vcopy.
Andrew Trick [Tue, 30 Apr 2013 22:10:59 +0000 (22:10 +0000)]
MI Sched: revert a minor heuristic that snuck in with -misched-vcopy.

I'll fix the heuristic in a general way in a follow-up commit.

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

11 years ago[mips] Simplify code.
Akira Hatanaka [Tue, 30 Apr 2013 21:17:07 +0000 (21:17 +0000)]
[mips] Simplify code.

No intended functionality changes.

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

11 years agoFix a typo
Nadav Rotem [Tue, 30 Apr 2013 21:04:51 +0000 (21:04 +0000)]
Fix a typo

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

11 years agoUpdate the release notes about the min/max reductions that Arnold added.
Nadav Rotem [Tue, 30 Apr 2013 21:04:04 +0000 (21:04 +0000)]
Update the release notes about the min/max reductions that Arnold added.

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

11 years ago[mips] Test for r179873.
Akira Hatanaka [Tue, 30 Apr 2013 20:48:49 +0000 (20:48 +0000)]
[mips] Test for r179873.

Patch by Zoran Jovanovic.

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

11 years agoInstCombine: Fold more shuffles of shuffles.
Jim Grosbach [Tue, 30 Apr 2013 20:43:52 +0000 (20:43 +0000)]
InstCombine: Fold more shuffles of shuffles.

Always fold a shuffle-of-shuffle into a single shuffle when there's only one
input vector in the first place. Continue to be more conservative when there's
multiple inputs.

rdar://13402653
PR15866

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

11 years ago[mips] Clear isCommutable bit of instructions which are not commutable.
Akira Hatanaka [Tue, 30 Apr 2013 20:40:39 +0000 (20:40 +0000)]
[mips] Clear isCommutable bit of instructions which are not commutable.

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

11 years agoLocalStackSlotAllocation improvements
Hal Finkel [Tue, 30 Apr 2013 20:04:37 +0000 (20:04 +0000)]
LocalStackSlotAllocation improvements

First, taking advantage of the fact that the virtual base registers are allocated in order of the local frame offsets, remove the quadratic register-searching behavior. Because of the ordering, we only need to check the last virtual base register created.

Second, store the frame index in the FrameRef structure, and get the frame index and the local offset from this structure at the top of the loop iteration. This allows us to de-nest the loops in insertFrameReferenceRegisters (and I think makes the code cleaner). I also moved the needsFrameBaseReg check into the first loop over instructions so that we don't bother pushing FrameRefs for instructions that don't want a virtual base register anyway.

Lastly, and this is the only functionality change, avoid the creation of single-use virtual base registers. These are currently not useful because, in general, they end up replacing what would be one r+r instruction with an add and a r+i instruction. Committing this removes the XFAIL in CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll

Jim has okayed this off-list.

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

11 years agoText files should not be marked executable.
Rafael Espindola [Tue, 30 Apr 2013 19:06:15 +0000 (19:06 +0000)]
Text files should not be marked executable.

Patch by Oliver Pinter.

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

11 years agoTBAA: remove !tbaa from testing cases if not used.
Manman Ren [Tue, 30 Apr 2013 17:52:57 +0000 (17:52 +0000)]
TBAA: remove !tbaa from testing cases if not used.

This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.

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

11 years agoSpelling. Thanks, Eric.
Adrian Prantl [Tue, 30 Apr 2013 17:33:32 +0000 (17:33 +0000)]
Spelling. Thanks, Eric.

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

11 years agoSet debug locations for branch instructions created during inlining, even
Adrian Prantl [Tue, 30 Apr 2013 17:08:16 +0000 (17:08 +0000)]
Set debug locations for branch instructions created during inlining, even
the inlined function has multiple returns.

rdar://problem/12415623

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

11 years agoChange getSlotIndex to return unsigned.
Rafael Espindola [Tue, 30 Apr 2013 16:53:38 +0000 (16:53 +0000)]
Change getSlotIndex to return unsigned.

The actual storage was already using unsigned, but the interface was using
uint64_t. This is wasteful on 32 bits and looks to be the root causes of
a miscompilation on Windows where a value was being sign extended to 64bits
to compare with the result of getSlotIndex.

Patch by Pasi Parviainen!

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

11 years agoFix Addend computation for non external relocations on Macho.
Rafael Espindola [Tue, 30 Apr 2013 15:40:54 +0000 (15:40 +0000)]
Fix Addend computation for non external relocations on Macho.

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

11 years agoR600: fix loop-address.ll test
Vincent Lejeune [Tue, 30 Apr 2013 12:47:56 +0000 (12:47 +0000)]
R600: fix loop-address.ll test

Texture cache is now used when shader type is not specified

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

11 years agoFix a bug in foldSelectICmpAndOr.
David Majnemer [Tue, 30 Apr 2013 10:36:33 +0000 (10:36 +0000)]
Fix a bug in foldSelectICmpAndOr.

Differences in bitwidth between X and Y could exist even if C1 and C2 have
the same Log2 representation.

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

11 years agos tightens up the encoding description for ARM post-indexed ldr instructions. All...
Mihai Popa [Tue, 30 Apr 2013 09:00:12 +0000 (09:00 +0000)]
s tightens up the encoding description for ARM post-indexed ldr instructions. All instructions in this class have bit 4 cleared. It turns out that there is a test case for this, but it was marked XFAIL.

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

11 years agoFix "Combine bit test + conditional or into simple math"
David Majnemer [Tue, 30 Apr 2013 08:57:58 +0000 (08:57 +0000)]
Fix "Combine bit test + conditional or into simple math"

This fixes the optimization introduced in r179748 and reverted in r179750.

While the optimization was sound, it did not properly respect differences in
bit-width.

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

11 years agoRewrite X86 codegen regression test with FileCheck
Michael Liao [Tue, 30 Apr 2013 07:51:08 +0000 (07:51 +0000)]
Rewrite X86 codegen regression test with FileCheck

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

11 years agoRefactoring patch.
Stepan Dyatkovskiy [Tue, 30 Apr 2013 07:19:58 +0000 (07:19 +0000)]
Refactoring patch.
1. VarArgStyleRegisters: functionality that emits "store" instructions for byval regs moved out into separated method "StoreByValRegs". Before this patch VarArgStyleRegisters had confused use-cases. It was used for both variadic functions and for regular functions with byval parameters. In last case it created new stack-frame and registered it as VarArg frame, that is wrong.

This patch replaces VarArgsStyleRegisters usage for byval parameters with StoreByValRegs method.

2. In ARMMachineFunctionInfo, "get/setVarArgsRegSaveSize" was renamed to "get/setArgRegsSaveSize". By the same reason. Sometimes it was used for variadic functions, and sometimes for byval parameters in regular functions. Actually, this property means the size of registers, that keeps arguments, and thats why it was renamed.

3. In ARMISelLowering.cpp, ARMTargetLowering class, in methods computeRegArea and StoreByValRegs, VARegXXXXXX was renamed to ArgRegsXXXXXX still by the same reasons.

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

11 years agoTry to fix ProgramTest on FreeBSD
Reid Kleckner [Tue, 30 Apr 2013 04:30:41 +0000 (04:30 +0000)]
Try to fix ProgramTest on FreeBSD

This seemed like the cleanest way to find the test executable.  Also fix
the file mode.

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

11 years agoCollect the Addend for external relocs.
Rafael Espindola [Tue, 30 Apr 2013 01:29:57 +0000 (01:29 +0000)]
Collect the Addend for external relocs.

This fixes 2013-04-04-RelocAddend.ll. We don't have a testcase for non external
relocs with an Addend. I will try to write one.

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

11 years agoR600: Always use texture cache for compute shaders
Vincent Lejeune [Tue, 30 Apr 2013 00:14:44 +0000 (00:14 +0000)]
R600: Always use texture cache for compute shaders

This will improve the performance of memory reads.

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

11 years agoR600: use native for alu
Vincent Lejeune [Tue, 30 Apr 2013 00:14:38 +0000 (00:14 +0000)]
R600: use native for alu

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

11 years agoR600: Packetize instructions
Vincent Lejeune [Tue, 30 Apr 2013 00:14:27 +0000 (00:14 +0000)]
R600: Packetize instructions

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

11 years agoR600: Rework Scheduling to handle difference between VLIW4 and VLIW5 chips
Vincent Lejeune [Tue, 30 Apr 2013 00:14:17 +0000 (00:14 +0000)]
R600: Rework Scheduling to handle difference between VLIW4 and VLIW5 chips

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

11 years agoR600: Add a Bank Swizzle operand
Vincent Lejeune [Tue, 30 Apr 2013 00:14:08 +0000 (00:14 +0000)]
R600: Add a Bank Swizzle operand

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

11 years agoR600: Take inner dependency into tex/vtx clauses
Vincent Lejeune [Tue, 30 Apr 2013 00:14:00 +0000 (00:14 +0000)]
R600: Take inner dependency into tex/vtx clauses

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

11 years agoR600: Turn TEX/VTX into native instructions
Vincent Lejeune [Tue, 30 Apr 2013 00:13:53 +0000 (00:13 +0000)]
R600: Turn TEX/VTX into native instructions

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

11 years agoR600: Add FetchInst bit to instruction defs to denote vertex/tex instructions
Vincent Lejeune [Tue, 30 Apr 2013 00:13:39 +0000 (00:13 +0000)]
R600: Add FetchInst bit to instruction defs to denote vertex/tex instructions

v2[Vincent Lejeune]: Split FetchInst into usesTextureCache/usesVertexCache

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

11 years agoRewrite test in FileCheck instead of grep in X86 codegen
Michael Liao [Tue, 30 Apr 2013 00:13:38 +0000 (00:13 +0000)]
Rewrite test in FileCheck instead of grep in X86 codegen

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

11 years agoR600: Add some new processor variants
Vincent Lejeune [Tue, 30 Apr 2013 00:13:27 +0000 (00:13 +0000)]
R600: Add some new processor variants

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

11 years agoR600: Clean up instruction class definitions
Vincent Lejeune [Tue, 30 Apr 2013 00:13:20 +0000 (00:13 +0000)]
R600: Clean up instruction class definitions

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

11 years agoR600: config section now reports use of killgt
Vincent Lejeune [Tue, 30 Apr 2013 00:13:13 +0000 (00:13 +0000)]
R600: config section now reports use of killgt

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

11 years agoRevert the command line option patch. However, keep the part that makes this pass...
Bill Wendling [Mon, 29 Apr 2013 23:48:06 +0000 (23:48 +0000)]
Revert the command line option patch. However, keep the part that makes this pass on Windows. I.e., we don't emit the target dependent attributes in a comment before the function.

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

11 years agoTBAA: remove !tbaa from testing cases if not used.
Manman Ren [Mon, 29 Apr 2013 22:58:55 +0000 (22:58 +0000)]
TBAA: remove !tbaa from testing cases if not used.

This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.

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

11 years agoDuplicate a testcase.
Bill Wendling [Mon, 29 Apr 2013 22:42:47 +0000 (22:42 +0000)]
Duplicate a testcase.

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

11 years agoTBAA: remove !tbaa from testing cases if not used.
Manman Ren [Mon, 29 Apr 2013 22:42:01 +0000 (22:42 +0000)]
TBAA: remove !tbaa from testing cases if not used.

This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.

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

11 years agoRewrite some tests with FileCHeck in X86 codegen
Michael Liao [Mon, 29 Apr 2013 22:41:29 +0000 (22:41 +0000)]
Rewrite some tests with FileCHeck in X86 codegen

- Revise previous patches of the same purpose by fixing
  *) grep <PA> | not grep <PB> semantically is not the same as
     CHECK: <PA>{{^<PB>.*$}} as the former will check all occurrences of <PA>
     while the later only check the first match. As the result, CHECK needs
     putting in all place where <PA> occurs.
  *) grep <PA> | count <N> needs a final CHECK-NOT of the same pattern.
     (As 'CHECK-<N>' is proposed for discussion, converting 'grep | count <N>'
      where N > 1 is postponed.)

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

11 years agoImprove documentation.
Adrian Prantl [Mon, 29 Apr 2013 22:25:52 +0000 (22:25 +0000)]
Improve documentation.

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

11 years agoEmit the TLS initialization function pointers into the correct section.
Bill Wendling [Mon, 29 Apr 2013 22:25:40 +0000 (22:25 +0000)]
Emit the TLS initialization function pointers into the correct section.

The `llvm.tls_init_funcs' (created by the front-end) holds pointers to the TLS
initialization functions. These need to be placed into the correct section so
that they are run before `main()'.

<rdar://problem/13733006>

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