summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [compiler-rt] fuzzer-alignment-assumption.test: fixup the expected column numberRoman Lebedev2019-01-151-1/+1
| | | | llvm-svn: 351181
* [NFC] Decrease if nestMax Kazantsev2019-01-151-18/+14
| | | | llvm-svn: 351180
* [NFC] Move some functions to LoopUtilsMax Kazantsev2019-01-153-42/+59
| | | | llvm-svn: 351179
* [compiler-rt][UBSan] Sanitization for alignment assumptions.Roman Lebedev2019-01-1520-0/+449
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the compiler-rt part. The clang part is D54589. This is a second commit, the original one was r351106, which was mass-reverted in r351159 because 2 compiler-rt tests were failing. Now, i have fundamentally changed the testing approach: i malloc a few bytes, intentionally mis-align the pointer (increment it by one), and check that. Also, i have decreased the expected alignment. This hopefully should be enough to pacify all the bots. If not, i guess i might just drop the two 'bad' tests. Reviewers: filcab, vsk, #sanitizers, vitalybuka, rsmith, morehouse Reviewed By: morehouse Subscribers: rjmccall, krytarowski, rsmith, kcc, srhines, kubamracek, dberris, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54590 llvm-svn: 351178
* [clang][UBSan] Sanitization for alignment assumptions.Roman Lebedev2019-01-1519-26/+607
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: UB isn't nice. It's cool and powerful, but not nice. Having a way to detect it is nice though. [[ https://wg21.link/p1007r3 | P1007R3: std::assume_aligned ]] / http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1007r2.pdf says: ``` We propose to add this functionality via a library function instead of a core language attribute. ... If the pointer passed in is not aligned to at least N bytes, calling assume_aligned results in undefined behaviour. ``` This differential teaches clang to sanitize all the various variants of this assume-aligned attribute. Requires D54588 for LLVM IRBuilder changes. The compiler-rt part is D54590. This is a second commit, the original one was r351105, which was mass-reverted in r351159 because 2 compiler-rt tests were failing. Reviewers: ABataev, craig.topper, vsk, rsmith, rnk, #sanitizers, erichkeane, filcab, rjmccall Reviewed By: rjmccall Subscribers: chandlerc, ldionne, EricWF, mclow.lists, cfe-commits, bkramer Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54589 llvm-svn: 351177
* [llvm][IRBuilder] Introspection for CreateAlignmentAssumption*() functionsRoman Lebedev2019-01-151-7/+19
| | | | | | | | | | | | | | | | | | | | | | | Summary: Clang calls these functions to produce IR for assume-aligned attributes. I would like to teach UBSAN to verify these assumptions. For that, i need to access the final pointer on which the check is performed, and the actual `icmp` that does the check. The alternative to this would be to fully re-implement this in clang. This is a second commit, the original one was r351104, which was mass-reverted in r351159 because 2 compiler-rt tests were failing. Reviewers: spatel, dneilson, craig.topper, dblaikie, hfinkel Reviewed By: hfinkel Subscribers: hfinkel, llvm-commits Differential Revision: https://reviews.llvm.org/D54588 llvm-svn: 351176
* NFC: Move Decl node handling to TextNodeDumperStephen Kelly2019-01-153-68/+79
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56643 llvm-svn: 351175
* [llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbolsMartin Storsjo2019-01-153-2/+68
| | | | | | Differential Revision: https://reviews.llvm.org/D56481 llvm-svn: 351174
* [llvm-objcopy] [COFF] Remove pointless comment chars from .test files. NFC.Martin Storsjo2019-01-152-30/+30
| | | | llvm-svn: 351173
* [ASTDump] NFC: Move dump of type nodes to NodeDumperStephen Kelly2019-01-153-89/+185
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56642 llvm-svn: 351172
* [llvm-objdump] - Cleanup the code. NFCI.George Rimar2019-01-154-313/+285
| | | | | | | | | | | | | | | | | This is a cosmetic cleanup for the llvm-objdump code. This patch: * Renames things to match the official LLVM code style (lower case -> upper case). * Removes few obviously excessive variables. * Moves a few lines closer to the place of use, reorders the code a bit to simplify it, to avoid doing excessive returns and to avoid using 'else` after returns. I focused only on a llvm-objdump.h/llvm-objdump.cpp files. Few changes in the MachODump.cpp and COFFDump.cpp are a result of llvm-objdump.h modification. Differential revision: https://reviews.llvm.org/D56637 llvm-svn: 351171
* [clangd] Fix updated file detection logic in indexingKadir Cetinkaya2019-01-153-33/+110
| | | | | | | | | | | | | | | | | Summary: Files without any symbols were never marked as updated during indexing, which resulted in failure while writing shards for these files. This patch fixes the logic to mark files that are seen for the first time but don't contain any symbols as updated. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D56592 llvm-svn: 351170
* Explicitly set C++ standard for `Posix/no-fd.cc` ASan test.Dan Liew2019-01-151-1/+1
| | | | | | | | | | | | | | | | | Summary: The test uses `nullptr` which can break running the test if the compiler happens to be using something older than C++11 as the default language standard. Avoid this by explicitly setting the standard. rdar://problem/47253542 Reviewers: eugenis, yln, vitalybuka Subscribers: kubamracek, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D56667 llvm-svn: 351169
* gn build: Rename llvm_host_triple to llvm_current_triple and have it use ↵Peter Collingbourne2019-01-156-13/+29
| | | | | | | | | | | | | | | | | | current_{cpu,os}. This makes e.g. ToolChain::isCrossCompiling() in clang/lib/Driver/ToolChain.cpp return the correct result if the compiler was cross-compiled. This change also affects llvm_default_target_triple, so cross-compiled compilers default to targeting the cross-compilation target, which makes more sense than the host that the compiler was compiled on. This change will also be necessary in order for the correct triples to appear in generated lit files for non-native targets. Differential Revision: https://reviews.llvm.org/D56696 llvm-svn: 351168
* gn build: Make a couple of improvements to the unix toolchain.Peter Collingbourne2019-01-151-2/+12
| | | | | | | | | | Add an asm tool (will be required for building sanitizer_common on x64) and set a soname for DSOs so that anything that links against them gets the correct DT_NEEDED. Differential Revision: https://reviews.llvm.org/D56705 llvm-svn: 351167
* gn build: Switch to using current_os in lib/Support/BUILD.gn.Peter Collingbourne2019-01-151-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D56704 llvm-svn: 351166
* [X86] Upgrade some avx512bw shift intrinsics that were removed a while ago. NFCCraig Topper2019-01-154-50/+341
| | | | | | Masking was removed from these intrinsics and I guess we didn't update the tests then. llvm-svn: 351165
* [WebAssembly] Support multilibs for wasm32 and add a wasm OS that uses itDan Gohman2019-01-154-14/+82
| | | | | | | | | | | | This adds support for multilib paths for wasm32 targets, following [Debian's Multiarch conventions], and also adds an experimental OS name in order to test it. [Debian's Multiarch conventions]: https://wiki.debian.org/Multiarch/ Differential Revision: https://reviews.llvm.org/D56553 llvm-svn: 351164
* [WebAssembly] Support multilibs for wasm32 and add a wasm OS that uses itDan Gohman2019-01-153-1/+27
| | | | | | | | | | | | This adds support for multilib paths for wasm32 targets, following [Debian's Multiarch conventions], and also adds an experimental OS name in order to test it. [Debian's Multiarch conventions]: https://wiki.debian.org/Multiarch/ Differential Revision: https://reviews.llvm.org/D56553 llvm-svn: 351163
* [X86] Add test cases for D56695. NFCCraig Topper2019-01-154-2/+481
| | | | llvm-svn: 351162
* [X86] Switch the triple on avx2-intrinsics-x86.ll to be -unknown-unknown ↵Craig Topper2019-01-151-715/+715
| | | | | | | | | | instead of darwin so the constant pool entries will be filtered better by the script. Darwin uses LCPI instead of .LCPI so the filter doesn't work. This is silly, but it will help reduce some future some test diffs. llvm-svn: 351161
* [X86] Make _xgetbv/_xsetbv on non-windows platformsCraig Topper2019-01-159-16/+160
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch attempts to redo what was tried in r278783, but was reverted. These intrinsics should be available on non-windows platforms with "xsave" feature check. But on Windows platforms they shouldn't have feature check since that's how MSVC behaves. To accomplish this I've added a MS builtin with no feature check. And a normal gcc builtin with a feature check. When _MSC_VER is not defined _xgetbv/_xsetbv will be macros pointing to the gcc builtin name. I've moved the forward declarations from intrin.h to immintrin.h to match the MSDN documentation and used that as the header file for the MS builtin. I'm not super happy with this implementation, and I'm open to suggestions for better ways to do it. Reviewers: rnk, RKSimon, spatel Reviewed By: rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56686 llvm-svn: 351160
* Revert alignment assumptions changesVlad Tsyrklevich2019-01-1540-995/+33
| | | | | | | Revert r351104-6, r351109, r351110, r351119, r351134, and r351153. These changes fail on the sanitizer bots. llvm-svn: 351159
* [LLDB] Remove the unused variable oso_dwarf.David L. Jones2019-01-151-1/+0
| | | | | | Patch by Ali Tamur! (tamur@google.com) llvm-svn: 351158
* gn build: Split no-RTTI flag into a config.Peter Collingbourne2019-01-152-5/+10
| | | | | | | | | Some of the sanitizer runtime code needs to be built with RTTI; this allows that code to opt in to RTTI. Differential Revision: https://reviews.llvm.org/D56627 llvm-svn: 351155
* gn build: Stop defining LLVM_ON_UNIX globally.Peter Collingbourne2019-01-151-5/+0
| | | | | | | | This macro is already being defined in llvm-config.h. Differential Revision: https://reviews.llvm.org/D56626 llvm-svn: 351154
* Silence failing testsVlad Tsyrklevich2019-01-152-2/+2
| | | | | | | | | r351134 tried to disable these tests by using 'UNSUPPORTED: *' but '*' is not supported for UNSUPPORTED like it is for XFAIL. Update these tests to use XFAIL for now in order to silence x86_64-linux and x86_64-linux-android. llvm-svn: 351153
* [libFuzzer][MSVC] Use alternatename for ext functionsJonathan Metzman2019-01-153-57/+84
| | | | | | | | | | | | | | | | | Summary: Use alternatename for external functions only when using MSVC since Clang doesn't support it and MSVC doesn't support Clang's method (weak aliases). Reviewers: morehouse Reviewed By: morehouse Subscribers: rnk, thakis, mgorny Differential Revision: https://reviews.llvm.org/D56514 llvm-svn: 351152
* [WebAssembly] Expand SIMD shifts while V8's implementation disagreesThomas Lively2019-01-152-7/+61
| | | | | | | | | | | | | | | | Summary: V8 currently implements SIMD shifts as taking an immediate operation, which disagrees with the spec proposal and the toolchain implementation. As a stopgap measure to get things working, unroll all vector shifts. Since this is a temporary measure, there are no tests. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, dmgreen, llvm-commits Differential Revision: https://reviews.llvm.org/D56520 llvm-svn: 351151
* AMDGPU: Add a fast path for icmp.i1(src, false, NE)Marek Olsak2019-01-155-0/+226
| | | | | | | | | | | | | | | | | Summary: This allows moving the condition from the intrinsic to the standard ICmp opcode, so that LLVM can do simplifications on it. The icmp.i1 intrinsic is an identity for retrieving the SGPR mask. And we can also get the mask from and i1, or i1, xor i1. Reviewers: arsenm, nhaehnle Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D52060 llvm-svn: 351150
* [AArch64] Adjust the feature set for ExynosEvandro Menezes2019-01-152-0/+2
| | | | | | Enable the fusion of arithmetic and logic instructions for Exynos M4. llvm-svn: 351149
* [test] Fix logic error in <compare> tests; enable for MSVC Dev16Casey Carter2019-01-154-4/+5
| | | | | | Submitted upstream as https://reviews.llvm.org/D53763. llvm-svn: 351148
* [COFF, ARM64] Add __byteswap intrinsicsMandeep Singh Grang2019-01-152-6/+32
| | | | | | | | | | | | Reviewers: rnk, efriedma, ssijaric, TomTan, haripul Reviewed By: efriedma Subscribers: javed.absar, cfe-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D56685 llvm-svn: 351147
* [X86] Avoid clobbering ESP/RSP in the epilogue.Reid Kleckner2019-01-153-1/+22
| | | | | | | | | | | | | | | | | Summary: In r345197 ESP and RSP were added to GR32_TC/GR64_TC, allowing them to be used for tail calls, but this also caused `findDeadCallerSavedReg` to think they were acceptable targets for clobbering. Filter them out. Fixes PR40289. Patch by Geoffry Song! Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D56617 llvm-svn: 351146
* [CMake][Fuchsia] Synchronize first and second stage buildsPetr Hosek2019-01-152-28/+31
| | | | | | | | | | | This reorders options between the first and second stage builds to make them better lined up. The change also re-enables tests for first stage which is useful e.g. for cross-compiling when we cannot run tests for second stage directly (i.e. without emulation). Differential Revision: https://reviews.llvm.org/D56652 llvm-svn: 351145
* [AArch64] Fix typo (NFC)Evandro Menezes2019-01-151-1/+1
| | | | | | | Fix another typo, this time in the `RUN` line, which used a syntax not universally supported, in test case added by D56572. llvm-svn: 351144
* [AArch64] Fix typo (NFC)Evandro Menezes2019-01-151-22/+22
| | | | | | Fix typo in test case added by D56572 (rL351139). llvm-svn: 351143
* [EarlyIfConversion] Don't if-convert unconditional branches.Eli Friedman2019-01-152-0/+36
| | | | | | | | | | | | | A block ending in an unconditional branch can have two successors if one is a landing pad. In practice, I think this only has an effect on Windows because landing pads are never empty for Itanium unwinding. (Alternatively, I could add a check to AArch64InstrInfo::canInsertSelect, but this seems more obvious.) Differential Revision: https://reviews.llvm.org/D56468 llvm-svn: 351142
* [AArch64] Explicitly use v1i64 type for llvm.aarch64.neon.abs.i64 .Eli Friedman2019-01-152-5/+14
| | | | | | | | | | | | | | Otherwise, with D56544, the intrinsic will be expanded to an integer csel, which is probably not what the user expected. This matches the general convention of using "v1" types to represent scalar integer operations in vector registers. While I'm here, also add some error checking so we don't generate illegal ABS nodes. Differential Revision: https://reviews.llvm.org/D56616 llvm-svn: 351141
* Generalize the comparison test structure to support cross-type comparisons. ↵Marshall Clow2019-01-151-36/+36
| | | | | | NFC to the library llvm-svn: 351140
* [AArch64] Add new target feature to fuse arithmetic and logic operationsEvandro Menezes2019-01-144-7/+227
| | | | | | | | | This feature enables the fusion of some arithmetic and logic instructions together. Differential revision: https://reviews.llvm.org/D56572 llvm-svn: 351139
* [ORC] Move ORC Core symbol map and set types into their own header: CoreTypes.h.Lang Hames2019-01-145-347/+411
| | | | | | | This will allow other utilities (including a future RuntimeDyld replacement) to use these types without pulling in the major Core types (JITDylib, etc.). llvm-svn: 351138
* [Sema] Change std::sort to llvm::sortMandeep Singh Grang2019-01-141-3/+3
| | | | llvm-svn: 351137
* [X86] Fix unused variable warning in Release builds. NFC.Benjamin Kramer2019-01-141-2/+2
| | | | llvm-svn: 351136
* [COFF, ARM64] Add __nop intrinsicMandeep Singh Grang2019-01-142-0/+16
| | | | | | | | | | | | Reviewers: rnk, efriedma, TomTan, haripul, ssijaric Reviewed By: rnk, efriedma Subscribers: javed.absar, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D56671 llvm-svn: 351135
* [compiler-rt] UBSan: just completely disable two alignment-assumption tests ↵Roman Lebedev2019-01-142-8/+4
| | | | | | | | | | | | | for now. And they are faling on clang-cmake-armv7-full too. *ONLY* these two. I'm not sure what to make of it. Perhaps doing a malloc and checking that pointer will make them fail as expected? llvm-svn: 351134
* [SymbolFile] Remove SymbolContext parameter from FindTypes.Zachary Turner2019-01-1430-169/+111
| | | | | | | | | | | | | | This parameter was only ever used with the Module set, and since a SymbolFile is tied to a module, the parameter turns out to be entirely unnecessary. Furthermore, it doesn't make a lot of sense to ask a caller to ask SymbolFile which is tied to Module X to find types for Module Y, but that possibility was open with the previous interface. By removing this parameter from the API, it makes it harder to use incorrectly as well as easier for an implementor to understand what it needs to do. llvm-svn: 351133
* [SymbolFile] Remove the SymbolContext parameter from FindNamespace.Zachary Turner2019-01-1415-43/+20
| | | | | | | | | | | Every callsite was passing an empty SymbolContext, so this parameter had no effect. Inside the DWARF implementation of this function, however, there was one codepath that checked members of the SymbolContext. Since no call-sites actually ever used this functionality, it was essentially dead code, so I've deleted this code path as well. llvm-svn: 351132
* [SymbolFile] Rename ParseFunctionBlocks to ParseBlocksRecursive.Zachary Turner2019-01-1416-63/+63
| | | | | | | | | | | | | This method took a SymbolContext but only actually cared about the case where the m_function member was set. Furthermore, it was intended to be implemented to parse blocks recursively despite not documenting this in its name. So we change the name to indicate that it should be recursive, while also limiting the function parameter to be a Function&. This lets the caller know what is required to use it, as well as letting new implementers know what kind of inputs they need to be prepared to handle. llvm-svn: 351131
* Update GettingStarted guide to recommend that people use the newJames Y Knight2019-01-148-425/+201
| | | | | | | | | | | | | | | | | | | | | official Git repository. Remove the directions for using git-svn, and demote the prominence of the svn instructions. Also, fix a few other issues while I'm in there: * Mention LLVM_ENABLE_PROJECTS more. * Getting started doesn't need to mention test-suite, but should mention clang and the other projects. * Remove mentions of "configure", since that's long gone. I've also adjusted a few other mentions of svn to point to github, but have not done so comprehensively. Differential Revision: https://reviews.llvm.org/D56654 llvm-svn: 351130
OpenPOWER on IntegriCloud