platform/upstream/llvm.git
11 years ago[docs] Clarify wording.
Sean Silva [Tue, 12 Mar 2013 02:40:05 +0000 (02:40 +0000)]
[docs] Clarify wording.

"This documentation" could be construed as the entire c-t-e docs
(despite being under a doxygen heading; people read "locally"
sometimes), which gives a bad impression.

llvm-svn: 176849

11 years ago[docs] Add SourceWeb as external example.
Sean Silva [Tue, 12 Mar 2013 02:11:17 +0000 (02:11 +0000)]
[docs] Add SourceWeb as external example.

llvm-svn: 176848

11 years agoInitial check in of Doug's modularize tool for checking header readiness for modules...
John Thompson [Tue, 12 Mar 2013 02:07:30 +0000 (02:07 +0000)]
Initial check in of Doug's modularize tool for checking header readiness for modules, plus some changes per review feedback:  Removed system headers, changed to use stream output, added file name in message.

llvm-svn: 176847

11 years agoFor file & line breakpoints, if there are subsets of contiguous line table entries...
Jim Ingham [Tue, 12 Mar 2013 01:25:22 +0000 (01:25 +0000)]
For file & line breakpoints, if there are subsets of contiguous line table entries for the specified line, set the
breakpoint on the first one of each of the contiguous sub-sets of entries, and not all the others.

llvm-svn: 176846

11 years agoThe default configuration should be Debug, not DebugClang.
Jim Ingham [Tue, 12 Mar 2013 01:19:42 +0000 (01:19 +0000)]
The default configuration should be Debug, not DebugClang.

llvm-svn: 176845

11 years ago[mips] Rename function and variable names to start with proper case. Fix typos.
Akira Hatanaka [Tue, 12 Mar 2013 00:16:36 +0000 (00:16 +0000)]
[mips] Rename function and variable names to start with proper case. Fix typos.
Delete commented-out code.

llvm-svn: 176844

11 years agoUpdated the register numbering base documentation for the "gcc", "dwarf", "container...
Greg Clayton [Tue, 12 Mar 2013 00:14:38 +0000 (00:14 +0000)]
Updated the register numbering base documentation for the "gcc", "dwarf", "container-regs" and "invalidate-regs" key/value responses to the "qRegisterInfo" packet.

llvm-svn: 176843

11 years ago[Pass][Layout] Make algorithm not n^2.
Michael J. Spencer [Tue, 12 Mar 2013 00:10:00 +0000 (00:10 +0000)]
[Pass][Layout] Make algorithm not n^2.

This reduces the time spent in this function while linking ASTMatchersTests
from %43 to %2.4 of total link time.

llvm-svn: 176842

11 years agoCreated a sample "jump" command that handles
Sean Callanan [Tue, 12 Mar 2013 00:08:40 +0000 (00:08 +0000)]
Created a sample "jump" command that handles
GDB-style linespecs.  This command allows changing
the PC without manually looking up the new address.

llvm-svn: 176841

11 years agoLibCallSimplifier: optimize speed for short-lived instances
Meador Inge [Tue, 12 Mar 2013 00:08:29 +0000 (00:08 +0000)]
LibCallSimplifier: optimize speed for short-lived instances

Nadav reported a performance regression due to the work I did to
merge the library call simplifier into instcombine [1].  The issue
is that a new LibCallSimplifier object is being created whenever
InstCombiner::runOnFunction is called.  Every time a LibCallSimplifier
object is used to optimize a call it creates a hash table to map from
a function name to an object that optimizes functions of that name.
For short-lived LibCallSimplifier instances this is quite inefficient.
Especially for cases where no calls are actually simplified.

This patch fixes the issue by dropping the hash table and implementing
an explicit lookup function to correlate the function name to the object
that optimizes functions of that name.  This avoids the cost of always
building and destroying the hash table in cases where the LibCallSimplifier
object is short-lived and avoids the cost of building the table when no
simplifications are actually preformed.

On a benchmark containing 100,000 calls where none of them are simplified
I noticed a 30% speedup.  On a benchmark containing 100,000 calls where
all of them are simplified I noticed an 8% speedup.

[1] http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130304/167639.html

llvm-svn: 176840

11 years agoRemove support for versioned debug info.
David Blaikie [Mon, 11 Mar 2013 23:39:23 +0000 (23:39 +0000)]
Remove support for versioned debug info.

Versioned debug info support has been a burden to maintain & also compromised
current debug info verification by causing test cases testing old debug info to
remain rather than being updated to the latest. It also makes it hard to add or
change the metadata schema by requiring various backwards-compatibility in the
DI* hierarchy.

So it's being removed in preparation for new changes to the schema to tidy up
old/unnecessary fields and add new fields needed for new debug info (well, new
to LLVM at least).

The more surprising part of this is the changes to DI*::Verify - this became
necessary due to the changes to AsmWriter. AsmWriter was relying on the version
test to decide which bits of metadata were actually debug info when printing
the comment annotations. Without the version information the tag numbers were
too common & it would print debug info on random metadata that happened to
start with an integer that matched a tag number. Instead this change makes the
Verify functions more precise (just adding "number of operands" checks - not
type checking those operands yet) & relies on that to decide which metadata is
debug info metadata.

llvm-svn: 176838

11 years agoAdd asserts to DIBuilder & fix DINameSpace::Verify to allow unnamed namespaces.
David Blaikie [Mon, 11 Mar 2013 23:21:19 +0000 (23:21 +0000)]
Add asserts to DIBuilder & fix DINameSpace::Verify to allow unnamed namespaces.

llvm-svn: 176837

11 years agoResidual cleanup: live-out set is gone
Eli Bendersky [Mon, 11 Mar 2013 23:18:25 +0000 (23:18 +0000)]
Residual cleanup: live-out set is gone

llvm-svn: 176836

11 years agollvm/test/CodeGen/R600/schedule-*.ll: Let them require +Asserts.
NAKAMURA Takumi [Mon, 11 Mar 2013 23:16:30 +0000 (23:16 +0000)]
llvm/test/CodeGen/R600/schedule-*.ll: Let them require +Asserts.

llvm-svn: 176835

11 years agoUpgrading debug info test cases to be (more) compatible with the current debug info...
David Blaikie [Mon, 11 Mar 2013 22:37:40 +0000 (22:37 +0000)]
Upgrading debug info test cases to be (more) compatible with the current debug info format.

These cases were found by further work to remove support for debug info
versioning. Common cleanups (other than changing the version info in the tag
field) included adding the last parameter to compile_units (recently added for
fission support) and other cases of trailing fields in lexical blocks, compile
units, and subprograms.

llvm-svn: 176834

11 years agoChange Linux/POSIX to output inferior output in realtime.
Matt Kopec [Mon, 11 Mar 2013 22:31:31 +0000 (22:31 +0000)]
Change Linux/POSIX to output inferior output in realtime.

llvm-svn: 176833

11 years agoObjective-C: When using super.prop, property should be
Fariborz Jahanian [Mon, 11 Mar 2013 22:26:33 +0000 (22:26 +0000)]
Objective-C: When using super.prop, property should be
looked up the current class's super class.
// rdar://13349296

llvm-svn: 176832

11 years agoRemove duplicate test contents.
David Blaikie [Mon, 11 Mar 2013 22:10:14 +0000 (22:10 +0000)]
Remove duplicate test contents.

llvm-svn: 176831

11 years agoFix a crasher newly introduced in r176659/r176649, where fast-isel tries to
Nick Lewycky [Mon, 11 Mar 2013 21:44:37 +0000 (21:44 +0000)]
Fix a crasher newly introduced in r176659/r176649, where fast-isel tries to
lower an expect intrinsic that is a constant expression.

llvm-svn: 176830

11 years ago[analyzer] Look for calls along with lvalue nodes in trackNullOrUndefValue.
Jordan Rose [Mon, 11 Mar 2013 21:31:46 +0000 (21:31 +0000)]
[analyzer] Look for calls along with lvalue nodes in trackNullOrUndefValue.

r176737 fixed bugreporter::trackNullOrUndefValue to find nodes for an lvalue
even if the rvalue node had already been collected. This commit extends that
to call statement nodes as well, so that if a call is contained within
implicit casts we can still track the return value.

No test case because node reclamation is extremely finicky (dependent on
how the AST and CFG are built, and then on our current reclamation rules,
and /then/ on how many nodes were generated by the analyzer core and the
current set of checkers). I consider this a low-risk change, though, and
it will only happen in cases of reclamation when the rvalue node isn't
available.

<rdar://problem/13340764>

llvm-svn: 176829

11 years agoFixes disassembler crashes on 2013 Haswell RTM instructions.
Kevin Enderby [Mon, 11 Mar 2013 21:17:13 +0000 (21:17 +0000)]
Fixes disassembler crashes on 2013 Haswell RTM instructions.

rdar://13318048

llvm-svn: 176828

11 years agoDon't remove a landing pad if the invoke requires a table entry.
Bill Wendling [Mon, 11 Mar 2013 20:53:00 +0000 (20:53 +0000)]
Don't remove a landing pad if the invoke requires a table entry.

An invoke may require a table entry. For instance, when the function it calls
is expected to throw.
<rdar://problem/13360379>

llvm-svn: 176827

11 years agoDisallow using -fmodules with -no-integrated-as.
Ted Kremenek [Mon, 11 Mar 2013 20:51:52 +0000 (20:51 +0000)]
Disallow using -fmodules with -no-integrated-as.

Modules enables features such as auto-linking, and we simply do not want to
support a matrix of subtly enabled/disabled features depending on whether or
not a user is using the integrated assembler.

It isn't clear if this is the best place to do this check.  For one thing,
these kind of errors are not caught by the serialized diagnostics.

Fixes <rdar://problem/13289240>

llvm-svn: 176826

11 years agoBuildbot was failing to build. I guess classes declared in implementation files are...
Greg Clayton [Mon, 11 Mar 2013 20:02:03 +0000 (20:02 +0000)]
Buildbot was failing to build. I guess classes declared in implementation files are treated differently on various compilers causing a "friend class Foo;" to fail for forward declared classes in global namespace.

llvm-svn: 176823

11 years agoThis SO question: http://stackoverflow.com/questions/15344402/how-can-i-read-a-0xff...
Howard Hinnant [Mon, 11 Mar 2013 19:53:48 +0000 (19:53 +0000)]
This SO question:  stackoverflow.com/questions/15344402/how-can-i-read-a-0xff-in-a-file-with-libc-istream-iterator/15347225#15347225 highlighted the lack of a cast in the implementation of std::cin.  Added.  I unfortunately don't have a test case to add to the suite since this bug only shows itself when using std::cin.  The current testsuite setup does not have a way a good way to test std::cin.

llvm-svn: 176822

11 years ago<rdar://problem/13372857>
Greg Clayton [Mon, 11 Mar 2013 18:42:51 +0000 (18:42 +0000)]
<rdar://problem/13372857>

Fixed the exception breakpoints to always use a file filter to make setting exception breakpoint efficient.

llvm-svn: 176821

11 years agoImprove the caching of debuginfo Objective C interface types.
Adrian Prantl [Mon, 11 Mar 2013 18:33:46 +0000 (18:33 +0000)]
Improve the caching of debuginfo Objective C interface types.
Generate forward declarations that are RAUW'd by finalize().
We thus avoid outputting the same type several times in multiple
stages of completion.

llvm-svn: 176820

11 years agoR600: Fix JUMP handling so that MachineInstr verification can occur
Vincent Lejeune [Mon, 11 Mar 2013 18:15:06 +0000 (18:15 +0000)]
R600: Fix JUMP handling so that MachineInstr verification can occur

This allows R600 Target to use the newly created -verify-misched llc flag

llvm-svn: 176819

11 years ago[msan] intercept dlopen and clear shadow for it
Reid Kleckner [Mon, 11 Mar 2013 18:07:42 +0000 (18:07 +0000)]
[msan] intercept dlopen and clear shadow for it

Summary:
The loader does not call mmap() through the PLT because it has to
bootstrap the process before libc is present.  Hooking dlopen() isn't
enough either because the loader runs module initializers before
returning, and they could run arbitrary msan instrumented code.

If msandr is present, then we can intercept the mmaps from dlopen at the
syscall layer and clear the shadow there.  If msandr is missing, we
clear the shadow after dlopen() and hope any initializers are trivial.

Reviewers: eugenis

CC: kcc, llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D509

llvm-svn: 176818

11 years agoAdd -Wc99-compat warning for C11 unicode string and character literals.
Richard Smith [Mon, 11 Mar 2013 18:01:42 +0000 (18:01 +0000)]
Add -Wc99-compat warning for C11 unicode string and character literals.

llvm-svn: 176817

11 years agoPartly revert "Move clang tests that depend on llvm/ADT/Statistic.h to a subdir".
Jan Wen Voung [Mon, 11 Mar 2013 17:48:03 +0000 (17:48 +0000)]
Partly revert "Move clang tests that depend on llvm/ADT/Statistic.h to a subdir".

This reverts commit 176730, and uses "REQUIRES: asserts" instead.

llvm-svn: 176815

11 years ago[docs] Add ellipsis.
Sean Silva [Mon, 11 Mar 2013 17:07:47 +0000 (17:07 +0000)]
[docs] Add ellipsis.

llvm-svn: 176810

11 years agoMissing period in doc
Eli Bendersky [Mon, 11 Mar 2013 16:51:15 +0000 (16:51 +0000)]
Missing period in doc

llvm-svn: 176809

11 years agollvm/test/CodeGen/X86/handle-move.ll: Mark it as XFAIL:cygming. Investigating.
NAKAMURA Takumi [Mon, 11 Mar 2013 16:30:26 +0000 (16:30 +0000)]
llvm/test/CodeGen/X86/handle-move.ll: Mark it as XFAIL:cygming. Investigating.

llvm-svn: 176808

11 years ago[docs] Remove explicit authorship.
Sean Silva [Mon, 11 Mar 2013 16:25:16 +0000 (16:25 +0000)]
[docs] Remove explicit authorship.

In the spirit of r172109. Version control keeps a far more detailed
record of authorship anyways.

llvm-svn: 176807

11 years ago[libclang] Fix a test and a warning on windows.
Argyrios Kyrtzidis [Mon, 11 Mar 2013 16:03:17 +0000 (16:03 +0000)]
[libclang] Fix a test and a warning on windows.

Patch by Guy Benyei!

llvm-svn: 176806

11 years ago[Sanitizer] Implement BlockingMutex::CheckLocked()
Alexey Samsonov [Mon, 11 Mar 2013 15:45:20 +0000 (15:45 +0000)]
[Sanitizer] Implement BlockingMutex::CheckLocked()

llvm-svn: 176805

11 years ago[ASan] Reduce the local buffer size in Report() not to fail the check enforced when...
Alexander Potapenko [Mon, 11 Mar 2013 13:36:39 +0000 (13:36 +0000)]
[ASan] Reduce the local buffer size in Report() not to fail the check enforced when building TSan runtime.

llvm-svn: 176804

11 years agoAdd a test case for the 'vec_type_hint' attribute that was introduced in
Joey Gouly [Mon, 11 Mar 2013 12:38:45 +0000 (12:38 +0000)]
Add a test case for the 'vec_type_hint' attribute that was introduced in
r176686. I missed this file in the previous commit.

llvm-svn: 176803

11 years ago[ASan] Try to use a small (512 bytes) stack-local buffer in Report() for short messag...
Alexander Potapenko [Mon, 11 Mar 2013 11:47:43 +0000 (11:47 +0000)]
[ASan] Try to use a small (512 bytes) stack-local buffer in Report() for short messages, fall back to MmapOrDie() in the case of a failure.
This shall eliminate most of the cryptic "ERROR: failed to mmap" messages caused by recursively calling MmapOrDie() from MmapOrDie().

llvm-svn: 176802

11 years ago[ASan] don't call strerr from functions that map memory, since this results in malloc().
Alexander Potapenko [Mon, 11 Mar 2013 10:21:28 +0000 (10:21 +0000)]
[ASan] don't call strerr from functions that map memory, since this results in malloc().

llvm-svn: 176800

11 years ago[sanitizer] make SizeClassAllocator64::GetBlockBegin more bullet proof (by Sergey...
Kostya Serebryany [Mon, 11 Mar 2013 09:43:12 +0000 (09:43 +0000)]
[sanitizer] make SizeClassAllocator64::GetBlockBegin more bullet proof (by Sergey Matveev)

llvm-svn: 176799

11 years agoSuppress atomic(32|64).ll as XFAIL on win32 codegen. Investigating.
NAKAMURA Takumi [Mon, 11 Mar 2013 08:39:48 +0000 (08:39 +0000)]
Suppress atomic(32|64).ll as XFAIL on win32 codegen. Investigating.

llvm-svn: 176798

11 years agoR600MachineScheduler.cpp: Fix use cases of dbgs(). Don't include <iostream> here.
NAKAMURA Takumi [Mon, 11 Mar 2013 08:19:28 +0000 (08:19 +0000)]
R600MachineScheduler.cpp: Fix use cases of dbgs(). Don't include <iostream> here.

llvm-svn: 176797

11 years agoRemove date from test case file name. The PR number provides a unique ID already.
Lang Hames [Mon, 11 Mar 2013 03:49:23 +0000 (03:49 +0000)]
Remove date from test case file name. The PR number provides a unique ID already.

llvm-svn: 176796

11 years ago[ELF] Set values for bss_start and end symbols properly, If there are two load segmen...
Shankar Easwaran [Mon, 11 Mar 2013 01:38:22 +0000 (01:38 +0000)]
[ELF] Set values for bss_start and end symbols properly, If there are two load segments with RW permissions, bss_start and end may get set inappropriate

llvm-svn: 176795

11 years agoCorrect this error message, and most importantly make it distinct from the
Nick Lewycky [Sun, 10 Mar 2013 22:01:44 +0000 (22:01 +0000)]
Correct this error message, and most importantly make it distinct from the
error above. Based on a patch by Peter Zotov!

llvm-svn: 176794

11 years agoUse LLVMBool instead of 'bool' in the C API. Based on a patch by Peter Zotov!
Nick Lewycky [Sun, 10 Mar 2013 21:58:22 +0000 (21:58 +0000)]
Use LLVMBool instead of 'bool' in the C API. Based on a patch by Peter Zotov!

llvm-svn: 176793

11 years agoXcode seems to want these lines added to the project file.
Jason Molenda [Sun, 10 Mar 2013 21:56:57 +0000 (21:56 +0000)]
Xcode seems to want these lines added to the project file.

llvm-svn: 176792

11 years agoBBVectorize: Fixup debugging statements
Hal Finkel [Sun, 10 Mar 2013 20:57:42 +0000 (20:57 +0000)]
BBVectorize: Fixup debugging statements

After the recent data-structure improvements, a couple of debugging statements
were broken (printing pointer values).

llvm-svn: 176791

11 years agoMatch the new declaration of clang::ASTContext::getFunctionType introduced in clang...
Sylvestre Ledru [Sun, 10 Mar 2013 20:13:16 +0000 (20:13 +0000)]
Match the new declaration of clang::ASTContext::getFunctionType introduced in clang r176726. Fix the build of lldb

llvm-svn: 176790

11 years agoPR15480: fixed second parameter types of vec_lde, vec_lvebx, vec_lvehx, and vec_lvewx...
Anton Yartsev [Sun, 10 Mar 2013 16:25:43 +0000 (16:25 +0000)]
PR15480: fixed second parameter types of vec_lde, vec_lvebx, vec_lvehx, and vec_lvewx according to AltiVec Programming Interface Manual

llvm-svn: 176789

11 years agoDriver: do not strip file extensions when printing diagnostics.
Benjamin Kramer [Sun, 10 Mar 2013 13:16:18 +0000 (13:16 +0000)]
Driver: do not strip file extensions when printing diagnostics.

Before: clang-3: error: no input files
After:  clang-3.3: error: no input files

This means that we'll also print clang.exe on windows, but I don't see a problem
with that.

llvm-svn: 176788

11 years agoCleanup #includes.
Jakub Staszak [Sun, 10 Mar 2013 13:11:23 +0000 (13:11 +0000)]
Cleanup #includes.

llvm-svn: 176787

11 years agoFix indirect byval passing of records in address spaced memory. Allocate memory on...
Guy Benyei [Sun, 10 Mar 2013 12:59:00 +0000 (12:59 +0000)]
Fix indirect byval passing of records in address spaced memory. Allocate memory on stack, and memcpy the actual value before the call.

llvm-svn: 176786

11 years agoRemove unneeded #include.
Jakub Staszak [Sun, 10 Mar 2013 01:15:14 +0000 (01:15 +0000)]
Remove unneeded #include.

llvm-svn: 176785

11 years agoAdd some constantness in MachinePostDominators.h.
Jakub Staszak [Sun, 10 Mar 2013 01:14:42 +0000 (01:14 +0000)]
Add some constantness in MachinePostDominators.h.

llvm-svn: 176784

11 years agoRemove unneeded #includes. Use forward declarations instead.
Jakub Staszak [Sun, 10 Mar 2013 00:34:01 +0000 (00:34 +0000)]
Remove unneeded #includes. Use forward declarations instead.

llvm-svn: 176783

11 years agoRemove unneeded #includes. Use forward declarations instead.
Jakub Staszak [Sun, 10 Mar 2013 00:20:16 +0000 (00:20 +0000)]
Remove unneeded #includes. Use forward declarations instead.

llvm-svn: 176782

11 years agowww tweaks to embiggen up our near-complete C++11 and C11 support.
Richard Smith [Sun, 10 Mar 2013 00:11:00 +0000 (00:11 +0000)]
www tweaks to embiggen up our near-complete C++11 and C11 support.

llvm-svn: 176781

11 years agoWhen lexing in C11 mode, accept unicode character and string literals, per C11
Richard Smith [Sat, 9 Mar 2013 23:56:02 +0000 (23:56 +0000)]
When lexing in C11 mode, accept unicode character and string literals, per C11
6.4.4.4/1 and 6.4.5/1.

llvm-svn: 176780

11 years agoHandle _Pragma on a u8, u, or U string literal per the C11 specification. Also
Richard Smith [Sat, 9 Mar 2013 23:30:15 +0000 (23:30 +0000)]
Handle _Pragma on a u8, u, or U string literal per the C11 specification. Also
handle raw string literals here. C++11 doesn't yet specify how they will
behave, but discussion on core suggests that we should just strip off
everything but the r-char-sequence.

llvm-svn: 176779

11 years agoRemove an unused member variable from HelpPrinter. Move another member variable to...
Craig Topper [Sat, 9 Mar 2013 23:29:37 +0000 (23:29 +0000)]
Remove an unused member variable from HelpPrinter. Move another member variable to be a local variable in the only method that uses it.

llvm-svn: 176778

11 years agoDon't glue users to extract_subreg when selecting the llvm.arm.ldrexd
Lang Hames [Sat, 9 Mar 2013 22:56:09 +0000 (22:56 +0000)]
Don't glue users to extract_subreg when selecting the llvm.arm.ldrexd
intrinsic - it can cause impossible-to-schedule subgraphs to be
introduced.

PR15053.

llvm-svn: 176777

11 years agoRemove unneeded cast.
Jakub Staszak [Sat, 9 Mar 2013 19:34:14 +0000 (19:34 +0000)]
Remove unneeded cast.

llvm-svn: 176776

11 years agoRemove a source of nondeterminism from the LoopVectorizer.
Benjamin Kramer [Sat, 9 Mar 2013 19:22:40 +0000 (19:22 +0000)]
Remove a source of nondeterminism from the LoopVectorizer.

This made us emit runtime checks in a random order. Hopefully bootstrap
miscompares will go away now.

llvm-svn: 176775

11 years agoRemove unused diagnostic.
Benjamin Kramer [Sat, 9 Mar 2013 18:44:47 +0000 (18:44 +0000)]
Remove unused diagnostic.

llvm-svn: 176774

11 years agoFix test case.
Benjamin Kramer [Sat, 9 Mar 2013 18:34:27 +0000 (18:34 +0000)]
Fix test case.

llvm-svn: 176773

11 years agoTest case hygiene.
Benjamin Kramer [Sat, 9 Mar 2013 18:25:40 +0000 (18:25 +0000)]
Test case hygiene.

llvm-svn: 176772

11 years agoRemove unneeded const_cast.
Jakub Staszak [Sat, 9 Mar 2013 18:24:26 +0000 (18:24 +0000)]
Remove unneeded const_cast.

llvm-svn: 176771

11 years agoUse forward declaration instead of #include.
Jakub Staszak [Sat, 9 Mar 2013 18:05:34 +0000 (18:05 +0000)]
Use forward declaration instead of #include.

llvm-svn: 176770

11 years agoLoopVectorizer: Ignore all dbg intrinisic
Arnold Schwaighofer [Sat, 9 Mar 2013 16:27:27 +0000 (16:27 +0000)]
LoopVectorizer: Ignore all dbg intrinisic

Ignore all DbgIntriniscInfo instructions instead of just DbgValueInst.

llvm-svn: 176769

11 years agoLoopVectorizer: Ignore dbg.value instructions
Arnold Schwaighofer [Sat, 9 Mar 2013 15:56:34 +0000 (15:56 +0000)]
LoopVectorizer: Ignore dbg.value instructions

We want vectorization to happen at -g. Ignore calls to the dbg.value intrinsic
and don't transfer them to the vectorized code.

radar://13378964

llvm-svn: 176768

11 years agoMake helper function static.
Benjamin Kramer [Sat, 9 Mar 2013 15:15:22 +0000 (15:15 +0000)]
Make helper function static.

llvm-svn: 176767

11 years agoTLI: Microoptimize calls to strlen+memcmp to strncmp.
Benjamin Kramer [Sat, 9 Mar 2013 13:48:23 +0000 (13:48 +0000)]
TLI: Microoptimize calls to strlen+memcmp to strncmp.

The strlen+memcmp was hidden in a call to StringRef::operator==. We check if
there are any null bytes in the string upfront so we can simplify the comparison
Small speedup when compiling code with many function calls.

llvm-svn: 176766

11 years agoSimplify code. No functionality change.
Jakub Staszak [Sat, 9 Mar 2013 11:18:59 +0000 (11:18 +0000)]
Simplify code. No functionality change.

llvm-svn: 176765

11 years agoUse the correct index variable. This is the meat of what was supposed to be in
Nick Lewycky [Sat, 9 Mar 2013 10:13:26 +0000 (10:13 +0000)]
Use the correct index variable. This is the meat of what was supposed to be in
r176751. Also, learn a lesson about applying patches by hand/eyeball.

llvm-svn: 176764

11 years agoCommit the right files for r176762. Sigh.
Nick Lewycky [Sat, 9 Mar 2013 09:32:16 +0000 (09:32 +0000)]
Commit the right files for r176762. Sigh.

llvm-svn: 176763

11 years agoWe need a shndx if the number of sections breaks SHN_LORESERVE. This condition
Nick Lewycky [Sat, 9 Mar 2013 09:31:44 +0000 (09:31 +0000)]
We need a shndx if the number of sections breaks SHN_LORESERVE. This condition
for choosing to emit a shndx was simply testing the wrong variable.

llvm-svn: 176762

11 years agoRemove use of the ARMDisassembler framework from
Jason Molenda [Sat, 9 Mar 2013 07:03:32 +0000 (07:03 +0000)]
Remove use of the ARMDisassembler framework from
DNBArchImplARM.  This framework is no longer around;
all armv7 devices support using hardware breakpoints
to instruction single step.

llvm-svn: 176761

11 years agoAlso remove actual link against the ARMDisassembler framework from
Jason Molenda [Sat, 9 Mar 2013 06:19:31 +0000 (06:19 +0000)]
Also remove actual link against the ARMDisassembler framework from
debugserver's build settings.

llvm-svn: 176760

11 years agoWe don't need to specify the VALID_ARCHS in the xcode project file.
Jason Molenda [Sat, 9 Mar 2013 06:15:46 +0000 (06:15 +0000)]
We don't need to specify the VALID_ARCHS in the xcode project file.
Also, don't build debugserver with -DUSE_ARM_DISASSEMBLER_FRAMEWORK -
that framework isn't around at this point.

llvm-svn: 176759

11 years agoAdding -final-syntax-check to cpp11-migrate user docs
Edwin Vane [Sat, 9 Mar 2013 03:38:20 +0000 (03:38 +0000)]
Adding -final-syntax-check to cpp11-migrate user docs

llvm-svn: 176758

11 years agoSplitting cpp11-migrate transform docs into sub-pages
Edwin Vane [Sat, 9 Mar 2013 03:33:50 +0000 (03:33 +0000)]
Splitting cpp11-migrate transform docs into sub-pages

Each transform belongs in its own sub-page now. Minor refactoring to reflect
new heading levels.

llvm-svn: 176757

11 years ago[analyzer] Make Suppress IDC checker aware that it might not start from the same...
Anna Zaks [Sat, 9 Mar 2013 03:23:19 +0000 (03:23 +0000)]
[analyzer] Make Suppress IDC checker aware that it might not start from the same node it was registered at

The visitor used to assume that the value it’s tracking is null in the first node it examines. This is not true.
If we are registering the Suppress Inlined Defensive checks visitor while traversing in another visitor
(such as FindlastStoreVisitor). When we restart with the IDC visitor, the invariance of the visitor does
not hold since the symbol we are tracking no longer exists at that point.

I had to pass the ErrorNode when creating the IDC visitor, because, in some cases, node N is
neither the error node nor will be visible along the path (we had not finalized the path at that point
and are dealing with ExplodedGraph.)

We should revisit the other visitors which might not be aware that they might get nodes, which are
later in path than the trigger point.

This suppresses a number of inline defensive checks in JavaScriptCore.

llvm-svn: 176756

11 years ago[analyzer] Rename AttrNonNullChecker -> NonNullParamChecker
Anna Zaks [Sat, 9 Mar 2013 03:23:14 +0000 (03:23 +0000)]
[analyzer] Rename AttrNonNullChecker -> NonNullParamChecker

llvm-svn: 176755

11 years ago[analyzer] Add test case for reference to null pointer param check
Anna Zaks [Sat, 9 Mar 2013 03:23:10 +0000 (03:23 +0000)]
[analyzer] Add test case for reference to null pointer param check

This tests that we track the original Expr if getDerefExpr fails.

llvm-svn: 176754

11 years agoRemove my print statements I was using for debugging.
Greg Clayton [Sat, 9 Mar 2013 02:29:04 +0000 (02:29 +0000)]
Remove my print statements I was using for debugging.

llvm-svn: 176753

11 years ago<rdar://problem/13384282>
Greg Clayton [Sat, 9 Mar 2013 02:19:08 +0000 (02:19 +0000)]
<rdar://problem/13384282>

As much as I hate to leave this hacky code in that adds some d and q registers to ARM registers, I must leave it in.

The code is now fixed to not just assume ANY arm target will have registers in a certain order. We now verify the common regs are the same name and byte size before adding the d and q regs.

llvm-svn: 176752

11 years agoFix bug introduced in r176616 when making function identifier numbers stable.
Nick Lewycky [Sat, 9 Mar 2013 02:06:37 +0000 (02:06 +0000)]
Fix bug introduced in r176616 when making function identifier numbers stable.
Count the subprograms, not the compile units.

llvm-svn: 176751

11 years agoMade LLDB work with the latest Clang. Also fixed
Sean Callanan [Sat, 9 Mar 2013 01:59:31 +0000 (01:59 +0000)]
Made LLDB work with the latest Clang.  Also fixed
an assertion due to non-implicit Objective-C methods
without source locations.

llvm-svn: 176750

11 years ago[Driver][GNU] Accept and ignore more options.
Michael J. Spencer [Sat, 9 Mar 2013 01:41:37 +0000 (01:41 +0000)]
[Driver][GNU] Accept and ignore more options.

llvm-svn: 176749

11 years agoFix (possible) MSVC miscompile in debug mode.
Michael J. Spencer [Sat, 9 Mar 2013 01:41:27 +0000 (01:41 +0000)]
Fix (possible) MSVC miscompile in debug mode.

llvm-svn: 176748

11 years ago[Writer][ELF] Use correct data types for sizes. Fixes integer overflow bug.
Michael J. Spencer [Sat, 9 Mar 2013 01:41:16 +0000 (01:41 +0000)]
[Writer][ELF] Use correct data types for sizes. Fixes integer overflow bug.

This only happens when the section header count is > 1024.

llvm-svn: 176747

11 years agoDon't emit the extra checksum into the .gcda file if the user hasn't asked for
Nick Lewycky [Sat, 9 Mar 2013 01:33:12 +0000 (01:33 +0000)]
Don't emit the extra checksum into the .gcda file if the user hasn't asked for
it. Fortunately, versions of gcov that predate the extra checksum also ignore
any extra data, so this isn't a problem. This matches the API change made in
r176745.

llvm-svn: 176746

11 years agoDon't emit the extra checksum into the .gcda file if the user hasn't asked for
Nick Lewycky [Sat, 9 Mar 2013 01:33:06 +0000 (01:33 +0000)]
Don't emit the extra checksum into the .gcda file if the user hasn't asked for
it. Fortunately, versions of gcov that predate the extra checksum also ignore
any extra data, so this isn't a problem. There will be a matching commit in
compiler-rt.

llvm-svn: 176745

11 years ago[analyzer] Be more consistent about Objective-C methods that free memory.
Jordan Rose [Sat, 9 Mar 2013 00:59:10 +0000 (00:59 +0000)]
[analyzer] Be more consistent about Objective-C methods that free memory.

Previously, MallocChecker's pointer escape check and its post-call state
update for Objective-C method calls had a fair amount duplicated logic
and not-entirely-consistent checks. This commit restructures all this to
be more consistent and possibly allow us to be more aggressive in warning
about double-frees.

New policy (applies to system header methods only):
(1) If this is a method we know about, model it as taking/holding ownership
    of the passed-in buffer.
  (1a) ...unless there's a "freeWhenDone:" parameter with a zero (NO) value.
(2) If there's a "freeWhenDone:" parameter (but it's not a method we know
    about), treat the buffer as escaping if the value is non-zero (YES) and
    non-escaping if it's zero (NO).
(3) If the first selector piece ends with "NoCopy" (but it's not a method we
    know about and there's no "freeWhenDone:" parameter), treat the buffer
    as escaping.

The reason that (2) and (3) don't explicitly model the ownership transfer is
because we can't be sure that they will actually free the memory using free(),
and we wouldn't want to emit a spurious "mismatched allocator" warning
(coming in Anton's upcoming patch). In the future, we may have an idea of a
"generic deallocation", i.e. we assume that the deallocator is correct but
still continue tracking the region so that we can warn about double-frees.

Patch by Anton Yartsev, with modifications from me.

llvm-svn: 176744

11 years agoAdjust the special non-C++ enum block return type inference
John McCall [Sat, 9 Mar 2013 00:54:31 +0000 (00:54 +0000)]
Adjust the special non-C++ enum block return type inference
so that it looks through certain syntactic forms and applies
even if normal inference would have succeeded.

There is potential for source incompatibility from this
change, but overall we feel that it produces a much
cleaner and more defensible result, and the block
compatibility rules should curb a lot of the potential
for annoyance.

rdar://13200889

llvm-svn: 176743

11 years agoAdd TagDecl::hasNameForLinkage(), which is true if the tag
John McCall [Sat, 9 Mar 2013 00:54:27 +0000 (00:54 +0000)]
Add TagDecl::hasNameForLinkage(), which is true if the tag
is non-anonymous or is defined in a typedef of itself.

llvm-svn: 176742

11 years agoFix a reversed test for "for_expression" in creating C++ exception breakpoints.
Jim Ingham [Sat, 9 Mar 2013 00:48:58 +0000 (00:48 +0000)]
Fix a reversed test for "for_expression" in creating C++ exception breakpoints.
Add a missing "break" in processing the -h option to "breakpoint set".

llvm-svn: 176741