- May 29, 2020
-
-
Igor Kudrin authored
When a SHT_GROUP section is removed, but other sections of the group are kept, the SHF_GROUP flag of these sections should be dropped, otherwise the resulting ELF file will be malformed. Differential Revision: https://reviews.llvm.org/D80511
-
Simon Pilgrim authored
Only TextStubCommon.cpp actually uses StringSwitch
-
Simon Pilgrim authored
-
Sanjay Patel authored
-
Dmitri Gribenko authored
Summary: Declaring these helpers in the ast_matcher namespace in the clangAST unit test seems inappropriate -- neither these helpers, nor clangAST have anything to do with AST matchers. Therefore, I moved these helpers to the clang namespace. Declaring another typedef called "ArgVector" is not a good idea -- we already have both "ArgVector", "ArgsVector", and "ArgList". I expanded it into the underlying type. Declaring another enum called "Language" is not a good idea because we arleady have the "clang::Language" enum. I renamed it to "TestLanguage". Similarly, I renamed "getBasicRunOptionsForLanguage" to "getCommandLineArgsForTesting" to explain the semantics better (what are "run options"?) and not repeat types in the function name ("ForLanguage"). Reviewers: shafik, rengolin, sammccall Reviewed By: sammccall Subscribers: gribozavr2, sammccall, martong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80786 -
Mateusz Mikuła authored
Differential Revision: https://reviews.llvm.org/D79995
-
Martin Storsjö authored
These are mapped in MachO::getMachOArchName already, but were missing in ToolChain::getDefaultUniversalArchName. Having these reverse mapped here fixes weird inconsistencies like -dumpmachine showing a target triple like "aarch64-apple-darwin", while "clang -target aarch64-apple-darwin" didn't use to work (ended up mapped as unknown-apple-ios). Differential Revision: https://reviews.llvm.org/D79117
-
Florian Hahn authored
Currently combineInsertEltToShuffle turns insert_vector_elt into a vector_shuffle, even if the inserted element is a vector with a single element. In this case, it should be unlikely that the additional shuffle would be more efficient than a insert_vector_elt. Additionally, this fixes a infinite cycle in DAGCombine, where combineInsertEltToShuffle turns a insert_vector_elt into a shuffle, which gets turned back into a insert_vector_elt/extract_vector_elt by a custom AArch64 lowering (in visitVECTOR_SHUFFLE). Such insert_vector_elt and extract_vector_elt combinations can be lowered efficiently using mov on AArch64. There are 2 test changes in arm64-neon-copy.ll: we now use one or two mov instructions instead of a single zip1. The reason that we need a second mov in ins1f2 is that we have to move the result to the result register and is not really related to the DAGCombine fold I think. But in any case, on most uarchs, mov should be cheaper than zip1. On a Cortex-A75 for example, zip1 is twice as expensive as mov (https://developer.arm.com/docs/101398/latest/arm-cortex-a75-software-optimization-guide-v20) Reviewers: spatel, efriedma, dmgreen, RKSimon Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D80710
-
Nicolas Vasilache authored
This revision adds custom rewrites for patterns that arise during linalg structured ops vectorization. These patterns allow the composition of linalg promotion, vectorization and removal of redundant copies. The patterns are voluntarily limited and restrictive atm. More robust behavior will be implemented once more powerful side effect modeling and analyses are available on view/subview. On the transfer_read side, the following pattern is rewritten: ``` %alloc = ... [optional] %view = std.view %alloc ... %subView = subview %allocOrView ... [optional] linalg.fill(%allocOrView, %cst) ... ... linalg.copy(%in, %subView) ... vector.transfer_read %allocOrView[...], %cst ... ``` into ``` [unchanged] %alloc = ... [unchanged] [optional] %view = std.view %alloc ... [unchanged] [unchanged] %subView = subview %allocOrView ... ... vector.transfer_read %in[...], %cst ... ``` On the transfer_write side, the following pattern is rewriten: ``` %alloc = ... [optional] %view = std.view %alloc ... %subView = subview %allocOrView... ... vector.transfer_write %..., %allocOrView[...] linalg.copy(%subView, %out) ``` Differential Revision: https://reviews.llvm.org/D80728
-
Xing GUO authored
This patch helps make the `PubSection` optional in the DWARF structure. Reviewed By: jhenderson, aprantl Differential Revision: https://reviews.llvm.org/D80722
-
Kadir Cetinkaya authored
-
Nicolas Vasilache authored
This utility factors out the machinery required to add iterArgs and yield values to an scf.ForOp. Differential Revision: https://reviews.llvm.org/D80656
-
Simon Pilgrim authored
AddressingModeMatcher::matchScaledValue was calling getSExtValue for a constant before ensuring that we can actually represent the value as int64_t Fixes OSSFuzz#22723 which is a followup to rGc479052a (PR46004 / OSSFuzz#22357)
-
Kadir Cetinkaya authored
Summary: Depends on D80198. This patch implies ASTs might be built with stale preambles without blocking for a fresh one. It also drops any guarantees on every preamble version being built. In case of multiple preamble build requests, in addition to being debounced. Any preamble requested with a WantDiags::Yes will always be built, this is ensured by blocking enqueueing of any subsequent reqest. AST worker will still block for initial preamble to reduce duplicate work. Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, jfb, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80293
-
Paul Walker authored
Summary: The description of EXTACT_SUBVECTOR and INSERT_SUBVECTOR has been changed to accommodate scalable vectors (see ISDOpcodes.h). This patch updates the asserts used to verify these requirements when using SelectionDAG's getNode interface. This patch introduces the MVT function getVectorMinNumElements that can be used against fixed-length and scalable vectors when only the known minimum vector length is required. Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80709
-
Louis Dionne authored
Lit test suites can tend to accumulate annotations that are not necessarily relevant as time goes by, for example XFAILS on old compilers or platforms. To help spot old annotations that can be cleaned up, it can be useful to look at all features used inside a test suite. This commit adds a new Lit option '--show-used-features' that prints all the features used in XFAIL, REQUIRES and UNSUPPORTED of all tests that are discovered. Differential Revision: https://reviews.llvm.org/D78589
-
Florian Hahn authored
Currently SCCP does not widen PHIs, stores or along call edges (arguments/return values), but on operations that directly extend ranges (like binary operators). This means PHIs, stores and call edges are not pessimized by widening currently, while binary operators are. The main reason for widening operators initially was that opting-out for certain operations was more straight-forward in the initial implementation (and it did not matter too much, as range support initially was only implemented for a very limited set of operations. During the discussion in D78391, it was suggested to consider flipping widening to PHIs, stores and along call edges. After adding support for tracking the number of range extensions in ValueLattice, limiting the number of range extensions per value is straight forward. This patch introduces a MaxWidenSteps option to the MergeOptions, limiting the number of range extensions per value. For PHIs, it seems natural allow an extension for each (active) incoming value plus 1. For the other cases, a arbitrary limit of 10 has been chosen initially. It would potentially make sense to set it depending on the users of a function/global, but that still needs investigating. This potentially leads to more state-changes and longer compile-times. The results look quite promising (MultiSource, SPEC): Same hash: 179 (filtered out) Remaining: 58 Metric: sccp.IPNumInstRemoved Program base widen-phi diff test-suite...ks/Prolangs-C/agrep/agrep.test 58.00 82.00 41.4% test-suite...marks/SciMark2-C/scimark2.test 32.00 43.00 34.4% test-suite...rks/FreeBench/mason/mason.test 6.00 8.00 33.3% test-suite...langs-C/football/football.test 104.00 128.00 23.1% test-suite...cations/hexxagon/hexxagon.test 36.00 42.00 16.7% test-suite...CFP2000/177.mesa/177.mesa.test 214.00 249.00 16.4% test-suite...ngs-C/assembler/assembler.test 14.00 16.00 14.3% test-suite...arks/VersaBench/dbms/dbms.test 10.00 11.00 10.0% test-suite...oxyApps-C++/miniFE/miniFE.test 43.00 47.00 9.3% test-suite...ications/JM/ldecod/ldecod.test 179.00 195.00 8.9% test-suite...CFP2006/433.milc/433.milc.test 249.00 265.00 6.4% test-suite.../CINT2000/175.vpr/175.vpr.test 98.00 104.00 6.1% test-suite...peg2/mpeg2dec/mpeg2decode.test 70.00 74.00 5.7% test-suite...CFP2000/188.ammp/188.ammp.test 71.00 75.00 5.6% test-suite...ce/Benchmarks/PAQ8p/paq8p.test 111.00 117.00 5.4% test-suite...ce/Applications/Burg/burg.test 41.00 43.00 4.9% test-suite...000/197.parser/197.parser.test 66.00 69.00 4.5% test-suite...tions/lambda-0.1.3/lambda.test 23.00 24.00 4.3% test-suite...urce/Applications/lua/lua.test 301.00 313.00 4.0% test-suite...TimberWolfMC/timberwolfmc.test 76.00 79.00 3.9% test-suite...lications/ClamAV/clamscan.test 991.00 1030.00 3.9% test-suite...plications/d/make_dparser.test 53.00 55.00 3.8% test-suite...fice-ispell/office-ispell.test 83.00 86.00 3.6% test-suite...lications/obsequi/Obsequi.test 28.00 29.00 3.6% test-suite.../Prolangs-C/bison/mybison.test 56.00 58.00 3.6% test-suite.../CINT2000/254.gap/254.gap.test 170.00 176.00 3.5% test-suite.../Applications/lemon/lemon.test 30.00 31.00 3.3% test-suite.../CINT2000/176.gcc/176.gcc.test 1202.00 1240.00 3.2% test-suite...pplications/treecc/treecc.test 79.00 81.00 2.5% test-suite...chmarks/MallocBench/gs/gs.test 357.00 366.00 2.5% test-suite...eeBench/analyzer/analyzer.test 103.00 105.00 1.9% test-suite...T2006/445.gobmk/445.gobmk.test 1697.00 1724.00 1.6% test-suite...006/453.povray/453.povray.test 1812.00 1839.00 1.5% test-suite.../Benchmarks/Bullet/bullet.test 337.00 342.00 1.5% test-suite.../CINT2000/252.eon/252.eon.test 426.00 432.00 1.4% test-suite...T2000/300.twolf/300.twolf.test 214.00 217.00 1.4% test-suite...pplications/oggenc/oggenc.test 244.00 247.00 1.2% test-suite.../CINT2006/403.gcc/403.gcc.test 4008.00 4055.00 1.2% test-suite...T2006/456.hmmer/456.hmmer.test 175.00 177.00 1.1% test-suite...nal/skidmarks10/skidmarks.test 430.00 434.00 0.9% test-suite.../Applications/sgefa/sgefa.test 115.00 116.00 0.9% test-suite...006/447.dealII/447.dealII.test 1082.00 1091.00 0.8% test-suite...6/482.sphinx3/482.sphinx3.test 141.00 142.00 0.7% test-suite...ocBench/espresso/espresso.test 152.00 153.00 0.7% test-suite...3.xalancbmk/483.xalancbmk.test 4003.00 4025.00 0.5% test-suite...lications/sqlite3/sqlite3.test 548.00 551.00 0.5% test-suite...marks/7zip/7zip-benchmark.test 5522.00 5551.00 0.5% test-suite...nsumer-lame/consumer-lame.test 208.00 209.00 0.5% test-suite...:: External/Povray/povray.test 1556.00 1563.00 0.4% test-suite...000/186.crafty/186.crafty.test 298.00 299.00 0.3% test-suite.../Applications/SPASS/SPASS.test 2019.00 2025.00 0.3% test-suite...ications/JM/lencod/lencod.test 8427.00 8449.00 0.3% test-suite...6/464.h264ref/464.h264ref.test 6797.00 6813.00 0.2% test-suite...6/471.omnetpp/471.omnetpp.test 431.00 430.00 -0.2% test-suite...006/450.soplex/450.soplex.test 446.00 447.00 0.2% test-suite...0.perlbench/400.perlbench.test 1729.00 1727.00 -0.1% test-suite...000/255.vortex/255.vortex.test 3815.00 3819.00 0.1% Reviewers: efriedma, nikic, davide Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D79036
-
Kadir Cetinkaya authored
-
David Sherwood authored
We should be using getVectorElementCount() to assert that two types have the same numbers of elements. I encountered the warnings while compiling this test: CodeGen/AArch64/sve-intrinsics-ld1.ll Differential Revision: https://reviews.llvm.org/D80616
-
Kadir Cetinkaya authored
-
Kadir Cetinkaya authored
Summary: Depends on D79992. This patch changes locateMacroAt to perform #line directive substitution for macro identifier locations. We first check whether a location is inside a file included through built-in header. If so we check whether line directive maps it back to the main file, and afterwards use TokenBuffers to find exact location of the identifier on the line. Instead of performing the mapping in locateMacroAt, we could also store a mapping inside the ParsedAST whenever we use a patched preamble. But that would imply adding more responsibility to ParsedAST and paying for the mapping even when it is not going to be used. ==== Go-To-Definition: Later on these locations are used for serving go-to-definition requests, this enables jumping to definition inside the preamble section in presence of patched macros. ===== Go-To-Refs: Macro references in main file are collected separetely and stored as a map from macro's symbol id to reference ranges. Those ranges are computed inside PPCallbacks, hence we don't have access to TokenBuffer. In presence of preamble patch, any reference to a macro inside the preamble section will unfortunately have the wrong range. They'll point into the patch rather than the main file. Hence during findReferences, we won't get any ranges reported for those. Fixing those requires: - Lexing the preamble section to figure out "real range" of a patched macro definition - Postponing range/location calculations until a later step in which we have access to tokenbuffers. This patch trades some accuracy in favor of code complexity. We don't do any patching for references inside the preamble patch but get any reference inside the main file for free. Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80198
-
Kadir Cetinkaya authored
Summary: Depends on D79930. This enables more accurate parsing of the AST, by making new macro definitions in preamble section visible. This is handled by injecting define directives into preamble patch. This patch doesn't handle any location mappings yet, so features like go-to-def, go-to-refs and hover might not work as expected. These will be addressed in a follow-up patch. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79992
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Kadir Cetinkaya authored
-
Georgii Rymar authored
llvm-readelf might crash when the .gnu.hash table goes past the EOF. This patch splits and updates the code of a helper function `checkGNUHashTable`, which is similar to `checkHashTable` and fixes the issue. Differential revision: https://reviews.llvm.org/D80215
-
Kadir Cetinkaya authored
Summary: Depends on D77644. Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79930
-
Kadir Cetinkaya authored
Summary: Enables building ASTs with stale preambles by handling additional preamble includes. Sets the correct location information for those imaginary includes so that features like gotodef/documentlink keeps functioning propoerly. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, mgrang, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77644
-
Benjamin Kramer authored
-
Louis Dionne authored
When the __config_site header is generated, but LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT wasn't specified, _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT would be defined to 0, which was the NonUnique RTTI comparison implementation. The intent was to use the Unique RTTI comparison implementation in that case, which caused https://llvm.org/PR45549. Instead, use a proper "switch" to select the RTTI comparison implementation. Note that 0 can't be used as a value, because that is treated the same by CMake as a variable that is just not defined. Differential Revision: https://reviews.llvm.org/D80037
-
Georgii Rymar authored
Here I've added comments, added testing for llvm-readelf and documented the behavior that we already have. It was discussed in the D80380 thread that we want to improve the "p_memsz does not match p_filesz for GNU_EH_FRAME" message reported (and probably convert error to a warning). This patch is a preparation for that. Differential revision: https://reviews.llvm.org/D80635
-
Emre Kultursay authored
Summary: On Android, this method gets called twice: first when establishing a host-server connection, then when attaching to a process id. Each call takes several seconds to finish (especially slower on Windows) and eliminating the call for the typical case improves latency significantly. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D79586
-
Pavel Labath authored
Summary: This patch adds two new arguments to the MakeInlineTest function. The main motivation is a follow-up patch I'm preparing, but they seem generally useful. The first argument allows the user to specify the "build dictionary". With this argument one can avoid the need to provide a custom Makefile if all he needs is to override a couple of make variables. This hooks in neatly into the existing dictionary support for non-inline tests. The second argument specifies the name of the test. This could be used to provide better names to the generated test classes, but it's mainly useful in conjuction with the first argument: now that we can specify a custom build dictionary, it may sometimes make sense to run the same test twice with different build configurations. To achieve that, we need to give the two tests different names, and this argument achieves that. The usage of the arguments is demonstrated via TestBasicEntryValues.py. Reviewers: vsk, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D80518
-
Raphael Isemann authored
-
Vitaly Buka authored
Summary: See https://github.com/google/sanitizers/issues/1253. Small patch to enable compilation on (ancient) Red Hat Enterprise Linux 5. Reviewers: kcc, vitalybuka Reviewed By: vitalybuka Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D80648
-
Ehsan Toosi authored
Buffer placement can now operates on functions that return buffers. These buffers escape from the deallocation phase of buffer placement. Differential Revision: https://reviews.llvm.org/D80696
-
Jay Foad authored
Tweak a few constant expressions involving numbers::pi etc to avoid rounding errors. NFCI though it's possible some of these will now be more accurate in the last bit.
-
Jay Foad authored
-
Kazushi (Jam) Marukawa authored
Summary: This patch includes following items. - Adds AsmParser and minimum AsmBackend/ELFObjectWriter/MCCodeEmitter to support only LEA instruction in order to reduce the size of this patch. - Adds regression test of MC layer for a LEA instruction. - Relocations are not supported this time to reduce the size of this patch. Differential Revision: https://reviews.llvm.org/D79546
-