- Oct 23, 2020
-
-
Lang Hames authored
No support for relaxation yet -- this will always use the GOT entry.
-
Max Kazantsev authored
We want to have a caching version of symbolic BE exit count rather than recompute it every time we need it. Differential Revision: https://reviews.llvm.org/D89954 Reviewed By: nikic, efriedma
-
Jonas Devlieghere authored
g_expression_prefix, as the name implies, must be perfixed, not suffixed.
-
Louis Dionne authored
The runtimes build was lying to the various runtimes builds by setting XXX_STANDALONE_BUILD=ON when they are really not being built standalone. Only COMPILER_RT_STANDALONE_BUILD appears to be necessary, but setting it for the other runtimes actually breaks everything. Differential Revision: https://reviews.llvm.org/D90005
-
Jonas Devlieghere authored
The UtilityFunction ctor was dropping the text argument. Probably for that reason ClangUtilityFunction was setting the parent's member directly instead of deferring to the parent ctor. Also change the signatures to take strings which are std::moved in place.
-
Serge Pavlov authored
Now there are two main classes in Value hierarchy, which support metadata, these are Instruction and GlobalObject. They implement different APIs for metadata manipulation, which however overlap. This change moves metadata manipulation code into Value, so descendant classes can use this code for their operations on metadata. No functional changes intended. Differential Revision: https://reviews.llvm.org/D67626
-
David Blaikie authored
-
Arthur Eubanks authored
The devirtualization wrapper misses cases where if it wraps a pass manager, an individual pass may devirtualize an indirect call created by a previous pass. For example, inlining may create a new indirect call which is devirtualized by instcombine. Currently the devirtualization wrapper will not see that because it only checks cgscc edges at the very beginning and end of the pass (manager) it wraps. This fixes some tests testing this exact behavior in the legacy PM. This piggybacks off of updateCGAndAnalysisManagerForPass()'s detection of promoted ref to call edges. This supercedes one of the previous mechanisms to detect devirtualization by keeping track of potentially promoted call instructions via WeakTrackingVHs. There is one more existing way of detecting devirtualization, by checking if the number of indirect calls has decreased and the number of direct calls has increased in a function. It handles cases where calls to functions without definitions are promoted, and some tests rely on that. LazyCallGraph doesn't track edges to functions without definitions so this part can't be removed in this change. check-llvm and check-clang with -abort-on-max-devirt-iterations-reached on by default doesn't show any failures outside of tests specifically testing it so it doesn't needlessly rerun passes more than necessary. (The NPM -O2/3 pipeline run the inliner/function simplification pipeline under a devirtualization repeater pass up to 4 times by default). Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D89587
-
Duncan P. N. Exon Smith authored
-
Duncan P. N. Exon Smith authored
`SourceManager::getFileEntryRefForID`'s remaining callers just want the filename component, which is coming from the `FileInfo`. Replace the API with `getNonBuiltinFilenameForID`, which also removes another use of `FileEntryRef::FileEntryRef` outside of `FileManager`. Both callers are collecting file dependencies, and one of them relied on this API to filter out built-ins (as exposed by clang/test/ClangScanDeps/modules-full.cpp). It seems nice to continue providing that service. Differential Revision: https://reviews.llvm.org/D89508
-
Alexander Shaposhnikov authored
LD64 emits string tables which start with a space and a zero byte. This diff adjusts StringTableBuilder for linked Mach-O binaries to match LD64's behavior. Test plan: make check-all Differential revision: https://reviews.llvm.org/D89561
-
David Blaikie authored
*fingers crossed*
-
Arthur Eubanks authored
An alwaysinline function may not get inlined in inliner-wrapper due to the inlining order. Previously for the following, the inliner would first inline @a() into @b(), ``` define void @a() { entry: call void @b() ret void } define void @b() alwaysinline { entry: br label %for.cond for.cond: call void @a() br label %for.cond } ``` making @b() recursive and unable to be inlined into @a(), ending at ``` define void @a() { entry: call void @b() ret void } define void @b() alwaysinline { entry: br label %for.cond for.cond: call void @b() br label %for.cond } ``` Running always-inliner first makes sure that we respect alwaysinline in more cases. Fixes https://bugs.llvm.org/show_bug.cgi?id=46945. Reviewed By: davidxl, rnk Differential Revision: https://reviews.llvm.org/D86988 -
Duncan P. N. Exon Smith authored
`SourceManager::isMainFile` does not use the filename, so it doesn't need the full `FileEntryRef`; in fact, it's misleading to take the name because that makes it look relevant. Simplify the API, and in the process remove some calls to `FileEntryRef::FileEntryRef` in the unit tests (which were blocking making that private to `SourceManager`). Differential Revision: https://reviews.llvm.org/D89507
-
Duncan P. N. Exon Smith authored
Add helpers `getSLocEntryOrNull`, which handles the `Invalid` logic around `getSLocEntry`, and `getSLocEntryForFile`, which also checks for `SLocEntry::isFile`, and use them to reduce repeated code. Differential Revision: https://reviews.llvm.org/D89503
-
Shilei Tian authored
`size_t` has different width on 32- and 64-bit architecture, but the computation to floor to power of two assumed it is 64-bit, which can cause an integer overflow. In this patch, architecture detection is added so that the operation for 64-bit `size_t`. Thank Luke for reporting the issue. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D89878
-
Han Shen authored
This reverts commit adfb5415. This is reverted because it caused an chrome error: https://crbug.com/1140168
-
Richard Smith authored
FieldDecl is an unamed bitfield. Unnamed bitfields aren't non-static data member, so such a bitfield isn't actually the first non-static data member.
-
Nick Desaulniers authored
Forked from review of: https://reviews.llvm.org/D87956
-
Louis Dionne authored
In 5d796645, we stopped looking at the LIBCXXABI_LIBCXX_INCLUDES variable, which broke users of the Standalone build. This patch reinstates that variable, however it must point to the *installed* path of the libc++ headers, not the libc++ headers in the source tree (which has always been the case, but wasn't enforced before). If LIBCXXABI_LIBCXX_INCLUDES points to the libc++ headers in the source tree, the `__config_site` header will fail to be found.
-
Wei Mi authored
to their parent classes. SampleProfileReaderExtBinary/SampleProfileWriterExtBinary specify the typical section layout currently used by SampleFDO. Currently a lot of section reader/writer stay in the two classes. However, as we expect to have more types of SampleFDO profiles, we hope those new types of profiles can share the common sections while configuring their own sections easily with minimal change. That is why I move some common stuff from SampleProfileReaderExtBinary/SampleProfileWriterExtBinary to SampleProfileReaderExtBinaryBase/SampleProfileWriterExtBinaryBase so new profiles class inheriting from the base class can reuse them. Differential Revision: https://reviews.llvm.org/D89524
-
David Blaikie authored
-
Jessica Paquette authored
Move the code which adjusts the immediate/predicate on a G_ICMP to AArch64PostLegalizerLowering. This - Reduces the number of places we need to test for optimized compares in the selector. We know that the compare should have been simplified by the time it hits the selector, so we can avoid testing this in selects, brconds, etc. - Allows us to potentially fold more compares (previously, this optimization was only done after calling `tryFoldCompare`, this may allow us to hit some more TST cases) - Simplifies the selection code in `emitIntegerCompare` significantly; we can just use an emitSUBS function. - Allows us to avoid checking that the predicate has been updated after `emitIntegerCompare`. Also add a utility header file for things that may be useful in the selector and various combiners. No need for an implementation file at this point, since it's just one constexpr function for now. I've run into a couple cases where having one of these would be handy, so might as well add it here. There are a couple functions in the selector that can probably be factored out into here. Differential Revision: https://reviews.llvm.org/D89823
-
Fangrui Song authored
For a diagnostic `A refers to B` where B refers to a bitcode file, if the symbol gets optimized out, the user may see `A refers to <internal>`; if the symbol is retained, the user may see `A refers to lto.tmp`. Save the reference InputFile * in the DenseMap so that the original filename is available in reportBackrefs().
-
Nico Weber authored
-
Jessica Paquette authored
There are a lot of combines in AArch64PostLegalizerCombiner which exist to facilitate instruction matching in the selector. (E.g. matching for G_ZIP and other shuffle vector pseudos) It still makes sense to select these instructions at -O0. Matching earlier in a combiner can reduce complexity in the selector significantly. For example, a good portion of our selection code for compares would be a lot easier to represent in a combine. This patch moves matching combines into a "AArch64PostLegalizerLowering" combiner which runs at all optimization levels. Also, while we're here, improve the documentation for the AArch64PostLegalizerCombiner, and fix up the filepath in its file comment. And also add a 'r' which somehow got dropped from a bunch of function names. https://reviews.llvm.org/D89820
-
Yitzhak Mandelbaum authored
This functionality is commonly needed in clang tidy checks (based on transformer) that only print warnings, without suggesting any edits. The no-op edit allows the user to associate a diagnostic message with a source location. Differential Revision: https://reviews.llvm.org/D89961
-
Jan Korous authored
Follow-up to e7870223 Differential Revision: https://reviews.llvm.org/D86230
-
LemonBoy authored
Some early errors during the ASTUnit creation were not transferred to the `FailedParseDiagnostic` so when the code in `LoadFromCommandLine` swaps its content with the content of `StoredDiagnostics` they cannot be retrieved by the user in any way. Reviewed By: andrewrk, dblaikie Differential Revision: https://reviews.llvm.org/D78658
-
Louis Dionne authored
-
Alexander Shaposhnikov authored
Virtual sections do not contribute to the final output size. This diff fixes the corresponding calculations in the method MachOWriter::totalSize. Test plan: make check-all Differential revision: https://reviews.llvm.org/D89661
-
Kostya Kortchinsky authored
This is a redo of D89908, which triggered some `-Werror=conversion` errors with GCC due to assignments to the 31-bit variable. This CL adds to the original one a 31-bit mask variable that is used at every assignment to silence the warning. Differential Revision: https://reviews.llvm.org/D89984
-
Nikita Popov authored
Per asbirlea's comment, assert that only instructions, constants and arguments are passed to this API. Simplify returning true would not be correct for special Value subclasses like MemoryAccess.
-
Nikita Popov authored
Visited phi blocks only need to be added for the duration of the recursive alias queries, they should not leak into following code. Once again, while this also improves analysis precision, this is mainly intended to clarify the applicability scope of VisitedPhiBBs.
-
Xiangling Liao authored
1. Emit error for -G driver option on AIX 2. Adjust cmake file to use -Wl,-G instead of -G On AIX, legacy XL compiler uses -G to produce a shared object enabled for use with the run-time linker, which has different meanings from what it is used for in Clang. And in Clang, other targets do not have -G map to another functionality in their legacy compiler. So this error is more important when we are on AIX. Differential Revision: https://reviews.llvm.org/D89897
-
Nikita Popov authored
We only need the VisitedPhiBBs to disambiguate comparisons of values from two different loop iterations. If we're comparing two phis from the same basic block in lock-step, the compared values will always be on the same iteration. While this also increases precision, this is mainly intended to clarify the scope of VisitedPhiBBs.
-
Venkataramanan Kumar authored
Differential Revision: https://reviews.llvm.org/D88154
-
Nikita Popov authored
This reverts commit 9903b058. Causes build failures (on GCC 10.2) with the following error: In file included from /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/combined.h:29, from /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/allocator_config.h:12, from /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp:14: /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/../../gwp_asan/guarded_pool_allocator.h: In member function ‘bool gwp_asan::GuardedPoolAllocator::shouldSample()’: /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/../../gwp_asan/guarded_pool_allocator.h:82:69: error: conversion from ‘uint32_t’ {aka ‘unsigned int’} to ‘unsigned int:31’ may change value [-Werror=conversion] 82 | (getRandomUnsigned32() % (AdjustedSampleRatePlusOne - 1)) + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
-
Nikita Popov authored
-
Kirill Bobyrev authored
Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D89852
-