summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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
* PR20038: DebugInfo: Inlined call sites where the caller has debug info but ↵David Blaikie2014-06-254-50/+102
| | | | | | | | | | | | | | | | | | the call itself has no debug location. This situation does bad things when inlined, so I've fixed Clang not to produce inlinable call sites without locations when the caller has debug info (in the one case where I could find that this occurred). This updates the PR20038 test case to be what clang now produces, and readds the assertion that had to be removed due to this bug. I've also beefed up the debug info verifier to help diagnose these issues in the future, and I hope to add checks to the inliner to just assert-fail if it encounters this situation. If, in the future, we decide we have to cope with this situation, the right thing to do is probably to just remove all the DebugLocs from the inlined instructions. llvm-svn: 211723
* PR20038: DebugInfo: Call sites without DebugLocs for temporary dtors after a ↵David Blaikie2014-06-252-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | conditional With && at the top level of an expression, the last thing done when emitting the expression was an unconditional jump to the cleanup block. To reduce the amount of stepping, the DebugLoc is omitted from the unconditional jump. This is done by clearing the IRBuilder's "CurrentDebugLocation"*. If this is not set to some non-empty value before the cleanup block is emitted, the cleanups don't get a location either. If a call without a location is emitted in a function with debug info, and that call is then inlined - bad things happen. (without a location for the call site, the inliner would just leave the inlined DebugLocs as they were - pointing to roots in the original function, not inlined into the current function) Follow up commit to LLVM will ensure that breaking the invariants of the DebugLoc chains by having chains that don't lead to the current function will fail assertions, so we shouldn't accidentally slip any of these cases in anymore. Those assertions may reveal further cases that need to be fixed in clang, though I've tried to test heavily to avoid that. * See r128471, r128513 for the code that clears the CurrentDebugLocation. Simply removing this code or moving the code into IRBuilder to apply to all unconditional branches would regress desired behavior, unfortunately. llvm-svn: 211722
* Add Rpass-missed and Rpass-analysis reports to the loop vectorizer. The ↵Tyler Nowicki2014-06-255-27/+511
| | | | | | | | remarks give the vector width of vectorized loops and a brief analysis of loops that fail to be vectorized. For example, an analysis will be generated for loops containing control flow that cannot be simplified to a select. The optimization remarks also give the debug location of expressions that cannot be vectorized, for example the location of an unvectorizable call. Reviewed by: Arnold Schwaighofer llvm-svn: 211721
* [X86] Always prefer to lower a VECTOR_SHUFFLE into a BLENDI instead of SHUFP ↵Andrea Di Biagio2014-06-257-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | (or VPERM2X128). This patch teaches method 'LowerVECTOR_SHUFFLE' to give higher precedence to the check for 'isBlendMask'; the idea is that, when possible, we should firstly check if a shuffle performs a blend, and in case, try to lower it into a BLENDI instead of selecting a SHUFP or (worse) a VPERM2X128. In general: - AVX VBLENDPS/D always have better latency and throughput than VPERM2F128; - BLENDPS/D instructions tend to always have better 'reciprocal throughput' than the equivalent SHUFPS/D; - Both BLENDPS/D and SHUFPS/D are often decoded into the same number of m-ops; however, a m-op obtained from a BLENDPS/D can be scheduled to more than one execution port. This patch: - Moves the check for 'isBlendMask' immediately before the check for 'isSHUFPMask' within method 'LowerVECTOR_SHUFFLE'; - Updates existing tests for sse/avx shuffle/blend instructions to verify that we select (v)blendps/d when possible (instead of (v)shufps/d or vperm2f128). llvm-svn: 211720
* Fix treatment of types defined in function prototypeSerge Pavlov2014-06-254-14/+76
| | | | | | | | | | | | Types defined in function prototype are diagnosed earlier in C++ compilation. They are put into declaration context where the prototype is introduced. Later on, when FunctionDecl object is created, these types are moved into the function context. This patch fixes PR19018 and PR18963. Differential Revision: http://reviews.llvm.org/D4145 llvm-svn: 211718
* Fix indentation.Juergen Ributzka2014-06-251-7/+7
| | | | llvm-svn: 211717
* Headers: be a bit more careful about inline asmSaleem Abdulrasool2014-06-251-0/+12
| | | | | | | | | Conditionally include x86intrin.h if we are building for x86 or x86_64. Conditionalise definition of inline assembly routines which use x86 or x86_64 inline assembly. This is needed as clang can target Windows on ARM where these definitions may be included into user code. llvm-svn: 211716
OpenPOWER on IntegriCloud