summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* OpenMP threadprivate with qualified names.Alexey Bataev2013-05-131-1/+2
| | | | llvm-svn: 181683
* Add SystemZ supportUlrich Weigand2013-05-061-0/+102
| | | | | | | | | | | | | | This patch then adds all the usual platform-specific pieces for SystemZ: driver support, basic target info, register names and constraints, ABI info and vararg support. It also adds new tests to verify pre-defined macros and inline asm, and updates a test for the minimum alignment change. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. llvm-svn: 181211
* Allow targets to define minimum alignment for global variablesUlrich Weigand2013-05-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new common code feature that allows platform code to request minimum alignment of global symbols. The background for this is that on SystemZ, the most efficient way to load addresses of global symbol is the LOAD ADDRESS RELATIVE LONG (LARL) instruction. This instruction provides PC-relative addressing, but only to *even* addresses. For this reason, existing compilers will guarantee that global symbols are always aligned to at least 2. [ Since symbols would otherwise already use a default alignment based on their type, this will usually only affect global objects of character type or character arrays. ] GCC also allows creating symbols without that extra alignment by using explicit "aligned" attributes (which then need to be used on both definition and each use of the symbol). To enable support for this with Clang, this patch adds a TargetInfo::MinGlobalAlign variable that provides a global minimum for the alignment of every global object (unless overridden via explicit alignment attribute), and adds code to respect this setting. Within this patch, no platform actually sets the value to anything but the default 1, resulting in no change in behaviour on any existing target. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. llvm-svn: 181210
* AArch64: teach Clang about __clear_cache intrinsicTim Northover2013-05-041-2/+12
| | | | | | | libgcc provides a __clear_cache intrinsic on AArch64, much like it does on 32-bit ARM. llvm-svn: 181111
* Revert r177218.Argyrios Kyrtzidis2013-05-031-1/+0
| | | | | | Per discussion in cfe-commits, asserting may be a better way than introducing a special test flag. llvm-svn: 181073
* Remove DiagnosticConsumer::clone(), a bad idea that is now unused.Douglas Gregor2013-05-031-5/+0
| | | | llvm-svn: 181070
* When building a module, forward diagnostics to the outer diagnostic consumer.Douglas Gregor2013-05-031-0/+22
| | | | | | | | | | | | | | | Previously, we would clone the current diagnostic consumer to produce a new diagnostic consumer to use when building a module. The problem here is that we end up losing diagnostics for important diagnostic consumers, such as serialized diagnostics (where we'd end up with two diagnostic consumers writing the same output file). With forwarding, the diagnostics from all of the different modules being built get forwarded to the one serialized-diagnostic consumer and are emitted in a sane way. Fixes <rdar://problem/13663996>. llvm-svn: 181067
* Initialize WarnOnSpellCheck.Rafael Espindola2013-05-031-0/+1
| | | | | | | | | Clang always calls setWarnOnSpellCheck, but we shouldn't require every client to do so. Issue noticed by Enea Zaffanella. llvm-svn: 181021
* Add support for -march=btver2.Benjamin Kramer2013-05-031-0/+15
| | | | llvm-svn: 181006
* Add some more required SPARC v9 predefined macros.Jakob Stoklund Olesen2013-04-241-0/+9
| | | | | | Solaris/AuroraUX only need __arch64__, the BSDs need the other variants. llvm-svn: 180172
* Add comment to describe cleverness.Benjamin Kramer2013-04-181-0/+2
| | | | llvm-svn: 179806
* Reject asm output constraints that consist of modifiers only.Benjamin Kramer2013-04-181-1/+1
| | | | | | Fixes PR15759. llvm-svn: 179756
* [Modules] Use global index to improve typo correction performanceArgyrios Kyrtzidis2013-04-171-1/+1
| | | | | | | | | Typo correction for an unqualified name needs to walk through all of the identifier tables of all modules. When we have a global index, just walk its identifier table only. rdar://13425732 llvm-svn: 179730
* Add support for sparcv9 targets.Jakob Stoklund Olesen2013-04-161-13/+61
| | | | | | | | | | | | The SPARC v8 and SPARC v8 architectures are very similar, so use a base class to share most information between them. Include operating systems with known SPARC v9 ports. Also fix two issues with the SPARC v8 data layout string: SPARC v8 is a big endian target with a 64-bit aligned stack. llvm-svn: 179596
* [Mips] Support -mmicromips / -mno-micromips command line options.Simon Atanasyan2013-04-141-1/+10
| | | | llvm-svn: 179489
* [Mips] Follow-up to r179481. Consider "single-float" as a separateSimon Atanasyan2013-04-141-6/+8
| | | | | | independent of float ABI feature in the MipsTargetInfoBase class. llvm-svn: 179486
* Introduce SourceManager::getDecomposedIncludedLoc, that returns the ↵Argyrios Kyrtzidis2013-04-131-11/+30
| | | | | | | | | "included/expanded in" decomposed location of the given FileID. The main benefit is to speed-up SourceManager::isBeforeInTranslationUnit which is common to query the included/expanded location of the same FileID multiple times. llvm-svn: 179435
* The PNaCl target no longer permits __attribute__((regparm)).Eli Bendersky2013-04-081-2/+2
| | | | | | | Remove the custom lowering code dealing with it, disallow it in PNaclTargetInfo and adjust tests accordingly. llvm-svn: 179059
* AArch64: bring predefines in line with most recent ACLE documentTim Northover2013-04-051-16/+16
| | | | | | | | | | | The prefixes and names used are now identical to 32-bit ARM, which is also expected to remain unchanged. If we made this change after a release, we'd probably have to support both variants for a while, but I think since AArch64 exists only on trunk now, it's acceptable to simply swap them now. llvm-svn: 178870
* Add support for __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{1,2,4,8} on x86.Michael J. Spencer2013-04-041-0/+8
| | | | | | This fixes std::thread with libstdc++. llvm-svn: 178816
* R600: Add missing Southern Islands GPU to setCPU() functionTom Stellard2013-04-011-1/+1
| | | | llvm-svn: 178498
* Remove old NVPTX cpus and add new NVPTX cpusJustin Holewinski2013-03-301-1/+8
| | | | llvm-svn: 178419
* Add support for gcc-compatible -mfprnd -mno-fprnd PPC optionsHal Finkel2013-03-301-2/+2
| | | | | | | gcc provides -mfprnd and -mno-fprnd for controlling the fprnd target feature; support these options as well. llvm-svn: 178414
* Add RDSEED intrinsic support defined in AVX2 extensionMichael Liao2013-03-291-1/+16
| | | | llvm-svn: 178331
* Add support for gcc-compatible -mpopcntd -mno-popcntd PPC optionsHal Finkel2013-03-281-1/+2
| | | | | | | gcc provides -mpopcntd and -mno-popcntd for controlling the popcntd target feature; support these options as well. llvm-svn: 178235
* Add support for gcc-compatible -mmfcrf -mno-mfcrf PPC optionsHal Finkel2013-03-281-1/+1
| | | | | | | | 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. llvm-svn: 178227
* Add PRFCHW intrinsic supportMichael Liao2013-03-261-2/+17
| | | | | | | | | - 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 llvm-svn: 178041
* <rdar://problem/13358795> Teach CMake to check Subversion version ↵Douglas Gregor2013-03-252-2/+27
| | | | | | information at build time, not configure time. llvm-svn: 177939
* Fix a layering violation introduced in r177705.Matt Beaumont-Gay2013-03-251-1/+1
| | | | llvm-svn: 177922
* OpenMP threadprivate directive parsing and semantic analysisAlexey Bataev2013-03-222-0/+44
| | | | llvm-svn: 177705
* <rdar://problem/12368093> Extend module maps with a 'conflict' declaration, ↵Douglas Gregor2013-03-201-0/+18
| | | | | | and warn when a newly-imported module conflicts with an already-imported module. llvm-svn: 177577
* Make sure that Module::ConfigMacrosExhaustive gets initialized and ↵Douglas Gregor2013-03-201-3/+4
| | | | | | | | | deserialized correctly. This fixes regressions introduced in r177466 that caused several module tests to fail sporadically. llvm-svn: 177481
* <rdar://problem/10796651> Introduce configuration macros into module maps.Douglas Gregor2013-03-201-1/+13
| | | | | | | | | | | | | | | | | | | | | | 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). llvm-svn: 177466
* [Modules] Resolve top-headers of modules lazily.Argyrios Kyrtzidis2013-03-131-0/+14
| | | | | | | | | | | 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. llvm-svn: 176975
* Remove driver support for Hexagon V2 and V3Matthew Curtis2013-03-121-2/+0
| | | | | | | | | 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. llvm-svn: 176859
* Add 'e' to the SPIR data layout - SPIR is little endian for now.Guy Benyei2013-03-071-4/+12
| | | | | | Add 32/64 bit specific target defines for SPIR. llvm-svn: 176629
* Mips specific inline assembler constraint 'R'Jack Carter2013-03-051-1/+1
| | | | | | | | | | | | '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 llvm-svn: 176506
* Tidy up lists of Cortex-A series processors, adding entries for A7.Bob Wilson2013-03-041-2/+3
| | | | | | Also fix a missing entry for cortex-r5 in one copy of getLLVMArchSuffixForARM. llvm-svn: 176457
* Mips specific inline assembler constraint 'R'Jack Carter2013-03-041-0/+3
| | | | | | | 'R' An address that can be sued in a non-macro load or store. This patch includes a positive test case. llvm-svn: 176453
* R600: Use the GPU type to determine the correct DataLayout v2Tom Stellard2013-03-041-8/+101
| | | | | | | | | v2: - Add R600_DOUBLE_OPS for RV670 - s/CPU/GPU/ Reviewed-by: Alex Deucher <alexander.deucher@amd.com> llvm-svn: 176440
* Fix typos: [Dd]iagnosic -> [Dd]iagnosticStefanus Du Toit2013-03-011-3/+3
| | | | | | These all appear in comments or (ironically) diagnostics output. llvm-svn: 176383
* Add one more sanity check in SourceManager::getFileIDLoaded().Argyrios Kyrtzidis2013-03-011-0/+5
| | | | llvm-svn: 176333
* In SourceManager::getFileIDLoaded(), add some sanity checks to make sure we ↵Argyrios Kyrtzidis2013-03-011-0/+7
| | | | | | | | don't enter an infinite loop. rdar://13120919 llvm-svn: 176331
* [Mips] Add two new aliases for MIPS ABI names 32 (means o32 abi) and 64Simon Atanasyan2013-02-271-9/+19
| | | | | | | (means n64 abi) to improve compatibility with GNU tools. Patch by Jia Liu <proljc@gmail.com>. llvm-svn: 176187
* Refine SourceManager's isBeforeInTranslationUnit() cache to have more entries.Ted Kremenek2013-02-271-1/+31
| | | | | | | | | | | | | | | | | | | | | | 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> llvm-svn: 176142
* Moving initialization into the initializer list and correcting ↵Aaron Ballman2013-02-241-4/+3
| | | | | | capitalization, as suggested by Chandler. llvm-svn: 176001
* Implement __builtin_eh_return_data_regno() for ARM and MIPS.Logan Chien2013-02-231-0/+12
| | | | llvm-svn: 175954
* Revert r175912, "Add support for coldcc to clang" at John's request.Peter Collingbourne2013-02-231-2/+5
| | | | llvm-svn: 175936
* Add support for coldcc to clangPeter Collingbourne2013-02-221-5/+2
| | | | llvm-svn: 175912
* Replace some typically large vectors with SmallVector.Benjamin Kramer2013-02-221-1/+1
| | | | | | | | 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. llvm-svn: 175906
OpenPOWER on IntegriCloud