Граф коммитов

1311 Коммитов

Автор SHA1 Сообщение Дата
Hal Finkel 829d187e21 Add support for gcc-compatible -mpopcntd -mno-popcntd PPC options
gcc provides -mpopcntd and -mno-popcntd for controlling the popcntd target
feature; support these options as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-28 13:51:36 +00:00
Hal Finkel f4320ab08d Add support for gcc-compatible -mmfcrf -mno-mfcrf PPC options
gcc provides -mmfcrf and -mno-mfcrf for controlling what we call
the mfocrf target feature. Also, PPC is now making use of the
static function AddTargetFeature used by the Mips Driver code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178227 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-28 08:38:53 +00:00
Michael Liao 72339a0d16 Add PRFCHW intrinsic support
- Add head 'prfchwintrin.h' to define '_m_prefetchw' which is mapped to
  LLVM/clang prefetch builtin
- Add option '-mprfchw' to enable PRFCHW feature and pre-define '__PRFCHW__'
  macro



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178041 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 17:52:08 +00:00
Douglas Gregor 7aac45a082 <rdar://problem/13358795> Teach CMake to check Subversion version information at build time, not configure time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177939 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 23:16:38 +00:00
Matt Beaumont-Gay b63d8d2609 Fix a layering violation introduced in r177705.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177922 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 21:32:02 +00:00
Alexey Bataev c640058aa7 OpenMP threadprivate directive parsing and semantic analysis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 06:34:35 +00:00
Douglas Gregor 906d66acc5 <rdar://problem/12368093> Extend module maps with a 'conflict' declaration, and warn when a newly-imported module conflicts with an already-imported module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177577 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-20 21:10:35 +00:00
Douglas Gregor 970e441671 Make sure that Module::ConfigMacrosExhaustive gets initialized and deserialized correctly.
This fixes regressions introduced in r177466 that caused several
module tests to fail sporadically.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177481 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-20 03:59:18 +00:00
Douglas Gregor 63a726870b <rdar://problem/10796651> Introduce configuration macros into module maps.
Configuration macros are macros that are intended to alter how a
module works, such that we need to build different module variants
for different values of these macros. A module can declare its
configuration macros, in which case we will complain if the definition
of a configation macro on the command line (or lack thereof) differs
from the current preprocessor state at the point where the module is
imported. This should eliminate some surprises when enabling modules,
because "#define CONFIG_MACRO ..." followed by "#include
<module/header.h>" would silently ignore the CONFIG_MACRO setting. At
least it will no longer be silent about it.

Configuration macros are eventually intended to help reduce the number
of module variants that need to be built. When the list of
configuration macros for a module is exhaustive, we only need to
consider the settings for those macros when building/finding the
module, which can help isolate modules for various project-specific -D
flags that should never affect how modules are build (but currently do).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177466 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-20 00:22:05 +00:00
Argyrios Kyrtzidis c1d2239362 [Modules] Resolve top-headers of modules lazily.
This allows resolving top-header filenames of modules to FileEntries when
we need them, not eagerly.

Note that that this breaks ABI for libclang functions
clang_Module_getTopLevelHeader / clang_Module_getNumTopLevelHeaders
but this is fine because they are experimental and not widely used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176975 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-13 21:13:43 +00:00
Matthew Curtis e8a1efcafb Remove driver support for Hexagon V2 and V3
Driver will now error when trying to compile for V2 or V3.

Removal of V2 and V3 support will allow us to simplify the hexagon
back-end.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176859 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 11:52:09 +00:00
Guy Benyei f3ddf63969 Add 'e' to the SPIR data layout - SPIR is little endian for now.
Add 32/64 bit specific target defines for SPIR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176629 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 13:06:10 +00:00
Jack Carter 971023066c Mips specific inline assembler constraint 'R'
'R' An address that can be sued in a non-macro load or store.

Including missing positive test case and fixed typo for r176453.

Thanks to Richard Smith for catching this!

Jack



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176506 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-05 19:10:54 +00:00
Bob Wilson fc55345144 Tidy up lists of Cortex-A series processors, adding entries for A7.
Also fix a missing entry for cortex-r5 in one copy of getLLVMArchSuffixForARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176457 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-04 22:37:46 +00:00
Jack Carter d2ab6d371e Mips specific inline assembler constraint 'R'
'R' An address that can be sued in a non-macro load or store.
This patch includes a positive test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176453 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-04 21:36:11 +00:00
Tom Stellard fd07591ea5 R600: Use the GPU type to determine the correct DataLayout v2
v2:
  - Add R600_DOUBLE_OPS for RV670
  - s/CPU/GPU/

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176440 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-04 17:40:53 +00:00
Stefanus Du Toit fc09336a59 Fix typos: [Dd]iagnosic -> [Dd]iagnostic
These all appear in comments or (ironically) diagnostics output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176383 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-01 21:41:22 +00:00
Argyrios Kyrtzidis 838a920fda Add one more sanity check in SourceManager::getFileIDLoaded().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176333 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-01 03:43:33 +00:00
Argyrios Kyrtzidis 7db4bb9226 In SourceManager::getFileIDLoaded(), add some sanity checks to make sure we don't enter an infinite loop.
rdar://13120919

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176331 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-01 03:26:00 +00:00
Simon Atanasyan e9616a4972 [Mips] Add two new aliases for MIPS ABI names 32 (means o32 abi) and 64
(means n64 abi) to improve compatibility with GNU tools.
Patch by Jia Liu <proljc@gmail.com>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176187 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-27 14:55:49 +00:00
Ted Kremenek 2564f811ba Refine SourceManager's isBeforeInTranslationUnit() cache to have more entries.
isBeforeInTranslationUnit() uses a cache to reduce the expensive work
to compute a common ancestor for two FileIDs.  This work is very
expensive, so even caching the latest used FileIDs was a big win.
A closer analysis of the cache before, however, shows that the cache
access pattern would oscillate between a working set of FileIDs, and
thus caching more pairs would be profitable.

This patch adds a side table for extending caching.  This side table
is bounded in size (experimentally determined in this case from
a simple Objective-C project), and when the table gets too large
we fall back to the single entry caching before as before.

On Sketch (a small example Objective-C project), this optimization
reduces -fsyntax-only time on SKTGraphicView.m by 5%.  This is
for a project that is already using PCH.

Fixes <rdar://problem/13299847>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176142 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-27 00:00:26 +00:00
Aaron Ballman f9067c6b56 Moving initialization into the initializer list and correcting capitalization, as suggested by Chandler.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176001 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-24 19:08:10 +00:00
Logan Chien a8f7a97a22 Implement __builtin_eh_return_data_regno() for ARM and MIPS.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175954 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-23 04:24:36 +00:00
Peter Collingbourne 7728cddd78 Revert r175912, "Add support for coldcc to clang" at John's request.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175936 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-23 00:06:18 +00:00
Peter Collingbourne 4c67aa9640 Add support for coldcc to clang
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175912 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22 19:24:35 +00:00
Benjamin Kramer f512acee01 Replace some typically large vectors with SmallVector.
This may seem counter-intuitive but the POD-like optimization helps when the
vectors grow into multimegabyte buffers. SmallVector calls realloc which knows
how to twiddle virtual memory bits and avoids large copies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175906 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22 18:29:39 +00:00
David Blaikie 66874fb18a Use None rather than Optional<T>() where possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175705 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 01:47:18 +00:00
Jordan Rose 90a7820de7 Revert "intmax_t is long long on Darwin, not long."
'long' and 'long long' are different for the purposes of mangling.
This caused <rdar://problem/13254874>.

This reverts commit c2f994d31ec85e9af811af38eb1b28709aef0b2c.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175681 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-20 22:28:41 +00:00
David Blaikie dc84cd5efd Include llvm::Optional in clang/Basic/LLVM.h
Post-commit CR feedback from Jordan Rose regarding r175594.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175679 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-20 22:23:23 +00:00
Jordan Rose a905c4fd25 intmax_t is long long on Darwin, not long.
<rdar://problem/11540697>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175588 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-20 01:56:21 +00:00
Argyrios Kyrtzidis 21a0004d80 [modules] Refactor code from ASTReader::makeModuleVisible() into a new function,
Module::getExportedModules() so it can be reused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175548 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 19:34:40 +00:00
Aaron Ballman 6637b06071 Fixing a typo where FixIts was accidentally self-assigning instead of assigning in the parameter Fixits. This fixes several failed assertions with MSVC debug builds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175483 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 02:32:05 +00:00
Tim Northover 6a93c86fc7 AArch64: add atomic support parameters to TargetInfo
This allows Clang to detect and deal wih __atomic_* operations properly on
AArch64. Previously we produced an error when encountering them at high
optimisation levels.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175438 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 12:11:32 +00:00
Jordan Rose 223f0ff6a9 Remove some stray uses of <ctype.h> functions.
These are causing assertions on some MSVC builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174805 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-09 10:09:43 +00:00
Jordan Rose 799f3c13fb CharInfo: Add missing "using namespace clang::charinfo" in .cpp file.
Should fix the MSC bot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174769 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 22:37:49 +00:00
Jordan Rose 3f6f51e282 Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.
Nearly all of these changes are one-to-one replacements; the few that
aren't have to do with custom identifier validation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174768 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 22:30:41 +00:00
Jordan Rose 9893902ece Pull Lexer's CharInfo table out for general use throughout Clang.
Rewriting the same predicates over and over again is bad for code size and
code maintainence. Using the functions in <ctype.h> is generally unsafe
unless they are specified to be locale-independent (i.e. only isdigit and
isxdigit).

The next commit will try to clean up uses of <ctype.h> functions within Clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174765 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 22:30:22 +00:00
Richard Smith d46b7ec911 Add a *San + modules FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174565 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 01:09:29 +00:00
Bill Schmidt 2821e18009 Add some missing PPC cpus
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174215 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 20:23:10 +00:00
Hal Finkel 3c6aaeb262 Add -mqpx and -mno-qpx feature flags to toggle use of the PPC QPX vector instruction set
I've renamed the altivec test to ppc-features (because now there is more than one feature to test).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174204 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 18:44:19 +00:00
Hal Finkel 5ccd3d0214 Add PPC A2Q core and BG/Q preprocessor definitions
The a2q core is the variant of the a2 core used on the BG/Q supercomputers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174151 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 05:53:33 +00:00
Bill Schmidt 199402b9e0 Enable -fno-altivec, -mno-altivec for PowerPC.
Introduces these negation forms explicitly and uses them to control a new
"altivec" target feature for PowerPC.  This allows avoiding generating
Altivec instructions on processors that support Altivec.

The new test case verifies that the Altivec "lvx" instruction is not
used when -fno-altivec is present on the command line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174140 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 02:14:03 +00:00
Tim Northover c264e16a42 Add support for AArch64 target.
In cooperation with the LLVM patch, this should implement all scalar front-end
parts of the C and C++ ABIs for AArch64.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174055 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 12:13:10 +00:00
Filipe Cabecinhas 566f06311f Changed to static_cast, due to post-commit review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173980 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 22:03:24 +00:00
Filipe Cabecinhas 825648a9e2 Cast to remove the narrowing conversion error in c++11.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173978 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 21:50:21 +00:00
Richard Trieu 877761c56d Handle passing non-Qualtypes to %diff better. Instead of asserting, fall back
to printing the default case.  This is a fix for PR15023.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173965 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 20:04:31 +00:00
Dmitri Gribenko cb5620c9b2 Move UTF conversion routines from clang/lib/Basic to llvm/lib/Support
This is required to use them in TableGen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173924 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 12:06:08 +00:00
Dmitri Gribenko adeb7822cb <limits.h> includes <linux/limits.h> on Linux, no need to special-case it
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173578 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26 16:29:36 +00:00
Douglas Gregor 713b7c0118 Since we're stuck with realpath for the header <-> module mapping,
factor the realpath calls into FileManager::getCanonicalName() so we
can cache the results of this epically slow operation. 5% speedup on
my modules test, and realpath drops out of the profile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173542 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26 00:55:12 +00:00
John McCall b8b2c9da87 First pass at abstracting out a class for the target C++ ABI.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173514 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 22:30:49 +00:00