| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
defined. Fixes PR14993!
llvm-svn: 174158
|
| |
|
|
| |
llvm-svn: 174050
|
| |
|
|
|
|
|
| |
filter the elements before emitting them into a PCH. No user-visible
functionality change, except that PCH files may be smaller?
llvm-svn: 174034
|
| |
|
|
| |
llvm-svn: 173866
|
| |
|
|
|
|
|
|
| |
- The only group where it makes sense for the "ExternC" bit is System, so this
simplifies having to have the extra isCXXAware (or ImplicitExternC, depending
on what code you talk to) bit caried around.
llvm-svn: 173859
|
| |
|
|
|
|
|
| |
pool in the global module index is not worthwhile. Update comments to
limit the scope of the global module index to identifiers.
llvm-svn: 173705
|
| |
|
|
| |
llvm-svn: 173702
|
| |
|
|
|
|
|
|
|
|
| |
ModuleManager::visit() by keeping a free list of the two data
structures used to store state (a preallocated stack and a visitation
number vector). Improves -fsyntax-only performance for my modules test
case by 2.8%. Modules has pulled ahead by almost 10% with the global
module index.
llvm-svn: 173692
|
| |
|
|
|
|
| |
-Wundefined-internal warnings with PCH.
llvm-svn: 173538
|
| |
|
|
|
|
|
|
|
|
|
| |
Title: [PR9027] volatile struct bug: member is not loaded at -O;
This is caused by last flag passed to @llvm.memcpy being false,
not honoring that aggregate has at least one 'volatile' data member
(even though aggregate itself has not been qualified as 'volatile'.
As a result, optimization optimizes away the memcpy altogether.
Patch review by John MaCall (I still need to fix up a test though).
llvm-svn: 173535
|
| |
|
|
|
|
|
|
|
| |
index, optimizing the operation that skips lookup in modules where we
know the identifier will not be found. This makes the global module
index optimization actually useful, providing an 8.5% speedup over
modules without the global module index for -fsyntax-only.
llvm-svn: 173529
|
| |
|
|
|
|
|
|
| |
never key functions. We did not implement that rule for the
iOS ABI, which was driven by what was implemented in gcc-4.2.
However, implement it now for other ARM-based platforms.
llvm-svn: 173515
|
| |
|
|
|
|
|
|
|
|
| |
and limiting ourselves to two memory allocations. 10% speedup in
-fsyntax-only time for modules.
With this change, we can actually see some performance different from
the global module index, but it's still about 1%.
llvm-svn: 173512
|
| |
|
|
| |
llvm-svn: 173412
|
| |
|
|
| |
llvm-svn: 173408
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AST reader.
The global module index tracks all of the identifiers known to a set
of module files. Lookup of those identifiers looks first in the global
module index, which returns the set of module files in which that
identifier can be found. The AST reader only needs to look into those
module files and any module files not known to the global index (e.g.,
because they were (re)built after the global index), reducing the
number of on-disk hash tables to visit. For an example source I'm
looking at, we go from 237844 total identifier lookups into on-disk
hash tables down to 126817.
Unfortunately, this does not translate into a performance advantage.
At best, it's a wash once the global module index has been built, but
that's ignore the cost of building the global module index (which
is itself fairly large). Profiles show that the global module index
code is far less efficient than it should be; optimizing it might give
enough of an advantage to justify its continued inclusion.
llvm-svn: 173405
|
| |
|
|
|
|
|
| |
"-fmodules-global-index" and expand its behavior to include both the
use and generation of the global module index.
llvm-svn: 173404
|
| |
|
|
|
|
| |
identifiers within the AST file reader.
llvm-svn: 173403
|
| |
|
|
|
|
|
| |
raw_fd_ostream(fd, ...) instead.
FIXME: PathV2::unique_file() is assumed to open the file with binary mode on win32.
llvm-svn: 173330
|
| |
|
|
| |
llvm-svn: 173303
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The global module index is a "global" index for all of the module
files within a particular subdirectory in the module cache, which
keeps track of all of the "interesting" identifiers and selectors
known in each of the module files. One can perform a fast lookup in
the index to determine which module files will have more information
about entities with a particular name/selector. This information can
help eliminate redundant lookups into module files (a serious
performance problem) and help with creating auto-import/auto-include
Fix-Its.
The global module index is created or updated at the end of a
translation unit that has triggered a (re)build of a module by
scraping all of the .pcm files out of the module cache subdirectory,
so it catches everything. As with module rebuilds, we use the file
system's atomicity to synchronize.
llvm-svn: 173301
|
| |
|
|
|
|
|
|
|
| |
identifiers into two parts: the part that involves dealing with the
key (which can be re-used) and the ASTReader-specific part that
creates the IdentifierInfos. While I'm at it, StringRef'ify this code,
which was using pair<const char*, unsigned>. No functionality change.
llvm-svn: 173283
|
| |
|
|
|
|
|
| |
would expect, and clean up the return/break inconsistencies. Thanks,
Sebastian!
llvm-svn: 173171
|
| |
|
|
|
|
|
|
| |
This change also makes the serialisation store the required semantics,
fixing an issue where PPC128 was always assumed when re-reading a
128-bit value.
llvm-svn: 173139
|
| |
|
|
|
|
|
| |
than DenseMaps and SmallPtrSets for module-visitation data. ~2.6%
speedup for modules.
llvm-svn: 173081
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 173058
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
kind indicates that it can never be redeclared. Good for a 1% speedup,
and redeclaration searching drops off the profile.
llvm-svn: 173054
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
OpenCL restrictions (OpenCL 1.2 spec 6.9)
llvm-svn: 172973
|
| |
|
|
|
|
|
|
| |
parameter,
and adopt "advance" in more places.
llvm-svn: 172951
|
| |
|
|
| |
llvm-svn: 172938
|
| |
|
|
|
|
| |
BitstreamCursor APIs.
llvm-svn: 172937
|
| |
|
|
| |
llvm-svn: 172932
|
| |
|
|
|
|
|
| |
which hide a bunch of private details of the cursor from clients and simplify
their code. More to come.
llvm-svn: 172922
|
| |
|
|
| |
llvm-svn: 172910
|
| |
|
|
| |
llvm-svn: 172884
|
| |
|
|
| |
llvm-svn: 172862
|
| |
|
|
|
|
|
|
|
| |
Makes sure that a deserialized macro is only added to the preprocessor macro definitions only once.
Unfortunately I couldn't get a reduced test case.
rdar://13016031
llvm-svn: 172843
|
| |
|
|
| |
llvm-svn: 172808
|
| |
|
|
|
|
|
| |
complicated modules (<rdar://problem/13038265>). Unfortunately, this
un-fixes <rdar://problem/13016031>.
llvm-svn: 172783
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
consider (sub)module visibility.
The bulk of this change replaces myriad hand-rolled loops over the
linked list of Objective-C categories/extensions attached to an
interface declaration with loops using one of the four new category
iterator kinds:
visible_categories_iterator: Iterates over all visible categories
and extensions, hiding any that have their "hidden" bit set. This is
by far the most commonly used iterator.
known_categories_iterator: Iterates over all categories and
extensions, ignoring the "hidden" bit. This tends to be used for
redeclaration-like traversals.
visible_extensions_iterator: Iterates over all visible extensions,
hiding any that have their "hidden" bit set.
known_extensions_iterator: Iterates over all extensions, whether
they are visible to normal name lookup or not.
The effect of this change is that any uses of the visible_ iterators
will respect module-import visibility. See the new tests for examples.
Note that the old accessors for categories and extensions are gone;
there are *Raw() forms for some of them, for those (few) areas of the
compiler that have to manipulate the linked list of categories
directly. This is generally discouraged.
Part two of <rdar://problem/10634711>.
llvm-svn: 172665
|
| |
|
|
|
|
|
|
|
|
| |
added
while deserializing a macro, make sure to copy/move what we need from it.
Fixes clang-x86_64-debian-fast bot.
llvm-svn: 172629
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would serialize the macro redefinitions as a list, part of
the identifier, and try to chain them together across modules individually
without having the info that they were already chained at definition time.
Change this by serializing the macro redefinition chain and then try
to synthesize the chain parts across modules. This allows us to correctly
pinpoint when 2 different definitions are ambiguous because they came from
unrelated modules.
Fixes bogus "ambiguous expansion of macro" warning when a macro in a PCH
is redefined without undef'ing it first.
rdar://13016031
llvm-svn: 172620
|
| |
|
|
|
|
| |
Make the const_cast explicit to silence a compiler warning.
llvm-svn: 172560
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
metadata for linking against the libraries/frameworks for imported
modules.
The module map language is extended with a new "link" directive that
specifies what library or framework to link against when a module is
imported, e.g.,
link "clangAST"
or
link framework "MyFramework"
Importing the corresponding module (or any of its submodules) will
eventually link against the named library/framework.
For now, I've added some placeholder global metadata that encodes the
imported libraries/frameworks, so that we can test that this
information gets through to the IR. The format of the data is still
under discussion.
llvm-svn: 172437
|
| |
|
|
|
|
| |
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
which a particular declaration resides. Use this information to
customize the "definition of 'blah' must be imported from another
module" diagnostic with the module the user actually has to
import. Additionally, recover by importing that module, so we don't
complain about other names in that module.
Still TODO: coming up with decent Fix-Its for these cases, and expand
this recovery approach for other name lookup failures.
llvm-svn: 172290
|
| |
|
|
|
|
| |
Patch by David Greene.
llvm-svn: 172262
|