Commit Graph

173657 Commits

Author SHA1 Message Date
Hans Wennborg b6d4e8cd4e Handle -fdelayed-template-parsing of out-of-line definitions of
class template member classes (PR19613)

Also improve this code in general by implementing suggestions
from Richard.

Differential Revision: http://reviews.llvm.org/D3555?id=9020

llvm-svn: 207822
2014-05-02 02:01:07 +00:00
Rui Ueyama db2fc6d756 Make the variable scope narrower. No functionality change.
llvm-svn: 207821
2014-05-02 01:17:40 +00:00
Reid Kleckner ec87fece21 Remove unused variable that I missed in my rush to fix the bots
llvm-svn: 207820
2014-05-02 01:17:12 +00:00
Reid Kleckner 7f5f0f3f6e Win64: Use ConvertType instead of checking the MS inheritance
dependent-type-member-pointer.cpp is failing on a win64 bot because
-fms-extensions is not enabled.  Use ConvertType rather than relying on
the inheritance attributes.  It's less code, but probably slower.

llvm-svn: 207819
2014-05-02 01:14:59 +00:00
Greg Clayton f29bf9a169 "DONE" is being left in multi-line results when it shouldn't for non terminal input.
<rdar://problem/16790579>

llvm-svn: 207818
2014-05-02 01:03:07 +00:00
Reid Kleckner 9005f41837 Win64: Pass member pointers larger than 8 bytes by reference
The Win64 ABI docs on MSDN say that arguments bigger than 8 bytes are
passed by reference.  Prior to this change, we were only applying this
logic to RecordType arguments.  This affects both the Itanium and
Microsoft C++ ABIs.

Reviewers: majnemer

Differential Revision: http://reviews.llvm.org/D3587

llvm-svn: 207817
2014-05-02 00:51:20 +00:00
Greg Clayton f0066ad07f Fixed CTRL+C related issues:
- CTRL+C wasn't clearing the command in lldb
- CTRL+C doesn't work in python macros in lldb
- Ctrl+C no longer interrupts the running process that you attach to

<rdar://problem/15949205> 
<rdar://problem/16778652> 
<rdar://problem/16774411>

llvm-svn: 207816
2014-05-02 00:45:31 +00:00
Reid Kleckner 34a38d8efb MS ABI: Fix logic bug in member pointer null test code
This code is trying to test if the pointer is *not* null.  Therefore we
should use 'or' instead of 'and' to combine the results of 'icmp ne'.
This logic is consistent with the general member pointer comparison code
in EmitMemberPointerComparison.

llvm-svn: 207815
2014-05-02 00:05:16 +00:00
Lubos Lunak d9070c5ee7 -fsyntax-only for a test
llvm-svn: 207814
2014-05-01 23:58:20 +00:00
Richard Smith 51af519db3 Bitrig's standard C++ standard library changed from libstdc++ to libc++.
Also, it uses libc++abi and needs pthread.  While there, fix the libc++
include path. Patch by Patrick Wildt!

llvm-svn: 207813
2014-05-01 23:24:24 +00:00
Richard Smith 7d3192fca5 Bitrig now supports TLS, so enable TLS support when targeting it. Patch by Patrick Wildt!
llvm-svn: 207812
2014-05-01 23:19:06 +00:00
David Blaikie 8ad22e6a5c Use std::abs(int) portably.
Code review feedback from Reid Kleckner on r207806.

llvm-svn: 207811
2014-05-01 23:01:41 +00:00
Reid Kleckner c9bb8b5af4 Use %clang_cc1 in rewrite-includes-messages.c test and drop REQUIRES: shell
This test passes on Windows with lit's shell interpreter.

llvm-svn: 207810
2014-05-01 22:45:16 +00:00
Rui Ueyama efa8076c29 [PECOFF] Drop stdcall's atsign suffix only.
You can omit @number suffix when specifying /export option,
but you can do that only for stdcall functions.

llvm-svn: 207809
2014-05-01 22:44:42 +00:00
Lubos Lunak 1f03d08a8c do not hide clang stderr output during a test
I don't know why this fails on the buildbot.

llvm-svn: 207808
2014-05-01 22:40:00 +00:00
Juergen Ributzka 37fc0a8ae8 [Stackmaps] Pacify windows buildbot.
llvm-svn: 207807
2014-05-01 22:39:26 +00:00
David Blaikie 09acbf35e2 Fix some -Wabsolute-value warnings introduced in r207796.
llvm-svn: 207806
2014-05-01 22:23:56 +00:00
Juergen Ributzka 673a762b80 [Stackmaps] Add command line option to specify the stackmap version.
llvm-svn: 207805
2014-05-01 22:21:30 +00:00
Juergen Ributzka 6340195abd [Stackmaps] Refactor serialization code. No functional change intended.
llvm-svn: 207804
2014-05-01 22:21:27 +00:00
Juergen Ributzka f01e809383 [Stackmaps] Replace the custom ConstantPool class with a MapVector.
llvm-svn: 207803
2014-05-01 22:21:24 +00:00
Rui Ueyama a665de8f38 Fix FreeBSD buildbots.
llvm-svn: 207802
2014-05-01 22:13:39 +00:00
Michael J. Spencer 1f10c5ea94 [IR] Make {extract,insert}element accept an index of any integer type.
Given the following C code llvm currently generates suboptimal code for
x86-64:

__m128 bss4( const __m128 *ptr, size_t i, size_t j )
{
    float f = ptr[i][j];
    return (__m128) { f, f, f, f };
}

=================================================

define <4 x float> @_Z4bss4PKDv4_fmm(<4 x float>* nocapture readonly %ptr, i64 %i, i64 %j) #0 {
  %a1 = getelementptr inbounds <4 x float>* %ptr, i64 %i
  %a2 = load <4 x float>* %a1, align 16, !tbaa !1
  %a3 = trunc i64 %j to i32
  %a4 = extractelement <4 x float> %a2, i32 %a3
  %a5 = insertelement <4 x float> undef, float %a4, i32 0
  %a6 = insertelement <4 x float> %a5, float %a4, i32 1
  %a7 = insertelement <4 x float> %a6, float %a4, i32 2
  %a8 = insertelement <4 x float> %a7, float %a4, i32 3
  ret <4 x float> %a8
}

=================================================

        shlq    $4, %rsi
        addq    %rdi, %rsi
        movslq  %edx, %rax
        vbroadcastss    (%rsi,%rax,4), %xmm0
        retq

=================================================

The movslq is uneeded, but is present because of the trunc to i32 and then
sext back to i64 that the backend adds for vbroadcastss.

We can't remove it because it changes the meaning. The IR that clang
generates is already suboptimal. What clang really should emit is:

  %a4 = extractelement <4 x float> %a2, i64 %j

This patch makes that legal. A separate patch will teach clang to do it.

Differential Revision: http://reviews.llvm.org/D3519

llvm-svn: 207801
2014-05-01 22:12:39 +00:00
Pranav Bhandarkar 94cb35cb05 Remove HexagonTargetMachine::addPassesForOptimizations; it is not needed any more.
llvm-svn: 207800
2014-05-01 22:10:59 +00:00
David Blaikie eef6b5c154 Revert "Use make_unique<T>(...) rather than unique_ptr<T>(new T(...))"
Seems to be crashing clang (3.3 and 3.4) on some buildbots...

This reverts commit r207792.

llvm-svn: 207799
2014-05-01 21:40:37 +00:00
Joerg Sonnenberger c8f36d2d55 Sort.
llvm-svn: 207798
2014-05-01 21:40:22 +00:00
Lubos Lunak adc2fde016 use 'diff' rather than 'cmp -s' in a test
That's what all tests use, no idea where I got the latter from.

llvm-svn: 207797
2014-05-01 21:36:08 +00:00
Kaelyn Takata b96b3be899 When sorting overload candidates, sort arity mismatches in ascending
order by the number of missing or extra parameters. This is useful if
there are more than a few overload candidates with arity mismatches,
particularly in the presence of -fshow-overloads=best.

llvm-svn: 207796
2014-05-01 21:15:24 +00:00
Lubos Lunak 4526b46ee6 write a line marker right before adding included file
Enclosing the original #include directive inside #if 0 adds lines,
so warning/errors messages would have the line number off in
"In file included from <file>:<line>:", so add line marker to fix this.

llvm-svn: 207795
2014-05-01 21:11:57 +00:00
Lubos Lunak 72cad68b30 do not use "1" for line marker for the predefines "file" either
Similar to r207764.

llvm-svn: 207794
2014-05-01 21:10:08 +00:00
Peter Zotov bf8a9ac768 [OCaml] Add an ocamlfind package llvm.all_backends.
This package is useful for architecture-independent tools like llc.

Patch by Jacques-Pascal Deplaix.

llvm-svn: 207793
2014-05-01 21:00:52 +00:00
David Blaikie de9527c232 Use make_unique<T>(...) rather than unique_ptr<T>(new T(...))
llvm-svn: 207792
2014-05-01 20:46:30 +00:00
Rui Ueyama da808c39e6 [PECOFF] Do not call addDllExport to mutate export descriptors.
This is more efficient than before.

llvm-svn: 207791
2014-05-01 20:40:30 +00:00
Reed Kotler bab3f23da6 Add basic functionality for assignment of ints.
This creates a lot of core infrastructure in which to add, with little
effort, quite a bit more to mips fast-isel

Test Plan: simplestore.ll

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D3527

llvm-svn: 207790
2014-05-01 20:39:21 +00:00
Richard Smith 06900a0ffb Update documentation to match recent API change. newFrontendActionFactory now returns a unique_ptr.
llvm-svn: 207789
2014-05-01 20:04:39 +00:00
David Blaikie 6f68758358 Fix uninitialized variable introduced in r207739.
This was initialized by llvm-mc (calling setDwarfVersion) but other
clients (such as clang, llc, etc) aren't necessarily initializing this
so we were getting garbage DWARF version values in the output.
Initialize it to a reasonable default (the same default used in llvm-mc,
though this is higher than it was (2) previously).

llvm-svn: 207788
2014-05-01 19:55:34 +00:00
Arnaud A. de Grandmaison 59615698d5 PR19601: testcase improvement
The test can now catch all cases:
 - no removal of the 'no-integrated-as' flag
 - bogus removal of the flag, like when the remove_if was not followed by an erase

llvm-svn: 207787
2014-05-01 19:36:13 +00:00
Rafael Espindola ea9f9d4030 Don't propagate StorageClass and ComplexType to aliases.
This matches gas' behaviour on COFF.

I think that this yak is now sufficiently shaved for aliases with offset
to work.

llvm-svn: 207786
2014-05-01 19:02:03 +00:00
Benjamin Kramer cd1a98bf74 Update and sort CMakeLists.
llvm-svn: 207785
2014-05-01 18:59:11 +00:00
Reid Kleckner af6b2504f8 profile: Fix the build with gcc 4.9
GCC -pedantic warns that the initialization of Header is not constant:
InstrProfilingFile.c:31:5: error: initializer element is not computable at load time [-Werror]

LLVM defaults to enabling -pedantic.  If this warning is unhelpful, we
can consider revisiting that decision.

llvm-svn: 207784
2014-05-01 18:52:14 +00:00
Eli Bendersky a108a65df2 Add an optimization that does CSE in a group of similar GEPs.
This optimization merges the common part of a group of GEPs, so we can compute
each pointer address by adding a simple offset to the common part.

The optimization is currently only enabled for the NVPTX backend, where it has
a large payoff on some benchmarks.

Review: http://reviews.llvm.org/D3462

Patch by Jingyue Wu.

llvm-svn: 207783
2014-05-01 18:38:36 +00:00
David Blaikie 748be6c376 DebugInfo: Correct the attribute type kind.
Post commit review feedback from Paul Robinson regarding r207777.

llvm-svn: 207782
2014-05-01 18:31:21 +00:00
David Blaikie 1c286f6d8f PR19623: Support typedefs (and alias templates) of void.
llvm-svn: 207781
2014-05-01 18:25:19 +00:00
David Blaikie 80bec83d8d Fix debug-info-alias test to add CHECK to some lines that were missing it.
To simplify source location offsets, this test uses line directives to
force particular lines of interest to have known line numbers so that
adjustments before/after those points don't require updates to the CHECK
lines.

llvm-svn: 207779
2014-05-01 18:13:24 +00:00
Greg Clayton 4cc3ba56bf Fixed whitespace issues.
llvm-svn: 207778
2014-05-01 18:13:08 +00:00
David Blaikie 0f82c225b8 PR19623: Implement typedefs of void.
This the LLVM portion that will allow Clang and other frontends to emit
typedefs of void by providing a null type for the typedef's underlying
type.

llvm-svn: 207777
2014-05-01 17:56:13 +00:00
David Majnemer daff37013c AST: Mangle reference temporaries reliably
Summary:
Previously, we would generate a single name for all reference
temporaries and allow LLVM to rename them for us.  Instead, number the
reference temporaries as we build them in Sema.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D3554

llvm-svn: 207776
2014-05-01 17:50:17 +00:00
Dinesh Dwivedi 0db806b7f9 Fix typo (first commit to test commit access).
llvm-svn: 207775
2014-05-01 17:19:34 +00:00
Aaron Ballman a7c9ed57d9 Fixing a cast-qual warning. getBufferStart() and getBufferEnd() both return a const char *, so casting to non-const was triggering a warning (even though the assignment and usage was always const anyway).
No functional changes intended.

llvm-svn: 207774
2014-05-01 17:16:24 +00:00
Reid Kleckner 756199ccea Fix declspec-thread.cpp test with a triple
Not all triples support it.

llvm-svn: 207772
2014-05-01 17:12:20 +00:00
Reid Kleckner e502507d34 MSVCCompat: Don't produce an invalid AST when accepting void pseudo-dtors
We accept 'void *p; p->~void();' for MSVC compatibility since r148682.
However, we were returning ExprError, rather than producing an AST,
despite only diagnosing it with a warning.  CodeGen noticed that the
template function specialization had an invalid AST, and therefore
didn't generate code for it.  This change makes us produce an AST with a
void pseudo-dtor call.

Part of PR18256.

llvm-svn: 207771
2014-05-01 16:50:23 +00:00