Quentin Colombet [Tue, 19 Mar 2013 21:46:49 +0000 (21:46 +0000)]
Update global merge pass according to Duncan's advices:
- Remove useless includes
- Change misleading comments
- Move code into doFinalization
llvm-svn: 177445
Tobias Grosser [Tue, 19 Mar 2013 21:44:07 +0000 (21:44 +0000)]
ScopDetect: Remove some redundant semicolons
llvm-svn: 177444
Howard Hinnant [Tue, 19 Mar 2013 21:34:48 +0000 (21:34 +0000)]
This is an optimization which produces improved launching time. There should be no functionality change. Clients should see no ABI differences.
llvm-svn: 177443
Jakob Stoklund Olesen [Tue, 19 Mar 2013 21:16:56 +0000 (21:16 +0000)]
Annotate X86InstrCompiler.td with SchedRW lists.
Add a new WriteZero SchedWrite type for the common dependency-breaking
instructions that clear a register.
llvm-svn: 177442
Chad Rosier [Tue, 19 Mar 2013 21:12:57 +0000 (21:12 +0000)]
Test case for r177439 and r177440.
llvm-svn: 177441
Chad Rosier [Tue, 19 Mar 2013 21:12:14 +0000 (21:12 +0000)]
[ms-inline asm] Remove the brackets from X86Operand in the IR. These will be
added back in by X86AsmPrinter::printIntelMemReference() during codegen.
Previously, this following example
void t() {
int i;
__asm mov eax, [i]
}
would generate the below assembly
mov eax, dword ptr [[eax]]
which resulted in a fatal error when compiling. Test case coming on the
clang side.
rdar://
13444264
llvm-svn: 177440
Chad Rosier [Tue, 19 Mar 2013 21:11:56 +0000 (21:11 +0000)]
[ms-inline asm] Create a helper function, CreateMemForInlineAsm, that creates
an X86Operand, but also performs a Sema lookup and adds the sizing directive
when appropriate. Use this when parsing a bracketed statement. This is
necessary to get the instruction matching correct as well. Test case coming
on clang side.
rdar://
13455408
llvm-svn: 177439
Tobias Grosser [Tue, 19 Mar 2013 21:11:25 +0000 (21:11 +0000)]
IndependentBlocks: Add a couple of test cases.
llvm-svn: 177438
Bill Wendling [Tue, 19 Mar 2013 21:03:22 +0000 (21:03 +0000)]
Register the GCOV writeout functions so that they're emitted serially.
We don't want to write out >1000 files at the same time. That could make things
prohibitively expensive. Instead, register the "writeout" function so that it's
emitted serially.
<rdar://problem/
12439551>
llvm-svn: 177437
Bill Wendling [Tue, 19 Mar 2013 21:01:19 +0000 (21:01 +0000)]
Add a way to register and execute "writeout" functions.
It may be prohibitively expensive to write out >1000 files at the same time. So
we would rather emit them serially. These functions allow the GCOV
implementation to register the functions that writeout the GCOV information per
compile unit. At exit, they are written.
<rdar://problem/
12439551>
llvm-svn: 177436
Fariborz Jahanian [Tue, 19 Mar 2013 20:27:40 +0000 (20:27 +0000)]
Objective-C [qoi]: Provide improved parse diagnostics when
closing rbrace is missing in an ObjC class declaration.
Can do beter than this, but it involves addition of
overhead which will be present in correct code.
// rdar://6854840
llvm-svn: 177435
Hal Finkel [Tue, 19 Mar 2013 20:22:32 +0000 (20:22 +0000)]
Add a comment to the CodeGen/PowerPC/asym-regclass-copy.ll test
llvm-svn: 177434
Tobias Grosser [Tue, 19 Mar 2013 20:15:19 +0000 (20:15 +0000)]
ScopDetection: Add a couple of test cases
llvm-svn: 177433
Arnaud A. de Grandmaison [Tue, 19 Mar 2013 20:00:22 +0000 (20:00 +0000)]
IndVarSimplify: do not recompute an IV value outside of the loop if :
- it is trivially known to be used inside the loop in a way that can not be optimized away
- there is no use outside of the loop which can take advantage of the computation hoisting
llvm-svn: 177432
Ulrich Weigand [Tue, 19 Mar 2013 19:53:27 +0000 (19:53 +0000)]
Add missing mayLoad flag to LHAUX8 and LWAUX.
All pre-increment load patterns need to set the mayLoad flag (since
they don't provide a DAG pattern).
This was missing for LHAUX8 and LWAUX, which is added by this patch.
llvm-svn: 177431
Ulrich Weigand [Tue, 19 Mar 2013 19:52:30 +0000 (19:52 +0000)]
Rewrite LHAU8 pattern to use standard memory operand.
As opposed to to pre-increment store patterns, the pre-increment
load patterns were already using standard memory operands, with
the sole exception of LHAU8.
As there's no real reason why LHAU8 should be different here,
this patch simply rewrites the pattern to also use a memri
operand, just like all the other patterns.
llvm-svn: 177430
Ulrich Weigand [Tue, 19 Mar 2013 19:52:04 +0000 (19:52 +0000)]
Rewrite pre-increment store patterns to use standard memory operands.
Currently, pre-increment store patterns are written to use two separate
operands to represent address base and displacement:
stwu $rS, $ptroff($ptrreg)
This causes problems when implementing the assembler parser, so this
commit changes the patterns to use standard (complex) memory operands
like in all other memory access instruction patterns:
stwu $rS, $dst
To still match those instructions against the appropriate pre_store
SelectionDAG nodes, the patch uses the new feature that allows a Pat
to match multiple DAG operands against a single (complex) instruction
operand.
Approved by Hal Finkel.
llvm-svn: 177429
Ulrich Weigand [Tue, 19 Mar 2013 19:51:09 +0000 (19:51 +0000)]
Extend TableGen instruction selection matcher to improve handling
of complex instruction operands (e.g. address modes).
Currently, if a Pat pattern creates an instruction that has a complex
operand (i.e. one that consists of multiple sub-operands at the MI
level), this operand must match a ComplexPattern DAG pattern with the
correct number of output operands.
This commit extends TableGen to alternatively allow match a complex
operands against multiple separate operands at the DAG level.
This allows using Pat patterns to match pre-increment nodes like
pre_store (which must have separate operands at the DAG level) onto
an instruction pattern that uses a multi-operand memory operand,
like the following example on PowerPC (will be committed as a
follow-on patch):
def STWU : DForm_1<37, (outs ptr_rc:$ea_res), (ins GPRC:$rS, memri:$dst),
"stwu $rS, $dst", LdStStoreUpd, []>,
RegConstraint<"$dst.reg = $ea_res">, NoEncode<"$ea_res">;
def : Pat<(pre_store GPRC:$rS, ptr_rc:$ptrreg, iaddroff:$ptroff),
(STWU GPRC:$rS, iaddroff:$ptroff, ptr_rc:$ptrreg)>;
Here, the pair of "ptroff" and "ptrreg" operands is matched onto the
complex operand "dst" of class "memri" in the "STWU" instruction.
Approved by Jakob Stoklund Olesen.
llvm-svn: 177428
Ulrich Weigand [Tue, 19 Mar 2013 19:50:30 +0000 (19:50 +0000)]
Fix sub-operand size mismatch in tocentry operands.
The tocentry operand class refers to 64-bit values (it is only used in 64-bit,
where iPTR is a 64-bit type), but its sole suboperand is designated as 32-bit
type. This causes a mismatch to be detected at compile-time with the TableGen
patch I'll check in shortly.
To fix this, this commit changes the suboperand to a 64-bit type as well.
llvm-svn: 177427
Ulrich Weigand [Tue, 19 Mar 2013 19:49:52 +0000 (19:49 +0000)]
Remove an invalid and unnecessary Pat pattern from the X86 backend:
def : Pat<(load (i64 (X86Wrapper tglobaltlsaddr :$dst))),
(MOV64rm tglobaltlsaddr :$dst)>;
This pattern is invalid because the MOV64rm instruction expects a
source operand of type "i64mem", which is a subclass of X86MemOperand
and thus actually consists of five MI operands, but the Pat provides
only a single MI operand ("tglobaltlsaddr" matches an SDnode of
type ISD::TargetGlobalTLSAddress and provides a single output).
Thus, if the pattern were ever matched, subsequent uses of the MOV64rm
instruction pattern would access uninitialized memory. In addition,
with the TableGen patch I'm about to check in, this would actually be
reported as a build-time error.
Fortunately, the pattern does in fact never match, for at least two
independent reasons.
First, the code generator actually never generates a pattern of the
form (load (X86Wrapper (tglobaltlsaddr))). For most combinations of
TLS and code models, (tglobaltlsaddr) represents just an offset that
needs to be added to some base register, so it is never directly
dereferenced. The only exception is the initial-exec model, where
(tglobaltlsaddr) refers to the (pc-relative) address of a GOT slot,
which *is* in fact directly dereferenced: but in that case, the
X86WrapperRIP node is used, not X86Wrapper, so the Pat doesn't match.
Second, even if some patterns along those lines *were* ever generated,
we should not need an extra Pat pattern to match it. Instead, the
original MOV64rm instruction pattern ought to match directly, since
it uses an "addr" operand, which is implemented via the SelectAddr
C++ routine; this routine is supposed to accept the full range of
input DAGs that may be implemented by a single mov instruction,
including those cases involving ISD::TargetGlobalTLSAddress (and
actually does so e.g. in the initial-exec case as above).
To avoid build breaks (due to the above-mentioned error) after the
TableGen patch is checked in, I'm removing this Pat here.
llvm-svn: 177426
Greg Clayton [Tue, 19 Mar 2013 19:30:33 +0000 (19:30 +0000)]
Update Sketch test case to capture this and use accessors for debugger, target, process and thread.
llvm-svn: 177425
Andy Gibbs [Tue, 19 Mar 2013 19:13:36 +0000 (19:13 +0000)]
Fix "control reaches end of non-void function" compiling lld on gcc.
llvm-svn: 177424
Hal Finkel [Tue, 19 Mar 2013 18:51:05 +0000 (18:51 +0000)]
Prepare to make r0 an allocatable register on PPC
Currently the PPC r0 register is unconditionally reserved. There are two reasons
for this:
1. r0 is treated specially (as the constant 0) by certain instructions, and so
cannot be used with those instructions as a regular register.
2. r0 is used as a temporary register in the CR-register spilling process
(where, under some circumstances, we require two GPRs).
This change addresses the first reason by introducing a restricted register
class (without r0) for use by those instructions that treat r0 specially. These
register classes have a new pseudo-register, ZERO, which represents the r0-as-0
use. This has the side benefit of making the existing target code simpler (and
easier to understand), and will make it clear to the register allocator that
uses of r0 as 0 don't conflict will real uses of the r0 register.
Once the CR spilling code is improved, we'll be able to allocate r0.
Adding these extra register classes, for some reason unclear to me, causes
requests to the target to copy 32-bit registers to 64-bit registers. The
resulting code seems correct (and causes no test-suite failures), and the new
test case covers this new kind of asymmetric copy.
As r0 is still reserved, no functionality change intended.
llvm-svn: 177423
Edwin Vane [Tue, 19 Mar 2013 18:47:03 +0000 (18:47 +0000)]
Don't replace macro usage if macro body has NULL
In case of macro body expansion, check to see if the macro is named NULL and
don't replace inside the macro body. This fixes the case when NULL appears
inside the macro body and the transform replaces the usage of the macro with
nullptr. This is an easy fix for the problem for now and we should analyze the
macro body to see if it expands to only NullToPointer in the future for a more
robust solution that takes care of user defined macros that behaves like NULL.
Other changes:
- Moved complex macro tests to macros.cpp
- Added new test cases.
- Added checks to make sure that the macro bodies are not modified by the tool.
Fixes: PR15396
Author: Tareq A Siraj <tareq.a.siraj@intel.com>
llvm-svn: 177422
Nadav Rotem [Tue, 19 Mar 2013 18:38:27 +0000 (18:38 +0000)]
Optimize sext <4 x i8> and <4 x i16> to <4 x i64>.
Patch by Ahmad, Muhammad T <muhammad.t.ahmad@intel.com>
llvm-svn: 177421
Daniel Jasper [Tue, 19 Mar 2013 18:33:58 +0000 (18:33 +0000)]
Fix indentation for case: // comment.
Before:
switch (x) {
case 1:
// Do amazing stuff
{
g();
f();
}
}
After:
switch (x) {
case 1:
// Do amazing stuff
{
g();
f();
}
}
llvm-svn: 177420
Adrian Prantl [Tue, 19 Mar 2013 18:20:35 +0000 (18:20 +0000)]
Relax test to allow for attributes on other architectures. Caught by powerpc64-unknown-linux-gnu buildbot.
llvm-svn: 177419
Jakob Stoklund Olesen [Tue, 19 Mar 2013 18:03:58 +0000 (18:03 +0000)]
Annotate X86InstrExtension.td with SchedRW lists.
llvm-svn: 177418
Jakob Stoklund Olesen [Tue, 19 Mar 2013 18:03:55 +0000 (18:03 +0000)]
Annotate a lot of X86InstrInfo.td with SchedRW lists.
llvm-svn: 177417
Greg Clayton [Tue, 19 Mar 2013 17:59:30 +0000 (17:59 +0000)]
Fixed incorrect python that was trying to validate that we got a valid lldb.SBThread object by checking to see if it is equal to "None".
This test is incorrect as functions that return lldb.SBThread objects never return None, they just return lldb.SBThread objects that contain invalid opaque classes.
llvm-svn: 177416
Alexander Kornienko [Tue, 19 Mar 2013 17:41:36 +0000 (17:41 +0000)]
Split long lines in multi-line comments.
Summary: This is implementation for /* */ comments only.
Reviewers: djasper, klimek
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D547
llvm-svn: 177415
Chad Rosier [Tue, 19 Mar 2013 17:32:36 +0000 (17:32 +0000)]
Update test for r177413.
llvm-svn: 177414
Chad Rosier [Tue, 19 Mar 2013 17:32:17 +0000 (17:32 +0000)]
[ms-inline asm] Move the size directive asm rewrite into the target specific
logic as a QOI cleanup.
rdar://
13445327
llvm-svn: 177413
Eli Bendersky [Tue, 19 Mar 2013 16:04:19 +0000 (16:04 +0000)]
Update documentation of llvm-link to reflect recent cleanups.
llvm-svn: 177411
Eli Bendersky [Tue, 19 Mar 2013 16:04:02 +0000 (16:04 +0000)]
Remove stale comment
llvm-svn: 177410
Alexey Samsonov [Tue, 19 Mar 2013 15:33:18 +0000 (15:33 +0000)]
Fix for r177390: map values are pointers, use DeleteContainerSeconds() instead of .clear()
llvm-svn: 177409
Tobias Grosser [Tue, 19 Mar 2013 15:30:48 +0000 (15:30 +0000)]
cindex.py: Handle NULL pointers when parsing translation units
The code inside cindex.py was comparing NULL pointer returned by
clang_parseTranslationUnit and clang_createTranslationUnit with None.
However, as illustrated by the two tests I've added, those conditions
were ineffective which resulted in assert triggering later on.
Instead, a pointer is now treated as a boolean value, a NULL pointer being
False.
Contributed-by: Xavier Deguillard <deguilx@gmail.com>
llvm-svn: 177408
Evgeniy Stepanov [Tue, 19 Mar 2013 15:26:41 +0000 (15:26 +0000)]
[asan] s/ASAN_POSIX/SANITIZER_POSIX/
llvm-svn: 177407
Eli Bendersky [Tue, 19 Mar 2013 15:26:24 +0000 (15:26 +0000)]
The Linker interface has some dead code after the cleanup in r172749
(and possibly others). The attached patch removes it, and tries to
update comments accordingly.
llvm-svn: 177406
Hal Finkel [Tue, 19 Mar 2013 15:23:39 +0000 (15:23 +0000)]
Cleanup PPC64 unaligned i64 load/store
Remove an accidentally-added instruction definition and add a comment in the
test case. This is in response to a post-commit review by Bill Schmidt.
No functionality change intended.
llvm-svn: 177404
Sean Silva [Tue, 19 Mar 2013 15:22:02 +0000 (15:22 +0000)]
[docs] Remove incorrect information about lit.
Lit does support redirects in the 2>&1 style.
llvm-svn: 177403
Rafael Espindola [Tue, 19 Mar 2013 15:03:47 +0000 (15:03 +0000)]
Don't try to set attributes in alias, they have none.
llvm-svn: 177402
Evgeniy Stepanov [Tue, 19 Mar 2013 14:54:17 +0000 (14:54 +0000)]
[sanitizer] More renamed macros.
llvm-svn: 177401
Evgeniy Stepanov [Tue, 19 Mar 2013 14:33:38 +0000 (14:33 +0000)]
[sanitizer] Replace more platform checks with SANITIZER_ constants.
llvm-svn: 177400
Rafael Espindola [Tue, 19 Mar 2013 14:32:23 +0000 (14:32 +0000)]
Revert r177329.
If this should not happen, we should have an assert.
If it should happen, we should have a test and remove the comment.
In no case should we have this self inconsistent code.
llvm-svn: 177399
Rafael Espindola [Tue, 19 Mar 2013 14:23:00 +0000 (14:23 +0000)]
Go back to using the integrated assembler on windows ever when passed
-no-integrated-as. It is the only assembler we have there.
llvm-svn: 177398
Evgeniy Stepanov [Tue, 19 Mar 2013 13:54:41 +0000 (13:54 +0000)]
[sanitizer] Move ASan platform macros to sanitizer_common and rename them appropriately.
llvm-svn: 177397
Alexey Samsonov [Tue, 19 Mar 2013 13:34:23 +0000 (13:34 +0000)]
Don't use --sysroot to linux SDK when building libprofile - SDK on Linux seems to be incomplete.
llvm-svn: 177396
Dmitry Vyukov [Tue, 19 Mar 2013 13:34:12 +0000 (13:34 +0000)]
tsan: fix build
llvm-svn: 177395
Dmitry Vyukov [Tue, 19 Mar 2013 12:25:48 +0000 (12:25 +0000)]
tsan: flush dead thread info earlier (when another thread is finished rather than new thread is created)
llvm-svn: 177394
Dmitry Vyukov [Tue, 19 Mar 2013 12:24:19 +0000 (12:24 +0000)]
tsan: instruct malloc() to consume less memory
llvm-svn: 177393
Alexey Samsonov [Tue, 19 Mar 2013 11:41:16 +0000 (11:41 +0000)]
Add virtual destructors to fix -Wnon-virtual-dtor warnings
llvm-svn: 177392
Alexey Samsonov [Tue, 19 Mar 2013 10:48:37 +0000 (10:48 +0000)]
[ASan] Make -fsanitize=address always imply -fsanitize=init-order
llvm-svn: 177391
Dmitry Vyukov [Tue, 19 Mar 2013 10:24:42 +0000 (10:24 +0000)]
llvm-symbolizer: flush internal caches functionality
llvm-svn: 177390
Dmitry Vyukov [Tue, 19 Mar 2013 10:24:01 +0000 (10:24 +0000)]
tsan: symbolizer "flush caches" support
llvm-svn: 177389
Dmitry Vyukov [Tue, 19 Mar 2013 10:23:17 +0000 (10:23 +0000)]
tsan: symbolizer "flush caches" functinality
llvm-svn: 177388
Dmitry Vyukov [Tue, 19 Mar 2013 10:22:33 +0000 (10:22 +0000)]
tsan: fix memory leak
llvm-svn: 177387
David Tweed [Tue, 19 Mar 2013 10:16:40 +0000 (10:16 +0000)]
The testing to ensure a vector of zeros of type floating point isn't misclassified as negative zero can be simplified, as pointed out by Duncan Sands.
llvm-svn: 177386
Alexey Samsonov [Tue, 19 Mar 2013 10:10:03 +0000 (10:10 +0000)]
Enable -Wnon-virtual-dtor build warning
llvm-svn: 177385
Evgeniy Stepanov [Tue, 19 Mar 2013 09:39:15 +0000 (09:39 +0000)]
[sanitizer] Avoid use of uintptr_t.
llvm-svn: 177384
Evgeniy Stepanov [Tue, 19 Mar 2013 09:30:52 +0000 (09:30 +0000)]
[sanitizer] Don't adjust the size of the user-allocated stack.
Moved this code to sanitizer_common.
llvm-svn: 177383
Alexey Samsonov [Tue, 19 Mar 2013 09:17:35 +0000 (09:17 +0000)]
Support CMake build of profile runtime library on Linux
llvm-svn: 177382
Dmitry Vyukov [Tue, 19 Mar 2013 09:15:31 +0000 (09:15 +0000)]
tsan: do not allocate sync vars on relaxed atomic operations
helps to reduce memory consumption if an atomic is used only with relaxed ops (stats)
llvm-svn: 177381
Renato Golin [Tue, 19 Mar 2013 08:15:38 +0000 (08:15 +0000)]
Improve long vector sext/zext lowering on ARM
The ARM backend currently has poor codegen for long sext/zext
operations, such as v8i8 -> v8i32. This patch addresses this
by performing a custom expansion in ARMISelLowering. It also
adds/changes the cost of such lowering in ARMTTI.
This partially addresses PR14867.
Patch by Pete Couperus
llvm-svn: 177380
Hal Finkel [Tue, 19 Mar 2013 08:09:38 +0000 (08:09 +0000)]
Don't reserve R31 on PPC64 unless the frame pointer is needed
llvm-svn: 177379
John McCall [Tue, 19 Mar 2013 07:04:25 +0000 (07:04 +0000)]
Add a clarifying note when a return statement is rejected because
we expect a related result type.
rdar://
12493140
llvm-svn: 177378
Andrew Trick [Tue, 19 Mar 2013 05:10:27 +0000 (05:10 +0000)]
Revert "Cleanup some SCEV logic a bit."
This reverts commit
82cd8f7382322bee7a71cdc31f7a923c44d37d32.
Just add a comment instead!
llvm-svn: 177377
Greg Clayton [Tue, 19 Mar 2013 04:41:22 +0000 (04:41 +0000)]
More cleanup on the lldb-perf code:
- TestCase.m_thread is now filled in with the first thread that has a valid
stop reason. This eliminates the need for the SelectMyThread() functions.
- The first thread that stops for a reason is also set as the selected thread
in the process in case any command line commands are run.
- Changed launch over to take a SBLaunchInfo parameter so that the launch
function doesn't keep getting new arguments as they are needed.
- TestCase::Setup() and TestCase::Launch(SBLaunchInfo) now return bool to
indicate success of setup and launch.
- ActionWanted::Next(SBThread) was renamed to ActionWanted::StepOver(SBThread)
- ActionWanted::Finish(SBThread) was renamed to ActionWanted::StepOut(SBThread)
llvm-svn: 177376
Andrew Trick [Tue, 19 Mar 2013 04:14:59 +0000 (04:14 +0000)]
Cleanup some SCEV logic a bit.
Make the code more obvious to scan-build and humans.
llvm-svn: 177375
Andrew Trick [Tue, 19 Mar 2013 04:14:57 +0000 (04:14 +0000)]
Tighten up an internal LSR API that should check for NULL.
No test case, but should fix a scan_build warning.
llvm-svn: 177374
Sean Callanan [Tue, 19 Mar 2013 01:45:02 +0000 (01:45 +0000)]
Fixed handling of function pointers in the IR
interpreter. They now have correct values, even
when the process is not running.
llvm-svn: 177372
Nick Lewycky [Tue, 19 Mar 2013 01:37:55 +0000 (01:37 +0000)]
Emit the linkage name instead of the function name, when available. This means
that we'll prefer to emit the mangled C++ name (pending a clang change).
llvm-svn: 177371
Douglas Gregor [Tue, 19 Mar 2013 00:41:04 +0000 (00:41 +0000)]
Remove stray semicolon
llvm-svn: 177370
Douglas Gregor [Tue, 19 Mar 2013 00:38:50 +0000 (00:38 +0000)]
Minor optimization to r177367 to treat a module with missing dependencies as out-of-date rather than missing.
llvm-svn: 177369
Rafael Espindola [Tue, 19 Mar 2013 00:36:57 +0000 (00:36 +0000)]
Finish refactoring the tool selection logic.
The general pattern now is that Foobar::constructTool only creates tools
defined in the tools::foobar namespace and then delegates to the parent.
The remaining duplicated code is now in the tools themselves.
llvm-svn: 177368
Douglas Gregor [Tue, 19 Mar 2013 00:28:20 +0000 (00:28 +0000)]
<rdar://problem/
13363214> Eliminate race condition between module rebuild and the global module index.
The global module index was querying the file manager for each of the
module files it knows about at load time, to prune out any out-of-date
information. The file manager would then cache the results of the
stat() falls used to find that module file.
Later, the same translation unit could end up trying to import one of the
module files that had previously been ignored by the module cache, but
after some other Clang instance rebuilt the module file to bring it
up-to-date. The stale stat() results in the file manager would
trigger a second rebuild of the already-up-to-date module, causing
failures down the line.
The global module index now lazily resolves its module file references
to actual AST reader module files only after the module file has been
loaded, eliminating the stat-caching race. Moreover, the AST reader
can communicate to its caller that a module file is missing (rather
than simply being out-of-date), allowing us to simplify the
module-loading logic and allowing the compiler to recover if a
dependent module file ends up getting deleted.
llvm-svn: 177367
Enrico Granata [Tue, 19 Mar 2013 00:27:22 +0000 (00:27 +0000)]
This checkin removes the last Cocoa formatters that were implemented in Python and reimplements them in C++. The Python Cocoa formatters are not shipped as part of LLDB anymore, but still exist in the source repository for user reference. Python formatters still exist for STL classes and users can still define their own Python formatters
llvm-svn: 177366
Greg Clayton [Tue, 19 Mar 2013 00:20:55 +0000 (00:20 +0000)]
<rdar://problem/
13443931>
Fixed a crasher in the SourceManager where it wasn't checking the m_target member variable for NULL.
In doing this fix, I hardened this class to have weak pointers to the debugger and target in case they do go away. I also changed SBSourceManager to hold onto weak pointers to the debugger and target so they don't keep objects alive by holding a strong reference to them.
llvm-svn: 177365
Sean Callanan [Tue, 19 Mar 2013 00:10:07 +0000 (00:10 +0000)]
Refactored the expression parser so that the IR
and the JITted code are managed by a standalone
class that handles memory management itself.
I have removed RecordingMemoryManager and
ProcessDataAllocator, which filled similar roles
and had confusing ownership, with a common class
called IRExecutionUnit. The IRExecutionUnit
manages all allocations ever made for an expression
and frees them when it goes away. It also contains
the code generator and can vend the Module for an
expression to other clases.
The end goal here is to make the output of the
expression parser re-usable; that is, to avoid
re-parsing when re-parsing isn't necessary.
I've also cleaned up some code and used weak pointers
in more places. Please let me know if you see any
leaks; I checked myself as well but I might have
missed a case.
llvm-svn: 177364
Richard Smith [Tue, 19 Mar 2013 00:04:20 +0000 (00:04 +0000)]
Update ubsan test for clang change r177362.
llvm-svn: 177363
Richard Smith [Tue, 19 Mar 2013 00:01:12 +0000 (00:01 +0000)]
PR15383: When -fsanitize=float-cast-overflow checks a float-to-int conversion,
it wasn't taking into account that the float should be truncated *before* the
range check happens. Thus (unsigned)-0.99 and (unsigned char)255.9 have defined
behavior and should not be trapped.
llvm-svn: 177362
Hal Finkel [Mon, 18 Mar 2013 23:58:28 +0000 (23:58 +0000)]
Fix a sign-extension bug in PPCCTRLoops
Don't sign extend the immediate value from the OR instruction in
an LIS/OR pair.
llvm-svn: 177361
Rafael Espindola [Mon, 18 Mar 2013 23:56:07 +0000 (23:56 +0000)]
Centralize the logic for using the integrated assembler.
llvm-svn: 177360
Argyrios Kyrtzidis [Mon, 18 Mar 2013 23:54:50 +0000 (23:54 +0000)]
[libclang] Modify clang_getCursorType to be able to handle a function template decl.
llvm-svn: 177359
Fariborz Jahanian [Mon, 18 Mar 2013 23:45:52 +0000 (23:45 +0000)]
documentation comment parsing. Added couple of
top-level HeaderDoc tags @functiongroup and
@methodgroup to doc. tags recognized.
// rdar://
12379114
llvm-svn: 177358
Jakub Staszak [Mon, 18 Mar 2013 23:45:45 +0000 (23:45 +0000)]
Move #include of BitVector from .h to .cpp file.
Also remove unneeded #include and forward declaration.
llvm-svn: 177357
Jakub Staszak [Mon, 18 Mar 2013 23:40:46 +0000 (23:40 +0000)]
Add some constantness.
llvm-svn: 177356
Marshall Clow [Mon, 18 Mar 2013 23:39:36 +0000 (23:39 +0000)]
Fix bug in test; found by AddressSanitizer
llvm-svn: 177355
Richard Smith [Mon, 18 Mar 2013 23:37:25 +0000 (23:37 +0000)]
Diagnose uses of 'alignof' on functions in -pedantic mode.
llvm-svn: 177354
Jordan Rose [Mon, 18 Mar 2013 23:34:37 +0000 (23:34 +0000)]
[analyzer] Do part of the work to find shortest bug paths up front.
Splitting the graph trimming and the path-finding (r177216) already
recovered quite a bit of performance lost to increased suppression.
We can still do better by also performing the reverse BFS up front
(needed for shortest-path-finding) and only walking the shortest path
for each report. This does mean we have to walk back up the path and
invalidate all the BFS numbers if the report turns out to be invalid,
but it's probably still faster than redoing the full BFS every time.
More performance work for <rdar://problem/
13433687>
llvm-svn: 177353
Jordan Rose [Mon, 18 Mar 2013 23:34:32 +0000 (23:34 +0000)]
[analyzer] Replace uses of assume() with isNull() in BR visitors.
Also, replace a std::string with a SmallString.
No functionality change.
llvm-svn: 177352
Jakub Staszak [Mon, 18 Mar 2013 23:33:44 +0000 (23:33 +0000)]
Remove unneeded #includes.
llvm-svn: 177351
Jakub Staszak [Mon, 18 Mar 2013 23:33:14 +0000 (23:33 +0000)]
Make methods const.
llvm-svn: 177350
Chad Rosier [Mon, 18 Mar 2013 23:32:33 +0000 (23:32 +0000)]
Test case for r177347.
llvm-svn: 177349
Jakub Staszak [Mon, 18 Mar 2013 23:31:30 +0000 (23:31 +0000)]
Make method private. Keep coding standard.
llvm-svn: 177348
Chad Rosier [Mon, 18 Mar 2013 23:31:24 +0000 (23:31 +0000)]
[ms-inline asm] Avoid emitting a redundant sizing directive, if we've already
parsed one. Test case coming shortly.
rdar://
13446980
llvm-svn: 177347
Greg Clayton [Mon, 18 Mar 2013 23:25:00 +0000 (23:25 +0000)]
Fixed the README to match the current code.
llvm-svn: 177346
David Blaikie [Mon, 18 Mar 2013 23:22:28 +0000 (23:22 +0000)]
PR15539: Record "evaluating if/elif condition" flag in the right place
The previous implementation missed the case where the elif condition was
evaluated from the context of an #ifdef that was false causing PR15539.
llvm-svn: 177345
Bill Wendling [Mon, 18 Mar 2013 23:11:54 +0000 (23:11 +0000)]
Update testcase for r177340.
llvm-svn: 177344
Jim Ingham [Mon, 18 Mar 2013 23:08:30 +0000 (23:08 +0000)]
Add a comment about how to add a target for a test case.
llvm-svn: 177343