- Dec 10, 2019
-
-
Kostya Kortchinsky authored
Summary: The function was only defined for x86 and arm families, which ends up being an issue for PPC in g3. Define the function, simply returning `false` for "other" architectures. Reviewers: hctim, pcc, cferris, eugenis, vitalybuka Subscribers: kristof.beyls, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D71223
-
Sanjay Patel authored
This pattern is noted as a regression from: D70246 ...where we removed an over-aggressive shuffle simplification. SimplifyDemandedVectorElts fails to catch this case when the insert has multiple uses, so I'm proposing to pattern match the minimal sequence directly. This fold does not conflict with any of our current shuffle undef/poison semantics. Differential Revision: https://reviews.llvm.org/D71220
-
Sanjay Patel authored
New C code snippet is more viable for SLP vectorization in most architectures. Patch by: @lsandov1 (Leonardo Sandoval) Differential Revision: https://reviews.llvm.org/D70866
-
Guillaume Chatelet authored
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: arsenm, jvesely, nhaehnle, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71213
-
Luís Marques authored
Summary: This patch adds an object file (in yaml format) with a synthetic .debug_info section which we use to test that the supported RISC-V relocations are properly resolved. Reviewers: asb, lenary, MaskRay Reviewed By: MaskRay Tags: #llvm Differential Revision: https://reviews.llvm.org/D70541
-
Raphael Isemann authored
Summary: Our Editline implementation in LLDB supports using the wchar interface of Editline which should improve handling of unicode input when using Editline. At the moment we essentially just ignore unicode input and echo the escaped unicode code point (`\U1234`) to the command line (which we then also incorrectly treat as multiple characters, so console navigation is also broken afterwards). This patch just adds the include to the host config file which already contains the LLDB_EDITLINE_USE_WCHAR define to enable the Editline support (we just never included it in the file before). With this we now actually echo back unicode characters on macOS and we no longer ignore unicode input. On Linux this doesn't seem to improve the echoing back of characters but at least it fixes that we ignore unicode input. Reviewers: labath Reviewed By: labath Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71251
-
Sam Parker authored
-
Sam Parker authored
TargetLoweringInfo may report that an integer should be promoted, but it maybe provide a size that isn't natively supported by the target register file... So check this before trying to perform a promotion. This is to fix some chromium issues: https://bugs.chromium.org/p/chromium/issues/detail?id=1031978 https://bugs.chromium.org/p/chromium/issues/detail?id=1031979 Differential Revision: https://reviews.llvm.org/D71200
-
Pavel Labath authored
Summary: A *lot* of ClangASTContext functions contained repetitive code for "desugaring" certain kinds of clang types. This patch creates a utility function for performing this task. Right now it handles four types (auto, elaborated, paren and typedef), as these are the types that were handled everywhere. There are probably other kinds of types that could/should be added here too (TypeOf, decltype, ...), but I'm leaving that for a separate patch as doing that would not be NFC (though I'm pretty sure that adding them will not hurt, and it may in fact fix some bugs). In another patch I'd like to add "atomic" type to this list to properly display atomic structs. Since sometimes one may want to handle a certain kind of type specially (right now we have code which does that with typedefs), the Desugar function takes a "mask" argument, which can supress desugaring of certain kinds of types. Reviewers: teemperor, shafik Subscribers: jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71212
-
Raphael Isemann authored
Clang was warning that this global should be static (which makes sense).
-
Martin Storsjö authored
If not set, the address byte size was implied to be the one of the host process. This allows reverting the functional change from 31087b2ae9154, since now PECOFF does the same as ELF and MachO wrt setting both byte order and address size on m_data within ParseHeader. Differential Revision: https://reviews.llvm.org/D71108
-
Kiran Chandramohan authored
Summary: This patch fixes a few issues when large arrays are allocated on the stack. Currently, clang has inconsistent behaviour, for debug builds there is an assertion failure when the array size on stack is around 2GB but there is no assertion when the stack is around 8GB. For release builds there is no assertion, the compilation succeeds but generates incorrect code. The incorrect code generated is due to using int/unsigned int instead of their 64-bit counterparts. This patch, 1) Removes the assertion in frame legality check. 2) Converts int/unsigned int in some places to the 64-bit variants. This helps in generating correct code and removes the inconsistent behaviour. 3) Adds a test which runs without optimisations. Reviewers: sdesmalen, efriedma, fhahn, aemerson Reviewed By: efriedma Subscribers: eli.friedman, fpetrogalli, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70496
-
Nico Weber authored
-
Jim Lin authored
Remove implicit conversion that promotes half to double for the target that support fp16. If the target doesn't support fp16, fp16 will be converted to fp16 intrinsic.
-
Simon Tatham authored
This is not a new semantic feature. The syntax `(? 1, 2, 3)` was disallowed by the parser in a dag //expression//, but there were already ways to sneak a `?` into the operator field of a dag //value//, e.g. by initializing it from a class template parameter which is then set to `?` by the instantiating `def`. This patch makes `?` in the operator slot syntactically legal, so it's now easy to construct dags with an unset operator. Also, the semantics of `!con` are relaxed so that it will allow a combination of set and unset operator fields in the dag nodes it's concatenating, with the restriction that all the operators that are //not// unset still have to agree with each other. Reviewers: hfinkel, nhaehnle Reviewed By: hfinkel, nhaehnle Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71195
-
Cullen Rhodes authored
Summary: Recognize wide compares where the wide operand is a splat of a scalar value in the appropriate range and convert to the immediate variant of the instruction. Patch by Graham Hunter Reviewers: sdesmalen, efriedma, dancgr, rovka, rengolin Reviewed By: efriedma Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71009
-
Mikael Holmen authored
Summary: This fixes PR44135. The special case when we promote a bitcast from a vector to an int needs special handling when we are on a big-endian target. Prior to this fix, for the added vec_to_int we see the following in the SelectionDAG printouts Type-legalized selection DAG: %bb.1 'foo:bb.1' SelectionDAG has 9 nodes: t0: ch = EntryToken t2: v8i16,ch = CopyFromReg t0, Register:v8i16 %0 t17: v4i32 = bitcast t2 t23: i32 = extract_vector_elt t17, Constant:i32<3> t8: ch,glue = CopyToReg t0, Register:i32 $r0, t23 t9: ch = ARMISD::RET_FLAG t8, Register:i32 $r0, t8:1 and I think here the extract_vector_elt is wrong and extracts the value from the wrong index. The program program should return the 32 bits made up of the elements at index 4 and 5 in the vec6 array, but with t23: i32 = extract_vector_elt t17, Constant:i32<3> as far as I can tell, we will extract values that originally didn't even exist in the vec6 vectore. If we would instead extract the element at index 2 we would get the wanted values. With this fix we insert a right shift after the bitcast in DAGTypeLegalizer::PromoteIntRes_BITCAST which then gives us Type-legalized selection DAG: %bb.1 'vec_to_int:bb.1' SelectionDAG has 9 nodes: t0: ch = EntryToken t2: v8i16,ch = CopyFromReg t0, Register:v8i16 %0 t23: v4i32 = bitcast t2 t27: i32 = extract_vector_elt t23, Constant:i32<2> t8: ch,glue = CopyToReg t0, Register:i32 $r0, t27 t9: ch = ARMISD::RET_FLAG t8, Register:i32 $r0, t8:1 So now we get t27: i32 = extract_vector_elt t23, Constant:i32<2> which is what we want. Similarly, the new int_to_vec testcase exposes a bug where we cast the other direction. Then we instead need to add a left shift before the bitcast on big-endian targets for the bits in the input integer to end up at the exptected place in the vector. Reviewers: bogner, spatel, craig.topper, t.p.northover, dmgreen, efriedma, SjoerdMeijer, samparker Reviewed By: efriedma Subscribers: eli.friedman, bjope, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70942
-
Mikael Holmen authored
-
Georgii Rymar authored
I was investigating a change previously discussed that eliminates an excessive empty lines from the output when we report warnings and errors (https://reviews.llvm.org/D70826#inline-639055) and found that we need this refactoring or alike to achieve that. The problem is that some of our functions that finds symbol versions just fail instead of returning errors or printing warnings. Another problem is that they might print a warning on the same line with the regular output. In this patch I've splitted getting of the version information and dumping of it for GNU printVersionSymbolSection(). I had to change a few methods to return Error or Expected<> to do that properly. Differential revision: https://reviews.llvm.org/D71118
-
Hans Wennborg authored
It was missing on the first test invocation. The flag is necessary to ignore line-ending differences on Windows.
-
Ilya Biryukov authored
`findName` was always used in conjuction with `spellingLocIfSpelled`. This patch replaces patterns of the form: spellingLocIfSpelled(findName(&ND), SM) With a new helper function: nameLocation(ND, SM) And removes `spellingLocIfSpelled` and `findName`. Both are never used anywhere else and the latter is an equivalent of `Decl::getLocation` if we ever need it again.
-
Georgii Rymar authored
This creates the next subfolders in the test directory: "COFF", "ELF", "MachO", "wasm". I've also removed platform specific prefixes, like "coff-*". One unused binary was removed as well: `Inputs/relocs.obj.elf-mips` Differential revision: https://reviews.llvm.org/D71203
-
Johannes Doerfert authored
Summary: The new OpenMPConstants.h is a location for all OpenMP related constants (and helpers) to live. This patch moves the directives there (the enum OpenMPDirectiveKind) and rewires Clang to use the new location. Initially part of D69785. Reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim Subscribers: jholewinski, ppenzin, penzn, llvm-commits, cfe-commits, jfb, guansong, bollu, hiraditya, mgorny Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D69853
-
Yonghong Song authored
extern variable usage in BPF is different from traditional pure user space application. Recent discussion in linux bpf mailing list has two use cases where debug info types are required to use extern variables: - extern types are required to have a suitable interface in libbpf (bpf loader) to provide kernel config parameters to bpf programs. https://lore.kernel.org/bpf/CAEf4BzYCNo5GeVGMhp3fhysQ=_axAf=23PtwaZs-yAyafmXC9g@mail.gmail.com/T/#t - extern types are required so kernel bpf verifier can verify program which uses external functions more precisely. This will make later link with actual external function no need to reverify. https://lore.kernel.org/bpf/87eez4odqp.fsf@toke.dk/T/#m8d5c3e87ffe7f2764e02d722cb0d8cbc136880ed This patch added bpf support to consume such info into BTF, which can then be used by bpf loader. Function processFuncPrototypes() only adds extern function definitions into BTF. The functions with actual definition have been added to BTF in some other places. Differential Revision: https://reviews.llvm.org/D70697
-
Jim Lin authored
Remove implicit conversion that promotes half to other larger precision types for fp classification builtins Summary: It shouldn't promote half to double or any larger precision types for fp classification builtins. Because fp classification builtins would get incorrect result with promoted argument. For example, __builtin_isnormal with a subnormal half value should return false, but it is not. That the subnormal half value is promoted to a normal double value. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71049
-
Francis Visoiu Mistrih authored
This adds a check for the usage of -foptimization-record-file with multiple -arch options. This is not permitted since it would require us to rename the file requested by the user to avoid overwriting it for the second cc1 invocation.
-
Puyan Lotfi authored
Making some changes to MIRVRegNamerUtils.cpp to use some more modern c++ features as well as some changes to generally make the code more concise and more understandable. I make this an NFCi because in one case I drop the whole "if (!MO->isDef()) MO->setIsKill(false);" thing that was added in the original implementation, generally because I don't think this is really semantically sound. I also changed up the implementation of VRegRenamer::createVirtualRegisterWithLowerName somewhat because I am now lower-casing the name unconditionally because I confirmed that that was in fact aditya_nandakumar@apple.com's intent. In all other cases, behavior should not be changed. Differential Revision: https://reviews.llvm.org/D71182
-
Akira Hatanaka authored
This reverts commit 88f5bf77 as it broke green dragon bots. http://lab.llvm.org:8080/green/job/clang-stage1-RA/4401/
-
Fangrui Song authored
D34393 added MCCodePadder as an infrastructure for padding code with NOP instructions. It lacked tests and was not being worked on since then. Intel has now worked on an assembler patch to mitigate performance loss after applying microcode update for the Jump Conditional Code Erratum. https://www.intel.com/content/www/us/en/support/articles/000055650/processors.html This new patch shares similarity with MCCodePadder, but has a concrete use case in mind and is being actively developed. The infrastructure it introduces can potentially be used for general performance improvement via alignment. Delete the unused MCCodePadder so that people can develop the new feature from a clean state. Reviewed By: jyknight, skan Differential Revision: https://reviews.llvm.org/D71106
-
Eric Christopher authored
a command line for clang-tidy.
-
QingShan Zhang authored
As discussed in https://reviews.llvm.org/D69998, we miss to create some dependency edges if chained more than 2 instructions. Adding an assertion here if someone want to chain more than 2 instructions. Differential Revision: https://reviews.llvm.org/D71180
-
Eric Christopher authored
-
Richard Smith authored
function. We need to perform unqualified lookups from the context of a defaulted comparison, but not until we implicitly define the function, at which point we can't do those lookups any more. So perform the lookup from the end of the class containing the =default declaration and store the lookup results on the defaulted function until we synthesize the body.
-
Huihui Zhang authored
../llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5371:37: warning: suggest braces around initialization of subobject [-Wmissing-braces] std::array<EVT, 2> ReturnTypes = {MVT::Other, MVT::Glue}; ^~~~~~~~~~~~~~~~~~~~~ { }
-
Jonas Devlieghere authored
Currently dwarfdump uses the ArchType to filter out architectures, which is problematic for architectures like arm64e and x86_64h that map back to arm64 and x86_64 respectively. The result is that the filter doesn't work for these architectures because it matches all the variants. This is especially bad because usually these architectures are the reason to use the filter in the first place. Instead, we should match the architecture based on the string name. This means the filter works for the values printed by dwarfdump. It has the unfortunate side effect of not working for aliases, like AArch64, but I think that's worth the trade-off. rdar://53653014 Differential revision: https://reviews.llvm.org/D71230
-
Davide Italiano authored
Reviewers: jingham, teemperor, JDevlieghere, aprantl Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71236
-
Liu, Chen3 authored
Differential Revision: https://reviews.llvm.org/D71184
-
Eric Christopher authored
and two follow-on commits: one warning fix and one functionality. As it's breaking at least the lto bot: http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/15132/steps/test-stage1-compiler/logs/stdio This reverts commits: 8d70f3c9 ff4dceef d97b3e3e
-
Reid Kleckner authored
This saves around 20 includes of Attr.h. Not much.
-