summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [lit] Fail testing if a googletest executable crashes during test discoveryGreg Parker2016-09-022-2/+6
| | | | | | | | | googletest formatted tests are discovered by running the test executable. Previously testing would silently succeed if the test executable crashed during the discovery process. Now testing fails with "error: unable to discover google-tests ..." if the test executable exits with a non-zero status. llvm-svn: 280455
* [PowerPC] Add a pattern for a runtime bit checkHal Finkel2016-09-022-0/+94
| | | | | | | | | | | | | | | | | | | Following a suggestion by Sanjay, we should lower: %shl = shl i32 1, %y %and = and i32 %x, %shl %cmp = icmp eq i32 %and, %shl ret i1 %cmp into: subfic r4, r4, 32 rlwnm r3, r3, r4, 31, 31 Add this pattern and some associated patterns for the 64-bit case and the not-equal case. Fixes PR27356. llvm-svn: 280454
* revert r280429 and r280425:Dehao Chen2016-09-022-31/+25
| | | | | | | | | | | | | | | r280425 | dehao | 2016-09-01 16:15:50 -0700 (Thu, 01 Sep 2016) | 9 lines Refactor LICM pass in preparation for LoopSink pass. Summary: LoopSink pass uses some common function in LICM. This patch refactor the LICM code to make it usable by LoopSink pass (https://reviews.llvm.org/D22778). r280429 | dehao | 2016-09-01 16:31:25 -0700 (Thu, 01 Sep 2016) | 9 lines Refactor LICM to expose canSinkOrHoistInst to LoopSink pass. Summary: LoopSink pass shares the same canSinkOrHoistInst functionality with LICM pass. This patch exposes this function in preparation of https://reviews.llvm.org/D22778 llvm-svn: 280453
* revert r280432:Dehao Chen2016-09-021-6/+5
| | | | | | | | | r280432 | dehao | 2016-09-01 16:51:37 -0700 (Thu, 01 Sep 2016) | 9 lines Explicitly require DominatorTreeAnalysis pass for instsimplify pass. Summary: DominatorTreeAnalysis is always required by instsimplify. llvm-svn: 280452
* llvm/test/Transforms/GCOVProfiling/three-element-mdnode.ll: Use %/T instead ↵NAKAMURA Takumi2016-09-021-1/+1
| | | | | | of %T, not to emit backslashes. llvm-svn: 280451
* bugpoint: clang-format all of bugpoint. NFCJustin Bogner2016-09-0211-1157/+1088
| | | | | | | I'm going to clean up the APIs here a bit and touch many many lines anyway. llvm-svn: 280450
* raw_pwrite_stream_test.cpp: _putenv_s() may be assumed as win32-generic.NAKAMURA Takumi2016-09-021-1/+1
| | | | llvm-svn: 280449
* IfConversion: Don't count branches in # of duplicates.Kyle Butt2016-09-021-1/+3
| | | | | | | | If the entire blocks match, we would count the branch instructions toward the number of duplicated instructions. This doesn't match what we do elsewhere, and was causing a bug. llvm-svn: 280448
* [PM] Add a unittest for invalidating module analyses with an SCC pass.Chandler Carruth2016-09-021-0/+96
| | | | | | | | | | | | This wasn't really well explicitly tested with a nice unittest before. It seems good to have reasonably broken out unittests for this kind of functionality as I'm workin go other invalidation features to make sure none of the existing ones regress. This still has too much duplicated code, I plan to factor that out in a subsequent commit to use common helpers for repeated parts of this. llvm-svn: 280447
* [PM] (NFC) Split the IR parsing into a fixture so that I can split outChandler Carruth2016-09-021-33/+42
| | | | | | more testing into other test routines while using the same core module. llvm-svn: 280446
* Fix a real temp file leak in FileOutputBufferReid Kleckner2016-09-024-9/+19
| | | | | | | | | | | | | If we failed to commit the buffer but did not die to a signal, the temp file would remain on disk on Windows. Having an open file mapping and file handle prevents the file from being deleted. I am choosing not to add an assertion of success on the temp file removal, since virus scanners and other environmental things can often cause removal to fail in real world tools. Also fix more temp file leaks in unit tests. llvm-svn: 280445
* [PM] (NFC) Refactor the CGSCC pass manager tests to use lambda-basedChandler Carruth2016-09-021-79/+43
| | | | | | | | | | | | | passes. This simplifies the test some and makes it more focused and clear what is being tested. It will also make it much easier to extend with further testing of different pass behaviors. I've also replaced a pointless module pass with running the requires pass directly as that is all that it was really doing. llvm-svn: 280444
* Try to fix some temp file leaks in SupportTests, PR18335Reid Kleckner2016-09-024-14/+62
| | | | llvm-svn: 280443
* [CFGPrinter] Display branch weight on the edgesAdam Nemet2016-09-021-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is pretty useful especially in connection with BFI's -view-block-freq-propagation-dags. It helped me to track down the bug that is being fixed in D24118. While -view-block-freq-propagation-dags displays the high-level information with static heuristics included (and block frequencies), the new thing only shows the raw weight as presented by PGO without any of the static estimates. This helps to distinguished what has been measured vs. estimated. For the sample loop in D24118, -view-block-freq-propagation-dags=integer looks like this: https://reviews.llvm.org/F2381352 While with -view-cfg-only you can see the underlying branch weights: https://reviews.llvm.org/F2392296 Reviewers: dexonsmith, bogner, davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24144 llvm-svn: 280442
* [PowerPC] Don't apply the PPC64 address-formation peephole for offsets ↵Hal Finkel2016-09-022-5/+12
| | | | | | | | | | | | | | | | greater than 7 When applying our address-formation PPC64 peephole, we are reusing the @ha TOC addis value with the low parts associated with different offsets (i.e. different effective symbol addends). We were assuming this was okay so long as the offsets were less than the alignment of the global variable being accessed. This ignored the fact, however, that the TOC base pointer itself need only be 8-byte aligned. As a result, what we were doing is legal only for offsets less than 8 regardless of the alignment of the object being accessed. Fixes PR28727. llvm-svn: 280441
* [PowerPC] Don't consider fusion in PPC64 address-formation peepholeHal Finkel2016-09-022-169/+80
| | | | | | | | | | | | | The logic in this function assumes that the P8 supports fusion of addis/addi, but it does not. As a result, there is no advantage to restricting our peephole application, merging addi instructions into dependent memory accesses, even when the addi has multiple users, regardless of whether or not we're optimizing for size. We might need something like this again for the P9; I suspect we'll revisit this code when we work on P9 tuning. llvm-svn: 280440
* [StreamExecutor] Pass device memory by refJason Henline2016-09-023-31/+34
| | | | | | | | | | | | | | | | Summary: Step 3 of getting GlobalDeviceMemory to own its handle. Since GlobalDeviceMemory will no longer by copy-constructible, we must pass instances by reference rather than by value. Reviewers: jlebar Subscribers: jprice, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24172 llvm-svn: 280439
* Revert https://reviews.llvm.org/D23279 because the tests have failed on ↵Alexander Shaposhnikov2016-09-0213-541/+0
| | | | | | several platforms llvm-svn: 280438
* [SE] Make Kernel movableJason Henline2016-09-023-72/+12
| | | | | | | | | | | | | | | Summary: Kernel is basically just a smart pointer to the underlying implementation, so making it movable prevents having to store a std::unique_ptr to it. Reviewers: jlebar Subscribers: jprice, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24150 llvm-svn: 280437
* Clean up handling of reading module files from stdin. Don't bother trying toRichard Smith2016-09-021-3/+6
| | | | | | | | | look for a corresponding file, since we're not going to read it anyway. No observable behavior change (though we now avoid pointlessly trying to stat or open a file named "-"). llvm-svn: 280436
* Refactor to avoid holding a reference to a container element that could go awayRichard Smith2016-09-021-40/+36
| | | | | | | | during this function, and to avoid rolling back changes to the module manager's data structures. Instead, we defer registering the module file until after we have successfully finished loading it. llvm-svn: 280434
* Explicitly require DominatorTreeAnalysis pass for instsimplify pass.Dehao Chen2016-09-011-5/+6
| | | | | | | | | | | | Summary: DominatorTreeAnalysis is always required by instsimplify. Reviewers: davidxl, danielcdh Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24173 llvm-svn: 280432
* Add clang-reorder-fields to clang-tools-extraAlexander Shaposhnikov2016-09-0113-0/+541
| | | | | | | | | | This diff adds v0 of clang-reorder-fields tool to clang/tools/extra. The main idea behind this tool is to simplify and make less error-prone refactoring of large codebases when someone needs to change the order fields of a struct/class (for example to remove excess padding). Differential revision: https://reviews.llvm.org/D23279 llvm-svn: 280431
* [SelectionDAGBuilder] Add const to relevant placesAditya Kumar2016-09-012-16/+17
| | | | | | | | Reviewers: hans, evandro, sebpop Differential Revision: https://reviews.llvm.org/D24112 llvm-svn: 280430
* Refactor LICM to expose canSinkOrHoistInst to LoopSink pass.Dehao Chen2016-09-012-8/+12
| | | | | | | | | | | | Summary: LoopSink pass shares the same canSinkOrHoistInst functionality with LICM pass. This patch exposes this function in preparation of https://reviews.llvm.org/D22778 Reviewers: chandlerc, davidxl, danielcdh Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24171 llvm-svn: 280429
* [StreamExecutor] Read dev array directly in testJason Henline2016-09-013-63/+97
| | | | | | | | | | | | | | | | | | Summary: Step 2 of getting GlobalDeviceMemory to own its handle. Use the SimpleHostPlatformDevice allocate methods to create device arrays for tests, and check for successful copies by dereferncing the device array handle directly because we know it is really a host pointer. Reviewers: jlebar Subscribers: jprice, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24148 llvm-svn: 280428
* Refactor replaceDominatedUsesWith to have a flag to control whether to ↵Dehao Chen2016-09-013-6/+10
| | | | | | | | | | | | | | replace uses in BB itself. Summary: This is in preparation for LoopSink pass which calls replaceDominatedUsesWith to update after sinking. Reviewers: chandlerc, davidxl, danielcdh Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24170 llvm-svn: 280427
* Remove excessive padding from MismatchingNewDeleteDetectorAlexander Shaposhnikov2016-09-011-2/+2
| | | | | | | | | | | The class MismatchingNewDeleteDetector is in lib/Sema/SemaExprCXX.cpp inside the anonymous namespace. This diff reorders the fields and removes the excessive padding. Test plan: make -j8 check-clang Differential revision: https://reviews.llvm.org/D23898 llvm-svn: 280426
* Refactor LICM pass in preparation for LoopSink pass.Dehao Chen2016-09-011-21/+23
| | | | | | | | | | | | Summary: LoopSink pass uses some common function in LICM. This patch refactor the LICM code to make it usable by LoopSink pass (https://reviews.llvm.org/D22778). Reviewers: chandlerc, davidxl, danielcdh Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24168 llvm-svn: 280425
* [Legalizer] Don't throw away false low half when expanding GT/LT SETCCMichael Kuperstein2016-09-012-9/+41
| | | | | | | | | | | When expanding a SETCC for which the low half is known to evaluate to false, we can only throw it away for LT/GT comparisons, not LE/GE. This fixes PR29170. Differential Revision: https://reviews.llvm.org/D24151 llvm-svn: 280424
* Add comments.Rui Ueyama2016-09-011-2/+4
| | | | llvm-svn: 280423
* Un-XFAIL cfi/stats.cpp, it passes since fixing llvm-symbolizer to look for ↵Reid Kleckner2016-09-011-4/+0
| | | | | | dwarf again llvm-svn: 280422
* [ELF] Do not omit debug sections when computing build-idPetr Hosek2016-09-013-34/+19
| | | | | | | | | | The primary use of build-id is in debugging, hence omitting debug sections when computing it significantly reduces its usability as changes in debug section content wouldn't alter the build-id. Differential Revision: https://reviews.llvm.org/D24120 llvm-svn: 280421
* [WebAssembly] Change wasm SizeType to match asmjsDerek Schuff2016-09-012-20/+26
| | | | | | | | | | | | | | | | Summary: We want wasm and asmjs to have matching ABIs, and right now asmjs uses unsigned int for its size_t. This causes exported symbols in libcxx to not match and can cause weird breakage where libcxx doesn't get linked as a result. Long-term we probably want wasm32, wasm64, and asmjs to all use unsigned long, but that would cause unnecessary ABI churn for asmjs so defer that until we can make all the ABI changes at once. Patch by Jacob Gravelle Differential Revision: https://reviews.llvm.org/D24134 llvm-svn: 280420
* Make the coding standards a bit more clear that we prefer the fancy newChandler Carruth2016-09-011-4/+5
| | | | | | | | | | | auto-brief format for doxygen comments. Most notable is switching to that in the example doxygen comment. I've also tweaked the wording but am happy to tweak it further if others have suggestions here. Mostly doing this to capture something I and others have been writing consistently and repeatedly in code reviews. llvm-svn: 280419
* [SelectionDAG] Generate vector_shuffle nodes for undersized result vector sizesMichael Kuperstein2016-09-013-177/+269
| | | | | | | | | | | | | | | | | | | | | | | | | Prior to this, we could generate a vector_shuffle from an IR shuffle when the size of the result was exactly the sum of the sizes of the input vectors. If the output vector was narrower - e.g. a <12 x i8> being formed by a shuffle with two <8 x i8> inputs - we would lower the shuffle to a sequence of extracts and inserts. Instead, we can form a larger vector_shuffle, and then extract a subvector of the right size - e.g. shuffle the two <8 x i8> inputs into a <16 x i8> and then extract a <12 x i8>. This also includes a target-specific X86 combine that in the presence of AVX2 combines: (vector_shuffle <mask> (concat_vectors t1, undef) (concat_vectors t2, undef)) into: (vector_shuffle <mask> (concat_vectors t1, t2), undef) in cases where this allows us to form VPERMD/VPERMQ. (This is not a separate commit, as that pattern does not appear without the DAGBuilder change.) llvm-svn: 280418
* cstdio: limit gets to CRT versions below 14Saleem Abdulrasool2016-09-011-1/+5
| | | | | | | | | | | | Microsoft removed gets from the CRT in Visual Studio 2015 onwards [1]. Attempting to reference it when targeting CRT versions 14 and above will cause compile errors. [1] https://msdn.microsoft.com/en-us/library/2029ea5f.aspx Patch by Shoaib Meenai! llvm-svn: 280417
* [CMake] Add option (defaulted off) to exclude atomic.cChris Bieneman2016-09-011-1/+5
| | | | | | The atomic builtin source is problematic when cross-compiling builtins because it requires a variable and sometimes large set of system headers. This option allows users to optionally prevent it from being built. llvm-svn: 280416
* [WebAssembly] Add asm.js-style setjmp/longjmp handling for wasm (reland r280302)Heejin Ahn2016-09-016-186/+1079
| | | | | | | | | | | | Summary: This patch adds asm.js-style setjmp/longjmp handling support for WebAssembly. It also uses JavaScript's try and catch mechanism. Reviewers: jpp, dschuff Subscribers: jfb, dschuff Differential Revision: https://reviews.llvm.org/D24121 llvm-svn: 280415
* bugpoint: clang-format and modernize comments in ListReducer. NFCJustin Bogner2016-09-011-36/+32
| | | | llvm-svn: 280414
* build: don't add -fPIC on WindowsSaleem Abdulrasool2016-09-011-1/+3
| | | | | | | | | `-fPIC` doesn't make much sense for Windows, since Windows DLLs aren't compiled position independent and are instead relocated at runtime. Patch by Shoaib Meenai! llvm-svn: 280413
* GlobalISel: add a G_PHI instruction to give phis a type.Tim Northover2016-09-017-4/+25
| | | | | | | They're another source of generic vregs, which are going to need a type on the definition when we remove the register width from MachineRegisterInfo. llvm-svn: 280412
* [tsan] Bump stack frame size limit.Evgeniy Stepanov2016-09-011-1/+1
| | | | llvm-svn: 280411
* Fix the ASan fuse-lld.cc test after LLD r280012Reid Kleckner2016-09-011-1/+1
| | | | | | | | | | | With that change, images built with 'lld-link /debug' always have a debug directory. If no PDB filename was passed on the command line, then the filename in the executable is empty. PDB information would never work anyway if the PDB file name is empty, so go ahead and try DWARF in that case. llvm-svn: 280410
* When we reach the end of a #include of a header of a local submodule that weRichard Smith2016-09-014-7/+45
| | | | | | | | | | textually included, create an ImportDecl just as we would if we reached a #include of any other modular header. This is necessary in order to correctly determine the set of variables to initialize for an imported module. This should hopefully make the modules selfhost buildbot green again. llvm-svn: 280409
* Allow mapping scalar MemoryAccesses to array elements.Michael Kruse2016-09-018-45/+584
| | | | | | | | | | | | | | | | | | | | | | Change the code around setNewAccessRelation to allow to use a an existing array element for memory instead of an ad-hoc alloca. This facility will be used for DeLICM/DeGVN to convert scalar dependencies into regular ones. The changes necessary include: - Make the code generator use the implicit locations instead of the alloca ones. - A test case - Make the JScop importer accept changes of scalar accesses for that test case. - Adapt the MemoryAccess interface to the fact that the MemoryKind can change. They are named (get|is)OriginalXXX() to get the status of the memory access before any change by setNewAccessRelation() (some properties such as getIncoming() do not change even if the kind is changed and are still required). To get the modified properties, there is (get|is)LatestXXX(). The old accessors without Original|Latest become synonyms of the (get|is)OriginalXXX() to not make functional changes in unrelated code. Differential Revision: https://reviews.llvm.org/D23962 llvm-svn: 280408
* [CMake] NFC. Missed the other uses in r280406Chris Bieneman2016-09-011-2/+2
| | | | | | Doh! Obviously need to slow down. llvm-svn: 280407
* [CMake] NFC. Fixing spelling from r280400Chris Bieneman2016-09-011-1/+1
| | | | | | Doh! llvm-svn: 280406
* [LV] Use ScalarParts for ad-hoc pointer IV scalarization (NFCI)Matthew Simpson2016-09-011-22/+9
| | | | | | | | | We can now maintain scalar values in VectorLoopValueMap. Thus, we no longer have to create temporary vectors with insertelement instructions when handling pointer induction variables. This case was mistakenly missed from r279649 when refactoring the other scalarization code. llvm-svn: 280405
* Check validity of new access relations. NFC.Michael Kruse2016-09-011-0/+38
| | | | | | | | | | | | | | There are some constraints on maps that can be access relations. In builds with assertions enabled, verify - The access domain is the same space as the statement's domain (modulo parameters). - Whether an access is defined for every instance of the statement. (codegen does not yet support partial access relations) - Whether the access range links to an array, represented by a ScopArrayInfo. - The number of access dimensions equals the dimensions of the array. - The array is not an indirect access. (also not supported by codegen) Differential Revision: https://reviews.llvm.org/D23916 llvm-svn: 280404
OpenPOWER on IntegriCloud