Commit Graph

121229 Commits

Author SHA1 Message Date
Johnny Chen dedb67ab9b Add "watch set" command as a more general interface in conjunction with "frame var -w".
Also add test cases for watching a variable as well as a location expressed as an expression.

o TestMyFirstWatchpoint.py:

  Modified to test "watchpoint set -w write global".

o TestWatchLocationWithWatchSet.py:

  Added to test "watchpoint set -w write -x 1 g_char_ptr + 7" where a contrived example program
  with several threads is supposed to only access the array index within the range [0..6], but
  there's some misbehaving thread writing past the range.

rdar://problem/10701761

llvm-svn: 149280
2012-01-30 21:46:17 +00:00
Fariborz Jahanian f2bda69cd2 objc-arc: Perform null check on receiver before sending methods which
consume one or more of their arguments. If not done, this will cause a leak
as method will not consume the argument when receiver is null.
In this patch, the null path releases consumed argument.
// rdar://10444474

llvm-svn: 149279
2012-01-30 21:40:37 +00:00
Kostya Serebryany cf2c65aa8e [asan] add a test for __attribute__ no_address_safety_analysis
llvm-svn: 149278
2012-01-30 21:34:59 +00:00
Johnny Chen a5822c0501 Make BreakpointLocation::IsEnabled() consistent with the BreakpointLocation::SetEnabled() implementation.
llvm-svn: 149277
2012-01-30 21:16:22 +00:00
Anna Zaks 58cc6cabe5 [analyzer] Rename the checker as per Ted's comment. Remove the reference
from the driver.

llvm-svn: 149276
2012-01-30 21:14:16 +00:00
Chad Rosier 41003f819c Typo.
llvm-svn: 149275
2012-01-30 21:13:22 +00:00
Kostya Serebryany 510850c345 [asan] minor ifdef cleanup
llvm-svn: 149274
2012-01-30 20:55:02 +00:00
David Greene 6291f3a43c Implement String Cast from Integer
Allow casts from integer to string.

llvm-svn: 149273
2012-01-30 20:47:04 +00:00
Howard Hinnant c9204f6bed Refactored personality function. Found one bug in scanning exception spec lists.
llvm-svn: 149272
2012-01-30 20:16:21 +00:00
Howard Hinnant 2c50972c32 Removed debugging print statements
llvm-svn: 149271
2012-01-30 20:13:37 +00:00
Devang Patel 9a9bb5c5db Intel syntax. Support .intel_syntax directive.
llvm-svn: 149270
2012-01-30 20:02:42 +00:00
Benjamin Kramer 396c590818 Fix refacto.
llvm-svn: 149269
2012-01-30 20:01:35 +00:00
Jean-Daniel Dupas 537aa1ac68 Disable "non literal format string" for NSString that result from a macro expansion.
This is to prevent diagnostic when using NSLocalizedString or CFCopyLocalizedString
macros which are usually used in place of NS and CF strings literals.

llvm-svn: 149268
2012-01-30 19:46:17 +00:00
Tobias Grosser 50ff31dabe Scheduling: Set fusion strategy to minimal
This has shown better results for 2mm, 3mm and a couple of other benchmarks.

After this we show consistenly better results as PoCC with maxfuse. We need
to see if PoCC can also give better results with another fusion strategy.

llvm-svn: 149267
2012-01-30 19:38:58 +00:00
Tobias Grosser 95e860c19c Scheduling: Add option to disable schedule_maximise_band_depth
maximise_band_depth does not seem to have any effect for now, but it may help to
increase the amount of tileable loops. We expose the flag to be able to analyze
its effects when looking into individual benchmarks.

llvm-svn: 149266
2012-01-30 19:38:54 +00:00
Tobias Grosser b3ad85b03c Scheduler: Allow to select the fusion strategy
llvm-svn: 149265
2012-01-30 19:38:50 +00:00
Tobias Grosser 42152ff3c7 Scheduling: Use original schedule if we cannot find a new one
After this we can now compile all polybench 2.0 kernels without any compiler
crash.

llvm-svn: 149264
2012-01-30 19:38:47 +00:00
Tobias Grosser a26db47083 Scheduler: Simplify dependences by default (only isl)
This speeds up the scheduler by orders of magnitude and in addition yields often
to a better schedule.

With this we can compile all polybench kernels with less than 5x compile time
overhead. In general the overhead is even less than 2-3x.  This is still with
running a lot of redundant passes and no compile time tuning at all. There are
several obvious areas where we can improve here further.

There are also two test cases where we cannot find a schedule any more (cholesky
and another). I will look into them later on.

With this we have a very solid base line from which we can start to optimize
further.

llvm-svn: 149263
2012-01-30 19:38:43 +00:00
Tobias Grosser 061e20d2f8 Use isl version: 3c66541593a6bf3b5a3d35d31567abe6c9e5a04b
This allows us to set the fusion strategy and to gist-simplify union_maps.

llvm-svn: 149262
2012-01-30 19:38:40 +00:00
Tobias Grosser bc3bc42491 Dependences: Coalesce the dependences before returning them.
llvm-svn: 149261
2012-01-30 19:38:36 +00:00
Greg Clayton 0a94b6614a Added a new lldb.SBValue helper module that has two classes:
sbvalue.value (<SBValue>)
sbvalue.variable (<SBValue>)

Initialize both with a lldb.SBValue

sbvalue.value() make all sorts of convenience properties. Type "help(sbvalue.value)" 
in the embedded python interpreter to see what is available.

sbvalue.variable() wraps a lldb.SBValue and allows you to play with your variable just
as you would expect:

pt = sbvalue.variable (lldb.frame.FindVariable("pt"))

print pt.x
print py.y

argv = sbvalue.variable (lldb.frame.FindVariable("argv"))
print argv[0]

Member access and array acccess is all taken care of!

llvm-svn: 149260
2012-01-30 19:32:25 +00:00
Matt Beaumont-Gay 9cc6d524ea Here's a new one: GCC was complaining about an only-used-in-asserts
*function*. Wrap the function in #ifndef NDEBUG.

llvm-svn: 149259
2012-01-30 19:26:20 +00:00
Anna Zaks 6523e46941 [analyzer] Make osx.cocos.CFContainersSyntax a default checker.
llvm-svn: 149258
2012-01-30 19:12:37 +00:00
Douglas Gregor 71022cac1f Fix typo spotted by Sebastian. Thanks!
llvm-svn: 149257
2012-01-30 18:49:05 +00:00
John McCall a023b6924a Per discussion on cxx-abi-dev, don't drop leading zeroes from the
mangling of floating-point literals.  I just went ahead and
reimplemented toString() here;  if someone wants to generalize
the library routine to do this, or feels strongly that we should
be post-processing, please feel free.

llvm-svn: 149256
2012-01-30 18:36:31 +00:00
Chris Lattner f06039b39d Various improvements suggested by Duncan
llvm-svn: 149255
2012-01-30 18:19:30 +00:00
Douglas Gregor e577cfe172 Eliminate narrowing conversion in initializer list, to make C++11 happy
llvm-svn: 149254
2012-01-30 16:57:18 +00:00
Benjamin Kramer e0513cb3b3 SmallBitVectorize the deduced parameter set.
llvm-svn: 149253
2012-01-30 16:17:39 +00:00
Howard Hinnant 47cb854818 Add a descriptive name for a constant. Also I'm at least temporarily waging war on throw specs, both old and new style. Except where we have already publicly exposed the throw spec, I'm getting rid of them. They may come back later. But they seem somewhat prone to cyclic dependencies here. The throw spec implies compiler generated code that this library has to jump to during stack unwinding. I'd like to minimize the possiblity that the code used to properly make that jump is itself creating such jumps.
llvm-svn: 149251
2012-01-30 16:07:00 +00:00
Howard Hinnant 3f0d2384aa Add -fstrict-aliasing -Wstrict-aliasing and change optimization from -Os to -O3
llvm-svn: 149250
2012-01-30 16:03:23 +00:00
Howard Hinnant 5bbc597f1e Put throw() clauses back on these functions in cxxabi.h. This header must be C++03 compatible and these throw specs are consistent with the current cxxabi.h that Apple ships.
llvm-svn: 149249
2012-01-30 16:02:11 +00:00
Benjamin Kramer 20af25f47b X86: Simplify shuffle mask generation code.
llvm-svn: 149248
2012-01-30 15:16:21 +00:00
Alexey Samsonov 2dcef2d2a8 AddressSanitizer: Enforce default visibility for all libc interceptors
llvm-svn: 149247
2012-01-30 13:42:44 +00:00
Alexander Potapenko 81ebb0aafb Add a mask for "cmpb $imm, (%rdi)" on x86_64
llvm-svn: 149245
2012-01-30 12:49:00 +00:00
Chandler Carruth 4c727853ed Fix yet another issue introduced when renaming '-ccc-host-triple' to
'-target'. The original flag was part of a flag group that marked it as
driver-only. The new flag didn't ever get equivalent treatment. This
caused the '-target' flag to get passed down to any raw GCC invocation.
Marking it as a driver option fixes this and PR11875.

llvm-svn: 149244
2012-01-30 12:25:35 +00:00
Alexander Potapenko 7a36f9d399 Fix compilation of ASan tests on OS X Lion (see http://code.google.com/p/address-sanitizer/issues/detail?id=32)
The redzones emitted by AddressSanitizer for CFString instances confuse the linker and are of little use, so we shouldn't add them. 

llvm-svn: 149243
2012-01-30 10:40:22 +00:00
Anton Korobeynikov 28037ceacf Proper divmod implementation
llvm-svn: 149242
2012-01-30 10:21:51 +00:00
Anton Korobeynikov b047b04c4c Provide aeabi_mem* functions.
llvm-svn: 149241
2012-01-30 10:21:23 +00:00
Tobias Grosser a132155bd8 RegisterPass: Expose functions to register Polly passes
llvm-svn: 149240
2012-01-30 09:07:50 +00:00
Tobias Grosser a1f093465b Disable some clang warnings in imported JSON code.
llvm-svn: 149239
2012-01-30 09:07:45 +00:00
Greg Clayton acdbe81637 lldb::SBTarget and lldb::SBProcess are now thread hardened. They both still
contain shared pointers to the lldb_private::Target and lldb_private::Process
objects respectively as we won't want the target or process just going away.

Also cleaned up the lldb::SBModule to remove dangerous pointer accessors.

For any code the public API files, we should always be grabbing shared 
pointers to any objects for the current class, and any other classes prior
to running code with them.

llvm-svn: 149238
2012-01-30 09:04:36 +00:00
Craig Topper 2962e7b656 Remove long dead code for handling vector shift by immediate builtins.
llvm-svn: 149237
2012-01-30 08:51:36 +00:00
Jean-Daniel Dupas 028573e794 Update on format attribute handling.
- Remove the printf0 special handling as we treat it as printf anyway.
- Perform basic checks (non-literal, empty) for all formats and not only printf/scanf.

llvm-svn: 149236
2012-01-30 08:46:47 +00:00
Craig Topper 2c82f9ecf8 Remove custom handling for cmpsd/cmpss/cmppd/cmpps builtins. The builtins are now in IntrinsicsX86.td.
llvm-svn: 149235
2012-01-30 08:38:42 +00:00
Craig Topper cb36131f79 Add GCCBuiltin declarations for cmpsd/cmpss/cmppd/cmpps to allow custom code to be removed from clang.
llvm-svn: 149234
2012-01-30 08:33:36 +00:00
Craig Topper d6d3a05b4f Cleanup 3dnow builtin handling. Most of them were already handled by LLVM connecting intrinsics and builtins in IntrinsicsX86.td.
llvm-svn: 149233
2012-01-30 08:18:19 +00:00
Craig Topper 516cba3380 Fix pattern for memory form of PSHUFD for use with FP vectors to remove bitcast to an integer vector that normal code wouldn't have. Also remove bitcasts from code that turns splat vector loads into a shuffle as it was making the broken pattern necessary.
llvm-svn: 149232
2012-01-30 07:50:31 +00:00
Greg Clayton b9556acc9e SBFrame is now threadsafe using some extra tricks. One issue is that stack
frames might go away (the object itself, not the actual logical frame) when
we are single stepping due to the way we currently sometimes end up flushing
frames when stepping in/out/over. They later will come back to life 
represented by another object yet they have the same StackID. Now when you get
a lldb::SBFrame object, it will track the frame it is initialized with until 
the thread goes away or the StackID no longer exists in the stack for the 
thread it was created on. It uses a weak_ptr to both the frame and thread and
also stores the StackID. These three items allow us to determine when the
stack frame object has gone away (the weak_ptr will be NULL) and allows us to
find the correct frame again. In our test suite we had such cases where we
were just getting lucky when something like this happened:

1 - stop at breakpoint
2 - get first frame in thread where we stopped
3 - run an expression that causes the program to JIT and run code
4 - run more expressions on the frame from step 2 which was very very luckily
    still around inside a shared pointer, yet, not part of the current 
    thread (a new stack frame object had appeared with the same stack ID and
    depth). 
    
We now avoid all such issues and properly keep up to date, or we start 
returning errors when the frame doesn't exist and always responds with
invalid answers.

Also fixed the UserSettingsController  (not going to rewrite this just yet)
so that it doesn't crash on shutdown. Using weak_ptr's came in real handy to
track when the master controller has already gone away and this allowed me to
pull out the previous NotifyOwnerIsShuttingDown() patch as it is no longer 
needed.

llvm-svn: 149231
2012-01-30 07:41:31 +00:00
Chris Lattner 5d917075fd fix a major oversight that is breaking some llvm-test tests.
llvm-svn: 149230
2012-01-30 07:36:01 +00:00
Talin 2a7df51ea2 DenseMap::find_as() and unit tests.
llvm-svn: 149229
2012-01-30 06:55:43 +00:00