Commit Graph

141858 Commits

Author SHA1 Message Date
Michael Ilseman 830875bbda Docs for SparseMultiSet
llvm-svn: 173092
2013-01-21 21:46:32 +00:00
Richard Osborne 5d477751df Fix some incorrectly named u10 / lu10 instructions.
llvm-svn: 173090
2013-01-21 21:12:30 +00:00
Jakub Staszak 691860c294 Remove unneeded #include.
llvm-svn: 173088
2013-01-21 21:02:47 +00:00
Richard Osborne 38cff3ea7f Remove unused multiclass.
llvm-svn: 173087
2013-01-21 20:50:54 +00:00
Richard Osborne 9d3ec06ef8 Add instruction encodings / disassembly support for u6 / lu6 instructions.
llvm-svn: 173086
2013-01-21 20:44:17 +00:00
Richard Osborne 6e58c6d86d Add instruction encoding / disassembly support for ru6 / lru6 instructions.
llvm-svn: 173085
2013-01-21 20:42:16 +00:00
Howard Hinnant ead15d1f95 Implement the ATOMIC_*_LOCK_FREE macros.
llvm-svn: 173084
2013-01-21 20:39:41 +00:00
Richard Osborne 0d68e21ca7 Use correct format for the LDAWCP instruction (u6).
llvm-svn: 173083
2013-01-21 20:32:54 +00:00
Shankar Easwaran 6d9921fc53 no functionality changes(split WriterELF into multiple files)
llvm-svn: 173082
2013-01-21 20:09:55 +00:00
Douglas Gregor bdb259d223 Give ModuleFiles an index, so that we can use indexed vectors rather
than DenseMaps and SmallPtrSets for module-visitation data. ~2.6%
speedup for modules.

llvm-svn: 173081
2013-01-21 20:07:12 +00:00
Douglas Gregor b898209086 Eliminate Sema::CompareProperties(), which was walking over a pile of
lexical declarations looking for properties when we could more
efficiently check for property mismatches at property declaration
time. Good for ~1% of -fsyntax-only time when most of the properties
we're checking against come from an AST file.

llvm-svn: 173079
2013-01-21 19:42:21 +00:00
Nico Weber 767c8d3570 Formatter: Set MatchingParen for [], to match <>, (), {}. No functionality change.
llvm-svn: 173078
2013-01-21 19:35:06 +00:00
Nico Weber ed272de0f2 Formatter: Rename LSquare to Left to make parseSquare() more consistent with the other paren parsing methods.
llvm-svn: 173077
2013-01-21 19:29:31 +00:00
Enrico Granata 6b4ddc655a <rdar://problem/12437929>
Providing a special mode of operator for "memory read -f c-str" which actually works in most common cases
Where the old behavior would provide:
(lldb) mem read --format s `foo`
0x100000f5d: NULL

Now we do:
(lldb) mem read --format s `foo`
0x100000f5d: "hello world"

You can also specify a count and that many strings will be showed starting at the initial address:
(lldb) mem read -c 2 -f c-str `foo`
0x100000f1d: "hello world"
0x100000f29: "short"

llvm-svn: 173076
2013-01-21 19:20:50 +00:00
Manuel Klimek 2cec01916c Fixes various problems around enum parsing.
Very similar to what we do for record definitions:
- tighten down what is an enum definition, so that we don't mistake a
  function for an enum
- allow common idioms around declarations (we'll want to handle that
  more centrally in the future)

We now correctly format:
enum X f() {
  a();
  return 42;
}

llvm-svn: 173075
2013-01-21 19:17:52 +00:00
Chris Lattner 085c5450d9 r173072 is causing some regressions on big endian hosts, I don't have time to debug it
so revert it for now.

llvm-svn: 173074
2013-01-21 19:08:15 +00:00
Douglas Gregor 90d3442784 Eliminate the oddly-named Sema::ComparePropertiesInBaseAndSuper, which
did a redundant traversal of the lexical declarations in the
superclass. Instead, when we declare a new property, look into the
superclass to see whether we're redeclaring the property. Goot for 1%
of -fsyntax-only time on Cocoa.h and a little less than 3% on my
modules test case.

llvm-svn: 173073
2013-01-21 19:05:22 +00:00
Chris Lattner bba95c08e4 rework the Bitstream reader to actually work a machine word at a time, instead of 32-bits at a time.
This cuts in half the number of virtual methods called to refill that word when compiling on a 64-bit
host, and will make 64-bit read operations faster.

llvm-svn: 173072
2013-01-21 18:48:26 +00:00
Argyrios Kyrtzidis 3ad52ede46 [ASTUnit] Unlike LoadFromCommandLine, LoadFromCompilerInvocation causes a crash if Precompilepreamble
is set to true because there is no FileManager at that point.

Patch by Hurcan Solter!

llvm-svn: 173071
2013-01-21 18:45:42 +00:00
Jordan Rose a60e9268b6 [analyzer] Fix test for r173067.
Note to self: don't remove comments /after/ updating the line-sensitive
part of a test.

llvm-svn: 173070
2013-01-21 18:41:05 +00:00
Douglas Gregor a669ab9856 Replace some unnecessary O(N^2) lookups for properties with
DeclContext lookups. The performance win is negligible in my tests,
but it's the Right Thing To Do (TM).

llvm-svn: 173068
2013-01-21 18:35:55 +00:00
Jordan Rose 78328be4b7 [analyzer] Show notes inside implicit calls at the last explicit call site.
Before:
  struct Wrapper { <-- 2. Calling default constructor for 'NonTrivial'.
    NonTrivial m;
  };

  Wrapper w; <-- 1. Calling implicit default constructor for 'Wrapper'.

After:
  struct Wrapper {
    NonTrivial m;
  };

  Wrapper w; <-- 1. Calling implicit default constructor for 'Wrapper'.
             ^-- 2. Calling default constructor for 'NonTrivial'.

llvm-svn: 173067
2013-01-21 18:28:30 +00:00
Chris Lattner 15c3e7dab5 ReadSourceManagerBlock is skipping over records that can contain Blobs. Not passing
in a StringRef to bind to them forces them to be unpacked into the Record as individual
bytes.  This is wasteful, but not likely to be measurable in this instance.

llvm-svn: 173066
2013-01-21 18:28:26 +00:00
Chris Lattner 1aeca1e806 Fix a heinous inefficiency introduced in r149918, wherein reading each byte of a
BLOB (i.e., large, performance intensive data) in a bitcode file was switched to
invoking one virtual method call per byte read.  Now we do one virtual call per
BLOB.

llvm-svn: 173065
2013-01-21 18:24:49 +00:00
Michael Ilseman 3e3194f4ec Introduce a new data structure, the SparseMultiSet, and changes to the MI scheduler to use it.
A SparseMultiSet adds multiset behavior to SparseSet, while retaining SparseSet's desirable properties. Essentially, SparseMultiSet provides multiset behavior by storing its dense data in doubly linked lists that are inlined into the dense vector. This allows it to provide good data locality as well as vector-like constant-time clear() and fast constant time find(), insert(), and erase(). It also allows SparseMultiSet to have a builtin recycler rather than keeping SparseSet's behavior of always swapping upon removal, which allows it to preserve more iterators. It's often a better alternative to a SparseSet of a growable container or vector-of-vector.

llvm-svn: 173064
2013-01-21 18:18:53 +00:00
Chris Lattner 9221b8fdac wean Blob handling logic off of banging on NextChar directly. Instead, make
it reason about the current bit position, which is always independent of the
underlying cursors word size.

llvm-svn: 173063
2013-01-21 18:18:25 +00:00
Chris Lattner e1817aae5f rename "SkipToWord" to "SkipToFourByteBoundary" since a word is not always 4 bytes.
llvm-svn: 173062
2013-01-21 18:04:19 +00:00
Nadav Rotem b2e7e7a0b6 Fix a comment. Induction vars dont need to start at zero.
llvm-svn: 173061
2013-01-21 17:59:18 +00:00
Howard Hinnant 8d3e797444 Donated anonymously: This enables GCC 4.8.0 to build libc++.
llvm-svn: 173060
2013-01-21 17:26:55 +00:00
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