Commit Graph

162151 Commits

Author SHA1 Message Date
Aaron Ballman 18a7838e3e Implemented DefaultIntArgument in the table generator and start using it in semantic analysis. Removes some magic numbers.
llvm-svn: 195287
2013-11-21 00:28:23 +00:00
Nick Kledzik 7cd45f29b2 YAML I/O add support for validate()
MappingTrait template specializations can now have a validate() method which 
performs semantic checking. For details, see <http://llvm.org/docs/YamlIO.html>.

llvm-svn: 195286
2013-11-21 00:28:07 +00:00
Nick Kledzik 4761c60eef revert r194655
llvm-svn: 195285
2013-11-21 00:20:10 +00:00
Rui Ueyama 90bcd114ac Rename allocateString -> allocate.
llvm-svn: 195284
2013-11-21 00:17:31 +00:00
Hans Wennborg feedf8515b [-cxx-abi microsoft] Emit linkonce_odr definitions for declarations of static data members with inline initializers (PR17689)
This makes Clang emit a linkonce_odr definition for 'val' in the code below,
to be compatible with MSVC-compiled code:

  struct Foo {
    static const int val = 1;
  };

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

llvm-svn: 195283
2013-11-21 00:15:56 +00:00
Rui Ueyama 9c9d7d14d1 Reverse the condition for readability.
llvm-svn: 195282
2013-11-20 23:54:52 +00:00
Rui Ueyama 9114439df2 Move member functions to its own cpp file.
llvm-svn: 195281
2013-11-20 23:51:41 +00:00
Richard Smith 698875aec6 Fix new check for missing semicolon after struct definition to deal with the
case where the type in the following declaration is specified as a template-id,
and refactor for clarity.

llvm-svn: 195280
2013-11-20 23:40:57 +00:00
Rui Ueyama 56215d84dc Remove blank return at the end of a function returning void.
llvm-svn: 195279
2013-11-20 23:12:03 +00:00
Fariborz Jahanian 1f92b7f7c4 ObjectiveC ARC. warn in presense of __bridge casting to
or from a toll free bridge cast. // rdar://15454846

llvm-svn: 195278
2013-11-20 22:55:41 +00:00
Aaron Ballman b80f94b41c There is no such thing as __declspec(ms_struct), this is a GNU attribute. Switched the attribute to have the proper spelling, gave it a subject, updated the warning to be more accurate, and updated the test case as appropriate.
llvm-svn: 195277
2013-11-20 22:22:04 +00:00
Rui Ueyama f8b41867c8 [PECOFF] Recognize but ignore /implib and /safeseh for now.
So that the LLD won't print error message saying that it couldn't find
/implib or /safeseh files.

llvm-svn: 195276
2013-11-20 21:57:30 +00:00
Aaron Ballman 07e2764ce7 Removed a duplicate diagnostic related to attribute subjects for thread safety annotations, and replaced it with the more general attribute diagnostic. Updated the test case in the one instance where wording changed. No functional change intended.
llvm-svn: 195275
2013-11-20 21:41:42 +00:00
Aaron Ballman da9c089054 Updated the thread safety attribute definitions to have subjects defined. These are based off what SemaDeclAttr.cpp is checking for in terms of diagnostic reporting. No functional change intended.
llvm-svn: 195274
2013-11-20 21:40:13 +00:00
Greg Clayton fbb7634934 Expose SBPlatform through the public API.
Example code:

remote_platform = lldb.SBPlatform("remote-macosx"); 
remote_platform.SetWorkingDirectory("/private/tmp")
debugger.SetSelectedPlatform(remote_platform)

connect_options = lldb.SBPlatformConnectOptions("connect://localhost:1111"); 
err = remote_platform.ConnectRemote(connect_options)
if err.Success():
    print >> result, 'Connected to remote platform:'
    print >> result, 'hostname: %s' % (remote_platform.GetHostname())
    src = lldb.SBFileSpec("/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework", False)
    dst = lldb.SBFileSpec()
    # copy src to platform working directory since "dst" is empty
    err = remote_platform.Install(src, dst);
    if err.Success():
        print >> result, '%s installed successfully' % (src)
    else:
        print >> result, 'error: failed to install "%s": %s' % (src, err)


Implemented many calls needed in lldb-platform to be able to install a directory that contains symlinks, file and directories.

The remote lldb-platform can now launch GDB servers on the remote system so that remote debugging can be spawned through the remote platform when connected to a remote platform.

The API in SBPlatform is subject to change and will be getting many new functions.

llvm-svn: 195273
2013-11-20 21:07:01 +00:00
Hal Finkel 884bde3031 PPC popcnt[dw] do not have record forms
The instruction definitions incorrectly specified that popcntd and popcntw have
record forms; they do not. This mistake was causing invalid code generation.

llvm-svn: 195272
2013-11-20 20:54:55 +00:00
Hal Finkel 52261a6545 Add loop rerolling code owner
I am the code owner of the loop reroller.

llvm-svn: 195271
2013-11-20 20:54:33 +00:00
Rui Ueyama e05b629d39 Use NativeReferenceIvarsV2 if necessary.
NativeReferenceIvarsV1 cannot handle more than 65535 relocation targets
because its field to point to the target table is of type uint16_t. Because
of that limitation, the LLD couldn't link a file containing more than 65535
relocations. 65535 is not a big number - the LLD couldn't even link itself
with V1.

This patch solves the issue by adding NativeReferenceIvarsV2 support. The
new structure has more bits for the target table, so it can handle a large
number of relocatinos.

V2 structure is larger than V1. In order to prevent file bloating, V2 format
is used only when the resulting file cannot be represented in V1 format. The
writer and the reader support both V1 and V2 formats.

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

llvm-svn: 195270
2013-11-20 20:54:18 +00:00
Rui Ueyama 70f11d7589 Fix Weak External symbol handling.
The fallback atom was used only when it's searching for a symbol in a library;
if an undefined symbol was not found in a library, the LLD looked for its
fallback symbol in the library.

Although it worked in most cases, because symbols with fallbacks usually occur
only in OLDNAMES.LIB (a standard library), that behavior was incompatible with
link.exe. This patch fixes the issue so that the semantics is the same as
MSVC's link.exe

The new (and correct, I believe) behavior is this:

 - If there's no definition for an undefined atom, replace the undefined atom
   with its fallback and then proceed (e.g. look in the next file or stop
   linking as usual.)

Weak External symbols are underspecified in the Microsoft PE/COFF spec. However,
as long as I observed the behavior of link.exe, this seems to be what we want
for compatibility.

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

llvm-svn: 195269
2013-11-20 20:51:55 +00:00
Justin Holewinski f9329ff650 [NVPTX] Update ABI handling
For PTX, we want the target to handle struct returns directly.

llvm-svn: 195268
2013-11-20 20:35:34 +00:00
Manman Ren 17bdb0f815 Set default Dwarf Version for -gline-tables-only on Darwin to 2.
We are still using Dwarf Version 2 for Darwin systems, make it consistent
with -gline-tables-only.

This should fix an internal buildbot.

llvm-svn: 195267
2013-11-20 20:22:14 +00:00
Benjamin Kramer c8160d6523 MachineBlockPlacement: Strengthen the source order bias when picking an exit block.
We now only allow breaking source order if the exit block frequency is
significantly higher than the other exit block. The actual bias is
currently under a flag so the best cut-off can be found; the flag
defaults to the old behavior. The idea is to get some benchmark coverage
over different values for the flag and pick the best one.

When we require the new frequency to be at least 20% higher than the old
frequency I see a 5% speedup on zlib's deflate when compressing a random
file on x86_64/westmere. Hal reported a small speedup on Fhourstones on
a BG/Q and no regressions in the test suite.

The test case is the full long_match function from zlib's deflate. I was
reluctant to add it for previous tweaks to branch probabilities because
it's large and potentially fragile, but changed my mind since it's an
important use case and more likely to break with all the current work
going into the PGO infrastructure.

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

llvm-svn: 195265
2013-11-20 19:08:44 +00:00
Fariborz Jahanian 91fb0be96a ObjectiveC ARC. Better checking of toll free briding
from qualified-id objects to CF types with 
objc_bridge annotation. // rdar://15454846

llvm-svn: 195264
2013-11-20 19:01:50 +00:00
David Blaikie beee345ab0 DwarfCompileUnit: Initialize DebugInfoOffset.
While not strictly necessary (the class has an invariant that
"setDebugInfoOffset" is called before "getDebugInfoOffset" - anyone
client that actually gets the default zero offset is buggy/broken) this
is consistent with the code as originally written and the removal of the
initialization was an accident in r195166.

Suggested by Manman Ren.

llvm-svn: 195263
2013-11-20 18:52:39 +00:00
David Blaikie bcb418e56f CR feedback for r195166: Add comments regarding type unit mapping and type units disabling cross-CU sharing.
Changes suggested by Manman Ren.

llvm-svn: 195262
2013-11-20 18:40:16 +00:00
Chandler Carruth c74010df48 Make the moved-from SmallPtrSet be a valid, empty, small-state object.
Enhance the tests to actually require moves in C++11 mode, in addition
to testing the moved-from state. Further enhance the tests to cover
copy-assignment into a moved-from object and moving a large-state
object. (Note that we can't really test small-state vs. large-state as
that isn't an observable property of the API really.) This should finish
addressing review on r195239.

llvm-svn: 195261
2013-11-20 18:29:56 +00:00
Chandler Carruth 6d888bc0da Add a test for assignment operator behavior which was changed in
r195239, as well as a comment about the fact that assigning over
a moved-from object was in fact tested. Addresses some of the review
feedback on r195239.

llvm-svn: 195260
2013-11-20 18:21:25 +00:00
Ted Kremenek cb42dbe7ad Refine 'deprecated' checking for Objective-C classes/methods.
- If a deprecated class refers to another deprecated class, do not warn.
- @implementations of a deprecated class can refer to other deprecated things.

Fixes <rdar://problem/15407366> and <rdar://problem/15466783>.

llvm-svn: 195259
2013-11-20 17:24:03 +00:00
Alexander Kornienko 3cfa973978 Added an option to allow short function bodies be placed on a single line.
Summary:
The AllowShortFunctionsOnASingleLine option now controls short function
body placement on a single line independent of the BreakBeforeBraces option.
Updated tests using BreakBeforeBraces other than BS_Attach.

Addresses http://llvm.org/PR17888

Reviewers: klimek, djasper

Reviewed By: klimek

CC: cfe-commits, klimek

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

llvm-svn: 195256
2013-11-20 16:33:05 +00:00
Enea Zaffanella d8430928f1 When wrapping lazily generated builtins in an extern "C" context,
flag the LinkageSpecDecl as being implicitly generated too.

llvm-svn: 195255
2013-11-20 15:41:05 +00:00
Colin Riley 61979ccad6 Fix MSVC build
The demangler added in r193708 from cxa_demangle.cpp uses language features which are not supported by the latest visual studio. In order to preserve the msvc build, this patch restores the previous (non)functionality in windows under msvc by disabling the demangler. 

llvm-svn: 195254
2013-11-20 15:19:08 +00:00
Daniel Jasper 48437ce508 Simplify fix proposed in r195240.
llvm-svn: 195253
2013-11-20 14:54:39 +00:00
Daniel Sanders f93e8152c4 [mips][msa] Pseudo instructions require HasMSA too. Inherit from MSAPseudo instead of MipsPseudo
There's no test case for this commit. This is because it is doubtful that the
incorrect behaviour can actually trigger. When MSA is not enabled, the type
legalizer should have eliminated all occurrences of patterns the affected
pseudo-instruction could possibly match before instruction selection occurs.

llvm-svn: 195252
2013-11-20 14:32:28 +00:00
Alexander Kornienko 7c9c050769 Support for JavaScript === and !== operators.
Reviewers: klimek, djasper

Reviewed By: klimek

CC: cfe-commits, klimek

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

llvm-svn: 195251
2013-11-20 14:30:26 +00:00
Evgeniy Stepanov 3e29c6bf22 [asan] Fix OSX tests.
llvm-svn: 195250
2013-11-20 14:21:56 +00:00
Simon Atanasyan 5c5b5daab2 [Mips] Take in account the -mfp64 command line option when build paths
to the crt*.o files, libraries and headers for the MIPS FSFS toolchain.

llvm-svn: 195249
2013-11-20 13:53:20 +00:00
Daniel Sanders 43b5f572fa FileCheck: fix a bug with multiple --check-prefix options. Similar to r194565
Summary:
Directives are being ignored, when they occur between a partial-word false
match and any match on another prefix.

For example, with FOO and BAR prefixes:
   _FOO
   FOO: foo
   BAR: bar
FileCheck incorrectly matches:
   fog
   bar

This happens because FOO falsely matched as a partial word at '_FOO' and was
ignored while BAR matched at 'BAR:'. The match of BAR is incorrectly returned
as the 'first match' causing the FOO directive to be discarded.

Fixed this the same way as r194565 (D2166) did for a similar test case.
The partial-word false match should be counted as a match for the purposes of
finding the first match of a prefix, but should be returned as a false match
using CheckTy::CheckNone so that it isn't treated as a directive.

Fixes PR17995

Reviewers: samsonov, arsenm

Reviewed By: samsonov

CC: llvm-commits

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

llvm-svn: 195248
2013-11-20 13:25:05 +00:00
NAKAMURA Takumi a5997c4e4a llvm/CMakeLists.txt: Update LLVM_VERSION_MINOR to 5.
llvm-svn: 195247
2013-11-20 13:11:48 +00:00
Evgeniy Stepanov 0958ecca7e [msan] Tweak io_submit syscall hook.
llvm-svn: 195246
2013-11-20 13:04:23 +00:00
Daniel Sanders 6b97d604ff [mips][msa] Remove unused instruction class MSA_I8_X_DESC_BASE
llvm-svn: 195245
2013-11-20 13:01:10 +00:00
Evgeniy Stepanov 584fd96e9e [msan] Unpoison memory that is returned to the OS and flush its shadow.
llvm-svn: 195244
2013-11-20 12:51:14 +00:00
Evgeniy Stepanov 115ef14548 [asan] Test that LargeAllocator unpoisons memory before releasing it to the OS.
llvm-svn: 195243
2013-11-20 12:49:53 +00:00
Colin Riley 4442546be9 Test commit. Capitalize 'os'.
llvm-svn: 195242
2013-11-20 12:35:52 +00:00
Chandler Carruth c0bfa8c231 [PM] Add the preservation system to the new pass manager.
This adds a new set-like type which represents a set of preserved
analysis passes. The set is managed via the opaque PassT::ID() void*s.
The expected convenience templates for interacting with specific passes
are provided. It also supports a symbolic "all" state which is
represented by an invalid pointer in the set. This state is nicely
saturating as it comes up often. Finally, it supports intersection which
is used when finding the set of preserved passes after N different
transforms.

The pass API is then changed to return the preserved set rather than
a bool. This is much more self-documenting than the previous system.
Returning "none" is a conservatively correct solution just like
returning "true" from todays passes and not marking any passes as
preserved. Passes can also be dynamically preserved or not throughout
the run of the pass, and whatever gets returned is the binding state.
Finally, preserving "all" the passes is allowed for no-op transforms
that simply can't harm such things.

Finally, the analysis managers are changed to instead of blindly
invalidating all of the analyses, invalidate those which were not
preserved. This should rig up all of the basic preservation
functionality. This also correctly combines the preservation moving up
from one IR-layer to the another and the preservation aggregation across
N pass runs. Still to go is incrementally correct invalidation and
preservation across IR layers incrementally during N pass runs. That
will wait until we have a device for even exposing analyses across IR
layers.

While the core of this change is obvious, I'm not happy with the current
testing, so will improve it to cover at least some of the invalidation
that I can test easily in a subsequent commit.

llvm-svn: 195241
2013-11-20 11:31:50 +00:00
Manuel Klimek 06c84f2e07 Fix bug where optimization would lead to strange line breaks.
Before:
  void f() {
    CHECK_EQ(aaaa, (
                       *bbbbbbbbb)->cccccc)
        << "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";
  }

After:
  void f() {
    CHECK_EQ(aaaa, (*bbbbbbbbb)->cccccc)
        << "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";
  }

llvm-svn: 195240
2013-11-20 11:20:32 +00:00
Chandler Carruth 55758e9691 Give SmallPtrSet move semantics when we have R-value references.
Somehow, this ADT got missed which is moderately terrifying considering
the efficiency of move for it.

The code to implement move semantics for it is pretty horrible
currently but was written to reasonably closely match the rest of the
code. Unittests that cover both copying and moving (at a basic level)
added.

llvm-svn: 195239
2013-11-20 11:14:33 +00:00
NAKAMURA Takumi 3dedf827f8 X86ISelLowering.cpp: Mark a variable VT as LLVM_ATTRIBUTE_UNUSED. [-Wunused-variable]
llvm-svn: 195238
2013-11-20 10:55:22 +00:00
NAKAMURA Takumi f2392ebb94 Whitespace.
llvm-svn: 195237
2013-11-20 10:55:15 +00:00
Bill Wendling 0a794a4b78 Update to next release numbers.
llvm-svn: 195236
2013-11-20 10:13:37 +00:00
Bill Wendling 70d39e6fa3 Update to reflect the next release.
llvm-svn: 195235
2013-11-20 10:10:50 +00:00