summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [SLP] Return a boolean value for these static helpers. NFC.Chad Rosier2016-08-291-17/+16
| | | | | | Differential Revision: https://reviews.llvm.org/D24008 llvm-svn: 280020
* AMDGPU/R600: Remove MergeVectorStores from legalizationJan Vesely2016-08-293-65/+0
| | | | | | | | This is handled by DAGCombiner in a more generic way Differential Revision: https://reviews.llvm.org/D23970 llvm-svn: 280019
* Make lld actually compatible with gold in terms of filler handling.Rui Ueyama2016-08-292-15/+15
| | | | | | | | | GNU gold handles output section fillers as 32-bit values. This patch makes LLD compatible with that behavior. Differential revision: https://reviews.llvm.org/D23181 llvm-svn: 280018
* [ORC][RPC] Fix typo in RPC comments: call primitives on void functions returnLang Hames2016-08-291-2/+2
| | | | | | future<Error>, not future<bool>. llvm-svn: 280017
* [ORC][RPC] Make the future type of an Orc RPC call Error/Expected rather thanLang Hames2016-08-292-41/+29
| | | | | | | | | | | | | | | | Optional. For void functions the return type of a nonblocking call changes from Expected<future<Optional<bool>>> to Expected<future<Error>>, and for functions returning T the return type changes from Expected<future<Optional<T>>> to Expected<future<Expected<T>>>. Inner results need to be checked (since the RPC connection may have dropped out before a result came back) and Error/Expected provide stronger checking requirements. It also allows us drop the crufty 'optionalToError' function and just collapse Errors in the single-threaded call primitives. llvm-svn: 280016
* libc++: perform configuration checks with -nodefaultlibsSaleem Abdulrasool2016-08-292-5/+33
| | | | | | | | | | | | | | | | | | We're compiling libc++ with -nodefaultlibs, so we should also pass this option during the configuration checks to ensure those checks are consistent with the actual build. The primary motivation here is to ease cross-compilation against a non-standard set of C++ libraries. Previously, the configuration checks would attempt to link against the standard C++ libraries, which would cause link failures when cross-compiling, even though the actual library link would go through correctly (because of the use of -nodefaultlibs and explicitly specifying any needed libraries). This is more correct even ignoring the motivation, however. Patch by Shoaib Meenai! llvm-svn: 280015
* COFF: disambiguate make_unique (NFC)Saleem Abdulrasool2016-08-291-2/+2
| | | | | | | This disambiguates `llvm::make_unqiue` and `std::make_unique` for the Windows buildbots. llvm-svn: 280014
* [CMake] Make LLVMConfig.cmake variable names match in-tree namesChris Bieneman2016-08-292-6/+5
| | | | | | | | | | | | With the runtimes build we're trying to use LLVMConfig.cmake as a way of providing LLVM_* variables that are needed to behave as if the project is building in tree. To make this work we need to rename two variables by dropping the "S" from the end. This makes the variables match the in-tree names. This renames: LLVM_INCLUDE_DIRS -> LLVM_INCLUDE_DIR LLVM_LIBRARY_DIRS -> LLVM_LIBRARY_DIR The versions ending in S are not used in-tree anywhere. This also cleans up LLVM_LIBRARY_DIR being set to the same value with and without the "S". llvm-svn: 280013
* COFF: add beginnings of debug directory creationSaleem Abdulrasool2016-08-296-9/+201
| | | | | | | | | | The IMAGE_FILE_HEADER structure contains a (RVA, size) to an array of COFF_DEBUG_DIRECTORY records. Each one of these records contains an RVA to a OMF Debug Directory. These OMF debug directories are derived into newer types such as PDB70, PDB20, etc. This constructs a PDB70 structure which will allow us to associate a GUID with a build to actually tie debug information. llvm-svn: 280012
* GlobalISel: use multi-dimensional arrays for legalize actions.Tim Northover2016-08-293-32/+50
| | | | | | | | | | | Instead of putting all possible requests into a single table, we can perform the extremely dense lookup based on opcode and type-index in constant time using multi-dimensional array-like things. This roughly halves the time spent doing legalization, which was dominated by queries against the Actions table. llvm-svn: 280011
* Fix a bug preventing the cause for a module file-not-found from being displayedAdrian Prantl2016-08-292-2/+2
| | | | llvm-svn: 280010
* Fix a bug preventing the cause of a module-out-of-date error from being printedAdrian Prantl2016-08-292-2/+2
| | | | llvm-svn: 280009
* Fix a thinko in r278189.Easwaran Raman2016-08-291-1/+1
| | | | llvm-svn: 280008
* Fix or suppress GCC warnings during build.Eric Fiselier2016-08-296-5/+32
| | | | | | | | | | | | | | | | | | | | Summary: Currently a number of GCC warnings are emitted when building libc++. This patch fixes or ignores all of them. The primary changes are: * Work around strict aliasing issues in `typeinfo::hash_code()` by using __attribute__((may_alias)). However I think a non-aliasing `hash_code()` implementation is possible. Further investigation needed. * Add `_LIBCPP_UNREACHABLE()` to switch in `strstream.cpp` to avoid -Wpotentially-uninitialized. * Fix -Wunused-value warning in `__all` by adding a void cast. * Ignore -Wattributes for now. There are a number of real attribute issues when using GCC but enabling the warning is too noisy. * Ignore -Wliteral-suffix since it warns about the use of reserved identifiers. Note Only GCC 7.0 supports disabling this warning. * Ignore -Wc++14-compat since it warns about the sized new/delete overloads. Reviewers: EricWF Differential Revision: https://reviews.llvm.org/D24003 llvm-svn: 280007
* AMDGPU: fix mismatch tags, NFCSaleem Abdulrasool2016-08-292-2/+2
| | | | llvm-svn: 280006
* ExecutionEngine: fix a bug in the movt/movw relocatorSaleem Abdulrasool2016-08-292-2/+18
| | | | | | | | | | According to the arm arm specifications, 4 bytes are needed for a shift instead of 8, this was causing the movt instruction to write to a different register sometimes. Patch by Walter Erquinigo! llvm-svn: 280005
* [CMake] Builtins build needs LLVM_*_OUTPUT_INTDIR variablesChris Bieneman2016-08-291-0/+2
| | | | | | This allows the builtins archives to build into the correct subdirectory under the binary dir. Addresses the issue discussed in D24001. llvm-svn: 280002
* [LV] Move insertelement sequence after scalar definitionsMatthew Simpson2016-08-293-16/+69
| | | | | | | | | | | | | | After r279649 when getting a vector value from VectorLoopValueMap, we create an insertelement sequence on-demand if the value has been scalarized instead of vectorized. We previously inserted this insertelement sequence before the value's first vector user. However, this insert location is problematic if that user is the phi node of a first-order recurrence. With this patch, we move the insertelement sequence after the last scalar instruction we created when scalarizing the value. Thus, the value's vector definition in the new loop will immediately follow its scalar definitions. This should fix PR30183. Reference: https://llvm.org/bugs/show_bug.cgi?id=30183 llvm-svn: 280001
* Convert GetNameColonValue to return StringRefs.Zachary Turner2016-08-2910-509/+489
| | | | | | | | | | | | StringExtractor::GetNameColonValue() looks for a substring of the form "<name>:<value>" and returns <name> and <value> to the caller. This results in two unnecessary string copies, since the name and value are not translated in any way and simply returned as-is. By converting this to return StringRefs we can get rid of hundreds of string copies. llvm-svn: 280000
* Turn On -DLIBCXX_ENABLE_BENCHMARKS by default.Eric Fiselier2016-08-294-27/+23
| | | | | | | | | | | | | | This patch enables the `cxx-benchmarks` target by default. Note that the target still has to be manually invoked since it isn't included in the default 'make' rule. This patch also gets the benchmarks building w/ GCC. The build previously required the '-stdlib=libc++' flag but upstream patches to Google Benchmark now allow the library to build w/ libc++ and GCC. These changes should make the benchmarks easier to build and test. llvm-svn: 279999
* Propagate TBAA info in SelectionDAG::getIndexedLoadKrzysztof Parzyszek2016-08-292-1/+39
| | | | | | Patch by Pranav Bhandarkar. llvm-svn: 279998
* Copy StringExtractor to StdStringExtractor.Zachary Turner2016-08-296-16/+700
| | | | | | | | | | | I have some improvements to make to StringExtractor that require using LLVM. debugserver can't take a dependency on LLVM but uses this file, so I'm forking it off into StdStringExtractor and StringExtractor, so that StringExtractor can take advantage of some performance improvements and readability improvements that LLVM can provide. llvm-svn: 279997
* [Myriad]: add missing 'mcpu' valuesDouglas Katzman2016-08-291-0/+3
| | | | | | Should have been done with r276646. llvm-svn: 279996
* AMDGPU/SI: Implement a custom MachineSchedStrategyTom Stellard2016-08-2932-63/+513
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: GCNSchedStrategy re-uses most of GenericScheduler, it's just uses a different method to compute the excess and critical register pressure limits. It's not enabled by default, to enable it you need to pass -misched=gcn to llc. Shader DB stats: 32464 shaders in 17874 tests Totals: SGPRS: 1542846 -> 1643125 (6.50 %) VGPRS: 1005595 -> 904653 (-10.04 %) Spilled SGPRs: 29929 -> 27745 (-7.30 %) Spilled VGPRs: 334 -> 352 (5.39 %) Scratch VGPRs: 1612 -> 1624 (0.74 %) dwords per thread Code Size: 36688188 -> 37034900 (0.95 %) bytes LDS: 1913 -> 1913 (0.00 %) blocks Max Waves: 254101 -> 265125 (4.34 %) Wait states: 0 -> 0 (0.00 %) Totals from affected shaders: SGPRS: 1338220 -> 1438499 (7.49 %) VGPRS: 886221 -> 785279 (-11.39 %) Spilled SGPRs: 29869 -> 27685 (-7.31 %) Spilled VGPRs: 334 -> 352 (5.39 %) Scratch VGPRs: 1612 -> 1624 (0.74 %) dwords per thread Code Size: 34315716 -> 34662428 (1.01 %) bytes LDS: 1551 -> 1551 (0.00 %) blocks Max Waves: 188127 -> 199151 (5.86 %) Wait states: 0 -> 0 (0.00 %) Reviewers: arsenm, mareko, nhaehnle, MatzeB, atrick Subscribers: arsenm, kzhuravl, llvm-commits Differential Revision: https://reviews.llvm.org/D23688 llvm-svn: 279995
* Remove std::atomic from lldb::Address.Zachary Turner2016-08-292-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | std::atomic<uint64_t> requires 64-bit alignment in order to guarantee atomicity. Normally the compiler is pretty good about aligning types, but an exception to this is when the type is passed by value as a function parameter. In this case, if your stack is 4-byte aligned, most modern compilers (including clang as of LLVM 4.0) fail to align the type, rendering the atomicity ineffective. A deeper investigation of the class's implementation suggests that the use of atomic was in vain anyway, because if the class were to be shared amongst multiple threads, there were already other data races present, and that the proper way to ensure thread-safe access to this data would be to use a mutex from a higher level. Since the std::atomic was not serving its intended purpose anyway, and since the presence of it generates compiler errors on some platforms that cannot be workaround, we remove std::atomic from Address here. Although unlikely, if data races do resurface the proper fix should involve a mutex from a higher level, or an attempt to limit the Address's access to a single thread. llvm-svn: 279994
* [asan] Enable new stack poisoning with store instruction by defaultVitaly Buka2016-08-295-60/+107
| | | | | | | | | | Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23968 llvm-svn: 279993
* GlobalISel: switch to SmallVector for pending legalizations.Tim Northover2016-08-291-6/+8
| | | | | | std::queue was doing far to many heap allocations to be healthy. llvm-svn: 279992
* AMDGPU/SI: Improve SILoadStoreOptimizer and run it before the schedulerTom Stellard2016-08-2912-150/+209
| | | | | | | | | | | | | | | | | | | | Summary: The SILoadStoreOptimizer can now look ahead more then one instruction when looking for instructions to merge, which greatly improves the number of loads/stores that we are able to merge. Moving the pass before scheduling avoids increasing register pressure after the scheduler, so that the scheduler's register pressure estimates will be more accurate. It also gives more consistent results, since it is no longer affected by minor scheduling changes. Reviewers: arsenm Subscribers: arsenm, kzhuravl, llvm-commits Differential Revision: https://reviews.llvm.org/D23814 llvm-svn: 279991
* ASan: remove variable only used in assertions buildTim Northover2016-08-291-2/+1
| | | | llvm-svn: 279990
* Update Google Benchmark library.Eric Fiselier2016-08-2915-761/+658
| | | | llvm-svn: 279989
* GlobalISel: legalize frem to a libcall on AArch64.Tim Northover2016-08-298-5/+54
| | | | llvm-svn: 279988
* GlobalISel: rework CallLowering so that it can be used for libcalls too.Tim Northover2016-08-296-29/+89
| | | | | | | There should be no functional change here, I'm just making the implementation of "frem" (to libcall) legalization easier for a followup. llvm-svn: 279987
* AMDGPU/R600: Fix fixups used for constant arraysMatt Arsenault2016-08-292-0/+29
| | | | | | Fixes bug 29289 llvm-svn: 279986
* IfConversion: Fix branch predication bug.Kyle Butt2016-08-292-20/+98
| | | | | | | | | | | | This bug shows up with diamonds that share unpredicable, unanalyzable branches. There's an included test case from Hexagon. What was happening was that we were attempting to predicate the branch instruction despite the fact that it was checked to be the same. Now for unanalyzable branches we skip over the branch instructions when predicating the block. Differential Revision: https://reviews.llvm.org/D23939 llvm-svn: 279985
* Use store operation to poison allocas for lifetime analysis.Vitaly Buka2016-08-293-94/+730
| | | | | | | | | | | | | | | | | | Summary: Calling __asan_poison_stack_memory and __asan_unpoison_stack_memory for small variables is too expensive. Code is disabled by default and can be enabled by -asan-experimental-poisoning. PR27453 Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23947 llvm-svn: 279984
* [scudo] use 32 bits of ASLR entropy instead of just 24 when shuffling ↵Kostya Serebryany2016-08-291-1/+1
| | | | | | allocated chunks llvm-svn: 279983
* [asan] Separate calculation of ShadowBytes from calculating ASanStackFrameLayoutVitaly Buka2016-08-294-79/+115
| | | | | | | | | | | | Summary: No functional changes, just refactoring to make D23947 simpler. Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23954 llvm-svn: 279982
* [asan] Remove runtime flag detect_stack_use_after_scopeVitaly Buka2016-08-299-56/+12
| | | | | | | | | | | | | | | Summary: We are going to use store instructions to poison some allocas. Runtime flag will require branching in instrumented code on every lifetime intrinsic. We'd like to avoid that. Reviewers: eugenis Subscribers: llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D23967 llvm-svn: 279981
* [SimplifyCFG] Hoisting invalidates metadataDavid Majnemer2016-08-292-2/+39
| | | | | | | | | We forgot to remove optimization metadata when performing hosting during FoldTwoEntryPHINode. This fixes PR29163. llvm-svn: 279980
* Make vec_fabs.ll pass with MSVC 2013Reid Kleckner2016-08-291-4/+7
| | | | | | We should revert this change once we drop support for MSVC 2013. llvm-svn: 279979
* Try to fix clang-offload-bunder.c test once moreReid Kleckner2016-08-291-2/+2
| | | | llvm-svn: 279978
* [gold] Fix test accidentally regressed for newer goldTeresa Johnson2016-08-293-1/+18
| | | | | | | | | | | | With r279911 I accidentally regressed the gold/X86/start-lib-common.ll test for newer golds (v1.12+) that honor the --start-lib/--end-lib. Remove the alignment which should not be there to make this work with both old and new gold linkers. Additionally, now that we have a subdirectory for v1.12+ gold tests, copy this test there and check specifically for the v1.12+ behavior. llvm-svn: 279977
* [AArch64] Adjust the scheduling model for Exynos M1.Evandro Menezes2016-08-291-4/+14
| | | | | | Further refine the model for loads. llvm-svn: 279976
* [StatepointsForGC] Rematerialize in the presence of PHIsAnna Thomas2016-08-292-0/+72
| | | | | | | | | | | | | | | | Summary: While walking the use chain for identifying rematerializable values in RS4GC, add the case where the current value and base value are the same PHI nodes. This will aid rematerialization of geps and casts instead of relocating. Reviewers: sanjoy, reames, igor Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23920 llvm-svn: 279975
* [LTO] Remove extraneous outputTeresa Johnson2016-08-291-1/+0
| | | | | | Remove some debugging output to stderr that snuck in with r279576. llvm-svn: 279974
* [Constant] remove fdiv and frem from canTrap()Sanjay Patel2016-08-292-8/+3
| | | | | | | | | | | Assuming the default FP env, we should not treat fdiv and frem any differently in terms of trapping behavior than any other FP op. Ie, FP ops do not trap with the default FP env. This matches how we treat the fdiv/frem in IR with isSafeToSpeculativelyExecute() and in the backend after: https://reviews.llvm.org/rL279970 llvm-svn: 279973
* [SimplifyCFG] rename test file, regenerate checks, and add testSanjay Patel2016-08-292-41/+70
| | | | | | | The fdiv test shows a problem similar to: https://reviews.llvm.org/rL279970 llvm-svn: 279972
* [Coroutines] Part 9: Add cleanup subfunction.Gor Nishanov2016-08-2919-137/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: [Coroutines] Part 9: Add cleanup subfunction. This patch completes coroutine heap allocation elision. Now, the heap elision example from docs\Coroutines.rst compiles and produces expected result (see test/Transform/Coroutines/ex3.ll) Intrinsic Changes: * coro.free gets a token parameter tying it to coro.id to allow reliably discovering all coro.frees associated with a particular coroutine. * coro.id gets an extra parameter that points back to a coroutine function. This allows to check whether a coro.id describes the enclosing function or it belongs to a different function that was later inlined. CoroSplit now creates three subfunctions: # f$resume - resume logic # f$destroy - cleanup logic, followed by a deallocation code # f$cleanup - just the cleanup code CoroElide pass during devirtualization replaces coro.destroy with either f$destroy or f$cleanup depending whether heap elision is performed or not. Other fixes, improvements: * Fixed buglet in Shape::buildFrame that was not creating coro.save properly if coroutine has more than one suspend point. * Switched to using variable width suspend index field (no longer limited to 32 bit index field can be as little as i1 or as large as i<whatever-size_t-is>) Reviewers: majnemer Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D23844 llvm-svn: 279971
* [TargetLowering] remove fdiv and frem from canOpTrap() (PR29114)Sanjay Patel2016-08-293-15/+3
| | | | | | | | | | | | | | | | | Assuming the default FP env, we should not treat fdiv and frem any differently in terms of trapping behavior than any other FP op. Ie, FP ops do not trap with the default FP env. This matches how we treat these ops in IR with isSafeToSpeculativelyExecute(). There's a similar bug in Constant::canTrap(). This bug manifests in PR29114: https://llvm.org/bugs/show_bug.cgi?id=29114 ...as a sequence of scalar divisions instead of a vector division on x86 for a <3 x float> type. Differential Revision: https://reviews.llvm.org/D23974 llvm-svn: 279970
* Do not use MRI::getMaxLaneMaskForVReg as a mask covering whole registerKrzysztof Parzyszek2016-08-293-7/+53
| | | | | | | | | | | | | MRI::getMaxLaneMaskForVReg does not always cover the whole register. For example, on X86 the upper 16 bits of EAX cannot be accessed via any subregister. Consequently, there is no lane mask that only covers that part of EAX. The getMaxLaneMaskForVReg will return the union of the lane masks for all subregisters, and in case of EAX, that union will not cover the upper 16 bits. This fixes https://llvm.org/bugs/show_bug.cgi?id=29132 llvm-svn: 279969
OpenPOWER on IntegriCloud