Commit Graph

94853 Commits

Author SHA1 Message Date
Sean Silva
e6b1079cd8 [LangRef] Alphabetize function attribute listing.
No content change.

Patch by Andrea Di Biagio!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187811 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 19:34:37 +00:00
Jakub Staszak
7198ee6f62 Adjust file to the coding standard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187808 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 17:03:42 +00:00
Hal Finkel
0e910d2cb5 Add PPC64 mulli pattern
The PPC backend had been missing a pattern to generate mulli for 64-bit
multiples. We had been generating it only for 32-bit multiplies. Unfortunately,
generating li + mulld unnecessarily increases register pressure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187807 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 17:03:03 +00:00
Jakub Staszak
62d6fa5e8f Remove extraneous semicolon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187806 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 16:40:40 +00:00
Mihai Popa
4f7092176c This corrects creation of operands for t2PLDW. It also removes the definition of t2PLDWpci,
as pldw does not have a literal variant (i.e. pc relative version)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187804 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 16:07:46 +00:00
Mihai Popa
4a378b95aa Support APSR_nzcv as operand for Thumb2 mrc. Deprecate pre-UAL syntax (pc instead of apsr_nzcv)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187803 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 15:52:36 +00:00
Justin Holewinski
df66ff09bc [NVPTX] Add missing patterns for i1 [s,u]int_to_fp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187800 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 14:13:34 +00:00
Justin Holewinski
a3635eefc7 [NVPTX] Fix bug in stack code generation causes by MC conversion
We do use a very small set of physical registers, so account for
them in the virtual register encoding between MachineInstr and MC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187799 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 14:13:31 +00:00
Justin Holewinski
82767327c5 [NVPTX] Start conversion to MC infrastructure
This change converts the NVPTX target to use the MC infrastructure
instead of directly emitting MachineInstr instances. This brings
the target more up-to-date with LLVM TOT, and should fix PR15175
and PR15958 (libNVPTXInstPrinter is empty) as a side-effect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187798 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 14:13:27 +00:00
Tim Northover
8775a51d94 ARM: implement allowTruncateForTailCall
Now that it's in place, it seems silly not to let ARM make use of the extra
tail call opportunities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187795 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 13:58:03 +00:00
Rafael Espindola
5f28b1ff89 Add a release not about llvm-ar.
Thanks to Bill Wendling for the reminder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187794 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 13:16:28 +00:00
Tim Northover
611910c4ec Remove oddly named libraries with "make uninstall-local"
Patch by Edward-san.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187793 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 12:50:45 +00:00
Alexey Samsonov
e664290ad6 Store compile unit corresponding to each chain of inlined debug info entries. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187792 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 10:49:15 +00:00
Elena Demikhovsky
7398c774f6 LLVM Interpreter: fixed bug 16694
fix for: Bug 16694 - ExecutionEngine/test-interp-vec-loadstore.ll failing on powerpc-darwin8 (http://llvm.org/bugs/show_bug.cgi?id=16694)
The ExecutionEngine/test-interp-vec-loadstore.ll test has been failing on powerpc-darwin8 (on other platforms it passed)

the reason of fail was wrong output by printf. this output is checked by FileCheck, but on little-endian powerpc the output numeric data were printed inside out and FileCheck reported fail.
the printfs have been replaced by checking data inside test and numeric output has been replaced by the text output like : "int test passed, float test passed". The text output is checked by FileCheck.
the dependency on data layout has been removed.

done by Yuri Veselov (Intel)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187791 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 10:40:45 +00:00
Alexey Samsonov
749d35c593 Add LLVM-style RTTI to DIContext/DWARFContext classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187790 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 10:32:39 +00:00
Tim Northover
d113448c1d Refactor isInTailCallPosition handling
This change came about primarily because of two issues in the existing code.
Niether of:

define i64 @test1(i64 %val) {
  %in = trunc i64 %val to i32
  tail call i32 @ret32(i32 returned %in)
  ret i64 %val
}

define i64 @test2(i64 %val) {
  tail call i32 @ret32(i32 returned undef)
  ret i32 42
}

should be tail calls, and the function sameNoopInput is responsible. The main
problem is that it is completely symmetric in the "tail call" and "ret" value,
but in reality different things are allowed on each side.

For these cases:
1. Any truncation should lead to a larger value being generated by "tail call"
   than needed by "ret".
2. Undef should only be allowed as a source for ret, not as a result of the
   call.

Along the way I noticed that a mismatch between what this function treats as a
valid truncation and what the backends see can lead to invalid calls as well
(see x86-32 test case).

This patch refactors the code so that instead of being based primarily on
values which it recurses into when necessary, it starts by inspecting the type
and considers each fundamental slot that the backend will see in turn. For
example, given a pathological function that returned {{}, {{}, i32, {}}, i32}
we would consider each "real" i32 in turn, and ask if it passes through
unchanged. This is much closer to what the backend sees as a result of
ComputeValueVTs.

Aside from the bug fixes, this eliminates the recursion that's going on and, I
believe, makes the bulk of the code significantly easier to understand. The
trade-off is the nasty iterators needed to find the real types inside a
returned value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187787 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 09:12:35 +00:00
Serge Pavlov
900cbf5545 Unbreak Debug build on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187786 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 08:44:18 +00:00
Craig Topper
5923547e2a Simplify vector lane handling math a bit. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187783 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 07:23:12 +00:00
Craig Topper
57bc5a0b5b Simplify math a little bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187781 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 06:54:25 +00:00
NAKAMURA Takumi
8e1d64666f Target/*/CMakeLists.txt: Add the dependency to CommonTableGen explicitly for each corresponding CodeGen.
Without explicit dependencies, both per-file action and in-CommonTableGen action could run in parallel.
It races to emit *.inc files simultaneously.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187780 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 06:38:37 +00:00
Craig Topper
aa0f420567 Replace EVT with MVT in isHorizontalBinOp as it is only called with legal types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187779 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 06:05:05 +00:00
NAKAMURA Takumi
2e363350f5 AsmPrinter/CMakeLists.txt: Add explicit dependency to intrinsics_gen here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187778 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 05:56:39 +00:00
NAKAMURA Takumi
27770f46aa Option/CMakeLists.txt: Don't use target_link_libraries. LLVMBuild knows dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187777 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 05:56:32 +00:00
Craig Topper
741373f6ab Put an llvm_unreachable at the end of getSplatIndex as its loop should never find all undef elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187775 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 05:41:22 +00:00
Craig Topper
6e95b4c6ce Check against >= 0 instead of != -1 in getSplatIndex because it generally compiles to better code and is equivalent for shuffle indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187774 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 05:07:37 +00:00
Craig Topper
2c136f8120 Remove trailing whitespace and fix an 80-column violation. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187773 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 05:01:21 +00:00
Craig Topper
20b46b0733 Simplify code slightly. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187771 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 04:12:40 +00:00
Tom Stellard
01d7203ef8 Factor FlattenCFG out from SimplifyCFG
Patch by: Mei Ye

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187764 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 02:43:45 +00:00
Eric Christopher
99c22aaeed Allow 4 as a valid debug info version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187763 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 01:38:27 +00:00
Shuxin Yang
4f4a190d9f Add some comment to LTOCodeGenerator class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187761 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 00:45:32 +00:00
Matt Arsenault
00d7baad90 Fix missing -*- C++ -*-s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187758 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 00:16:21 +00:00
Bill Wendling
ac838d1c14 FileCheckize some of the testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187756 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 23:43:18 +00:00
Bill Wendling
51b6fb4469 Fix grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187755 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 23:29:16 +00:00
Tom Stellard
c1ad37e5cd R600/SI: Add missing test for r187749
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187754 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 22:45:56 +00:00
Eric Christopher
4c5be13890 Recommit previous cleanup with a fix for c++98 ambiguity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187752 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 22:32:28 +00:00
Tom Stellard
2b272a1c8c R600: Implement TargetLowering::getVectorIdxTy()
We use MVT::i32 for the vector index type, because we use 32-bit
operations to caculate offsets when dynamically indexing vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187749 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 22:22:07 +00:00
Tom Stellard
425b76c231 TargetLowering: Add getVectorIdxTy() function v2
This virtual function can be implemented by targets to specify the type
to use for the index operand of INSERT_VECTOR_ELT, EXTRACT_VECTOR_ELT,
INSERT_SUBVECTOR, EXTRACT_SUBVECTOR.  The default implementation returns
the result from TargetLowering::getPointerTy()

The previous code was using TargetLowering::getPointerTy() for vector
indices, because this is guaranteed to be legal on all targets.  However,
using TargetLowering::getPointerTy() can be a problem for targets with
pointer sizes that differ across address spaces.  On such targets,
when vectors need to be loaded or stored to an address space other than the
default 'zero' address space (which is the address space assumed by
TargetLowering::getPointerTy()), having an index that
is a different size than the pointer can lead to inefficient
pointer calculations, (e.g. 64-bit adds for a 32-bit address space).

There is no intended functionality change with this patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187748 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 22:22:01 +00:00
Eric Christopher
de5cb6b249 Revert "Use existing builtin hashing functions to make this routine more"
This reverts commit r187745.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187747 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 22:07:30 +00:00
Eric Christopher
c222f67109 Use existing builtin hashing functions to make this routine more
simple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187745 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 22:00:50 +00:00
Eric Christopher
b30347e64e Change parent hashing algorithm to be non-recursive and elaborate
greatly on many comments in the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187742 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 21:40:57 +00:00
Michael Gottesman
5a328054f3 [bugpoint] Allow the user to specify the path to opt on the commandline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187739 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 21:07:07 +00:00
Peter Collingbourne
acf4cf7757 Introduce an optimisation for special case lists with large numbers of literal entries.
Our internal regex implementation does not cope with large numbers
of anchors very efficiently.  Given a ~3600-entry special case list,
regex compilation can take on the order of seconds.  This patch solves
the problem for the special case of patterns matching literal global
names (i.e. patterns with no regex metacharacters).  Rather than
forming regexes from literal global name patterns, add them to
a StringSet which is checked before matching against the regex.
This reduces regex compilation time by an order of roughly thousands
when reading the aforementioned special case list, according to a
completely unscientific study.

No test cases.  I figure that any new tests for this code should
check that regex metacharacters are properly recognised.  However,
I could not find any documentation which documents the fact that the
syntax of global names in special case lists is based on regexes.
The extent to which regex syntax is supported in special case lists
should probably be decided on/documented before writing tests.

Differential Revision: http://llvm-reviews.chandlerc.com/D1150

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187732 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 17:48:04 +00:00
Peter Collingbourne
aa80e61b0d Introduce Regex::isLiteralERE function.
This will be used to implement an optimisation for literal entries
in special case lists.

Differential Revision: http://llvm-reviews.chandlerc.com/D1278

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187731 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 17:47:59 +00:00
Aaron Ballman
2a37c7e9e6 Silencing an MSVC11 type conversion warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187727 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 13:47:03 +00:00
Alexey Samsonov
48d7d1d231 80-cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187725 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 13:19:49 +00:00
Elena Demikhovsky
cf21d155ed LLVM Interpreter: This patch implements vector support for cast operations (zext, sext, uitofp, sitofp, trunc, fpext, fptosi, fptrunc, bitcast) and shift operations (shl, ashr, lshr) for integer and floating point data types.
Added tests.

Done by Yuri Veselov (mailto:Yuri.Veselov@intel.com).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187724 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 12:17:06 +00:00
Richard Sandiford
9379557478 [SystemZ] Use BRCT and BRCTG to eliminate add-&-compare sequences
This patch just uses a peephole test for "add; compare; branch" sequences
within a single block.  The IR optimizers already convert loops to
decrement-and-branch-on-nonzero form in some cases, so even this
simplistic test triggers many times during a clang bootstrap and
projects/test-suite run.  It looks like there are still cases where we
need to more strongly prefer branches on nonzero though.  E.g. I saw a
case where a loop that started out with a check for 0 ended up with a
check for -1.  I'll try to look at that sometime.

I ended up adding the Reference class because MachineInstr::readsRegister()
doesn't check for subregisters (by design, as far as I could tell).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187723 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 11:23:46 +00:00
Benjamin Kramer
f8e16c6f5a Don't leak passes if added outside of the area determined by Started/Stopped flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187722 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 11:11:11 +00:00
Richard Sandiford
ccdf5cc7bc [SystemZ] Add definitions for BRCT and BRCTG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187721 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 11:07:38 +00:00
Richard Sandiford
9b05c709c6 [SystemZ] Use LOAD AND TEST to eliminate comparisons against zero
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187720 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 11:03:20 +00:00