summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [CostModel][X86] Added missing AVX2 arithmetic costs.Simon Pilgrim2017-01-071-23/+33
| | | | | | Allows us to correctly fall through to the lower AVX1 costs if look up failed. llvm-svn: 291353
* [CostModel][X86] Reordered AVX1 arithmetic cost LUT into descending target ↵Simon Pilgrim2017-01-071-27/+27
| | | | | | order. NFCI. llvm-svn: 291352
* NewGVN: Make sure we properly lookup operand leaders while creatingDaniel Berlin2017-01-071-13/+48
| | | | | | | congruence classes for stores, and then keep them up to date. Add testcases. llvm-svn: 291351
* [X86][AVX512] Use lowerShuffleAsRepeatedMaskAndLanePermute for non-VBMI ↵Simon Pilgrim2017-01-072-2/+7
| | | | | | v64i8 shuffles (PR31470) llvm-svn: 291347
* TarWriter: Use fitsInUstar function.Rui Ueyama2017-01-071-2/+2
| | | | | | This change should have been commit as part of r291340. llvm-svn: 291341
* TarWriter: Use Ustar header's "prefix" field to store long filenames.Rui Ueyama2017-01-071-1/+27
| | | | | | | | | | | | Tar's Ustar header has the "prefix" field to store a directory part of a filename. It is not as flexible as the PAX-extended filename because there's still a limitation on the maximum filename size, but it mitigates the situation. This patch should unbreak some Windows buildbots that uses very old tar command. llvm-svn: 291340
* [X86] Disable load unfolding for 128-bit MOVDDUP instructions since the load ↵Craig Topper2017-01-071-2/+2
| | | | | | size is smaller than the register size so unfolding would increase the load size. llvm-svn: 291338
* Fix a typo. NFCXin Tong2017-01-071-1/+1
| | | | llvm-svn: 291335
* NewGVN: Reformat and fix a few newlinesDaniel Berlin2017-01-071-2/+3
| | | | llvm-svn: 291334
* [NewGVN] Prefer auto over explicit type. NFCI.Davide Italiano2017-01-071-1/+1
| | | | llvm-svn: 291328
* [WebAssembly] Don't abort on code with UB.Dan Gohman2017-01-071-6/+17
| | | | | | | | Gracefully leave code that performs function-pointer bitcasts implying non-trivial pointer conversions alone, rather than aborting, since it's just undefined behavior. llvm-svn: 291326
* [WebAssembly] Move a SmallVector to a more specific scope. NFC.Dan Gohman2017-01-071-2/+2
| | | | llvm-svn: 291324
* LowerTypeTests: Thread summary and action from the API and command line into ↵Peter Collingbourne2017-01-072-37/+75
| | | | | | | | | | | the pass. Also move command line handling out of the pass constructor and into a separate function. Differential Revision: https://reviews.llvm.org/D28422 llvm-svn: 291323
* [AVR] Parenthesize a boolean expressionDylan McKay2017-01-071-2/+2
| | | | | | | Without the parentheses, clang would emit warnings while compiling the code. llvm-svn: 291320
* [WebAssembly] Add a pass to create wrappers for function bitcasts.Dan Gohman2017-01-074-0/+154
| | | | | | | | | | | | WebAssembly requires caller and callee signatures to match exactly. In LLVM, there are a variety of circumstances where signatures may be mismatched in practice, and one can bitcast a function address to another type to call it as that type. This patch adds a pass which replaces bitcasted function addresses with wrappers to replace the bitcasts. This doesn't catch everything, but it does match many common cases. llvm-svn: 291315
* NewGVN: Fix PR 31501.Daniel Berlin2017-01-071-38/+50
| | | | | | | | | | | | Summary: LLVM's non-standard notion of phi nodes means we can't both try to substitute for undef in phi nodes *and* use phi nodes as leaders all the time. This changes NewGVN to use the same semantics as SimplifyPHINode to decide which phi nodes are equivalent. Reviewers: davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28312 llvm-svn: 291308
* [ThinLTO] Handle conflicting local names gracefullyTeresa Johnson2017-01-061-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: r285871 introduced an assert that was overly aggressive in the case of a same-named local in different same-named files (in different directories), where the source name and therefore the GUID ended up the same because the files were compiled in their own directory without any leading path. Change the handling in the promotion logic to get the summary for the version in that module. This also exposed an issue where we are not always importing the right copy, which is a performance not correctness issue (because the renaming is based on the module hash which must be different, see the bug report for details). I will fix that as a follow-on. Fixes PR31561. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28411 llvm-svn: 291304
* [ThinLTO] Optionally ignore empty index fileTeresa Johnson2017-01-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In order to simplify distributed build system integration, where actions may be scheduled before the Thin Link which determines the list of objects selected by the linker. The gold plugin currently will emit 0-sized index files for objects not selected by the link, to enable checking for expected output files by the build system. If the build system then schedules a backend action for these bitcode files, we want to be able to fall back to normal compilation instead of failing. This is the LLVM side support for optionally enabling fallback instead of issuing an error. Return a null CombinedIndex from llvm::getModuleSummaryIndexForFile under the option when the file is empty. Clang can then ignore the index when it is null. Clang patch is D28362. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28410 llvm-svn: 291302
* [BPF] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-01-066-45/+42
| | | | | | minor fixes (NFC). llvm-svn: 291297
* [InstSimplify] Optimize away udivs in the presence of range metadataDavid Majnemer2017-01-061-0/+10
| | | | | | We know that udiv %V, C can be optimized away to 0 if %V is ult C. llvm-svn: 291296
* [asan] Change the visibility of ___asan_globals_registered to hiddenKuba Mracek2017-01-061-0/+1
| | | | | | | | This flag is used to track global registration in Mach-O and it doesn't need to be exported and visible. Differential Revision: https://reviews.llvm.org/D28250 llvm-svn: 291289
* Fix use after freeXin Tong2017-01-061-1/+1
| | | | | | | | | | | | Summary: Fix use after free in LoopUnswitch Reviewers: chenli, atrick, hfinkel, mzolotukhin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28412 llvm-svn: 291288
* [InstSimplify] Optimize away urems in the presence of range metadataDavid Majnemer2017-01-061-0/+10
| | | | | | We know that urem %V, C can be optimized away to %V if %V is ult C. llvm-svn: 291282
* Fix LoopLoadElimination to keep original alignment on the inital hoisted storeMehdi Amini2017-01-061-1/+3
| | | | | | | | | | | This is fixing a bug where Loop Vectorization is widening a load but with a lower alignment. Hoisting the load without propagating the alignment will allow inst-combine to later deduce a higher alignment that what the pointer actually is. Differential Revision: https://reviews.llvm.org/D28408 llvm-svn: 291281
* AMDGPU/R600: Don't use REGISTER_{LOAD,STORE} ISD nodesJan Vesely2017-01-065-159/+159
| | | | | | | | This will make transition to SCRATCH_MEMORY easier Differential Revision: https://reviews.llvm.org/D24746 llvm-svn: 291279
* AArch64CollectLOH: Rewrite as block-local analysis.Matthias Braun2017-01-061-842/+281
| | | | | | | | | | | | | | | | | | | | | Re-apply r288561: This time with a fix where the ADDs that are part of a 3 instruction LOH would not invalidate the "LastAdrp" state. This fixes http://llvm.org/PR31361 Previously this pass was using up to 5% compile time in some cases which is a bit much for what it is doing. The pass featured a full blown data-flow analysis which in the default configuration was restricted to a single block. This rewrites the pass under the assumption that we only ever work on a single block. This is done in a single pass maintaining a state machine per general purpose register to catch LOH patterns. Differential Revision: https://reviews.llvm.org/D27329 This reverts commit 9e6cedb0a4f14364d6511597a9160305e7d34493. llvm-svn: 291266
* [DWARF] Null out the debug locs of (loop invariant) instructions hoisted by ↵Wolfgang Pieb2017-01-061-0/+8
| | | | | | | | | | LICM in order to avoid jumpy line tables. Calls are left alone because they may be inlined. Differential Revision: https://reviews.llvm.org/D28390 llvm-svn: 291258
* Use %z for size_t and avoid deprecated string functionsReid Kleckner2017-01-061-4/+4
| | | | | | | | This usage of strcpy and snprintf was certainly safe, but using them sets off various deprecation and lint warnings. Easier to just write the belt and suspenders version. llvm-svn: 291256
* [AArch64] Reduce vector insert/extract cost for Falkor.Chad Rosier2017-01-061-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D28403 llvm-svn: 291254
* [X86][SSE] Pass float domain flag to shuffle combine match functions. NFCI.Simon Pilgrim2017-01-061-13/+13
| | | | | | Early step towards ignoring domain above a certain shuffle depth. llvm-svn: 291248
* [AMDGPU] Remove extra semicolon. NFCKonstantin Zhuravlyov2017-01-061-1/+1
| | | | llvm-svn: 291246
* [AMDGPU] Do not emit .AMDGPU.config section for amdhsaKonstantin Zhuravlyov2017-01-061-4/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D27732 llvm-svn: 291245
* [X86][SSE] Simplify float domain requirement in unary shuffle matching.Simon Pilgrim2017-01-061-2/+1
| | | | | | The AVX1-only limit is never actually required in matchUnaryVectorShuffle llvm-svn: 291244
* Remove trailing whitespace. NFCI.Simon Pilgrim2017-01-061-3/+3
| | | | llvm-svn: 291240
* [X86] Add X86Subtarget argument. NFCI.Simon Pilgrim2017-01-061-8/+12
| | | | | | All callers of getTargetVShiftNode have access to X86Subtarget already so pass it along instead of re-extracting it. llvm-svn: 291239
* [ASan] Make ASan instrument variable-masked loads and storesFilipe Cabecinhas2017-01-061-41/+55
| | | | | | | | | | | | Summary: Previously we only supported constant-masked loads and stores. Reviewers: kcc, RKSimon, pgousseau, gbedwell, vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28370 llvm-svn: 291238
* [globalisel] Stop requiring -debug/-debug-only=registerbankinfo for assertions.Daniel Sanders2017-01-061-6/+7
| | | | | | | | | | | | | | | | | | | | | Summary: I've noticed that these assertions don't trigger when the condition is false. The problem is that the DEBUG(x) macro only executes x when the pass is emitting debug output via the -debug and -debug-only=registerbankinfo command line arguments. Debug builds should always execute the assertions so use '#ifndef NDEBUG' instead. Also removed an assertion that is only true the first time it's tested. <Target>RegisterBankInfo's constructor will re-use register banks causing them to be valid on subsequent tests. That assertion will fail on the first test too in the near future. Reviewers: t.p.northover, ab, rovka, qcolombet Subscribers: dberris, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D28358 llvm-svn: 291235
* [CostModel][X86] Fix 512-bit SDIV/UDIV 'big' costs.Simon Pilgrim2017-01-061-16/+18
| | | | | | Set the costs on the lowest target that supports the type. llvm-svn: 291229
* TarWriter: Emit PAX headers only when needed.Rui Ueyama2017-01-061-23/+20
| | | | | | | | We use PAX headers to store long filenames (>= 100 bytes). It is not needed to emit PAX headers if filenames fit in the Ustar header. This patch implements that optimization. llvm-svn: 291215
* [AVX-512] Add EXTRACT_SUBVECTOR support to combineBitcastForMaskedOp.Craig Topper2017-01-061-0/+21
| | | | llvm-svn: 291214
* [SelectionDAG] Rework lowerRangeToAssertZExtDavid Majnemer2017-01-061-6/+11
| | | | | | Utilize ConstantRange to make it easier to interpret range metadata. llvm-svn: 291211
* Add a class to create a tar archive file.Rui Ueyama2017-01-062-0/+170
| | | | | | | | | | | | | | In LLD, we create cpio archive files for --reproduce command. cpio was not a bad choice because it is very easy to create, but it was sometimes hard to use because people are not familiar with cpio command. I noticed that creating a tar archive isn't as hard as I thought. So I implemented it in this patch. Differential Revision: https://reviews.llvm.org/D28091 llvm-svn: 291209
* Revert "Use _Unwind_Backtrace on Apple platforms."Bob Wilson2017-01-061-1/+1
| | | | | | | | | | | This reverts commit 63165f6ae3bac1623be36d4b3ce63afa1d51a30a. After making this change, I discovered that _Unwind_Backtrace is unable to unwind past a signal handler after an assertion failure. I filed a bug report about that issue in rdar://29866587 but even if we get a fix soon, it will be awhile before it get released. llvm-svn: 291207
* LowerTypeTests: Split the pass in two: a resolution phase and a lowering phase.Peter Collingbourne2017-01-061-110/+155
| | | | | | | | | | | | This change separates how type identifiers are resolved from how intrinsic calls are lowered. All information required to lower an intrinsic call is stored in a new TypeIdLowering data structure. The idea is that this data structure can either be initialized using the module itself during regular LTO, or using the module summary in ThinLTO backends. Differential Revision: https://reviews.llvm.org/D28341 llvm-svn: 291205
* Remove unused private fields to fix the clang -Werror build.David Blaikie2017-01-061-5/+1
| | | | llvm-svn: 291201
* [AArch64, Lanai] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-01-0618-199/+386
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 291197
* [SelectionDAG] Correctly transform range metadata to AssertZExtDavid Majnemer2017-01-061-1/+1
| | | | | | | | We used the logBase2 of the high instead of the ceilLogBase2 resulting in the wrong result for certain values. For example, it resulted in an i1 AssertZExt when the exclusive portion of the range was 3. llvm-svn: 291196
* [libFuzzer] remove dead code, NFCKostya Serebryany2017-01-061-47/+0
| | | | llvm-svn: 291195
* Add iterator support to DWARFDie to allow child DIE iteration.Greg Clayton2017-01-051-4/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D28303 llvm-svn: 291194
* Code cleanup: Remove tab indents.Logan Chien2017-01-051-3/+3
| | | | llvm-svn: 291193
OpenPOWER on IntegriCloud