oota-llvm.git
11 years ago[SystemZ] Add MCJIT support
Richard Sandiford [Fri, 3 May 2013 14:15:35 +0000 (14:15 +0000)]
[SystemZ] Add MCJIT support

Another step towards reinstating the SystemZ backend.  I'll commit
the configure changes separately (TARGET_HAS_JIT etc.), then commit
a patch to enable the MCJIT tests on SystemZ.

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

11 years ago[SystemZ] Support System Z as host architecture
Ulrich Weigand [Fri, 3 May 2013 12:22:11 +0000 (12:22 +0000)]
[SystemZ] Support System Z as host architecture

The llvm::sys::AddSignalHandler function (as well as related routines) in
lib/Support/Unix/Signals.inc currently registers a signal handler routine
via "sigaction".  When this handler is called due to a SIGSEGV, SIGILL or
similar signal, it will show a stack backtrace, deactivate the handler,
and then simply return to the operating system.  The intent is that the
OS will now retry execution at the same location as before, which ought
to again trigger the same error condition and cause the same signal to be
delivered again.  Since the hander is now deactivated, the OS will take
its default action (usually, terminate the program and possibly create
a core dump).

However, this method doesn't work reliably on System Z:  With certain
signals (namely SIGILL, SIGFPE, and SIGTRAP), the program counter stored
by the kernel on the signal stack frame (which is the location where
execution will resume) is not the instruction that triggered the fault,
but then instruction *after it*.  When the LLVM signal handler simply
returns to the kernel, execution will then resume at *that* address,
which will not trigger the problem again, but simply go on and execute
potentially unrelated code leading to random errors afterwards.

To fix this, the patch simply goes and re-raises the signal in question
directly from the handler instead of returning from it.  This is done
only on System Z and only for those signals that have this particular
problem.

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

11 years agoAdd support for reading ARM ELF build attributes.
Amara Emerson [Fri, 3 May 2013 11:36:35 +0000 (11:36 +0000)]
Add support for reading ARM ELF build attributes.

Build attribute sections can now be read if they exist via ELFObjectFile, and
the llvm-readobj tool has been extended with an option to dump this information
if requested. Regression tests are also included which exercise these features.

Also update the docs with a fixed ARM ABI link and a new link to the Addenda
which provides the build attributes specification.

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

11 years ago[SystemZ] Add ELF relocation support
Richard Sandiford [Fri, 3 May 2013 11:11:15 +0000 (11:11 +0000)]
[SystemZ] Add ELF relocation support

Another step towards reinstating the SystemZ backend.  Tests will be
included in the main backend patch.

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

11 years ago[SystemZ] Add llvm::Triple::systemz
Richard Sandiford [Fri, 3 May 2013 11:05:17 +0000 (11:05 +0000)]
[SystemZ] Add llvm::Triple::systemz

First step towards reinstating the SystemZ backend.  Tests will be
included in the main backend patch.

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

11 years agoX86: Add target description for btver2; make autodetection logic aware of AVX.
Benjamin Kramer [Fri, 3 May 2013 10:20:08 +0000 (10:20 +0000)]
X86: Add target description for btver2; make autodetection logic aware of AVX.

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

11 years agoAdded pocl and TCE blurbs to the ReleaseNotes.
Pekka Jaaskelainen [Fri, 3 May 2013 07:37:04 +0000 (07:37 +0000)]
Added pocl and TCE blurbs to the ReleaseNotes.

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

11 years agoUnbreaking the non-x86 build bots by protecting the AVX test code properly.
Aaron Ballman [Fri, 3 May 2013 02:52:21 +0000 (02:52 +0000)]
Unbreaking the non-x86 build bots by protecting the AVX test code properly.

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

11 years agoCorrectly testing for AVX support in x86 based off code from Hosts.cpp.
Aaron Ballman [Fri, 3 May 2013 02:39:21 +0000 (02:39 +0000)]
Correctly testing for AVX support in x86 based off code from Hosts.cpp.

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

11 years ago[mips] Remove "Commutative" from property list of non-commutative intrinsics.
Akira Hatanaka [Fri, 3 May 2013 01:29:31 +0000 (01:29 +0000)]
[mips] Remove "Commutative" from property list of non-commutative intrinsics.

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

11 years agoFix missing include in Hexagon code for Release+Asserts
Reid Kleckner [Fri, 3 May 2013 00:54:56 +0000 (00:54 +0000)]
Fix missing include in Hexagon code for Release+Asserts

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

11 years agoIn MC asm parsing, account for the possibility of whitespace within
John McCall [Fri, 3 May 2013 00:15:41 +0000 (00:15 +0000)]
In MC asm parsing, account for the possibility of whitespace within
the "identifier" parsed by the frontend callback by skipping forward
until we've consumed a token that ends at the point dictated by the
callback.

In addition, inform the callback when it's parsing an unevaluated
operand (e.g. mov eax, LENGTH A::x) as opposed to an evaluated one
(e.g. mov eax, [A::x]).

This commit depends on a clang commit.

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

11 years ago[mips] Handle reading, writing or copying of ccond field of DSP control
Akira Hatanaka [Thu, 2 May 2013 23:07:05 +0000 (23:07 +0000)]
[mips] Handle reading, writing or copying of ccond field of DSP control
register.

- Define pseudo instructions which store or load ccond field of the DSP
  control register.
- Emit the pseudos in MipsSEInstrInfo::storeRegToStack and loadRegFromStack.
- Expand the pseudos before callee-scan save.
- Emit instructions RDDSP or WRDSP to copy between ccond field and GPRs.

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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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