- Oct 05, 2022
-
-
Amara Emerson authored
Doing so allows G_SEXT_INREG to be combined away for many vector cases. Differential Revision: https://reviews.llvm.org/D135168
-
Amara Emerson authored
As a result of making these legal, and tweaking the combine to allow vectors, we generate vector G_SEXT_INREG during legalization. The reason we want to make these legal in the first place is to allow for more combine opportunities. Once those have been done, we can just lower them back to shifts in the post-legalizer lowering. This needs to be one commit otherwise we start causing tests to fail due to incomplete support for selection etc.
-
Tarun Prabhu authored
Add the -fpass-plugin option to flang which dynamically loads LLVM passes from the shared object passed as the argument to the flag. The behavior of the option is designed to replicate that of the same option in clang and thus has the same capabilities and limitations. - Multiple instances of -fpass-plugin=path-to-file can be specified and each of the files will be loaded in that order. - The flag can be passed to both flang-new and flang-new -fc1. Differential Revision: https://reviews.llvm.org/D129156
-
Craig Topper authored
This information is not preserved in MIR today. So this patch adds information to RISCVMachineFunctionInfo when the vreg is created for the argument. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D134621
-
Michael Jones authored
Now they're only included at all if the mode is fullbuild. Differential Revision: https://reviews.llvm.org/D135221
-
Michael Jones authored
Add the macro CPU_COUNT as well as a backing function to implement the functionality. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D135179
-
bixia1 authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D135181
-
Keith Smiley authored
This matches ld64 behavior Differential Revision: https://reviews.llvm.org/D135082
-
David Blaikie authored
Let's see if it's been fixed by my recent ABI fixes...
-
Erich Keane authored
-
Keith Smiley authored
This is a requirement from ld64, so this mirrors that expectation. Most of these changes were just offsets from adding the library, or adding dyld_stub_binder which is always added when linking ld64. This also adds `%no-lsystem-lld` for the few cases where we're explicitly testing things without that. Fixes: https://github.com/llvm/llvm-project/issues/54184 Differential Revision: https://reviews.llvm.org/D135193
-
Gulfem Savrun Yeniceri authored
This reverts commit e1dd2cd0 because the original commit b20e34b3 had a dramatic increase in the build time of RTfuzzer, which caused Fuchsia Clang toolchain builders to timeout: https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8801248587754572961/overview
-
Nico Weber authored
For void f(); int main() { f(); } `lld -demangle` now produces ld64.lld: error: undefined symbol: f >>> referenced by path/to/main.o:(symbol main+0x8) instead of ld64.lld: error: undefined symbol: _f >>> referenced by path/to/main.o:(symbol _main+0x8) previously. (Without `-demangle`, it still prints `_f` and `_main`.) This does *not* match ld64's behavior, but it does match e.g. lld/COFF's behaviour. This is arguably easier to understand: clang prepends symbol names with `_` on macOS, so it seems friendly if the linker removes it again in its diagnostics. It also makes the `extern "C"` insertion diagnostics we added recently look more self-consistent. Differential Revision: https://reviews.llvm.org/D135189 -
Daniel Thornburgh authored
Adding a --build-id flag allows handling binaries that are referenced in logs from remote systems, but that aren't necessarily present on the local machine. These are fetched via debuginfod and handled as if they were input filenames. Reviewed By: jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D133992
-
Nico Weber authored
-
Lang Hames authored
-
Florian Hahn authored
Loop versioning changes the control-flow, which may impact SCEVs cached by for other loops in LoopAccessInfoManager. Clear the manager after making changes. Fixes #57825. Depends on D134609. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D134611
-
Michael Jones authored
This provides the reference implementation of rand and srand. In future this will likely be upgraded to something that supports full ints. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D135187
-
Slava Zakharin authored
This option allows running only CodeGen passes and then translating FIR to LLVM IR. I am using it to fetch optimized FIR after bbc, hand-modify it and then produce LLVM IR that can be fed to clang.
-
David Blaikie authored
Details posted here: https://reviews.llvm.org/D119051#3747201 3 cases that were inconsistent with the MSABI without this patch applied: https://godbolt.org/z/GY48qxh3G - field with protected member https://godbolt.org/z/Mb1PYhjrP - non-static data member initializer https://godbolt.org/z/sGvxcEPjo - defaulted copy constructor I'm not sure what's suitable/sufficient testing for this - I did verify the three cases above. Though if it helps to add them as explicit tests, I can do that too. Also, I was wondering if the other use of isTrivialForAArch64MSVC in isPermittedToBeHomogenousAggregate could be another source of bugs - I tried changing the function to unconditionally call isTrivialFor(AArch64)MSVC without testing AArch64 first, but no tests fail, so it looks like this is undertested in any case. But I had trouble figuring out how to exercise this functionality properly to add test coverage and then compare that to MSVC itself... - I got very confused/turned around trying to test this, so I've given up enough to send what I have out for review, but happy to look further into this with help. Differential Revision: https://reviews.llvm.org/D133817
-
David Green authored
performCONDCombine removes and 0xff in patterns of SUBS (and (add(..), 0xff), C) under certain complex conditions. It doesn't come up often, but in the lowering of usub.sat where the SUBS is both used as a condition and as a value, the And is removed where it would only be valid for the condition. Fixes #58109. Differential Revision: https://reviews.llvm.org/D135043
-
David Blaikie authored
Fixes: Protected members, HFA: https://godbolt.org/z/zqdK7vdKc Private members, HFA: https://godbolt.org/z/zqdK7vdKc Non-empty base, HFA: https://godbolt.org/z/PKTz59Wev User-provided ctor, HFA: https://godbolt.org/z/sfrTddcW6 Existing correct cases: Empty base class, NonHFA: https://godbolt.org/z/4veY9MWP3 - correct by accident of not allowing bases at all (see non-empty base case/fix above for counterexample) Polymorphic: NonHFA: https://godbolt.org/z/4veY9MWP3 Trivial copy assignment, HFA: https://godbolt.org/z/Tdecj836P Non-trivial copy assignment, NonHFA: https://godbolt.org/z/7c4bE9Whq Non-trivial default ctor, NonHFA: https://godbolt.org/z/Tsq1EE7b7 - correct by accident of disallowing all user-provided ctors (see user-provided non-default ctor example above for counterexample) Trivial dtor, HFA: https://godbolt.org/z/nae999aqz Non-trivial dtor, NonHFA: https://godbolt.org/z/69oMcshb1 Empty field, NonHFA: https://godbolt.org/z/8PTxsKKMK - true due to checking for the absence of padding (see comment in code) After a bunch of testing, this fixes a bunch of cases that were incorrect. Some of the tests verify the nuances of the existing behavior/code checks that were already present. This was mostly motivated by cleanup from/in D133817 which itself was motivated by D119051. By removing the incorrect use of isTrivialForAArch64MSVC here & adding more nuance to the homogeneous testing we can more safely/confidently make changes to the isTrivialFor(AArch64)MSVC to more properly align with its usage anyway. Differential Revision: https://reviews.llvm.org/D134688
-
Michał Górny authored
Add llvm_shlib_dir to variables used in clangd test suite, consistently to how it is used in the test suites of clang, clang-tools-extra and a few other components. This is necessary to ensure that the correct shared libraries are used when building clang standalone -- otherwise, use_clang() sets LD_LIBRARY_PATH to the directory containing the earlier system installation of clang rather than the just-built library. Differential Revision: https://reviews.llvm.org/D135062
-
Azat Khuzhin authored
Right now in case of LTO the section is not emited: $ cat test.c void __attribute__((optnone)) bar() { } void __attribute__((optnone)) foo() { bar(); } int main() { foo(); } $ clang -flto=thin -gdwarf-aranges -g -O3 test.c $ eu-readelf -waranges a.out | fgrep -c -e foo -e bar 0 $ clang -gdwarf-aranges -g -O3 test.c $ eu-readelf -waranges a.out | fgrep -c -e foo -e bar 2 Fix this by passing explicitly --plugin-opt=-generate-arange-section. Suggested-by:OCHyams <orlando.hyams@sony.com> Reviewed By: dblaikie, MaskRay Differential Revision: https://reviews.llvm.org/D133092
-
Nick Desaulniers authored
Follow up to D134702; it looks like we were still warning for gnu89 mode. Link: https://reviews.llvm.org/D134702 Link: https://github.com/ClangBuiltLinux/linux/issues/1720#issuecomment-1265738778 Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D135090
-
Benjamin Kramer authored
The actual transformation doesn't support multi-output GenericOps, but if we encounter one without sparse annotations we can just leave it alone. Differential Revision: https://reviews.llvm.org/D135176
-
Jan Svoboda authored
This patch provides `FileManager` with the CWD on construction in the worker, rather than later in the action. Depends on D134976. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D134977
-
Jan Svoboda authored
This patch removes the ability of a dependency scanning worker to share a `FileManager` instance between individual scans. It's not sound and doesn't provide performance benefits (due to the underlying caching VFS). Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D134976
-
Sam McCall authored
These are usually not interesting when clangd presents results in context, and the file paths are noisy.
-
Valentin Clement authored
This patch lowers `TYPE(*)` correctly to fir.box<none>. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D135141
-
jeff authored
Since SROA chooses promotion based on reaching load / stores of allocas, we may run into scenarios in which we alloca a vector, but promote it to an integer. The result of which is the familiar LoadCombine pattern (i.e. ZEXT, SHL, OR). However, instead of coming directly from distinct loads, the elements to be combined are coming from ExtractVectorElements which stem from a shared load. This patch identifies such a pattern and combines it into a load. Change-Id: I0bc06588f11e88a0a975cde1fd71e9143e6c42dd
-
Siva Chandra Reddy authored
A very simple and minimal implementation of fork is added. Future changes will add more functionality to satisfy POSIX and Linux requirements. An implementation of wait and a few support macros in sys/wait.h have also been added to help with testing the fork function. Reviewed By: lntue, michaelrj Differential Revision: https://reviews.llvm.org/D135131
-
Jakub Kuderski authored
Allow unknown types to pass through without being marked as illegal. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D135123
-
Christian Sigg authored
-
Yuanfang Chen authored
As @mizvekov suggested in D134772. This works great for D128750 when dealing with AutoType's. Reviewed By: mizvekov, erichkeane Differential Revision: https://reviews.llvm.org/D135088
-
Ram-NK authored
isOuterMostDepPositive() The function isOuterMostDepPositive() is checked after negative dependence vectors are normalized to be non-negative, so there will not be any negative dependency ('>' as the outermost non-equal sign) after normalization. And therefore the check in isOuterMostDepPositive() is irrelevent and redundant. Reviewed By: congzhe Differential Revision: https://reviews.llvm.org/D132982 -
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D135185
-
serge-sans-paille authored
Turn it into a single Expr::isFlexibleArrayMemberLike method, as discussed in https://discourse.llvm.org/t/rfc-harmonize-flexible-array-members-handling Keep different behavior with respect to macro / template substitution, and harmonize sharp edges: ObjC interface now behave as C struct wrt. FAM and -fstrict-flex-arrays. This does not impact __builtin_object_size interactions with FAM. Differential Revision: https://reviews.llvm.org/D134791 -
Eli Friedman authored
AArch64LoadStoreOptimizer has a bunch of different guards to avoid corrupting Windows SEH prologues/epilogues, but apparently we missed the case of merging two instructions where the first instruction isn't part of the epilogue, but the second instruction is. Fixes issue discovered at https://reviews.llvm.org/D130049#3704064 Differential Revision: https://reviews.llvm.org/D134992
-
Daniel Thornburgh authored
When a binary is missing section headers or symbols, objdump can't provide as good of a disassembly. This change makes objdump try to fetch a better verion of the binary by its build ID. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D132887
-