Bill Schmidt [Wed, 22 May 2013 20:45:11 +0000 (20:45 +0000)]
Recognize ValueType operands in source patterns for fast-isel.
Currently the fast-isel table generator recognizes registers, register
classes, and immediates for source pattern operands. ValueType
operands are not recognized. This is not a problem for existing
targets with fast-isel support, but will not work for targets like
PowerPC and SPARC that use types in source patterns.
The proposed patch allows ValueType operands and treats them in the
same manner as register classes. There is no convenient way to map
from a ValueType to a register class, but there's no need to do so.
The table generator already requires that all types in the source
pattern be identical, and we know the register class of the output
operand already. So we just assign that register class to any
ValueType operands we encounter.
No functional effect on existing targets. Testing deferred until the
PowerPC target implements fast-isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182512
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Wed, 22 May 2013 20:09:24 +0000 (20:09 +0000)]
Change some PowerPC PatLeaf definitions to ImmLeaf for fast-isel.
Using PatLeaf rather than ImmLeaf when defining immediate predicates
prevents simple patterns using those predicates from being recognized
for fast instruction selection. This patch replaces the immSExt16
PatLeaf predicate with two ImmLeaf predicates, imm32SExt16 and
imm64SExt16, allowing a few more patterns to be recognized (ADDI,
ADDIC, MULLI, ADDI8, and ADDIC8). Using the new predicates does not
help for LI, LI8, SUBFIC, and SUBFIC8 because these are rejected for
other reasons, but I see no reason to retain the PatLeaf predicate.
No functional change intended, and thus no test cases yet. This is
preliminary work for enabling fast-isel support for PowerPC. When
that support is ready, we'll be able to test this function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182510
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 22 May 2013 19:47:32 +0000 (19:47 +0000)]
SLPVectorizer: Change the order in which new instructions are added to the function.
We are not working on a DAG and I ran into a number of problems when I enabled the vectorizations of 'diamond-trees' (trees that share leafs).
* Imroved the numbering API.
* Changed the placement of new instructions to the last root.
* Fixed a bug with external tree users with non-zero lane.
* Fixed a bug in the placement of in-tree users.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182508
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 22 May 2013 19:28:41 +0000 (19:28 +0000)]
X86: Fix a bug in EltsFromConsecutiveLoads. We can't generate new loads without chains.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182507
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 22 May 2013 19:07:26 +0000 (19:07 +0000)]
Remove unneeded call to a base default ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182503
91177308-0d34-0410-b5e6-
96231b3b80d8
Jean-Luc Duprat [Wed, 22 May 2013 18:29:31 +0000 (18:29 +0000)]
This is an update to a previous commit (r181216).
The earlier change list introduced the following inst combines:
B * (uitofp i1 C) —> select C, B, 0
A * (1 - uitofp i1 C) —> select C, 0, A
select C, 0, B + select C, A, 0 —> select C, A, B
Together these 3 changes would simplify :
A * (1 - uitofp i1 C) + B * uitofp i1 C
down to :
select C, B, A
In practice we found that the first two substitutions can have a
negative effect on performance, because they reduce opportunities to
use FMA contractions; between the two options FMAs are often the
better choice. This change list amends the previous one to enable
just these inst combines:
select C, B, 0 + select C, 0, A —> select C, B, A
A * (1 - uitofp i1 C) + B * uitofp i1 C —> select C, B, A
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182499
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 22 May 2013 18:09:39 +0000 (18:09 +0000)]
Fix typo in docs/GettingStarted.rst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182496
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 22 May 2013 18:02:19 +0000 (18:02 +0000)]
Unify formatting of debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182495
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 22 May 2013 17:32:15 +0000 (17:32 +0000)]
Fix StringMapIterator compile errors for non-MSVC compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182493
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 22 May 2013 17:26:26 +0000 (17:26 +0000)]
Add the IncludeSelf parameter to the MCSubRegIterator and MCSuperRegIterator
constructors. No functional change.
Part of rdar://
12906217
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182490
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 22 May 2013 17:10:11 +0000 (17:10 +0000)]
[Support] Add StringMap::swap() and a default ctor for iterators
This makes StringMap<> more compatible with std::map<std::string, ...>.
Differential Revision: http://llvm-reviews.chandlerc.com/D842
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182487
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 22 May 2013 17:01:12 +0000 (17:01 +0000)]
X86: When expanding PCMPGTQ to PCMPGTD we always want to compare the lower halves as unsigned.
Take #2 on fixing PR15977.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182486
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Wed, 22 May 2013 16:54:56 +0000 (16:54 +0000)]
LoopVectorize: Make Value pointers that could be RAUW'ed a VH
The Value pointers we store in the induction variable list can be RAUW'ed by a
call to SCEVExpander::expandCodeFor, use a TrackingVH instead. Do the same thing
in some other places where we store pointers that could potentially be RAUW'ed.
Fixes PR16073.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182485
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 May 2013 15:31:11 +0000 (15:31 +0000)]
Fix use after free (pr16103).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182482
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 May 2013 14:57:42 +0000 (14:57 +0000)]
Check that a function starts with llvm. before using GET_FUNCTION_RECOGNIZER.
Fixes a use of uninitialized memory found by asan and valgind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182480
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Wed, 22 May 2013 13:38:45 +0000 (13:38 +0000)]
[SystemZ] Rename PSW to CC
Addresses a review comment from Ulrich Weigand. No functional change intended.
I'm not sure whether the old TODO that this patch touches still holds,
but that's something we'd get to when adding a targetted scheduling
description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182474
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 May 2013 12:37:27 +0000 (12:37 +0000)]
sync projects/sample's autohell.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182464
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Wed, 22 May 2013 09:57:57 +0000 (09:57 +0000)]
[SystemZ] Fix thinko in long branch pass
The original version of the pass could underestimate the length of a backward
branch in cases like:
alignment to N bytes or more
...
relaxable branch A
...
foo: (aligned to M<N bytes)
...
bar: (aligned to N bytes)
...
relaxable branch B to foo
We don't add any misalignment gap for "bar" because N bytes of alignment
had already been reached earlier in the function. In this case, assuming
that A is relaxed can push "foo" closer to "bar", and make B appear to be
in range. Similar problems can occur for forward branches.
I don't think it's possible to create blocks with mixed alignments as
things stand, not least because we haven't yet defined getPrefLoopAlignment()
for SystemZ (that would need benchmarking). So I don't think we can test
this yet.
Thanks to Rafael Espíndola for spotting the bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182460
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 22 May 2013 08:13:02 +0000 (08:13 +0000)]
X86: Remove test instructions proceeding shift by immediate instructions
Allow LLVM to take advantage of shift instructions that set the ZF flag,
making instructions that test the destination superfluous.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182454
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 22 May 2013 06:37:31 +0000 (06:37 +0000)]
R600ISelLowering.cpp: Avoid "using namespace Intrinsic;" to appease MSC. Specify namespaces explicitly here.
MSC is confused about "memcpy" between <cstring> and llvm::Intrinsic::memcpy, when llvm::Intrinsic were exposed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182452
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 22 May 2013 06:37:25 +0000 (06:37 +0000)]
R600: Whitespace and untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182451
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 22 May 2013 06:36:09 +0000 (06:36 +0000)]
Create an FPOW SDNode opcode def in the target independent .td file rather than in a specific backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182450
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Wed, 22 May 2013 02:46:43 +0000 (02:46 +0000)]
Expose the RTDyldMemoryManager through the C API. This allows clients of
the C API to provide their own way of allocating JIT memory (both code
and data) and finalizing memory permissions (page protections, cache
flush).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182448
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 May 2013 02:45:28 +0000 (02:45 +0000)]
Allow duplicates in LLVM_TARGETS_TO_BUILD and LLVM_EXPERIMENTAL_TARGETS_TO_BUILD.
Should fix the cmake bots that were already building R600.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182447
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 May 2013 02:30:47 +0000 (02:30 +0000)]
Attempt to fix the mingw32 bot.
This should hopefully fix
http://lab.llvm.org:8011/builders/clang-x86_64-darwin11-self-mingw32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182446
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 May 2013 01:36:19 +0000 (01:36 +0000)]
s/u_int32_t/uint32_t/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182444
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 May 2013 01:29:38 +0000 (01:29 +0000)]
Fix warning in non-assert build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182443
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 May 2013 00:35:47 +0000 (00:35 +0000)]
Make R600 non-experimental.
The r600 backend has been in tree for some time now. Marking it as
non-experimental to avoid accidental breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182442
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 21 May 2013 22:06:02 +0000 (22:06 +0000)]
Mips16 does not use register scavenger from TargetRegisterInfo. It allocates
a RegScavenger object on it's own.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182430
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 21 May 2013 21:22:34 +0000 (21:22 +0000)]
Be more specific and capitalize filenames.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182424
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 21 May 2013 20:36:13 +0000 (20:36 +0000)]
Define BYTE_ORDER on Solaris.
Solaris doesn't have an endian.h header, but SPARC is the only
big-endian architecture that runs Solaris, so just use that to detect
endianness at compile time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182419
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Tue, 21 May 2013 20:24:07 +0000 (20:24 +0000)]
Put RTDyldMemoryManager into its own file, and make it linked into
libExecutionEngine. Move method implementations that aren't specific to
allocation out of SectionMemoryManager and into RTDyldMemoryManager.
This is in preparation for exposing RTDyldMemoryManager through the C
API.
This is a fixed version of r182407 and r182411. That first revision
broke builds because I forgot to move the conditional includes of
various POSIX headers from SectionMemoryManager into
RTDyldMemoryManager. Those includes are necessary because of how
getPointerToNamedFunction works around the glibc libc_nonshared.a thing.
The latter revision still broke things because I forgot to include
llvm/Config/config.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182418
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Tue, 21 May 2013 20:17:14 +0000 (20:17 +0000)]
Roll out r182411 and 182412 because it's still broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182415
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Tue, 21 May 2013 20:11:01 +0000 (20:11 +0000)]
Fix busted comment. This conditional include block used to be in SectionMemoryManager, but is now in RTDyldMemoryManager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182412
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Tue, 21 May 2013 20:07:12 +0000 (20:07 +0000)]
Put RTDyldMemoryManager into its own file, and make it linked into
libExecutionEngine. Move method implementations that aren't specific to
allocation out of SectionMemoryManager and into RTDyldMemoryManager.
This is in preparation for exposing RTDyldMemoryManager through the C
API.
This is a fixed version of r182407. That revision broke builds because I
forgot to move the conditional includes of various POSIX headers from
SectionMemoryManager into RTDyldMemoryManager. Those includes are
necessary because of how getPointerToNamedFunction works around the
glibc libc_nonshared.a thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182411
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Tue, 21 May 2013 20:03:01 +0000 (20:03 +0000)]
Roll out r182407 and r182408 because they broke builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182409
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Tue, 21 May 2013 20:00:56 +0000 (20:00 +0000)]
Expose the RTDyldMemoryManager through the C API. This allows clients of
the C API to provide their own way of allocating JIT memory (both code
and data) and finalizing memory permissions (page protections, cache
flush).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182408
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Tue, 21 May 2013 19:56:00 +0000 (19:56 +0000)]
Put RTDyldMemoryManager into its own file, and make it linked into
libExecutionEngine. Move method implementations that aren't specific to
allocation out of SectionMemoryManager and into RTDyldMemoryManager.
This is in preparation for exposing RTDyldMemoryManager through the C
API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182407
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 May 2013 18:53:50 +0000 (18:53 +0000)]
Use std::list so that we have a stable iterator.
I will try to avoid creating these std::strings, but for now this gets
the tests passing with libc++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182405
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 21 May 2013 18:06:33 +0000 (18:06 +0000)]
Remove duplicated comment.
Found by -Wdocumentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182402
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 May 2013 17:59:15 +0000 (17:59 +0000)]
Regenerate configure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182401
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 21 May 2013 17:17:59 +0000 (17:17 +0000)]
[mips] Rename option to make it compatible with gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182397
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 21 May 2013 17:13:47 +0000 (17:13 +0000)]
[mips] Add instruction selection patterns for blez and bgez.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182396
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Tue, 21 May 2013 16:51:30 +0000 (16:51 +0000)]
[NVPTX] Add @llvm.nvvm.sqrt.f() intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182394
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 21 May 2013 15:54:32 +0000 (15:54 +0000)]
Hexagon: SelectionDAG should not use MVT::Other to check the legality of BR_CC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182390
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Tue, 21 May 2013 14:37:16 +0000 (14:37 +0000)]
Drop @llvm.annotation and @llvm.ptr.annotation intrinsics during codegen.
The intrinsic calls are dropped, but the annotated value is propagated.
Fixes PR 15253
Original patch by Zeng Bin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182387
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 21 May 2013 14:21:09 +0000 (14:21 +0000)]
Fix PPC branch selection for counter-based branches
Although I had added some support for the BDZ/BDNZ branches into the selector
(in r158204), I had not correctly adjusted the condition at the top of the
loop. As a result, these branches were still essentially unsupported.
This fixes PR16086. Unfortunately, any test case would be very large (because
it would need to force the loop backedge to exceed the range of the 16-bit
immediate).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182385
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 21 May 2013 13:27:44 +0000 (13:27 +0000)]
removed commented lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182377
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Tue, 21 May 2013 12:27:47 +0000 (12:27 +0000)]
[msan] A no-op implementation of VarArg handling.
This stuff is used on platforms where MSan does not have a proper VarArg
implementation (anything other than x86_64 at the moment).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182375
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 21 May 2013 12:04:22 +0000 (12:04 +0000)]
Removed SSEPacked domain from all forms (AVX, SSE, signed, unsigned) scalar compare instructions, like COMISS, COMISD.
No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182371
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 21 May 2013 10:30:59 +0000 (10:30 +0000)]
Alternative fix for problem addressed in r182233
Revision r182233 partially reverted the change in r181200 to simplify
JIT unif test #ifdefs, because that change caused a link error on some
host operating systems where the export list requires the following
symbols to be defined:
JITTest_AvailableExternallyFunction
JITTest_AvailableExternallyGlobal
As discussed on the list, the commit reverts r182233 (and re-installs
the full r181200 change), and instead fixes the link problem by moving
those two symbols to the top of the file and unconditionally defining
them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182367
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 21 May 2013 09:58:54 +0000 (09:58 +0000)]
X86: When emulating unsigned PCMPGTQ with PCMPGTD, fix the sign bit for the smaller type.
Otherwise we'll get a mix of signed and unsigned compares.
Fixes PR15977.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182364
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Tue, 21 May 2013 08:53:17 +0000 (08:53 +0000)]
[SystemZ] Tighten branch tests
After r182274, the branches in these tests must always be short.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182358
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 21 May 2013 08:51:09 +0000 (08:51 +0000)]
DAGCombine: Avoid an edge case where it tried to create an i0 type for (x & 0) == 0.
Fixes PR16083.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182357
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Tue, 21 May 2013 08:48:24 +0000 (08:48 +0000)]
Fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182356
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 21 May 2013 01:30:38 +0000 (01:30 +0000)]
Add cmake bits for md5.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182349
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 21 May 2013 01:28:35 +0000 (01:28 +0000)]
Add an md5 library derived from a public domain implementation for dwarf4
type signature computation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182348
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 21 May 2013 01:27:36 +0000 (01:27 +0000)]
Add checks that the proper predeined stubs are being called to the test case.
These were accidentally omitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182347
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 21 May 2013 00:57:22 +0000 (00:57 +0000)]
Dwarf: use a single line table to generate assembly when .loc is used.
This is to fix PR15408 where an undefined symbol Lline_table_start1 is used.
Since we do not generate the debug_line section when .loc is used,
Lline_table_start1 is not emitted and we can't refer to it when calculating
at_stmt_list for a compile unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182344
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 21 May 2013 00:50:30 +0000 (00:50 +0000)]
Add some additional functions to the list of helper functions for
pic calls. These need to be there so we don't try and use helper
functions when we call those.
As part of this, make sure that we properly exclude helper functions in pic
mode when indirect calls are involved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182343
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 20 May 2013 23:55:41 +0000 (23:55 +0000)]
Comment update: these things are called "configuration names" these days, not
"triples". Also remove the implication that they're only used for specifying a
target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182335
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Mon, 20 May 2013 23:31:12 +0000 (23:31 +0000)]
LangRef.rst: Clarify how basic blocks without named label are handled.
Describe that they are assigned numbered label using the same counter
as for unnamed temporaries.
Based on http://llvm.org/bugs/show_bug.cgi?id=16043 and mailing list
discussion.
Patch by Paul Sokolovsky!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182332
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 20 May 2013 22:50:35 +0000 (22:50 +0000)]
PR14606: Debug Info for namespace aliases/DW_TAG_imported_module
This resolves the last of the PR14606 failures in the GDB 7.5 test
suite by implementing an optional name field for
DW_TAG_imported_modules/DIImportedEntities and using that to implement
C++ namespace aliases (eg: "namespace X = Y;").
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182328
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 20 May 2013 22:39:48 +0000 (22:39 +0000)]
[docs] Minor doc tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182324
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 20 May 2013 21:54:18 +0000 (21:54 +0000)]
The DWARF EH pass doesn't need the TargetMachine, only the TargetLoweringBase like the other EH passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182321
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 20 May 2013 21:28:28 +0000 (21:28 +0000)]
No need to store the TargetMachine variable in this class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182317
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 20 May 2013 20:59:12 +0000 (20:59 +0000)]
Remove unused #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182315
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 20 May 2013 20:46:30 +0000 (20:46 +0000)]
Rename LoopSimplify.h to LoopUtils.h
As discussed, LoopUtils.h is a better name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182314
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Mon, 20 May 2013 18:49:15 +0000 (18:49 +0000)]
add polly to check-all
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182308
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 20 May 2013 18:18:07 +0000 (18:18 +0000)]
[mips] Add (setne $lhs, 0) instruction selection pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182307
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 20 May 2013 18:07:43 +0000 (18:07 +0000)]
[mips] Trap on integer division by zero.
By default, a teq instruction is inserted after integer divide. No divide-by-zero
checks are performed if option "-mnocheck-zero-division" is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182306
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 20 May 2013 16:47:10 +0000 (16:47 +0000)]
Remove copied preheader insertion logic from PPCCTRLoops
Now that the preheader insertion logic in LoopSimplify is externally exposed,
use it, and remove the copy-and-pasted version.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182300
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 20 May 2013 16:47:07 +0000 (16:47 +0000)]
Expose InsertPreheaderForLoop from LoopSimplify to other passes
Other passes, PPC counter-loop formation for example, also need to add loop
preheaders outside of the regular loop simplification pass. This makes
InsertPreheaderForLoop a global function so that it can be used by other
passes.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182299
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Mon, 20 May 2013 16:42:18 +0000 (16:42 +0000)]
[NVPTX] Fix mis-use of CurrentFnSym in NVPTXAsmPrinter. This was causing a symbol name error in the output PTX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182298
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Mon, 20 May 2013 16:42:16 +0000 (16:42 +0000)]
[NVPTX] Add programmatic interface to NVVMReflect pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182297
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 20 May 2013 16:08:37 +0000 (16:08 +0000)]
Rename PPC MTCTRse to MTCTRloop
As the pairing of this instruction form with the bdnz/bdz branches is now
enforced by the verification pass, make it clear from the name that these
are used only for counter-based loops.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182296
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 20 May 2013 16:08:17 +0000 (16:08 +0000)]
Add a PPCCTRLoops verification pass
When asserts are enabled, this adds a verification pass for PPC counter-loop
formation. Unfortunately, without sacrificing code quality, there is no better
way of forming counter-based loops except at the (late) IR level. This means
that we need to recognize, at the IR level, anything which might turn into a
function call (or indirect branch). Because this is currently a finite set of
things, and because SelectionDAG lowering is basic-block local, this can be
done. Nevertheless, it is fragile, and failure results in a miscompile. This
verification pass checks that all (reachable) counter-based branches are
dominated by a loop mtctr instruction, and that no instructions in between
clobber the counter register. If these conditions are not satisfied, then an
ICE will be triggered.
In short, this is to help us sleep better at night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182295
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 20 May 2013 15:58:43 +0000 (15:58 +0000)]
R600: Fix bug detected by GCC warning.
R600TextureIntrinsicsReplacer.cpp:232: warning: the address of ‘ArgsType’ will always evaluate as ‘true’
This doesn't have any effect on the output as a vararg intrinsic behaves the
same way as a non-vararg one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182293
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 20 May 2013 15:28:48 +0000 (15:28 +0000)]
R600: Fix rotr.ll on non-asserts builds
The -debug-only option is only available on asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182291
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 20 May 2013 15:02:31 +0000 (15:02 +0000)]
R600/SI: Use a multiclass for MUBUF_Load_Helper
This will simplify the instructions and also the pattern definitions.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182288
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 20 May 2013 15:02:28 +0000 (15:02 +0000)]
R600/SI: Add a pattern for S_LOAD_DWORDX2_* instructions
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182287
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 20 May 2013 15:02:24 +0000 (15:02 +0000)]
R600/SI: Add pattern for rotr
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182286
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 20 May 2013 15:02:19 +0000 (15:02 +0000)]
R600: Swap the legality of rotl and rotr
The hardware supports rotr and not rotl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182285
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 20 May 2013 15:02:12 +0000 (15:02 +0000)]
R600/SI: Add patterns for 64-bit shift operations
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182284
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 20 May 2013 15:02:08 +0000 (15:02 +0000)]
R600/SI: Use the same names for VOP3 operands and encoding fields
This makes it possible to reorder the operands without breaking the
encoding.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182283
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 20 May 2013 15:02:01 +0000 (15:02 +0000)]
R600/SI: Make fitsRegClass() operands const
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182282
91177308-0d34-0410-b5e6-
96231b3b80d8
Mihai Popa [Mon, 20 May 2013 14:57:05 +0000 (14:57 +0000)]
VSTn instructions have a number of encoding constraints which are not implemented. I have added these using wrapper methods around the original custom decoder (incidentally - this is a huge poorly written method that should be cleaned up. I have left it as is since the changes would be much to hard to review).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182281
91177308-0d34-0410-b5e6-
96231b3b80d8
Mihai Popa [Mon, 20 May 2013 14:42:43 +0000 (14:42 +0000)]
Q registers are encoded in fields of the same length as D registers. As Q registers are half as many, the ARM reference manual mandates the least significant bit to be zeroed out. Failure to do so should result in an undefined instruction. With this change test/MC/Disassembler/ARM/invalid-VQADD-arm.txt is passing (removed XFAIL).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182279
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Mon, 20 May 2013 14:23:08 +0000 (14:23 +0000)]
[SystemZ] Add long branch pass
Before this change, the SystemZ backend would use BRCL for all branches
and only consider shortening them to BRC when generating an object file.
E.g. a branch on equal would use the JGE alias of BRCL in assembly output,
but might be shortened to the JE alias of BRC in ELF output. This was
a useful first step, but it had two problems:
(1) The z assembler isn't traditionally supposed to perform branch shortening
or branch relaxation. We followed this rule by not relaxing branches
in assembler input, but that meant that generating assembly code and
then assembling it would not produce the same result as going directly
to object code; the former would give long branches everywhere, whereas
the latter would use short branches where possible.
(2) Other useful branches, like COMPARE AND BRANCH, do not have long forms.
We would need to do something else before supporting them.
(Although COMPARE AND BRANCH does not change the condition codes,
the plan is to model COMPARE AND BRANCH as a CC-clobbering instruction
during codegen, so that we can safely lower it to a separate compare
and long branch where necessary. This is not a valid transformation
for the assembler proper to make.)
This patch therefore moves branch relaxation to a pre-emit pass.
For now, calls are still shortened from BRASL to BRAS by the assembler,
although this too is not really the traditional behaviour.
The first test takes about 1.5s to run, and there are likely to be
more tests in this vein once further branch types are added. The feeling
on IRC was that 1.5s is a bit much for a single test, so I've restricted
it to SystemZ hosts for now.
The patch exposes (and fixes) some typos in the main CodeGen/SystemZ tests.
A later patch will remove the {{g}}s from that directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182274
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 20 May 2013 13:12:58 +0000 (13:12 +0000)]
Enable pod-like optimizations for pred and succ iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182257
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Mon, 20 May 2013 12:13:32 +0000 (12:13 +0000)]
[NVPTX] Add GenericToNVVM IR converter to better handle idiomatic LLVM IR inputs
This converter currently only handles global variables in address space 0. For
these variables, they are promoted to address space 1 (global memory), and all
uses are updated to point to the result of a cvta.global instruction on the new
variable.
The motivation for this is address space 0 global variables are illegal since we
cannot declare variables in the generic address space. Instead, we place the
variables in address space 1 and explicitly convert the pointer to address
space 0. This is primarily intended to help new users who expect to be able to
place global variables in the default address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182254
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Mon, 20 May 2013 12:13:28 +0000 (12:13 +0000)]
[NVPTX] Fix i1 kernel parameters and global variables. ABI rules say we need to use .u8 for i1 parameters for kernels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182253
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Mon, 20 May 2013 08:01:34 +0000 (08:01 +0000)]
PR15868 fix.
Introduction:
In case when stack alignment is 8 and GPRs parameter part size is not N*8:
we add padding to GPRs part, so part's last byte must be recovered at
address K*8-1.
We need to do it, since remained (stack) part of parameter starts from
address K*8, and we need to "attach" "GPRs head" without gaps to it:
Stack:
|---- 8 bytes block ----| |---- 8 bytes block ----| |---- 8 bytes...
[ [padding] [GPRs head] ] [ ------ Tail passed via stack ------ ...
FIX:
Note, once we added padding we need to correct *all* Arg offsets that are going
after padded one. That's why we need this fix: Arg offsets were never corrected
before this patch. See new test-cases included in patch.
We also don't need to insert padding for byval parameters that are stored in GPRs
only. We need pad only last byval parameter and only in case it outsides GPRs
and stack alignment = 8.
Though, stack area, allocated for recovered byval params, must satisfy
"Size mod 8 = 0" restriction.
This patch reduces stack usage for some cases:
We can reduce ArgRegsSaveArea since inner N*4 bytes sized byval params my be
"packed" with alignment 4 in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182237
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Mon, 20 May 2013 07:46:06 +0000 (07:46 +0000)]
Disable remote MCJIT on pre-v6 ARM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182235
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 20 May 2013 06:13:09 +0000 (06:13 +0000)]
Partially revert change in r181200 that tried to simplify JIT unit test #ifdefs.
The export list for this test requires the following symbols to be available:
JITTest_AvailableExternallyFunction
JITTest_AvailableExternallyGlobal
The change in r181200 commented them out, which caused the test to fail to
link, at least on Darwin. I have only reverted the change for arm, since I
can't test the other targets and since it sounds like that change was fixing
real problems for those other targets. It should be possible to rearrange the
code to keep those definitions outside the #ifdefs, but that should be done by
someone who can reproduce the problems that r181200 was trying to fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182233
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 20 May 2013 01:01:43 +0000 (01:01 +0000)]
Also expand 64-bit bitcasts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182229
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 20 May 2013 00:53:25 +0000 (00:53 +0000)]
Implement spill and fill of I64Regs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182228
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 20 May 2013 00:28:36 +0000 (00:28 +0000)]
Mark i64 SETCC as expand so it is turned into a SELECT_CC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182227
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 19 May 2013 22:01:57 +0000 (22:01 +0000)]
Replace some bit operations with simpler ones. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182226
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 19 May 2013 21:47:13 +0000 (21:47 +0000)]
Don't use %g0 to materialize 0 directly.
The wired physreg doesn't work on tied operands like on MOVXCC.
Add a README note to fix this later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182225
91177308-0d34-0410-b5e6-
96231b3b80d8