Commit Graph

156222 Commits

Author SHA1 Message Date
Bill Wendling 17d1b61480 Only add this attribute when it's set. If it's not there, the assumption is that it's off.
llvm-svn: 189064
2013-08-22 21:16:51 +00:00
Bill Wendling fe88aea706 Check only if we have this attribute. If it's not an attribute, then it's assumed false.
llvm-svn: 189063
2013-08-22 21:16:14 +00:00
Michael Sartain 6e33ae64c4 add register name to UnwindLog error message
llvm-svn: 189062
2013-08-22 21:00:35 +00:00
Michael Sartain 093bf45f9c A clang::Type::Decayed type to kill compile warning
llvm-svn: 189061
2013-08-22 20:50:18 +00:00
Bill Wendling 7c20aab621 FileCheckize some tests.
llvm-svn: 189060
2013-08-22 20:46:05 +00:00
DeLesley Hutchins c2ecf0d815 Update to consumed analysis.
Patch by chris.wailes@gmail.com.  The following functionality was added:

* The same functionality is now supported for both CXXOperatorCallExprs and CXXMemberCallExprs.
* Factored out some code in StmtVisitor.
* Removed variables from the state map when their destructors are encountered.
* Started adding documentation for the consumed analysis attributes.

llvm-svn: 189059
2013-08-22 20:44:47 +00:00
Michael Sartain b1e159257c add error checking and messages to 'target modules show-unwind' command
llvm-svn: 189058
2013-08-22 20:42:30 +00:00
Tom Stellard 15e4811455 R600/SI: Fix another case of illegal VGPR to SGPR copy
This fixes a crash in Unigine Tropics.

https://bugs.freedesktop.org/show_bug.cgi?id=68389

llvm-svn: 189057
2013-08-22 20:21:02 +00:00
Peter Collingbourne 730f3c8574 DataFlowSanitizer: Add a design doc paragraph on checking ABI consistency.
Differential Revision: http://llvm-reviews.chandlerc.com/D1443

llvm-svn: 189055
2013-08-22 20:08:20 +00:00
Peter Collingbourne 34f0c313e2 DataFlowSanitizer: Replace non-instrumented aliases of instrumented functions, and vice versa, with wrappers.
Differential Revision: http://llvm-reviews.chandlerc.com/D1442

llvm-svn: 189054
2013-08-22 20:08:15 +00:00
Peter Collingbourne 761a4fc475 DataFlowSanitizer: Factor the wrapper builder out to buildWrapperFunction.
Differential Revision: http://llvm-reviews.chandlerc.com/D1441

llvm-svn: 189053
2013-08-22 20:08:11 +00:00
Peter Collingbourne 59b1262d01 DataFlowSanitizer: Prefix the name of each instrumented function with "dfs$".
DFSan changes the ABI of each function in the module.  This makes it possible
for a function with the native ABI to be called with the instrumented ABI,
or vice versa, thus possibly invoking undefined behavior.  A simple way
of statically detecting instances of this problem is to prepend the prefix
"dfs$" to the name of each instrumented-ABI function.

This will not catch every such problem; in particular function pointers passed
across the instrumented-native barrier cannot be used on the other side.
These problems could potentially be caught dynamically.

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

llvm-svn: 189052
2013-08-22 20:08:08 +00:00
Reid Kleckner 3738445cdd Add a separate llvm.global_ctors entry for linkonce_odr data initializers
Summary:
These typically come from static data members of class template
specializations.  This accomplishes two things:

1. May expose GlobalOpt optimizations for Itanium C++ ABI code.
2. Works toward fixing double initialization in the Microsoft C++ ABI.

CC: cfe-commits

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

llvm-svn: 189051
2013-08-22 20:07:45 +00:00
Edwin Vane 9f7a1c10ea clang-replace: Layout of test directory now more standard
Test-time dependencies now live within test/clang-replace/Inputs which is more
in line with llvm and clang test suites.

Added 'Inputs' to the lit config's 'exclude' list as with llvm's lit.cfg since
test-time dependencies should not have any lit scripts within.

llvm-svn: 189047
2013-08-22 19:44:07 +00:00
Howard Hinnant 104024cb59 Glen: replace obsolete _LIBCPP_CANTTHROW with _NOEXCEPT.
llvm-svn: 189046
2013-08-22 19:39:03 +00:00
Marshall Clow 7b5566c5f5 Mark LWG issues #2083, 2099 and 2105 as complete. No functionality change.
llvm-svn: 189044
2013-08-22 18:53:17 +00:00
Howard Hinnant 427ae44637 XFAIL a few tests on darwin12
llvm-svn: 189043
2013-08-22 18:47:39 +00:00
Reid Kleckner 90e119a0fc FileCheckify a grep test.
llvm-svn: 189042
2013-08-22 18:45:40 +00:00
Fariborz Jahanian 926fafb888 ObjectiveC migrator: Provide ARC annotations for
CF methods too.

llvm-svn: 189041
2013-08-22 18:35:27 +00:00
Howard Hinnant 179b1f8cf2 Zhihao Yuan noted that there were a few unneeded statements. Eliminated the unnecessary ones, and commented the ones that are there for non-obvious reasons such as to help things limp along in C++03 language mode.
llvm-svn: 189039
2013-08-22 18:29:50 +00:00
Guillaume Papin 883a2b2427 Revert "cpp11-migrate: Add a class to support include directives modifications"
This reverts commit r189017.

It broke the windows bots:
- http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/4176
- http://bb.pgr.jp/builders/cmake-clang-i686-mingw32/builds/3837

llvm-svn: 189037
2013-08-22 18:20:03 +00:00
Howard Hinnant 9ff3203fcc Zhihao Yuan noted that a move assignment operation was missing from std::adjacent_difference. Fixed.
llvm-svn: 189036
2013-08-22 18:02:34 +00:00
Shankar Easwaran 89732e1362 [lld][PECOFF] Fix one more reference to a temporary string
llvm-svn: 189035
2013-08-22 17:59:03 +00:00
Howard Hinnant d8bf850359 David Blaikie suggested this test for detecting constexpr on the error_category default constructor. Additionally I decided to make this constructor trivial as well, as I could not come up with a rationale for not doing so. Fully tested with both current Apple clang and tip-of-trunk clang.
llvm-svn: 189034
2013-08-22 17:41:48 +00:00
Manman Ren 64ba24a325 [Debug Info Tests] Update testing cases.
A single metadata will not span multiple lines. This also helps me with
my script to automatic update the testing cases.
A debug info testing case should have a llvm.dbg.cu.
Do not use hard-coded id for debug nodes.

llvm-svn: 189033
2013-08-22 17:11:18 +00:00
Samuel Benzaquen 8c9f6330e6 Refactor VariantMatcher to use an interface underneath.
Summary:
Refactor VariantMatcher to use an interface underneath.
It supports "Single" and "Polymorphic". Will support more in the future.

Reviewers: klimek

CC: cfe-commits, revane

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

llvm-svn: 189032
2013-08-22 16:38:33 +00:00
NAKAMURA Takumi 4cfe554601 configure: Regenerate corresponding to r189026.
llvm-svn: 189031
2013-08-22 16:31:34 +00:00
Jordan Rose 8ba180e25c Re-add clang-check to the Makefile build.
I was bound to screw this up somehow.

llvm-svn: 189029
2013-08-22 16:12:04 +00:00
Daniel Jasper 12f4f1192d Work around unused variable warning in release builds.
llvm-svn: 189028
2013-08-22 16:11:46 +00:00
Jordan Rose a1e4b12223 Fix dependencies now that the ARC migrator depends on the static analyzer.
Thanks for pointing this out, Stephen. I think this is right now -- I
attempted to try all four valid combinations with both the autoconf and
CMake builds.

See also LLVM changes to the configure script.

llvm-svn: 189027
2013-08-22 15:50:02 +00:00
Jordan Rose 23fc6f34c3 Autoconf: The Clang ARC migrator now depends on the static analyzer.
I don't actually have a version of autoconf so I edited configure directly
as well. It's copy-pasted so I think there was little margin for error.

See also Clang-side dependency graph changes.

llvm-svn: 189026
2013-08-22 15:49:53 +00:00
Shankar Easwaran c48b9594b6 [lld][PECOFF] Fix use of temporary strings
llvm-svn: 189025
2013-08-22 15:37:09 +00:00
Joey Gouly 881eab53be [ARMv8] Add CodeGen support for VSEL.
This uses the ARMcmov pattern that Tim cleaned up in r188995.

Thanks to Simon Tatham for his floating point help!

llvm-svn: 189024
2013-08-22 15:29:11 +00:00
Shankar Easwaran ea68a5d636 [lld][unittests] Change assert to llvm_unreachable
llvm-svn: 189023
2013-08-22 15:23:54 +00:00
David Blaikie d89b99d421 DebugInfo: emit the definition of types when construction vtables are required as these types may never end up emitting the full class data
This might be able to be optimized further by only doing this in the
absence of a key function, but it doesn't look like GCC is doing that so
I'm not rushing to do it just yet.

llvm-svn: 189022
2013-08-22 15:23:05 +00:00
NAKAMURA Takumi 7b5d4f97a0 [Win32] mapped_file_region: Fix a bug in CreateFileMapping() that Size must contain Offset when Offset >= 65536.
llvm-svn: 189021
2013-08-22 15:14:53 +00:00
NAKAMURA Takumi edf7615332 Whitespace.
llvm-svn: 189020
2013-08-22 15:14:45 +00:00
Edwin Vane 69948e4155 clang-replace: Exclude test-time deps from LIT test suite
Subdirectories of test/clang-replace contain test-time dependencies and not
more LIT tests. Tell LIT to ignore these directories from the test suite.

llvm-svn: 189019
2013-08-22 15:04:34 +00:00
Daniel Jasper 8de9ed05b7 clang-format: Add column layout formatting for braced lists
With this patch, braced lists (with more than 3 elements are formatted in a
column layout if possible). E.g.:

  static const uint16_t CallerSavedRegs64Bit[] = {
    X86::RAX, X86::RDX, X86::RCX, X86::RSI, X86::RDI,
    X86::R8,  X86::R9,  X86::R10, X86::R11, 0
  };

Required other changes:
- FormatTokens can now have a special role that contains extra data and can do
  special formattings. A comma separated list is currently the only
  implementation.
- Move penalty calculation entirely into ContinuationIndenter (there was a last
  piece still in UnwrappedLineFormatter).

Review: http://llvm-reviews.chandlerc.com/D1457
llvm-svn: 189018
2013-08-22 15:00:41 +00:00
Guillaume Papin effabf9691 cpp11-migrate: Add a class to support include directives modifications
The IncludeDirectives class helps with detecting and modifying #include
directives. For now it allows the users to add angled-includes in a source file.
This is a start for this class that will evolve in the future to add more
functionality.

This should fix the reverted commit r188791 (buildbot failures on Windows).

llvm-svn: 189017
2013-08-22 14:49:07 +00:00
Sergey Matveev 5371e90f7a [lsan] Add a regression test for building C code.
llvm-svn: 189016
2013-08-22 14:48:44 +00:00
Evgeniy Stepanov 251080b0eb [sanitizer] Fix build when scanf interceptors are enabled, and __isoc99_*scanf are not.
Fixes PR16916.

llvm-svn: 189015
2013-08-22 13:59:15 +00:00
Edwin Vane 1106ef2a69 clang-replace: Write merged changes to disk
Functionality for clang-replace completed with the addition of the ability to
write merged replacements to disk.

Test added.

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

llvm-svn: 189014
2013-08-22 13:40:32 +00:00
David Blaikie cf2c8b33cd DebugInfo: Remove explicit declaration-emissiong handling now that we have a more principled approach (the 'requires complete type' callback)
No functionality change intended.

llvm-svn: 189013
2013-08-22 13:36:01 +00:00
Sergey Matveev f6ca04d468 [lsan] Add a stress test.
llvm-svn: 189012
2013-08-22 13:32:10 +00:00
Sergey Matveev e38dd3ff4e [lsan] Follow-up to r189010 - do the same in Makefile build.
llvm-svn: 189011
2013-08-22 13:30:01 +00:00
Sergey Matveev bed55036a9 [lsan] Build standalone LSan with -fno-rtti.
Fix issue where C code could not be built with -fsanitize=leak.

llvm-svn: 189010
2013-08-22 13:23:22 +00:00
Mihai Popa 5500c0ff89 Fix ARM vcvt encoding when the number of fractional bits is zero.
The instruction to convert between floating point and fixed point representations
takes an immediate operand for the number of fractional bits of the fixed point
value. ARMARM specifies that when that number of bits is zero, the assembler
should encode floating point/integer conversion instructions. 

This patch adds the necessary instruction aliases to achieve this behaviour.

llvm-svn: 189009
2013-08-22 13:16:07 +00:00
Edwin Vane 3bf14cebee Introducing new tool clang-replace
Introducing new tool 'clang-replace' that finds files containing
serialized Replacements and applies those changes after deduplication
and detecting conflicts.

Currently the tool does not apply changes. It stops just after the
deduplication and conflict report phase. Forthcoming patches will
complete functionality.

Both build systems updated for new tool.

Includes a conflict test case.

clang-replace added to Doxygen build.

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

llvm-svn: 189008
2013-08-22 13:07:14 +00:00
Chandler Carruth 1c34afcb61 Teach the SLP vectorizer the correct way to check for consecutive access
using GEPs. Previously, it used a number of different heuristics for
analyzing the GEPs. Several of these were conservatively correct, but
failed to fall back to SCEV even when SCEV might have given a reasonable
answer. One was simply incorrect in how it was formulated.

There was good code already to recursively evaluate the constant offsets
in GEPs, look through pointer casts, etc. I gathered this into a form
code like the SLP code can use in a previous commit, which allows all of
this code to become quite simple.

There is some performance (compile time) concern here at first glance as
we're directly attempting to walk both pointers constant GEP chains.
However, a couple of thoughts:

1) The very common cases where there is a dynamic pointer, and a second
   pointer at a constant offset (usually a stride) from it, this code
   will actually not do any unnecessary work.

2) InstCombine and other passes work very hard to collapse constant
   GEPs, so it will be rare that we iterate here for a long time.

That said, if there remain performance problems here, there are some
obvious things that can improve the situation immensely. Doing
a vectorizer-pass-wide memoizer for each individual layer of pointer
values, their base values, and the constant offset is likely to be able
to completely remove redundant work and strictly limit the scaling of
the work to scrape these GEPs. Since this optimization was not done on
the prior version (which would still benefit from it), I've not done it
here. But if folks have benchmarks that slow down it should be straight
forward for them to add.

I've added a test case, but I'm not really confident of the amount of
testing done for different access patterns, strides, and pointer
manipulation.

llvm-svn: 189007
2013-08-22 12:45:17 +00:00