Commit Graph

132552 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 7030427623 Preserve operand flags in convertToThreeAddress() by copying operands.
No test case, this is a generalization of r160260.

llvm-svn: 162485
2012-08-23 22:36:31 +00:00
Johnny Chen 892943f9dd Cope with the case where the user-supplied callbacks want the watchpoint itself to be disabled!
Previously we put a WatchpointSentry object within StopInfo.cpp to disable-and-then-enable the watchpoint itself
while we are performing the actions associated with the triggered watchpoint, which can cause the user-initiated
watchpoint disabling action to be negated.

Add a test case to verify that a watchpoint can be disabled during the callbacks.

llvm-svn: 162483
2012-08-23 22:28:26 +00:00
Enrico Granata 0845a1a077 A first version of a bunch of classes that wrap commonly used Python objects in a ref-counting and type-safe C++ API
llvm-svn: 162481
2012-08-23 22:02:23 +00:00
Chad Rosier 2f7c451ae5 [ms-inline asm] Add a few helper function to the MSAsmStmt class that are needed
by CodeGen.

In the long-term, much of the codegen logic will be shared between the GNU-style
and MS-style inline assembly, but for now I'm replicating this logic to avoid
regressions with the GNU-style.

llvm-svn: 162478
2012-08-23 21:55:11 +00:00
Benjamin Kramer 62b95d88dc Rip out remnants of move semantic emulation and smart pointers in Sema.
These were nops for quite a while and only lead to confusion. ASTMultiPtr
now behaves like a proper dumb array reference.

llvm-svn: 162475
2012-08-23 21:35:17 +00:00
Greg Clayton b3e776008b Added a hollowed out version of an OperatingSystem plugin that will use a class in python to get thread information for threads stored in memory.
llvm-svn: 162472
2012-08-23 21:17:11 +00:00
Sean Callanan 845db1087c Added a method to DeclContext that marks the
lookup table as needing to be built.

This is required for LLDB, which provides the
contents of many DeclContexts through a custom
ExternalASTSource.

llvm-svn: 162471
2012-08-23 21:16:40 +00:00
Jim Ingham 608036ae5b gdb format should default to count of 1.
<rdar://problem/12161861>

llvm-svn: 162470
2012-08-23 21:16:25 +00:00
Ted Kremenek 2883175e4c Change a bunch of cases where we do "getAs<...>->doSomething()" to
"castAs<...>->doSomething()".  The analyzer was flagging these
as potential null dereferences, which is technically true.  The
invariants appear to be that these casts should never fail, so
let's use castAs<> instead and avoid a runtime check.

llvm-svn: 162468
2012-08-23 20:46:57 +00:00
Johnny Chen 8ccba980e6 Make the substring un-matching more robust.
llvm-svn: 162467
2012-08-23 20:25:04 +00:00
Johnny Chen 53311c3cb1 Make a test scenario stronger, since, by default, the setting interpreter.expand-regex-aliases is false.
llvm-svn: 162465
2012-08-23 20:22:16 +00:00
Richard Smith 7aed66bbee When disambiguating an expression-statement from a declaraton-statement, if the
statement starts with an identifier for which name lookup will fail either way,
look at later tokens to disambiguate in order to improve error recovery.

llvm-svn: 162464
2012-08-23 20:19:14 +00:00
Chad Rosier 59df25b659 [ms-inline asm] Remove an unused argument. This logic can now be reused by the
ms-style inline asms.

llvm-svn: 162463
2012-08-23 20:00:18 +00:00
Johnny Chen cfe38aab25 Fix the test suite failures as a result of r162418 check-in.
llvm-svn: 162462
2012-08-23 19:36:03 +00:00
Jakob Stoklund Olesen af507bf450 Tristate mayLoad, mayStore, and hasSideEffects.
Keep track of the set/unset state of these bits along with their
true/false values, but treat '?' as '0' for now.

llvm-svn: 162461
2012-08-23 19:34:46 +00:00
Jakob Stoklund Olesen 9dc03bba14 Add CodeGenTarget::guessInstructionProperties.
Currently, TableGen just guesses instruction properties when it can't
infer them form patterns.

This adds a guessInstructionProperties flag to the instruction set
definition that will be used to disable guessing. The flag is intended
as a migration aid. It will be removed again when no more targets need
their properties guessed.

llvm-svn: 162460
2012-08-23 19:34:41 +00:00
Jakob Stoklund Olesen 6c0c2f2642 Fix attributes on X86 store intrinsics.
These intrinsics don't have unmodeled side effects, they are just
stores.

llvm-svn: 162459
2012-08-23 19:21:38 +00:00
Lang Hames b86a55a161 Fix a stub signature. HeuristicReduce should return a bool.
This should fix a -Wdocumentation warning.

llvm-svn: 162458
2012-08-23 19:06:23 +00:00
Dmitry Vyukov 0481ae4722 tsan: allow to override per-thread event trace size
useful if you don't see the second stack trace

llvm-svn: 162456
2012-08-23 18:26:03 +00:00
Craig Topper 4a4634d6de Favor FMA3 over FMA4 if both are enabled.
llvm-svn: 162454
2012-08-23 18:14:30 +00:00
Jordan Rose e5d5393efc [analyzer] Support C++ default arguments if they are literal values.
A CXXDefaultArgExpr wraps an Expr owned by a ParmVarDecl belonging to the
called function. In general, ExprEngine and Environment ought to treat this
like a ParenExpr or other transparent wrapper expression, with the inside
expression evaluated first.

However, if we call the same function twice, we'd produce a CFG that contains
the same wrapped expression twice, and we're not set up to handle that. I've
added a FIXME to the CFG builder to come back to that, but meanwhile we can
at least handle expressions that don't need to be explicitly evaluated:
literals. This probably handles many common uses of default parameters:
true/false, null, etc.

Part of PR13385 / <rdar://problem/12156507>

llvm-svn: 162453
2012-08-23 18:10:53 +00:00
Dmitri Gribenko adba9be7c5 Fix a bunch of -Wdocumentation warnings.
llvm-svn: 162452
2012-08-23 17:58:28 +00:00
Dmitry Vyukov 7e6347402d tsan: fix new memory allocator
Deallocate: drain blocks to central cache if cached too much (instead of never drain).
Allocate: batch allocate fixed amount of blocks (instead of all blocks).
This significantly reduces memory consumption of large heavy-multithreaded programs.

llvm-svn: 162447
2012-08-23 17:16:07 +00:00
Dmitri Gribenko 65340a69e1 Fix a bunch of -Wdocumentation warnings.
llvm-svn: 162446
2012-08-23 16:54:08 +00:00
Chad Rosier 8e0744312b [ms-inline asm] Rename a few induction variables to avoid confusion and silence
a gcc warning.

llvm-svn: 162444
2012-08-23 15:44:35 +00:00
Roman Divacky 497decbd9b Mark these const.
llvm-svn: 162443
2012-08-23 13:57:21 +00:00
Alexey Samsonov 563fb4113c [Sanitizer] Add external symbolizer binary. Next steps - include it in CMake build (produce 32-bit and 64-bit version of it, make sure we can compile LLVM sources with our own flags) and add tests for it.
llvm-svn: 162442
2012-08-23 12:39:35 +00:00
David Chisnall 12d8135cd5 Fix transposed optional / required in Objective-C metadata (GNUstep runtime)
Patch by Niels Grewe!

llvm-svn: 162441
2012-08-23 12:17:21 +00:00
Eli Friedman 5d14c48dbb Attempt to fix clang bootstrap (broken by r162425).
llvm-svn: 162440
2012-08-23 11:27:56 +00:00
Alexander Potapenko 2ebe619340 Re-implement the wrappers for libdispatch functions using blocks where appropriate
(kudos to Anna Zaks for a good example).
This simplifies the code much and lets us not implement internal parts of libdispatch.

All ASan tests from t32 and t64 should pass with the dylib runtime now.

llvm-svn: 162439
2012-08-23 09:34:40 +00:00
Eric Christopher a876b8243e Typo.
llvm-svn: 162438
2012-08-23 07:32:06 +00:00
Alexey Samsonov 419f610a74 [Sanitizer] Switch the symbolization strategy that would be used by sanitizer tools family: as compiling in-process symbolizer into runtime involves certain difficulties, we may instead launch an external symbolizer program (fork + execl) in a subprocess and communicate with it via pipe.
llvm-svn: 162437
2012-08-23 07:32:06 +00:00
Eric Christopher 3a47c3e3cd Only emit the __debug_inlined section if we're trying to be compatible
with older gdbs on darwin.

rdar://10975874

llvm-svn: 162436
2012-08-23 07:32:02 +00:00
Eric Christopher 35ceacbcc2 Make this darwin specific to try to silence the bots.
llvm-svn: 162435
2012-08-23 07:18:46 +00:00
Eric Christopher 7782618271 Emit pubtypes only when going for darwin gdb compatibility.
rdar://10393214

llvm-svn: 162434
2012-08-23 07:10:56 +00:00
Eric Christopher 6cb5594979 Filecheck-ize.
llvm-svn: 162433
2012-08-23 07:10:51 +00:00
Eric Christopher 978fbff11b Add an option for darwin gdb compatibility.
llvm-svn: 162432
2012-08-23 07:10:46 +00:00
Lang Hames 4039eb357e Make the setInst method take its MCInst parameter by reference, a la Jim's
change in r162404.

llvm-svn: 162431
2012-08-23 07:00:48 +00:00
Richard Smith 802c4b7015 Fix undefined behavior: member function calls where 'this' is a null pointer.
llvm-svn: 162430
2012-08-23 06:16:52 +00:00
Douglas Gregor 7bdc8ae20b array_pod_sort on the addresses of declaration pointers leads to
inconsistent ordering of results; instead, use use SmallPtrSet to
eliminate duplicates.

llvm-svn: 162429
2012-08-23 05:05:18 +00:00
Craig Topper f911597494 Use a switch statement instead of a bunch of if-else checks and pull out the common function call.
llvm-svn: 162428
2012-08-23 04:57:36 +00:00
Richard Smith 9db4b0020c Fix undefined behavior: don't call ObjCInterfaceDecl::isArcWeakrefUnavailable
on a null pointer. (This function happens to work for a null 'this' pointer, so
no test.)

llvm-svn: 162427
2012-08-23 04:53:18 +00:00
Craig Topper ca698195a2 Remove unused private field to silence build warning.
llvm-svn: 162426
2012-08-23 04:45:31 +00:00
Eli Friedman a5dd5684dc Use the alignment from lvalue emission to more accurately compute the alignment
of a pointer for builtin emission, instead of just depending on the type of the
pointee.  <rdar://problem/11314941>.

llvm-svn: 162425
2012-08-23 03:10:17 +00:00
Matt Beaumont-Gay 1e774bc835 Don't recycle loop variables (to keep GCC happy).
llvm-svn: 162424
2012-08-23 01:51:18 +00:00
Eric Christopher c2ce00418c 80-col.
llvm-svn: 162422
2012-08-23 00:52:51 +00:00
Eric Christopher 0ef6ebc7e4 Tidy.
llvm-svn: 162421
2012-08-23 00:52:49 +00:00
Andrew Trick ae53561b0c Simplify the computeOperandLatency API.
The logic for recomputing latency based on a ScheduleDAG edge was
shady. This bypasses the problem by requiring the client to provide
operand indices. This ensures consistent use of the machine model's
API.

llvm-svn: 162420
2012-08-23 00:39:43 +00:00
Johnny Chen b417dcdbee rdar://problem/12022371
Make it so that "b 245" should set a breakpoint at line 245 of the current file.
Also add a simple test file.

llvm-svn: 162419
2012-08-23 00:32:22 +00:00
Greg Clayton 754a9369db <rdar://problem/12022079>
Added a new "interpreter" properties to encapsulate any properties for the command interpreter. Right now this contains only "expand-regex-aliases", so you can now enable (disabled by default) the echoing of the command that a regular expression alias expands to:

(lldb) b main
Breakpoint created: 1: name = 'main', locations = 1

Note that the expanded regular expression command wasn't shown by default. You can enable it if you want to:

(lldb) settings set interpreter.expand-regex-aliases true
(lldb) b main
breakpoint set --name 'main'
Breakpoint created: 1: name = 'main', locations = 1

Also enabled auto completion for enumeration option values (OptionValueEnumeration) and for boolean option values (OptionValueBoolean).

Fixed auto completion for settings names when nothing has been type (it should show all settings).

llvm-svn: 162418
2012-08-23 00:22:02 +00:00