Commit Graph

162207 Commits

Author SHA1 Message Date
Alexander Kornienko 9aa62407f6 Better implementation of JavaScript === and !== operators.
Summary:
Now based on token merging. Now they are not only prevented from being
split, but are actually formatted as comparison operators.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits, klimek

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

llvm-svn: 195354
2013-11-21 12:43:57 +00:00
Tim Northover 5bb34ca4df ARM: define & use __ARM_NEON on ARM32 (as per ACLE)
There seem to be quite a few references to the old macro __ARM_NEON__ on the
internet, so I don't think it's a good idea to remove it entirely (at least
yet), but the canonical name does not have the trailing underscores so we
should use that ourselves.

llvm-svn: 195353
2013-11-21 12:36:34 +00:00
Kostya Serebryany 67968632ba [asan] rename contiguous-container-buffer-overflow (too long) to container-overflow
llvm-svn: 195352
2013-11-21 12:23:52 +00:00
Dmitry Vyukov 5f1a783914 tsan: deflake tests
the tests produce episodic flakes
the hypothesis is that it's due to our "racy" race detection algorithm
sleeps should remove the flakes

llvm-svn: 195351
2013-11-21 12:23:17 +00:00
Evgeniy Stepanov 1bdf5c93e1 [msan] Test for r195349.
llvm-svn: 195350
2013-11-21 12:01:07 +00:00
Evgeniy Stepanov cb5bdffc4e [msan] Propagate condition origin in select instruction.
llvm-svn: 195349
2013-11-21 12:00:24 +00:00
Dmitry Vyukov 70fcec46e9 tsan: remove debug output from test
llvm-svn: 195347
2013-11-21 11:50:45 +00:00
Dmitry Vyukov 5fa72d4c3f tsan: add -lm to output test build script
as common sanitizer interceptors now require it

llvm-svn: 195346
2013-11-21 11:49:08 +00:00
Dmitry Vyukov 4ca8ee692e tsan: fix handling of setjmp
It's incorrect to take address of setjmp,
because it may not (ligally) present in libc.
Fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59188

llvm-svn: 195345
2013-11-21 11:48:29 +00:00
Tobias Grosser cf7f6db300 cmake: Add option POLLY_USE_CLOOG
This allows to build Polly without CLooG.

llvm-svn: 195344
2013-11-21 11:48:07 +00:00
Daniel Sanders 6e664bcef3 [mips][msa/dsp] Only do DSP combines if DSP is enabled.
Fixes a crash (null pointer dereferenced) when MSA is enabled.

llvm-svn: 195343
2013-11-21 11:40:14 +00:00
Evgeniy Stepanov b55c7e7cc4 Use multiple filecheck prefixes in msan instrumentation tests.
llvm-svn: 195342
2013-11-21 11:37:16 +00:00
NAKAMURA Takumi 66c95430b8 Whitespace.
llvm-svn: 195341
2013-11-21 11:08:31 +00:00
Chandler Carruth 78c4c807bb [PM] Fix typo and trailing space.
llvm-svn: 195340
2013-11-21 11:04:53 +00:00
NAKAMURA Takumi 43aa939625 Revert r195317 (and r195333), "Teach ISel not to optimize 'optnone' functions."
It broke, at least, i686 target. It is reproducible with "llc -mtriple=i686-unknown".

FYI, it didn't appear to add either "-O0" or "-fast-isel".

llvm-svn: 195339
2013-11-21 10:55:15 +00:00
Chandler Carruth 2846e9ef15 [PM] Widen the interface for invalidate on an analysis result now that
it is completely optional, and sink the logic for handling the preserved
analysis set into it.

This allows us to implement the delegation logic desired in the proxy
module analysis for the function analysis manager where if the proxy
itself is preserved we assume the set of functions hasn't changed and we
do a fine grained invalidation by walking the functions in the module
and running the invalidate for them all at the manager level and letting
it try to invalidate any passes.

This in turn makes it blindingly obvious why we should hoist the
invalidate trait and have two collections of results. That allows
handling invalidation for almost all analyses without indirect calls and
it allows short circuiting when the preserved set is all.

llvm-svn: 195338
2013-11-21 10:53:05 +00:00
Peter Zotov 05c091455e [OCaml] Unbreak make install by providing ocamldoc target
llvm-svn: 195336
2013-11-21 10:10:16 +00:00
Kostya Serebryany ef26f4ed56 add 'REQUIRES: asserts' to a test that uses 'llc -debug'; this fixes the no-asserts build
llvm-svn: 195333
2013-11-21 09:28:16 +00:00
Chandler Carruth f6e9986a41 [PM] Add support for using SFINAE to reflect on an analysis's result
type and detect whether or not it provides an 'invalidate' member the
analysis manager should use.

This lets the overwhelming common case of *not* caring about custom
behavior when an analysis is invalidated be the the obvious default
behavior with no code written by the author of an analysis. Only when
they write code specifically to handle invalidation does it get used.

Both cases are actually covered by tests here. The test analysis uses
the default behavior, and the proxy module analysis actually has custom
behavior on invalidation that is firing correctly. (In fact, this is the
analysis which was the primary motivation for having custom invalidation
behavior in the first place.)

llvm-svn: 195332
2013-11-21 09:10:21 +00:00
Kostya Serebryany 53c51a1675 [tsan] use FileCheck in race_on_speculative_load.cc
llvm-svn: 195331
2013-11-21 09:09:47 +00:00
Ana Pazos 9ac2fc85d2 Implemented Neon scalar vdup_lane intrinsics.
Fixed scalar dup alias and added test case.

llvm-svn: 195330
2013-11-21 08:16:15 +00:00
Ana Pazos dbd1a22496 Implemented Neon scalar vdup_lane intrinsics.
Fixed scalar dup alias and added test case.

llvm-svn: 195329
2013-11-21 08:15:01 +00:00
Ted Kremenek a14c3119ac Revert "Add new attribute 'objc_suppress_protocol' to suppress protocol conformance for a class."
After implementing this patch, a few concerns about the language
feature itself emerged in my head that I had previously not considered.
I want to resolve those design concerns first before having
a half-designed language feature in the tree.

llvm-svn: 195328
2013-11-21 07:57:53 +00:00
Ana Pazos fbc1adbaa7 Implemented Neon scalar by element intrinsics.
Intrinsics implemented: vqdmull_lane, vqdmulh_lane, vqrdmulh_lane,
vqdmlal_lane, vqdmlsl_lane scalar Neon intrinsics.

llvm-svn: 195327
2013-11-21 07:37:04 +00:00
Ana Pazos 2b02688fd9 Implemented Neon scalar by element intrinsics.
Intrinsics implemented: vqdmull_lane, vqdmulh_lane, vqrdmulh_lane,
vqdmlal_lane, vqdmlsl_lane scalar Neon intrinsics.

llvm-svn: 195326
2013-11-21 07:36:33 +00:00
Kostya Serebryany 95f3e54066 [tsan] add a run-time-side regression test for https://code.google.com/p/thread-sanitizer/issues/detail?id=40 (tsan-hostile load speculation)
llvm-svn: 195325
2013-11-21 07:31:12 +00:00
Kostya Serebryany 0b458286e1 Don't speculate loads under ThreadSanitizer
Summary:
Don't speculate loads under ThreadSanitizer.
This fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=40
Also discussed here: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/067929.html

Reviewers: chandlerc

Reviewed By: chandlerc

CC: llvm-commits, dvyukov

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

llvm-svn: 195324
2013-11-21 07:29:28 +00:00
Ted Kremenek a4bd9a0c0e Add new attribute 'objc_suppress_protocol' to suppress protocol conformance for a class.
The idea is to allow a class to stipulate that its methods (and those
of its parents) cannot be used for protocol conformance in a subclass.
A subclass is then explicitly required to re-implement those methods
of they are present in the class marked with this attribute.

Currently the attribute can only be applied to an @interface, and
not a category or class extension.  This is by design.  Unlike
protocol conformance, where a category can add explicit conformance
of a protocol to class, this anti-conformance really needs to be
observed uniformly by all clients of the class.  That's because
the absence of the attribute implies more permissive checking of
protocol conformance.

This unfortunately required changing method lookup in ObjCInterfaceDecl
to take an optional protocol parameter.  This should not slow down
method lookup in most cases, and is just used for protocol conformance.

llvm-svn: 195323
2013-11-21 07:20:42 +00:00
Ted Kremenek 2d3379e394 Refactor some of handleObjCBridgeAttr to make it more concise and the diagnostic reusable.
llvm-svn: 195322
2013-11-21 07:20:34 +00:00
Bill Wendling 07787f8747 The basic problem is that some mainstream programs cannot deal with the way
clang optimizes tail calls, as in this example:

int foo(void);
int bar(void) {
 return foo();
}

where the call is transformed to:

  calll .L0$pb
.L0$pb:
  popl  %eax
.Ltmp0:
  addl  $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax
  movl  foo@GOT(%eax), %eax
  popl  %ebp
  jmpl  *%eax                   # TAILCALL

However, the GOT references must all be resolved at dlopen() time, and so this
approach cannot be used with lazy dynamic linking (e.g. using RTLD_LAZY), which
usually populates the PLT with stubs that perform the actual resolving.

This patch changes X86TargetLowering::LowerCall() to skip tail call
optimization, if the called function is a global or external symbol.

Patch by Dimitry Andric!

PR15086

llvm-svn: 195318
2013-11-21 07:04:30 +00:00
Paul Robinson b379efeb53 Teach ISel not to optimize 'optnone' functions.
Based on work by Andrea Di Biagio.

llvm-svn: 195317
2013-11-21 06:33:32 +00:00
Lang Hames fd949a28c3 Dereference the node iterator when dumping the PBQP graph structure in DOT
format.

Thanks to Arnaud A. de Grandmaison for the patch!

llvm-svn: 195316
2013-11-21 06:30:14 +00:00
Reed Kotler 2fc05be887 Add, to constant islands, long jumps similar to ARM far branch.
llvm-svn: 195312
2013-11-21 05:13:23 +00:00
Yuchen Wu 2a9d96992d llvm-cov: Don't assume FileChecksum was generated.
For cases where emitProfileArcs() was called but emitProfileNotes() was
not, set the CfgChecksum to 0.

llvm-svn: 195311
2013-11-21 04:53:39 +00:00
Yuchen Wu 9a74b8c677 llvm-cov: Formatting change.
llvm-svn: 195310
2013-11-21 04:12:10 +00:00
Yuchen Wu 664dc7678b llvm-cov: Fixed some bugs related to file checksum.
Added call to update CfgChecksum. Made FileChecksum a vector, separate
for each source file.

llvm-svn: 195309
2013-11-21 04:01:05 +00:00
Jason Molenda db2f51e5f1 Fixes to get the arm native debugserver building again.
Fix a small typeo in the i386/x86_64 debugserver plugins.

llvm-svn: 195308
2013-11-21 03:59:47 +00:00
Shankar Easwaran 178324d903 [LinkingContext] Limit shared library undefined atoms to be added.
This adds functionality to limit shared library undefined atoms to be added
only once by the Resolver.

Dynamic libraries may be processed more than once if they exist within a
Group.

Also adds a test to verify the change.

llvm-svn: 195307
2013-11-21 03:50:59 +00:00
Hans Wennborg 84fe12d1e9 Provide better diagnostic wording for initializers on static
data member definitions when the variable has an initializer
in its declaration.

For the following code:

  struct S {
    static const int x = 42;
  };
  const int S::x = 42;

This patch changes the diagnostic from:

  a.cc:4:14: error: redefinition of 'x'
  const int S::x = 42;
               ^
  a.cc:2:20: note: previous definition is here
    static const int x = 42;
                     ^
to:

  a.cc:4:18: error: static data member 'x' already has an initializer
  const int S::x = 42;
                   ^
  a.cc:2:24: note: previous initialization is here
    static const int x = 42;
                         ^

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

llvm-svn: 195306
2013-11-21 03:17:44 +00:00
Jason Molenda 4a4b5dcb7d sys/stat.h needed for mkdir, chmod, stat.
llvm-svn: 195305
2013-11-21 02:45:55 +00:00
Chandler Carruth 851a2aa0e0 [PM] Add a module analysis pass proxy for the function analysis manager.
This proxy will fill the role of proxying invalidation events down IR
unit layers so that when a module changes we correctly invalidate
function analyses. Currently this is a very coarse solution -- any
change blows away the entire thing -- but the next step is to make
invalidation handling more nuanced so that we can propagate specific
amounts of invalidation from one layer to the next.

The test is extended to place a module pass between two function pass
managers each of which have preserved function analyses which get
correctly invalidated by the module pass that might have changed what
functions are even in the module.

llvm-svn: 195304
2013-11-21 02:11:31 +00:00
Richard Smith e934d7c9f5 PR10837: Warn if a null pointer constant is formed by a zero integer constant
expression that is not a zero literal, in C. This is a different, and more
targeted, approach than that in r194540.

llvm-svn: 195303
2013-11-21 01:53:02 +00:00
Aaron Ballman f22ef5ab1a Refactored integer argument checking code into a helper method. Removes a considerable amount of duplicated code.
llvm-svn: 195302
2013-11-21 01:50:40 +00:00
Daniel Jasper a78d7d4502 clang-format: Improve formatting of ObjC method expressions.
In particular, make breaking after a parameter's ":" more of a last
resort choice as it significantly affects the readability gained by
aligning the parameters.

Before (in Chromium style - which doesn't allow bin-packing):
  {
    popup_window_.reset([[RenderWidgetPopupWindow alloc]
        initWithContentRect:
            NSMakeRect(
                origin_global.x, origin_global.y, pos.width(), pos.height())
                  styleMask:NSBorderlessWindowMask
                    backing:NSBackingStoreBuffered
                      defer:NO]);
  }

After:
  {
    popup_window_.reset([[RenderWidgetPopupWindow alloc]
        initWithContentRect:NSMakeRect(origin_global.x,
                                       origin_global.y,
                                       pos.width(),
                                       pos.height())
                  styleMask:NSBorderlessWindowMask
                    backing:NSBackingStoreBuffered
                      defer:NO]);
  }

llvm-svn: 195301
2013-11-21 01:46:33 +00:00
Greg Clayton 29b8fc4da9 Added new options to lldb-platform:
--gdbserver-port PORT
    --min-gdbserver-port PORT
    --max-gdbserver-port PORT
    
The --gdbserver-port option can be specified multiple times to tell lldb-platform which ports it can use when launching child GDB server processes.
The --min-gdbserver-port and --max-gdbserver-port options allow a range of ports to be specified for use when launching child GDB server processes.

Fixed the code to manage these ports correctly in GDBRemoteCommunicationServer.

Also changed GDBRemoteCommunicationClient to not set a port when sending the "qLaunchGDBServer" packet so that the remote lldb-platform can decide which ports to use. If the lldb-platform was launched with no --gdbserver-port or --min-gdbserver-port/--max-gdbserver-port options, then port 0 is always used and a unix socket is used between the lldb-platform and child GDB server process to coordinate the use of valid port.

llvm-svn: 195300
2013-11-21 01:44:58 +00:00
Eric Christopher a16725b6b6 Move DebugInfoOffset member near the other data member it helps describe.
llvm-svn: 195299
2013-11-21 01:29:16 +00:00
Eric Christopher 4affe8ce3e Reflow some documentation and remove whitespace comments. Move
DebugInfoOffset data member up with the rest of the data members.

llvm-svn: 195298
2013-11-21 01:29:13 +00:00
Eric Christopher 9f9b304caf Add more documenation for the lookup tables data members.
llvm-svn: 195297
2013-11-21 01:16:31 +00:00
Eric Christopher bca5c63d04 Reorder language in the CompileUnit description and add a comment.
Language may only be a temporary addition.

llvm-svn: 195296
2013-11-21 01:14:00 +00:00
Rui Ueyama dae2ef47f1 [PECOFF] Move files with ".lib" extension to the end of the input file list.
It's allowed to specify library files *before* object files in the command
line. Object files seems to be processed first, and then their undefined
symbols are resolved from the libraries. This patch implements the compatible
behavior.

llvm-svn: 195295
2013-11-21 01:08:53 +00:00