- Feb 29, 2020
-
-
Craig Topper authored
-
Craig Topper authored
[X86] Cleanup a comment around bitcasting X86ISD::VBROADCAST_LOAD and add an assert to make sure memory VT size doesn't change.
-
Michael Spencer authored
rG01f9abbb moved WindowsSupport.h to include/llvm/Support/Windows/ This is a problem because the modulemap include all of the Support and ADT directories, thus any use of any header in Support or ADT would cause the compiler to try to build WindowsSupport.h, which only works on Windows. Fix this by explicitly excluding WindowsSupport.h from the LLVM_Util module.
-
Vedant Kumar authored
rdar://59402904
-
Vedant Kumar authored
As a narrow stopgap for the assertion failure described in PR45025, add a describeLoadedValue override to ARMBaseInstrInfo and use it to detect copies in which the forwarding reg is a super/sub reg of the copy destination. For the moment this is unsupported. Several follow ups are possible: 1) Handle VORRq. At the moment, we do not, because isCopyInstrImpl returns early when !MI.isMoveReg(). 2) In the case where forwarding reg is a super-reg of the copy destination, we should be able to describe the forwarding reg as a subreg within the copy destination. I'm not 100% sure about this, but it looks like that's what's done in AArch64InstrInfo. 3) In the case where the forwarding reg is a sub-reg of the copy destination, maybe we could describe the forwarding reg using the copy destinaion and a DW_OP_LLVM_fragment (I guess this should be possible after D75036). https://bugs.llvm.org/show_bug.cgi?id=45025 rdar://59772698 Differential Revision: https://reviews.llvm.org/D75273
-
Matt Morehouse authored
Summary: When -dfsan-event-callbacks is specified, insert a call to __dfsan_load_callback() on every load. Reviewers: vitalybuka, pcc, kcc Reviewed By: vitalybuka, kcc Subscribers: hiraditya, #sanitizers, llvm-commits, eugenis, kcc Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D75363
-
Reid Kleckner authored
DenseMap requires two sentinel values for keys: empty and tombstone values. To avoid undefined behavior, LLVM aligns the two sentinel pointers to alignof(T). This requires T to be complete, which is needlessly restrictive. Instead, assume that DenseMap pointer keys have a maximum alignment of 4096, and use the same sentinel values for all pointer keys. The new sentinels are: empty: static_cast<uintptr_t>(-1) << 12 tombstone: static_cast<uintptr_t>(-2) << 12 These correspond to the addresses of -4096 and -8192. Hopefully, such a key is never inserted into a DenseMap. I encountered this while looking at making clang's SourceManager not require FileManager.h, but it has several maps keyed on classes defined in FileManager.h. FileManager depends on various LLVM FS headers, which cumulatively take ~200ms to parse, and are generally not needed. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D75301
-
Jordan Rupprecht authored
* llvm-gisel-cov.py: extra `)` after print * chunk-print-before-all.py: py2-only print method
-
Stephen Neuendorffer authored
This reverts commit 2f265e35.
-
Stephen Neuendorffer authored
This reverts commit e1cb15c8.
-
Jay Foad authored
Summary: pickNodeBidirectional tried to compare the best top candidate and the best bottom candidate by examining TopCand.Reason and BotCand.Reason. This is unsound because, after calling pickNodeFromQueue, Cand.Reason does not reflect the most important reason why Cand was chosen. Rather it reflects the most recent reason why it beat some other potential candidate, which could have been for some low priority tie breaker reason. I have seen this cause problems where TopCand is a good candidate, but because TopCand.Reason is ORDER (which is very low priority) it is repeatedly ignored in favour of a mediocre BotCand. This is not how bidirectional scheduling is supposed to work. To fix this I changed the code to always compare TopCand and BotCand directly, like the generic implementation of pickNodeBidirectional does. This removes some uncommented AMDGPU-specific logic; if this logic turns out to be important then perhaps it could be moved into an override of tryCandidate instead. Graphics shader benchmarking on gfx10 shows a lot more positive than negative effects from this change. Reviewers: arsenm, tstellar, rampitec, kzhuravl, vpykhtin, dstuttard, tpr, atrick, MatzeB Subscribers: jvesely, wdng, nhaehnle, yaxunl, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68338
-
Alexey Lapshin authored
Summary: Extracted from D74773. Currently, errors happened while parsing debug info are reported as errors. DebugInfoDWARF library treats such errors as "Recoverable errors". This patch makes debug info errors to be reported as warnings, to support DebugInfoDWARF approach. Reviewers: ruiu, grimar, MaskRay, jhenderson, espindola Reviewed By: MaskRay, jhenderson Subscribers: emaste, aprantl, arichardson, arphaman, llvm-commits Tags: #llvm, #debug-info, #lld Differential Revision: https://reviews.llvm.org/D75234
-
Francis Visoiu Mistrih authored
Tools working with object files on Darwin (e.g. lipo) may need to know properties like the CPU type and subtype of a bitcode file. The logic of converting a triple to a Mach-O CPU_(SUB_)TYPE should be provided by LLVM instead of relying on tools to re-implement it. Differential Revision: https://reviews.llvm.org/D75067
-
Tim Shen authored
Differential Revision: https://reviews.llvm.org/D75150
-
Tim Shen authored
Summary: See discussion here: https://llvm.discourse.group/t/rfc-dialect-type-cast-op/538/11 Reviewers: ftynse Subscribers: bixia, sanjoy.google, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, llvm-commits Differential Revision: https://reviews.llvm.org/D75141
-
Tim Shen authored
This is in preparation for the next patch D75141. The purpose is to provide a single place where LLVM dialect registers its ops as legal/illegal. Reviewers: ftynse, mravishankar, herhut Subscribers: jholewinski, bixia, sanjoy.google, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, llvm-commits Differential Revision: https://reviews.llvm.org/D75140
-
Krzysztof Parzyszek authored
-
Stephen Neuendorffer authored
This reverts commit 8a2b86b2.
-
Stephen Neuendorffer authored
This reverts commit 1246e867.
-
Stephen Neuendorffer authored
This reverts commit c767dc93.
-
cchen authored
Chen Summary: Base declaration in pointer arithmetic expression is determined by binary search with type information. Take "int *a, *b; *(a+*b)" as an example, we determine the base by checking the type of LHS and RHS. In this case the type of LHS is "int *", the type of RHS is "int", therefore, we know that we need to visit LHS in order to find base declaration. Reviewers: ABataev, jdoerfert Reviewed By: ABataev Subscribers: guansong, cfe-commits, sandoval, dreachem Tags: #clang Differential Revision: https://reviews.llvm.org/D75077
-
Stephen Neuendorffer authored
Differential Revision: https://reviews.llvm.org/D75308
-
Valentin Churavy authored
Putting this up mainly for discussion on how this should be done. I am interested in MLIR from the Julia side and we currently have a strong preference to dynamically linking against the LLVM shared library, and would like to have a MLIR shared library. This patch adds a new cmake function add_mlir_library() which accumulates a list of targets to be compiled into libMLIR.so. Note that not all libraries make sense to be compiled into libMLIR.so. In particular, we want to avoid libraries which primarily exist to support certain tools (such as mlir-opt and mlir-cpu-runner). Note that the resulting libMLIR.so depends on LLVM, but does not contain any LLVM components. As a result, it is necessary to link with libLLVM.so to avoid linkage errors. So, libMLIR.so requires LLVM_BUILD_LLVM_DYLIB=on FYI, Currently it appears that LLVM_LINK_LLVM_DYLIB is broken because mlir-tblgen is linked against libLLVM.so and and independent LLVM components (updated by Stephen Neuendorffer) Differential Revision: https://reviews.llvm.org/D73130
-
Stephen Neuendorffer authored
add_llvm_library and add_llvm_executable may need to create new targets with appropriate dependencies. As a result, it is not sufficient in some configurations (namely LLVM_BUILD_LLVM_DYLIB=on) to only call add_dependencies(). Instead, the explicit TableGen dependencies must be passed to add_llvm_library() or add_llvm_executable() using the DEPENDS keyword. Differential Revision: https://reviews.llvm.org/D74930
-
Stephen Neuendorffer authored
In cmake, it is redundant to have a target list under target_link_libraries() and add_dependency(). This patch removes the redundant dependency from add_dependency(). Differential Revision: https://reviews.llvm.org/D74929
-
Stephen Neuendorffer authored
When compiling libLLVM.so, add_llvm_library() manipulates the link libraries being used. This means that when using add_llvm_library(), we need to pass the list of libraries to be linked (using the LINK_LIBS keyword) instead of using the standard target_link_libraries call. This is preparation for properly dealing with creating libMLIR.so as well. Differential Revision: https://reviews.llvm.org/D74864
-
Stephen Neuendorffer authored
Previously, lib/Support/JitRunner.cpp was essentially a complete application, performing all library initialization, along with dealing with command line arguments and actually running passes. This differs significantly from mlir-opt and required a dependency on InitAllDialects.h. This dependency is significant, since it requires a dependency on all of the resulting libraries. This patch refactors the code so that tools are responsible for library initialization, including registering all dialects, prior to calling JitRunnerMain. This places the concern about what dialect to support with the end application, enabling more extensibility at the cost of a small amount of code duplication between tools. It also fixes BUILD_SHARED_LIBS=on. Differential Revision: https://reviews.llvm.org/D75272
-
Stephen Neuendorffer authored
Collect a list of conversion libraries in cmake, so we don't have to list these explicitly in most binaries. Differential Revision: https://reviews.llvm.org/D75222
-
Stephen Neuendorffer authored
Instead of creating extra libraries we don't really need, collect a list of all dialects and use that instead. Differential Revision: https://reviews.llvm.org/D75221
-
Jacques Pienaar authored
-
Benjamin Kramer authored
This matches loops with a affine.min upper bound, limiting the trip count to a constant, and rewrites them into two loops, one with constant upper bound and one with variable upper bound. The assumption is that the constant upper bound loop will be unrolled and vectorized, which is preferable if this is the hot path. Differential Revision: https://reviews.llvm.org/D75240
-
Yitzhak Mandelbaum authored
[AST Matchers] Fix bug in 'optionally' matcher wherein all previous bindings are cleared when all inner matchers fail. Summary: The implementation of 'optionally' doesn't preserve bindings when none of the submatchers succeed. This patch adds a regression test for that behavior and fixes it. Reviewers: aaron.ballman, sbenza Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75365
-
David Green authored
The alias analysis in DAG Combine looks at the BaseAlign, the Offset and the Size of two accesses, and determines if they are known to access different parts of memory by the fact that they are different offsets from inside that "alignment window". It does not seem to account for accesses that are not a multiple of the size, and may overflow from one alignment window into another. For example in the test case we have a 19byte memset that is splits into a 16 byte neon store and an unaligned 4 byte store with a 15 byte offset. This 15byte offset (with a base align of 8) wraps around to the next alignment windows. When compared to an access that is a 16byte offset (of the same 4byte size and 8byte basealign), the two accesses are said not to alias. I've fixed this here by just ensuring that the offsets are a multiple of the size, ensuring that they don't overlap by wrapping. Fixes PR45035, which was exposed by the UseAA changes in the arm backend. Differential Revision: https://reviews.llvm.org/D75238
-
Austin Kerbow authored
Extract index could be a differnet integral type. Differential Revision: https://reviews.llvm.org/D75327
-
Eric Fiselier authored
-
Valery N Dmitriev authored
This change adds an assertion to prevent tricky bug related to recursive approach of building vectorization tree. For loop below takes number of operands directly from tree entry rather than from scalars. If the entry at this moment turns out incomplete (i.e. not all operands set) then not all the dependencies will be seen by the scheduler. This can lead to failed scheduling (and thus failed vectorization) for perfectly vectorizable tree. Here is code example which is likely to fire the assertion: for (i : VL0->getNumOperands()) { ... TE->setOperand(i, Operands); buildTree_rec(Operands, Depth + 1,...); } Correct way is two steps process: first set all operands to a tree entry and then recursively process each operand. Differential Revision: https://reviews.llvm.org/D75296 -
Alexey Bataev authored
-
Craig Topper authored
This should avoid scalarizing the cvtph2ps intrinsics with D75162 Differential Revision: https://reviews.llvm.org/D75304
-
Sam Clegg authored
When there are both strong and weak references to an undefined symbol ensure that the strong reference prevails in the output symbol generating the correct error. Test case copied from lld/test/ELF/weak-and-strong-undef.s Differential Revision: https://reviews.llvm.org/D75322
-
Hiroshi Yamauchi authored
Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration. This aims to fix a missed inlining case. If there's a virtual call in the callee on an alloca (stack allocated object) in the caller, and the callee is inlined into the caller, the post-inline cleanup would devirtualize the virtual call, but if the next iteration of DevirtSCCRepeatedPass doesn't happen (under the new pass manager), which is based on a heuristic to determine whether to reiterate, we may miss inlining the devirtualized call. This enables inlining in clang/test/CodeGenCXX/member-function-pointer-calls.cpp. This is a second commit after a revert https://reviews.llvm.org/rG4569b3a86f8a4b1b8ad28fe2321f936f9d7ffd43 and a fix https://reviews.llvm.org/rG41e06ae7ba91. Differential Revision: https://reviews.llvm.org/D69591
-