Commit Graph

159302 Commits

Author SHA1 Message Date
Shankar Easwaran f876ecf5ed [Cleanup] Remove file thats not being used
llvm-svn: 192172
2013-10-08 06:05:38 +00:00
Craig Topper 72c8cd7bc3 Remove some instructions that existed to provide aliases to the assembler. Can be done with InstAlias instead. Unfortunately, this was causing printer to use 'vmovq' or 'vmovd' based on what was parsed. To cleanup the inconsistencies convert all 'vmovd' with 64-bit registers to 'vmovq', but provide an alias so that 'vmovd' will still parse.
llvm-svn: 192171
2013-10-08 05:53:50 +00:00
Rui Ueyama 9a13ac9a40 Move duplicate code in InputGraphs to the parent class.
llvm-svn: 192170
2013-10-08 05:52:01 +00:00
Rui Ueyama 492048bf60 Rename GnuLd's path() too.
llvm-svn: 192169
2013-10-08 05:23:03 +00:00
Daniel Jasper ec01cd6e7f clang-format: Improve constructor initializer linewrapping.
Specifically make ConstructorInitializerAllOnOneLineOrOnePerLine work
nicely with BreakConstructorInitializersBeforeComma.

This fixes llvm.org/PR17395.

llvm-svn: 192168
2013-10-08 05:11:18 +00:00
Rui Ueyama 53f31af7ea Rename path() -> getPath().
Differential Revision: http://llvm-reviews.chandlerc.com/D1853

llvm-svn: 192167
2013-10-08 04:57:08 +00:00
Faisal Vali d2598e97a4 Fix linkage calculation of auto member functions returning lambdas
As described by Richard in https://groups.google.com/a/isocpp.org/d/msg/std-discussion/S1kmj0wF5-g/fb6agEYoL2IJ

we should allow:

template<typename S>
struct A {

template<typename T> static auto default_lambda() {
  return [](const T&) { return 42; };
}

template<class U = decltype(default_lambda<S>())>
  U func(U u = default_lambda<S>()) { return u; }

};

int run2 = A<double>{}.func()(3.14);

int run3 = A<char>{}.func()('a');

This patch allows the code using the same trickery that was used to allow the code in non-member functions at namespace scope.


Please see http://llvm-reviews.chandlerc.com/D1844 for richard's approval.

llvm-svn: 192166
2013-10-08 04:15:04 +00:00
Rui Ueyama 7deb970d66 Use size_t instead of uint64_t to represent the vector length.
llvm-svn: 192165
2013-10-08 03:59:50 +00:00
Rui Ueyama a1d4c10c61 Remove an unnecessary local variable.
llvm-svn: 192164
2013-10-08 03:59:48 +00:00
Rui Ueyama 8b8e5216af Make bitmask an unsigned type.
llvm-svn: 192163
2013-10-08 03:59:45 +00:00
Rui Ueyama 7a633b4de5 Expand auto for readability.
llvm-svn: 192162
2013-10-08 03:59:42 +00:00
Jason Molenda 64a11733c9 Add entries for arm6m to ArchSpec's g_macho_arch_entries.
<rdar://problem/15099306>

llvm-svn: 192161
2013-10-08 03:01:08 +00:00
Venkatraman Govindaraju 8223c553cf [Sparc] Do not hardcode nop in the delay slot of TLS_CALL. Use DelaySlotFiller to fill the delay slot instead.
llvm-svn: 192160
2013-10-08 02:50:29 +00:00
Jason Molenda 9e4a006ec2 Clarify how to handle a thread register context with a gap
in the middle because of alignment rules.

llvm-svn: 192159
2013-10-08 02:42:39 +00:00
Adrian Prantl e60e03a08d typo.
llvm-svn: 192158
2013-10-08 02:30:54 +00:00
Adrian Prantl 031e575a23 typo.
llvm-svn: 192157
2013-10-08 02:28:20 +00:00
Adrian Prantl 73b9d200b5 Reduce testcase from 1r92011.
llvm-svn: 192156
2013-10-08 02:21:44 +00:00
Richard Smith 8e45293b6d Fix build break: clang no longer supports -ast-dump-xml.
llvm-svn: 192155
2013-10-08 02:19:45 +00:00
Nick Kledzik 369ffd1c55 fix typos
llvm-svn: 192154
2013-10-08 02:07:19 +00:00
Nick Kledzik 58070025ca fix all EXPECT_EQ(.address) tests
llvm-svn: 192153
2013-10-08 01:27:03 +00:00
Nick Kledzik 7e28e75570 fix test case failing on bot
llvm-svn: 192152
2013-10-08 01:12:35 +00:00
Nick Kledzik 733c77fd86 update mach-o EXPORT_SYMBOL_* names
llvm-svn: 192151
2013-10-08 00:59:13 +00:00
Reid Kleckner 9a7f3e61a9 [ms-cxxabi] Fix the calling convention for operator new in records
Summary:
Operator new, new[], delete, and delete[] are all implicitly static when
declared inside a record.  CXXMethodDecl already knows this, but we need
to account for that before we pick the calling convention for the
function type.

Fixes PR17371.

Reviewers: rsmith

CC: cfe-commits

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

llvm-svn: 192150
2013-10-08 00:58:57 +00:00
Rui Ueyama 094546836b Add comments. Early return.
llvm-svn: 192149
2013-10-08 00:43:53 +00:00
Rui Ueyama f8c54842d6 Convert error code structs to scoped enums.
Summary:
The original code with enum "_" is intended to emulate scoped enums.
Now we have real scoped enums, so use it.

Reviewers: Bigcheese

CC: llvm-commits

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

llvm-svn: 192148
2013-10-08 00:43:50 +00:00
Nick Kledzik 30332b19d3 Supoort mach-o encoded in yaml.
This is the first step in how I plan to get mach-o object files support into 
lld. We need to be able to test the mach-o Reader and Write on systems without 
a mach-o tools. Therefore, we want to support a textual way (YAML) to represent 
mach-o files.

MachONormalizedFile.h defines an in-memory abstraction of the content of mach-o  
files. The in-memory data structures are always native endianess and always
use 64-bit sizes. That internal data structure can then be converted to or
from three different formats: 1) yaml (text) encoded mach-o, 2) binary mach-o
files, 3) lld Atoms.

This patch defines the internal model and uses YAML I/O to implement the 
conversion to and from the model to yaml. The next patch will implement
the conversion from normalized to binary mach-o.

This patch includes unit tests to validate the yaml conversion APIs.

llvm-svn: 192147
2013-10-08 00:43:34 +00:00
Justin Bogner 84ff5ee448 Sema: Only merge typedef attributes if the previous decl is a typedef
In r186373, we started merging attributes on typedefs, but this causes
us to try to merge attributes even if the previous declaration was not
a typedef.

Only merge the attributes if the previous decl was also a typedef.

Fixes rdar://problem/15044218

llvm-svn: 192146
2013-10-08 00:19:09 +00:00
Manman Ren 4f755deaf6 TBAA: use the same format for scalar TBAA and struct-path aware TBAA.
An updated version of r191586 with bug fix.

Struct-path aware TBAA generates tags to specify the access path,
while scalar TBAA only generates tags to scalar types.

We should not generate a TBAA tag with null being the first field. When
a TBAA type node is null, the tag should be null too. Make sure we
don't decorate an instruction with a null TBAA tag.

Added a testing case for the bug reported by Richard with -relaxed-aliasing
and -fsanitizer=thread.

llvm-svn: 192145
2013-10-08 00:08:49 +00:00
Ted Kremenek db49a5df47 Split test to test -Wshadow with emmintrin.h more portable.
llvm-svn: 192144
2013-10-08 00:03:41 +00:00
Ted Kremenek 854cc293a7 Suppress useless -Wshadow warning when using _mm* macros from emmintrin.h
Fixes <rdar://problem/10679282>.

I'm not completely satisfied with this patch.  Sprinkling "diagnostic ignored"
_Pragmas throughout this file is gross, but I couldn't suppress
it for the entire file.

llvm-svn: 192143
2013-10-07 23:51:11 +00:00
Marshall Clow db78c7049e Fix LWG Issue 2141: common_type trait produces reference types
llvm-svn: 192142
2013-10-07 23:43:33 +00:00
Reid Kleckner b66ae3f34f clang-cl: Accept and mostly ignore /vm*, /GF, /GF-, /Zm, and /bigobj
Patch by David Ziman!

llvm-svn: 192141
2013-10-07 23:19:01 +00:00
Richard Smith 20d920c844 Add a triple to unbreak buildbots where size_t is not 'unsigned long'.
llvm-svn: 192140
2013-10-07 22:58:25 +00:00
Hans Wennborg 3e67a65729 cmake: don't set LLVM_COMPILER_IS_GCC_COMPATIBLE when using clang-cl
Tip-of-tree CMake has become clang-cl aware [1]. In this case,
CMAKE_CXX_COMPILER_ID will still be Clang, but MSVC will be true.

[1] See http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d8356d4

llvm-svn: 192139
2013-10-07 22:03:23 +00:00
Rui Ueyama 4c4d572795 Rename lld:*_error::_ -> lld:*_error::ErrorCode.
Summary: Rename lld:*_error::_ -> lld:*_error::ErrorCode.

Reviewers: shankarke

CC: llvm-commits

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

llvm-svn: 192138
2013-10-07 21:58:51 +00:00
David Majnemer f07777c80b Windows: Avoiding resizing, use uninitialized data() instead
This is ever-so faster but more importantly matches what we have elsewhere.

llvm-svn: 192137
2013-10-07 21:57:07 +00:00
Nick Kledzik 312fcd0e1c libcxxabi contains the runtime support for C++. But, as some folks have
realized, it is not complete.  It relies on some _Unwind_* functions to be
supplied by the OS. That means it cannot be ported to platforms that don’t 
already have an unwinder.  

Years ago Apple wrote its own unwinder for MacOSX and iOS.  To make libcxxabi 
complete, Apple has decided the source code for its unwinder can be contributed
to the open source LLVM libcxxabi project, with a dual licensed under LLVM 
and MIT license.

So, I’ve spent some time cleaning up the sources to make them conform with 
LLVM style and to conditionalize the sources in a way that should make it 
easier to port to other platforms.  The sources are in a separate "Unwind" 
directory under "src" in libcxxabi.  

Background:
Most architectures now use "zero cost" exceptions for C++.  The zero cost means
there are no extra instructions executed if no exceptions are thrown.  But if 
an exception is thrown, the runtime must consult side tables and figure out how
to restore registers and "unwind" from the current stack frame to the catch 
clause.  That ability to modify the stack frames and cause the thread to resume 
in a catch clause with all registers restored properly is the main purpose 
of the unwinder.

This unwinder has two levels of API.  The high level APIs are the _Unwind_* 
functions which the cxa_* exception functions in libcxxabi require.  The low 
level APIs are the unw_* functions which are an interface defined by the the 
old HP libunwind project (which shares no code with this unwinder).

llvm-svn: 192136
2013-10-07 21:39:41 +00:00
Akira Hatanaka 57a2d2f7fd [mips] Test case for r192124.
llvm-svn: 192135
2013-10-07 21:32:57 +00:00
Ed Maste 05f5a1d3df Mark tests failing on FreeBSD after r191996
llvm-svn: 192134
2013-10-07 21:25:48 +00:00
Arnold Schwaighofer 0caddfc731 LoopVectorize: External uses must use the last value in a reduction cycle
Otherwise, we don't perform operations that would have been performed on
the scalar version.

Fixes PR17498.

llvm-svn: 192133
2013-10-07 21:05:43 +00:00
Ashok Thirumurthi 52fbac7d90 xfail for gcc tests due to pr17499 (regressions due to r191966).
llvm-svn: 192132
2013-10-07 21:00:29 +00:00
Richard Smith fee2c8d814 Remove -ast-dump-xml.
llvm-svn: 192131
2013-10-07 20:56:34 +00:00
Reed Kotler 445d0adc24 Add Mips16 patterns for sign extend byte and sign extend halfword.
llvm-svn: 192130
2013-10-07 20:46:19 +00:00
Fariborz Jahanian 985da6c936 ObjectiveC migrator: A typical implementation of
'default' methods in Foundation does not
infer 'instancetype' for methods' result type.
// rdar://15145218

llvm-svn: 192129
2013-10-07 20:41:53 +00:00
Richard Smith b8b41d3ea4 Add support for WG21 N3599 (literal operator template for strings) as a GNU
extension. The GCC folks have decided to support this even though the standard
committee have not yet approved this feature.

Patch by Hristo Venev!

llvm-svn: 192128
2013-10-07 19:57:58 +00:00
Fariborz Jahanian d29406233b ObjectiveC modern rewriter. Rewrite typedefs
declared locally in ObjectiveC containers.
// rdar://15143875

llvm-svn: 192127
2013-10-07 19:54:22 +00:00
Manman Ren 5a78755336 Struct byval: use the correct alignment for loads generated to load
from struct byval to registers.

We used to pass 0 which means the alignment of PtrVT. Even when the alignment
of the struct is smaller than 4, the LOADs would have alignment of 4, and
further optimizations could combine the LOADs into a ldm, which would
cause crash.

The fix is to pass the alignment of the struct byval.

rdar://problem/15144402

llvm-svn: 192126
2013-10-07 19:47:53 +00:00
Akira Hatanaka 4c0a71223a [mips] Coding style clean up.
llvm-svn: 192125
2013-10-07 19:33:02 +00:00
Akira Hatanaka 3c0d6afeec [mips] Disable tail merging when long branch pass is enabled.
llvm-svn: 192124
2013-10-07 19:13:53 +00:00
Benjamin Kramer 7b5e159450 X86: Fix type check. Just because an integer type is illegal doesn't mean it's i64.
Fixes PR17495, where an i24 triggered this code. It's intended to
optimize i64 loads on 32 bit x86.

llvm-svn: 192123
2013-10-07 19:11:35 +00:00