Commit Graph

169100 Commits

Author SHA1 Message Date
Alexander Kornienko b4a8079bf0 Use more specific checks filter in the test.
llvm-svn: 203097
2014-03-06 08:31:03 +00:00
Elena Demikhovsky 8fae565f08 AVX-512: fixed comressed displacement - by Robert Khazanov
llvm-svn: 203096
2014-03-06 08:15:35 +00:00
Ted Kremenek 6999d02587 [-Wunreachable-code] Refine treating all branches of 'switch' as reachable, which includes those with all cases covered but with no 'default:'.
llvm-svn: 203094
2014-03-06 08:09:00 +00:00
Yaron Keren cf96c257f4 Cleaning up two more pre-Visual C++ 2012 build hacks.
llvm-svn: 203093
2014-03-06 08:05:43 +00:00
NAKAMURA Takumi e1879a90f8 CodeGenObjC/instr-profile.m: Add -target darwin to appease bots.
This expected;
  ; Function Attrs: uwtable
  define internal void @"\01+[A foreach:]"(i8* %self, i8* %_cmd, %0* %array) #0 {

But the Name is mangled on other hosts; (x86_64-unknown-unknown)
  ; Function Attrs: nounwind uwtable
  define internal void @_c_A__foreach_(i8* %self, i8* %_cmd, %1* %array) #0 {

llvm-svn: 203092
2014-03-06 07:29:30 +00:00
Ted Kremenek ec2dc73e86 [-Wunreachable-code] don't warn about dead 'return <string literal>' dominated by a 'noreturn' call, where literal becomes an std::string.
I have mixed feelings about this one.  It's used all over the codebase,
and is analogous to the current heuristic for ordinary C string literals.

This requires some ad hoc pattern matching of the AST.  While the
test case mirrors what we see std::string in libc++, it's not really
testing the libc++ headers.

llvm-svn: 203091
2014-03-06 06:50:46 +00:00
Bob Wilson b3fd21a42f Attempt to fix buildbots by dropping the -LABEL from some FileCheck patterns.
llvm-svn: 203090
2014-03-06 06:49:37 +00:00
Ahmed Charles de14dcc24f Fix warnings about an variable only used in asserts.
llvm-svn: 203089
2014-03-06 06:35:46 +00:00
Jason Molenda a8ff543c28 When a client asks for a queue pending item's extended backtrace,
hold a strong pointer to that extended backtrace thread in the Process
just like we do for asking a thread's extended backtrace.
Also, give extended backtrace threads an invalid ThreadIndexID number.
We'll still give them valid thread_id's.  Clients who want to know the
original thread's IndexID can call GetExtendedBacktraceOriginatingIndexID().
<rdar://problem/16126034> 

llvm-svn: 203088
2014-03-06 06:31:18 +00:00
Alexey Bataev 568a833f68 [OPENMP] Clause 'num_threads'
llvm-svn: 203087
2014-03-06 06:15:19 +00:00
Ahmed Charles f6863f1aab Add <cstddef> for use of std::ptrdiff_t.
llvm-svn: 203086
2014-03-06 06:13:54 +00:00
Bob Wilson 5ec8fe19cf PGO: add instrumentation for Objective-C methods.
llvm-svn: 203085
2014-03-06 06:10:02 +00:00
Ahmed Charles 0a685a9a52 Fix break by qualifying ptrdiff_t with std::.
llvm-svn: 203084
2014-03-06 06:05:26 +00:00
Ahmed Charles 56440fd820 Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

llvm-svn: 203083
2014-03-06 05:51:42 +00:00
David Blaikie 47c254beb7 DebugInfo: Tag units as having been indexed in GNU pubnames by using a DW_AT_GNU_pubnames of DW_FORM_flag(_present) rather than sec_offsets to the pubnames/types sections
This is consistent with GDB ToT and reduces the number of relocations in
(type and compile) units, substantially reducing relocations and debug
size in fission + type units builds.

llvm-svn: 203082
2014-03-06 05:47:39 +00:00
Alexey Bataev 186b28a8cf [OPENMP] Added option -fopenmp=libiomp5|libgomp
llvm-svn: 203081
2014-03-06 05:43:53 +00:00
Ted Kremenek 90097491ed Remove 'break' dominated by 'return' in 'EmitBuiltinExpr'.
llvm-svn: 203080
2014-03-06 05:37:38 +00:00
Ted Kremenek 7bceca1fcf Remove 2 dead 'break' statements. The 'break' usage in this switch is inconsistent, making this hard to see.
llvm-svn: 203079
2014-03-06 05:37:35 +00:00
Ted Kremenek ad71fc6104 Remove dead return in Parser::MayBeDesignationStart().
llvm-svn: 203078
2014-03-06 05:37:32 +00:00
Ted Kremenek d8c64f573d Remove dead return in BugReporter (found via -Wunreachable-code).
llvm-svn: 203077
2014-03-06 05:37:28 +00:00
Karthik Bhat daa8cd10d9 Allow constant folding of copysign
llvm-svn: 203076
2014-03-06 05:32:52 +00:00
Bob Wilson da1ebedeea PGO: Use the main file name to help distinguish functions with local linkage.
In addition, for all functions, use the name from the llvm::Function to
identify the function in the profile data. Compute that "function name",
including the file name for local functions, once when assigning the PGO
counters and store it in the CodeGenPGO class.

Move the code to add InlineHint and Cold attributes out of StartFunction(),
because the "function name" string isn't available at that point.

llvm-svn: 203075
2014-03-06 04:55:41 +00:00
Bob Wilson d0b7824ece PGO: Rename variables to avoid referring to the "MangledName" of a function.
For C++ functions, we will continue to use the mangled name to identify
functions in the PGO profile data, but this name is confusing for things like
Objective-C methods. For functions with local linkage, we're also going to
include the file name to help distinguish those functions, so this changes to
use more generic variable names.

No functional changes.

llvm-svn: 203074
2014-03-06 04:55:37 +00:00
Bob Wilson 68f475faf7 Refactor PGO code in preparation for handling non-C/C++ code.
Move the PGO.assignRegionCounters() call out of StartFunction, because that
function is called from many places where it does not make sense to do PGO
instrumentation (e.g., compiler-generated helper functions). Change several
functions to take a StringRef argument for the unique name associated with
a function, so that the name can be set differently for things like Objective-C
methods and block literals.

llvm-svn: 203073
2014-03-06 04:55:35 +00:00
Bob Wilson 749ebc7f33 PGO: don't emit counter increment if no counters have been allocated.
I hit this while debugging another issue where my sources were in an
inconsistent state, so I don't have a testcase. Regardless, this check is
simpler and more direct than checking if the option is enabled.

llvm-svn: 203072
2014-03-06 04:55:28 +00:00
Chandler Carruth 3c57aa4111 [Modules] Fix a layering issue that is actually impacting the modules
selfhost.

The 'Core.h' C-API header is part of the IR LLVM library. (One might
even argue it should be called IR.h, but that's a separate point.) We
can't include it into a Support header without violating the layering,
and in a way that breaks modules. MemoryBuffer's opaque C type was being
defined in the Core.h C-API header despite being in the Support library,
and thus we ended up with this weird issue.

It turns out that there were other constructs from the Support library
in the Core.h header. This patch lifts all of them into Support.h and
then includes that into Core.h.

The only possible fallout is if someone was including Support.h and
relying on Core.h to be visible for their own uses. Considering the
narrow interface actually provided by the C-API for the Support library,
this seems a very, very unlikely mistake.

llvm-svn: 203071
2014-03-06 04:13:12 +00:00
Peter Collingbourne 8845dbd798 Do not derive __gnu_cxx::hash<T> from std::hash<T>.
Instead, define explicit specializations for the basic types listed in
the SGI documentation. This solves two problems:

 1) Helps avoid silent ODR violations caused by the absence of a
    user-supplied __gnu_cxx::hash specialization in cases where a std::hash
    specialization exists (e.g. for std::string).

 2) __gnu_cxx::hash semantics are slightly different to those of
    std::hash (for example, the former may dereference a pointer argument)
    so it is inappropriate for __gnu_cxx::hash to receive std::hash
    specializations by default.

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

llvm-svn: 203070
2014-03-06 04:11:10 +00:00
Chandler Carruth d1163aa59e [Layering] Move GVMaterializer.h into the IR library where its
implementation already lived.

After this commit, the only IR-library headers in include/llvm/* are
ones related to the legacy pass infrastructure that I'm planning to
leave there until the new one is farther along.

The only other headers at the top level are linking and initialization
aids that aren't really libraries but just headers.

llvm-svn: 203069
2014-03-06 03:50:29 +00:00
Jim Ingham 82536bdbbf Temporarily disable the JIT loading detector till we figure out why it crashes when lldb follows through exec's...
llvm-svn: 203068
2014-03-06 03:47:34 +00:00
Chandler Carruth 00fa3f7bf1 [Layering] Update include of Linker.h to match its move to a Linker
subdirectory in LLVM r203065.

llvm-svn: 203067
2014-03-06 03:46:44 +00:00
Chandler Carruth 8a71625ad1 [cleanup] Re-sort the standard library include lines.
llvm-svn: 203066
2014-03-06 03:43:04 +00:00
Chandler Carruth 6cc07df4ec [Layering] Sink Linker.h into a Linker subdirectory to make it
consistent with every other sub-library header in LLVM.

llvm-svn: 203065
2014-03-06 03:42:23 +00:00
Chandler Carruth 7da14f1ab9 [Layering] Move InstVisitor.h into the IR library as it is pretty
obviously coupled to the IR.

llvm-svn: 203064
2014-03-06 03:23:41 +00:00
Richard Smith 9d100866f2 Fix crash if a submodule overrides one of its own macros, and add support for
submodule macro overriding within the same top-level module (necessary for the
testcase to be remotely reasonable). Incidentally reduces the number of libc++
testsuite regressions with modules enabled from 7 to 6.

llvm-svn: 203063
2014-03-06 03:16:27 +00:00
Richard Trieu 1a1e818b13 Fix test from r203061
llvm-svn: 203062
2014-03-06 02:28:22 +00:00
Richard Trieu fe771c071a Suppress diagnostics during name lookup for absolute value type.
llvm-svn: 203061
2014-03-06 02:25:04 +00:00
Owen Anderson bc46f3c15d Change the tag on this iterator to bidir and implement enough operators to make it true.
It ought to be possible to make this truly random access if anyone cares enough.

llvm-svn: 203060
2014-03-06 02:02:43 +00:00
Rafael Espindola d0bb55a1d4 Use private linkage for remaining GlobalVariables with private names.
This patch changes the remaining GlobalVariables using "\01L" and
"\01l" prefixes to use private linkage. What is strange about them is
that they currently use WeakAnyLinkage. There is no comment stating
why and that is really odd since the symbols are completely hidden, so
it doesn't make sense for them to be weak.

Clang revisions like r63329, r63408, r63770, r65761 set the linkage to
weak, but don't say why. I suspect they were just copying llvm-gcc.

In llvm-gcc I found r58599 and r56322 that set DECL_WEAK, but they
were just syncing from the apple gcc. I am not exactly sure what that
means, since the last commit to
svn://gcc.gnu.org/svn/gcc/branches/apple was in 2006, 2 years earlier.

In summary, I have no idea why weak linkage was being used :-(

To quote John McCall, "Let’s try without it and see" :-)

llvm-svn: 203059
2014-03-06 01:57:34 +00:00
Owen Anderson cab4afd7c6 Fix issues in the NamedMDNode operand iterator, including those pointed out by
Chandler in review.

llvm-svn: 203058
2014-03-06 01:51:01 +00:00
David Blaikie c3d9e9e55f DebugInfo: Shrink pubnames/pubtypes in the presence of type units by only emitting pub sections for compile units
llvm-svn: 203057
2014-03-06 01:42:00 +00:00
Raul E. Silvera 57a9850961 Update clang test to cover for new treatment of intrinsics as readnone.
llvm-svn: 203056
2014-03-06 01:37:10 +00:00
Eric Christopher 6bb07f6024 Add some helpful comments on DIEValue types that we expect to hash.
llvm-svn: 203055
2014-03-06 01:32:56 +00:00
Hal Finkel 6daf2aa140 The PPC global base register cannot be r0
The global base register cannot be r0 because it might end up as the first
argument to addi or addis. Fixes PR18316.

I don't have a small stable test case.

llvm-svn: 203054
2014-03-06 01:28:23 +00:00
Owen Anderson 9a6f50f61c Add a iterator and interator_range interface to the operands of a NamedMDNode.
The iterator is a little complex because we don't want to expose the implementation
details (TrackingVH) of the operand vector to clients.

llvm-svn: 203053
2014-03-06 01:12:56 +00:00
Rafael Espindola 5d117f3742 Construct GlobalValues with the correct linkage instead of using setLinkage.
llvm-svn: 203052
2014-03-06 01:10:46 +00:00
Ted Kremenek 7549f0f9bf [-Wunreachable-code] Handle idiomatic do...while() with an uninteresting condition.
Sometimes do..while() is used to create a scope that can be left early.
In such cases, the unreachable 'while()' test is not usually interesting
unless it actually does something that is observable.

llvm-svn: 203051
2014-03-06 01:09:45 +00:00
Richard Trieu 532018f7a5 Change the color of comment nodes from bright yellow to blue. Bright yellow on
a white background is difficult to read.  Also include a chart showing which
colors are used by which elements in the AST dump.

llvm-svn: 203050
2014-03-06 01:09:03 +00:00
Chandler Carruth 6b96c2447e [Layering] Update include of DebugInfo.h which moved to the IR library
in LLVM r203046.

llvm-svn: 203049
2014-03-06 00:47:27 +00:00
Chandler Carruth 0654bacac3 [Layering] Update include of DebugInfo.h which moved to the IR library
in LLVM r203046.

llvm-svn: 203047
2014-03-06 00:46:56 +00:00
Chandler Carruth 9a4c9e597b [Layering] Move DebugInfo.h into the IR library where its implementation
already lives.

llvm-svn: 203046
2014-03-06 00:46:21 +00:00