Commit Graph

188104 Commits

Author SHA1 Message Date
Sanjay Patel 23b7ce2725 fix typos, grammar, formatting; NFC
llvm-svn: 223276
2014-12-03 22:28:05 +00:00
Philip Reames b23713aae9 Strength Verifier checks around the types involved in a statepoint
Add checks that the types in a gc.statepoint sequence match the wrapper callee and that relocating a pointer doesn't change it's type.

llvm-svn: 223275
2014-12-03 22:23:24 +00:00
Matthias Braun 395a82f6cc correct spelling, NFC
llvm-svn: 223274
2014-12-03 22:10:39 +00:00
Zachary Turner b3ff719b04 Manually call ModulesDidLoad when the executable is loaded.
This is a temporary workaround to get deferred breakpoint
resolution working until Bug 21720 is addressed.  Even with this
workaround, it will only resolve deferred breakpoints in the
executable module, and not in a shared library.

llvm-svn: 223273
2014-12-03 22:04:31 +00:00
Zachary Turner c6a6653ebb Correctly shutdown when DoDestroy is called with an active exception.
Previously if we got a DoDestroy while stopped at a breakpoint, we
would detach and then say the process had exited.  This is completely
wrong, as it resulted in the python script incorrectly assuming that
the process had actually exited and trying to delete the image, when
in fact it had done no such thing.

The fix employed here is that when we get a DoDestroy, we do 3 steps:

1) initiate a termination sequence on the process
2) If we were stopped handling an exception of any kind, mask it and
   let the program resume, causing the program to see the termination
   request and exit on its own.
3) Let the program exit normally, and close all of our handles before
   returning control back to DoDestroy.

This fixes Bug 21722 and Bug 21723.

llvm-svn: 223272
2014-12-03 22:04:18 +00:00
Reid Kleckner bbc0178518 CUDA host device code with two code paths
Summary:
Allow CUDA host device functions with two code paths using __CUDA_ARCH__
to differentiate between code path being compiled.

For example:
  __host__ __device__ void host_device_function(void) {
  #ifdef __CUDA_ARCH__
    device_only_function();
  #else
    host_only_function();
  #endif
  }

Patch by Jacques Pienaar.

Reviewed By: rnk

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

llvm-svn: 223271
2014-12-03 21:53:36 +00:00
Matthias Braun d34e4d2354 [SimplifyLibCalls] Improve double->float shrinking to consider constants
This allows cases like float x; fmin(1.0, x); to be optimized to fminf(1.0f, x);

rdar://19049359

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

llvm-svn: 223270
2014-12-03 21:46:33 +00:00
Matthias Braun 892c923c46 [SimplifyLibCalls] Enable double to float shrinking for copysign
rdar://19049359

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

llvm-svn: 223269
2014-12-03 21:46:29 +00:00
Colin LeMahieu 654f2d2037 [Hexagon] Converting member InstrDesc to static variable.
llvm-svn: 223268
2014-12-03 21:40:25 +00:00
Reid Kleckner 8d58513da4 Cast vtable address points to i32 (...)** to enable more globalopt
We currently use i32 (...)** as the type of the vptr field in the LLVM
struct type. LLVM's GlobalOpt prefers any bitcasts to be on the side of
the data being stored rather than on the pointer being stored to.

Reviewers: majnemer

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

llvm-svn: 223267
2014-12-03 21:00:21 +00:00
Richard Smith 1780d82f35 Teach EvaluatedExprVisitor that the condition and unselected branches of a
_Generic expression are unevaluated.

llvm-svn: 223266
2014-12-03 21:00:20 +00:00
Nico Weber 5f1529a5ad Fix grammar-o.
llvm-svn: 223265
2014-12-03 20:58:23 +00:00
Colin LeMahieu 7e9908ea10 [Hexagon] Converting subclass members to an implicit operand.
llvm-svn: 223264
2014-12-03 20:23:22 +00:00
David Blaikie 49cf467572 range-for some things
llvm-svn: 223263
2014-12-03 19:58:49 +00:00
David Blaikie 0bc23e33a7 Simplify CodeGenRegBank::inferMatchingSuperRegClass & its caller by passing an iterator rather than index
llvm-svn: 223262
2014-12-03 19:58:48 +00:00
David Blaikie dacea4bc53 Simplify ownership of RegClasses by using list<CodeGenRegisterClass> instead of vector<CodeGenRegisterClass*>
This complicates a few algorithms due to not having random access, but
not by a huge degree I don't think (open to debate/design
discussion/etc).

llvm-svn: 223261
2014-12-03 19:58:45 +00:00
David Blaikie c0bb5cab0f Range-for some stuff related to RegClasses, and comment cases where range-for isn't suitable.
llvm-svn: 223260
2014-12-03 19:58:41 +00:00
Philip Reames 38303a329f Make the Verifier more strict about gc.statepoints
The recently added documentation for statepoints claimed that we checked the parameters of the various intrinsics for validity.  This patch adds the code to actually do so.  I also removed a couple of redundant checks for conditions which are checked elsewhere in the Verifier and simplified the logic using the helper functions from Statepoint.h.

llvm-svn: 223259
2014-12-03 19:53:15 +00:00
Hans Wennborg d59474a6cb ASan CMakeLists.txt: fix bad indent; NFC
llvm-svn: 223258
2014-12-03 19:05:42 +00:00
Will Schmidt eba49233c3 Add TableGen info for Power8.
This is based on the Power7 version, with units added and renamed to match P8.

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

llvm-svn: 223257
2014-12-03 18:46:30 +00:00
Roman Divacky fdf0560997 Change the name to be in style.
llvm-svn: 223255
2014-12-03 18:39:44 +00:00
Matt Arsenault 03f0e83dff Fix sphinx error from Statepoints.rst
It was complaining it wasn't included in any toctree

llvm-svn: 223254
2014-12-03 18:35:11 +00:00
Tom Stellard 05cd445c4d R600/SI: Move SIInsertWaits into AMDGPUPassConfig::addPreSched2()
This pass needs to be run after PrologEpilogInserter, because
that pass may inserter spill code which reads or writes memory.

llvm-svn: 223253
2014-12-03 18:27:08 +00:00
Tom Stellard 92105e87e8 R600/SI: Don't run SI passes on R600 subtargets
llvm-svn: 223252
2014-12-03 18:27:05 +00:00
Oleksiy Vyalov e8fb6937ba Use timeout when reading debugserver's port from a named pipe.
http://reviews.llvm.org/D6490

llvm-svn: 223251
2014-12-03 18:19:16 +00:00
Alexander Kornienko d365731dd0 Make ArgumentsAdjuster an std::function (clang-tools-extra part of D6505).
Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

llvm-svn: 223249
2014-12-03 17:53:03 +00:00
Alexander Kornienko 74e1c46a50 Make ArgumentsAdjuster an std::function.
Reviewers: klimek

Reviewed By: klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 223248
2014-12-03 17:53:02 +00:00
Tim Northover 293d414380 AArch64: fix wrong-endian parameter passing.
The blocked arguments code didn't take account of the hacks needed to support
it.

llvm-svn: 223247
2014-12-03 17:49:26 +00:00
Colin LeMahieu 089791db48 [NFC] Fixing pendantic warning extra semicolons.
llvm-svn: 223246
2014-12-03 17:36:39 +00:00
Colin LeMahieu 1d04fa411f [Hexagon] [NFC] Moving function implementations out of header. Clang-formatting files.
llvm-svn: 223245
2014-12-03 17:35:39 +00:00
Nick Lewycky 8ede1ef09b Fix test to use the right metadata node (reapply r223239 plus a fix) and also to use the correct path to the GCNO file.
llvm-svn: 223244
2014-12-03 17:32:44 +00:00
Colin LeMahieu b4e5be4c66 [Hexagon] [NFC] Renaming *packetStart to *packetBegin
llvm-svn: 223243
2014-12-03 17:31:43 +00:00
Jonathan Roelofs d9e4ee5d16 Fix isThreadModelSupported()'s comment. NFC
llvm-svn: 223241
2014-12-03 17:04:52 +00:00
Alexander Potapenko ff5326f0d1 Revert r223239, which broke some bots.
llvm-svn: 223240
2014-12-03 16:03:08 +00:00
Alexander Potapenko 1b42ad9b43 Fix the metadata number used by llvm.gcov to match the number of the inserted metadata node.
llvm-svn: 223239
2014-12-03 15:15:58 +00:00
Aaron Ballman 7ce5a4975b Silencing several "multiple copy constructors" warnings from MSVC; NFC.
llvm-svn: 223238
2014-12-03 14:44:16 +00:00
Aaron Ballman d58a1f4d98 Silencing a 32-bit implicit conversion warning in MSVC; NFC.
llvm-svn: 223237
2014-12-03 14:39:58 +00:00
Evgeniy Stepanov 2e5a1f1c9c msan] Add compile-time checks for missing origins.
This change makes MemorySanitizer instrumentation a bit more strict
about instructions that have no origin id assigned to them.

This would have caught the bug that was fixed in r222918.

This is re-commit of r222997, reverted in r223211, with 3 more
missing origins added.

llvm-svn: 223236
2014-12-03 14:15:53 +00:00
Alexander Kornienko 5c423318c9 [clang-tidy] Update help messages and docs.
Fixed incorrect examples of configuration, clarified the usage of -dump-config.

llvm-svn: 223235
2014-12-03 14:03:03 +00:00
Daniel Jasper c095663ec1 clang-format: Fix fake parentheses placement with comments.
Before:
  return (a > b
          // comment1
      // comment2
      || c);

After:
  return (a > b
      // comment1
      // comment2
      || c);

llvm-svn: 223234
2014-12-03 14:02:59 +00:00
Evgeniy Stepanov 7395cae005 [msan] Change the way origin ids are built.
Previously, all origin ids were "chained" origins, i.e values of
ChainedOriginDepot. This added a level of indirection for simple
stack and heap allocation, which were represented as chains of
length 1. This costs both RAM and CPU, but provides a joined 2**29
origin id space. It also made function (any instrumented function)
entry non-async-signal-safe, but that does not really matter because
memory stores in track-origins=2 mode are not async-signal-safe anyway.

With this change, the type of the origin is encoded in origin id.
See comment in msan_origin.h for more details. This reduces chained and stack
origin id range to 2**28 each, but leaves extra 2**31 for heap origins.

This change should not have any user-visible effects.

llvm-svn: 223233
2014-12-03 13:58:40 +00:00
Alexander Kornienko 4cf0c18a5b [clang-tidy] Make a test independent of the default check set.
llvm-svn: 223232
2014-12-03 13:48:46 +00:00
Evgeniy Stepanov fc77519c29 [asan] Fix stale_stack_leak.cc test in ASan-UAR mode.
This test does an intentional use-after-return, but this is not the focus of
the test, so ignore it.

llvm-svn: 223230
2014-12-03 13:35:41 +00:00
Evgeniy Stepanov 8a988c40c8 [msan] Add one more test for the handling of stack origins.
llvm-svn: 223229
2014-12-03 13:26:56 +00:00
Daniel Jasper 8379107afe clang-format: Fix expression parser not closing stuff at end of stmt.
Uncovered by a Java test case:

Before:
  public some.package.Type someFunction( // comment
      int parameter) {}

After:
  public some.package.Type someFunction( // comment
                          int parameter) {}

llvm-svn: 223228
2014-12-03 13:20:49 +00:00
Hafiz Abid Qadeer afd188fee4 Remove unnecessary changes committed in r223222.
There were 2 different patches in discussion. One using ioctl
and other using select. We decided to use the ioctl but committed
code also have some changes which were only needed for 'select'.
This patch removes them.

llvm-svn: 223227
2014-12-03 12:48:19 +00:00
Evgeniy Stepanov 340347a83f [msan] Re-enable one test.
It has been fixed a long time ago.

llvm-svn: 223226
2014-12-03 12:11:33 +00:00
Alexey Bataev 1e4b71351f [OPENMP] Code formatting and improvement, no functional changes.
llvm-svn: 223225
2014-12-03 12:11:24 +00:00
Erik Eckstein d181752be0 InstCombine: simplify signed range checks
Try to convert two compares of a signed range check into a single unsigned compare.
Examples:
(icmp sge x, 0) & (icmp slt x, n) --> icmp ult x, n
(icmp slt x, 0) | (icmp sgt x, n) --> icmp ugt x, n

llvm-svn: 223224
2014-12-03 10:39:15 +00:00
Hafiz Abid Qadeer 25383ac01b Fix a hang on OSX while executing -exec-run.
Now we wait for input to become available before blocking in fgets.
More details on problem can be found in 
http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20141201/014290.html

Patch from dawn@burble.org.

llvm-svn: 223222
2014-12-03 10:23:06 +00:00