summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert accidentally-committed files in r300252.Richard Smith2017-04-132-700/+0
| | | | llvm-svn: 300253
* Remove all allocation and divisions from GreatestCommonDivisorRichard Smith2017-04-135-72/+834
| | | | | | | | | | | Switch from Euclid's algorithm to Stein's algorithm for computing GCD. This avoids the (expensive) APInt division operation in favour of bit operations. Remove all memory allocation from within the GCD loop by tweaking our `lshr` implementation so it can operate in-place. Differential Revision: https://reviews.llvm.org/D31968 llvm-svn: 300252
* [InstCombine] Fix !prof metadata preservation for invokesReid Kleckner2017-04-132-30/+43
| | | | | | | | | | | | | | | | | | | | Summary: Bug noticed by inspection. Extend the test to handle invokes as well as calls, and rewrite it to not depend on the inliner and other passes. Also simplify the call site replacement code with CallSite, similar to what I did to dead arg elimination and arg promotion (rL300235 and rL300229). Reviewers: danielcdh, davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32041 llvm-svn: 300251
* [msan] Fix msan_test.cc by checking bind results before assuming IPv6 supported.Vitaly Buka2017-04-131-4/+13
| | | | llvm-svn: 300250
* Revert "[msan] Fix msan_test broken after r299884."Vitaly Buka2017-04-131-2/+2
| | | | | | | | This does not fix the test, it still fails to bind. This reverts commit r300150. llvm-svn: 300249
* Disable use of tls scanning on darwin leak sanitizerFrancis Ricci2017-04-132-2/+7
| | | | | | | | | | | | | | Summary: These checks appear linux-specific, disable them on darwin, at least for now. Reviewers: kubamracek, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32013 llvm-svn: 300248
* Move Linux-specific lsan tests into a new directoryFrancis Ricci2017-04-1310-0/+9
| | | | | | | | | | | | | | Summary: These tests aren't supported on other platforms, move them to their own directory. Reviewers: kubamracek, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32034 llvm-svn: 300247
* [libc++] Add _LIBCPP_DISABLE_EXTERN_TEMPLATE config optionShoaib Meenai2017-04-132-0/+10
| | | | | | | | | | | | | | | | | | When the libc++ extern template macros were added, the intent was for it to be possible for consumers of the headers to disable extern templates (via `-D_LIBCPP_EXTERN_TEMPLATE(...)=`). Unfortunately, support for specifying function-like macros varies on the command line varies across compilers (e.g. MSVC doesn't support it at all), and cmake doesn't allow it for the same reason. Add a non-function macro for this purpose. The intended use is for libraries which want to use the libc++ headers without taking a dependency on the libc++ library itself. I can name the macro something which reflects its intent rather than its behavior (e.g. `_LIBCPP_HEADER_ONLY`) if desired. Differential Revision: https://reviews.llvm.org/D31725 llvm-svn: 300246
* clang-format-vs licence.txt: drop svn:executableHans Wennborg2017-04-131-0/+0
| | | | | | Not sure how it ended up with that property in the first place. llvm-svn: 300245
* [LCSSA] Assert that we always have a valid loop.Davide Italiano2017-04-131-0/+1
| | | | | | | We could otherwise add BBs not belonging to a loop in `formLCSSA` and later crash when trying to iterate the loop blocks. llvm-svn: 300244
* [LCSSA] Remove spurious whitespaces. NFCI.Davide Italiano2017-04-131-1/+1
| | | | llvm-svn: 300243
* [LCSSA] Use `auto` when the type is obvious. NFCI.Davide Italiano2017-04-131-3/+3
| | | | llvm-svn: 300242
* [DAG] Fold away temporary vector in store candidate merge NFC.Nirav Dave2017-04-131-14/+11
| | | | llvm-svn: 300241
* SamplePGO: convert callsite samples map key from callsite_location to ↵Dehao Chen2017-04-137-86/+176
| | | | | | | | | | | | | | | | callsite_location+callee_name Summary: For iterative SamplePGO, an indirect call can be speculatively promoted to multiple direct calls and get inlined. All these promoted direct calls will share the same callsite location (offset+discriminator). With the current implementation, we cannot distinguish between different promotion candidates and its inlined instance. This patch adds callee_name to the key of the callsite sample map. And added helper functions to get all inlined callee samples for a given callsite location. This helps the profile annotator promote correct targets and inline it before annotation, and ensures all indirect call targets to be annotated correctly. Reviewers: davidxl, dnovillo Reviewed By: davidxl Subscribers: andreadb, llvm-commits Differential Revision: https://reviews.llvm.org/D31950 llvm-svn: 300240
* [ValueTracking] Prevent a call to computeKnownBits if we already know the ↵Craig Topper2017-04-131-7/+8
| | | | | | state of the bit we would calculate. Also reuse a temporary APInt instead of creating a new one. llvm-svn: 300239
* [LV] Fix the vector code generation for first order recurrenceAnna Thomas2017-04-134-36/+74
| | | | | | | | | | | | | | | | | | | Summary: In first order recurrences where phi's are used outside the loop, we should generate an additional vector.extract of the second last element from the vectorized phi update. This is because we require the phi itself (which is the value at the second last iteration of the vector loop) and not the phi's update within the loop. Also fix the code gen when we just unroll, but don't vectorize. Fixes PR32396. Reviewers: mssimpso, mkuper, anemet Subscribers: llvm-commits, mzolotukhin Differential Revision: https://reviews.llvm.org/D31979 llvm-svn: 300238
* Revert "Enable LSan on PowerPC64."Alex Shlyapnikov2017-04-133-6/+4
| | | | | | This reverts commit r300204. Breaks ASAN tests on PPC. llvm-svn: 300237
* [InstCombine] fold X == 0 || X == -1 to one compare (PR32524)Sanjay Patel2017-04-132-5/+8
| | | | | | | | | | | | | | | | This is effectively a retry of: https://reviews.llvm.org/rL299851 but now we have tests and an assert to make sure the bug that was exposed with that attempt will not happen again. I'll fix the code duplication and missing sibling fold next, but I want to make this change as small as possible to reduce risk since I messed it up last time. This should fix: https://bugs.llvm.org/show_bug.cgi?id=32524 llvm-svn: 300236
* [DAE] Simplify call site replacement code with CallSite NFCReid Kleckner2017-04-131-27/+24
| | | | llvm-svn: 300235
* Implement global pointer scanning for darwin leak sanitizerFrancis Ricci2017-04-134-15/+34
| | | | | | | | | | Reviewers: kubamracek, kcc, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32012 llvm-svn: 300234
* [ValueTracking] Move a temporary APInt instead of copying it.Craig Topper2017-04-131-1/+1
| | | | llvm-svn: 300233
* Remove the binders from C++17. Reviewed as https://reviews.llvm.org/D31769Marshall Clow2017-04-1347-24/+748
| | | | llvm-svn: 300232
* Follow-up to r300225: update ClangFormat.csproj tooHans Wennborg2017-04-131-1/+1
| | | | llvm-svn: 300231
* [InstCombine] Simplify attribute code with new AttributeList::get NFCReid Kleckner2017-04-131-31/+20
| | | | llvm-svn: 300230
* [ArgPromotion] Don't drop !prof metadata on promoted callsReid Kleckner2017-04-132-1/+27
| | | | | | | | | | Noticed by inspection while doing attribute work. DAE, InstCombineCalls, and ArgPromotion have a fair amount of duplicated code for hacking on call sites, and you can find bugs by comparing them. Add a test case for this. llvm-svn: 300229
* Add a test for __block variables + asan.Adrian Prantl2017-04-132-7/+28
| | | | llvm-svn: 300228
* [AMDGPU] Combine DS operations with offsets bigger than byteStanislav Mekhanoshin2017-04-132-150/+551
| | | | | | | | | In many cases ds operations can be combined even if offsets do not fit into 8 bit encoding. What it takes is to adjust base address. Differential Revision: https://reviews.llvm.org/D31993 llvm-svn: 300227
* Follow-up to r300225: update ClangFormat.sln to VS2017Hans Wennborg2017-04-131-2/+2
| | | | | | This got lost in the previous patch somehow. llvm-svn: 300226
* Warning-free clang-format plugin install for VS 15.0Hans Wennborg2017-04-133-81/+24
| | | | | | | | | | | | | | | | | | | | With the new release of VS, it's required that all plugins migrate to the new VSIX manifest format. The new format is backwards compatible with all versions newer that Visual Studio 2012, so this migration effectively drops support for older versions of the IDE. It's also required that these new extensions are built with Visual Studio 2017, so unfortunately it was necessary to migrate the project and solution. Also removed COM references to EnvDTE and Microsoft.VisualStudio.TextManager.Interop from the csproj, as they seem to both be unnecessary and would trigger build warnings because of changes to GAC. Patch by Hugo Puhlmann! Differential Revision: https://reviews.llvm.org/D31740 llvm-svn: 300225
* [APSInt] Remove named And/Or/Xor methods.Craig Topper2017-04-131-3/+0
| | | | | | No one uses them and I may improve the operator&, operator|, and operator^ to better reuse memory allocations like APInt. llvm-svn: 300224
* clang-format-vs: Use a separate license.txt copyHans Wennborg2017-04-133-7/+40
| | | | | | | The regular file used to display very poorly in the VSIX installer due to long lines, wrapping etc. llvm-svn: 300223
* [InstCombine] use similar ops for related folds; NFCISanjay Patel2017-04-131-10/+9
| | | | | | | | | | | | | | | It's less efficient to produce 'ule' than 'ult' since we know we're going to canonicalize to 'ult', but we shouldn't have duplicated code for these folds. As a trade-off, this was a pretty terrible way to make a '2'. :) if (LHSC == SubOne(RHSC)) AddC = ConstantExpr::getSub(AddOne(RHSC), LHSC); The next steps are to share the code to fix PR32524 and add the missing 'and' fold that was left out when PR14708 was fixed: https://bugs.llvm.org/show_bug.cgi?id=14708 llvm-svn: 300222
* Don't assume PTHREAD_CREATE_JOINABLE is 0 on all systemsFrancis Ricci2017-04-134-13/+12
| | | | | | | | | | | | | | | | | Summary: Lsan was using PTHREAD_CREATE_JOINABLE/PTHREAD_CREATE_DETACHED as truthy values, which works on Linux, where the values are 0 and 1, but this fails on OS X, where the values are 1 and 2. Set PTHREAD_CREATE_DETACHED to the correct value for a given system. Reviewers: kcc, glider, kubamracek, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31883 llvm-svn: 300221
* KMP_HW_SUBSET extended with NUMA support when HWLOC enabledAndrey Churbanov2017-04-137-380/+834
| | | | | | Differential Revision: https://reviews.llvm.org/D31600 llvm-svn: 300220
* [APInt] Fix the returns description for the postfix increment/decrement ↵Craig Topper2017-04-131-2/+6
| | | | | | operators. NFC llvm-svn: 300219
* Implement LWG#2855 - made easy by previous refactoringMarshall Clow2017-04-133-4/+14
| | | | llvm-svn: 300218
* Revert r300213 "[APSInt] Add a static_assert to ensure APSInt is packed well ↵Craig Topper2017-04-131-3/+1
| | | | | | | | with APInt after r300171" MSVC doesn't pack derived classes the same way clang/gcc do. llvm-svn: 300217
* Cache size per class size in SizeClassAllocatorXLocalCache.Alex Shlyapnikov2017-04-131-4/+8
| | | | | | | | | | | | | | | Summary: Allocator::ClassIdToSize() is not free and calling it in every Allocate/Deallocate has noticeable impact on perf. Reapplying D31991 with the appropriate fixes. Reviewers: cryptoad Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D32024 llvm-svn: 300216
* [Analysis] Support bitreverse in -demanded-bits passBrian Gesiak2017-04-133-0/+66
| | | | | | | | | | | | | | | | | | | | Summary: * Add a bitreverse case in the demanded bits analysis pass. * Add tests for the bitreverse (and bswap) intrinsic in the demanded bits pass. * Add a test case to the BDCE tests: that manipulations to high-order bits are eliminated once the bits are reversed and then right-shifted. Reviewers: mkuper, jmolloy, hfinkel, trentxintong Reviewed By: jmolloy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31857 llvm-svn: 300215
* Use the clang-cl recognized spelling of --target=Reid Kleckner2017-04-131-3/+3
| | | | | | This fixes a warning. The test was passing without this change. llvm-svn: 300214
* [APSInt] Add a static_assert to ensure APSInt is packed well with APInt ↵Craig Topper2017-04-131-1/+3
| | | | | | after r300171. llvm-svn: 300213
* [DeLICM] Introduce unittesting infrastructure for Known and Written. NFC.Michael Kruse2017-04-131-53/+126
| | | | llvm-svn: 300212
* [DeLICM] Export Known and Written to DeLICMTests. NFC.Michael Kruse2017-04-133-20/+38
| | | | | | | This will allow unittesting of new functionality based on Known and Written. llvm-svn: 300211
* [DeLICM] Add Knowledge::Known. NFC.Michael Kruse2017-04-131-2/+29
| | | | | | | This field will later contain a ValInst that is known to be stored in an occupied array element. llvm-svn: 300210
* Re-land "[clang-cl] Make all sanitizer flags available in clang-cl"Reid Kleckner2017-04-132-24/+41
| | | | | | | | | | Adding RUN lines with %clang_cl was causing these tests to fail on Mac because absolute paths there tend to start with "/User/", which is recognized as the "/U" flag. Re-lands r300122 llvm-svn: 300209
* [DeLICM] Make Knowledge::Written an isl::union_map. NFC.Michael Kruse2017-04-131-14/+21
| | | | | | The map will later point to a ValInst that is written. llvm-svn: 300208
* [DeLICM] Rename Knowledge to KnowledgeStr. NFC.Michael Kruse2017-04-131-3/+4
| | | | | | | Some debuggers get confused by different class of the same name defined independently in different translation units. llvm-svn: 300207
* [libc++] Explicitly set output directory for DLLShoaib Meenai2017-04-131-0/+1
| | | | | | | DLLs on Windows are treated as runtime targets. Explicitly set the output directory for them, to be consistent with other platforms. llvm-svn: 300206
* LTO: Pass SF_Executable flag through to InputFile::SymbolTobias Edler von Koch2017-04-135-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The linker needs to be able to determine whether a symbol is text or data to handle the case of a common being overridden by a strong definition in an archive. If the archive contains a text member of the same name as the common, that function is discarded. However, if the archive contains a data member of the same name, that strong definition overrides the common. This is a behavior of ld.bfd, which the Qualcomm linker also supports in LTO. Here's a test case to illustrate: #### cat > 1.c << \! int blah; ! cat > 2.c << \! int blah() { return 0; } ! cat > 3.c << \! int blah = 20; ! clang -c 1.c clang -c 2.c clang -c 3.c ar cr lib.a 2.o 3.o ld 1.o lib.a -t #### The correct output is: 1.o (lib.a)3.o Thanks to Shankar Easwaran and Hemant Kulkarni for the test case! Reviewers: mehdi_amini, rafael, pcc, davide Reviewed By: pcc Subscribers: davide, llvm-commits, inglorion Differential Revision: https://reviews.llvm.org/D31901 llvm-svn: 300205
* Enable LSan on PowerPC64.Alex Shlyapnikov2017-04-133-4/+6
| | | | | | | | | | | | | | Summary: With D31555 commited, looks like basic LSan functionality works on PPC64. Time to enable LSan there. Reviewers: eugenis Subscribers: nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D31995 llvm-svn: 300204
OpenPOWER on IntegriCloud