Commit Graph

141579 Commits

Author SHA1 Message Date
Douglas Gregor c8a992f727 Revert r173056; it breaks one of the CodeGen-with-PCH tests.
llvm-svn: 173058
2013-01-21 16:52:34 +00:00
Douglas Gregor d8666e49cc When loading an identifier from an AST file solely for the purpose of
forming the identifier, e.g., as part of a selector or a declaration
name, don't actually deserialize any information about the
identifier. Instead, simply mark it "out-of-date" and we'll load the
the information on demand. 2% speedup on the modules testcase I'm
looking at; should also help PCH.

llvm-svn: 173056
2013-01-21 16:47:11 +00:00
Manuel Klimek a4fe1c13c0 Fixes formatting of empty blocks.
We now only put empty blocks into a single line, if all of:
- all tokens of the structural element fit into a single line
- we're not in a control flow statement

Note that we usually don't put record definitions into a single line, as
there's usually at least one more token (the semicolon) after the
closing brace. This doesn't hold when we are in a context where there is
no semicolon, like "enum E {}".

There were some missing tests around joining lines around the corner
cases of the allowed number of columns, so this patch adds some.

llvm-svn: 173055
2013-01-21 16:42:44 +00:00
Douglas Gregor fe732d538f When deserializing a declaration, don't look for redeclarations if its
kind indicates that it can never be redeclared. Good for a 1% speedup,
and redeclaration searching drops off the profile.

llvm-svn: 173054
2013-01-21 16:16:40 +00:00
Tom Stellard c9b903138d R600/SI: Use unnormalized coordinates for sampling with the RECT target.
Patch by: Michel Dänzer

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 173053
2013-01-21 15:40:48 +00:00
Tom Stellard 14421a793f R600/SI: Take target parameter for sample intrinsics.
Patch by: Michel Dänzer

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 173052
2013-01-21 15:40:47 +00:00
Tom Stellard 74dda0da31 R600/SI: Derive all sample intrinsics from a single class.
Patch by: Michel Dänzer

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 173051
2013-01-21 15:40:46 +00:00
Douglas Gregor 9f78289055 Introduce a fast path for the ASTReader's name lookup within a
DeclContext. When the DeclContext is of a kind that can only be
defined once and never updated, we limit the search to the module file
that conatins the lookup table. Provides a 15% speedup in one
modules-heavy source file.

llvm-svn: 173050
2013-01-21 15:25:38 +00:00
Kostya Serebryany 031b69d8df [asan] fix linux build
llvm-svn: 173049
2013-01-21 15:04:36 +00:00
Alexander Potapenko c21aa5cb39 [ASan] Move Mac-specific tests to asan_mac_test.cc
llvm-svn: 173048
2013-01-21 14:49:55 +00:00
Daniel Jasper c228619bb1 Fix parsing of templated declarations.
Before: template <template <typename T>, typename P > class X;
After:  template <template <typename T>, typename P> class X;

More importantly, the token annotations for the second ">" are now computed
correctly.

llvm-svn: 173047
2013-01-21 14:39:22 +00:00
Edwin Vane 89b13a7cf3 Removing empty loop-convert directory
llvm-svn: 173046
2013-01-21 14:35:54 +00:00
Manuel Klimek ae610d173d Fixes indent in linkage specification blocks.
We now indent:
extern "C" {
int a;
}

without additional indent inside the extern "C" block.

llvm-svn: 173045
2013-01-21 14:32:05 +00:00
Alexey Samsonov b670018c9f CMake: generalize checking for target availability and add initial support for PowerPC native arch. With this patch, building LLVM on PowerPC native arch produces a working ASan runtime.
llvm-svn: 173044
2013-01-21 14:31:45 +00:00
Daniel Jasper d41ee2d2af Fix bug discovered by valgrind.
When trying to merge lines, we should not touch lines that are invalid,
as we don't know how long they might be.

llvm-svn: 173043
2013-01-21 14:18:28 +00:00
Manuel Klimek d5e782b010 Add regression test.
llvm-svn: 173042
2013-01-21 14:16:56 +00:00
NAKAMURA Takumi 7b9a9201bf AST/VTableBuilder.h: Suppress a warning. [-Wunused-private-field]
llvm-svn: 173041
2013-01-21 14:15:24 +00:00
NAKAMURA Takumi c96fb1bd36 R600/SILowerControlFlow.cpp: Fix a warning. [-Wunused-variable]
llvm-svn: 173040
2013-01-21 14:06:48 +00:00
Manuel Klimek cdee74db63 Fixes detection of class template specializations.
Now correctly formats:
template <> class A<int> {} a;

llvm-svn: 173038
2013-01-21 13:58:54 +00:00
Evgeniy Stepanov 5f37c82154 [sanitizer] Disable scanf interceptor on windows.
llvm-svn: 173037
2013-01-21 13:30:08 +00:00
Chandler Carruth bb9caa9241 Switch CodeMetrics itself over to use TTI to determine if an instruction
is free. The whole CodeMetrics API should probably be reworked more, but
this is enough to allow deleting the duplicate code there for computing
whether an instruction is free.

All of the passes using this have been updated to pull in TTI and hand
it to the CodeMetrics stuff. Further, a dead CodeMetrics API
(analyzeFunction) is nuked for lack of users.

llvm-svn: 173036
2013-01-21 13:04:33 +00:00
Timur Iskhodzhanov 52b8a05234 First step towards vftable generation with -cxx-abi microsoft PR13231
llvm-svn: 173035
2013-01-21 13:02:41 +00:00
Chandler Carruth d11e9a8300 Fix indentation and formatting.
This change brought to by clang-format. =]

llvm-svn: 173034
2013-01-21 12:14:42 +00:00
Chandler Carruth d73bc5fbe2 Sink InlineCost.cpp into IPA -- it is now officially an interprocedural
analysis. How cute that it wasn't previously. ;]

Part of this confusion stems from the flattened header file tree. Thanks
to Benjamin for pointing out the goof on IRC, and we're considering
un-flattening the headers, so speak now if that would bug you.

llvm-svn: 173033
2013-01-21 12:09:41 +00:00
Chandler Carruth b8cf510d81 Move the inline cost analysis's primary cost query to TTI instead of the
old CodeMetrics system. TTI has the specific advantage of being
extensible and customizable by targets to reflect target-specific cost
metrics.

llvm-svn: 173032
2013-01-21 12:05:16 +00:00
Chandler Carruth 42f3dceb63 Now that the inline cost analysis is a pass, we can easily have it
depend on and use other analyses (as long as they're either immutable
passes or CGSCC passes of course -- nothing in the pass manager has been
fixed here). Leverage this to thread TargetTransformInfo down through
the inline cost analysis.

No functionality changed here, this just threads things through.

llvm-svn: 173031
2013-01-21 11:55:09 +00:00
Chandler Carruth 4319e2948d Make the inline cost a proper analysis pass. This remains essentially
a dynamic analysis done on each call to the routine. However, now it can
use the standard pass infrastructure to reference other analyses,
instead of a silly setter method. This will become more interesting as
I teach it about more analysis passes.

This updates the two inliner passes to use the inline cost analysis.
Doing so highlights how utterly redundant these two passes are. Either
we should find a cheaper way to do always inlining, or we should merge
the two and just fiddle with the thresholds to get the desired behavior.
I'm leaning increasingly toward the latter as it would also remove the
Inliner sub-class split.

llvm-svn: 173030
2013-01-21 11:39:18 +00:00
Chandler Carruth 7e88e74447 Formatting and comment fixes to the always inliner.
Formatting fixes brought to you by clang-format.

llvm-svn: 173029
2013-01-21 11:39:16 +00:00
Chandler Carruth 0df3e5310c Clean up the formatting and doxygen for the simple inliner a bit. No
functionality changed.

llvm-svn: 173028
2013-01-21 11:39:14 +00:00
Chandler Carruth 664e570b59 Fix an old-style doxygen comment.
llvm-svn: 173027
2013-01-21 11:39:12 +00:00
Alexey Samsonov 362286f34c Fixup for r173021: build tests with zero-based shadow on Android only, fix condition in checking for shadow gap in asan_mapping.h
llvm-svn: 173026
2013-01-21 11:36:38 +00:00
Evgeniy Stepanov 5e7936f646 [sanitizer] Define va_copy on win32.
llvm-svn: 173025
2013-01-21 11:32:50 +00:00
Dmitri Gribenko 7ec6f3ddeb Add a fixit for _Noreturn main,
add tests for fixits removing static and inline from main

llvm-svn: 173024
2013-01-21 11:25:03 +00:00
Kostya Serebryany 9b46312c87 [tsan] fix thread_name.cc test to work with older versions of libc
llvm-svn: 173023
2013-01-21 11:20:49 +00:00
NAKAMURA Takumi 3e0a363021 CGDebugInfo.cpp: Fix a warning. [-Wunused-variable]
llvm-svn: 173022
2013-01-21 10:51:28 +00:00
Alexey Samsonov 6ad1d7809d ASan: build unit tests with -fsanitize-address-zero-base-shadow on Linux and Android
llvm-svn: 173021
2013-01-21 10:51:18 +00:00
Evgeniy Stepanov f940b2e381 [asan] Move *scanf declarations out of mac-only section.
llvm-svn: 173020
2013-01-21 10:33:14 +00:00
Manuel Klimek 3c6b7c7d71 Allow for nested name specifiers in record declarations.
Now correctly formats:
class A::B {} n;

llvm-svn: 173019
2013-01-21 10:17:14 +00:00
Chandler Carruth c4352ec26a Cleanup the formatting of this header. This removes the namespace indent
and reformats a few constructors using clang-format. Only whitespace
changes here.

llvm-svn: 173018
2013-01-21 10:08:42 +00:00
Manuel Klimek 762dd189a4 Fix parsing of return statements.
Previously, we would not detect brace initializer lists in return
statements, thus:
 return (a)(b) { 1, 2, 3 };
would put the semicolon onto the next line.

llvm-svn: 173017
2013-01-21 10:07:49 +00:00
Alexey Samsonov 3fd1260155 ASan: build runtime flexible mapping and offset in configure+make build as well
llvm-svn: 173016
2013-01-21 09:13:10 +00:00
Alexey Samsonov a58bcf70a1 ASan: use dynamic lookup when building dynamic ASan runtime on Mac, because shadow mapping and offset are defined in the instrumented modules instead of runtime
llvm-svn: 173015
2013-01-21 09:07:01 +00:00
Alexey Samsonov 969be24542 Port r172856: 'Include ubsan runtime even when building a shared library. We don't require executable to be linked with UBSan.' to Mac
llvm-svn: 173014
2013-01-21 08:45:02 +00:00
Alexey Samsonov b52d1a56f0 ASan: build runtime library with ASAN_FLEXIBLE_MAPPING_AND_OFFSET=1 as shadow mapping/offset are always emitted by the LLVM backend now
llvm-svn: 173013
2013-01-21 08:24:19 +00:00
Michael J. Spencer a4f9924c79 Revert "[Object] .bss sections have no content. PR15005."
This reverts commit r173007.

llvm-svn: 173012
2013-01-21 08:13:04 +00:00
Alexey Samsonov b399118cad CMake: add functions creating universal runtime libraries for several architectures on OS X and use them in ASan and UBSan build rules
llvm-svn: 173011
2013-01-21 08:12:20 +00:00
Craig Topper 66163a35ee Use <0 checks in place of ==-1 because it results in simpler code.
llvm-svn: 173010
2013-01-21 07:25:16 +00:00
Craig Topper 9b29486f42 Use MVT instead of EVT in LowerVECTOR_SHUFFLEtoBlend.
llvm-svn: 173009
2013-01-21 07:19:54 +00:00
Craig Topper 32c5406dcf Remove trailing whitespace.
llvm-svn: 173008
2013-01-21 06:57:59 +00:00
Michael J. Spencer c47de41e02 [Object] .bss sections have no content. PR15005.
llvm-svn: 173007
2013-01-21 06:46:11 +00:00