summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [NewGVN] Add a flag to enable the pass via `-mllvm`.Davide Italiano2016-12-261-4/+14
| | | | | | | | NewGVN can be tested passing `-mllvm -enable-newgvn` to clang. Differential Revision: https://reviews.llvm.org/D28059 llvm-svn: 290548
* [NewGVN] Fold lookupOperandLeader() when there's only one use. NFCI.Davide Italiano2016-12-261-4/+2
| | | | llvm-svn: 290543
* [InstCombiner] Simplify lib calls to `round{,f}`Bryant Wong2016-12-261-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D28110 llvm-svn: 290542
* [AVX-512] Fix some patterns to use extended register classes.Craig Topper2016-12-261-64/+73
| | | | llvm-svn: 290536
* [AVX-512][InstCombine] Teach InstCombine to turn scalar add/sub/mul/div with ↵Craig Topper2016-12-261-3/+49
| | | | | | | | | | | | | | | | | rounding intrinsics into normal IR operations if the rounding mode is CUR_DIRECTION. Summary: I only do this for unmasked cases for now because isel is failing to fold the mask. I'll try to fix that soon. I'll do the same thing for packed add/sub/mul/div in a future patch. Reviewers: delena, RKSimon, zvi, craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27879 llvm-svn: 290535
* [AVX-512] Don't assume that the rounding mode argument to intrinsics is a ↵Craig Topper2016-12-261-16/+17
| | | | | | | | constant. While clang will guarantee this, nothing in the backend will. A non-constant value will now result in an isel error instead of just asserting or crashing due to a bad cast during lowering. llvm-svn: 290532
* [AVX-512][InstCombine] Teach InstCombine to converted masked vpermv ↵Craig Topper2016-12-251-4/+50
| | | | | | | | | | | | | | | | | intrinsics into shufflevector instructions Summary: This patch adds support for converting the masked vpermv intrinsics into shufflevector instructions if the indices are constants. We also need to wrap a select instruction around the shuffle to take care of the masking part. InstCombine will take care of optimizing the select if the mask is constant so I didn't bother checking for that. Reviewers: zvi, delena, spatel, RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27825 llvm-svn: 290530
* [MemorySSA] Define a restricted upward AccessList splice.Bryant Wong2016-12-251-0/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D26661 llvm-svn: 290527
* [AliasAnalysis] Teach BasicAA about memcpy.Bryant Wong2016-12-251-0/+25
| | | | | | Differential Revision: https://reviews.llvm.org/D27034 llvm-svn: 290526
* Value number stores and memory states so we can detect when memory states ↵Daniel Berlin2016-12-251-20/+139
| | | | | | | | | | | | are equivalent (IE store of same value to memory). Reviewers: davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28084 llvm-svn: 290525
* Rename GVNExpression *ops_ members to *op_* to match conventions in the rest ↵Daniel Berlin2016-12-251-11/+11
| | | | | | of LLVM llvm-svn: 290524
* [Orc][RPC] Add a ParallelCallGroup utility for dispatching and waiting onLang Hames2016-12-251-0/+2
| | | | | | | | | | | | | | | | multiple asynchronous RPC calls. ParallelCallGroup allows multiple asynchronous calls to be dispatched, and provides a wait method that blocks until all asynchronous calls have been executed on the remote and all return value handlers run on the local machine. This will allow, for example, the JIT client to issue memory allocation calls for all sections in parallel, then block until all memory has been allocated on the remote and the allocated addresses registered with the client, at which point the JIT client can proceed to applying relocations. llvm-svn: 290523
* revert commit 290516Michael Zuckerman2016-12-251-1/+0
| | | | llvm-svn: 290517
* Commit try added new empty lineMichael Zuckerman2016-12-251-0/+1
| | | | llvm-svn: 290516
* [DebugInfo] Added support for Checksum debug info feature.Amjad Aboud2016-12-2510-16/+95
| | | | | | Differential Revision: https://reviews.llvm.org/D27642 llvm-svn: 290514
* MetadataLoader: replace the tracking of ForwardReferences and ↵Mehdi Amini2016-12-251-44/+23
| | | | | | | | | | | | | UnresolvedNodes with a set-based solution (NFC) This makes it explicit what is the exact list to handle, and it looks much more easy to manipulate and understand that the previous custom tracking of min/max to express the range where to look for. Differential Revision: https://reviews.llvm.org/D28089 llvm-svn: 290507
* MetadataLoader: add an extra assertion in Placeholders flush (NFC)Mehdi Amini2016-12-251-3/+3
| | | | | | We don't expect any forward reference at this point. llvm-svn: 290506
* [NewGVN] Prefer `auto` to explicit type when the latter is obvious.Davide Italiano2016-12-241-1/+1
| | | | llvm-svn: 290499
* [SelectionDAG] Early out from computeKnownBits when we know we will have no ↵Simon Pilgrim2016-12-241-8/+26
| | | | | | | | common bits. Avoid extra (recursive) calls to computeKnownBits if we already know that there are no common known bits. llvm-svn: 290490
* [PM] Try to improve the comments here to make what's going on moreChandler Carruth2016-12-241-3/+5
| | | | | | | | clear. Based on post-commit review suggestion from Sean. (Thanks!) llvm-svn: 290488
* Mark isOnlyReachableViaThisEdge as constDaniel Berlin2016-12-241-2/+2
| | | | llvm-svn: 290468
* Add an assertion for cl::opt names: they can't start with '-'Mehdi Amini2016-12-231-0/+1
| | | | llvm-svn: 290467
* [PM] Teach the always inlining test case to be much more strict aboutChandler Carruth2016-12-231-0/+15
| | | | | | | | | | | | | | | | | | | | whether functions are removed, and fix the new PM's always inliner to actually pass this test. Without this, the new PM's always inliner leaves all the functions kicking around which won't work out very well given the semantics of always inline. Doing this really highlights how frustrating the current alwaysinline semantic contract is though -- why can we put it on *external* functions, etc? Also I've added a number of tricky and interesting test cases for removing functions with the always inliner. There is one remaining case not handled -- fully removing comdats -- and I've left a FIXME about this. llvm-svn: 290457
* [PM] Add support for building a default AA pipeline to the PassBuilder.Chandler Carruth2016-12-231-0/+34
| | | | | | | | | Pretty boring and lame as-is but necessary. This is definitely a place we'll end up with extension hooks longer term. =] Differential Revision: https://reviews.llvm.org/D28076 llvm-svn: 290449
* Function-import: Disable IRVerifier on lazy-loaded modules: the ODR ↵Mehdi Amini2016-12-231-8/+0
| | | | | | TypeUniquing generates invalid debug info. llvm-svn: 290442
* Fix build after r290437 (missing include)Mehdi Amini2016-12-231-0/+1
| | | | llvm-svn: 290438
* FunctionImport: fix typo '#ifndef NDEBUG' instead of '#ifndef DEBUG'Mehdi Amini2016-12-231-1/+1
| | | | llvm-svn: 290437
* AMDGPU: split ret/noret patterns for global atomicsJan Vesely2016-12-233-22/+52
| | | | | | Differential Revision: https://reviews.llvm.org/D27989 llvm-svn: 290435
* [LICM] Plug a leak freeing the ASTs before clearing the map.Davide Italiano2016-12-231-0/+2
| | | | llvm-svn: 290433
* [MemDep] NFC changesPiotr Padlewski2016-12-231-2/+1
| | | | llvm-svn: 290428
* [LICM] Work around LICM needs to maintain state across loops.Davide Italiano2016-12-231-1/+6
| | | | | | | | | | | | | | | The pass creates some state which expects to be cleaned up by a later instance of the same pass. opt-bisect happens to expose this not ideal design because calling skipLoop() will result in this state not being cleaned up at times and an assertion firing in `doFinalization()`. Chandler tells me the new pass manager will give us options to avoid these design traps, but until it's not ready, we need a workaround for the current pass infrastructure. Fix provided by Andy Kaylor, see the review for a complete discussion. Differential Revision: https://reviews.llvm.org/D25848 llvm-svn: 290427
* [AArch64] Cortex-A57 FDIV/FSQRT scheduling fix (W-unit)Renato Golin2016-12-232-18/+18
| | | | | | | | | | | | | | According to the Cortex-A57 doc, FDIV/FSQRT instructions should use F0 unit (W-unit in AArch64SchedA57.td, the same as cryptography instructions), not F1 unit (X-unit in td, like ASIMD absolute diff accum SABA/UABA). This patch changes FDIV/FSQRT scheduling declarations to use A57UnitW instead of A57UnitX. Also, latencies for those instructions are corrected. Patch by Andrew Zhogin. llvm-svn: 290426
* Revert r290423 because it broke the sanitizer-x86_64-linux-autoconf buildbot.Florian Hahn2016-12-231-5/+0
| | | | llvm-svn: 290425
* [framelowering] Skip dbg values when getting next/previous instruction.Florian Hahn2016-12-231-0/+5
| | | | | | | | | | | | | | | | | | | Summary: In mergeSPUpdates, debug values need to be ignored when getting the previous element, otherwise debug data could have an impact on codegen. In eliminateCallFramePseudoInstr, debug values after the erased element could have an impact on codegen and should be skipped. Closes PR31319 (https://llvm.org/bugs/show_bug.cgi?id=31319) Reviewers: mkuper, MatzeB, aprantl Subscribers: gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D27688 llvm-svn: 290423
* [NewGVN] Remove (for now) unused code. NFCI.Davide Italiano2016-12-231-12/+0
| | | | llvm-svn: 290420
* [ThinLTO] Verify lazy-loaded source module for function importing when ↵Mehdi Amini2016-12-231-0/+8
| | | | | | assertions are enabled (NFC) llvm-svn: 290416
* MetadataLoader: split the creation of a single metadata out of a Record into ↵Mehdi Amini2016-12-231-635/+650
| | | | | | | | | its own function (NFC) This is pure code motion, will just make it more reusable when I'll attempt to lazy-load Metadats on-demand. llvm-svn: 290414
* [WebAssembly] Annotate call and load/store immediates.Dan Gohman2016-12-234-26/+36
| | | | | | These will be used to guide the binary encoding of these immediates. llvm-svn: 290412
* Make the canonicalisation on shifts benifit to more case.Zijiao Ma2016-12-231-9/+13
| | | | | | | | | | | 1.Fix pessimized case in FIXME. 2.Add tests for it. 3.The canonicalisation on shifts results in different sequence for tests of machine-licm.Correct some check lines. Differential Revision: https://reviews.llvm.org/D27916 llvm-svn: 290410
* MetadataLoader: Reinitialize MinFwdRef/MaxFwdRef after resolving cycles (NFC)Mehdi Amini2016-12-231-0/+2
| | | | | | This put the Loader back in a consistent state. llvm-svn: 290409
* MetadataLoader: Add an assertion for the implicit invariant of PlaceHolder ↵Mehdi Amini2016-12-231-2/+8
| | | | | | while loading Metadata (NFC) llvm-svn: 290408
* MetadataLoader: Make sure every member of MetadataLoader are initialized (NFC)Mehdi Amini2016-12-231-6/+13
| | | | llvm-svn: 290407
* MetadataLoader: Refactor "IsImporting" into the Pimpl for the MetadataLoader ↵Mehdi Amini2016-12-232-11/+11
| | | | | | | | (NFC) Keeping all the state together will make it easier to handle. llvm-svn: 290406
* Enable '-Wstring-conversion' and fix some bad asserts that it helpedChandler Carruth2016-12-232-2/+2
| | | | | | | | find. Notable is the assert in NewGVN which had no effect because of the bug. llvm-svn: 290400
* Don't consider allocsize functions to be allocation functions.George Burgess IV2016-12-231-23/+28
| | | | | | | | | | | | | | | | | | | This patch fixes some ASAN unittest failures on FreeBSD. See the cfe-commits email thread for r290169 for more on those. According to the LangRef, the allocsize attribute only tells us about the number of bytes that exist at the memory location pointed to by the return value of a function. It does not necessarily mean that the function will only ever allocate. So, we need to be very careful about treating functions with allocsize as general allocation functions. This patch makes us fully conservative in this regard, though I suspect that we have room to be a bit more aggressive if we want. This has a FIXME that can be fixed by a relatively straightforward refactor; I just wanted to keep this patch minimal. If this sticks, I'll come back and fix it in a few days. llvm-svn: 290397
* NFC code motion in ImplicitNullChecksSanjoy Das2016-12-231-96/+106
| | | | | | Extract out two large lambdas into top level member functions. llvm-svn: 290395
* Reimplement depedency tracking in the ImplicitNullChecks passSanjoy Das2016-12-231-201/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change rewrites a core component in the ImplicitNullChecks pass for greater simplicity since the original design was over-complicated for no good reason. Please review this as essentially a new pass. The change is almost NFC and I've added a test case for a scenario that this new code handles that wasn't handled earlier. The implicit null check pass, at its core, is a code hoisting transform. It differs from "normal" code transforms in that it speculates potentially faulting instructions (by design), but a lot of the usual hazard detection logic (register read-after-write etc.) still applies. We previously detected hazards by keeping track of registers defined and used by machine instructions over an instruction range, but that was unwieldy and did not actually confer any performance benefits. The intent was to have linear time complexity over the number of machine instructions considered, but it ended up being N^2 is practice. This new version is more obviously O(N^2) (with N capped to 8 by default) in hazard detection. It does not attempt to be clever in tracking register uses or defs (the previous cleverness here was a source of bugs). Once this is checked in, I'll extract out the `IsSuitableMemoryOp` and `CanHoistLoadInst` lambda into member functions (they're too complicated to be inline lambdas) and do some other related NFC cleanups. Reviewers: reames, anna, atrick Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D27592 llvm-svn: 290394
* [GlobalISel] More fix for the size vs. type typo. NFC.Quentin Colombet2016-12-222-4/+4
| | | | | | I missed those in my previous commit (r290378). llvm-svn: 290387
* [ObjectYAML] Support for DWARF debug_info sectionChris Bieneman2016-12-222-4/+41
| | | | | | | | | | This patch adds support for YAML<->DWARF for debug_info sections. This re-lands r290147, reverted in 290148, re-landed in r290204 after fixing the issue that caused bots to fail (thank you UBSan!), and reverted again in r290209 due to failures on big endian systems. After adding support for preserving endianness, this should be good now. llvm-svn: 290386
* [cfi] Emit jump tables as a function-level inline asm.Evgeniy Stepanov2016-12-221-132/+90
| | | | | | | | | | | | | | | | | | Use a dummy private function with inline asm calls instead of module level asm blocks for CFI jumptables. The main advantage is that now jumptable codegen can be affected by the function attributes (like target_cpu on ARM). Module level asm gets the default subtarget based on the target triple, which is often not good enough. This change also uses asm constraints/arguments to reference jumptable targets and aliases directly. We no longer do asm name mangling in an IR pass. Differential Revision: https://reviews.llvm.org/D28012 llvm-svn: 290384
OpenPOWER on IntegriCloud