summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [WebAssembly] Use StringSaver to retain ownership of ctor function body. NFCNicholas Wilson2018-03-072-6/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D44149 llvm-svn: 326885
* [LoadStoreVectorizer] Differentiate between <1 x T> and TSven van Haastregt2018-03-072-0/+15
| | | | | | | | | | | The LoadStoreVectorizer thought that <1 x T> and T were the same types when merging stores, leading to a crash later. Patch by Erik Hogeman. Differential Revision: https://reviews.llvm.org/D44014 llvm-svn: 326884
* Don't intercept mmap64() on NetBSDKamil Rytarowski2018-03-071-1/+1
| | | | | | | | | Disable SANITIZER_INTERCEPT_MMAP64 for SI_NETBSD. NetBSD switched to 64-bit offsets almost 30 years ago on 32-bit platforms and never needed mmap64() concept. llvm-svn: 326883
* [ARM] Fix for PR36577Sjoerd Meijer2018-03-072-8/+45
| | | | | | | | | | | | | Don't PerformSHLSimplify if the given node is used by a node that also uses a constant because we may get stuck in an infinite combine loop. bugzilla: https://bugs.llvm.org/show_bug.cgi?id=36577 Patch by Sam Parker. Differential Revision: https://reviews.llvm.org/D44097 llvm-svn: 326882
* [SystemZ] NFC refactoring in SystemZHazardRecognizer.Jonas Paulsson2018-03-071-5/+2
| | | | | | | Use Reset() after emitting a call. Review: Ulrich Weigand llvm-svn: 326881
* [SystemZ] Improve getCurrCycleIdx() in SystemZHazardRecognizer.Jonas Paulsson2018-03-072-9/+20
| | | | | | | | | | | getCurrCycleIdx() returns the decoder cycle index which the next candidate SU will be placed on. This patch improves this method by passing the candidate SU to it so that if SU will begin a new group, the index of that group is returned instead. Review: Ulrich Weigand llvm-svn: 326880
* [SystemZ] NFC refactoring in SystemZHazardRecognizer.Jonas Paulsson2018-03-071-4/+8
| | | | | | | | Handle the not-taken branch in emitInstruction() where the TakenBranch argument is available. This is cleaner than relying on EmitInstruction(). Review: Ulrich Weigand llvm-svn: 326879
* [SystemZ] Improved debug dumping during post-RA scheduling.Jonas Paulsson2018-03-074-70/+102
| | | | | Review: Ulrich Weigand llvm-svn: 326878
* [X86] Add IMUL scheduling info on sandybridge, fix it on >=haswell.Clement Courbet2018-03-075-29/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Only IMUL16rri uses an extra P0156. IMUL32* and IMUL16rr only use P1. This was computed using https://github.com/google/EXEgesis/blob/master/exegesis/tools/compute_itineraries.cc This can easily be validated by running perf on the following code: ``` int main(int argc, char**argv) { int a = argc; int b = argc; int c = argc; int d = argc; for (int i = 0; i < LOOP_ITERATIONS; ++i) { asm volatile( R"( .rept 10000 imull $0x2, %%edx, %%eax imull $0x2, %%ecx, %%ebx imull $0x2, %%eax, %%edx imull $0x2, %%ebx, %%ecx .endr )" : "+a"(a), "+b"(b), "+c"(c), "+d"(d) : :); } return a+b+c+d; } ``` -> test.cc perf stat -x, -e cycles --pfm-events=uops_executed_port:port_0:u,uops_executed_port:port_1:u,uops_executed_port:port_2:u,uops_executed_port:port_3:u,uops_executed_port:port_4:u,uops_executed_port:port_5:u,uops_executed_port:port_6:u,uops_executed_port:port_7:u test Reviewers: craig.topper, RKSimon, gadi.haber Subscribers: llvm-commits, gchatelet, chandlerc Differential Revision: https://reviews.llvm.org/D43460 llvm-svn: 326877
* Attempt to appease buildbotsGeorge Burgess IV2018-03-071-1/+1
| | | | | | | | | | | I can't reproduce this build error locally, but it appears straightforward enough to fix. r326851 renamed two of the params of this interceptor, but apparently to update their use here. Failure: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/4569 llvm-svn: 326876
* [SymbolFilePDB] Add missing Char16 and Char32 types in a few placesAaron Smith2018-03-073-0/+18
| | | | | | | | | | Reviewers: zturner, rnk, lldb-commits Subscribers: clayborg, llvm-commits Differential Revision: https://reviews.llvm.org/D44166 llvm-svn: 326875
* Disable tests from r326852 on DarwinAdam Nemet2018-03-072-0/+2
| | | | | | | | | | Darwin needs xlocale.h but I see no precedence in the code how non-Posix headers like this are handled and I am not experienced with this code. Just disable the tests for now to recover the bots. rdar://38208146 llvm-svn: 326874
* Remove a placeholderGeorge Burgess IV2018-03-071-1/+1
| | | | | | | ...Running tests in the wrong directory will often make them seem to pass. Oops. :) llvm-svn: 326873
* Reland r326766 (with a slightly modified test)George Burgess IV2018-03-072-1/+21
| | | | | | | | | The original revert was done in r326869, since reverting r326602 broke the test added by this. The new test should be less dependent on r326602. llvm-svn: 326872
* [demangler] Fix a mistake in r326797.Erik Pilkington2018-03-072-2/+4
| | | | | | Thanks to Nico Weber for pointing this out! llvm-svn: 326871
* [SymbolFilePDB] Minor cleanupAaron Smith2018-03-071-22/+23
| | | | | | | | | | | | | | | | | | | Summary: - Remove unused code - Adding `break` statement conditionally - Ignore empty strings in FindTypeByName Reviewers: zturner, rnk, lldb-commits Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44165 llvm-svn: 326870
* Revert 326766 too, after r326862 the test fails and I don't know how to fix.Nico Weber2018-03-072-17/+1
| | | | llvm-svn: 326869
* [analyzer] Fix the checker for the performance anti-pattern to accept messagesGeorge Karpenkov2018-03-072-11/+45
| | | | | | | | send to ObjC objects. Differential Revision: https://reviews.llvm.org/D44170 llvm-svn: 326868
* [Driver] Enable SafeStack by default on FuchsiaPetr Hosek2018-03-073-5/+16
| | | | | | | | This is already used throughout the entire system, so make it a default. Differential Revision: https://reviews.llvm.org/D44065 llvm-svn: 326867
* [XRay][compiler-rt] Add APIs for processing logs in memoryDean Michael Berris2018-03-073-5/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change adds APIs to allow logging implementations to provide a function for iterating through in-memory buffers (if they hold in-memory buffers) and a way for users to generically deal with these buffers in-process. These APIs are: - __xray_log_set_buffer_iterator(...) and __xray_log_remove_buffer_iterator(): installs and removes an iterator function that takes an XRayBuffer and yields the next one. - __xray_log_process_buffers(...): takes a function pointer that can take a mode identifier (string) and an XRayBuffer to process this data as they see fit. The intent is to have the FDR mode implementation's buffers be available through this `__xray_log_process_buffers(...)` API, so that they can be streamed from memory instead of flushed to disk (useful for getting the data to a network, or doing in-process analysis). Basic mode logging will not support this mechanism as it's designed to write the data mostly to disk. Future implementations will may depend on this API as well, to allow for programmatically working through the XRay buffers exposed to the users in some fashion. Reviewers: eizan, kpw, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43495 llvm-svn: 326866
* [ASTMatcher] Extend hasAnyArgument to ObjCMessageExprGeorge Karpenkov2018-03-073-7/+54
| | | | | | | | | | | | | | | Currently hasArgument works with both ObjC messages and function calls, but not hasAnyArgument. This patch fixes that discrepancy, as it's often more convenient to use hasAnyArgument. On a more general note, it would be great to have a common superclass for objc-call and function call, and a matcher matching that, but that's probably a job for another commit. Differential Revision: https://reviews.llvm.org/D44169 llvm-svn: 326865
* Fixup r326851: mmap64 interceptor should not be used on Darwin.Kuba Mracek2018-03-071-1/+1
| | | | llvm-svn: 326864
* [llvm-pdbdump] Add guard for null pointers and remove unused codeAaron Smith2018-03-074-95/+108
| | | | | | | | | | | | | | Summary: This avoids crashing when a user tries to dump a pdb with the `-native` option. Reviewers: zturner, llvm-commits, rnk Reviewed By: zturner Subscribers: mgrang Differential Revision: https://reviews.llvm.org/D44117 llvm-svn: 326863
* Revert r326602, it caused PR36620.Nico Weber2018-03-0716-503/+150
| | | | llvm-svn: 326862
* Add early exit on reassociation of 0 expression.Evgeny Stupachenko2018-03-072-0/+22
| | | | | | | | | | | | | | Summary: Before the patch a try to reassociate ((v * 16) * 0) * 1 fall into infinite loop Reviewers: pankajchawla Differential Revision: http://reviews.llvm.org/D41467 From: Evgeny Stupachenko <evstupac@gmail.com> <evgeny.v.stupachenko@intel.com> llvm-svn: 326861
* [Driver] Automatically disable incompatible default sanitizersPetr Hosek2018-03-071-13/+23
| | | | | | | | | | When a sanitizer incompatible with one of the default sanitizers is explicitly enabled, automatically disable all the conflicting default sanitizers. Differential Revision: https://reviews.llvm.org/D44064 llvm-svn: 326860
* [SymbolFilePDB] Add support for CVR pointer type qualifierAaron Smith2018-03-073-20/+129
| | | | | | | | | | | | | | | | | Summary: - Complete element type of PDBSymbolTypeArray. - Add a test to check types of multi-dimensional array and pointers with CVR. Reviewers: zturner, rnk, lldb-commits Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44167 llvm-svn: 326859
* [SymbolFilePDB] Get line number for PDBSymbolTypeEnumAaron Smith2018-03-072-14/+18
| | | | | | | | | | | | Reviewers: zturner, lldb-commits, rnk Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44164 llvm-svn: 326858
* [DebugInfoPDB] Add DIA implementation for getSrcLineOnTypeDefnAaron Smith2018-03-076-0/+25
| | | | | | | | | | | | | | Summary: This helps to determine the line number for a PDB type with definition Reviewers: zturner, llvm-commits, rnk Reviewed By: zturner Subscribers: rengolin, JDevlieghere Differential Revision: https://reviews.llvm.org/D44119 llvm-svn: 326857
* [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2018-03-074-294/+296
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 326856
* [sanitizer] Update symbolizer testVitaly Buka2018-03-071-0/+1
| | | | llvm-svn: 326855
* [sanitizer] Extract common code into STRXFRM_INTERCEPTOR_IMPLVitaly Buka2018-03-071-48/+22
| | | | llvm-svn: 326854
* [sanitizer] Move strxfrm interceptors into sanitizer_commonVitaly Buka2018-03-074-38/+92
| | | | llvm-svn: 326853
* [sanitizer] Add interceptors for wcsxfrm, wcsxfrm_lVitaly Buka2018-03-074-0/+86
| | | | | | | | | | | | | | Patch by Oliver Chang Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44133 llvm-svn: 326852
* [sanitizer] Move mmap interceptors into sanitizer_commonVitaly Buka2018-03-078-137/+108
| | | | | | | | | | Reviewers: devnexen, krytarowski, eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D44125 llvm-svn: 326851
* Split long lines in a test file.Rui Ueyama2018-03-071-30/+32
| | | | llvm-svn: 326850
* the thread id is easier to read in base16.Jason Molenda2018-03-061-1/+1
| | | | llvm-svn: 326849
* Add test for lldb-mi interpreterAdrian Prantl2018-03-062-0/+39
| | | | | | | | | | Test that "lldb-mi --interpreter" can interpret "target list" CLI command. Patch by Alex Polyakov! Differential Revision: https://reviews.llvm.org/D44040 llvm-svn: 326847
* Fix a typo from r326844; NFCGeorge Burgess IV2018-03-061-1/+1
| | | | llvm-svn: 326845
* [CodeGen] Don't emit lifetime.end without lifetime.startGeorge Burgess IV2018-03-062-3/+10
| | | | | | | | EmitLifetimeStart returns a non-null `size` pointer if it actually emits a lifetime.start. Later in this function, we use `tempSize`'s nullness to determine whether or not we should emit a lifetime.end. llvm-svn: 326844
* [Transforms] Add missing header for InstructionCombining.cpp, in order to ↵Eugene Zelenko2018-03-061-0/+1
| | | | | | | | | | export LLVMInitializeInstCombine as extern "C". Fixes PR35947. Patch by Brenton Bostick. Differential revision: https://reviews.llvm.org/D44140 llvm-svn: 326843
* [XRay][compiler-rt] Make unit tests depend on implementation filesDean Michael Berris2018-03-061-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change makes changes to XRay implementation files trigger re-builds of the unit tests. Prior to this change, the unit tests were not built and run properly if the implementation files were changed during the development process. This change forces the dependency on all files in the XRay include and lib hosted files in compiler-rt. Caveat is, that new files added to the director(ies) will need a re-run of CMake to re-generate the fileset. We think this is an OK compromise, since adding new files may necessitate editing (or adding) new unit tests. It's also less likely that we're adding new files without updating the CMake configuration to include the functionality in the XRay runtime implementation anyway. Reviewers: pelikan, kpw, nglevin Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D44080 llvm-svn: 326842
* Do not create temporary strings just to print out spaces. NFC.Rui Ueyama2018-03-062-8/+10
| | | | llvm-svn: 326841
* [X86] Fix a typo in Host.cpp that causes us to misidentify KNL, Silvermont, ↵Craig Topper2018-03-061-1/+1
| | | | | | | | | | Goldmont and probably other CPUs for -march=native I think most of the Intel Core CPUs and recent AMD CPUs are unaffected. All the CPUs that have a "subtype" should work. The ones that were broken are the ones that are a "type" with no subtypes. Fixes PR36619. llvm-svn: 326840
* Reapply "[DWARFv5] Emit file 0 to the line table."Paul Robinson2018-03-0620-128/+249
| | | | | | | | Fixes the bug found by asan. Also XFAIL the new test for Darwin, which is stuck on DWARF v2, and fix up other tests so they stop failing on Windows. llvm-svn: 326839
* [TargetLowering] Add vector BITCAST support to SimplifyDemandedVectorEltsSimon Pilgrim2018-03-0610-648/+805
| | | | | | | | Notably helps cleanup after legalization of vector types Differential Revision: https://reviews.llvm.org/D43674 llvm-svn: 326838
* DA: remove uses of GEP, only ask SCEVSebastian Pop2018-03-0630-1105/+515
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's been quite some time the Dependence Analysis (DA) is broken, as it uses the GEP representation to "identify" multi-dimensional arrays. It even wrongly detects multi-dimensional arrays in single nested loops: from test/Analysis/DependenceAnalysis/Coupled.ll, example @couple6 ;; for (long int i = 0; i < 50; i++) { ;; A[i][3*i - 6] = i; ;; *B++ = A[i][i]; DA used to detect two subscripts, which makes no sense in the LLVM IR or in C/C++ semantics, as there are no guarantees as in Fortran of subscripts not overlapping into a next array dimension: maximum nesting levels = 1 SrcPtrSCEV = %A DstPtrSCEV = %A using GEPs subscript 0 src = {0,+,1}<nuw><nsw><%for.body> dst = {0,+,1}<nuw><nsw><%for.body> class = 1 loops = {1} subscript 1 src = {-6,+,3}<nsw><%for.body> dst = {0,+,1}<nuw><nsw><%for.body> class = 1 loops = {1} Separable = {} Coupled = {1} With the current patch, DA will correctly work on only one dimension: maximum nesting levels = 1 SrcSCEV = {(-2424 + %A)<nsw>,+,1212}<%for.body> DstSCEV = {%A,+,404}<%for.body> subscript 0 src = {(-2424 + %A)<nsw>,+,1212}<%for.body> dst = {%A,+,404}<%for.body> class = 1 loops = {1} Separable = {0} Coupled = {} This change removes all uses of GEP from DA, and we now only rely on the SCEV representation. The patch does not turn on -da-delinearize by default, and so the DA analysis will be more conservative in the case of multi-dimensional memory accesses in nested loops. I disabled some interchange tests, as the DA is not able to disambiguate the dependence anymore. To make DA stronger, we may need to compute a bound on the number of iterations based on the access functions and array dimensions. The patch cleans up all the CHECKs in test/Transforms/LoopInterchange/*.ll to avoid checking for snippets of LLVM IR: this form of checking is very hard to maintain. Instead, we now check for output of the pass that are more meaningful than dozens of lines of LLVM IR. Some tests now require -debug messages and thus only enabled with asserts. Patch written by Sebastian Pop and Aditya Kumar. Differential Revision: https://reviews.llvm.org/D35430 llvm-svn: 326837
* [FrontEnd] Allow overriding the default C/C++ -std via CMake varsMichal Gorny2018-03-063-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide two new CMake cache variables -- CLANG_DEFAULT_STD_C and CLANG_DEFAULT_STD_CXX -- that can be used to override the default C/ObjC and C++/ObjC++ standards appropriately. They can be set to one of the identifiers from LangStandards.def, or left unset (the default) to respect the current platform default. This option is mostly intended for compiler vendors that may wish to adjust the defaults their compilers are using. For example, Gentoo planned to use it to set clang and gcc to matching standards, so that we could maintain as much compatibility between different compilers as possible. The code relies on explicit identifiers rather than the string aliases for simplicity. This saves us from the necessity of parsing aliases at build-time or adding additional processing at runtime. For the latter case, it also adds trivial value check -- if incorrect value is passed, the code simply fails to compile through referencing an undefined constant. If the variable is used to redefine the default standard, the explicit value overrides the special case for PS4. It is done this way mostly following other kinds of variables where 'platform defaults' are redefined. Differential Revision: https://reviews.llvm.org/D34365 llvm-svn: 326836
* Implement --just-symbols.Rui Ueyama2018-03-066-0/+78
| | | | | | Differential Revision: https://reviews.llvm.org/D39348 llvm-svn: 326835
* PrintStatistics() and PrintStatisticsJSON() should take StatLockDaniel Sanders2018-03-061-0/+2
| | | | | | | | | | | | | | | | | | These two functions iterate over the list of statistics but don't take the lock that protects the iterators from being invalidated by StatisticInfo::addStatistic(). So far, this hasn't been an issue since (in-tree at least) these functions are called by the StatisticInfo destructor so addStatistic() shouldn't be called anymore. However, we do expose them in the public API. Note that this only protects against iterator invalidation and does not protect against ordering issues caused by statistic updates that race with PrintStatistics()/PrintStatisticsJSON(). Thanks to Roman Tereshin for spotting it llvm-svn: 326834
OpenPOWER on IntegriCloud