- Apr 27, 2021
-
-
Lang Hames authored
Adds support for creating custom MaterializationUnits in the C API with the new LLVMOrcCreateCustomMaterializationUnit function. Modifies ownership rules for LLVMOrcAbsoluteSymbols to make it consistent with LLVMOrcCreateCustomMaterializationUnit. This is an ABI breaking change for any clients of the LLVMOrcAbsoluteSymbols API. Adds LLVMOrcLLJITGetObjLinkingLayer and LLVMOrcObjectLayerEmit functions to allow clients to get a reference to an LLJIT instance's linking layer, then emit an object file using it. This can be used to support construction of custom materialization units in the common case where those units will generate an object file that needs to be emitted to complete the materialization.
-
Lang Hames authored
Rename JITTargetSymbolFlags to JITSymbolTargetFlags. This matches the convention used for JITSymbolGenericFlags.
-
Fangrui Song authored
In LLVM_ENABLE_STATS=0 builds, `llvm::Statistic` maps to `llvm::NoopStatistic` but has 3 unused pointers. GlobalOpt considers that the pointers can potentially retain allocated objects, so GlobalOpt cannot optimize out the `NoopStatistic` variables (see D69428 for more context), wasting 23KiB for stage 2 clang. This patch makes `NoopStatistic` empty and thus reclaims the wasted space. The clang size is even smaller than applying D69428 (slightly smaller in both .bss and .text). ``` # This means the D69428 optimization on clang is mostly nullified by this patch. HEAD+D69428: size(.bss) = 0x0725a8 HEAD+D101211: size(.bss) = 0x072238 # bloaty - HEAD+D69428 vs HEAD+D101211 # With D101211, we also save a lot of string table space (.rodata). FILE SIZE VM SIZE -------------- -------------- -0.0% -32 -0.0% -24 .eh_frame -0.0% -336 [ = ] 0 .symtab -0.0% -360 [ = ] 0 .strtab [ = ] 0 -0.2% -880 .bss -0.0% -2.11Ki -0.0% -2.11Ki .rodata -0.0% -2.89Ki -0.0% -2.89Ki .text -0.0% -5.71Ki -0.0% -5.88Ki TOTAL ``` Note: LoopFuse is a disabled pass. This patch adds `#if LLVM_ENABLE_STATS` so `OptimizationRemarkMissed` is skipped in LLVM_ENABLE_STATS==0 builds. If these `OptimizationRemarkMissed` are useful and not noisy, we can replace `llvm::Statistic` with `llvm::TrackingStatistic` in the future. Reviewed By: lattner Differential Revision: https://reviews.llvm.org/D101211 -
Craig Topper authored
This modifies my previous patch to push the strided load formation to isel. This gives us opportunity to fold the splat into a .vx operation first. Using a scalar register and a .vx operation reduces vector register pressure which can be important for larger LMULs. If we can't fold the splat into a .vx operation, then it can make sense to use a strided load to free up the vector arithmetic ALU to do actual arithmetic rather than tying it up with vmv.v.x. Reviewed By: khchen Differential Revision: https://reviews.llvm.org/D101138
-
Fangrui Song authored
Add LLVM_ATTRIBUTE_USED to fix problems which could be exposed by aggressive global pointer variable removal Note to BuryPointer.cpp:GraveYard. 'unused' cannot prevent (1) dead store elimination and (2) removal of the global pointer variable (D69428) but 'used' can. Discovered when comparing link maps between HEAD+D69428 and HEAD. Reviewed By: lattner Differential Revision: https://reviews.llvm.org/D101217
-
Fangrui Song authored
[gcov] Set nounwind and respect module flags metadata "frame-pointer" & "uwtable" for synthesized functions This applies the D100251 mechanism to the gcov instrumentation pass. With this patch, `-fno-omit-frame-pointer` in `clang -fprofile-arcs -O1 -fno-omit-frame-pointer` will be respected for synthesized `__llvm_gcov_writeout,__llvm_gcov_reset,__llvm_gcov_init` functions: the frame pointer will be kept (note: on many targets -O1 eliminates the frame pointer by default). `clang -fno-exceptions -fno-asynchronous-unwind-tables -g -fprofile-arcs` will produce .debug_frame instead of .eh_frame. Fix: https://github.com/ClangBuiltLinux/linux/issues/955 Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D101129
-
Leonard Chan authored
This is undefined if SANITIZER_SYMBOLIZER_MARKUP is 1, which is the case for Fuchsia, and will result in a undefined symbol error. This function is needed by hwasan for online symbolization, but is not needed for us since we do offline symbolization. Differential Revision: https://reviews.llvm.org/D99386
-
Arthur O'Dwyer authored
params.py:106: SyntaxWarning: "is" with a literal. Did you mean "=="?
-
Arthur O'Dwyer authored
When checking the strong exception guarantee, also check that iterators haven't been invalidated. Reviewed as part of https://reviews.llvm.org/D98573
-
Arthur O'Dwyer authored
This reverts a large chunk of http://reviews.llvm.org/D15862 , and also fixes bugs in `insert`, `append`, and `assign`, which are now regression-tested. (Thanks to Tim Song for pointing out the bug in `append`!) Before this patch, we did a special dance in `append`, `assign`, and `insert` (but not `replace`). All of these require the strong exception guarantee, even when the user-provided InputIterator might have throwing operations. The naive way to accomplish this is to construct a temporary string and then append/assign/insert from the temporary; i.e., finish all the potentially throwing and self-inspecting InputIterator operations *before* starting to modify self. But this is slow, so we'd like to skip it when possible. The old code (D15682) attempted to check that specific iterator operations were nothrow: it assumed that if the iterator operations didn't throw, then it was safe to iterate the input range multiple times and therefore it was safe to use the fast-path non-naive version. This was wrong for two reasons: (1) the old code checked the wrong operations (e.g. checked noexceptness of `==`, but the code that ran used `!=`), and (2) the conversion of value_type to char could still throw, or inspect the contents of self. The new code is much simpler, although still much more complicated than it really could be. We'll likely revisit this codepath at some point, but for now this patch suffices to get it passing all the new regression tests. The added tests all fail before this patch, and succeed afterward. See https://quuxplusone.github.io/blog/2021/04/17/pathological-string-appends/ Differential Revision: https://reviews.llvm.org/D98573
-
Arthur O'Dwyer authored
This allows us to turn -Wdeprecated-copy back on. We turned it off in 3b71de41 because Clang's implementation became more stringent and started diagnosing the old code here. Differential Revision: https://reviews.llvm.org/D101183
-
Nico Weber authored
$ git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
-
Nico Weber authored
-
Siva Chandra Reddy authored
Infrastructure needed for setting up the diff binaries has been added. Along the way, an exhaustive test for sinf and cosf have also been added. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D101276
-
Ali Tamur authored
Currently llvm-dwp only handled DW_FORM_string and DW_FORM_GNU_str_index; with this patch it also starts to handle DW_FORM_strx[1-4]? Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D75485
-
Guillaume Chatelet authored
Aligned copy used to be 'destination aligned' for x86 but this decision was reverted in D93457 where we noticed that it was better for ARM to be 'source aligned'. More benchmarking confirmed that it can be up to 30% faster to align copy to destination for x86. This Patch offers both implementations and switches x86 back to destination aligned. It also fixes alignment to 32 byte on x86. Differential Revision: https://reviews.llvm.org/D101296
-
Martin Storsjö authored
This primarily parses a different set of options and invokes the same resource compiler as llvm-rc normally. Additionally, it can convert directly to an object file (which in MSVC style setups is done with the separate cvtres tool, or by the linker). (GNU windres also supports other conversions; from coff object file back to .res, and from .res or object file back to .rc form; that's not yet implemented.) The other bigger complication lies in being able to imply or pass the intended target triple, to let clang find the corresponding mingw sysroot for finding include files, and for specifying the default output object machine format. It can be implied from the tool triple prefix, like `<triple>-[llvm-]windres` or picked up from the windres option e.g. `-F pe-x86-64`. In GNU windres, that option takes BFD style format names such as pe-i386 or pe-x86-64. As libbfd in binutils doesn't support Windows on ARM, there's no such canonical name for the ARM tar...
-
Chris Lattner authored
This tidies up the code a bit: * Eliminate the ctx member, which doesn't need to be stored. * Rename verify(Operation) to make it more clear that it is doing more than verifyOperation and that the dominance check isn't being done multiple times. * Rename mayNotHaveTerminator which was confusing about whether it wasn't known whether it had a terminator, when it is really about whether it is legal to have a terminator. * Some minor optimizations: don't check for RegionKindInterface if there are no regions. Don't do two passes over the operations in a block in OperationVerifier::verifyDominance when one will do. The optimizations are actually a measurable (but minor) win in some CIRCT cases. Differential Revision: https://reviews.llvm.org/D101267
-
Chris Lattner authored
Differential Revision: https://reviews.llvm.org/D101269
-
Alex Lorenz authored
This ensures that the Darwin driver uses a consistent target triple representation when the triple is printed out to the user. Differential Revision: https://reviews.llvm.org/D100807
-
Joseph Huber authored
Summary: Add an FAW entry detailing the support for using dynamically linked libraries with OpenMP Offloading
-
Tim Renouf authored
Hopefully stops sanitizer fail in AMDGPU llvm-objdump test. Change-Id: I7331151d1cb65292bd06b6ae283349fe7231cf6b
-
Stephen Kelly authored
Some AST classes return `const DeclarationNameInfo &` instead of returning by value (eg CXXDependentScopeMemberExpr).
-
Moritz Sichert authored
Differential Revision: https://reviews.llvm.org/D95596
-
Jin Lin authored
The order of global variables is generated in the order of recursively materializing variables if the global variable has the attribute of hasLocalLinkage or hasLinkOnceLinkage during the module merging. In practice, it is often the exact reverse of source order. This new order may cause performance regression. The change is to preserve the original lexical order for global variables. Reviewed By: jdoerfert, dexonsmith Differential Revision: https://reviews.llvm.org/D94202
-
Sebastian Neubauer authored
Due to a bug in update_llc_test_checks.py, the test is wrongly coalesced between run lines. Remove common check prefix to fix that. NFC.
-
Wael Yehia authored
In D100350, we switched off thinLTO on the AIX OS. So, XFAIL tests that invoke clang with -flto=thin on AIX.
-
Raphael Isemann authored
The test added in D100977 is failing to compile on these platforms. This seems to be caused by GCC, MSVC and Clang@Windows rejecting the code because `ToLayout` isn't complete when pointer_to_member_member is declared (even though that seems to be valid code). This also reverts the test changes in the lazy-loading test from D100977 as that failed for the same reason.
-
William S. Moses authored
Explose LLVM Lexer for usage externally as an API Differential Revision: https://reviews.llvm.org/D100920
-
Frederik Gossen authored
Differential Revision: https://reviews.llvm.org/D101170
-
Jonas Devlieghere authored
Update lldb-server to not use fork or vfork on watchOS and tvOS as these functions are explicitly marked unavailable there. llvm-project/lldb/test/API/tools/lldb-server/main.cpp:304:11: error: 'fork' is unavailable: not available on watchOS if (fork() == 0) ^ WatchSimulator6.2.sdk/usr/include/unistd.h:447:8: note: 'fork' has been explicitly marked unavailable here pid_t fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; ^ llvm-project/lldb/test/API/tools/lldb-server/main.cpp:307:11: error: 'vfork' is unavailable: not available on watchOS if (vfork() == 0) ^ WatchSimulator6.2.sdk/usr/include/unistd.h:602:8: note: 'vfork' has been explicitly marked unavailable here pid_t vfork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; ^ -
Peter Steinfeld authored
We were not checking that attributes that are supposed to be specific to dummy arguments were not being used for local entities. I added the checks along with tests for them. After implementing these new checks, I found that one of the tests in separate-mp02.f90 was erroneous, and I fixed it. Differential Revision: https://reviews.llvm.org/D101126
-
- Apr 26, 2021
-
-
Alexey Bader authored
-
- Apr 27, 2021
-
-
Wenlei He authored
CSSPGO only supports text and extended binary profile now. Raw binary does not have the metadata section CSSPGO needs, and Compact binary profile needs special handling for GUID based context names, which is not yet implemented. Disasslow these two format for CSSPGO profile writing to avoid silently generating invalid profiles. Differential Revision: https://reviews.llvm.org/D101300
-
- Apr 26, 2021
-
-
Michael Kruse authored
When replacing a conditional branch by an unconditional one because the condition is a constant, transfer the metadata to the new branch instruction. Part of fix for llvm.org/PR50060 Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D101141
-
Frederik Gossen authored
Ensure to preserve the correct type during when folding and canonicalization. `shape.broadcast` of of a single operand can only be folded away if the argument type is correct. Differential Revision: https://reviews.llvm.org/D101158
-
Mark de Wever authored
Seems our check-generated-output doesn't work as intended. Will investigate it further.
-
Sebastian Neubauer authored
Use MapVector instead of SmallDenseMap because it has a deterministic iteration order. Differential Revision: https://reviews.llvm.org/D101299
-
Alexey Bader authored
Initial version of the document covers address space handling Differential Revision: https://reviews.llvm.org/D99488
-