summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [InstSimplify] add more tests for FP undef; NFCSanjay Patel2018-03-081-0/+376
| | | | llvm-svn: 327012
* DWARFVerifier: Basic verification of .debug_namesPavel Labath2018-03-0810-6/+577
| | | | | | | | | | | | | | | | | Summary: This patch adds basic .debug_names verification capabilities to the DWARF verifier. Right now, it checks that the headers and abbreviation tables of the individual name indexes can be parsed correctly, it verifies the buckets table and the cross-checks the CU lists for consistency. I intend to add further checks in follow-up patches. Reviewers: JDevlieghere, aprantl, probinson, dblaikie Subscribers: vleschuk, echristo, clayborg, llvm-commits Differential Revision: https://reviews.llvm.org/D44211 llvm-svn: 327011
* [llvm-mca] Emit the 'Instruction Info' table before the resource pressure view.Andrea Di Biagio2018-03-086-75/+81
| | | | | | | In future, both the summary information and the 'instruction info' table should be moved into a separate "Summary" view. llvm-svn: 327010
* [clangd:vscode] Resolve symlinks for file paths from clangd.Eric Liu2018-03-081-5/+17
| | | | | | | | | | | | | | | | | | | | | Summary: For features like go-to-definition, clangd can point clients to symlink paths (e.g. in bazel execroot) which might not be desired if the symlink points to a file in the workspace. Clangd might not be able to build the file, and users might prefer to edit the file on the real path. This change converts file paths from clangd to real path (e.g. resolving symlinks). Long term, we might want to the symlink handling logic to clangd where clangd can better decide whether symlinks should be resolved according to e.g. compile commands. Reviewers: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D44158 llvm-svn: 327009
* [OPENMP] Emit sizes/init ptrs etc. data for task reductions beforeAlexey Bataev2018-03-083-10/+23
| | | | | | | | | | | using. We may emit the code in wrong order because of incorrect implementation of the runtime functions for task reductions. Threadprivate storages may be initialized after real initialization of the reduction items. Patch fixes this problem. llvm-svn: 327008
* [cmake] Append -Wl,-rpath-link conditionally to GNULDMichal Gorny2018-03-081-1/+2
| | | | | | | | | | | | | | | Append -Wl,-rpath-link conditionally to whether GNU ld.bfd is used rather than the Linux+!gold conditionals. Also move it out of 'else' branch of *BSD handling. This fixes build failures with ld.bfd on Gentoo/FreeBSD, and should cause no harm on other systems using ld.bfd. This patch improves the original logic by reusing results of linker detection introduced in r307852. Differential Revision: https://reviews.llvm.org/D43751 llvm-svn: 327007
* [ELF] - Fix crash relative to SHF_LINK_ORDER sections.George Rimar2018-03-086-14/+50
| | | | | | | | | | | | | | | | | Our code assumes all input sections in an output SHF_LINK_ORDER section has SHF_LINK_ORDER flag. We do not check that and that can cause a crash. That happens because we call std::stable_sort(Sections.begin(), Sections.end(), compareByFilePosition);, where compareByFilePosition predicate does not expect to see null when calls getLinkOrderDep. The same might happen when sections refer to non-regular sections. Test cases demonstrate the issues, patch fixes them. Differential revision: https://reviews.llvm.org/D44193 llvm-svn: 327006
* Implement LWG#2518 - Non-member swap for propagate_const should call member swapMarshall Clow2018-03-082-4/+3
| | | | llvm-svn: 327005
* [InstCombine, NewGVN] remove FP undef from testsSanjay Patel2018-03-082-3/+3
| | | | | | | | I'm trying to preserve the intent of these tests by using non-undef operands; if we fix FP undef folding these tests will not pass. llvm-svn: 327004
* [ELF] - Support "INSERT AFTER" statement.George Rimar2018-03-087-1/+87
| | | | | | | | | | | | | | | | | | | | This implements INSERT AFTER in a following way: During reading scripts it collects all insert statements. After we done and read all files it inserts statements into script commands list. With that: * Rest of code does know nothing about INSERT. * Approach is straightforward and have no visible limitations. * It is also easy to support INSERT BEFORE (was seen in clang code once). * Should work for PR35877 and similar cases. Cons: * It assumes we have "main" scripts that describes sections. Differential revision: https://reviews.llvm.org/D43468 llvm-svn: 327003
* [CMake] Add missing test dependencyDavid Zarzycki2018-03-082-1/+2
| | | | | | This makes 'ninja clean ; ninja check-all' work again. llvm-svn: 327002
* [COFF] Make the DOS stub a real DOS programHans Wennborg2018-03-082-8/+52
| | | | | | | | It only adds a few bytes and is nice for backward compatibility. Differential Revision: https://reviews.llvm.org/D44018 llvm-svn: 327001
* Use ellipsis ... to indicate omitted commandsEd Maste2018-03-081-2/+2
| | | | | | | | In an example like "clang -fxray-instrument .." the .. could be confused with a literal .. (parent directory), which is used in commands like "cmake -GNinja .." llvm-svn: 327000
* Add llvm-mca.rst to the table of contents in docs/CommandGuide.Andrea Di Biagio2018-03-081-0/+1
| | | | | | | This should fix the documentation error reported by builder llvm-sphinx-docs (build #16407) after r326998. llvm-svn: 326999
* [llvm-mca] LLVM Machine Code Analyzer.Andrea Di Biagio2018-03-0846-0/+6334
| | | | | | | | | | | | | | | | | | | | | | | | | | | llvm-mca is an LLVM based performance analysis tool that can be used to statically measure the performance of code, and to help triage potential problems with target scheduling models. llvm-mca uses information which is already available in LLVM (e.g. scheduling models) to statically measure the performance of machine code in a specific cpu. Performance is measured in terms of throughput as well as processor resource consumption. The tool currently works for processors with an out-of-order backend, for which there is a scheduling model available in LLVM. The main goal of this tool is not just to predict the performance of the code when run on the target, but also help with diagnosing potential performance issues. Given an assembly code sequence, llvm-mca estimates the IPC (instructions per cycle), as well as hardware resources pressure. The analysis and reporting style were mostly inspired by the IACA tool from Intel. This patch is related to the RFC on llvm-dev visible at this link: http://lists.llvm.org/pipermail/llvm-dev/2018-March/121490.html Differential Revision: https://reviews.llvm.org/D43951 llvm-svn: 326998
* [clang-format] Use NestedBlockIndent as a 0 column in formatted raw stringsKrasimir Georgiev2018-03-082-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This makes the formatter of raw string literals use NestedBlockIndent for determining the 0 column of the content inside. This makes the formatting use less horizonal space and fixes a case where two newlines before and after the raw string prefix were selected instead of a single newline after it: Before: ``` aaaa = ffff( R"pb( key: value)pb"); ``` After: ``` aaaa = ffff(R"pb( key: value)pb"); ``` Reviewers: djasper, sammccall Reviewed By: sammccall Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D44141 llvm-svn: 326996
* [DWARF] Don't attempt to parse line tables at invalid offsetsJames Henderson2018-03-086-28/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | Whilst working on improvements to the error handling of the debug line parsing code, I noticed that if an invalid offset were to be specified in a call to getOrParseLineTable(), an entry in the LineTableMap would still be created, even if the offset was not within the section range. The immediate parsing attempt afterwards would fail (it would end up getting a version of 0), and thereafter, any subsequent calls to getOrParseLineTable or getLineTable would return the default- constructed, invalid line table. In reality, we shouldn't even attempt to parse this table, and we should always return a nullptr from these two functions for this situation. I have tested this via a unit test, which required some new framework for unit testing debug line. My plan is to add quite a few more unit tests for the new error reporting mechanism that will follow shortly, hence the reason why the supporting code for the tests are written the way they are - I intend to extend the DwarfGenerator class to support generating debug line. At that point, I'll make sure that there are a few positive test cases for this and the parsing code too. Differential Revision: https://reviews.llvm.org/D44200 Reviewers: JDevlieghere, aprantl llvm-svn: 326995
* [dsymutil] Embed toolchain in dSYM bundleJonas Devlieghere2018-03-084-3/+22
| | | | | | | | | Allow us to embed the (Xcode) toolchain in the dSYM bundle's property list. Differential revision: https://reviews.llvm.org/D44151 llvm-svn: 326994
* [MCSchedule] Always generate processor resource names.Andrea Di Biagio2018-03-082-4/+2
| | | | | | | | | | | | With this patch, the tablegen 'SubtargetEmitter' always generates processor resource names. The impact of this patch on the code size of other llvm tools is small. I have observed an average increase of 0.03% in code size when doing a release build of LLVM (on windows, using MSVC) with all the default backends. This change is done in preparation for the upcoming llvm-mca patch. llvm-svn: 326993
* [X86] Change X86::PMULDQ/PMULUDQ opcodes to take vXi64 type as input instead ↵Craig Topper2018-03-0811-207/+168
| | | | | | | | | | | | of vXi32. This instruction can be thought of as reading either the even elements of a vXi32 input or the lower half of each element of a vXi64 input. We currently use the vXi32 interpretation, but vXi64 matches better with its broadcast behavior in EVEX. I'm looking at moving MULDQ/MULUDQ creation to a DAG combine so we can do it when AVX512DQ is enabled without having to go through Custom lowering. But in some of the test cases we failed to use a broadcast load due to the size difference. This should help with that. I'm also wondering if we can model these instructions in native IR and remove the intrinsics and I think using a vXi64 type will work better with that. llvm-svn: 326991
* Propagate DLLAttr to friend re-declarations of member functionsStephan Bergmann2018-03-082-0/+25
| | | | | | | | | | | ...that have already been constructed (e.g., in inner classes) while parsing the class definition. They would otherwise lack any DLLAttr inherited from the class, which are only set here (called from Sema::CheckCompletedClass) after the class definition has been parsed completely. Differential revision: https://reviews.llvm.org/D16632 llvm-svn: 326990
* [AMDGPU] Update AMDGOUUsage.rst descriptionsTony Tye2018-03-081-27/+32
| | | | | | | | | - Improve description of XNACK ELF flag. - Rename all uses of wave to wavefront to be consistent. Differential Revision: https://reviews.llvm.org/D43983 llvm-svn: 326989
* [CodeGen] Emit lifetime.ends in both EH and non-EH blocksGeorge Burgess IV2018-03-082-9/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this, we'd only emit lifetime.ends for these temps in non-exceptional paths. This potentially made our stack larger than it needed to be for any code that follows an EH cleanup. e.g. in ``` struct Foo { char cs[32]; }; void escape(void *); struct Bar { ~Bar() { char cs[64]; escape(cs); } }; Foo getFoo(); void baz() { Bar b; getFoo(); } ``` baz() would require 96 bytes of stack, since the temporary from getFoo() only had a lifetime.end on the non-exceptional path. This also makes us keep hold of the Value* returned by EmitLifetimeStart, so we don't have to remake it later. llvm-svn: 326988
* Build LLVMDemangle from build_symbolizer.shEugene Zemtsov2018-03-081-1/+1
| | | | | | Symbolizer now depends on internal implementation of itaniumDemangle. llvm-svn: 326987
* [WebAssembly] Add except_ref as a first-class typeHeejin Ahn2018-03-081-0/+2
| | | | | | | | | | | | | | Summary: Add except_ref as a first-class type, according to the [[https://github.com/WebAssembly/exception-handling/blob/master/proposals/Level-1.md | Level 1 exception handling proposal ]]. Companion to D43706. Reviewers: sbc100 Subscribers: jfb, dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D43707 llvm-svn: 326986
* [WebAssembly] Add except_ref as a first-class typeHeejin Ahn2018-03-0815-15/+97
| | | | | | | | | | | | Summary: Add except_ref as a first-class type, according to the [[https://github.com/WebAssembly/exception-handling/blob/master/proposals/Level-1.md | Level 1 exception handling proposal ]]. Reviewers: dschuff Subscribers: jfb, sbc100, llvm-commits Differential Revision: https://reviews.llvm.org/D43706 llvm-svn: 326985
* [WebAssembly] Add IntrNoReturn property to throw/rethrow intrinsicsHeejin Ahn2018-03-081-2/+6
| | | | | | | | | | Reviewers: dschuff Subscribers: jfb, sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D43740 llvm-svn: 326984
* Add Demangle lib into internalization listEugene Zemtsov2018-03-081-0/+1
| | | | | | Symbolizer now depends on internal implementation of itaniumDemangle. llvm-svn: 326983
* [analyzer] Correctly model iteration through "nil" objectsGeorge Karpenkov2018-03-083-39/+66
| | | | | | | | | | | | | | | | | | | | Previously, iteration through nil objects which resulted from objc-messages being set to nil were modeled incorrectly. There are a couple of notes about this patch: In principle, ExprEngineObjC might be left untouched IFF osx.loops checker is enabled. I however think that we should not do something completely incorrect depending on what checkers are left on. We should evaluate and potentially remove altogether the isConsumedExpr performance heuristic, as it seems very fragile. rdar://22205149 Differential Revision: https://reviews.llvm.org/D44178 llvm-svn: 326982
* Support resetting STATISTIC() values using llvm::ResetStatistics()Daniel Sanders2018-03-083-34/+129
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Most of the time, compiler statistics can be obtained using a process that performs a single compilation and terminates such as llc. However, this isn't always the case. JITs for example, perform multiple compilations over their lifetime and STATISTIC() will record cumulative values across all of them. Provide tools like this with the facilities needed to measure individual compilations by allowing them to reset the STATISTIC() values back to zero using llvm::ResetStatistics(). It's still the tools responsibility to ensure that they perform compilations in such a way that the results are meaningful to their intended use. Reviewers: qcolombet, rtereshin, bogner, aditya_nandakumar Reviewed By: bogner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44181 llvm-svn: 326981
* Fix an unused variable warning; NFCGeorge Burgess IV2018-03-081-1/+1
| | | | llvm-svn: 326980
* [Documentation] Fix Release notes problems introduced in r326889. Add ↵Eugene Zelenko2018-03-081-5/+7
| | | | | | highlighting. llvm-svn: 326979
* Add attributes and fix some keywords in llvm-mode.elFangrui Song2018-03-081-5/+23
| | | | | | | | | | | | Reviewers: rafael, echristo Reviewed By: echristo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44135 llvm-svn: 326978
* Return early. NFC.Rui Ueyama2018-03-081-0/+1
| | | | | | | | We don't need to handle an object file having more than one symbol table, so as soon as we find the first one, we can process it and then return from the function. llvm-svn: 326977
* [WebAssembly] Honor --allow-undefined even for explicit exportsSam Clegg2018-03-082-2/+5
| | | | | | | | | | | | | | | | When a symbol is exported via --export=foo but --allow-undefined is also specified, the symbol is now allowed to be undefined. Previously we were special casing such symbols. This combinations of behavior is exactly what emescripten requires. Although we are trying hard not to allow emscripten specific features in lld, this one makes sense. Enforce this behavior by added this case to test/wasm/undefined.ll. Differential Revision: https://reviews.llvm.org/D44237 llvm-svn: 326976
* Revert "[LTO] Support filtering by hotness threshold"Bob Haarman2018-03-088-65/+11
| | | | | | | | This reverts commit 1f3bd185c53beb6aa68446974b7e80837abd6ef0 (r326107) because it fails ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll. llvm-svn: 326975
* Revert "[Sema] Make getCurFunction() return null outside function parsing"Reid Kleckner2018-03-089-114/+100
| | | | | | | | | | This reverts r326965. It seems to have caused repeating test failures in clang/test/Sema/diagnose_if.c on some buildbots. I cannot reproduce the problem, and it's not immediately obvious what the problem is, so let's revert to green. llvm-svn: 326974
* When substituting previously-checked template arguments into a templateRichard Smith2018-03-085-18/+85
| | | | | | | | | | | | | template parameter that is an expanded parameter pack, only substitute into the current slice, not the entire pack. This reduces the checking of N template template arguments for an expanded parameter pack containing N parameters from quadratic time to linear time in the length of the pack. This is important because one (and possibly the only?) general technique for splitting a template parameter pack in linear time depends on doing this. llvm-svn: 326973
* Simplify LazyobjFile and readElfSymbols.Rui Ueyama2018-03-082-48/+35
| | | | | | | | | | addElfSymbols and readJustSymbolsFile still has duplicate code, but I didn't come up with a good idea to eliminate them. Since this patch is an improvement, I'm sending this for review. Differential Revision: https://reviews.llvm.org/D44187 llvm-svn: 326972
* [MS] Pass CVRU qualifiers properly in Itanium manglerReid Kleckner2018-03-082-1/+5
| | | | | | | | | We already have a mangling for the __unaligned qualifier, we just have to call Qualifiers::getFromCVRUMask instead of getFromCVRMask. PR36638 llvm-svn: 326971
* Reland "[DebugInfo] Support DWARF expressions in eh_frame"Rafael Auler2018-03-0814-389/+1011
| | | | | | | | | | Summary: Original change was D43313 (r326932) and reverted by r326953 because it broke an LLD test and a windows build. The LLD test was already fixed in lld commit r326944 (thanks maskray). This is the original change with the windows build fixed. llvm-svn: 326970
* [AArch64] Fix UB about shift amount exceeds data bit-widthWeiming Zhao2018-03-081-1/+1
| | | | | | | | | | | | | | | | Summary: Fixes an UB caught by sanitizer. The shift amount might be larger than 32 so the operand should be 1ULL. In this patch, we replace the original expression with existing API with uint64_t type. Reviewers: eli.friedman, rengolin Reviewed By: rengolin Subscribers: rengolin, javed.absar, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D44234 llvm-svn: 326969
* Fix a doc typo; NFCGeorge Burgess IV2018-03-081-1/+1
| | | | llvm-svn: 326968
* [X86] Fix some isel patterns that used aligned vector load instructions with ↵Craig Topper2018-03-083-88/+88
| | | | | | | | | | unaligned predicates. These patterns weren't checking the alignment of the load, but were using the aligned instructions. This will cause a GP fault if the data isn't aligned. I believe these were introduced in r312450. llvm-svn: 326967
* Delete code that is probably dead since r249303.Rafael Espindola2018-03-081-40/+5
| | | | | | | With r249303 the expression evaluation should expand variables that are not in sections (and so don't have an atom). llvm-svn: 326966
* [Sema] Make getCurFunction() return null outside function parsingReid Kleckner2018-03-089-100/+114
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this patch, Sema pre-allocated a FunctionScopeInfo and kept it in the first, always present element of the FunctionScopes stack. This meant that Sema::getCurFunction would return a pointer to this pre-allocated object when parsing code outside a function body. This is pretty much always a bug, so this patch moves the pre-allocated object into a separate unique_ptr. This should make bugs like PR36536 a lot more obvious. As you can see from this patch, there were a number of places that unconditionally assumed they were always called inside a function. However, there are also many places that null checked the result of getCurFunction(), so I think this is a reasonable direction. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D44039 llvm-svn: 326965
* Fix build broken by r326959Eugene Zemtsov2018-03-081-1/+1
| | | | | | Adding Demangle to link time dependencies of Symbolize llvm-svn: 326964
* [X86][SSE] LowerBUILD_VECTORAsVariablePermute - reorder permute types. NFCI.Simon Pilgrim2018-03-071-15/+15
| | | | | | | | Reorder into 128/256/512 bit vector size groupings. NFCI commit before some new features. llvm-svn: 326963
* [MS] Accept __unaligned as a qualifier on member function pointersReid Kleckner2018-03-072-1/+9
| | | | | | | | | | We need to treat __unaligned like the other 'cvr' qualifiers when it appears at the end of a function prototype. We weren't doing that in some tentative parsing. Fixes PR36638. llvm-svn: 326962
* Set dso_local on tls init functions.Rafael Espindola2018-03-072-1/+4
| | | | | | | We copy the visibility, so copying the dso_local flag seems the natural thing to do. llvm-svn: 326961
OpenPOWER on IntegriCloud