summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [DAGCombiner] Add a peekThroughBitcast to MergeStoresOfConstantsOrVecElts to ↵Craig Topper2018-03-042-0/+33
| | | | | | | | fix a crash if we are storing a bitcast of a constant. Loading a constant into a k-register in AVX512 requires a bitcast from a scalar constant. In the test case here we have a k-register store that gets split into multiple parts of KNL. MergeConsecutiveStores sees each of these pieces as a consecutive store and looks through the bitcast to find the underly scalar constant. But when we went to create the combined store we didn't look through the same bitcast. llvm-svn: 326677
* Amend r326665 to print out the `used` attribute subjects in a different order.Aaron Ballman2018-03-042-3/+3
| | | | llvm-svn: 326676
* Replace the custom handling for several attributes; NFC.Aaron Ballman2018-03-041-64/+10
| | | | | | These attributes were only customized because of the need to check for attribute mutual exclusion, but we now have the handleSimpleAttributeWithExclusions() helper function to handle these scenarios. llvm-svn: 326675
* [X86][X87] Add X87 folded integer arithmetic testsSimon Pilgrim2018-03-041-0/+621
| | | | | | | | Add tests for FIADD/FISUB/FISUBR/FIMUL/FIDIV/FIDIVR Shows we have more FILD stack usage than necessary (arg load, spill, reload to x87) llvm-svn: 326674
* [X86][MMX] Remove completed _mm_cvtsi32_si64 todoSimon Pilgrim2018-03-041-29/+0
| | | | | | | | | | rL322525 - mmx zero constant support rL322553 - mmx i32 zero extended value rL326497 - mmx i64 general constant handling Not all constants are folded, we generate some on the GPRs (similar to SSE build vector) where appropriate llvm-svn: 326673
* [X86] Fix unused variable in release builds.Craig Topper2018-03-041-4/+5
| | | | llvm-svn: 326672
* llgs-tests: use the auto-parsing form of SendMessage for sending the ↵Pavel Labath2018-03-042-11/+8
| | | | | | continue packets llvm-svn: 326671
* [X86] Combine (store (v1i1 (scalar_to_vector (i8 X)))) -> (store (i8 X)).Craig Topper2018-03-042-14/+24
| | | | llvm-svn: 326670
* [X86] Lower v1i1/v2i1/v4i1/v8i1 load/stores to i8 load/store during op ↵Craig Topper2018-03-043-38/+68
| | | | | | | | legalization if AVX512DQ is not supported. We were previously doing this with isel patterns. Moving it to op legalization gives us chance to see the required bitcast earlier. And it lets us remove some isel patterns. llvm-svn: 326669
* [CallSiteSplitting] fix use after-freeFedor Indutny2018-03-031-2/+7
| | | | | | | | Iterating through predecessors of `TailBB` while removing their terminators leads to use after-free, because the predecessor list is changing on each removal. llvm-svn: 326668
* ObjectFileMachO: use early return to remove one nesting level from ↵Pavel Labath2018-03-031-532/+513
| | | | | | | | CreateSections() NFCI llvm-svn: 326667
* [CallSiteSplitting] properly split musttail callsFedor Indutny2018-03-032-4/+147
| | | | | | | | | | | | | | | | | | | | Summary: `musttail` calls can't be naively splitted. The split blocks must include not only the call instruction itself, but also (optional) `bitcast` and `return` instructions that follow it. Clone `bitcast` and `ret`, place them into the split blocks, and remove the tail block when done. Reviewers: junbuml, mcrosier, davidxl, davide, fhahn Reviewed By: fhahn Subscribers: JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D43729 llvm-svn: 326666
* Create a subject list for the `used` attribute rather than use custom ↵Aaron Ballman2018-03-033-20/+7
| | | | | | | | checking logic. This changes the diagnostic wording somewhat, but otherwise intends no functional change to the attribute. llvm-svn: 326665
* [ScopInfo] Do not use the set dimension ids to carry loop informationTobias Grosser2018-03-035-48/+22
| | | | | | | | | | | | | | isl does not guarantee that set dimension ids will be preserved, so using them to carry information is not a good idea. Furthermore, the loop information can be derived without problem from the statement itself. As this even requires less code than propagating loop information on set dimension ids, starting from this commit we just derive the loop information in collectSurroundingLoops directly from the IR. Interestingly this also results in a couple of isl sets to take a simpler representation. llvm-svn: 326664
* Remove more references to ptrace_pt_{g,s}et_sigmaskKamil Rytarowski2018-03-032-8/+0
| | | | | | | | | | These operations are now obsolete on NetBSD and will be removed. No functional change for other OSes. Sponsored by <The NetBSD Foundation> llvm-svn: 326663
* Fix NetBSD 32-bit buildKamil Rytarowski2018-03-031-1/+1
| | | | | | | | Replace 'defined(SANITIZER_OPENBSD)' with appropriate 'SANITIZER_OPENBSD'. This is a fallout from adding OpenBSD partial support. llvm-svn: 326662
* [InstCombine] add test for vectors with undef elts; NFCSanjay Patel2018-03-031-1/+14
| | | | llvm-svn: 326661
* [InstCombine] (~X) - (~Y) --> Y - XSanjay Patel2018-03-032-4/+7
| | | | llvm-svn: 326660
* [InstCombine] add tests for notnotsub; NFCSanjay Patel2018-03-031-0/+36
| | | | | | | As shown in D44043, we may need this fold in the backend, but it's also missing in the IR optimizer. llvm-svn: 326659
* [X86] This bit-test TODO has been moved in PR36551Simon Pilgrim2018-03-031-24/+0
| | | | llvm-svn: 326658
* Remove obsolete ptrace(2) operations from NetBSDKamil Rytarowski2018-03-035-14/+2
| | | | | | | | | PT_SET_SIGMASK and PT_GET_SIGMASK will be removed from NetBSD without backward compat (it shortlived in a development branch). Sponsored by <The NetBSD Foundation> llvm-svn: 326657
* Revert "[Acc] Fix for PR33208"Philip Pfaffe2018-03-031-5/+9
| | | | | | This reverts commit r326643. Fix didn't really fix anything. llvm-svn: 326656
* Revert D44035Kamil Rytarowski2018-03-032-111/+67
| | | | | | Broken syntax. llvm-svn: 326655
* Hotfix for D44035Kamil Rytarowski2018-03-031-1/+1
| | | | | | Try to fix the syntax. llvm-svn: 326654
* Support OpenBSD in common interceptorsKamil Rytarowski2018-03-032-67/+111
| | | | | | | | | | | | | | | | | | | | | | | Summary: Extract INIT_PTHREAD_ATTR_GET_SCHED from INIT_PTHREAD_ATTR_GET, as the former is not supported on OpenBSD. Supported interceptors getdetachstate, getguardsize, getscope, getstacksize, getgrouplist and getstack Unsupported getschedparam, getgroupmembership and getschedpolicy Patch by David CARLIER Reviewers: krytarowski, vitalybuka Reviewed By: vitalybuka Subscribers: fedor.sergeev, srhines, kubamracek, mgorny, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44035 llvm-svn: 326653
* Disable tests of -fsanitize on OpenBSDKamil Rytarowski2018-03-031-6/+0
| | | | | | | | | | | | | | This causes failures on buildbots: /export/users/atombot/llvm/clang-atom-d525-fedora-rel/llvm/tools/clang/test/Driver/fsanitize.c:18:29: error: expected string not found in input // CHECK-UNDEFINED-OPENBSD: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|float-divide-by-zero|shift-base|shift-exponent|unreachable|return|vla-bound|alignment|null|pointer-overflow|float-cast-overflow|array-bounds|enum|bool|builtin|returns-nonnull-attribute|nonnull-attribute),?){18}"}} ^ <stdin>:1:1: note: scanning from here clang version 7.0.0 (trunk 326648) ^ This will be investigated. llvm-svn: 326652
* OpenBSD UBsan support enabling SANITIZER_OPENBSD widelyKamil Rytarowski2018-03-038-13/+28
| | | | | | | | | | | | | | | | Summary: Adding OpenBSD platform Patch by: David CARLIER Reviewers: krytarowski, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, kubamracek, fedor.sergeev, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44049 llvm-svn: 326651
* OpenBSD UBsan support / commonKamil Rytarowski2018-03-034-0/+762
| | | | | | | | | | | | | | | | | | | Summary: Sanitizer common, enable OpenBSD platform. - Enable common interceptors as possible and create few distinct ones. - Create necessary sanitizer_struct types. Patch by: David CARLIER Reviewers: krytarowski, vitalybuka, visa, kettenis Reviewed By: vitalybuka Subscribers: emaste, srhines, kubamracek, mgorny, fedor.sergeev, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43909 llvm-svn: 326650
* [msan] Restrict -ftls-model=initial-exec to FreeBSDKamil Rytarowski2018-03-031-1/+3
| | | | | | Noted by <eugenis> in D43613 llvm-svn: 326649
* OpenBSD Driver basic sanitiser supportKamil Rytarowski2018-03-032-1/+24
| | | | | | | | | | | | | | | | | | Summary: Basic support of Sanitiser to follow-up ubsan support in compiler-rt. Needs to use lld instead of base ld to be fully workable. Patch by: David CARLIER Reviewers: krytarowski, vitalybuka, kettenis Reviewed By: vitalybuka Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D43961 llvm-svn: 326648
* Sanitiser common, using u64 type for GetTid on posix systemsKamil Rytarowski2018-03-032-7/+5
| | | | | | | | | | | | | | | | | Summary: Moving from ptr to u64 for GetTid posix implementation. [FreeBSD] Moving from pthread_self to thr_self more appropriate to get thread ID. Patch by: David CARLIER Reviewers: krytarowski, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43998 llvm-svn: 326647
* OpenBSD UBsan support, cmake partKamil Rytarowski2018-03-032-6/+15
| | | | | | | | | | | | | | | | | | Summary: On OpenBSD no multi arch support Enabling only UBsan and disabling Asan. Patch by: David CARLIER Reviewers: krytarowski, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, mgorny, fedor.sergeev, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44017 llvm-svn: 326646
* Better OpenBSD frontend supportKamil Rytarowski2018-03-033-3/+9
| | | | | | | | | | | | | | | | | | Summary: - Like other *BSD, conditioning certain flags to pass - To prepare future OpenBSD sanitisers. Patch by: David CARLIER Reviewers: dlj, krytarowski, vitalybuka Reviewed By: vitalybuka Subscribers: krytarowski, cfe-commits Differential Revision: https://reviews.llvm.org/D43818 llvm-svn: 326645
* Adding Msan support to FreeBSDKamil Rytarowski2018-03-0316-8/+24
| | | | | | | | | | | | | | | | | | | | Summary: Enabling the memory sanitizer support for FreeBSD, most of unit tests are compatible. - Adding fstat and stressor_r interceptors. - Updating the struct link_map access since most likely the struct Obj_Entry had been updated since. - Disabling few unit tests until further work is needed (or we can assume it can work in real world code). Patch by: David CARLIER Reviewers: vitalybuka, krytarowski Reviewed By: vitalybuka Subscribers: eugenis, dim, srhines, emaste, kubamracek, mgorny, fedor.sergeev, hintonda, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43080 llvm-svn: 326644
* [Acc] Fix for PR33208Philip Pfaffe2018-03-031-9/+5
| | | | | | | | | | | | | During codegen, Polly attempts to clear all loops from ScalarEvolution and LoopInfo, and it does so one block at a time. This causes undefined behaviour, since this way a loop header might be removed from a loop before the entire loop is erased, causing ScalarEvolution to run into an error. Instead, just delete the entire loop atomically. This fixes currently failing testcases. llvm-svn: 326643
* [X86] Remove 'else' after return. NFCCraig Topper2018-03-031-3/+3
| | | | llvm-svn: 326642
* Simplify. NFC.Rafael Espindola2018-03-032-7/+1
| | | | | | | Since r321982 we don't set VersionId in scanShlibUndefined, which makes InVersionScript redundant. llvm-svn: 326641
* Mark ObjC testcase as skipUnlessDarwin and fix a typo in test function.Adrian Prantl2018-03-021-1/+2
| | | | llvm-svn: 326640
* Do not generate calls to fentry with __attribute__((no_instrument_function))Manoj Gupta2018-03-022-6/+15
| | | | | | | | | | | | | | | | | | | Summary: Currently only calls to mcount were suppressed with no_instrument_function attribute. Linux kernel requires that calls to fentry should also not be generated. This is an extended fix for PR PR33515. Reviewers: hfinkel, rengolin, srhines, rnk, rsmith, rjmccall, hans Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D43995 llvm-svn: 326639
* [ThinLTO] Revert r325320: Import global variablesChandler Carruth2018-03-026-127/+23
| | | | | | | | | | | | | | This caused some links to fail with ThinLTO due to missing symbols as well as causing some binaries to have failures at runtime. We're working with the author to get a test case, but want to get the tree green again. Further, it appears to introduce a data race. While the test usage of threads was disabled in r325361 & r325362, that isn't an acceptable fix. I've reverted both of these as well. This code needs to be thread safe. Test cases for this are already on the original commit thread. llvm-svn: 326638
* [LegalizeVectorTypes] When scalarizing the operand of a unary op like TRUNC, ↵Craig Topper2018-03-022-39/+12
| | | | | | | | | | | | use a SCALAR_TO_VECTOR rather than a single element BUILD_VECTOR to convert back to a vector type. X86 considers v1i1 a legal type under AVX512 and as such a truncate from a v1iX type to v1i1 can be turned into a scalar truncate plus a conversion to v1i1. We would much prefer a v1i1 SCALAR_TO_VECTOR over a one element BUILD_VECTOR. During lowering we were detecting the v1i1 BUILD_VECTOR as a splat BUILD_VECTOR like we try to do for v2i1/v4i1/etc. In this case we create (select i1 splat_elt, v1i1 all-ones, v1i1 all-zeroes). That goes through some more legalization and we end up with a CMOV choosing between 0 and 1 in scalar and a scalar_to_vector. Arguably we could detect the v1i1 BUILD_VECTOR and do this better in X86 target code. But just using a SCALAR_TO_VECTOR in legalization is much easier. llvm-svn: 326637
* Implementation of MRI "delete" command.Dmitry Mikulin2018-03-022-1/+22
| | | | | | Differential Revision: https://reviews.llvm.org/D43989 llvm-svn: 326636
* [AggressiveInstCombine] Use use_empty() instead of !getNumUses(), NFCVedant Kumar2018-03-021-1/+1
| | | | | | use_empty() runs in O(1), whereas getNumUses() runs in O(# uses). llvm-svn: 326635
* Don't compile testcase with clang modules enabled.Adrian Prantl2018-03-022-2/+1
| | | | | | | It isn't actually necessary for what we are testing here and should fix the test on the Linux bots. llvm-svn: 326634
* [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2018-03-028-263/+337
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 326633
* [InstCombine] rearrange visitFMul; NFCISanjay Patel2018-03-021-73/+69
| | | | | | | Put the simplest non-FMF folds first, so it's easier to see what's left to fix/group/add with the FMF folds. llvm-svn: 326632
* Add DBG_VALUE support to the linear DAG schedulerAdrian Prantl2018-03-022-1/+84
| | | | | | | | | | | The fast/linear DAG scheduler doesn't lower DBG_VALUEs except for function entry nodes. Patch by Joshua Cranmer! Differential Revision: https://reviews.llvm.org/D43028 llvm-svn: 326631
* [llvm-symbolizer] Use correct path when resolving .gnu_debuglink in .debugFrancis Ricci2018-03-022-1/+27
| | | | | | | | | | | | | | | Summary: The symbolizer was checking for .debug as a subdirectory of the binary file itself, not of the directory containing the binary. This led to a failure to find split debug info when it was contained in a .debug directory. Reviewers: rnk, glider, zturner Subscribers: llvm-commits, aprantl Differential Revision: https://reviews.llvm.org/D44025 llvm-svn: 326630
* [Utils] Salvage debug info in block simplificationVedant Kumar2018-03-022-28/+67
| | | | | | | | | | | | | In stage2 -O3 builds of llc, this results in small but measurable increases in the number of variables with locations, and in the number of unique source variables overall. (According to llvm-dwarfdump --statistics, there are 123 additional variables with locations, which is just a 0.006% improvement). The size of the .debug_loc section of the llc dsym increases by 0.004%. llvm-svn: 326629
* Make the clang module cache setting available without a targetAdrian Prantl2018-03-0212-29/+134
| | | | | | | | | | | | | | | It turns out that setting the clang module cache after LLDB has a Target can be too late. In particular, the Swift language plugin needs to know the setting without having access to a Target. This patch moves the setting into the *LLDB* module cache, where it is a global setting that is available before any Target is created and more importantly, is shared between all Targets. rdar://problem/37944432 Differential Revision: https://reviews.llvm.org/D43984 llvm-svn: 326628
OpenPOWER on IntegriCloud