Nadav Rotem [Fri, 12 Apr 2013 21:16:54 +0000 (21:16 +0000)]
SLPVectorizer: add support for vectorization of diamond shaped trees. We now perform a preliminary traversal of the graph to collect values with multiple users and check where the users came from.
llvm-svn: 179414
Nadav Rotem [Fri, 12 Apr 2013 21:15:03 +0000 (21:15 +0000)]
CostModel: increase the default cost of supported floating point operations from 1 to two. Fixed a few tests that changes because now the cost of one insert + a vector operation on two doubles is lower than two scalar operations on doubles.
llvm-svn: 179413
Nadav Rotem [Fri, 12 Apr 2013 21:11:14 +0000 (21:11 +0000)]
Add debug prints.
llvm-svn: 179412
Douglas Gregor [Fri, 12 Apr 2013 21:00:54 +0000 (21:00 +0000)]
<rdar://problem/
13643854> Only emit ambiguous-expansion warnings when at least one of the macro definitions comes from a non-system header.
This slightly weakens the heuristic introduced in r178109.
llvm-svn: 179411
Anton Yartsev [Fri, 12 Apr 2013 20:48:49 +0000 (20:48 +0000)]
[analyzer] Makes NewDeleteLeaks checker work independently from NewDelete.
llvm-svn: 179410
Nadav Rotem [Fri, 12 Apr 2013 20:45:20 +0000 (20:45 +0000)]
Add support for additional vector instructions in the interpreter.
patch by Veselov, Yuri <Yuri.Veselov@intel.com>.
llvm-svn: 179409
Howard Hinnant [Fri, 12 Apr 2013 20:22:57 +0000 (20:22 +0000)]
Ruben Van Boxem: Turn islower_l and isupper_l into functions (instead of macros) on Windows only to quell a warning during libc++ building.
llvm-svn: 179408
Chad Rosier [Fri, 12 Apr 2013 20:20:54 +0000 (20:20 +0000)]
[ms-inline asm] Move this logic into a static function as it's only applicable
when parsing MS-style inline assembly. No functional change intended.
llvm-svn: 179407
Bob Wilson [Fri, 12 Apr 2013 20:17:20 +0000 (20:17 +0000)]
Define Neon intrinsics as "static inline" to avoid warning. rdar://
13108414
We had been defining Neon intrinsics as "static" with always_inline attributes.
If you use them from an extern inline function, you get a warning, e.g.:
static function 'vadd_u8' is used in an inline function with external linkage
This change simply adds the inline keyword to avoid that warning.
llvm-svn: 179406
Greg Clayton [Fri, 12 Apr 2013 20:07:46 +0000 (20:07 +0000)]
<rdar://problem/
13491977>
Made some fixes to the OperatingSystemPython class:
- If any thread dictionary contains any "core=N" key/value pairs then the threads obtained from the lldb_private::Process itself will be placed inside the ThreadMemory threads and will be used to get the information for a thread.
- Cleaned up all the places where a thread inside a thread was causing problems
llvm-svn: 179405
Chad Rosier [Fri, 12 Apr 2013 19:52:07 +0000 (19:52 +0000)]
Add test case for r179403.
llvm-svn: 179404
Chad Rosier [Fri, 12 Apr 2013 19:51:49 +0000 (19:51 +0000)]
[ms-inline asm] Address the FIXME for ImmDisp before brackets. This
is a follow on to r179393 and r179399. Test case to be added on
the clang side.
Part of rdar://
13453209
llvm-svn: 179403
Daniel Dunbar [Fri, 12 Apr 2013 19:09:09 +0000 (19:09 +0000)]
lit: Fix infinite recursion when an out-of-tree test root is located inside the source test root.
llvm-svn: 179402
Daniel Dunbar [Fri, 12 Apr 2013 19:08:57 +0000 (19:08 +0000)]
lit: Add a test for discovery w/ test_exec_root (out-of-tree test root).
llvm-svn: 179401
Chad Rosier [Fri, 12 Apr 2013 18:54:40 +0000 (18:54 +0000)]
Add test case for r179399.
llvm-svn: 179400
Chad Rosier [Fri, 12 Apr 2013 18:54:20 +0000 (18:54 +0000)]
[ms-inline asm] Have the [ Symbol ] case fall into the more general logic. This
is a follow on to r179393. Test case to be added on the clang side.
Part of rdar://
13453209
llvm-svn: 179399
Quentin Colombet [Fri, 12 Apr 2013 18:47:25 +0000 (18:47 +0000)]
ARM: Correct printing of pre-indexed operands.
According to the ARM reference manual, constant offsets are mandatory for pre-indexed addressing modes.
The MC disassembler was not obeying this when the offset is 0.
It was producing instructions like: str r0, [r1]!.
Correct syntax is: str r0, [r1, #0]!.
This change modifies the dumping of operands so that the offset is always printed, regardless of its value, when pre-indexed addressing mode is used.
Patch by Mihail Popa <Mihail.Popa@arm.com>
llvm-svn: 179398
Michael J. Spencer [Fri, 12 Apr 2013 18:40:39 +0000 (18:40 +0000)]
[Core] Add parallel infrastructure to lld.
Uses ConcRT and PPL on Windows.
llvm-svn: 179397
Anna Zaks [Fri, 12 Apr 2013 18:40:27 +0000 (18:40 +0000)]
[analyzer] Print a diagnostic note even if the region cannot be printed.
There are few cases where we can track the region, but cannot print the note,
which makes the testing limited. (Though, I’ve tested this manually by making
all regions non-printable.) Even though the applicability is limited now, the enhancement
will be more relevant as we start tracking more regions.
llvm-svn: 179396
Anna Zaks [Fri, 12 Apr 2013 18:40:21 +0000 (18:40 +0000)]
[analyzer]Print field region even when the base region is not printable
llvm-svn: 179395
Chad Rosier [Fri, 12 Apr 2013 18:22:08 +0000 (18:22 +0000)]
Add test case for r179383 and r179393.
llvm-svn: 179394
Chad Rosier [Fri, 12 Apr 2013 18:21:18 +0000 (18:21 +0000)]
[ms-inline asm] Add support for operands that include both a symbol and an
immediate displacement. Specifically, add support for generating the proper IR.
We've been able to parse this for some time now. Test case to be added on the
clang side.
Part of rdar://
13453209
llvm-svn: 179393
Hal Finkel [Fri, 12 Apr 2013 18:17:57 +0000 (18:17 +0000)]
PPC: Remove (broken) nested implicit definition lists
TableGen will not combine nested list 'let' bindings into a single list, and
instead uses only the inner scope. As a result, several instruction definitions
were missing implicit register defs that were in outer scopes. This de-nests
these scopes and makes all instructions have only one let binding which sets
implicit register definitions.
llvm-svn: 179392
Hal Finkel [Fri, 12 Apr 2013 18:17:38 +0000 (18:17 +0000)]
Add a comment about the PPC Interpretation64Bit bit
llvm-svn: 179391
Sean Callanan [Fri, 12 Apr 2013 18:10:34 +0000 (18:10 +0000)]
Replicated the materialization logic for persistent
variables in the Materializer. We don't use this
code yet, but will soon once the other materializers
are online.
llvm-svn: 179390
Sean Callanan [Fri, 12 Apr 2013 18:08:10 +0000 (18:08 +0000)]
Fixed a bug where a few class forward declarations
weren't in the proper namespace.
llvm-svn: 179389
Jyotsna Verma [Fri, 12 Apr 2013 18:01:06 +0000 (18:01 +0000)]
Hexagon: Set isPredicatedNew flag on predicate new instructions.
llvm-svn: 179388
Jyotsna Verma [Fri, 12 Apr 2013 17:46:52 +0000 (17:46 +0000)]
Hexagon: Set isPredicatedFlase flag for all the instructions with negated predication.
llvm-svn: 179387
David Majnemer [Fri, 12 Apr 2013 17:25:07 +0000 (17:25 +0000)]
Simplify (A & ~B) in icmp if A is a power of 2
The transform will execute like so:
(A & ~B) == 0 --> (A & B) != 0
(A & ~B) != 0 --> (A & B) == 0
llvm-svn: 179386
Jyotsna Verma [Fri, 12 Apr 2013 17:25:02 +0000 (17:25 +0000)]
Disable following tests for Hexagon:
1) Driver/output-file-is-dir.c - Checks for object file which can't
be created for Hexagon since assembler is unavailable.
2) PCH/cxx-typeid.cpp - 'typeinfo' include file is unavailable for Hexagon.
llvm-svn: 179385
Argyrios Kyrtzidis [Fri, 12 Apr 2013 17:06:51 +0000 (17:06 +0000)]
[libclang] Introduce clang_Location_isInSystemHeader to check if a location resides in a system header.
This is a modified patch provided from Mikołaj Siedlarek!
llvm-svn: 179384
Chad Rosier [Fri, 12 Apr 2013 16:26:42 +0000 (16:26 +0000)]
[ms-inline asm] Add the implementation for the AOK_Delete kind, which was added
in r179325. Test case coming shortly on the clang side.
Part of rdar://
13453209
llvm-svn: 179383
Benjamin Kramer [Fri, 12 Apr 2013 15:22:25 +0000 (15:22 +0000)]
Sema: Give a typically small DenseMap some inline capacity.
Also reflow code a bit, no change in functionality.
llvm-svn: 179382
Arnold Schwaighofer [Fri, 12 Apr 2013 15:15:19 +0000 (15:15 +0000)]
LoopVectorizer: integer division is not a reduction operation
Don't classify idiv/udiv as a reduction operation. Integer division is lossy.
For example : (1 / 2) * 4 != 4/2.
Example:
int a[] = { 2, 5, 2, 2}
int x = 80;
for()
x /= a[i];
Scalar:
x /= 2 // = 40
x /= 5 // = 8
x /= 2 // = 4
x /= 2 // = 2
Vectorized:
<80, 1> / <2,5> //= <40,0>
<40, 0> / <2,2> //= <20,0>
20*0 = 0
radar://
13640654
llvm-svn: 179381
Evgeniy Stepanov [Fri, 12 Apr 2013 14:57:03 +0000 (14:57 +0000)]
[sanitizer] Add syscall handlers to ASan and TSan runtimes.
ASan checks addressability of syscall arguments. TSan does nothing for now.
llvm-svn: 179380
Manuel Klimek [Fri, 12 Apr 2013 14:13:36 +0000 (14:13 +0000)]
Revamps structural error detection / handling.
Previously we'd only detect structural errors on the very first level.
This leads to incorrectly balanced braces not being discovered, and thus
incorrect indentation.
This change fixes the problem by:
- changing the parser to use an error state that can be detected
anywhere inside the productions, for example if we get an eof on
SOME_MACRO({ some block <eof>
- previously we'd never break lines when we discovered a structural
error; now we break even in the case of a structural error if there
are two unwrapped lines within the same line; thus,
void f() { while (true) { g(); y(); } }
will still be re-formatted, even if there's missing braces somewhere
in the file
- still exclude macro definitions from generating structural error;
macro definitions are inbalanced snippets
llvm-svn: 179379
Evgeniy Stepanov [Fri, 12 Apr 2013 14:06:40 +0000 (14:06 +0000)]
[sanitizer] More syscall handler placeholders.
This time it's the full list scavenged from syscalls.h
Fixed return value type.
llvm-svn: 179378
Daniel Jasper [Fri, 12 Apr 2013 13:42:36 +0000 (13:42 +0000)]
Fix clang-format-diff.py script.
llvm-svn: 179377
Tim Northover [Fri, 12 Apr 2013 12:54:58 +0000 (12:54 +0000)]
AArch64: use full triple for ELF tests
These tests rely specifically on the names of ELF relocations, let alone any
other detail. There's no way they'd work if LLVM was emitting something else by
default.
llvm-svn: 179376
Tim Northover [Fri, 12 Apr 2013 12:54:49 +0000 (12:54 +0000)]
AArch64: remove over-zealous use of CHECK-NEXT
It turns out some platforms (e.g. Windows) lay out their llvm-mc slightly
differently with extra newlines; there was no real reason for the test lines to
be consecutive, so this relaxes the FileCheck.
llvm-svn: 179375
Benjamin Kramer [Fri, 12 Apr 2013 12:13:51 +0000 (12:13 +0000)]
Revert broken pieces of r179373.
You can't copy an OwningPtr, and move semantics aren't available in C++98.
llvm-svn: 179374
Andy Gibbs [Fri, 12 Apr 2013 10:56:28 +0000 (10:56 +0000)]
Replace uses of the deprecated std::auto_ptr with OwningPtr.
llvm-svn: 179373
Daniel Jasper [Fri, 12 Apr 2013 10:12:01 +0000 (10:12 +0000)]
Provide better emacs integration.
The new emacs integration is simpler, does not save the current file
before reformatting and ensures that emacs does not scroll as a result
of formatting.
Also explicitly set the style in clang-format tests to make them more
robust.
llvm-svn: 179372
Timur Iskhodzhanov [Fri, 12 Apr 2013 09:37:20 +0000 (09:37 +0000)]
Finally drop the 'static' from INLINE and ALWAYS_INLINE
The ALWAYS_INLINE doesn't have static on POSIX anyways since r178341; the INLINE is only used in .h files, so shouldn't have been 'static' in the first place
llvm-svn: 179371
Benjamin Kramer [Fri, 12 Apr 2013 08:33:11 +0000 (08:33 +0000)]
Fix a disconcerting bug in Value::isUsedInBasicBlock, which gave wrong answers for blocks larger than 3 instrs.
Also add a unit test. PR15727.
llvm-svn: 179370
Alexey Samsonov [Fri, 12 Apr 2013 07:27:30 +0000 (07:27 +0000)]
[MSan] Demangle function name in description of stack origin
llvm-svn: 179368
Alexey Samsonov [Fri, 12 Apr 2013 07:18:55 +0000 (07:18 +0000)]
Don't explicitly provide -pie in MSan bootstrap of LLVM, as it's now implied by the driver
llvm-svn: 179367
Alexey Samsonov [Fri, 12 Apr 2013 07:14:04 +0000 (07:14 +0000)]
[MSan] don't build tests with -fPIE/-pie, as these flags are implied by -fsanitize=memory now
llvm-svn: 179366
Alexey Samsonov [Fri, 12 Apr 2013 07:11:00 +0000 (07:11 +0000)]
[TSan] remove -fPIE -pie from TSan lit tests to check that -fsanitize=thread implies them now
llvm-svn: 179365
Nico Rieck [Fri, 12 Apr 2013 04:29:01 +0000 (04:29 +0000)]
Replace elf-dump with llvm-readobj in lld tests
llvm-svn: 179364
Nico Rieck [Fri, 12 Apr 2013 04:07:39 +0000 (04:07 +0000)]
Teach llvm-readobj to print ELF program headers
llvm-svn: 179363
Nico Rieck [Fri, 12 Apr 2013 04:07:13 +0000 (04:07 +0000)]
Remove obsolete object file dumpers
llvm-svn: 179362
Nico Rieck [Fri, 12 Apr 2013 04:06:46 +0000 (04:06 +0000)]
Replace coff-/elf-dump with llvm-readobj
llvm-svn: 179361
Nico Rieck [Fri, 12 Apr 2013 04:02:23 +0000 (04:02 +0000)]
Add extensive relocation tests for llvm-readobj
This test ensures that relocation type names returned by libObject match
the raw relocation type value.
llvm-svn: 179360
Nico Rieck [Fri, 12 Apr 2013 04:01:52 +0000 (04:01 +0000)]
Add -expand-relocs to llvm-readobj
This option expands shown relocations from single line to a dictionary
format:
Relocation {
Offset: 0x4
Type: R_386_32 (1)
Symbol: sym
Info: 0x0
}
llvm-svn: 179359
Nico Rieck [Fri, 12 Apr 2013 04:01:28 +0000 (04:01 +0000)]
Add missing relocation names
llvm-svn: 179358
Nico Rieck [Fri, 12 Apr 2013 03:59:28 +0000 (03:59 +0000)]
Support MIPS64EL relocation type names
MIPS64EL relocation entries have up to three relocation operations. Because
libObject only exposes a single relocation name, use the concatenation of
the individual relocation type names.
llvm-svn: 179357
Hal Finkel [Fri, 12 Apr 2013 02:18:09 +0000 (02:18 +0000)]
Add PPC instruction record forms and associated query functions
This is prep. work for the implementation of optimizeCompare. Many PPC
instructions have 'record' forms (in almost all cases, this means that the RC
bit is set) that cause the result of the instruction to be compared with zero,
and the result of that comparison saved in a predefined condition register. In
order to add the record forms of the instructions without too much
copy-and-paste, the relevant functions have been refactored into multiclasses
which define both the record and normal forms.
Also, two TableGen-generated mapping functions have been added which allow
querying the instruction code for the record form given the normal form (and
vice versa).
No functionality change intended.
llvm-svn: 179356
Nadav Rotem [Fri, 12 Apr 2013 01:24:16 +0000 (01:24 +0000)]
Don't disable block layout when forcing block alignment.
llvm-svn: 179355
Nadav Rotem [Fri, 12 Apr 2013 01:07:16 +0000 (01:07 +0000)]
Fix the test on linux by setting the triple and the align format
llvm-svn: 179354
Nadav Rotem [Fri, 12 Apr 2013 00:48:32 +0000 (00:48 +0000)]
Add a flag to align all basic blocks in the function.
When debugging performance regressions we often ask ourselves if the regression
that we see is due to poor isel/sched/ra or due to some micro-architetural
problem. When comparing two code sequences one good way to rule out front-end
bottlenecks (and other the issues) is to force code alignment. This pass adds
a flag that forces the alignment of all of the basic blocks in the program.
llvm-svn: 179353
Jordan Rose [Fri, 12 Apr 2013 00:44:24 +0000 (00:44 +0000)]
[analyzer] Fix grammar in comment.
By Adam Schnitzer!
llvm-svn: 179352
Jordan Rose [Fri, 12 Apr 2013 00:44:17 +0000 (00:44 +0000)]
[analyzer] Show "Returning from ..." note at caller's depth, not callee's.
Before:
1. Calling 'foo'
2. Doing something interesting
3. Returning from 'foo'
4. Some kind of error here
After:
1. Calling 'foo'
2. Doing something interesting
3. Returning from 'foo'
4. Some kind of error here
The location of the note is already in the caller, not the callee, so this
just brings the "depth" attribute in line with that.
This only affects plist diagnostic consumers (i.e. Xcode). It's necessary
for Xcode to associate the control flow arrows with the right stack frame.
<rdar://problem/
13634363>
llvm-svn: 179351
Jordan Rose [Fri, 12 Apr 2013 00:44:01 +0000 (00:44 +0000)]
[analyzer] Don't emit extra context arrow after returning from an inlined call.
In this code
int getZero() {
return 0;
}
void test() {
int problem = 1 / getZero(); // expected-warning {{Division by zero}}
}
we generate these arrows:
+-----------------+
| v
int problem = 1 / getZero();
^ |
+---+
where the top one represents the control flow up to the first call, and the
bottom one represents the flow to the division.* It turns out, however, that
we were generating the top arrow twice, as if attempting to "set up context"
after we had already returned from the call. This resulted in poor
highlighting in Xcode.
* Arguably the best location for the division is the '/', but that's a
different problem.
<rdar://problem/
13326040>
llvm-svn: 179350
Rafael Espindola [Fri, 12 Apr 2013 00:32:20 +0000 (00:32 +0000)]
Remove REQUIRES now that r179237 fixed the real problem.
llvm-svn: 179349
Jason Molenda [Fri, 12 Apr 2013 00:23:57 +0000 (00:23 +0000)]
Change the default for PlatformDarwinKernel to be enabled a la
settings set platform.plugin.darwin-kernel.search-locally-for-kexts true
llvm-svn: 179348
Douglas Gregor [Fri, 12 Apr 2013 00:23:25 +0000 (00:23 +0000)]
Make sure we have the include paths we need
llvm-svn: 179347
Douglas Gregor [Fri, 12 Apr 2013 00:18:53 +0000 (00:18 +0000)]
<rdar://problem/
13615607> Include SDK version information in the module hash.
This is a Darwin-SDK-specific hash criteria used to identify a
particular SDK without having to hash the contents of all of its
headers. If other platforms have such versioned files, we should add
those checks here.
llvm-svn: 179346
Rafael Espindola [Fri, 12 Apr 2013 00:17:33 +0000 (00:17 +0000)]
Add 179294 back, but don't use bit fields so that it works on big endian hosts.
Original message:
Print more information about relocations.
With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.
It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.
llvm-svn: 179345
Chad Rosier [Thu, 11 Apr 2013 23:57:29 +0000 (23:57 +0000)]
Add test case for r179343.
llvm-svn: 179344
Chad Rosier [Thu, 11 Apr 2013 23:57:04 +0000 (23:57 +0000)]
[ms-inline asm] Add support for using the LENGTH, TYPE, and SIZE operators with
variables that use namespace alias qualifiers. Test case coming on clang side
shortly.
Part of rdar://
13499009
llvm-svn: 179343
Enrico Granata [Thu, 11 Apr 2013 23:48:00 +0000 (23:48 +0000)]
New test suite option (-T)
When -T is specified, the test suite will call svn info and dump the output on screen (this used to be the default behavior)
When -T is not specified, this step won't be performed (the new default)
llvm-svn: 179342
Enrico Granata [Thu, 11 Apr 2013 23:40:59 +0000 (23:40 +0000)]
When specifying a relative path for the --framework option to dotest.py, Python would end up being confused and unable to locate the embedded_interpreter module, causing every testcase that uses the Script Interpreter (e.g. functionalities/data-formatter/data-formatter-stl/libstdcpp) to fail without even trying
This checkin fixes that problem by absolutizing the path before pushing it to the sys.path
llvm-svn: 179341
Chad Rosier [Thu, 11 Apr 2013 23:37:53 +0000 (23:37 +0000)]
Test case for r179339.
llvm-svn: 179340
Chad Rosier [Thu, 11 Apr 2013 23:37:34 +0000 (23:37 +0000)]
[ms-inline asm] Add support for using offsetof operator with variables that use
namespace alias qualifiers. Test case coming on clang side shortly.
Part of rdar://
13499009
llvm-svn: 179339
John McCall [Thu, 11 Apr 2013 23:25:27 +0000 (23:25 +0000)]
Flail at trying to appease various linuxy buildbots.
llvm-svn: 179338
Manman Ren [Thu, 11 Apr 2013 23:24:18 +0000 (23:24 +0000)]
Aliasing rules for struct-path aware TBAA.
Added PathAliases to check if two struct-path tags can alias.
Added command line option -struct-path-tbaa.
llvm-svn: 179337
Chad Rosier [Thu, 11 Apr 2013 23:24:15 +0000 (23:24 +0000)]
[ms-inline asm] Pass a StringRef reference to ParseIntelVarWithQualifier so we
can build up the identifier string. No test case as support for looking up
these type of identifiers hasn't been implemented on the clang side.
Part of rdar://
13499009
llvm-svn: 179336
Manman Ren [Thu, 11 Apr 2013 23:02:56 +0000 (23:02 +0000)]
Struct-path aware TBAA: uniformize scalar tag and path tag.
For struct-path aware TBAA, we used to use scalar type node as the scalar tag,
which has an incompatible format with the struct path tag. We now use the same
format: base type, access type and offset.
We also uniformize the scalar type node and the struct type node: name, a list
of pairs (offset + pointer to MDNode). For scalar type, we have a single pair.
These are to make implementaiton of aliasing rules easier.
llvm-svn: 179335
John McCall [Thu, 11 Apr 2013 22:55:55 +0000 (22:55 +0000)]
Fix the driver logic for recent versions of DragonFly.
Patch by John Marino.
llvm-svn: 179334
Enrico Granata [Thu, 11 Apr 2013 22:55:45 +0000 (22:55 +0000)]
<rdar://problem/
13558484>
This makes the dynamic values test case work for both libc++ and libstdcpp
llvm-svn: 179333
Jim Ingham [Thu, 11 Apr 2013 22:53:47 +0000 (22:53 +0000)]
Save away the locations at the site we hit and iterate over that collection. Otherwise the action of one location
could delete the other locations, and that would leave us iterating over a reduced size collection and crash.
<rdar://problem/
13592544>
llvm-svn: 179332
Manman Ren [Thu, 11 Apr 2013 22:51:30 +0000 (22:51 +0000)]
TBAA: add utility to create a TBAA scalar type node
llvm-svn: 179331
Enrico Granata [Thu, 11 Apr 2013 22:48:58 +0000 (22:48 +0000)]
<rdar://problem/
13623698>
This patch fixes the issue that we were using the C stack as a measure of depth of ValueObject hierarchies, in the sense that we were assuming that recursive ValueObject operations would never be deeper than the stack allows.
This assumption is easy to prove wrong, however.
For instance, after ~10k runs through this loop:
struct node
{
int value;
node* child;
node (int x)
{
value = x;
child = nullptr;
}
};
int main ()
{
node root(1);
node* ptr = &root;
int j = 2;
while (1)
{
ptr->child = new node(j++);
ptr = ptr->child;
}
return 0;
}
the deepmost child object will be deeper than the stack on most architectures, and we would be unable to display it
This checkin fixes the issue by introducing a notion of root of ValueObject hierarchies.
In a couple cases, we have to use an iterative algorithm instead of going to the root because we want to allow deeper customizations (e.g. formats, dynamic values).
While the patch passes our test suite without regressions, it is a good idea to keep eyes open for any unexpected behavior (recursion can be subtle..)
Also, I am hesitant to introduce a test case since failing at this will not just be marked as an "F", but most definitely crash LLDB.
llvm-svn: 179330
Greg Clayton [Thu, 11 Apr 2013 22:26:47 +0000 (22:26 +0000)]
<rdar://problem/
13370286>
Fixed a case there the OperatingSystemPython would try to access and play with SBValue objects when the process' public run lock was taken. Prior to this fix, all attempts to run any SBValue functions would fail if run from the private state thread (like updating the thread list). Now we have two run locks, one for public (all threads except the private state thread) and one for private.
llvm-svn: 179329
Greg Clayton [Thu, 11 Apr 2013 22:24:51 +0000 (22:24 +0000)]
Use std::unique_ptr instead of std::auto_ptr.
llvm-svn: 179328
Greg Clayton [Thu, 11 Apr 2013 22:24:25 +0000 (22:24 +0000)]
Fixed SBValueList to have a __str__ function like all other SB classes. Previously this was done as __repr__.
llvm-svn: 179327
Greg Clayton [Thu, 11 Apr 2013 22:23:34 +0000 (22:23 +0000)]
Fixed the thread list so it correctly updates after the first core thread exists.
llvm-svn: 179326
Chad Rosier [Thu, 11 Apr 2013 22:00:03 +0000 (22:00 +0000)]
[ms-inline asm] Add a new AsmRewriteKind, AOK_Delete. To be used in a future
commit.
Part of rdar://
13453209
llvm-svn: 179325
Chad Rosier [Thu, 11 Apr 2013 21:49:48 +0000 (21:49 +0000)]
Update test case for r179323.
llvm-svn: 179324
Chad Rosier [Thu, 11 Apr 2013 21:49:30 +0000 (21:49 +0000)]
[ms-inline asm] Remove brackets from around a symbol reference in the target
specific logic. This makes the code much less fragile. Test case coming on the
clang side in a moment.
rdar://
13634327
llvm-svn: 179323
Preston Gurd [Thu, 11 Apr 2013 21:39:01 +0000 (21:39 +0000)]
Use FileCheck instead of grep.
llvm-svn: 179322
Sean Callanan [Thu, 11 Apr 2013 21:16:36 +0000 (21:16 +0000)]
Hand over the job of laying out the argument structure
to the Materializer. Materialization is still done by
the ClangExpressionDeclMap; this will be the next thing
to move.
Also fixed a layout bug that this uncovered.
llvm-svn: 179318
David Majnemer [Thu, 11 Apr 2013 20:13:52 +0000 (20:13 +0000)]
Fix undefined behavior in AArch64
A64Imms::isLogicalImmBits and A64Imms::isLogicalImm will attempt to
execute shifts that perform undefined behavior. Instead of attempting
to perform the 64-bit rotation, treat it as a no-op.
llvm-svn: 179317
David Majnemer [Thu, 11 Apr 2013 20:05:46 +0000 (20:05 +0000)]
Optimize icmp involving addition better
Allows LLVM to optimize sequences like the following:
%add = add nsw i32 %x, 1
%cmp = icmp sgt i32 %add, %y
into:
%cmp = icmp sge i32 %x, %y
as well as:
%add1 = add nsw i32 %x, 20
%add2 = add nsw i32 %y, 57
%cmp = icmp sge i32 %add1, %add2
into:
%add = add nsw i32 %y, 37
%cmp = icmp sle i32 %cmp, %x
llvm-svn: 179316
Jack Carter [Thu, 11 Apr 2013 19:39:19 +0000 (19:39 +0000)]
Mips specific inline asm memory operand modifier test case
These changes are based on commit responses for r179135.
llvm-svn: 179315
Akira Hatanaka [Thu, 11 Apr 2013 19:29:26 +0000 (19:29 +0000)]
[mips] Custom-lower i64 MULHS and MULHU nodes. Remove the code which selects
multiply instructions in MipsSEDAGToDAGISel.
This patch was supposed to be part of r178403.
llvm-svn: 179314
Akira Hatanaka [Thu, 11 Apr 2013 19:07:14 +0000 (19:07 +0000)]
[mips] Clean up MipsISelDAGToDAG.cpp and MipsISelLowering.cpp.
- Rename function.
- Pass iterator by value.
- Remove header include.
No functionality changes.
llvm-svn: 179312
Reid Kleckner [Thu, 11 Apr 2013 19:01:17 +0000 (19:01 +0000)]
Widen the checks in the ms abi memptr test to work under NDEBUG
llvm-svn: 179311
Jyotsna Verma [Thu, 11 Apr 2013 18:56:34 +0000 (18:56 +0000)]
Exclude test30 of Sema/return.c for Hexagon since setjmp.h include file
is unavailable for Hexagon.
llvm-svn: 179310