Commit Graph

132858 Commits

Author SHA1 Message Date
Michael Liao 3224543bf9 Fix PR12359
- In addition to undefined, if V2 is zero vector, skip 2nd PSHUFB and POR as
  well as PSHUFB will zero elements with negative indices.

  Patch by Sriram Murali <sriram.murali@intel.com>

llvm-svn: 163018
2012-08-31 20:12:31 +00:00
Fariborz Jahanian 0e337543dc objective-C ARC; detect and warn on retain cycle when
property-dot syntax is used on an object whose
capture causes retain cycle. // rdar://11702054

llvm-svn: 163017
2012-08-31 20:04:47 +00:00
Dmitry Vyukov cbc303006c tsan: fix crash when users pass insane mutex addresses in dynamic annotations
llvm-svn: 163016
2012-08-31 20:02:33 +00:00
David Blaikie 50174dc642 Add loop-convert to the Make build.
Hey, now the loop-convert tests pass too.

llvm-svn: 163015
2012-08-31 19:46:47 +00:00
Greg Clayton 7036425c59 <rdar://problem/12202862>
Added a fix for incorrect dynamic typing. Before when asking if a C++ class could be dynamic, we would answer yes for incomplete C++ classes. This turned out to have issues where if a class was not virtual, yet had its first ivar be an instance of a virtual class, we would incorrectly say that a class was virtual and we would downcast it to be a pointer to the first ivar. We now ask the class to complete itself prior to answering the question. We need to test the effects on memory of this change prior to submission. It is the safest and best fix, but it does have a potential downside of higher memory consumption.

llvm-svn: 163014
2012-08-31 18:56:24 +00:00
Joao Matos dc86f94f62 Improved MSVC __interface support by adding first class support for it, instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.
llvm-svn: 163013
2012-08-31 18:45:21 +00:00
Jordan Rose d65f1c8d6e [analyzer] RetainCountChecker: don't assume all functions have names.
Fixes a hard-to-reach crash when calling a non-member overloaded operator
with arguments that may be callbacks.

Future-proofing: don't make the same assumption in MallocSizeofChecker.
Aside from possibly respecting attributes in the future, it might be
possible to call 'malloc' through a function pointer.

I audited all other uses of FunctionDecl::getIdentifier() in the analyzer;
they all now correctly test to see if the identifier is present before
using it.

llvm-svn: 163012
2012-08-31 18:19:18 +00:00
Greg Clayton facebca6ba Fix indentation.
llvm-svn: 163011
2012-08-31 18:11:06 +00:00
Jack Carter b3f3b17e16 The instruction DINS may be transformed into DINSU or DEXTM depending
on the size of the extraction and its position in the 64 bit word.

This patch allows support of the dext transformations with mips64 direct
object output.

0 <= msb < 32 0 <= lsb < 32 0 <= pos < 32 1 <= size <= 32
DINS
The field is entirely contained in the right-most word of the doubleword

32 <= msb < 64 0 <= lsb < 32 0 <= pos < 32 2 <= size <= 64
DINSM
The field straddles the words of the doubleword

32 <= msb < 64 32 <= lsb < 64 32 <= pos < 64 1 <= size <= 32
DINSU
The field is entirely contained in the left-most word of the doubleword

llvm-svn: 163010
2012-08-31 18:06:48 +00:00
David Blaikie efae14e96c Fix tests to be more robust (to older versions of grep, lesser lit-like test runners, etc)
Seems I had a problem with my version of grep, when run by lit, not supporting
the \s escape. This seems to fix it for me & I'll be getting the buildbots to
run these tests too to keep an eye on them (actually loop-convert tests still
fail when run via a make build, so that'll be addressed in a future commit). I
could use [[:space:]] to generalize over other whitespace but that seemed
unnecessarily verbose when the flexibility wasn't actually required by the
current text of the tests.

Also I just simplified a lot of the loop-convert tests (removing the
unecessary temp file deletion at the start, removing the unnecessary && for
FileCheck, etc).

The remove-cstr-calls/basic.cpp changes were necessitated by an out of tree
lit-like test runner that's a bit less fantastic about escaping. They were
modeled on existing tooling test cases in Clang, with thanks to Manuel Klimek
for the pointers.

llvm-svn: 163009
2012-08-31 17:49:33 +00:00
Bill Wendling 6bbe48967a Move the GCOVFormat enums into their own namespace per the LLVM coding standard.
llvm-svn: 163008
2012-08-31 17:31:28 +00:00
Joao Matos 0e167f7368 Fixed invalid iterators. Since the iterator is invalidated after the erase() call, we need to replace it with the new one returned. This was triggering an assert under MSVC 2012 and making all the ARCMT/ tests fail.
llvm-svn: 163007
2012-08-31 17:28:09 +00:00
Dmitry Vyukov 318f77749e tsan: add "as if synchronized via sleep" feature
llvm-svn: 163006
2012-08-31 17:27:49 +00:00
Chad Rosier 9d1fc3672b Add a comment to explain what's really going on.
llvm-svn: 163005
2012-08-31 17:24:10 +00:00
Jordan Rose 219c9d0dd3 [analyzer] Though C++ inlining is enabled, don't inline ctors and dtors.
More generally, this adds a new configuration option 'c++-inlining', which
controls which C++ member functions can be considered for inlining. This
uses the new -analyzer-config table, so the cc1 arguments will look like this:

... -analyzer-config c++-inlining=[none|methods|constructors|destructors]

Note that each mode implies that all the previous member function kinds
will be inlined as well; it doesn't make sense to inline destructors
without inlining constructors, for example.

The default mode is 'methods'.

llvm-svn: 163004
2012-08-31 17:06:49 +00:00
Fariborz Jahanian 6ce25c09ed objective-C: underline name of the missing method
in the diagnbostic. // rdar://11303469

llvm-svn: 163003
2012-08-31 17:03:18 +00:00
Chad Rosier a8f3c4fe35 The ConvertToMCInst() function can't fail, so remove the now dead Match_ConversionFail enum.
llvm-svn: 163002
2012-08-31 16:41:07 +00:00
Craig Topper c0387f6b23 Mark FMA3 instructions as commutable so that the operands to the multiply part can be commuted.
llvm-svn: 163001
2012-08-31 16:31:13 +00:00
Craig Topper a8227cb76a Use CloneMachineInstr to make a new MI in commuteInstruction to make the code tolerant of instructions with more than two input operands.
llvm-svn: 163000
2012-08-31 16:30:05 +00:00
Craig Topper c30fdbc46c Add support for converting llvm.fma to fma4 instructions.
llvm-svn: 162999
2012-08-31 15:40:30 +00:00
Jakob Stoklund Olesen 96f87069c4 Don't enforce ordered inline asm operands.
I was too optimistic, inline asm can have tied operands that don't
follow the def order.

Fixes PR13742.

llvm-svn: 162998
2012-08-31 15:34:59 +00:00
Dmitry Vyukov 179e5ddae1 tsan: fix windows build (2)
llvm-svn: 162997
2012-08-31 14:11:33 +00:00
Dmitry Vyukov fa90fa357e tsan: fix windows build (1)
llvm-svn: 162996
2012-08-31 14:01:33 +00:00
Dmitry Vyukov bead8f1e3f tsan: slightly optimize mutex unlock
llvm-svn: 162995
2012-08-31 13:42:28 +00:00
Dmitry Vyukov 6f6ba43271 tsan: more precise handling of atomic_store(memory_order_release)
llvm-svn: 162994
2012-08-31 13:22:13 +00:00
Dmitry Vyukov ef8d1944b8 tsan: improve stack depot
llvm-svn: 162993
2012-08-31 12:47:44 +00:00
Benjamin Kramer e7e5235726 Clean up ProfileDataLoader a bit.
- Overloading operator<< for raw_ostream and pointers is dangerous, it alters
  the behavior of code that includes the header.
- Remove unused ID.
- Use LLVM's byte swapping helpers instead of a hand-coded.
- Make ReadProfilingData work directly on a pointer.

No functionality change.

llvm-svn: 162992
2012-08-31 12:43:07 +00:00
Kostya Serebryany d19c8cb2cc [tsan] locate the auxilary space for tsan's Allocator64 after the main region, not before. This simplifies the shadow mappings
llvm-svn: 162991
2012-08-31 12:41:00 +00:00
Alexey Samsonov 3222dad6e3 [Sanitizer] fix overloaded operator error
llvm-svn: 162990
2012-08-31 11:43:01 +00:00
Alexey Samsonov fd0a6e6030 [compiler-rt] fixup for r162988 - remove accidentally commited file
llvm-svn: 162989
2012-08-31 11:13:38 +00:00
Alexey Samsonov 704f71616d [compiler-rt] Move draft code for llvm-symbolizer to compiler-rt/utils/llvm-symbolizer after chandlerc's suggestion
llvm-svn: 162988
2012-08-31 11:12:10 +00:00
Alexey Samsonov e70ed73d1f [Sanitizer] Remove some calls to libc malloc from symbolizer
llvm-svn: 162987
2012-08-31 11:07:52 +00:00
Dmitri Gribenko 6bab9113b0 Remove the useless CommentOptions class.
llvm-svn: 162986
2012-08-31 10:35:30 +00:00
Dmitri Gribenko d458ebb486 Use LLVM_DELETED_FUNCTION instead of a comment.
llvm-svn: 162985
2012-08-31 10:23:13 +00:00
Alexey Samsonov 329eae86ef [Sanitizer] Resolve fixme: break dependency of sanitizer_common tests on TSan RTL
llvm-svn: 162984
2012-08-31 10:15:44 +00:00
NAKAMURA Takumi 2762dadf2c llvm/test/CodeGen/X86/vec_select.ll: Fix failure on xmm-less hosts, to add -mattr=+sse2.
FIXME: Should this be tested with both +avx and -avx,+sse2?
llvm-svn: 162983
2012-08-31 10:02:22 +00:00
Alexey Samsonov 79b36285ca [Sanitizer] Make lint checking a standalone script in sanitizer_common
llvm-svn: 162982
2012-08-31 08:36:36 +00:00
Alexey Samsonov de827cb42b [Sanitizer] Remove lint checkers from our old makefiles in favor of buildbot
llvm-svn: 162981
2012-08-31 08:10:28 +00:00
Alexey Samsonov 66ca36a564 [TSan] Fix style warinings in output test
llvm-svn: 162980
2012-08-31 08:00:37 +00:00
Bill Wendling 5aed004cf1 Cleanups due to feedback. No functionality change. Patch by Alistair.
llvm-svn: 162979
2012-08-31 05:18:31 +00:00
Ted Kremenek 40ea0eaaa1 Make AnalyzerOptions a shared object between CompilerInvocation and
AnalysisManager, allowing the StringMap of configuration values to
be propagated.

llvm-svn: 162978
2012-08-31 04:36:05 +00:00
Ted Kremenek a5770cd1fa Move AnalyzerOptions.h into 'Core' StaticAnalyzer sub-library.
llvm-svn: 162977
2012-08-31 04:35:58 +00:00
Dmitri Gribenko 454a43cf30 DeclPrinter tests: simplify the code by using the new runToolOnCodeWithArgs
function from Tooling.

llvm-svn: 162976
2012-08-31 03:23:26 +00:00
Dmitri Gribenko 9fc8b9c156 Documentation: correct a typo introduced in r162971.
llvm-svn: 162975
2012-08-31 03:19:55 +00:00
Dmitri Gribenko bda79e5cc2 DeclPrinter tests: since now some platforms use C++11 by default, make it
explicitly visible in test cases which language variant is used.

llvm-svn: 162974
2012-08-31 03:05:44 +00:00
Michael Liao 969f3913dd Clean up AddedComplexity further after adding UseSSEx
llvm-svn: 162973
2012-08-31 03:01:35 +00:00
Greg Clayton 97e44a0cc7 Added command lists that can be executed on launch, stop, crash and exit. Added code to auto import the lldb module that we can use on many stand alone modules.
llvm-svn: 162972
2012-08-31 02:55:56 +00:00
Dmitri Gribenko c872c92d8c Documentation: add missing word "accepts".
llvm-svn: 162971
2012-08-31 02:39:31 +00:00
Eli Friedman 324adad966 Make a bunch of methods on Lexer private.
llvm-svn: 162970
2012-08-31 02:29:37 +00:00
Dmitri Gribenko 3ca956f715 Comment HTML tag name machers: move from StringSwitch to an efficient
TableGen-generated string matcher.

llvm-svn: 162969
2012-08-31 02:21:44 +00:00