- Jun 27, 2020
-
-
Vedant Kumar authored
This reverts commit 903cf140. This might be causing verifier failures on the bots, such as: "inlinable function call in a function with debug info must have a !dbg location" -- http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/16976/steps/bootstrap%20clang/logs/stdio
-
Arthur Eubanks authored
Following https://reviews.llvm.org/D82607. Reviewed By: ychen Differential Revision: https://reviews.llvm.org/D82681
-
Arthur Eubanks authored
Following https://reviews.llvm.org/D82607. Reviewed By: ychen Differential Revision: https://reviews.llvm.org/D82683
-
Yuanfang Chen authored
Is teaching the LoopFullUnrollPass to preserve MemorySSA very hard or just impossible? Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D82618
-
Vedant Kumar authored
In https://reviews.llvm.org/D81198, we outlined a number of scenarios where dropping debug locations is appropriate. Stop issuing an error when this happens.
-
Steven Wu authored
Fix a mismatched #if/#endif comments from my previous commit.
-
Matt Arsenault authored
The translation of cmpxchg added by 9481399c specifically skipped weak cmpxchg due to not understanding the meaning. Weak cmpxchg was added in 420a2168. As explained in the commit message, the weak mode is implicit in how ATOMIC_CMP_SWAP_WITH_SUCCESS is lowered. If it's expanded to a regular ATOMIC_CMP_SWAP, it's replaced with a strong cmpxchg. This handling seems weird to me, but this was already following the DAG behavior. I would expect the strong IR instruction to not have the boolean output. Failing that, I might expect the IRTranslator to emit ATOMIC_CMP_SWAP and a constant for the boolean.
-
Tony authored
Summary: - Define DWARF register numbers for vector and scalar condition codes. - Document intended purpose of reserved DWARF register numbers. Reviewers: yaxunl, kzhuravl, arsenm, rampitec, b-sumner Subscribers: jvesely, wdng, nhaehnle, aprantl, dstuttard, tpr, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82519
-
JF Bastien authored
We're now hitting this because we're at the limit for number of builtins: clang/lib/Basic/IdentifierTable.cpp:39:1: error: static_assert failed due to requirement '2 * LargestBuiltinID < (2 << (ObjCOrBuiltinIDBits - 1))' "Insufficient ObjCOrBuiltinID Bits" static_assert(2 * LargestBuiltinID < (2 << (ObjCOrBuiltinIDBits - 1)), ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bump it to 15 so whoever adds a builtin next (as I am, or as anyone else might) doesn't merge conflict over each other.
-
https://reviews.llvm.org/D82501Francesco Petrogalli authored
The original patch was reverted in https://github.com/llvm/llvm-project/commit/ff5ccf258e297df29f32d6b5e4fa0a7b95c44f9c as it was missing the C tests that got accidentally missing. This patch is a NFC of https://reviews.llvm.org/D82501, together with the SVE ACLE tests for the C intrinsics of svreinterpret for brain float types.
-
Amy Huang authored
Summary: A while ago I implemented the functionality to lower Microsoft __ptr32 and __ptr64 pointers, which are stored as 32-bit and 64-bit pointer and are extended/truncated to the appropriate pointer size when dereferenced. This patch adds an addrspacecast to cast from the __ptr32/__ptr64 pointer to a default address space when dereferencing. Bug: https://bugs.llvm.org/show_bug.cgi?id=42359 Reviewers: hans, arsenm, RKSimon Subscribers: wdng, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81517
-
Vedant Kumar authored
Summary: The advice in HowToUpdateDebugInfo.rst is to "... preserve the debug location of an instruction if the instruction either remains in its basic block, or if its basic block is folded into a predecessor that branches unconditionally". TryToSinkInstruction doesn't seem to satisfy the criteria as it's sinking an instruction to some successor block. Preserving the debug loc can make single-stepping appear to go backwards, or make a breakpoint hit on that location happen "too late" (since single-stepping from that breakpoint can cause the function to return unexpectedly). So, drop the debug location. Reviewers: aprantl, davide Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82487
-
Francesco Petrogalli authored
This reverts commit a15722c5. The commmit has to be reverted because I accidentally submit https://reviews.llvm.org/D82501 without the C tests that were added in an early version of the patch.
-
Melanie Blower authored
-
Florian Hahn authored
This patch adds VPValue version of the GEP's operands to VPWidenGEPRecipe and uses them during code-generation. Reviewers: Ayal, gilr, rengolin Reviewed By: gilr Differential Revision: https://reviews.llvm.org/D80220
-
JF Bastien authored
It was added to the list of builtin modifiers in r148573 back in 2012-01-20, but the comment wasn't updated.
-
Paul Walker authored
Summary: Teach LowerToPredicatedOp to lower fixed length vector operations. Add AArch64ISD nodes and isel patterns for predicated integer and floating point adds. Together this enables SVE code generation for fixed length vector adds. Reviewers: rengolin, efriedma Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82483
-
Nick Desaulniers authored
A seemingly innocuous Linux kernel change [0] seemingly blew up our compile times by over 3x, as reported by @nathanchance in [1]. The code in question uses a doubly nested macro containing GNU C statement expressions that are then passed to typeof(), which is then used in a very important macro for atomic variable access throughout most of the kernel. The inner most macro, is passed a GNU C statement expression. In this case, we have macro arguments that are GNU C statement expressions, which can contain a significant number of tokens. The upstream kernel patch caused significant build time regressions for both Clang and GCC. Since then, some of the nesting has been removed via @melver, which helps gain back most of the lost compilation time. [2] Profiles collected [3] from compilations of the slowest TU for us in the kernel show: * 51.4% time spent in clang::TokenLexer::updateLocForMacroArgTokens * 48.7% time spent in clang::SourceManager::getFileIDLocal * 35.5% time spent in clang::SourceManager::isOffsetInFileID (mostly calls from the former through to the latter). So it seems we have a pathological case for which properly tracking the SourceLocation of macro arguments is significantly harming build performance. This stands out in referenced flame graph. In fact, this case was identified previously as being problematic in commit 3339c568 ("[Lex] Speed up updateConsecutiveMacroArgTokens (NFC)") Looking at the above call chain, there's 3 things we can do to speed up this case. 1. TokenLexer::updateConsecutiveMacroArgTokens() calls SourceManager::isWrittenInSameFile() which calls SourceManager::getFileID(), which is both very hot and very expensive to call. SourceManger has a one entry cache, member LastFileIDLookup. If that isn't the FileID for a give source location offset, we fall back to a linear probe, and then to a binary search for the FileID. These fallbacks update the one entry cache, but noticeably they do not for the case of macro expansions! For the slowest TU to compile in the Linux kernel, it seems that we miss about 78.67% of the 68 million queries we make to getFileIDLocal that we could have had cache hits for, had we saved the macro expansion source location's FileID in the one entry cache. [4] I tried adding a separate cache item for macro expansions, and to check that before the linear then binary search fallbacks, but did not find it faster than simply allowing macro expansions into the one item cache. This alone nets us back a lot of the performance loss. That said, this is a modification of caching logic, which is playing with a double edged sword. While it significantly improves the pathological case, its hard to say that there's not an equal but opposite pathological case that isn't regressed by this change. Though non-pathological cases of builds of the Linux kernel before [0] are only slightly improved (<1%) and builds of LLVM itself don't change due to this patch. Should future travelers find this change to significantly harm their build times, I encourage them to feel empowered to revert this change. 2. SourceManager::getFileIDLocal has a FIXME hinting that the call to SourceManager::isOffsetInFileID could be made much faster since isOffsetInFileID is generic in the sense that it tries to handle the more generic case of "local" (as opposed to "loaded") files, though the caller has already determined the file to be local. This patch implements a new method that specialized for use when the caller already knows the file is local, then use that in TokenLexer::updateLocForMacroArgTokens. This should be less controversial than 1, and is likely an across the board win. It's much less significant for the pathological case, but still a measurable win once we have fallen to the final case of binary search. D82497 3. A bunch of methods in SourceManager take a default argument. SourceManager::getLocalSLocEntry doesn't do anything with this argument, yet many callers of getLocalSLocEntry setup, pass, then check this argument. This is wasted work. D82498 With this patch applied, the above profile [5] for the same pathological input looks like: * 25.1% time spent in clang::TokenLexer::updateLocForMacroArgTokens * 17.2% time spent in clang::SourceManager::getFileIDLocal and clang::SourceManager::isOffsetInFileID is no longer called, and thus falls out of the profile. There may be further improvements to the general problem of "what interval contains one number out of millions" than the current use of a one item cache, followed by linear probing, followed by binary searching. We might even be able to do something smarter in TokenLexer::updateLocForMacroArgTokens. [0] https://github.com/ClangBuiltLinux/linux/commit/cdd28ad2d8110099e43527e96d059c5639809680 [1] https://github.com/ClangBuiltLinux/linux/issues/1032 [2] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=locking/kcsan&id=a5dead405f6be1fb80555bdcb77c406bf133fdc8 [3] https://github.com/ClangBuiltLinux/linux/issues/1032#issuecomment-633712667 [4] https://github.com/ClangBuiltLinux/linux/issues/1032#issuecomment-633741923 [5] https://github.com/ClangBuiltLinux/linux/issues/1032#issuecomment-634932736 Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D80681
-
Melanie Blower authored
This is to correct bugs.llvm.org/show_bug.cgi?id=46444 ffinite-math-only is a gcc option. That is the correct spelling. File modified is clang/docs/UsersManual.rst
-
Roman Lebedev authored
I'm not sure if this is a regression from D81448 + D81643, which moved at least the code cast from elsewhere, or somehow no one triggered that before. But now we can reach it with a non-instruction.. It is not straight-forward to write cost-model tests for constantexprs, `-cost-model -analyze -cost-kind=` does not appear to look at them, or maybe i'm doing it wrong. I've encountered that via a SimplifyCFG crash, so reduced (currently-crashing) test is added. There are likely other instances. For now, simply restore previous status quo of not crashing and returning TTI::TCC_Basic.
-
Louis Dionne authored
We've decided to move away from that by requiring that libc++ is built as part of the monorepo a while ago. This commit removes code pertaining to that unsupported use case and produces a clear error when the user violates that. In fact, building outside of the monorepo will still work as long as LLVM_PATH is pointing to the root of the LLVM project, although that is not officially supported.
-
Matt Arsenault authored
I spread the GlobalISel test into the regular one, which I've been avoiding so far.
-
David Tenty authored
Summary: by removing casts from unsigned to int that which may be implementation defined according to C++14 (and thus trip up the XL compiler on AIX) by just using unsigned comparisons/masks and refactor out the range constants to cleanup things a bit while we are at it. Reviewers: hubert.reinterpretcast, arsenm Reviewed By: hubert.reinterpretcast Subscribers: wdng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82197
-
Richard Barton authored
Port the remaining tests which only require mechanical changes and delete test_any.sh. * Delete old RUN lines * Replace: EXEC: ${F18} ... | ${FileCheck} ... with RUN: %f18 .. | FileCheck ... * Prepend RUN line with not when it is expected to fail Also reinstate a de-activated EXEC line and port it in the same way. Differential Revision: https://reviews.llvm.org/D82168 -
Sanjay Patel authored
PR46406 shows a pattern where we can do better, so try to clean this up before adding more code.
-
Sanjay Patel authored
-
Fangrui Song authored
* check-debuginfo-dexter runs lit tests under debuginfo-tests/dexter/ * check-debuginfo-llgdb-tests runs lit tests under debuginfo-tests/llgdb-tests/ * ... Reviewed By: tbosch Differential Revision: https://reviews.llvm.org/D82605
-
aartbik authored
Rationale: In general, passing "fastmath" from MLIR to LLVM backend is not supported, and even just providing such a feature for experimentation is under debate. However, passing fine-grained fastmath related attributes on individual operations is generally accepted. This CL introduces an option to instruct the vector-to-llvm lowering phase to annotate floating-point reductions with the "reassociate" fastmath attribute, which allows the LLVM backend to use SIMD implementations for such constructs. Oher lowering passes can start using this mechanism right away in cases where reassociation is allowed. Benefit: For some microbenchmarks on x86-avx2, speedups over 20 were observed for longer vector (due to cleaner, spill-free and SIMD exploiting code). Usage: mlir-opt --convert-vector-to-llvm="reassociate-fp-reductions" Reviewed By: ftynse, mehdi_amini Differential Revision: https://reviews.llvm.org/D82624
-
Amy Kwan authored
This patch adds LLVM intrinsics for the dcbt (Data Cache Block Touch), dcbtst (Data Cache Block Touch for Store) and isync (Instruction Synchronize) instructions. The intrinsic for dcbt and dcbst in this patch are named llvm.ppc.dcbt.with.hint and llvm.ppc.dcbtst.with.hint respectively as there already exists an intrinsic for llvm.ppc.dcbt and llvm.ppc.dcbtst. However, the original variants of the intrinsics do not accept the TH immediate field, whereas these variants do. Differential Revision: https://reviews.llvm.org/D79633
-
Eric Schweitz authored
In order for these files to build properly, this patch rolls up a number of changes that have been made to various files that have been upstreamed. Implementations for the interfaces included in Bridge.h and IntrinsicCall.h will be included in a future diff. Differential revision: https://reviews.llvm.org/D82608
-
Richard Barton authored
These tests checked for stdout and stderr in the same pipe, which does not come out in a guaranteed order. test_any.sh's FileCheck accepts CHECK lines in any order while FileCheck checks must match in order. Hand port these to pipe stdout to a temp file which is checked with a separate FileCheck RUN line to test it. Differential Revision: https://reviews.llvm.org/D82167
-
Richard Barton authored
test_any.sh's FileCheck accepts the CHECK line matches in any order while FileCheck checks in strict order. Re-order the CHECK lines to source code order - they come from an ordered datastructure. Some CHECK lines are sensitive to line number which are fixed up manually. getsymbols02 had multiple test inputs which had their own EXEC lines. Consolidate these together in one file. Differential Revision: https://reviews.llvm.org/D82166
-
Richard Barton authored
These tests are sensitive to line numbers in the input and check output. They also successively write to a temporary file then check that. Fix the line number issues and replace the temporary file use with successive calls to FileCheck with different check-prefixes. Differential Revision: https://reviews.llvm.org/D82165
-
Rong Xu authored
Add an option to always instrument function entry BB (default off) Add an option to do atomically updates on the first counter in each instrumented function. Differential Revision: https://reviews.llvm.org/D82123
-
Richard Barton authored
The regex syntax used by test_any.sh's FileCheck is sometimes incompatible with real FileCheck. Hand port these tests to use FileCheck and it's regex format. Also remove FIXME from label01 that no longer applies. Also add second run-line that enables all tests. Add some new FIXMEs for issues in original tests Differential Revision: https://reviews.llvm.org/D82164
-
Philip Reames authored
For context of anyone following along, we've not completed the migration of statepoint to the operand bundle form. The only remaining piece is to actually version the statepoint intrinsic to remove the old inline operand sets. That will follow when I have some time; delay is useful here to allow downstream migrations.
-
Nico Weber authored
This reverts commit bb26838c. Breaks Support.CacheDirectoryNoEnv, Support.CacheDirectoryWithEnv in SupportTests (part of check-llvm) on macOS.
-
Nick Desaulniers authored
Forked from D80681. getLocalSLocEntry() has an unused parameter used to satisfy an interface of libclang (see getInclusions() in clang/tools/libclang/CIndexInclusionStack.cpp). It's pointless for callers to construct/pass/check this inout parameter that can never signify that a FileID is invalid. Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D82498
-
Arthur Eubanks authored
The legacy pass is called "loop-unroll", but in the new PM it's called "unroll". Also applied to unroll-and-jam and unroll-full. Fixes various check-llvm tests when NPM is turned on. Reviewed By: Whitney, dmgreen Differential Revision: https://reviews.llvm.org/D82590
-
Kit Barton authored
Summary: In preparation for GlobalISel, PPCSubTarget needs to be renamed to Subtarget as there places in GlobalISel that assume the presence of the variable Subtarget. This patch introduces the variable Subtarget, and replaces all existing uses of PPCSubTarget with Subtarget. A subsequent patch will remove the definiton of PPCSubTarget, once any downstream users have the opportunity to rename any uses they have. Reviewers: hfinkel, nemanjai, jhibbits, #powerpc, echristo, lkail Reviewed By: #powerpc, echristo, lkail Subscribers: echristo, lkail, wuzish, nemanjai, hiraditya, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81623
-