summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [PDB Docs] Delete * LINKER * Stream information.Zachary Turner2019-04-051-4/+0
| | | | | | | This is actually just a module debug info stream, so it should technically be covered by a discussion of the module list. llvm-svn: 357819
* [libc++][CMake] Make sure the benchmarks link against libc++abiLouis Dionne2019-04-051-1/+2
| | | | | | | | | | | | | | The refactoring in r357811 made it so that we didn't add the ABI library to the list of LIBCXX_LIBRARIES. As a result, benchmarks didn't link to the ABI library and were missing symbols. This broke the build bots. As a drive-by fix, we also provide the SHARED ABI library to the linker script instead of the STATIC ABI library. This couldn't be discovered on Apple platforms because libc++.dylib re-exports libc++abi.dylib symbols there. llvm-svn: 357818
* [CMake] Don't explicitly use LLVM_LIBRARY_DIR in standalone buildsAlex Langford2019-04-051-3/+0
| | | | | | | | | | | | | | | | | | | | | | | Summary: This line is unnecessary because add_llvm_executable will handle linking the correct LLVM libraries for you. LLDB standalone builds are totally fine without this. In the best case, having this line here is harmless. In the worst case it can cause link issues. If you build lldb-server for android using the standalone build, this line will cause LLVM_LIBRARY_DIR to be the first place you look for libraries. This is an issue because if you built libc++, it will try to link against that one instead of the one from the android NDK. Meanwhile, the LLVM libraries you're linking against were linked against the libc++ from the NDK. Ideally, we would take advantage of the AFTER option for link_directories(), but that was not available in LLDB's minimum supported version of CMake (CMake 3.4.3). Differential Revision: https://reviews.llvm.org/D60180 llvm-svn: 357817
* [InstCombine] add more tests for fmul+fdiv+sqrt; NFCSanjay Patel2019-04-051-2/+43
| | | | llvm-svn: 357816
* [globalisel] Support 3-type legalForCartesianProduct()Daniel Sanders2019-04-051-0/+8
| | | | llvm-svn: 357815
* Fix PR41395 - __cxa_vec_new may overflow in allocation size calculation.Eric Fiselier2019-04-052-13/+165
| | | | llvm-svn: 357814
* [Test] Remove no_debug_info_test decorator from Obj-C data formatters.Jonas Devlieghere2019-04-0511-11/+0
| | | | | | As discussed in https://reviews.llvm.org/D60300. llvm-svn: 357813
* [LLVM-C] Add bindings to insert basic blocksRobert Widmann2019-04-052-0/+32
| | | | | | | | | | | | | | | | | | | | Summary: Now that we can create standalone basic blocks, it's useful to be able to append them. Add bindings to - Insert a basic block after the current insertion block - Append a basic block to the end of a function's list of basic blocks Reviewers: whitequark, deadalnix, harlanhaskins Reviewed By: whitequark, harlanhaskins Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59658 llvm-svn: 357812
* [libc++] Localize CMake code only related to the shared libraryLouis Dionne2019-04-051-68/+64
| | | | | | | | | | | | | | | | | | Summary: There's a lot of CMake logic that's only relevant to the shared library, yet it was using a code path and setting variables that impact both the shared and the static libraries. This patch moves this logic so that it clearly only impacts the shared library. Reviewers: phosek, smeenai, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60276 llvm-svn: 357811
* [analyzer] NoStoreFuncVisitor: Suppress reports with no-store in system headers.Artem Dergachev2019-04-053-22/+88
| | | | | | | | | | | | | | | | | The idea behind this heuristic is that normally the visitor is there to inform the user that a certain function may fail to initialize a certain out-parameter. For system header functions this is usually dictated by the contract, and it's unlikely that the header function has accidentally forgot to put the value into the out-parameter; it's more likely that the user has intentionally skipped the error check. Warnings on skipped error checks are more like security warnings; they aren't necessarily useful for all users, and they should instead be introduced on a per-API basis. Differential Revision: https://reviews.llvm.org/D60107 llvm-svn: 357810
* [X86] Enable tail calls for CallingConv::SwiftFrancis Visoiu Mistrih2019-04-052-4/+16
| | | | | | It's currently only enabled on AArch64 (enabled in r281376). llvm-svn: 357809
* [X86] Preserve operand flag when expanding TCRETURNriFrancis Visoiu Mistrih2019-04-055-2/+31
| | | | | | | | | The expansion of TCRETURNri(64) would not keep operand flags like undef/renamable/etc. which can result in machine verifier issues. Also add plumbing to be able to use `-run-pass=x86-pseudo`. llvm-svn: 357808
* Use binary write mode in WriteToFile function to avoid appended \r ↵Vitaly Buka2019-04-053-1/+38
| | | | | | | | | | | | | | | | | | | | | characters on Windows Summary: When using libfuzzer on Windows, in the contents of a crash sample, bytes that can be mistaken for a \n are replaced by a \r\n sequence. As a consequence, crashes are not reproducible. This patch will open files in binary mode to fix this issue. The patch does not affect POSIX systems. Patch by tuktuk Reviewers: kcc, vitalybuka Reviewed By: vitalybuka Subscribers: dexonsmith, jdoerfert, llvm-commits, #sanitizers Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D60008 llvm-svn: 357807
* ELF: De-template ELFFileBase. NFCI.Peter Collingbourne2019-04-056-67/+70
| | | | | | Differential Revision: https://reviews.llvm.org/D60304 llvm-svn: 357806
* [AMDGPU] Add MachineDCE pass after RenameIndependentSubregsStanislav Mekhanoshin2019-04-058-4/+63
| | | | | | | | | | | | | | Detect dead lanes can create some dead defs. Then RenameIndependentSubregs will break a REG_SEQUENCE which may use these dead defs. At this point a dead instruction can be removed but we do not run a DCE anymore. MachineDCE was only running before live variable analysis. The patch adds a mean to preserve LiveIntervals and SlotIndexes in case it works past this. Differential Revision: https://reviews.llvm.org/D59626 llvm-svn: 357805
* Further refactor cxa_guard.cppEric Fiselier2019-04-051-144/+176
| | | | | | | | | | | | | | | | | | This patch is a part of a series of patches to cleanup our implementation of __cxa_acquire et al. No functionality change was intended. This patch does two primary things. It introduces the GuardObject class to abstract the reading and writing to the guard object. In future, it will be used to ensure atomic accesses are used when needed. It also introduces the GuardValue class used to represent values of the guard object. It is an abstraction to access and write to the various different bits of a guard. llvm-svn: 357804
* [clang-fuzzer] Include ExternalProject before using it.Matt Morehouse2019-04-051-0/+1
| | | | | | | Some versions of CMake require ExternalProject to be included before we can use ExternalProject_Add. llvm-svn: 357803
* [X86] Merge the different Jcc instructions for each condition code into ↵Craig Topper2019-04-05114-560/+515
| | | | | | | | | | | | | | | | | | | | | single instructions that store the condition code as an operand. Summary: This avoids needing an isel pattern for each condition code. And it removes translation switches for converting between Jcc instructions and condition codes. Now the printer, encoder and disassembler take care of converting the immediate. We use InstAliases to handle the assembly matching. But we print using the asm string in the instruction definition. The instruction itself is marked IsCodeGenOnly=1 to hide it from the assembly parser. Reviewers: spatel, lebedev.ri, courbet, gchatelet, RKSimon Reviewed By: RKSimon Subscribers: MatzeB, qcolombet, eraman, hiraditya, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60228 llvm-svn: 357802
* [X86] Merge the different SETcc instructions for each condition code into ↵Craig Topper2019-04-0529-416/+467
| | | | | | | | | | | | | | | | | | | | | single instructions that store the condition code as an operand. Summary: This avoids needing an isel pattern for each condition code. And it removes translation switches for converting between SETcc instructions and condition codes. Now the printer, encoder and disassembler take care of converting the immediate. We use InstAliases to handle the assembly matching. But we print using the asm string in the instruction definition. The instruction itself is marked IsCodeGenOnly=1 to hide it from the assembly parser. Reviewers: andreadb, courbet, RKSimon, spatel, lebedev.ri Reviewed By: andreadb Subscribers: hiraditya, lebedev.ri, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60138 llvm-svn: 357801
* [X86] Merge the different CMOV instructions for each condition code into ↵Craig Topper2019-04-0540-469/+531
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | single instructions that store the condition code as an immediate. Summary: Reorder the condition code enum to match their encodings. Move it to MC layer so it can be used by the scheduler models. This avoids needing an isel pattern for each condition code. And it removes translation switches for converting between CMOV instructions and condition codes. Now the printer, encoder and disassembler take care of converting the immediate. We use InstAliases to handle the assembly matching. But we print using the asm string in the instruction definition. The instruction itself is marked IsCodeGenOnly=1 to hide it from the assembly parser. This does complicate the scheduler models a little since we can't assign the A and BE instructions to a separate class now. I plan to make similar changes for SETcc and Jcc. Reviewers: RKSimon, spatel, lebedev.ri, andreadb, courbet Reviewed By: RKSimon Subscribers: gchatelet, hiraditya, kristina, lebedev.ri, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60041 llvm-svn: 357800
* Fix error in NamedDeclPrinterTestDavid Goldman2019-04-051-16/+20
| | | | | | | | Caused by D56924, shouldn't use raw string literals in macros. Differential Revision: https://reviews.llvm.org/D60326 llvm-svn: 357799
* [gn] Rebase paths in symlink_or_copy against root_build_dirPetr Hosek2019-04-051-2/+2
| | | | | | | | | | | We should be always rebasing paths against root_build_dir which is the directory where scripts are run from, not root_out_dir which is the current toolchain directory. The latter can result in invalid paths when the action is being used from a non-default toolchain. Differential Revision: https://reviews.llvm.org/D60330 llvm-svn: 357798
* [gn] Make -no-exceptions flag a configPetr Hosek2019-04-052-1/+5
| | | | | | | | | This allows it to be disabled for targets that need exceptions like libunwind, libc++abi and libc++. Differential Revision: https://reviews.llvm.org/D60328 llvm-svn: 357797
* [LCG] Add aliased functions as LCG rootsGuozhi Wei2019-04-052-0/+51
| | | | | | | | | Current LCG doesn't check aliased functions. So if an internal function has a public alias it will not be added to CG SCC, but it is still reachable from outside through the alias. So this patch adds aliased functions to SCC. Differential Revision: https://reviews.llvm.org/D59898 llvm-svn: 357795
* [libc++] Add XFAILs for istream tests that were added in r357775Louis Dionne2019-04-0521-0/+143
| | | | | | | | We fixed incorrect behavior of input streams in r357775 and tests were added accordingly. However, older versions of macOS don't have the change in the dylib yet, so the tests fail on those platforms. llvm-svn: 357794
* [docs] Fix rst title in clang langext docs. NFCI Kristina Brooks2019-04-051-1/+1
| | | | | | | | Fix an odd line in LanguageExtensions.rst which rendered incorrectly due to an underscore being mixed in with dashes. llvm-svn: 357793
* [AMDGPU] rename vi-insts into gfx8-instsStanislav Mekhanoshin2019-04-054-6/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D60293 llvm-svn: 357792
* [AMDGPU] predicate and feature refactoringStanislav Mekhanoshin2019-04-0518-196/+245
| | | | | | | | | We have done some predicate and feature refactoring lately but did not upstream it. This is to sync. Differential revision: https://reviews.llvm.org/D60292 llvm-svn: 357791
* Try to fix Sphinx bot.Zachary Turner2019-04-051-8/+6
| | | | llvm-svn: 357790
* lit: make rm python 3 friendly (NFC)Saleem Abdulrasool2019-04-052-6/+8
| | | | | | Add some alterations for python 3 compatibility. llvm-svn: 357789
* [PDB Docs] Finish documentation for PDB Info Stream.Zachary Turner2019-04-051-0/+74
| | | | | | | The information about the named stream map and feature codes was not present. This patch adds it. llvm-svn: 357788
* Add .noindex to the gitignoreJonas Devlieghere2019-04-051-0/+1
| | | | | | | | The .noindex suffix is used on macOS to prevent Spotlight from indexing its contents. These folders contain test output from dotest.py and should be ignored when dotest is run from the LLDB source directory. llvm-svn: 357787
* [testsuite] Split Objective-C data formatterJonas Devlieghere2019-04-0514-530/+584
| | | | | | | | | | | | | The testcase for objective-c data formatters is very big as it checks a bunch of stuff. This is annoying when using the lit test driver, because it prevents us from running the different cases in parallel. As a result, it's always one of the last few tests that complete. This patch splits the test into multiple files that share a common base class. This way lit can run the different tests in parallel. Differential revision: https://reviews.llvm.org/D60300 llvm-svn: 357786
* [PDB Docs] Add info about the hash adjustment buffer.Zachary Turner2019-04-054-8/+15
| | | | | | | | This necessitates adding a document describing the serialized hash table format. This document is currently empty, although it will be filled out in followup patches. llvm-svn: 357784
* gn build: Merge 357768 and 357770Nico Weber2019-04-052-0/+4
| | | | llvm-svn: 357783
* [InstCombine] add tests for fdiv+fmul; NFCSanjay Patel2019-04-051-0/+82
| | | | llvm-svn: 357782
* gn build: Merge r357719Nico Weber2019-04-051-2/+2
| | | | llvm-svn: 357781
* [InstCombine] add tests for sqrt+fdiv+fmul; NFCSanjay Patel2019-04-051-0/+43
| | | | | | | Examples based on recent llvm-dev thread. These are specific patterns of more general enhancements that would solve these. llvm-svn: 357780
* [CUDA][Windows] Last fix for the clang Bug 38811 "Clang fails to compile ↵Evgeny Mankov2019-04-053-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with CUDA-9.x on Windows" (https://bugs.llvm.org/show_bug.cgi?id=38811). [IMPORTANT] With that last fix, CUDA has just started being compiling by clang on Windows after nearly a year and two clang’s major releases (7 and 8). As long as the last LLVM release, in which clang was compiling CUDA on Windows successfully, was 6.0.1, this fix and two previous have to be included into upcoming 7.1.0 and 8.0.1 releases. [How to repro] clang++.exe -x cuda "c:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.0\0_Simple\simplePrintf\simplePrintf.cu" -I"c:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.0\common\inc" --cuda-gpu-arch=sm_50 --cuda-path="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0" -L"c:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64" -lcudart.lib -v [Output] In file included from C:\GIT\LLVM\trunk-for-submits\llvm-64-release-vs2017-15.9.9\dist\lib\clang\9.0.0\include\__clang_cuda_runtime_wrapper.h:327: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:390:11: error: no matching function for call to '__isinfl' return (__isinfl(a) != 0); ^~~~~~~~ C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:2662:14: note: candidate function not viable: call to __host__ function from __device__ function __func__(int __isinfl(long double a)) ^ In file included from <built-in>:1: In file included from C:\GIT\LLVM\trunk-for-submits\llvm-64-release-vs2017-15.9.9\dist\lib\clang\9.0.0\include\__clang_cuda_runtime_wrapper.h:327: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:438:11: error: no matching function for call to '__isnanl' return (__isnanl(a) != 0); ^~~~~~~~ C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:2672:14: note: candidate function not viable: call to __host__ function from __device__ function __func__(int __isnanl(long double a)) ^ In file included from <built-in>:1: In file included from C:\GIT\LLVM\trunk-for-submits\llvm-64-release-vs2017-15.9.9\dist\lib\clang\9.0.0\include\__clang_cuda_runtime_wrapper.h:327: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:486:11: error: no matching function for call to '__finitel' return (__finitel(a) != 0); ^~~~~~~~~ C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:2652:14: note: candidate function not viable: call to __host__ function from __device__ function __func__(int __finitel(long double a)) ^ 3 errors generated when compiling for sm_50. [Solution] Add missing long double device functions' declarations. Provide only declarations to prevent any use of long double on the device side, because CUDA does not support long double on the device side. [Testing] {Windows 10, Ubuntu 16.04.5}/{Visual C++ 2017 15.9.9, gcc+ 5.4.0}/CUDA {8.0, 9.0, 9.1, 9.2, 10.0, 10.1} Reviewed by: Artem Belevich Differential Revision: http://reviews.llvm.org/D60220 llvm-svn: 357779
* lit: support long paths on WindowsSaleem Abdulrasool2019-04-052-9/+64
| | | | | | | | Use ctypes to call into SHFileOperationW with the extended NT path to allow us to remove paths which exceed 261 characters on Windows. This functionality is exercised by swift's test suite. llvm-svn: 357778
* Add documentation for PDB TPI/IPI Stream.Zachary Turner2019-04-052-5/+311
| | | | llvm-svn: 357777
* [InstCombine] add test to show reassociation that creates a denormal ↵Sanjay Patel2019-04-051-0/+15
| | | | | | constant; NFC llvm-svn: 357776
* [libc++] Fix error flags and exceptions propagated from input stream operationsLouis Dionne2019-04-0542-533/+2480
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a re-application of r357533 and r357531. They had been reverted because we thought the commits broke the LLDB data formatters, but it turns out this was because only r357531 had been included in the CI run. Before this patch, we would only ever throw an exception if the badbit was set on the stream. The Standard is currently very unclear on how exceptions should be propagated and what error flags should be set by the input stream operations. This commit changes libc++ to behave under a different (but valid) interpretation of the Standard. This interpretation of the Standard matches what other implementations are doing. This effectively implements the wording in p1264r0. It hasn't been voted into the Standard yet, however there is wide agreement that the fix is correct and it's just a matter of time before the fix is standardized. PR21586 PR15949 rdar://problem/15347558 Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D49863 llvm-svn: 357775
* Revert "[llvm-readobj] Improve error message for --string-dump"Stephen Tozer2019-04-0516-34/+38
| | | | | | | | This reverts commit 681b0798dbbc6b3500c9930977ec8a274b142acb. Reverted due to causing build failures: llvm-svn: 357772 llvm-svn: 357774
* Change some dyn_cast to more apropriate isa. NFCFangrui Song2019-04-0510-13/+13
| | | | llvm-svn: 357773
* [llvm-readobj] Improve error message for --string-dumpStephen Tozer2019-04-0516-38/+34
| | | | | | | | | | | | | | | | Fixes bug 40630: https://bugs.llvm.org/show_bug.cgi?id=40630 This patch changes the error message when the section specified by --string-dump cannot be found by including the name of the section in the error message and changing the prefix text to not imply that the file itself was invalid. As part of this change some uses of std::error_code have been replaced with the llvm Error class to better encapsulate the error info (rather than passing File strings around), and the WithColor class replaces string literal error prefixes. Differential Revision: https://reviews.llvm.org/D59946 llvm-svn: 357772
* [format] Add correct punctuation to commentStephen Tozer2019-04-051-1/+1
| | | | | | | Test commit that adds a grammatically correct full stop to a single comment. llvm-svn: 357771
* [Tooling] add a Heuristic field indicating that a CompileCommand was guessed.Sam McCall2019-04-053-10/+36
| | | | | | | | | | | | | | | | | | | | Summary: Use cases: - a tool that dumps the heuristic used for each header in a project can be used to evaluate changes to the heuristic - we want to expose this information to users in clangd as it affects accuracy/reliability of editor features - express interpolation tests more directly Reviewers: ilya-biryukov, klimek Subscribers: ioeric, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60194 llvm-svn: 357770
* Add an option do not dump the generated object on diskGuillaume Chatelet2019-04-054-17/+43
| | | | | | | | | | | | Reviewers: courbet Subscribers: llvm-commits, bdb Tags: #llvm Differential Revision: https://reviews.llvm.org/D60317 llvm-svn: 357769
* [LibTooling] Add Transformer, a library for source-to-source transformations.Yitzhak Mandelbaum2019-04-055-0/+804
| | | | | | | | | | | | | | | | Summary: Adds a basic version of Transformer, a library supporting the concise specification of clang-based source-to-source transformations. A full discussion of the end goal can be found on the cfe-dev list with subject "[RFC] Easier source-to-source transformations with clang tooling". Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, ABataev, mgorny, jfb, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59376 llvm-svn: 357768
OpenPOWER on IntegriCloud