summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Initial parsing and sema analysis for 'single' directive.Alexey Bataev2014-06-2628-5/+887
| | | | llvm-svn: 211774
* Fix dangling referenceAndreas Simbuerger2014-06-262-1/+5
| | | | llvm-svn: 211773
* [Driver] Improve the `isPathUnderSysroot()` function. Now it returns aSimon Atanasyan2014-06-262-7/+16
| | | | | | | correct result even if checking paths: a) symlinks and/or b) contains relative parts like /dir1/dir2/../dir2. llvm-svn: 211772
* [X86] Improve the selection of SSE3/AVX addsub instructions. Andrea Di Biagio2014-06-262-2/+198
| | | | | | | | | | | | | | | | | | | | | | | | | This patch teaches the backend how to canonicalize a shuffle vectors according to the rule: - (shuffle (FADD A, B), (FSUB A, B), Mask) -> (shuffle (FSUB A, -B), (FADD A, -B), Mask) Where 'Mask' is: <0,5,2,7> ;; for v4f32 and v4f64 shuffles. <0,3> ;; for v2f64 shuffles. <0,9,2,11,4,13,6,15> ;; for v8f32 shuffles. In general, ISel only knows how to pattern-match a canonical 'fadd + fsub + blendi' dag node sequence into an ADDSUB instruction. This new rule allows to convert a non-canonical dag sequence into a canonical one that will be matched by a single ADDSUB at ISel stage. The idea of converting a non-canonical ADDSUB into a canonical one by swapping the first two operands of the shuffle, and then negating the second operand of the FADD and FSUB, was originally proposed by Hal Finkel. llvm-svn: 211771
* Support for LLVM-style RTTI isa<...>, dyn_cast<...> et al.Andreas Simbuerger2014-06-263-38/+349
| | | | llvm-svn: 211770
* Support the new DiagnosticRemarksAndreas Simbuerger2014-06-265-77/+488
| | | | | | | | | | | | | | | | | | | | | | | | | | Add support for generating optimization remarks after completing the detection of Scops. The goal is to provide end-users with useful hints about opportunities that help to increase the size of the detected Scops in their code. By default the remark is unspecified and the debug location is empty. Future patches have to expand on the messages generated. This patch brings a simple test case for ReportFuncCall to demonstrate the feature. Reports all missed opportunities to increase the size/number of valid Scops: clang <...> -Rpass-missed="polly-detect" <...> opt <...> -pass-remarks-missed="polly-detect" <...> Reports beginning and end of all valid Scops: clang <...> -Rpass="polly-detect" <...> opt <...> -pass-remarks="polly-detect" <...> Differential Revision: http://reviews.llvm.org/D4171 llvm-svn: 211769
* This patch removed duplicate code for matching patterns Dinesh Dwivedi2014-06-263-146/+11
| | | | | | | | | which are now handled in SimplifyUsingDistributiveLaws() (after r211261) Differential Revision: http://reviews.llvm.org/D4253 llvm-svn: 211768
* [OPENMP] Initial parsing and sema analysis for 'section' directive.Alexey Bataev2014-06-2627-33/+335
| | | | llvm-svn: 211767
* Sema: Allow dllimport entities in template args for mingwDavid Majnemer2014-06-262-20/+28
| | | | | | | | | | | | | | Previously dllimport variables inside of template arguments relied on not using the C++11 codepath when -fms-compatibility was set. While this allowed us to achieve compatibility with MSVC, it did so at the expense of MingW. Instead, try to use the DeclRefExpr we dig out of the template argument. If it has the dllimport attribute, accept it and skip the C++11 null-pointer check. llvm-svn: 211766
* Added instruction combine to transform few more negative values addition to ↵Dinesh Dwivedi2014-06-262-49/+80
| | | | | | | | | | | | subtraction (Part 2) This patch enables transforms for (x + (~(y | c) + 1) --> x - (y | c) if c is even Differential Revision: http://reviews.llvm.org/D4209 llvm-svn: 211765
* Convert some function arguments to use ArrayRef.Craig Topper2014-06-268-91/+63
| | | | llvm-svn: 211764
* Convert StringLiteralParser constructor to use ArrayRef instead of a pointer ↵Craig Topper2014-06-2610-30/+29
| | | | | | and count. llvm-svn: 211763
* GlobalOpt: Don't optimize thread_local for initializersDavid Majnemer2014-06-262-3/+14
| | | | | | | | Folding a reference to a thread_local variable into another global variable's initializer is very problematic, there is no relocation that exists to represent such an access. llvm-svn: 211762
* Make test from r211758 portableAlp Toker2014-06-261-0/+1
| | | | | | | It turns out the -fblocks option is determined by the default tooling target and not implied by the other two flags. llvm-svn: 211761
* CodeGen: Improve warnings about uninstrumented files when profilingJustin Bogner2014-06-269-12/+95
| | | | | | | | | Improve the warning when building with -fprofile-instr-use and a file appears not to have been profiled at all. This keys on whether a function is defined in the main file or not to avoid false negatives when one includes a header with functions that have been profiled. llvm-svn: 211760
* Reformat RAVs to sync up following recent updatesAlp Toker2014-06-262-42/+41
| | | | llvm-svn: 211759
* RAV: visit copy expressions of captured variables in blocks (ObjC++11)Alp Toker2014-06-264-1/+32
| | | | | | Patch by Mathieu Baudet. llvm-svn: 211758
* R600: Fix vector FMAMatt Arsenault2014-06-262-7/+66
| | | | llvm-svn: 211757
* Forward -u to the linker on gnutools toolchainsReid Kleckner2014-06-262-0/+7
| | | | | | | | | | | | | | | | Summary: The BSDs and Darwin all forward the whole 'u' group, but gcc only forwards -u so far as I can tell. I only forward -u, since that's a minimal change, and many people object to magically recognizing and forwarding linker arguments. Reviewers: chandlerc, joerg Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4304 llvm-svn: 211756
* Patch from Albert J. Wong to make type_traits take advantage of gcc ↵Marshall Clow2014-06-262-7/+16
| | | | | | intrinsics in 4.7 and later. No functionality change when using clang. llvm-svn: 211755
* Remove forward decl of SmallVectorImpl now that we have the headerReid Kleckner2014-06-261-2/+0
| | | | | | Follow up to r211749. llvm-svn: 211754
* Don't build switch tables for dllimport and TLS variables in GEPsHans Wennborg2014-06-262-7/+11
| | | | | | | This is a follow-up to r211331, which failed to notice that we were returning early from ValidLookupTableConstant for GEPs. llvm-svn: 211753
* MSVC build fix following r211749Alp Toker2014-06-263-10/+13
| | | | | | Avoid strndup() llvm-svn: 211752
* Fix building for iOSNick Kledzik2014-06-261-1/+1
| | | | llvm-svn: 211751
* [X86] AVX512: Fix asm syntax for packed vcmpAdam Nemet2014-06-262-3/+11
| | | | | | | | The *_alt defs for vcmp are used by the InstParser (the asm string in the main def is used by the InstPrinter) . The former was accepting vector registers as destination rather than mask registers. llvm-svn: 211750
* Introduce a string_ostream string builder faciltyAlp Toker2014-06-2657-285/+222
| | | | | | | | | | | | | | | | | | | | string_ostream is a safe and efficient string builder that combines opaque stack storage with a built-in ostream interface. small_string_ostream<bytes> additionally permits an explicit stack storage size other than the default 128 bytes to be provided. Beyond that, storage is transferred to the heap. This convenient class can be used in most places an std::string+raw_string_ostream pair or SmallString<>+raw_svector_ostream pair would previously have been used, in order to guarantee consistent access without byte truncation. The patch also converts much of LLVM to use the new facility. These changes include several probable bug fixes for truncated output, a programming error that's no longer possible with the new interface. llvm-svn: 211749
* Minor libc++abi changes to make things build better with gcc.Nico Weber2014-06-253-1/+3
| | | | llvm-svn: 211748
* For CrashRecoveryContext::RunSafelyOnThread, propagate Darwin's ↵Argyrios Kyrtzidis2014-06-252-2/+24
| | | | | | | | | | | | PRIO_DARWIN_BG to the new thread if it is set on the calling thread. This allows libclang's indexing threads to propagate their priority to the clang module building threads. rdar://17459872 llvm-svn: 211747
* Make -Wincomplete-umbrella go through the VFSBen Langmuir2014-06-257-4/+42
| | | | | | | By using vfs::recursive_directory_iterator, this warning will now fire when some or all of a module's headers are from VFS mappings. llvm-svn: 211746
* Update libc++abi to use the ARM EHABI unwinder from its libunwind.Nico Weber2014-06-253-36/+85
| | | | llvm-svn: 211745
* Fix typoMichael Liao2014-06-251-2/+2
| | | | llvm-svn: 211744
* Land support for ARM EHABI unwinding for libunwind.Nico Weber2014-06-2510-83/+1636
| | | | | | | | | | | This was written by: Albert Wong <ajwong@chromium.org> Antoine Labour <piman@chromium.org> Dana Jansen <danakj@chromium.org Jonathan Roelofs <jonathan@codesourcery.com> Nico Weber <thakis@chromium.org> llvm-svn: 211743
* Make PR20038.cpp test case portable to non-Itanium ABIsDavid Blaikie2014-06-251-1/+1
| | | | | | | The only call in this function is to the dtor, so there's no need to name a non-portable mangled function name to match it. llvm-svn: 211742
* Suppress clang-tidy-diff.py. It is incompatible to py26 due to argparse.NAKAMURA Takumi2014-06-251-1/+1
| | | | llvm-svn: 211741
* [FastISel][X86] More refactoring of select lowering and XALU folding. NFC.Juergen Ributzka2014-06-251-83/+55
| | | | llvm-svn: 211740
* Start landing support for ARM EHABI unwinding.Nico Weber2014-06-255-17/+75
| | | | | | | | The new code will be behind a LIBCXXABI_ARM_EHABI define (so that platforms that don't want it can continue using e.g. SJLJ). This commit mostly just adds the LIBCXXABI_ARM_EHABI define. llvm-svn: 211739
* Remove REQUIRES lines from portable testsAlp Toker2014-06-254-6/+0
| | | | | | These tests are target-independent and shouldn't ever be suppressed. llvm-svn: 211738
* The includes were sorted. Revert r210578.Eric Christopher2014-06-251-1/+1
| | | | llvm-svn: 211737
* Don't allow dllimport variables in constant initializersHans Wennborg2014-06-255-13/+14
| | | | | | | | | | | | | | | | | This is a follow-up to David's r211677. For the following code, we would end up referring to 'foo' in the initializer for 'arr', and then fail to link, because 'foo' is dllimport and needs to be accessed through the __imp_?foo. __declspec(dllimport) extern const char foo[]; const char* f() { static const char* const arr[] = { foo }; return arr[0]; } Differential Revision: http://reviews.llvm.org/D4299 llvm-svn: 211736
* [FastISel][X86] Refactor XALU folding. NFC.Juergen Ributzka2014-06-251-124/+70
| | | | llvm-svn: 211735
* fixed typos in commentSanjay Patel2014-06-251-1/+1
| | | | llvm-svn: 211734
* relational: Fix signbitAaron Watry2014-06-251-7/+7
| | | | | | | | | The vector components were mistakenly using () instead of {}, which caused all but the last vector component to be dropped on the floor. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Jeroen Ketema <j.ketema@imperial.ac.uk> llvm-svn: 211733
* Add vfs::recursive_directory_iteratorBen Langmuir2014-06-253-8/+168
| | | | | | | | | For now, this is only used by its unit tests. It is similar to the API in llvm::sys::fs::recursive_directory_iterator, but without some of the more complex features like requesting that the iterator not recurse into the next directory, for example. llvm-svn: 211732
* Mention that Phabricator users should subscribe to *-commitsReid Kleckner2014-06-251-4/+16
| | | | | | | This probably explains why a lot of messages get lost for first time Phabricator users. llvm-svn: 211731
* [FastISel][X86] Only fold the cmp into the select when both instructions are ↵Juergen Ributzka2014-06-252-5/+65
| | | | | | | | | | | | in the same basic block. If the cmp is in a different basic block, then it is possible that not all operands of that compare have defined registers. This can happen when one of the operands to the cmp is a load and the load gets folded into the cmp. In this case FastISel will skip the load instruction and the vreg is never defined. llvm-svn: 211730
* Fix silly compilation error.Zachary Turner2014-06-251-2/+2
| | | | llvm-svn: 211728
* Merge the used symbol scanning of MCObjectStreamer and RecordStreamer.Rafael Espindola2014-06-255-17/+19
| | | | | | This completes the refactoring of RecordStreamer. llvm-svn: 211727
* Fix a bug in the IRMemoryMap which generated bogus allocations.Zachary Turner2014-06-252-18/+39
| | | | | | | | | | | | | Previously, only the starting locations of the candidate interval and the existing interval were compared. To correctly detect range intersections, it is necessary to compare the entire range of both intervals against each other. Reviewed by: scallanan Differential Revision: http://reviews.llvm.org/D4286 llvm-svn: 211726
* MS ABI: Propagate class-level DLL attributes to class template ↵Hans Wennborg2014-06-256-5/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | | specialization bases (PR11170) Consider the following code: template <typename T> class Base {}; class __declspec(dllexport) class Derived : public Base<int> {} When the base of an exported or imported class is a class template specialization, MSVC will propagate the dll attribute to the base. In the example code, Base<int> becomes a dllexported class. This commit makes Clang do the proopagation when the base hasn't been instantiated yet, and warns about it being unsupported otherwise. This is different from MSVC, which allows changing a specialization back and forth between dllimport and dllexport and seems to let the last one win. Changing the dll attribute after instantiation would be hard for us, and doesn't seem to come up in practice, so I think this is a reasonable limitation to have. MinGW doesn't do this kind of propagation. Differential Revision: http://reviews.llvm.org/D4264 llvm-svn: 211725
* Revert "PR20038: DebugInfo: Inlined call sites where the caller has debug ↵David Blaikie2014-06-254-102/+50
| | | | | | | | | | | info but the call itself has no debug location." This reverts commit r211723. Breaks the ASan/compiler-rt build... guess I didn't test very far at all :/. llvm-svn: 211724
OpenPOWER on IntegriCloud