platform/upstream/llvm.git
11 years ago[libsanitizer] Drive-by fix for -Wempty-body in sanitizer_common_syscalls.inc
Alexander Potapenko [Tue, 6 Aug 2013 14:07:46 +0000 (14:07 +0000)]
[libsanitizer] Drive-by fix for -Wempty-body in sanitizer_common_syscalls.inc
This makes the file consistently use { } around the if statements containing the PRE_/POST_ macros.

llvm-svn: 187797

11 years agoFix comment typo.
John Thompson [Tue, 6 Aug 2013 14:05:43 +0000 (14:05 +0000)]
Fix comment typo.

llvm-svn: 187796

11 years agoARM: implement allowTruncateForTailCall
Tim Northover [Tue, 6 Aug 2013 13:58:03 +0000 (13:58 +0000)]
ARM: implement allowTruncateForTailCall

Now that it's in place, it seems silly not to let ARM make use of the extra
tail call opportunities.

llvm-svn: 187795

11 years agoAdd a release not about llvm-ar.
Rafael Espindola [Tue, 6 Aug 2013 13:16:28 +0000 (13:16 +0000)]
Add a release not about llvm-ar.

Thanks to Bill Wendling for the reminder.

llvm-svn: 187794

11 years agoRemove oddly named libraries with "make uninstall-local"
Tim Northover [Tue, 6 Aug 2013 12:50:45 +0000 (12:50 +0000)]
Remove oddly named libraries with "make uninstall-local"

Patch by Edward-san.

llvm-svn: 187793

11 years agoStore compile unit corresponding to each chain of inlined debug info entries. No...
Alexey Samsonov [Tue, 6 Aug 2013 10:49:15 +0000 (10:49 +0000)]
Store compile unit corresponding to each chain of inlined debug info entries. No functionality change.

llvm-svn: 187792

11 years agoLLVM Interpreter: fixed bug 16694
Elena Demikhovsky [Tue, 6 Aug 2013 10:40:45 +0000 (10:40 +0000)]
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)

llvm-svn: 187791

11 years agoAdd LLVM-style RTTI to DIContext/DWARFContext classes
Alexey Samsonov [Tue, 6 Aug 2013 10:32:39 +0000 (10:32 +0000)]
Add LLVM-style RTTI to DIContext/DWARFContext classes

llvm-svn: 187790

11 years ago[sanitizer] Fix NULL arg handling in setitimer/getitimer interceptors.
Evgeniy Stepanov [Tue, 6 Aug 2013 09:54:33 +0000 (09:54 +0000)]
[sanitizer] Fix NULL arg handling in setitimer/getitimer interceptors.

llvm-svn: 187789

11 years ago[sanitizer] Intercept sched_getaffinity.
Evgeniy Stepanov [Tue, 6 Aug 2013 09:29:01 +0000 (09:29 +0000)]
[sanitizer] Intercept sched_getaffinity.

llvm-svn: 187788

11 years agoRefactor isInTailCallPosition handling
Tim Northover [Tue, 6 Aug 2013 09:12:35 +0000 (09:12 +0000)]
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.

llvm-svn: 187787

11 years agoUnbreak Debug build on Windows
Serge Pavlov [Tue, 6 Aug 2013 08:44:18 +0000 (08:44 +0000)]
Unbreak Debug build on Windows

llvm-svn: 187786

11 years agoUpdate status of support for variable templates on website.
Larisse Voufo [Tue, 6 Aug 2013 07:37:09 +0000 (07:37 +0000)]
Update status of support for variable templates on website.

llvm-svn: 187785

11 years agoA bit of clean up based on peer's feedback...
Larisse Voufo [Tue, 6 Aug 2013 07:33:00 +0000 (07:33 +0000)]
A bit of clean up based on peer's feedback...

llvm-svn: 187784

11 years agoSimplify vector lane handling math a bit. No functional change intended.
Craig Topper [Tue, 6 Aug 2013 07:23:12 +0000 (07:23 +0000)]
Simplify vector lane handling math a bit. No functional change intended.

llvm-svn: 187783

11 years agoPR16755: When initializing or modifying a bitfield member in a constant
Richard Smith [Tue, 6 Aug 2013 07:09:20 +0000 (07:09 +0000)]
PR16755: When initializing or modifying a bitfield member in a constant
expression, truncate the stored value to the size of the bitfield.

llvm-svn: 187782

11 years agoSimplify math a little bit.
Craig Topper [Tue, 6 Aug 2013 06:54:25 +0000 (06:54 +0000)]
Simplify math a little bit.

llvm-svn: 187781

11 years agoTarget/*/CMakeLists.txt: Add the dependency to CommonTableGen explicitly for each...
NAKAMURA Takumi [Tue, 6 Aug 2013 06:38:37 +0000 (06:38 +0000)]
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.

llvm-svn: 187780

11 years agoReplace EVT with MVT in isHorizontalBinOp as it is only called with legal types.
Craig Topper [Tue, 6 Aug 2013 06:05:05 +0000 (06:05 +0000)]
Replace EVT with MVT in isHorizontalBinOp as it is only called with legal types.

llvm-svn: 187779

11 years agoAsmPrinter/CMakeLists.txt: Add explicit dependency to intrinsics_gen here.
NAKAMURA Takumi [Tue, 6 Aug 2013 05:56:39 +0000 (05:56 +0000)]
AsmPrinter/CMakeLists.txt: Add explicit dependency to intrinsics_gen here.

llvm-svn: 187778

11 years agoOption/CMakeLists.txt: Don't use target_link_libraries. LLVMBuild knows dependencies.
NAKAMURA Takumi [Tue, 6 Aug 2013 05:56:32 +0000 (05:56 +0000)]
Option/CMakeLists.txt: Don't use target_link_libraries. LLVMBuild knows dependencies.

llvm-svn: 187777

11 years agoRemoved hack that was used to properly restore the nested name specifier of qualified...
Larisse Voufo [Tue, 6 Aug 2013 05:49:26 +0000 (05:49 +0000)]
Removed hack that was used to properly restore the nested name specifier of qualified variable template ids. It turns out that the current implementation was just not logical setup for it. This commit has made it so.

llvm-svn: 187776

11 years agoPut an llvm_unreachable at the end of getSplatIndex as its loop should never find...
Craig Topper [Tue, 6 Aug 2013 05:41:22 +0000 (05:41 +0000)]
Put an llvm_unreachable at the end of getSplatIndex as its loop should never find all undef elements.

llvm-svn: 187775

11 years agoCheck against >= 0 instead of != -1 in getSplatIndex because it generally compiles...
Craig Topper [Tue, 6 Aug 2013 05:07:37 +0000 (05:07 +0000)]
Check against >= 0 instead of != -1 in getSplatIndex because it generally compiles to better code and is equivalent for shuffle indices.

llvm-svn: 187774

11 years agoRemove trailing whitespace and fix an 80-column violation. No functional change.
Craig Topper [Tue, 6 Aug 2013 05:01:21 +0000 (05:01 +0000)]
Remove trailing whitespace and fix an 80-column violation. No functional change.

llvm-svn: 187773

11 years agoScopInfo: add a testcase that share parameters within nested start.
Tobias Grosser [Tue, 6 Aug 2013 04:36:45 +0000 (04:36 +0000)]
ScopInfo: add a testcase that share parameters within nested start.

Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 187772

11 years agoSimplify code slightly. No functional change.
Craig Topper [Tue, 6 Aug 2013 04:12:40 +0000 (04:12 +0000)]
Simplify code slightly. No functional change.

llvm-svn: 187771

11 years agoFixing commit r187768: Moved diagnosis of forward declarations of variable templates...
Larisse Voufo [Tue, 6 Aug 2013 03:57:41 +0000 (03:57 +0000)]
Fixing commit r187768: Moved diagnosis of forward declarations of variable templates from Parser to Sema.

llvm-svn: 187770

11 years agoFix for PR16570: when comparing two function pointers, discard qualifiers when
Richard Trieu [Tue, 6 Aug 2013 03:44:10 +0000 (03:44 +0000)]
Fix for PR16570: when comparing two function pointers, discard qualifiers when
comparing non-reference function parameters.  The qualifiers don't matter for
comparisons.

llvm-svn: 187769

11 years agoMoved diagnosis of forward declarations of variable templates from Parser to Sema.
Larisse Voufo [Tue, 6 Aug 2013 03:43:07 +0000 (03:43 +0000)]
Moved diagnosis of forward declarations of variable templates from Parser to Sema.

llvm-svn: 187768

11 years agoclang/test/Driver/crash-report.c: Mark it as XFAIL:mingw32, for now. Investigating.
NAKAMURA Takumi [Tue, 6 Aug 2013 03:31:55 +0000 (03:31 +0000)]
clang/test/Driver/crash-report.c: Mark it as XFAIL:mingw32, for now. Investigating.

I met a message, "fatal error: file 'nul' modified since it was first processed".

llvm-svn: 187767

11 years agoAST/DeclTemplate.h: Possibly fix a warning. [-Wuninitialized]
NAKAMURA Takumi [Tue, 6 Aug 2013 03:29:01 +0000 (03:29 +0000)]
AST/DeclTemplate.h: Possibly fix a warning. [-Wuninitialized]

FIXME: Would '0' be an appropriate value in SequenceNumber?
llvm-svn: 187766

11 years agoSemaTemplateInstantiateDecl.cpp: Suppress a warning. [-Wunused-variable]
NAKAMURA Takumi [Tue, 6 Aug 2013 03:28:54 +0000 (03:28 +0000)]
SemaTemplateInstantiateDecl.cpp: Suppress a warning. [-Wunused-variable]

llvm-svn: 187765

11 years agoFactor FlattenCFG out from SimplifyCFG
Tom Stellard [Tue, 6 Aug 2013 02:43:45 +0000 (02:43 +0000)]
Factor FlattenCFG out from SimplifyCFG

Patch by: Mei Ye

llvm-svn: 187764

11 years agoAllow 4 as a valid debug info version.
Eric Christopher [Tue, 6 Aug 2013 01:38:27 +0000 (01:38 +0000)]
Allow 4 as a valid debug info version.

llvm-svn: 187763

11 years agoStarted implementing variable templates. Top level declarations should be fully suppo...
Larisse Voufo [Tue, 6 Aug 2013 01:03:05 +0000 (01:03 +0000)]
Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...

llvm-svn: 187762

11 years agoAdd some comment to LTOCodeGenerator class
Shuxin Yang [Tue, 6 Aug 2013 00:45:32 +0000 (00:45 +0000)]
Add some comment to LTOCodeGenerator class

llvm-svn: 187761

11 years agoclang-cl: Implement the /Tc, /TC, /Tp and /TP options.
Hans Wennborg [Tue, 6 Aug 2013 00:20:31 +0000 (00:20 +0000)]
clang-cl: Implement the /Tc, /TC, /Tp and /TP options.

These are used to specify source files, and whether to treat source
files as C or C++.

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

llvm-svn: 187760

11 years agoAdd test for header guard work-around.
John Thompson [Tue, 6 Aug 2013 00:17:40 +0000 (00:17 +0000)]
Add test for header guard work-around.

llvm-svn: 187759

11 years agoFix missing -*- C++ -*-s
Matt Arsenault [Tue, 6 Aug 2013 00:16:21 +0000 (00:16 +0000)]
Fix missing -*- C++ -*-s

llvm-svn: 187758

11 years agoFixed uninitialized member, plus recommit of 187736.
John Thompson [Mon, 5 Aug 2013 23:55:14 +0000 (23:55 +0000)]
Fixed uninitialized member, plus recommit of 187736.

llvm-svn: 187757

11 years agoFileCheckize some of the testcases.
Bill Wendling [Mon, 5 Aug 2013 23:43:18 +0000 (23:43 +0000)]
FileCheckize some of the testcases.

llvm-svn: 187756

11 years agoFix grammar.
Bill Wendling [Mon, 5 Aug 2013 23:29:16 +0000 (23:29 +0000)]
Fix grammar.

llvm-svn: 187755

11 years agoR600/SI: Add missing test for r187749
Tom Stellard [Mon, 5 Aug 2013 22:45:56 +0000 (22:45 +0000)]
R600/SI: Add missing test for r187749

llvm-svn: 187754

11 years ago[ms-cxxabi] Properly mangle member pointers
David Majnemer [Mon, 5 Aug 2013 22:43:06 +0000 (22:43 +0000)]
[ms-cxxabi] Properly mangle member pointers

There were three things missing from the original implementation:

- We would omit the 'E' qualifier for members int 64-bit mode.
- We would not exmaine the qualifiers in 'IsMember' mode.
- We didn't generate the correct backref to the base class.

llvm-svn: 187753

11 years agoRecommit previous cleanup with a fix for c++98 ambiguity.
Eric Christopher [Mon, 5 Aug 2013 22:32:28 +0000 (22:32 +0000)]
Recommit previous cleanup with a fix for c++98 ambiguity.

llvm-svn: 187752

11 years ago[ms-cxxabi] Handle template-template arguments
David Majnemer [Mon, 5 Aug 2013 22:26:46 +0000 (22:26 +0000)]
[ms-cxxabi] Handle template-template arguments

Template-template arguments appear to be a rather simple encoding of the
template's templated tag type.

llvm-svn: 187751

11 years agoR600: Implement TargetLowering::getVectorIdxTy()
Tom Stellard [Mon, 5 Aug 2013 22:22:07 +0000 (22:22 +0000)]
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.

llvm-svn: 187749

11 years agoTargetLowering: Add getVectorIdxTy() function v2
Tom Stellard [Mon, 5 Aug 2013 22:22:01 +0000 (22:22 +0000)]
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.

llvm-svn: 187748

11 years agoRevert "Use existing builtin hashing functions to make this routine more"
Eric Christopher [Mon, 5 Aug 2013 22:07:30 +0000 (22:07 +0000)]
Revert "Use existing builtin hashing functions to make this routine more"

This reverts commit r187745.

llvm-svn: 187747

11 years agoReverting r187736. It broke some public bots:
Arnold Schwaighofer [Mon, 5 Aug 2013 22:03:41 +0000 (22:03 +0000)]
Reverting r187736. It broke some public bots:

http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/10248
http://bb.pgr.jp/builders/cmake-clang-i686-mingw32/builds/3327

llvm-svn: 187746

11 years agoUse existing builtin hashing functions to make this routine more
Eric Christopher [Mon, 5 Aug 2013 22:00:50 +0000 (22:00 +0000)]
Use existing builtin hashing functions to make this routine more
simple.

llvm-svn: 187745

11 years agoChange parent hashing algorithm to be non-recursive and elaborate
Eric Christopher [Mon, 5 Aug 2013 21:40:57 +0000 (21:40 +0000)]
Change parent hashing algorithm to be non-recursive and elaborate
greatly on many comments in the code.

llvm-svn: 187742

11 years ago[ms-cxxabi] Mangle nullptr template arguments
David Majnemer [Mon, 5 Aug 2013 21:33:59 +0000 (21:33 +0000)]
[ms-cxxabi] Mangle nullptr template arguments

MSVC mangles nullptr template arguments identically to zero literals.

llvm-svn: 187741

11 years agoImplement NULL iterators for <list> re: N3644
Marshall Clow [Mon, 5 Aug 2013 21:23:28 +0000 (21:23 +0000)]
Implement NULL iterators for <list> re: N3644

llvm-svn: 187740

11 years ago[bugpoint] Allow the user to specify the path to opt on the commandline.
Michael Gottesman [Mon, 5 Aug 2013 21:07:07 +0000 (21:07 +0000)]
[bugpoint] Allow the user to specify the path to opt on the commandline.

llvm-svn: 187739

11 years agoAdd option to disable module loading.
Daniel Jasper [Mon, 5 Aug 2013 20:26:17 +0000 (20:26 +0000)]
Add option to disable module loading.

This patch was created by Lawrence Crowl and reviewed in:
http://llvm-reviews.chandlerc.com/D963

llvm-svn: 187738

11 years agolit.cfg: better check for MSYS
Hans Wennborg [Mon, 5 Aug 2013 20:14:43 +0000 (20:14 +0000)]
lit.cfg: better check for MSYS

When running the tests under Cygwin using non-Cygwin python,
the platform would be Windows and there would be bash on the path,
so this check for MSYS would not work correctly.

llvm-svn: 187737

11 years agoFixed incorrect include file exit detection. Added work-around to avoid error on...
John Thompson [Mon, 5 Aug 2013 19:15:50 +0000 (19:15 +0000)]
Fixed incorrect include file exit detection.  Added work-around to avoid error on header guard in nested include.  Fixed a couple of coding standard issues on variable names.

llvm-svn: 187736

11 years agoImplement C++'s restrictions on the type of an expression passed to a vararg
Richard Smith [Mon, 5 Aug 2013 18:49:43 +0000 (18:49 +0000)]
Implement C++'s restrictions on the type of an expression passed to a vararg
function: it can't be 'void' and it can't be an initializer list. We give a
hard error for these rather than treating them as undefined behavior (we can
and probably should do the same for non-POD types in C++11, but as of this
change we don't).

Slightly rework the checking of variadic arguments in a function with a format
attribute to ensure that certain kinds of format string problem (non-literal
string, too many/too few arguments, ...) don't suppress this error.

llvm-svn: 187735

11 years agoRegression test for PR12699
Serge Pavlov [Mon, 5 Aug 2013 18:38:16 +0000 (18:38 +0000)]
Regression test for PR12699

llvm-svn: 187734

11 years agoIntroduce an optimisation for special case lists with large numbers of literal entries.
Peter Collingbourne [Mon, 5 Aug 2013 17:48:04 +0000 (17:48 +0000)]
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

llvm-svn: 187732

11 years agoIntroduce Regex::isLiteralERE function.
Peter Collingbourne [Mon, 5 Aug 2013 17:47:59 +0000 (17:47 +0000)]
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

llvm-svn: 187731

11 years agoAdditional fixes/xfails for icc tests
Andrew Kaylor [Mon, 5 Aug 2013 17:12:35 +0000 (17:12 +0000)]
Additional fixes/xfails for icc tests

llvm-svn: 187730

11 years ago[analyzer] Clarify that r187624 is a hack and should be fixed better later.
Jordan Rose [Mon, 5 Aug 2013 16:02:02 +0000 (16:02 +0000)]
[analyzer] Clarify that r187624 is a hack and should be fixed better later.

Tracked by <rdar://problem/14648821>.

llvm-svn: 187729

11 years agoScopInfo: Split start value from SCEVAddRecExpr to enable parameter sharing.
Tobias Grosser [Mon, 5 Aug 2013 15:14:15 +0000 (15:14 +0000)]
ScopInfo: Split start value from SCEVAddRecExpr to enable parameter sharing.

SCoP invariant parameters with the different start value would deter parameter
sharing. For example, when compiling the following C code:

  void foo(float *input) {
    for (long j = 0; j < 8; j++) {
      // SCoP begin
      for (long i = 0; i < 8; i++) {
        float x = input[j * 64 + i + 1];
        input[j * 64 + i] = x * x;
      }
    }
  }

Polly would creat two parameters for these memory accesses:

    p_0: {0,+,256}
    p_2: {4,+,256}
    [j * 64 + i + 1] => MemRef_input[o0] : 4o0 = p_1 + 4i0
    [j * 64 + i]     => MemRef_input[o0] : 4o0 = p_0 + 4i0

These parameters only differ from start value. To enable parameter sharing,
we split the start value from SCEVAddRecExpr, so they would share a single
parameter that always has zero start value:

    p0: {0,+,256}<%for.cond1.preheader>
    [j * 64 + i + 1] => MemRef_input[o0] : 4o0 = 4 + p_1 + 4i0
    [j * 64 + i]     => MemRef_input[o0] : 4o0 = p_0 + 4i0

Such translation can make the polly-dependence much faster.

Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 187728

11 years agoSilencing an MSVC11 type conversion warning.
Aaron Ballman [Mon, 5 Aug 2013 13:47:03 +0000 (13:47 +0000)]
Silencing an MSVC11 type conversion warning.

llvm-svn: 187727

11 years agoLint fixes
Alexey Samsonov [Mon, 5 Aug 2013 13:20:39 +0000 (13:20 +0000)]
Lint fixes

llvm-svn: 187726

11 years ago80-cols
Alexey Samsonov [Mon, 5 Aug 2013 13:19:49 +0000 (13:19 +0000)]
80-cols

llvm-svn: 187725

11 years agoLLVM Interpreter: This patch implements vector support for cast operations (zext...
Elena Demikhovsky [Mon, 5 Aug 2013 12:17:06 +0000 (12:17 +0000)]
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).

llvm-svn: 187724

11 years ago[SystemZ] Use BRCT and BRCTG to eliminate add-&-compare sequences
Richard Sandiford [Mon, 5 Aug 2013 11:23:46 +0000 (11:23 +0000)]
[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).

llvm-svn: 187723

11 years agoDon't leak passes if added outside of the area determined by Started/Stopped flags.
Benjamin Kramer [Mon, 5 Aug 2013 11:11:11 +0000 (11:11 +0000)]
Don't leak passes if added outside of the area determined by Started/Stopped flags.

llvm-svn: 187722

11 years ago[SystemZ] Add definitions for BRCT and BRCTG
Richard Sandiford [Mon, 5 Aug 2013 11:07:38 +0000 (11:07 +0000)]
[SystemZ] Add definitions for BRCT and BRCTG

llvm-svn: 187721

11 years ago[SystemZ] Use LOAD AND TEST to eliminate comparisons against zero
Richard Sandiford [Mon, 5 Aug 2013 11:03:20 +0000 (11:03 +0000)]
[SystemZ] Use LOAD AND TEST to eliminate comparisons against zero

llvm-svn: 187720

11 years ago[SystemZ] Add LOAD AND TEST instructions
Richard Sandiford [Mon, 5 Aug 2013 11:00:53 +0000 (11:00 +0000)]
[SystemZ] Add LOAD AND TEST instructions

Just the definitions and MC support.  The next patch uses them for codegen.

llvm-svn: 187719

11 years ago[SystemZ] Split out comparison elimination into a separate pass
Richard Sandiford [Mon, 5 Aug 2013 10:58:53 +0000 (10:58 +0000)]
[SystemZ] Split out comparison elimination into a separate pass

Perhaps predictably, doing comparison elimination on the fly during
SystemZLongBranch turned out to be a bad idea.  The next patches make
use of LOAD AND TEST and BRANCH ON COUNT, both of which require
changes to earlier instructions.

No functionality change intended.

llvm-svn: 187718

11 years agoAVX-512 set: added mask operations, lowering BUILD_VECTOR for i1 vector types.
Elena Demikhovsky [Mon, 5 Aug 2013 08:52:21 +0000 (08:52 +0000)]
AVX-512 set: added mask operations, lowering BUILD_VECTOR for i1 vector types.
Added intrinsics and tests.

llvm-svn: 187717

11 years agoUse a shuffle with undef elements instead of inserting 0s in the 128-bit to 256-bit...
Craig Topper [Mon, 5 Aug 2013 06:17:21 +0000 (06:17 +0000)]
Use a shuffle with undef elements instead of inserting 0s in the 128-bit to 256-bit casting intrinsics to improve performance. Thanks to Katya Romanova for identifying this issue.

llvm-svn: 187716

11 years agoSema: Don't assume a nested name specifier holds a type
David Majnemer [Mon, 5 Aug 2013 04:53:41 +0000 (04:53 +0000)]
Sema: Don't assume a nested name specifier holds a type

Sema::PerformObjectMemberConversion assumed that the Qualifier it was
given holds a type. However, the specifier could hold just a namespace.
In this case, we should ignore the qualifier and not attempt to cast to
it.

llvm-svn: 187715

11 years agoUpdate the release notes about the status of the vectorizers.
Nadav Rotem [Mon, 5 Aug 2013 04:31:05 +0000 (04:31 +0000)]
Update the release notes about the status of the vectorizers.

llvm-svn: 187714

11 years agoUpdate the docs.
Nadav Rotem [Mon, 5 Aug 2013 04:27:34 +0000 (04:27 +0000)]
Update the docs.

llvm-svn: 187713

11 years agoAdd the saving of S2. This is needed for some of the floating point
Reed Kotler [Sun, 4 Aug 2013 23:56:53 +0000 (23:56 +0000)]
Add the saving of S2. This is needed for some of the floating point
helper functions. This can be optimized out later when the remaining
parts of the helper function work is moved into the Mips16HardFloat pass.
For now it forces us to use the 32 bit save/restore instructions instead
of the 16 bit ones.

llvm-svn: 187712

11 years agoRemove "lto_on_osx" xfails, now that -rdynamic works on Darwin.
Bob Wilson [Sun, 4 Aug 2013 23:55:24 +0000 (23:55 +0000)]
Remove "lto_on_osx" xfails, now that -rdynamic works on Darwin.

Note that this will require a recent version of the linker for Darwin
builds with LTO to pass these tests.

llvm-svn: 187711

11 years agoBuild with the $RDYNAMIC flag on Darwin as well as other platforms.
Bob Wilson [Sun, 4 Aug 2013 22:06:11 +0000 (22:06 +0000)]
Build with the $RDYNAMIC flag on Darwin as well as other platforms.

Part of <rdar://problem/14620988>

llvm-svn: 187710

11 years agoEmit the constructor for abstract classes when using -cxx-abi microsoft, fixes PR16735
Timur Iskhodzhanov [Sun, 4 Aug 2013 17:30:04 +0000 (17:30 +0000)]
Emit the constructor for abstract classes when using -cxx-abi microsoft, fixes PR16735

llvm-svn: 187709

11 years agoclang-tidy's modules depend on it.
Benjamin Kramer [Sun, 4 Aug 2013 16:06:43 +0000 (16:06 +0000)]
clang-tidy's modules depend on it.

Fixes shared cmake build.

llvm-svn: 187708

11 years agoFix clang-tidy dependencies and bad file comment.
Daniel Jasper [Sun, 4 Aug 2013 15:56:30 +0000 (15:56 +0000)]
Fix clang-tidy dependencies and bad file comment.

This addresses comments in post-commit review of r187345.

llvm-svn: 187707

11 years agoX86: Turn fp selects into mask operations.
Benjamin Kramer [Sun, 4 Aug 2013 12:05:16 +0000 (12:05 +0000)]
X86: Turn fp selects into mask operations.

double test(double a, double b, double c, double d) { return a<b ? c : d; }

before:
_test:
ucomisd %xmm0, %xmm1
ja LBB0_2
movaps %xmm3, %xmm2
LBB0_2:
movaps %xmm2, %xmm0

after:
_test:
cmpltsd %xmm1, %xmm0
andpd %xmm0, %xmm2
andnpd %xmm3, %xmm0
orpd %xmm2, %xmm0

Small speedup on Benchmarks/SmallPT

llvm-svn: 187706

11 years agoAVX-512 set: added VEXTRACTPS instruction
Elena Demikhovsky [Sun, 4 Aug 2013 10:46:07 +0000 (10:46 +0000)]
AVX-512 set: added VEXTRACTPS instruction

llvm-svn: 187705

11 years agoX86: specify CPU on new test to fix atom buildbot
Tim Northover [Sun, 4 Aug 2013 10:00:45 +0000 (10:00 +0000)]
X86: specify CPU on new test to fix atom buildbot

Apparently Atoms use lea for stack adjustment, which we weren't
looking for.

llvm-svn: 187704

11 years agoX86: correct tail return address calculation
Tim Northover [Sun, 4 Aug 2013 09:35:57 +0000 (09:35 +0000)]
X86: correct tail return address calculation

Due to the weird and wondeful usual arithmetic conversions, some
calculations involving negative values were getting performed in
uint32_t and then promoted to int64_t, which is really not a good
idea.

Patch by Katsuhiro Ueno.

llvm-svn: 187703

11 years agoAsmParser: Store MacroLikeBodies on the side so they don't get leaked.
Benjamin Kramer [Sun, 4 Aug 2013 09:06:29 +0000 (09:06 +0000)]
AsmParser: Store MacroLikeBodies on the side so they don't get leaked.

llvm-svn: 187702

11 years agoClean up code for Mips16 large frame handling.
Reed Kotler [Sun, 4 Aug 2013 01:13:25 +0000 (01:13 +0000)]
Clean up code for Mips16 large frame handling.

llvm-svn: 187701

11 years agoPPCAsmParser: Stop leaking names.
Benjamin Kramer [Sat, 3 Aug 2013 22:43:29 +0000 (22:43 +0000)]
PPCAsmParser: Stop leaking names.

Store them in a place that gets cleaned up properly.

llvm-svn: 187700

11 years agoUnbreak llvm-rtdyld build.
Benjamin Kramer [Sat, 3 Aug 2013 22:18:45 +0000 (22:18 +0000)]
Unbreak llvm-rtdyld build.

llvm-svn: 187699

11 years agoMachObjectFile: Don't leak on error.
Benjamin Kramer [Sat, 3 Aug 2013 22:16:37 +0000 (22:16 +0000)]
MachObjectFile: Don't leak on error.

llvm-svn: 187698

11 years agollvm-rtdyld: Don't leak memory managers.
Benjamin Kramer [Sat, 3 Aug 2013 22:16:31 +0000 (22:16 +0000)]
llvm-rtdyld: Don't leak memory managers.

Dyld never outlives MemMgr, just put both on the stack.

llvm-svn: 187697

11 years agoARMAsmParser: Plug a leak.
Benjamin Kramer [Sat, 3 Aug 2013 22:16:24 +0000 (22:16 +0000)]
ARMAsmParser: Plug a leak.

Using an object to do the cleanup may look like overkill, but it's safer and nicer than putting deletes everywhere.

llvm-svn: 187696

11 years agoStop leaking register infos in the disassemblers.
Benjamin Kramer [Sat, 3 Aug 2013 22:16:16 +0000 (22:16 +0000)]
Stop leaking register infos in the disassemblers.

llvm-svn: 187695

11 years agoAdd support for passing -1 to __builtin_shufflevector to signify an undefined element...
Craig Topper [Sat, 3 Aug 2013 17:40:38 +0000 (17:40 +0000)]
Add support for passing -1 to __builtin_shufflevector to signify an undefined element value to match IR capabilities.

llvm-svn: 187694