summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [libFuzzer] implement print_pcs with trace-pc-guard. Change the ↵Kostya Serebryany2016-09-155-20/+68
| | | | | | trace-pc-guard heuristic for 8-bit counters to look more like in AFL (not that it's provable better, but the existin test preferes this heuristic) llvm-svn: 281577
* [sanitizer] Fix darwin Go tsan build by unifying r281567 and r281553.Ahmed Bougacha2016-09-153-10/+7
| | | | | | Avoid redefining the weak stub when building gotsan.cc llvm-svn: 281576
* Add a C++ unittest to test the fix for PR30213.Wei Mi2016-09-151-0/+65
| | | | | | | | | The test exercises the branch in scev expansion when the value in ValueOffsetPair is a ptr and the offset is not divisible by the elem type size of value. Differential Revision: https://reviews.llvm.org/D24088 llvm-svn: 281575
* [sanitizer] one more attempt to fix things with ↵Kostya Serebryany2016-09-151-1/+1
| | | | | | __sanitizer_print_memory_profile llvm-svn: 281574
* [doc] [CUDA] Add sections about STL support and differences between nvcc and ↵Justin Lebar2016-09-151-2/+336
| | | | | | clang to CompileCudaWithLLVM.rst. llvm-svn: 281573
* [LangRef] Add a clarifying example for undefSanjoy Das2016-09-151-0/+3
| | | | llvm-svn: 281570
* Make the keys enumerations for options and resolvers enum classes.Jim Ingham2016-09-154-13/+16
| | | | | | | This keeps them from conflicting with other symbols names, so it's worth their being less convenient to use for indexing. llvm-svn: 281569
* [libFuzzer] add 8-bit counters to trace-pc-guard handlerKostya Serebryany2016-09-155-13/+71
| | | | llvm-svn: 281568
* Define the weak symbol added by r281546 on mac.Ahmed Bougacha2016-09-151-0/+8
| | | | | | 'weak' doesn't behave like it does on linux. llvm-svn: 281567
* math: Implement tgammaAaron Watry2016-09-155-0/+77
| | | | | | Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 281566
* math: Implement lgammaAaron Watry2016-09-155-0/+49
| | | | | | | | Just use lgamma_r and ignore the value returned in the second argument Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 281565
* math: Implement lgamma_rAaron Watry2016-09-156-0/+518
| | | | | | | | | Ported from the amd-builtins branch, which is itself based on the Sun Microsystems implementation. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 281564
* Add ADDR_SPACE parameter to _CLC_V_V_VP_VECTORIZEAaron Watry2016-09-151-12/+27
| | | | | | | | | | | This macro is currently unused, but I plan to use it shortly. The previous form did casts of pointers without an address space, which doesn't work so well for CL 1.x. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 281563
* Revert r280944 - Added 'inline' attribute to basic_string's destructorEric Fiselier2016-09-141-1/+0
| | | | | | | | | | | | | | | | | | | | This patch causes a couple of issues: 1) It triggers http://llvm.org/PR30341. Although the bug is not truly a libc++ bug it breaks the LLVM build using libc++. Reverting this patch is only a temporary workaround until Clang is fixed. 2) It adds yet another ABI incompatibility when libc++.so is compiled with GCC. Specifically GCC doesn't ignore the _LIBCPP_INLINE_VISIBILITY on the out-of-line definition when compiling the dylib. This causes the externally instantiated ~basic_string symbol to have hidden visibility. This patch should be recommitted after addressing (1) and (2). (2) can be fixed by adding _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY which is defined as __attribute__((visibility("default"), always_inline)) as opposed to _LIBCPP_INLINE_VISIBILITY which makes the symbol hidden. llvm-svn: 281562
* [InstCombine] refactor eq/ne cases in foldICmpUsingKnownBits() ; NFCISanjay Patel2016-09-141-62/+27
| | | | | | The pattern matching and transforms are identical; the cmp predicate just changes. llvm-svn: 281561
* [pdb] Fix unit test compilation.Zachary Turner2016-09-142-15/+23
| | | | llvm-svn: 281560
* [InstCombine] add vector tests for foldICmpUsingKnownBits()Sanjay Patel2016-09-141-3/+97
| | | | llvm-svn: 281559
* Fix the Windows build after r281546Reid Kleckner2016-09-141-0/+3
| | | | llvm-svn: 281558
* Revert r281457 "Supports adding insertion around non-insertion replacements."Artem Belevich2016-09-143-116/+23
| | | | | | Commit was breaking our internal tests. llvm-svn: 281557
* [pdb] Get rid of Data and RawData in CVType.Zachary Turner2016-09-1418-129/+282
| | | | | | | | | | | The `CVType` had two redundant fields which were confusing and error-prone to fill out. By treating member records as a distinct type from leaf records, we are able to simplify this quite a bit. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D24432 llvm-svn: 281556
* [pdb] Write TPI hash values to the TPI stream.Zachary Turner2016-09-1421-172/+363
| | | | | | | | | | This completes being able to write all the interesting values of a PDB TPI stream. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D24370 llvm-svn: 281555
* [MC] Handle discardable COFF sections in assemblyReid Kleckner2016-09-144-13/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This fixes a dumpbin warning on objects produced by the MC assembler when starting from text. All .debug$S sections are supposed to be marked IMAGE_SCN_MEM_DISCARDABLE. The main, non-COMDAT .debug$S section had this set, but any comdat ones were not being marked discardable because there was no .section flag for it. This change does two things: - If the section name starts with .debug, implicitly mark the section as discardable. This means we do the same thing as gas on .s files with DWARF from GCC, which is important. - Adds the 'D' flag to the .section directive on COFF to explicitly say a section is discardable. We only emit this flag if the section name does not start with .debug. This allows the user to explicitly tweak their section flags without worrying about magic section names. The only thing you can't do in this scheme is to create a non-discardable section with a name starting with ".debug", but hopefully users don't need that. Reviewers: majnemer, rafael Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24582 llvm-svn: 281554
* [tsan] fix tsan build by adding a dummy __sanitizer_print_memory_profileKostya Serebryany2016-09-142-1/+3
| | | | llvm-svn: 281553
* [clang-cl] Accept the joined equals version of -resource-dir=Reid Kleckner2016-09-142-2/+3
| | | | | | | lib/Tooling injects this argument without regard for what driver syntax is in use. llvm-svn: 281550
* Fix auto-upgrade of TBAA tags in Bitcode ReaderMehdi Amini2016-09-147-36/+71
| | | | | | | | | | | | | | | | | | If TBAA is on an intrinsic and it gets upgraded, it'll delete the call instruction that we collected in a vector. Even if we were to use WeakVH, it'll drop the TBAA and we'll hit the assert on the upgrade path. r263673 gave a shot to make sure the TBAA upgrade happens before intrinsics upgrade, but failed to account for all cases. Instead of collecting instructions in a vector, this patch makes it just upgrade the TBAA on the fly, because metadata are always already loaded at this point. Differential Revision: https://reviews.llvm.org/D24533 llvm-svn: 281549
* [asan] fix windowsKostya Serebryany2016-09-141-0/+1
| | | | llvm-svn: 281548
* [asan] add heap_profile=1 to asan to periodically print the heap profile. So ↵Kostya Serebryany2016-09-144-1/+48
| | | | | | far this is a very basic heap-profile functionality llvm-svn: 281546
* More cleanup in `frame diagnose,` eliminating a bunch of messy cases.Sean Callanan2016-09-143-60/+33
| | | | llvm-svn: 281545
* [CUDA] Make __clang_cuda_cmath.h compatible with libc++.Justin Lebar2016-09-141-0/+31
| | | | | | | | | | | | | | | | Summary: We need to add a bunch more "using"s, which weren't necessary with libstdc++. Once this is in I can check in a test to the test-suite. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24588 llvm-svn: 281544
* [CUDA] Add test checking our ability to take a function pointer to a ↵Justin Lebar2016-09-141-0/+31
| | | | | | | | | | | | | | __global__ function on the host side. Summary: This functionality is used by Thrust. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24581 llvm-svn: 281543
* Fix indentation in codeview codeReid Kleckner2016-09-141-7/+7
| | | | llvm-svn: 281542
* Add some MS aliases for existing intrinsicsAlbert Gutowski2016-09-1414-112/+221
| | | | | | | | | | Reviewers: thakis, compnerd, majnemer, rsmith, rnk Subscribers: alexshap, cfe-commits Differential Revision: https://reviews.llvm.org/D24330 llvm-svn: 281540
* [LTO] Move tests from test/tools to test/LTO, as they're testing the API ↵Mehdi Amini2016-09-142-1/+1
| | | | | | functionalities (NFC) llvm-svn: 281539
* [LTO] Fix commons handlingMehdi Amini2016-09-145-8/+50
| | | | | | | | | | | | | | Previously the prevailing information was not honored, and commons symbols could override a strong definition. This patch fixes it and propose the following semantic for commons: the client should mark as prevailing the commons that it expects the LTO implementation to merge (i.e. take the maximum size and alignment). It implies that commons are allowed to have multiple prevailing definitions. Differential Revision: https://reviews.llvm.org/D24545 llvm-svn: 281538
* [ThinLTO] Add an option to llvm-lto to print some basic statistics for the indexMehdi Amini2016-09-142-0/+47
| | | | | | Differential Revision: https://reviews.llvm.org/D24290 llvm-svn: 281537
* Replaced two instances of std::function with auto.Sean Callanan2016-09-142-8/+6
| | | | | | | | Thanks to Zachary Turner for the suggestion. It's distasteful that the actual type of the lambda can't be spelled out, but it should be evident from the definition of the lambda body. llvm-svn: 281536
* Finish renaming remaining analyzeBranch functionsMatt Arsenault2016-09-1447-142/+140
| | | | llvm-svn: 281535
* Cleaned up a little bit of redundant code in 'frame diagnose.`Sean Callanan2016-09-141-11/+19
| | | | llvm-svn: 281534
* [asan] Disable 64-bit allocator on android/aarch64.Evgeniy Stepanov2016-09-141-3/+1
| | | | | | Makes the device strangely unstable, and fails one sanitizer_common test. llvm-svn: 281533
* [Stackmap] Added callsite counts to emitted function information.Sanjoy Das2016-09-1423-68/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: It was previously not possible for tools to use solely the stackmap information emitted to reconstruct the return addresses of callsites in the map, which is necessary to use the information to walk a stack. This patch adds per-function callsite counts when emitting the stackmap section in order to resolve the problem. Note that this slightly alters the stackmap format, so external tools parsing these maps will need to be updated. **Problem Details:** Records only store their offset from the beginning of the function they belong to. While these records and the functions are output in program order, it is not possible to determine where the end of one function's records are without the callsite count when processing the records to compute return addresses. Patch by Kavon Farvardin! Reviewers: atrick, ributzka, sanjoy Subscribers: nemanjai Differential Revision: https://reviews.llvm.org/D23487 llvm-svn: 281532
* [x86] regenerate checksSanjay Patel2016-09-141-33/+49
| | | | llvm-svn: 281531
* Revert "Do not warn about format strings that are indexed string literals."Stephen Hines2016-09-142-201/+18
| | | | | | | | | | | | Summary: This reverts r281527 because I messed up the attribution. Reviewers: srhines Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24579 llvm-svn: 281530
* [x86] regenerate checksSanjay Patel2016-09-141-223/+374
| | | | llvm-svn: 281529
* Use 'enum class' instead of 'enum' in NativeRegisterContextLinux_x86_x64.Valentina Giusti2016-09-142-36/+36
| | | | | | | | | | Reviewers: labath, clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24578 llvm-svn: 281528
* Do not warn about format strings that are indexed string literals.Stephen Hines2016-09-142-18/+201
| | | | | | | | | | | | | | | | | | | Summary: The warning for a format string not being a sting literal and therefore being potentially insecure is overly strict for indecies into sting literals. This fix checks if the index into the string literal is precomputable. If thats the case it will check if the suffix of that sting literal is a valid format string string literal. It will still issue the aforementioned warning for out of range indecies into the string literal. Reviewers: rsmith Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D23820 llvm-svn: 281527
* Revert "[ARM] Promote small global constants to constant pools"Evgeniy Stepanov2016-09-145-254/+1
| | | | | | | | Breaks Android tests by introducing text relocations to ARM binaries. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/25362/steps/run%20asan%20lit%20tests%20%5Barm%2Fbullhead-userdebug%2FMTC20F%5D/logs/stdio llvm-svn: 281526
* Correct assert text in DeclGroup::getSingleDecl()Kirill Bobyrev2016-09-141-1/+1
| | | | | | | | | | | | | | | Assert text for getSingleDecl() is inaccurate. Appears to have been copy pasted from getDeclGroup(). Patch by Ben Taylor! Reviewers: alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24518 llvm-svn: 281525
* [SE] Add CUDA platformJason Henline2016-09-1413-17/+596
| | | | | | | | | | | | | | | | | | | | Summary: Basic CUDA platform implementation and cmake infrastructure to control whether it's used. A few important TODOs will be handled in later patches: * Log some error messages that can't easily be returned as Errors. * Cache modules and kernels to prevent reloading them if someone tries to reload a kernel that's already loaded. * Tolerate shared memory arguments for kernel launches. Reviewers: jlebar Subscribers: beanz, mgorny, jprice, jlebar, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24538 llvm-svn: 281524
* [x86] regenerate checksSanjay Patel2016-09-141-72/+83
| | | | llvm-svn: 281523
* [compiler-rt] Set asan win 64-bits to use dynamic address for memory allocatorEtienne Bergeron2016-09-141-0/+4
| | | | | | | | | | | | | | | Summary: ASAN on Windows 64-bits should use a dynamic address instead of a fixed one. The asan-allocator code to support dynamic address is already landed. This patch is turning on the feature. Reviewers: rnk Subscribers: kubabrecka, dberris, llvm-commits, chrisha Differential Revision: https://reviews.llvm.org/D24575 llvm-svn: 281522
OpenPOWER on IntegriCloud