summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [SymbolContext] Rewrite operator== to be more concise.Davide Italiano2018-12-291-6/+1
| | | | | | And probably, less error prone. NFCI. llvm-svn: 350146
* Drop SE cache early because loop parent can change in LoopSimplifyCFGMax Kazantsev2018-12-291-3/+7
| | | | llvm-svn: 350145
* [WebAssembly] Fix comments in ExplicitLocals (NFC)Heejin Ahn2018-12-291-3/+4
| | | | llvm-svn: 350144
* Add vtable anchor to classes.Richard Trieu2018-12-296-0/+10
| | | | llvm-svn: 350143
* Add vtable anchor to classes.Richard Trieu2018-12-2916-0/+44
| | | | llvm-svn: 350142
* [X86] Don't mark SEXTLOAD v4i8->v4i64 and v8i8->v8i64 as custom under vector ↵Craig Topper2018-12-292-78/+64
| | | | | | | | widening legalization. This was tricking us into making these operations and then letting them get scalarized later. But I can't prove that the scalarized version is actually better. llvm-svn: 350141
* Reenable hard_rss_limit_mb_test.cc for android-26Kamil Rytarowski2018-12-291-3/+0
| | | | | | Noted by eugenis@ in D55887. llvm-svn: 350140
* Add support for background thread on NetBSD in ASanKamil Rytarowski2018-12-293-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Change the point of calling MaybeStartBackgroudThread() from AsanInitInternal() that is too early on NetBSD to a constructor (with aid of C++11 lambda construct). Enable the code for background thread as is for NetBSD. Rename test/sanitizer_common/TestCases/Linux/hard_rss_limit_mb_test.cc to test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc and allow runs on NetBSD. This tests passes correctly. Reviewers: vitalybuka, joerg, eugenis Reviewed By: eugenis Subscribers: eugenis, kubamracek, fedor.sergeev, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55887 llvm-svn: 350139
* [Sanitizer] Enable getfsent api for DarwinDavid Carlier2018-12-294-2/+5
| | | | | | | | | | Reviewers: vitalybuka, kubamracek Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D56138 llvm-svn: 350138
* [OPENMP][NVPTX]Added/fixed debugging messages, NFC.Alexey Bataev2018-12-283-3/+7
| | | | | | | | | | | | | | Summary: Added or fixed new/old debugging messages for the better diagnostics. Reviewers: gtbercea, kkwli0, grokos Reviewed By: grokos Subscribers: caomhin, guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D56102 llvm-svn: 350137
* Introduce `LocalAddressSpaceView::LoadWritable(...)` and make the ↵Dan Liew2018-12-282-13/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Load(...)` method return a const pointer. Summary: This is a follow-up to r346956 (https://reviews.llvm.org/D53975). The purpose of this change to allow implementers of the `AddressSpaceView` to be able to distinguish between when a caller wants read-only memory and when a caller wants writable memory. Being able distinguish these cases allows implementations to optimize for the different cases and also provides a way to workaround possible platform restrictions (e.g. the low level platform interface for reading out-of-process memory may place memory in read-only pages). For allocator enumeration in almost all cases read-only is sufficient so we make `Load(...)` take on this new requirement and introduce the `LoadWritable(...)` variants for cases where memory needs to be writable. The behaviour of `LoadWritable(...)` documented in comments are deliberately very restrictive so that it will be possible in the future to implement a simple write-cache (i.e. just a map from target address to a writable region of memory). These restrictions can be loosened in the future if necessary by implementing a more sophisticated write-cache. rdar://problem/45284065 Reviewers: kcc, cryptoad, eugenis, kubamracek, george.karpenkov Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D54879 llvm-svn: 350136
* [UnrollRuntime] NFC: Updated exiting tests and added more testsAnna Thomas2018-12-281-23/+145
| | | | | | | Added more tests for multiple exiting blocks to the LatchExit. Today these cases are not supported. Patch to follow soon. llvm-svn: 350135
* [X86] Directly emit X86ISD::PMULUDQ from the ReplaceNodeResults handling of ↵Craig Topper2018-12-283-156/+95
| | | | | | | | | | | | | | v2i8/v2i16/v2i32 multiply. Previously we emitted a multiply and some masking that was supposed to matched to PMULUDQ, but the masking could sometimes be removed before we got a chance to match it. So instead just emit the PMULUDQ directly. Remove the DAG combine that was added when the ReplaceNodeResults code was originally added. Add a new DAG combine to avoid regressions in shrink_vmul.ll Some of the shrink_vmul.ll test cases now pick PMULUDQ instead of PMADDWD/PMULLD, but I think this should be an improvement on most CPUs. I think all of this can go away if/when we switch to -x86-experimental-vector-widening-legalization llvm-svn: 350134
* [clang-tidy] Export the abseil duration inverse lookup function, NFCHyrum Wright2018-12-282-2/+7
| | | | | | This allows other tools to use this function. llvm-svn: 350133
* Speculative fix for xray assembler error on MachO since r349976Reid Kleckner2018-12-281-1/+1
| | | | | | | This .file directive wasn't doing anything on MachO, and now that's diagnosed as an error. llvm-svn: 350132
* [UnrollRuntime] NFC: Add comment and verify LCSSAAnna Thomas2018-12-282-7/+7
| | | | | | | Added -verify-loop-lcssa to test cases. Updated comments in ConnectProlog. llvm-svn: 350131
* [objc-gnustep2] Fix a bug in category generation.David Chisnall2018-12-282-6/+45
| | | | | | | | | We were not emitting a protocol definition while generating the category method list. This was fine in most cases, because something else in the library typically referenced any given protocol, but it caused linker failures if the category was the only reference to a given protocol. llvm-svn: 350130
* [OPENMP][NVPTX]Fixed initialization of the data-sharing interface.Alexey Bataev2018-12-281-6/+9
| | | | | | | | | | | | | | | | Summary: Avoid using of the atomic loop to wait for the completion of the data-sharing interface initialization, use __shfl_sync instead for the communication within the warp to signal other threads in the warp about completion of the initialization. Reviewers: gtbercea, kkwli0, grokos Subscribers: guansong, jfb, caomhin, openmp-commits Differential Revision: https://reviews.llvm.org/D56100 llvm-svn: 350129
* [OPENMP][NVPTX]Outline assert into noinline function, NFC.Alexey Bataev2018-12-281-8/+19
| | | | | | | | | | | | | | | | Summary: At high optimization level asserts lead to some unexpected results because of auto-inserted unreachable instructions. This outlining prevents some of such dangerous optimizations and leads to better stability. Reviewers: gtbercea, kkwli0, grokos Subscribers: guansong, caomhin, openmp-commits Differential Revision: https://reviews.llvm.org/D56101 llvm-svn: 350128
* [OPENMP]Fix processing of the clauses on target combined directives.Alexey Bataev2018-12-282-4/+28
| | | | | | | | For constants with the predefined data-sharing clauses we may had troubles with the target combined directives. It may cause compiler crash in some corner cases. llvm-svn: 350127
* [AArch64] Add command-line option for SBDiogo N. Sampaio2018-12-289-23/+26
| | | | | | | | | | | | | | | SB (Speculative Barrier) is only mandatory from 8.5 onwards but is optional from Armv8.0-A. This patch adds a command line option to enable SB, as it was previously only possible to enable by selecting -march=armv8.5-a. This patch also moves to FeatureSB the old FeatureSpecRestrict. Reviewers: pbarrio, olista01, t.p.northover, LukeCheeseman Differential Revision: https://reviews.llvm.org/D55921 llvm-svn: 350126
* [CodeView] Extend the `MemberAttributes` interface with the `isStatic` methodAleksandr Urakov2018-12-281-0/+5
| | | | | | | | | | | | | | Summary: This patch extends the MemberAttributes interface with the isStatic method. It is needed for D56126. Reviewers: zturner, rnk Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D56127 llvm-svn: 350125
* [Sanitizer] arc4random unit test missing case.David Carlier2018-12-281-0/+3
| | | | llvm-svn: 350124
* [Sanitizer] Intercept arc4random_buf / arc4random_addrandom on FreeBSD/NetBSDDavid Carlier2018-12-283-0/+89
| | | | | | | | | | | | | | | - Disabled on purpose on Android and Darwin platform (for now). - Darwin supports it, would need interception in its specific code before enabling it. - Linux does not support it but only via third party library. - Android supports it via bionic however it is known to have issue with older versions of the implementations. Can be enabled by an Android committer later on if necessary once there is more 'certainity'/been more tested. Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56125 llvm-svn: 350123
* Fix signed-unsigned comparisons in MinidumpParserTestPavel Labath2018-12-281-5/+5
| | | | llvm-svn: 350122
* Remove unused variable from ClangASTContextPavel Labath2018-12-281-3/+2
| | | | llvm-svn: 350121
* [AMDGPU][MC][DOC] Updated AMD GPU assembler description.Dmitry Preobrazhensky2018-12-288-2049/+2050
| | | | | | | | Minor bugfixing and improvements. See bug 36572: https://bugs.llvm.org/show_bug.cgi?id=36572 llvm-svn: 350120
* [NFC] Add failing test on LCSSA form preservation of LoopSimplifyCFGMax Kazantsev2018-12-281-0/+25
| | | | llvm-svn: 350119
* [PowerPC] handle ISD:TRUNCATE in BitPermutationSelectorHiroshi Inoue2018-12-282-8/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the last one in a series of patches to support better code generation for bitfield insert. BitPermutationSelector already support ISD::ZERO_EXTEND but not TRUNCATE. This patch adds support for ISD:TRUNCATE in BitPermutationSelector. For example of this test case, struct s64b { int a:4; int b:16; int c:24; }; void bitfieldinsert64b(struct s64b *p, unsigned char v) { p->b = v; } the selection DAG loos like: t14: i32,ch = load<(load 4 from %ir.0)> t0, t2, undef:i64 t18: i32 = and t14, Constant:i32<-1048561> t4: i64,ch = CopyFromReg t0, Register:i64 %1 t22: i64 = AssertZext t4, ValueType:ch:i8 t23: i32 = truncate t22 t16: i32 = shl nuw nsw t23, Constant:i32<4> t19: i32 = or t18, t16 t20: ch = store<(store 4 into %ir.0)> t14:1, t19, t2, undef:i64 By handling truncate in the BitPermutationSelector, we can use information from AssertZext when selecting t19 and skip the mask operation corresponding to t18. So the generated sequences with and without this patch are without this patch rlwinm 5, 5, 0, 28, 11 # corresponding to t18 rlwimi 5, 4, 4, 20, 27 with this patch rlwimi 5, 4, 4, 12, 27 Differential Revision: https://reviews.llvm.org/D49076 llvm-svn: 350118
* Temporarily disable term folding in LoopSimplifyCFG, add testsMax Kazantsev2018-12-282-1/+60
| | | | llvm-svn: 350117
* [LoopSimplifyCFG] Delete dead blocks in RPOMax Kazantsev2018-12-281-5/+8
| | | | | | | | | Deletion of dead blocks in arbitrary order may lead to failure of assertion in `DeleteDeadBlock` that requires that we have deleted all predecessors before we can delete the current block. We should instead delete them in RPO order. llvm-svn: 350116
* [PowerPC] Remove the implicit use of the register if it is replaced by ImmQingShan Zhang2018-12-283-6/+115
| | | | | | | | If we are changing the MI operand from Reg to Imm, we need also handle its implicit use if have. Differential Revision: https://reviews.llvm.org/D56078 llvm-svn: 350115
* [NFC] clang-format functions related to r350113Zi Xuan Wu2018-12-281-87/+146
| | | | llvm-svn: 350114
* [PowerPC] Fix assert from machine verify pass that atomic pseudo expanding ↵Zi Xuan Wu2018-12-285-53/+63
| | | | | | | | | | | | causes mismatched register class For atomic value operand which less than 4 bytes need to be masked. And the related operation to calculate the newvalue can be done in 32 bit gprc. So just use gprc for mask and value calculation. Differential Revision: https://reviews.llvm.org/D56077 llvm-svn: 350113
* Revert "[asan] Support running without /proc.", +1Evgeniy Stepanov2018-12-2815-84/+15
| | | | | | | | | Revert r350104 "[asan] Fix build on windows." Revert r350101 "[asan] Support running without /proc." These changes break Mac build, too. llvm-svn: 350112
* [PowerPC] fix register class after converting X-FORM instruction to D-FORM ↵Chen Zheng2018-12-282-9/+14
| | | | | | | | instruction Differential Revision: https://reviews.llvm.org/D55806 llvm-svn: 350111
* Fix a mistake in previousKamil Rytarowski2018-12-281-2/+2
| | | | | | Assign correct ioctl(2) operation number. llvm-svn: 350110
* [CallSite removal] Add and flesh out APIs on the new `CallBase` base class ↵Chandler Carruth2018-12-272-7/+172
| | | | | | | | | | | | | | | | | | | that previously were only available on the `CallSite` wrapper. Summary: This will make migrating code easier and generally seems like a good collection of API improvements. Some of these APIs seem like more consistent / better naming of existing ones. I've retained the old names for migration simplicit and am just adding the new ones in this commit. I'll try to garbage collect these once CallSite is gone. Subscribers: sanjoy, mcrosier, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D55638 llvm-svn: 350109
* [gn build] Add check-clang target and make it workNico Weber2018-12-275-21/+215
| | | | | | | | | | | | | | | With this, check-clang runs and passes all of clang's lit tests. It doesn't run any of its unit tests yet. Like with check-lld, running just ninja -C out/gn will build all prerequisites needed to run tests, but it won't run the tests (so that the build becomes clean after one build). Running ninja -C out/gn check-clang will build prerequisites if needed and run the tests. The check-clang target never becomes clean and runs tests every time. Differential Revision: https://reviews.llvm.org/D56095 llvm-svn: 350108
* Update NetBSD ioctl(2) entries with 8.99.28Kamil Rytarowski2018-12-273-1/+54
| | | | | | | | | Add SIOCSETHERCAP. Add commented out NVMM (NetBSD Virtual Machine Monitor) operations as this interface is still WIP and a subject to change. llvm-svn: 350107
* Enable asan_and_llvm_coverage_test.cc for NetBSDKamil Rytarowski2018-12-271-2/+0
| | | | | | LLVM profile is now enabled for this target. llvm-svn: 350106
* [ELF] A shared object is needed if any of its occurrences is neededFangrui Song2018-12-273-2/+20
| | | | | | | | | | | | | | | | | | | | | | | Summary: If a DSO appears more than once with and without --as-needed, ld.bfd and gold consider --no-as-needed to takes precedence over --as-needed. lld didn't and this patch makes it do so. This makes it a bit away from the position-dependent behavior (how different occurrences of the same DSO interact) and protects us from some mysterious runtime errors: if some interceptor libraries add their own --no-as-needed dependencies (e.g. librt.so), and the user application specifies -Wl,--as-needed -lrt , the absence of the DT_NEEDED entry would make dlsym(RTLD_NEXT, "clock_gettime") return NULL and would break at runtime. Reviewers: ruiu, espindola Reviewed By: ruiu Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D56089 llvm-svn: 350105
* [asan] Fix build on windows.Evgeniy Stepanov2018-12-271-1/+9
| | | | | | | | | | Reviewers: vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D56111 llvm-svn: 350104
* Enable posix regex interceptors on linux.Evgeniy Stepanov2018-12-274-2/+7
| | | | | | | | | | | | Summary: They happen to work out of the box. Reviewers: rtrieu, vitalybuka Subscribers: kubamracek, fedor.sergeev, krytarowski, llvm-commits Differential Revision: https://reviews.llvm.org/D56088 llvm-svn: 350103
* Reimplement Thread Static Data MSan routines with TLSKamil Rytarowski2018-12-271-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Thread Static Data cannot be used in early init on NetBSD and FreeBSD. Reuse the MSan TSD API for compatibility with existing code with an alternative implementation using Thread Local Storage. New version uses Thread Local Storage to store a pointer with thread specific data. The destructor from TSD has been replaced with a TLS destrucutor that is called upon thread exit. Reviewers: joerg, vitalybuka, jfb Reviewed By: vitalybuka Subscribers: emaste, jfb, llvm-commits, #sanitizers, mgorny Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55703 llvm-svn: 350102
* [asan] Support running without /proc.Evgeniy Stepanov2018-12-2715-15/+76
| | | | | | | | | | | | | | | | | | Summary: This patch lets ASan run when /proc is not accessible (ex. not mounted yet). It includes a special test-only flag that emulates this condition in an unpriviledged process. This only matters on Linux, where /proc is necessary to enumerate virtual memory mappings. Reviewers: pcc, vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D55874 llvm-svn: 350101
* getfsent, unit test.David Carlier2018-12-271-0/+36
| | | | llvm-svn: 350100
* [Sanitizer] Add fstab api to FreeBSD/LinuxDavid Carlier2018-12-276-0/+49
| | | | | | | | | | | | Interception of /etc/fstab function parsers. Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56099 llvm-svn: 350099
* [sanitizer] Avoid memset call in tsanJordan Rupprecht2018-12-271-1/+2
| | | | | | | | | | | | Summary: Assigning an array of bools to {false, false, false} can, in certain build configurations, lead to a memset call. Use internal_memset to avoid this. Reviewers: eugenis Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D56107 llvm-svn: 350098
* Adjust NetBSD/sha2.cc to be portable to more environmentsKamil Rytarowski2018-12-271-12/+12
| | | | | | | | | | | | | | | | Summary: By an accident part of the tests contained hardcoded checksums for external files that will differ between setups. Reviewers: mgorny Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D56104 llvm-svn: 350097
OpenPOWER on IntegriCloud