summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [ms] Emit vtordisp initializers in a deterministic order.Nico Weber2018-03-071-5/+6
| | | | | | | | | | No effective behavior change, just for cleanliness. Analysis and typing by me, actual patch mostly by Reid. Fixes PR36159. https://reviews.llvm.org/D44223 llvm-svn: 326960
* Use itaniumDemangle in llvm-symbolizerEugene Zemtsov2018-03-072-9/+5
| | | | | | | | | Currently on Windows (_MSC_VER) LLVMSymbolizer supports only Microsoft mangling. This fix just explicitly uses itaniumDemangle when mangled name starts with _Z. Differential Revision: https://reviews.llvm.org/D44192 llvm-svn: 326959
* Include <system_error> since we use it. Thanks to Andrey Maksimov for the catch.Marshall Clow2018-03-071-0/+1
| | | | llvm-svn: 326958
* Avoid including ScopeInfo.h from Sema.hReid Kleckner2018-03-0712-173/+174
| | | | | | | | | | | | | | | | | Summary: This provides no measurable build speedup, but it reinstates an optimization from r112038 that was lost in r179618. It requires moving CapturedScopeInfo::Capture out to clang::sema, which might be too general since we have plenty of other Capture records in BlockDecl and other AST nodes. Reviewers: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D44221 llvm-svn: 326957
* [TTI] add explanatory comments for getArithmeticInstrCost; NFCSanjay Patel2018-03-071-4/+14
| | | | llvm-svn: 326956
* [AArch64] Adjust the cost of integer vector divisionEvandro Menezes2018-03-072-22/+76
| | | | | | | | | | Since there is no instruction for integer vector division, factor in the cost of singling out each element to be used with the scalar division instruction. Differential revision: https://reviews.llvm.org/D43974 llvm-svn: 326955
* [Documentation] Fix Clang-tidy checks list broken in r326909.Eugene Zelenko2018-03-071-1/+1
| | | | llvm-svn: 326954
* Revert r326932: [DebugInfo] Support DWARF expressions in eh_frameRui Ueyama2018-03-0714-1011/+389
| | | | | | This reverts commit rr326932 because it broke lld/test/ELF/eh-frame-hdr-augmentation.s. llvm-svn: 326953
* [analyzer] [PointerArithChecker] do not warn on indexes into vector typesGeorge Karpenkov2018-03-072-0/+10
| | | | | | | | rdar://35041502 Differential Revision: https://reviews.llvm.org/D44172 llvm-svn: 326952
* [analyzer] Don't crash with assertion failure on structured bindingsGeorge Karpenkov2018-03-072-1/+16
| | | | | | | | | | | | Proper modeling still remains to be done. Note that BindingDecl#getHoldingVar() is almost always null, and this should probably be handled by dealing with DecompositionDecl beforehand. rdar://36852163 Differential Revision: https://reviews.llvm.org/D44183 llvm-svn: 326951
* [OpenMP] Remove implicit data sharing using device shared memory from ↵Gheorghe-Teodor Bercea2018-03-076-65/+1
| | | | | | | | | | | | | | | | | | | | libomptarget Summary: This patch reverts the changes to libomptarget that were coupled with the changes to Clang code gen for data sharing using shared memory. A similar patch exists for Clang: D43625 Shared memory is meant to be used as an optimization on top of a more general scheme. So far we didn't have a global memory implementation ready so shared memory was a solution which applied to the current level of OpenMP complexity supported by trunk on GPU devices (due to the missing NVPTX backend patch this functionality has never been exercised). Now that we have a global memory solution this patch is "in the way" and needs to be removed (for now). This patch (or an equivalent version of it) will be put out for review once the global memory scheme is in place. Reviewers: ABataev, grokos, carlo.bertolli, caomhin Reviewed By: grokos Subscribers: Hahnfeld, guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D43626 llvm-svn: 326950
OpenPOWER on IntegriCloud