Commit Graph

171900 Commits

Author SHA1 Message Date
Daniel Jasper 220c0d1f5e clang-format: Fix false positive in braced list detection in protos.
llvm-svn: 205954
2014-04-10 07:27:12 +00:00
Simon Atanasyan 878bd8ad9c Use range-based for loops. No functionality change.
llvm-svn: 205953
2014-04-10 06:02:49 +00:00
Eric Christopher cab9fae403 Add global static variables for anonymous union fields. This makes
sure that a debugger can find them when stepping through code,
for example from the included testcase:

   12     int test_it() {
   13       c = 1;
   14       d = 2;
-> 15       a = 4;
   16       return (c == 1);
   17     }
   18
(lldb) p a
(int) $0 = 2
(lldb) p c
(int) $1 = 2
(lldb) p d
(int) $2 = 2

and a, c, d are all part of the file static anonymous union:

static union {
  int c;
  int d;
  union {
    int a;
  };
  struct {
    int b;
  };
};

Fixes PR19221.

llvm-svn: 205952
2014-04-10 05:20:00 +00:00
NAKAMURA Takumi 951716bf37 test/clang-tidy/redundant-smartptr-get*.cpp: Both of them really require shell.
llvm-svn: 205951
2014-04-10 03:17:22 +00:00
NAKAMURA Takumi d8570e5bc2 Fix abuse of StringRef on ARM64SysReg::MRSMapper::toString(Val, Valid).
FIXME: Could we use SmallString here?
llvm-svn: 205950
2014-04-10 03:05:59 +00:00
Saleem Abdulrasool c5e0099ffc ARM64: add an explicit cast to silence a silly warning
GCC 4.8 complains with:
  warning: enumeral and non-enumeral type in conditional expression

Although this is silly and harmless in this case, add an explicit cast to
silence the warning.

llvm-svn: 205949
2014-04-10 02:48:10 +00:00
Reid Kleckner 9df1d975b8 Avoid crashing when failing to emit a thunk
If we crash, we raise a crash handler dialog, and that's really
annoying.  Even though we can't emit correct IR until we have musttail,
don't crash.

llvm-svn: 205948
2014-04-10 01:40:15 +00:00
Juergen Ributzka 48c8c07d0a [ARM64] Fix immediate cost calculation for types larger than i64.
The immediate cost calculation code was hitting an assertion in the included
test case, because APInt was still internally 128-bits. Truncating it to 64-bits
fixed the issue.

Fixes <rdar://problem/16572521>.

llvm-svn: 205947
2014-04-10 01:36:59 +00:00
Reid Kleckner eb2ecff166 Fix the build with LLVM_DELETED_FUNCTION instead of '= delete'
MSVC 2012 doesn't understand '= delete', but 2013 does.

llvm-svn: 205946
2014-04-10 01:05:01 +00:00
David Majnemer 61182a89e8 Remove Unicode introduced in r205943
llvm-svn: 205945
2014-04-10 00:59:44 +00:00
Reid Kleckner 2d4a69e9c9 Revert "For the ARM integrated assembler add checking of the alignments on vld/vst instructions. And report errors for alignments that are not supported."
It doesn't build with MSVC 2012, because MSVC doesn't allow union
members that have non-trivial default constructors.  This change added
'SMLoc AlignmentLoc' to MemoryOp, which made MemoryOp's default ctor
non-trivial.

This reverts commit r205930.

llvm-svn: 205944
2014-04-10 00:52:14 +00:00
David Majnemer 64e40c56fb AST: Implement proposal for dependent elaborated type specifiers
cxx-abi-dev came up with a way to disambiguate between different
keywords used in elaborated type specifiers.

This resolves certain collisions during mangling.

llvm-svn: 205943
2014-04-10 00:49:24 +00:00
Ben Langmuir 4469138e98 Move search for header in umbrella directories into its own function
No functional change intended.

llvm-svn: 205942
2014-04-10 00:39:10 +00:00
Jim Grosbach 83b44e1e21 Fix to support properly cleaning up failed address sinking against constants
As it turns out the source of the sunkaddr can be a constant, in which case
there is not an instruction to delete, causing the cleanup code introduced in
r204833 to crash. This patch adds a dynamic check to ensure the deleted value is
in fact an instruction and not a constant.

Patch by Louis Gerbarg <lgg@apple.com>

llvm-svn: 205941
2014-04-10 00:27:45 +00:00
Jim Grosbach 576f8cf19f X86: Tighten up test.
llc CPU autodection bites again. Speculative fix for bot failures.

llvm-svn: 205940
2014-04-10 00:27:43 +00:00
Enrico Granata 1ac6296376 <rdar://problem/12055586>
Enable data formatters to see-through pointers/references to typedefs

For instance, if Foo is a typedef to Bar, and there is a formatter for any/all of Bar*, Bar&, Bar&&, then Foo*, Foo&, and Foo&& should pick these up if Foo-specific formatters don't exist

llvm-svn: 205939
2014-04-10 00:14:07 +00:00
Jim Grosbach e4fef71981 Add support for load folding of avx1 logical instructions
AVX supports logical operations using an operand from memory. Unfortunately
because integer operations were not added until AVX2 the AVX1 logical
operation's types were preventing the isel from folding the loads. In a limited
number of cases the peephole optimizer would fold the loads, but most were
missed. This patch adds explicit patterns with appropriate casts in order for
these loads to be folded.

The included test cases run on reduced examples and disable the peephole
optimizer to ensure the folds are being pattern matched.

Patch by Louis Gerbarg <lgg@apple.com>

rdar://16355124

llvm-svn: 205938
2014-04-09 23:39:25 +00:00
Jim Grosbach cad4cd6c9e SelectionDAG: Don't constant fold target-specific nodes.
FoldConstantArithmetic() only knows how to deal with a few target independent
ISD opcodes. Bail early if it sees a target-specific ISD node. These node do
funny things with operand types which may break the assumptions of the code
that follows, and there's no actual folding that can be done anyway. For example,
non-constant 256 bit vector shifts on X86 have a shift-amount operand that's a
128-bit v4i32 vector regardless of what the first operand type is and that breaks
the assumption that the operand types must match.

rdar://16530923

llvm-svn: 205937
2014-04-09 23:28:11 +00:00
DeLesley Hutchins 7e615c2f65 Thread Safety Analysis: reorganized SExpr header files. No change in
functionality.

llvm-svn: 205936
2014-04-09 22:39:43 +00:00
Reid Kleckner b49fee0b41 Thread safety: move the inline function back into a namespace
Moving it into a struct makes things work because it implicitly marks
the function as inline.  The struct is unnecessary if you explicitly
mark the function inline.

llvm-svn: 205935
2014-04-09 22:17:06 +00:00
Warren Hunt 39a907b1c2 [MS-ABI] Update to alias-avoidance padding
This patch changes how we determine if padding is needed between two 
bases in msvc compatibility mode.  Test cases included.

In addition, a very minor change to the printing of structures to ease 
lit testing.

llvm-svn: 205933
2014-04-09 21:57:24 +00:00
Enrico Granata 699e14f3ce When trying to extract the type info for an r-value reference type, dont' cast to an l-value reference type
llvm-svn: 205932
2014-04-09 21:54:17 +00:00
Aaron Ballman 8dbbbcd246 Switching back from a static namespace-scoped function to a static class-scope function. No functional change, but resolves a warning.
llvm-svn: 205931
2014-04-09 21:40:14 +00:00
Kevin Enderby c296ecd96c For the ARM integrated assembler add checking of the
alignments on vld/vst instructions.  And report errors for
alignments that are not supported.

While this is a large diff and an big test case, the changes
are very straight forward.  But pretty much had to touch
all vld/vst instructions changing the addrmode to one of the
new ones that where added will do the proper checking for
the specific instruction.

rdar://11312406

llvm-svn: 205930
2014-04-09 21:32:59 +00:00
Aaron Ballman 28347a72c9 Thread Safety Analysis: now with less includes. No functional changes.
llvm-svn: 205929
2014-04-09 21:12:04 +00:00
Enrico Granata a0db6ed44b <rdar://problem/16477472>
Set the correct FormatManager revision before starting to figure out the new formatters
This can avoid entering some corner cases where as part of figuring out formatters we try to figure out dynamic types, and in turn that causes us to go back in trying to fetch new formatters - it is not only a futile exercise, it's also prone to endless recursion

This would only cause a behavior change if getting this chain started would eventually cause something to run and alter the formatters, a very unlikely if at all possible sequence of events

llvm-svn: 205928
2014-04-09 21:06:11 +00:00
Chad Rosier 5f8d6a6c15 [AArch64] Implement the isZExtFree APIs.
llvm-svn: 205926
2014-04-09 20:51:21 +00:00
Chad Rosier 9ce19fb65c [AArch64] Implement the isTruncateFree API.
In AArch64 i64 to i32 truncate operation is a subregister access.

This allows more opportunities for LSR optmization to eliminate
variables of different types (i32 and i64).

llvm-svn: 205925
2014-04-09 20:43:40 +00:00
Reid Kleckner 2a24e3ad86 clang-cl: Disable TBAA by default for MSVC compatibility
MSVC doesn't have an option to enable TBAA, so make -fstrict-aliasing
and -fno-strict-aliasing available in clang-cl.

llvm-svn: 205924
2014-04-09 20:07:39 +00:00
Quentin Colombet 0b1a5584d6 [DAGCombiner] DAG combine does not know how to combine indexed loads with
sign/zero/any extensions. However a few places were not checking properly the
property of the load and were turning an indexed load into a regular extended
load. Therefore the indexed value was lost during the process and this was
triggering an assertion.

<rdar://problem/16389332>

llvm-svn: 205923
2014-04-09 20:03:05 +00:00
Anders Waldenborg 12da50a8e1 Handle difference in signedness of 'char' in test/Index/print-type.c{,pp}
llvm-svn: 205922
2014-04-09 19:39:07 +00:00
Anders Waldenborg ddce74f6f8 Make c-index-test -test-print-type include pointeekind for pointer types
The idea is to give visibility to more type kinds, especially for getting
a better grasp of what appears as unexposed type kind with libclang.

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

llvm-svn: 205921
2014-04-09 19:16:08 +00:00
Bob Wilson 0e011f201d Add a -triple argument so that this new test passes on Darwin.
The section names used here are not valid for Mach-O.

llvm-svn: 205920
2014-04-09 18:51:19 +00:00
Viktor Kutuzov 7004b8c07c Enable building of sanitizers on FreeBSD
llvm-svn: 205919
2014-04-09 18:45:12 +00:00
Bob Wilson ae89ddedff Simple fix for build failures resulting from r205867.
llvm-svn: 205918
2014-04-09 18:34:45 +00:00
Argyrios Kyrtzidis 9ef53ceb51 [Preprocessor/CodeComplete] Don't add include guard macros to code-completion results.
llvm-svn: 205917
2014-04-09 18:21:23 +00:00
Aaron Ballman 91b079a9fc Cannot have the base class destructor be private (or explicitly deleted); fixing the build bots.
llvm-svn: 205916
2014-04-09 17:55:04 +00:00
Aaron Ballman 3f993c1320 Thread Safety Analysis: some minor cleanups to the latest thread safety changes. No functional changes intended.
* Adds an iterator_range interface to CallExpr to get the arguments
* Modifies SExpr such that it must be allocated in the Arena, and cannot be deleted
* Minor const-correctness and nullptr updates
* Adds some operator!= implementations to complement operator==
* Removes unused functionality

llvm-svn: 205915
2014-04-09 17:45:44 +00:00
David Majnemer 97d8ee3824 Revert "Revert "YAMLIO: Encode ambiguous hex strings explicitly""
Don't quote octal compatible strings if they are only two wide, they
aren't ambiguous.

This reverts commit r205857 which reverted r205857.

llvm-svn: 205914
2014-04-09 17:04:27 +00:00
Samuel Benzaquen fec969a0af Inject unique_ptr/shared_ptr into the test instead of using <memory>
Summary:
Inject unique_ptr/shared_ptr into the test instead of using <memory>
Libraries might not be present on tests.
This fixes the break introduces at rL205854.

Reviewers: klimek

CC: cfe-commits

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

llvm-svn: 205913
2014-04-09 16:50:38 +00:00
Ed Maste 5b031ebc70 Use the default TID format in curses UI
TIDs are conventionally shown as decimal values on FreeBSD and Linux.
Thus, use the ${thread.id%tid} format string to display the thread ID,
instead of a fixed hex format.

llvm.org/pr19380

llvm-svn: 205912
2014-04-09 16:39:30 +00:00
David Majnemer 3bb6073919 obj2yaml: Don't crash if the characteristics field is zero
obj2yaml would fail when seeing a Weak External auxiliary record with a
characteristics field holding zero instead of one of
IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY, IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY,
or IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY.

llvm-svn: 205911
2014-04-09 16:38:15 +00:00
Jim Cownie 33f7b24d9f Add the offload directory which contains the code needed to support
OpenMP 4.0 "target" directives. This will need more work for
generality, but we want to get it out and visible to the community.

llvm-svn: 205909
2014-04-09 15:40:23 +00:00
Justin Holewinski 30d56a7b86 [NVPTX] Add preliminary intrinsics and codegen support for textures/surfaces
This commit adds intrinsics and codegen support for the surface read/write and texture read instructions that take an explicit sampler parameter. Codegen operates on image handles at the PTX level, but falls back to direct replacement of handles with kernel arguments if image handles are not enabled. Note that image handles are explicitly disabled for all target architectures in this change (to be enabled later).

llvm-svn: 205907
2014-04-09 15:39:15 +00:00
Justin Holewinski 9d852a8e08 [NVPTX] Add support for addrspacecast in global variable initializers, including emitting generic() when casting to address space 0.
llvm-svn: 205906
2014-04-09 15:39:11 +00:00
Justin Holewinski 5959695a16 [NVPTX] Add query support for read-write images and managed variables
This also fixes a bug in the annotation cache where the cache will not be cleared between modules if multiple modules are compiled in the same process.

llvm-svn: 205905
2014-04-09 15:38:52 +00:00
Ed Maste 6562983234 Do not rely on invalid pthread API use in thread test
Calling mutex_lock from one thread and then mutex_unlock from another is
not permitted.  Replace the awkward mutex usage with a mutex and
condition variable.

llvm.org/pr18061                                                            

llvm-svn: 205900
2014-04-09 14:48:25 +00:00
Alp Toker 16f98b255d Fix some doc and comment typos
llvm-svn: 205899
2014-04-09 14:47:27 +00:00
Bradley Smith 246b0b617d [ARM64] Change SYS without a register to an alias to make disassembling more consistant.
llvm-svn: 205898
2014-04-09 14:44:58 +00:00
Bradley Smith 2cef19a2e6 [ARM64] Correctly disassemble ISB operand as ISB not DBarrier.
llvm-svn: 205897
2014-04-09 14:44:54 +00:00