- Aug 27, 2019
-
-
Lang Hames authored
If content sections have lower alignment than zero-fill sections then bump the overall segment alignment to avoid under-aligning the zero-fill sections. llvm-svn: 370072
-
Sanjay Patel authored
(-X) * (-Y) + Z --> X * Y + Z This is a missing optimization that shows up as a potential regression in D66050, so we should solve it first. We appear to be partly missing this fold in IR as well. We do handle the simpler case already: (-X) * (-Y) --> X * Y And it might be beneficial to make the constraint less conservative (eg, if both operands are cheap, but not necessarily cheaper), but that causes infinite looping for the existing fmul transform. Differential Revision: https://reviews.llvm.org/D66755 llvm-svn: 370071
-
Jason Liu authored
Summary: Adds support for emitting common local global symbols to an XCOFF object file. Local commons are emitted into the .bss section with a storage class of C_HIDEXT. Patch by: daltenty Reviewers: sfertile, hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D66097 llvm-svn: 370070
-
Jinsong Ji authored
This reverts commit b3d258fc. @skatkov is reporting crash in D63972#1646303 Contacted @ZhangKang, and revert the commit on behalf of him. llvm-svn: 370069
-
Joe Ranieri authored
This updates the SARIF exporter to produce SARIF 2.1 output. The bulk of the diffs come from two changes to SARIF: * https://github.com/oasis-tcs/sarif-spec/issues/309 * https://github.com/oasis-tcs/sarif-spec/issues/179 Differential Revision: https://reviews.llvm.org/D65211 llvm-svn: 370068
-
Petar Avramovic authored
ClampScalar G_SHL, G_ASHR and G_LSHR to s32 for MIPS32. Differential Revision: https://reviews.llvm.org/D66533 llvm-svn: 370067
-
Aaron Ballman authored
llvm-svn: 370066
-
Petar Avramovic authored
Main difference is in the way Hi for Long shift (HiL) is made. G_LSHR fills HiL with zeros, while G_ASHR fills HiL with sign bit value. Differential Revision: https://reviews.llvm.org/D66589 llvm-svn: 370064
-
Petar Avramovic authored
Fix typos. Use Hi and Lo prefixes for Or instead of LHS and RHS to match names of surrounding variables. Differential Revision: https://reviews.llvm.org/D66587 llvm-svn: 370062
-
Joe Ranieri authored
Differential Revision: https://reviews.llvm.org/D65209 llvm-svn: 370061
-
Joe Ranieri authored
According to the SARIF specification, "a text region does not include the character specified by endColumn". Differential Revision: https://reviews.llvm.org/D65206 llvm-svn: 370060
-
Aaron Ballman authored
llvm-svn: 370059
-
Aaron Ballman authored
llvm-svn: 370058
-
Raphael Isemann authored
llvm-svn: 370057
-
Amaury Sechet authored
Summary: As per title. Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66659 llvm-svn: 370056
-
Simon Pilgrim authored
Differential Revision: https://reviews.llvm.org/D66527 llvm-svn: 370055
-
Pavel Labath authored
pexpect gives as raw data going to a terminal. This means that if the completed line does not fit the emulated line, the returned data will contain line breaks. On my machine these line breaks happened to be inside the "iohandler/completion" string that the test was searching for. Work around this by telling pexpect to emulate a very wide terminal. llvm-svn: 370054
-
Cullen Rhodes authored
Summary: This patch adds support for scalable vectors in intrinsics, enabling intrinsics such as the following to be defined: declare <vscale x 4 x i32> @llvm.something.nxv4i32(<vscale x 4 x i32>) Support for this is implemented by defining a new type descriptor for scalable vectors and adding mangling support for scalable vector types in the name mangling scheme used by 'any' types in intrinsic signatures. Tests have been added for IRBuilder to test scalable vectors work as expected when using intrinsics through this interface. This required implementing an intrinsic that is explicitly defined with scalable vectors, e.g. LLVMType<nxv4i32>, an SVE floating-point convert intrinsic was used for this. The behaviour of the overloaded type LLVMScalarOrSameVectorWidth with scalable vectors is tested using the existing masked load intrinsic. Also added an .ll test to test the Verifier catches a bad intrinsic argument when passing a fixed-width predicate (mask) to the masked.load intrinsic where a scalable is expected. Patch by Paul Walker Reviewed By: sdesmalen Differential Revision: https://reviews.llvm.org/D65930 llvm-svn: 370053
-
Aaron Ballman authored
Currently, clang accepts a union with a reference member when given the -fms-extensions flag. This change fixes the codegen for this case. Patch by Dominic Ferreira. llvm-svn: 370052
-
Joe Ranieri authored
llvm-svn: 370051
-
Raphael Isemann authored
llvm-svn: 370050
-
Fangrui Song authored
Port the D64906 technique to ARM. It deletes 3 alignments at PT_LOAD boundaries for the default case: the size of an arm binary decreases by at most 12kb. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D66749 llvm-svn: 370049
-
Fangrui Song authored
Delete some insignificant addresses to make it simpler for layout changes. llvm-svn: 370048
-
Raphael Isemann authored
Otherwise dotest doesn't run the test and just lets it always pass. Also update the comment to explain that we do directory and not file completion. llvm-svn: 370047
-
David Bolvansky authored
llvm-svn: 370046
-
Gabor Marton authored
There are numorous flaws about the name conflict handling, this patch attempts fixes them. Changes in details: * HandleNameConflict return with a false DeclarationName Hitherto we effectively never returned with a NameConflict error, even if the preceding StructuralMatch indicated a conflict. Because we just simply returned with the parameter `Name` in HandleNameConflict and that name is almost always `true` when converted to `bool`. * Add tests which indicate wrong NameConflict handling * Add to ConflictingDecls only if decl kind is different Note, we might not indicate an ODR error when there is an existing record decl and a enum is imported with same name. But there are other cases. E.g. think about the case when we import a FunctionTemplateDecl with name f and we found a simple FunctionDecl with name f. They overload. Or in case of a ClassTemplateDecl and CXXRecordDecl, the CXXRecordDecl could be the 'templated' class, so it would be false to report error. So I think we should report a name conflict error only when we are 100% sure of that. That is why I think it should be a general pattern to report the error only if the kind is the same. * Fix failing ctu test with EnumConstandDecl In ctu-main.c we have the enum class 'A' which brings in the enum constant 'x' with value 0 into the global namespace. In ctu-other.c we had the enum class 'B' which brought in the same name ('x') as an enum constant but with a different enum value (42). This is clearly an ODR violation in the global namespace. The solution was to rename the second enum constant. * Introduce ODR handling strategies Reviewers: a_sidorin, shafik Differential Revision: https://reviews.llvm.org/D59692 llvm-svn: 370045
-
Bruno Ricci authored
Since statements, expressions and types are allocated with the BumpPtrAllocator from ASTContext their destructor is not executed. Two classes are currently exempted from the check : InitListExpr due to its ASTVector and ConstantArrayType due to its APInt. No functional changes. Differential Revision: https://reviews.llvm.org/D66646 Reviewed By: lebedev.ri, gribozavr llvm-svn: 370044
-
Raphael Isemann authored
On the command line we usually insert a space after a completion to indicate that the completion was successful. After the completion API refactoring, this also happens with directories which essentially breaks file path completion (as adding a space terminates the path and starts a new arg). This patch restores the old behavior by again allowing partial completions. Also extends the iohandler and SB API tests as the implementation for this is different in Editline and SB API. llvm-svn: 370043
-
Pavel Labath authored
Summary: This is motivated by D63591, where we realized that there isn't a really good way of telling whether a DataExtractor is reading actual data, or is it just returning default values because it reached the end of the buffer. This patch resolves that by providing a new "Cursor" class. A Cursor object encapsulates two things: - the current position/offset in the DataExtractor - an error object Storing the error object inside the Cursor enables one to use the same pattern as the std::{io}stream API, where one can blindly perform a sequence of reads and only check for errors once at the end of the operation. Similarly to the stream API, as soon as we encounter one error, all of the subsequent operations are skipped (return default values) too, even if the would suceed with clear error state. Unlike the std::stream API (but in line with other llvm APIs), we force the error state to be checked through usage of llvm::Error. Reviewers: probinson, dblaikie, JDevlieghere, aprantl, echristo Subscribers: kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63713 llvm-svn: 370042
-
Bruno Ricci authored
As in D66646, these classes are also allocated with a BumpPtrAllocator, and therefore should be trivially destructible. Differential Revision: https://reviews.llvm.org/D66722 Reviewed By: Mordante, gribozavr llvm-svn: 370041
-
Amaury Sechet authored
Summary: As per title. Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66702 llvm-svn: 370040
-
Dmitri Gribenko authored
Summary: I think it makes method implementations more obvious. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66788 llvm-svn: 370039
-
David Bolvansky authored
Summary: Handle pattern [0]: int ctz(unsigned int a) { int c = __clz(a & -a); return a ? 31 - c : c; } In reality, the compiler can generate much better code for cttz, so fold away this pattern. https://godbolt.org/z/c5kPtV [0] https://community.arm.com/community-help/f/discussions/2114/count-trailing-zeros Reviewers: spatel, nikic, lebedev.ri, dmgreen, hfinkel Reviewed By: hfinkel Subscribers: hfinkel, javed.absar, kristof.beyls, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66308 llvm-svn: 370037
-
Tim Northover authored
Inserting a value into Visited has the effect of terminating a search for predecessors if that node is seen. This is legitimate for the base address, and acts as a slight performance optimization, but the vector-building node can be paert of a legitimate cycle so we shouldn't stop searching there. PR43056. llvm-svn: 370036
-
David Carlier authored
Reviewers: sylvestre.ledru, kcc Reviewed By: sylvestre.ledru Differential Revision: https://reviews.llvm.org/D66792 llvm-svn: 370035
-
George Rimar authored
There is a problem with reportError we have. Declaration says we have ArchiveName that follows the FileName: reportError(Error E, StringRef FileName, StringRef ArchiveName,... Though implementation have them reversed. I cleaned it up and removed an excessive reportError(Error E, StringRef File) version. Rebased on top of D66418. Differential revision: https://reviews.llvm.org/D66517 llvm-svn: 370034
-
Ilya Biryukov authored
Summary: Previously, it would always return nullptr on any error. This change adds a parameter, controlling whether the function should attempt to return a non-null result even if unknown arguments (or other errors were encountered). The new behavior is only used in clangd. Considered an alternative of changing the return value instead of adding a new parameter, but that would require updating all callsites. Settled with the parameter to minimize the code changes. Reviewers: gribozavr Reviewed By: gribozavr Subscribers: nridge, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66731 llvm-svn: 370033
-
George Rimar authored
This is a follow up discussed in the comments of D66583. Currently, if for example, we have both StOther and Other set in YAML document for a symbol, then yaml2obj reports an "unknown key 'Other'" error. It happens because 'mapOptional()' is never called for 'Other/Visibility' in this case, leaving those unhandled. This message does not describe the reason of the error well. This patch fixes it. Differential revision: https://reviews.llvm.org/D66642 llvm-svn: 370032
-
Sam McCall authored
llvm-svn: 370030
-
Sam McCall authored
Summary: https://github.com/clangd/clangd/issues/129 Reviewers: SureYeaah Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66590 llvm-svn: 370029
-