summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Driver] Fix incorrect GNU triplet for PowerPC on SUSE LinuxAaron Puchert2019-11-237-1/+18
| | | | | | | | | | | | | | | Summary: On SUSE distributions for 32-bit PowerPC, gcc is configured as a 64-bit compiler using the GNU triplet "powerpc64-suse-linux", but invoked with "-m32" by default. Thus, the correct GNU triplet for 32-bit PowerPC SUSE distributions is "powerpc64-suse-linux" and not "powerpc-suse-linux". Reviewers: jrtc27, nemanjai, glaubitz Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D55326
* Recommit "[DWARF] Support for loclist.dwo section in llvm and llvm-dwarfdump."Sourabh Singh Tomar2019-11-238-27/+90
| | | | | | | | | | | The original commit message follows. This patch adds support for debug_loclists.dwo section in llvm and llvm-dwarfdump. Also Fixes PR43622, PR43623. Reviewers: dblaikie, probinson, labath, aprantl, jini.susan.george Differential Revision: https://reviews.llvm.org/D69462
* Revert "[DWARF] Support for loclist.dwo section in llvm and llvm-dwarfdump."Sourabh Singh Tomar2019-11-237-89/+27
| | | | | | This reverts commit 81b0a3284af1dcef26e56b0de9fd74002083c471. Will Re-apply, with updated Differtial Revision, for automatic closure of Phabricator review.
* [RISCV] Add missing REQUIRES to clang testsDavid Zarzycki2019-11-232-2/+2
| | | | Fixes: e0f22fe04a5c9eb244ff0533549743b7deb03b99
* [X86][SSE] Split off generic isLaneCrossingShuffleMask helper. NFC.Simon Pilgrim2019-11-231-3/+14
| | | | Avoid MVT dependency which will be needed in a future patch.
* [PhiValues] Remove redundant map searchesEhud Katz2019-11-232-25/+39
| | | | | | | | | Remove redundant map searches. For example, every call to "operator[]" is actually translated to a "find" call, and 2 consecutive calls to the operator, without changing the map in-between, is just redundant, and inefficient. Differential Revision: https://reviews.llvm.org/D69337
* [WebAssembly] Use wasm-opt and LTO libraries when available.Dan Gohman2019-11-222-0/+42
| | | | | | | | | | When there's a wasm-opt in the PATH, run the it to optimize LLVM's output. This fixes PR43796. And, add an "llvm-lto" directory to the sysroot library search paths, so that sysroots can provide LTO-enabled system libraries. Differential Revision: https://reviews.llvm.org/D70500
* [DWARF] Support for loclist.dwo section in llvm and llvm-dwarfdump.Sourabh Singh Tomar2019-11-237-27/+89
| | | | | | | | | This patch adds support for debug_loclists.dwo section in llvm and llvm-dwarfdump. Also Fixes PR43622, PR43623. Reviewers: dblaikie, probinson, labath, aprantl, jini.susan.george https://reviews.llvm.org/D69462
* [ASTMatchers] work around a miscompile; "NFC"George Burgess IV2019-11-221-1/+2
| | | | | | | | I chatted with Reid offline, and we agreed that having a workaround here would be appropriate until PR43879 is resolved. The given transformation Works On My Machine(TM), and should hopefully hold more broadly, but my fingers are crossed nonetheless. :)
* [IR] Move global_objects and global_values out of line, NFCReid Kleckner2019-11-222-35/+20
| | | | | | | | | | | | | | | | | | | | | | | | | This saves 2.4% of CPU time compiling opt, according to ClangBuildAnalyzer. These helpers being inlined in the header was triggering the instantiation of concat_iterator in every TU using Module.h (~1118 TUs): https://reviews.llvm.org/P8171$35 **** Templates that took longest to instantiate: 76187 ms: llvm::AnalysisManager<llvm::Function>::getResult<llvm::TargetLibrary... (396 times, avg 192 ms) 73609 ms: llvm::AnalysisManager<llvm::Function>::getResultImpl (420 times, avg 175 ms) 49657 ms: llvm::detail::concat_range<llvm::GlobalValue, llvm::iterator_range<l... (1118 times, avg 44 ms) 49376 ms: llvm::detail::concat_range<const llvm::GlobalValue, llvm::iterator_r... (1118 times, avg 44 ms) 48167 ms: llvm::iterator_range<llvm::concat_iterator<llvm::GlobalValue, llvm::... (1118 times, avg 43 ms) 48125 ms: llvm::iterator_range<llvm::concat_iterator<const llvm::GlobalValue, ... (1118 times, avg 43 ms) 48061 ms: llvm::concat_iterator<llvm::GlobalValue, llvm::ilist_iterator<llvm::... (1118 times, avg 42 ms) 48014 ms: llvm::concat_iterator<const llvm::GlobalValue, llvm::ilist_iterator<... (1118 times, avg 42 ms) ... I haven't measured, but I don't think these helpers are performance critical. The iterator advance call can still be inlined, which is what matters for performance. Remove global_(objects|values)_(begin|end), since they were dead and would have to be out of line anyway.
* clang/Modules: Rename CompilerInstance::ModuleManager, NFCDuncan P. N. Exon Smith2019-11-227-65/+63
| | | | | | | | | | | | | | | | | | | Fix the confusing naming of `CompilerInstance::ModuleManager`. This is actually an instance of `ASTReader`, which contains an instance of `ModuleManager`. I have to assume there was a point in the past where they were just one class, but it's been pretty confusing for a while. I think it's time to fix it. The new name is `TheASTReader`; the annoying `The` prefix is so that we don't shadow the `ASTReader` class. I tried out `ASTRdr` but that seemed less clear, and this choice matches `ThePCHContainerOperations` just a couple of declarations below. Also rename `CompilerInstance::getModuleManager` and `CompilerInstance::createModuleManager` to `*ASTReader`, making some cases of `getModuleManager().getModuleManager()` a little more clear. https://reviews.llvm.org/D70583
* clang/Modules: Refactor CompilerInstance::loadModule, NFCDuncan P. N. Exon Smith2019-11-224-219/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the logic on CompilerInstance::loadModule and a couple of surrounding methods in order to clarify what's going on. - Rename ModuleLoader::loadModuleFromSource to compileModuleFromSource and fix its documentation, since it never loads a module. It just creates/compiles one. - Rename one of the overloads of compileModuleImpl to compileModule, making it more obvious which one calls the other. - Rename compileAndLoadModule to compileModuleAndReadAST. This clarifies the relationship between this helper and its caller, CompilerInstance::loadModule (the old name implied the opposite relationship). It also (correctly) indicates that more needs to be done to load the module than this function is responsible for. - Split findOrCompileModuleAndReadAST out of loadModule. Besides reducing nesting for this code thanks to early returns and the like, this refactor clarifies the logic in loadModule, particularly around calls to ModuleMap::cacheModuleLoad and ModuleMap::getCachedModuleLoad. findOrCompileModuleAndReadAST also breaks early if the initial ReadAST call returns Missing or OutOfDate, allowing the last ditch call to compileModuleAndReadAST to come at the end of the function body. - Additionally split out selectModuleSource, clarifying the logic due to early returns. - Add ModuleLoadResult::isNormal and OtherUncachedFailure, so that loadModule knows whether to cache the result. OtherUncachedFailure was added to keep this patch NFC, but there's a chance that these cases were uncached by accident, through copy/paste/modify failures. These should be audited as a follow-up (maybe we can eliminate this case). - Do *not* lift the setting of `ModuleLoadFailed = true` to loadModule because there isn't a clear pattern for when it's set. This should be reconsidered in a follow-up, in case it would be correct to set `ModuleLoadFailed` whenever no module is returned and the result is either Normal or OtherUncachedFailure. - Add some header documentation where it was missing, and fix it where it was wrong. This should have no functionality change. https://reviews.llvm.org/D70556
* gn build: Reland c52efdc5, "gn build: (manually) merge b5913e6d2f"Peter Collingbourne2019-11-221-1/+10
| | | | Because b5913e6d2f landed again as c54959c0.
* clang-tidy: don't use an absolute path in a testGeorge Burgess IV2019-11-221-1/+1
| | | | | | | `run_clang_tidy` takes a regular expression to match against compile_commands.json entries. If we pass "%t/test.cpp" and "%t" expands to anything that includes chars that a regex treats specially, like '+', this test starts failing.
* DebugInfo: Flag Dwarf Version metadata for merging during LTODavid Blaikie2019-11-222-7/+5
| | | | | | | | | | | | | | | | | | | | | | | When the Dwarf Version metadata was initially added (r184276) there was no support for Module::Max - though the comment suggested that was the desired behavior. The original behavior was Module::Warn which would warn and then pick whichever version came first - which is pretty arbitrary/luck-based if the consumer has some need for one version or the other. Now that the functionality's been added (r303590) this change updates the implementation to match the desired goal. The general logic here is - if you compile /some/ of your program with a more recent DWARF version, you must have a consumer that can handle it, so might as well use it for /everything/. The only place where this might fall down is if you have a need to use an old tool (supporting only the older DWARF version) for some subset of your program. In which case now it'll all be the higher version. That seems pretty narrow (& the inverse could happen too - you specifically /need/ the higher DWARF version for some extra expressivity, etc, in some part of the program)
* Remove needless Attr.h include from DeclCXX.h, NFCReid Kleckner2019-11-221-1/+0
| | | | | | This actually has no impact on the build, because TypeLoc.h includes Attr.h. However, DeclCXX.h has no need of it, so go ahead and remove it. The final step in this patch series is to split Attr.h and Attrs.h.
* Separate the MS inheritance model enum from the attribute, NFCReid Kleckner2019-11-2212-137/+149
| | | | | | This avoids the need to include Attr.h in DeclCXX.h for a four-value enum. Removing the include will be done separately, since it is large and risky change.
* [Remarks] Allow empty temporary remark filesFrancis Visoiu Mistrih2019-11-2210-1/+14
| | | | | | | When parsing bitstream remarks, allow external remark files to be empty, which means there are no remarks to be parsed. In the same way, dsymutil should not produce a remark file.
* Move vtordisp mode from Attr class to LangOptions.h, NFCReid Kleckner2019-11-2211-23/+25
| | | | | This removes one of the two uses of Attr.h in DeclCXX.h, reducing the need to include Attr.h as widely. LangOptions is already very popular.
* [Examples] Move structured-data unpacking out of the loop. (NFC)Jonas Devlieghere2019-11-221-1/+1
| | | | There's no need to repeat this work in the loop.
* [Examples] Add in_call_stack breakpoint function.Jonas Devlieghere2019-11-221-0/+24
| | | | | | | | | | | | | | | | | | | | | The in_call_stack Python script makes it possible to modify the last breakpoint to only stop if a given function is present in the call stack. It will check both the symbol name and the function name (coming from the debug info, in case the binary is stripped). To use this, you have to: 1. Import the script into lldb. (lldb) command script import in_call_stack.py 2. Set a breakpoint and use the in_call_stack alias. (lldb) b foo (lldb) in_call_stack bar Note that this alias operates on the last set breakpoint. You can re-run the in_call_stack command to modify the condition.
* [Driver] Make -static-libgcc imply static libunwindJosh Kunz2019-11-222-2/+13
| | | | | | | | | | | | | | | | | | In the GNU toolchain, `-static-libgcc` implies that the unwindlib will be linked statically. However, when `--unwindlib=libunwind`, this flag is ignored, and a bare `-lunwind` is added to the linker args. Unfortunately, this means that if both `libunwind.so`, and `libunwind.a` are present in the library path, `libunwind.so` will be chosen in all cases where `-static` is not set. This change makes `-static-libgcc` affect the `-l` flag produced by `--unwindlib=libunwind`. After this patch, providing `-static-libgcc --unwindlib=libunwind` will cause the driver to explicitly emit `-l:libunwind.a` to statically link libunwind. For all other cases it will emit `-l:libunwind.so` matching current behavior with a more explicit link line. https://reviews.llvm.org/D70416
* [MC] Reorder MCInst fields to make sizeof(MCInst) smallerFangrui Song2019-11-221-2/+3
| | | | sizeof(MCInst) is decreased from 168 to 160 on 64-bit systems.
* [MCA] Fix test cases (NFC)Evandro Menezes2019-11-2210-30/+30
| | | | Fix the test cases for Exynos M5 that break under Darwin.
* gn build: Merge 64ada7accbcLLVM GN Syncbot2019-11-221-0/+2
|
* Remove extraneous log enabling.Jason Molenda2019-11-221-1/+0
|
* [TableGen] Add backend to generate command guide for tools using libOption.Jonas Devlieghere2019-11-227-72/+198
| | | | | | | | | | | | For lldb and dsymutil, the command guide is essentially a copy of its help output generated by libOption. Making sure the two stay in sync is tedious and error prone. Given that we already generate the help from a tablegen file, we might as well generate the RST as well. This adds a tablegen backend for generating Sphinx/RST command guides from the tablegen file. Differential revision: https://reviews.llvm.org/D70610
* Reland "[CMake] Support installation of InstrProfData.inc"Petr Hosek2019-11-2211-14/+34
| | | | | | | | | | | This header fragment is useful on its own for any consumer that wants to use custom instruction profile runtime with the LLVM instrumentation. The concrete use case is in Fuchsia's kernel where we want to use instruction profile instrumentation, but we cannot use the compiler-rt runtime because it's not designed for use in the kernel environment. This change allows installing this header as part of compiler-rt. Differential Revision: https://reviews.llvm.org/D64532
* gn build: Merge ae8a8c2db6cLLVM GN Syncbot2019-11-222-0/+2
|
* Revert "[Sema] Use the canonical type in function isVector"Akira Hatanaka2019-11-222-8/+1
| | | | | This reverts commit a6150b48cea00ab31e9335cc73770327acc4cb3a. The commit broke a few neon CodeGen tests.
* [Diagnostics] Put "deprecated copy" warnings into -Wdeprecated-copyDávid Bolvanský2019-11-224-6/+39
| | | | | | | | | | | | | | | | | Summary: GCC 9 added -Wdeprecated-copy (as part of -Wextra). This diagnostic is already implemented in Clang too, just hidden under -Wdeprecated (not on by default). This patch adds -Wdeprecated-copy and makes it compatible with GCC 9+. This diagnostic is heavily tested in deprecated.cpp, so I added simple tests just to check we warn when new flag/-Wextra is enabled. Reviewers: rsmith, dblaikie Reviewed By: dblaikie Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70342
* [InstCombine] Fix call guard difference with dbgDavide Italiano2019-11-222-4/+5
| | | | | | Patch by Chris Ye! Differential Revision: https://reviews.llvm.org/D68004
* [CodeMoverUtils] Added an API to check if an instruction can be safelyTsang Whitney W.H2019-11-227-0/+412
| | | | | | | | | | | | | | | | | | | moved before another instruction. Summary:Added an API to check if an instruction can be safely moved before another instruction. In future PRs, we will like to add support of moving instructions between blocks that are not control flow equivalent, and add other APIs to enhance usability, e.g. moving basic blocks, moving list of instructions... Loop Fusion will be its first user. When there is intervening code in between two loops, fusion is currently unable to fuse them. Loop Fusion can use this utility to check if the intervening code can be safely moved before or after the two loops, and move them, then it can successfully fuse them. Reviewer:kbarton,jdoerfert,Meinersbur,bmahjour,etiotto Reviewed By:bmahjour Subscribers:mgorny,hiraditya,llvm-commits Tag:LLVM Differential Revision:https://reviews.llvm.org/D70049
* [AArch64] Add the pipeline model for Exynos M5Evandro Menezes2019-11-2230-35/+3349
| | | | Add the scheduling and cost models for Exynos M5.
* [libc] Add a TableGen based header generator.Siva Chandra Reddy2019-11-2224-262/+1107
| | | | | | | | | | | | | | | Summary: * The Python header generator has been removed. * Docs giving a highlevel overview of the header gen scheme have been added. Reviewers: phosek, abrachet Subscribers: mgorny, MaskRay, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D70197
* [Sema] Use the canonical type in function isVectorAkira Hatanaka2019-11-222-1/+8
| | | | | | | This fixes an assertion in Sema::CreateBuiltinBinOp that fails when one of the vector operand's element type is a typedef of __fp16. rdar://problem/55983556
* Fix typo to separate "-x" from warning flag.Bill Wendling2019-11-221-1/+1
|
* Don't report "main" as missing a prototype in freestanding modeBill Wendling2019-11-222-2/+10
| | | | | | | | | | | | | | | | | Summary: A user may want to use freestanding mode with the standard "main" entry point. It's not useful to warn about a missing prototype as it's not typical to have a prototype for "main". Reviewers: efriedma, aaron.ballman Reviewed By: aaron.ballman Subscribers: aaron.ballman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70588
* [OPENMP] [DOCS] correct status for use_device_addr clauseKelvin Li2019-11-221-1/+1
| | | | | | The status of the use_device_addr clause feature is changed from 'done' to 'worked on`. Differential Revision: https://reviews.llvm.org/D70608
* [RISCV] Use compiler-rt if no GCC installation detectedEdward Jones2019-11-226-40/+112
| | | | | | | | If a GCC installation is not detected, then this attempts to use compiler-rt and the compiler-rt crtbegin/crtend implementations as a fallback. Differential Revision: https://reviews.llvm.org/D68407
* Revert "[CMake] Support installation of InstrProfData.inc"Petr Hosek2019-11-228-25/+13
| | | | | This reverts commit f11bc1776fd2815b60e0b1ed97be00b517348162 since it's failing to build on some bots.
* [CMake] Support installation of InstrProfData.incPetr Hosek2019-11-228-13/+25
| | | | | | | | | | | This header fragment is useful on its own for any consumer that wants to use custom instruction profile runtime with the LLVM instrumentation. The concrete use case is in Fuchsia's kernel where we want to use instruction profile instrumentation, but we cannot use the compiler-rt runtime because it's not designed for use in the kernel environment. This change allows installing this header as part of compiler-rt. Differential Revision: https://reviews.llvm.org/D64532
* [DWARF] Handle call sites with indirect call targetsVedant Kumar2019-11-2210-99/+257
| | | | | | | | | | Split CallEdge into DirectCallEdge and IndirectCallEdge. Teach DWARFExpression how to evaluate entry values in cases where the current activation was created by an indirect call. rdar://57094085 Differential Revision: https://reviews.llvm.org/D70100
* Slightly speculative buildbot fix for issue reported in 8293f74 commit threadPhilip Reames2019-11-221-1/+4
|
* [clang-include-fixer] Suppress cmd prompt from Vim on WindowsReid Kleckner2019-11-221-1/+8
| | | | | | | | Copied from the clang-format.py editor integration. Reviewers: bkramer Differential Revision: https://reviews.llvm.org/D70518
* [APFloat] Enlarge ExponentType to 32bit integerEhud Katz2019-11-222-16/+118
| | | | | | | | | | | | Enlarge the size of ExponentType from 16bit integer to 32bit. This is required to prevent exponent overflow/underflow. Note that IEEEFloat size and alignment don't change in 64bit or 32bit compilation targets (and in turn, neither does APFloat). Fixes PR34851. Differential Revision: https://reviews.llvm.org/D69771
* Reinstate MSan suppression of PR24578.Evgenii Stepanov2019-11-223-2/+8
| | | | | | | | | | | | | | | | | | | Summary: Revert "Rollback of commit "Repress sanitization on User dtor."" There is no point in keeping an active MSan error in the codebase. PR24578 tracks the actual UB in LLVM code; this change enables testing of LLVM with MSAN + -fsanitize-memory-use-after-dtor. This reverts commit 21c1bc46aee2b69c2c48db8e961f0ce8394f21e1. Reviewers: vitalybuka Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70611
* Don't forward __pthread_mutex_* interceptors to pthread_mutex_* versionVitaly Buka2019-11-221-2/+18
| | | | | | | | | | | | | | | Summary: Allows to use rr with asan Fixes PR41095 Reviewers: eugenis Subscribers: jfb, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D70581
* [APFloat] Fix subtraction of subnormal numbersEhud Katz2019-11-222-7/+13
| | | | | | | | Fix incorrect determination of the bigger number out of the two subtracted, while subnormal numbers are involved. Fixes PR44010. Differential Revision: https://reviews.llvm.org/D69772
* [lit] Attempt to print test summary on CTRL+CJulian Lettner2019-11-223-20/+20
|
OpenPOWER on IntegriCloud