Commit Graph

138614 Commits

Author SHA1 Message Date
Anna Zaks 9cadaa7ef8 [analyzer] Rename the option help to reflect better what it does.
llvm-svn: 169640
2012-12-07 21:51:50 +00:00
Anna Zaks 5d484780fb [analyzer] Optimization heuristic: do not reanalyze every ObjC method as
top level.

This heuristic is already turned on for non-ObjC methods
(inlining-mode=noredundancy). If a method has been previously analyzed,
while being inlined inside of another method, do not reanalyze it as top
level.

This commit applies it to ObjCMethods as well. The main caveat here is
that to catch the retain release errors, we are still going to reanalyze
all the ObjC methods but without inlining turned on.

Gives 21% performance increase on one heavy ObjC benchmark, which
suffered large performance regressions due to ObjC inlining.

llvm-svn: 169639
2012-12-07 21:51:47 +00:00
Nadav Rotem ad0b5fbe8c When we use the BLEND instruction that uses the MSB as a mask, we can remove
the VSRI instruction before it since it does not affect the MSB.

Thanks Craig Topper for suggesting this.

llvm-svn: 169638
2012-12-07 21:43:11 +00:00
Michael Ilseman e76c1e5aec Remove trailing whitespace
llvm-svn: 169637
2012-12-07 21:41:53 +00:00
David Blaikie a00d9caa8f Unbreak the C++98 build.
llvm-svn: 169636
2012-12-07 21:39:54 +00:00
Matthew Curtis 7a93811e8b In hexagon convertToHardwareLoop, don't deref end() iterator
In particular, check if MachineBasicBlock::iterator is end() before
using it to call getDebugLoc();

See also this thread on llvm-commits:
   http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121112/155914.html

llvm-svn: 169634
2012-12-07 21:03:15 +00:00
Daniel Malea 89660bf795 More Linux warnings fixes (remove default labels as needed):
- as per http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations

Patch by Matt Kopec!

llvm-svn: 169633
2012-12-07 20:51:09 +00:00
Daniel Jasper 4ec32d3d90 AST matcher tutorial (Part I)
This an AST matcher tutorial based on Sam Panzer's document
(https://docs.google.com/a/google.com/document/d/1oTkVLhCdRJUEH1_LDaQdXqe8-aOqT5GLDL9e4MhoFF8/edit).

Checking in now although some parts might be a bit rough so others can
help improving it.

llvm-svn: 169632
2012-12-07 20:34:49 +00:00
Jordan Rose 9a33913645 [analyzer] Fix r168019 to work with unpruned paths as well.
This is the case where the analyzer tries to print out source locations
for code within a synthesized function body, which of course does not have
a valid source location. The previous fix attempted to do this during
diagnostic path pruning, but some diagnostics have pruning disabled, and
so any diagnostic with a path that goes through a synthesized body will
either hit an assertion or emit invalid output.

<rdar://problem/12657843> (again)

llvm-svn: 169631
2012-12-07 19:56:29 +00:00
Ted Kremenek 54c9a4fad1 Reduce conversions between Store <-> ImmutableMapRef in RegionStore.
This reduces canonicalization of ImmutableMaps.  This reduces analysis time
of one heavy Objective-C file by another 1%.

llvm-svn: 169630
2012-12-07 19:54:25 +00:00
Ted Kremenek 8047dea32d Mark ImmutableMap::remove/add() const.
llvm-svn: 169629
2012-12-07 19:44:12 +00:00
Dmitry Vyukov 54b87409b4 tsan: even more fd interceptors + fixes
llvm-svn: 169628
2012-12-07 19:23:59 +00:00
John Criswell be7f2f9e49 Fixed some grammar and punctuation error.
No content changes.

llvm-svn: 169627
2012-12-07 19:21:10 +00:00
Eli Bendersky a31a894eed Refactor MCInstFragment and MCDataFragment to adhere to a common interface,
which removes code duplication and prepares the ground for future additions.

Full discussion:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121203/158233.html

llvm-svn: 169626
2012-12-07 19:13:57 +00:00
Jim Ingham 95afbf517a Now that we set ThreadPlanCallFunction to private in the constructor, it is confusing that we set it
again in client code after creating the plans.  So remove those unnecessary calls.

llvm-svn: 169625
2012-12-07 19:04:31 +00:00
Nadav Rotem 481e50efe0 X86: Prefer using VPSHUFD over VPERMIL because it has better throughput.
llvm-svn: 169624
2012-12-07 19:01:13 +00:00
Greg Clayton 889037d754 <rdar://problem/10903854>
log enable now resolves the "--file" option in case it contains ~.

llvm-svn: 169623
2012-12-07 18:37:09 +00:00
Ted Kremenek 897702e30a Add helper method to convert from a RegionStoreRefBindings to a Store.
llvm-svn: 169622
2012-12-07 18:32:08 +00:00
Dmitry Vyukov 04580518ce tsan: more fd interceptors + bug fixes + tests
llvm-svn: 169621
2012-12-07 18:30:40 +00:00
Kostya Serebryany 40bac5b01f [asan] fix lint, remove debug prints
llvm-svn: 169620
2012-12-07 18:07:52 +00:00
Eli Bendersky 2ccd044c22 Add separate statistics for Data and Inst fragments emitted during relaxation.
Also fixes a test that was overly-sensitive to the exact order of statistics
emitted.

llvm-svn: 169619
2012-12-07 17:59:21 +00:00
Andrew Kaylor 327c267a95 Set ThreadPlanCallFunction to private in ConstructorSetup. This fixes a problem on Linux where 'continue' was misfiring after an expression evaluation when stopped at a breakpoint. The problem was that InferiorCallMmap was not setting its ThreadPlanCallFunction to private and so the completion of that thread plan appeared to be the stop reason and therefore the 'continue' operation failed to step over the breakpoint. The SetPrivate call is being put in ThreadPlanCallFunction rather than InferiorCallMmap to make the solution more general.
llvm-svn: 169618
2012-12-07 17:56:31 +00:00
Eli Bendersky 131186c11a Some common functionality from WinCOFFStreamer::EmitAssignment can be now
delegated to MCObjectStreamer.

llvm-svn: 169617
2012-12-07 17:55:28 +00:00
Alexey Samsonov fa94fa52ad ASan: intercept prctl on Linux only
llvm-svn: 169616
2012-12-07 17:54:38 +00:00
Andrew Kaylor e0930d3316 Fix Test11588.py on Linux. The test was failing because the synthetic type fields were resolving to int instead of long. A similar change was made in r155144 to eliminate the type specification for an earlier check in this test, so it seemed appropriate here too.
llvm-svn: 169615
2012-12-07 17:45:05 +00:00
Jim Ingham 6a51085e09 Separate initing the stdout/stderr for running the Python Script interpreter from initing the lldb.target/frame/etc globals,
and only do the latter when it makes sense to.

<rdar://problem/12554049>

llvm-svn: 169614
2012-12-07 17:43:38 +00:00
Eli Bendersky ea2824dc88 Lift EmitAssignment into MCObjectStreamer which gets rid of at least three
duplicate implementations in format-specific streamers.

llvm-svn: 169613
2012-12-07 17:42:41 +00:00
Jim Ingham 85e276b8ae Take the Target API lock before letting the Python code start to work constructing threads, otherwise we will risk a lock-inversion deadlock between the thread list and the API mutex.
<rdar://problem/12554049>

llvm-svn: 169612
2012-12-07 17:42:15 +00:00
Matthew Curtis e5df381201 Hexagon TC: forward appropriate args to assembler
llvm-svn: 169611
2012-12-07 17:23:04 +00:00
NAKAMURA Takumi 55c128995b Driver/ToolChains.cpp: Add the name CentOS5 32bit gcc44 (aka i386-redhat-linux6E).
Thanks to Bruce Stephens.

llvm-svn: 169610
2012-12-07 17:13:18 +00:00
Tim Northover 5cc3dc86bb Added Mapping Symbols for ARM ELF
Before this patch, when you objdump an LLVM-compiled file, objdump tried to
decode data-in-code sections as if they were code.  This patch adds the missing
Mapping Symbols, as defined by "ELF for the ARM Architecture" (ARM IHI 0044D).

Patch based on work by Greg Fitzgerald.

llvm-svn: 169609
2012-12-07 16:50:23 +00:00
Dmitri Gribenko 7a93668614 Convert HowToReleaseLLVM.html to reST
Patch by Alexander Zinenko.

llvm-svn: 169608
2012-12-07 16:42:48 +00:00
Dmitry Vyukov 0ef99e2a48 tsan: fix pipe interceptors and add 2 tests
llvm-svn: 169607
2012-12-07 16:22:54 +00:00
Dmitry Vyukov 3a2046b3a6 tsan: fix lint warnings
llvm-svn: 169606
2012-12-07 16:20:06 +00:00
Alexander Kornienko e327684b2a Clang-format: extracted FormatTokenSource from UnwrappedLineParser.
Summary: FormatTokenLexer is here, FormatTokenBuffer is on the way. This will allow to re-parse unwrapped lines when needed.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D186

llvm-svn: 169605
2012-12-07 16:15:44 +00:00
David Tweed cfeb8fc49a The test unconditionally assumes a particular cpu has a backend build in the target.
Buildbots for some hosts may choose to build only their own backend in order to
maximise testing-turnaround time. Move the test into a prefixed directory so
lit's standard "backend specific" suppression can be done.

llvm-svn: 169604
2012-12-07 15:57:45 +00:00
Logan Chien 59ff070376 Split MCELFStreamer into a header file.
llvm-svn: 169603
2012-12-07 15:50:40 +00:00
Dmitry Vyukov 4e7c0f95fb tsan: add pipe interceptors
llvm-svn: 169602
2012-12-07 15:32:56 +00:00
Kostya Serebryany e7108227ca [asan] intercept prctl(PR_SET_NAME) and set the thread name. Output the thread names (if non-empty) in asan reports
llvm-svn: 169601
2012-12-07 15:15:01 +00:00
Dmitry Vyukov 5f4ab30be0 tsan: refactoring is preparation to more precise fd synchronization handling
llvm-svn: 169600
2012-12-07 14:40:10 +00:00
Matthew Curtis 6b22278aa7 Hexagon TC: add cc1 defaults for hexagon-gcc
compatibility

llvm-svn: 169599
2012-12-07 13:52:44 +00:00
Kostya Serebryany 35f9e5e87b [sanitizer] implement SanitizerSetThreadName/SanitizerGetThreadName. Just for linux so far (using prctl(PR_GET_NAME))
llvm-svn: 169598
2012-12-07 11:27:24 +00:00
Evgeniy Stepanov 5d2d761ad6 Switch to r83 of cpplint.
Ubuntu Precise compatibility.

llvm-svn: 169597
2012-12-07 11:00:14 +00:00
Sean Silva b084af416a docs: Convert LangRef to reST.
NOTE: If you have any patches in the works that modify LangRef, you will
need to rewrite the changes to LangRef.html to their equivalents in
LangRef.rst. If you need assistance feel free to contact me.

Since LangRef is mission-critical for the project and "normative", I
have taken extra care to ensure that no content was lost or altered in
the conversion. The content was converted with a tool called `pandoc`,
so there is no chance for a human error like accidentally forgetting a
sentence or whatever. After the initial conversion by `pandoc`, only
changes to the markup were done.

This is just the most literal conversion of the HTML document as
possible. It might be worth exploring some way to chop up this massive
document into separate pages, e.g. something like
`docs/LangRef/Instructions.rst`, `docs/LangRef/Intrinsics.rst`, etc.
with `docs/LangRef.rst` being an "intro/navigation page" of sorts. On
the other hand, that loses the ability to {Ctrl,Cmd}-F for a given term
right from your browser.

IMO, I think our stylesheet needs some work because I find it hard to
tell what level of nesting some of the headings are at (e.g. "is this a
new section or is it a subsection?"). The issue is present on other
pages, but the sheer size and deep section structure of LangRef really
brings this issue out. If there are any web designers out there in the
community it would be awesome if you tried to come up with something
nicer.

llvm-svn: 169596
2012-12-07 10:36:55 +00:00
Kostya Serebryany 52a3b92abd [sanitizer] try not to use libc mem* functions in sanitizer_common tests (conflicts with our own interceptors)
llvm-svn: 169595
2012-12-07 10:13:10 +00:00
Daniel Jasper 2723403f9e Small tweaks to clang-format.
Now not joining keywords with '::' and not putting a space between
a pointer pointer.

llvm-svn: 169594
2012-12-07 09:52:15 +00:00
Kostya Serebryany 378f93e804 [sanitizer] fix the build on ancient gcc which has stricter rules about what can be put on TLS. Long term, we absolutely must build the run-times with the fresh target clang
llvm-svn: 169593
2012-12-07 09:40:17 +00:00
Dmitry Vyukov 5e700abc1c tsan: deflake output tests (by increasing sleeps)
llvm-svn: 169592
2012-12-07 09:24:57 +00:00
Evgeniy Stepanov 383b61e791 [msan] Remove readonly/readnone attributes from all called functions.
MSan uses a TLS slot to pass shadow for function arguments and return values.
This makes all instrumented functions not readonly, and at the same time
requires that all callees of an instrumented function that may be
MSan-instrumented do not have readonly attribute (otherwise some of the
instrumentation may be optimized out).

llvm-svn: 169591
2012-12-07 09:08:32 +00:00
Ted Kremenek 245e45af7d Cache queries to lookupPrivateMethod() within ObjCMethodCall::getRuntimeDefinition().
The same queries can happen thousands of times.  This reduces the analysis
time on one heavy Objective-C file by 2.4%.

llvm-svn: 169589
2012-12-07 07:30:19 +00:00