- Feb 08, 2022
-
-
wangpc authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D119212
-
Lang Hames authored
Adds construction from std::string, an ostream &operator<< and std::hash specialization. Also adds unit tests for each of these operations, as well as tests for copy construction and assignment. These new operations will be used in upcoming macho_platform patches.
-
Lang Hames authored
Replace references to 'span' in string_view tests that were originally copied from span tests.
-
Keith Smiley authored
I discovered some of these tests had `cmp` statements that weren't actually being run. I had also recently copied this broken setup for a new test around chained fixups. Fixing this revealed that the binaries did differ because of their code signature so I regenerated the fixture here with this source: ```c int main() { return 0; } ``` Passing `-Wl,-no_adhoc_codesign` on my M1 machine to make sure it didn't get any signature. Differential Revision: https://reviews.llvm.org/D119203 -
Keith Smiley authored
Follow up from https://reviews.llvm.org/D118526 Differential Revision: https://reviews.llvm.org/D119149
-
Chuanqi Xu authored
Since the serialization code would recognize modules by names and the name of all global module fragment is <global>, so that the serialization code would complain for the same module. This patch fixes this by using a unique global module fragment in Sema. Before this patch, the compiler would fail on an assertion complaining the duplicated modules. Reviewed By: urnathan, rsmith Differential Revision: https://reviews.llvm.org/D115610
-
Chuanqi Xu authored
See the discussion in https://reviews.llvm.org/D100282. The coroutine marked always inline might not be inlined properly in current compiler support. Since the coroutine would be splitted into pieces. And the call to resume() and destroy() functions might be indirect call. Also the ramp function wouldn't get inlined under O0 due to pipeline ordering problems. It might be different to what users expects to. Emit a warning to tell it. This is what GCC does too: https://godbolt.org/z/7eajb1Gf8 Reviewed By: Quuxplusone Differential Revision: https://reviews.llvm.org/D115867
-
River Riddle authored
FunctionPass has been deprecated in favor of OperationPass<FuncOp> for a few weeks, and this commit finished the deprecation with deletion. The only difference between the two is that FunctionPass filters out function declarations. When updating references to FunctionPass, ensure that the pass either can handle declarations or explicitly add in filtering. See https://llvm.discourse.group/t/functionpass-deprecated-in-favor-of-operationpass-funcop Differential Revision: https://reviews.llvm.org/D118735
-
River Riddle authored
The parser/printer fields are deprecated and in the process of being removed.
-
River Riddle authored
The parser/printer fields are deprecated and in the process of being removed.
-
River Riddle authored
These have generally been replaced by better ODS functionality, and do not need to be explicitly provided anymore. Differential Revision: https://reviews.llvm.org/D119065
-
River Riddle authored
Differential Revision: https://reviews.llvm.org/D119093
-
River Riddle authored
Currently if an operation wants a C++ implemented parser/printer, it specifies inline code blocks. This is quite problematic for various reasons, e.g. it requires defining C++ inside of Tablegen which is discouraged when possible, but mainly because nearly all usages simply forward to static functions (e.g. `static void parseSomeOp(...)`) with users devising their own standards for how these are defined. This commit adds support for a `hasCustomAssemblyFormat` bit field that specifies if a C++ parser/printer is needed, and when set to 1 declares the parse/print methods for operations to override. For migration purposes, the existing behavior is untouched. Upstream usages will be replaced in a followup to keep this patch focused on the new implementation. Differential Revision: https://reviews.llvm.org/D119054
-
Arthur Eubanks authored
Take the following as an example struct z { z (*p)(); }; z f(); When we attempt to get the LLVM type of f, we recurse into z. z itself has a function pointer with the same type as f. Given the recursion, Clang simply treats z::p as a pointer to an empty struct `{}*`. The LLVM type of f is as expected. So we have two different potential LLVM types for a given Clang type. If we store one of those into the cache, when we access the cache with a different context (e.g. we are/aren't recursing on z) we may get an incorrect result. There is some attempt to clear the cache in these cases, but it doesn't seem to handle all cases. This change makes it so we only use the cache when we are not in any sort of function context, i.e. `noRecordsBeingLaidOut() && FunctionsBeingProcessed.empty()`, which are the cases where we may decide to choose a different LLVM type for a given Clang type. LLVM types for builtin types are never recursive so they're always ok. This allows us to clear the type cache less often (as seen with the removal of one of the calls to `TypeCache.clear()`). We still need to clear it when we use a placeholder type then replace it later with the final type and other dependent types need to be recalculated. I've added a check that the cached type matches what we compute. It triggered in this test case without the fix. It's currently not check-clang clean so it's not on by default for something like expensive checks builds. This change uncovered another issue where the LLVM types for an argument and its local temporary don't match. For example in type-cache-3, when expanding z::dc's argument into a temporary alloca, we ConvertType() the type of z::p which is `void ({}*)*`, which doesn't match the alloca GEP type of `{}*`. No noticeable compile time changes: https://llvm-compile-time-tracker.com/compare.php?from=3918dd6b8acf8c5886b9921138312d1c638b2937&to=50bdec9836ed40e38ece0657f3058e730adffc4c&stat=instructions Fixes #53465. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D118744 -
Sameer Sahasrabuddhe authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D119087
-
Carl Ritson authored
Conversatively allow hoisting/sinking of VALU comparisons. If the result of a comparison is masked with exec, narrowing the set of active lanes, then it is safe to hoist it as the masking instruction will never by hoisted. Heuristically this is also true for sinking, as we do not expect the result of a sunk comparison that is masked with exec to be used outside of the loop. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D118975
-
Johannes Doerfert authored
The helper `Attributor::checkForAllReturnedValuesAndReturnInsts` simplifies the returned value optimistically. In `AAUndefinedBehavior` we cannot use such optimistic values when deducing UB. As a result, we assumed UB for the return value of a function because we initially (=optimistically) thought the function return is `undef`. While we later adjusted this properly, the `AAUndefinedBehavior` was under the impression the return value is "known" (=fix) and could never change. To correct this we use `Attributor::checkForAllInstructions` and then manually to perform simplification of the return value, only allowing known values to be used. This actually matches the other UB deductions. Fixes #53647
-
Johannes Doerfert authored
Use existing functionality to strip constant offsets that works well with AS casts and avoids the code duplication. Since we strip AS casts during the computation of the offset we also need to adjust the APInt properly to avoid mismatches in the bit width. This code ensures the caller of `compute` sees APInts that match the index type size of the value passed to `compute`, not the value result of the strip pointer cast. Fixes #53559. Differential Revision: https://reviews.llvm.org/D118727
-
Sheng authored
This patch implements CallLowering::lowerCall based on M68k calling convention and adds M68kOutgoingValueHandler and CallReturnHandler to handle argument passing and returned value.
-
Tue Ly authored
-
Jez Ng authored
This makes it easier to pinpoint the source of the problem. TODO: Have more relocation error messages make use of this functionality. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D118798
-
Craig Topper authored
-
Lancelot Six authored
-
Sheng authored
-
Sheng authored
-
Alex Lorenz authored
Compiler-rt started emitting the macho_embedded libraries in `<resource_dir>/lib/darwin/macho_embedded` after https://reviews.llvm.org/D105765 / 1e03c37b, so update the clang's driver to reflect that. Differential Revision: https://reviews.llvm.org/D115403
-
Vladislav Khmelevsky authored
Place include elf.h under !apple condition Differential Revision: https://reviews.llvm.org/D119038
-
Nikolas Klauser authored
Many CI runs are very similar in nature. Let's put them into groups for a better overview Reviewed By: ldionne, #libc Spies: libcxx-commits, arichardson, mstorsjo Differential Revision: https://reviews.llvm.org/D119059
-
Vladislav Khmelevsky authored
Enable peephole optimizations for aarch64. Also small code refactoring - add PeepholeOpts under Peepholes class. Vladislav Khmelevsky, Advanced Software Technology Lab, Huawei Differential Revision: https://reviews.llvm.org/D118732
-
Craig Topper authored
We use splat_vector for FP nodes without VL, not SplatPat which handles splat_vector and integer VMV_V_X_VL. Reduces isel table size by a few hundred bytes.
-
Craig Topper authored
Differential Revision: https://reviews.llvm.org/D119185
-
Nico Weber authored
-
Joe Loser authored
Some members are public but should be private. Nothing requires they are public right now, so make them private. Differential Revision: https://reviews.llvm.org/D119097
-
Mahesh Ravishankar authored
This reverts commit d7303364.
-
Louis Dionne authored
Back in https://reviews.llvm.org/D109459, we stopped using the C++03 emulation for std::nullptr_t by default, which was an ABI break. We still left a knob for users to turn it back on if they were broken by the change, with a note that we would remove that knob after one release. The time has now come to remove the knob and clean up the std::nullptr_t emulation. Differential Revision: https://reviews.llvm.org/D114786
-
Mahesh Ravishankar authored
There are a few different test passes that check elementwise fusion in Linalg. Consolidate them to a single pass controlled by different pass options (in keeping with how `TestLinalgTransforms` exists).
-
Dave Lee authored
Update `__init__.py` generation to implement `__lldb_init_module`, which calls `__lldb_init_module` on submodules that define it. This allows the use case where a user runs `command script import lldb.macosx`. With this change, the `__lldb_init_module` function in `crashlog.py` and `heap.py` will be run, which is where command registration is occurring. Differential Revision: https://reviews.llvm.org/D119179
-
Keith Smiley authored
libtool can currently produce 2 warnings: 1. No symbols were in the object file 2. An object file with the same basename was specified multiple times The first warning here is often harmless and may just mean you have some translation units with no symbols for the target you're building for. The second warning can lead to real issues like those mentioned in https://reviews.llvm.org/D113130 where ODR violations can slip in. This introduces a new -warnings_as_errors flag that can be used by build systems that want to verify they never hit these warnings. For example with bazel the libtool caller first uniques names to make sure the duplicate base name case is not possible, but if that doesn't work as expected, having it fail would be preferred. It's also worth noting that llvm-libtool-darwin works around an issue that cctools libtool experiences related to debug info and duplicate basenames, the workaround is described here: https://github.com/llvm/llvm-project/blob/30baa5d2a450d5e302d8cba3fc7a26a59d4b7ae1/llvm/lib/Object/ArchiveWriter.cpp#L424-L465 And it avoids this bug: https://github.com/keith/radars/tree/f0cbbb1c37126ec6528c132510b29e08566377a7/DuplicateBasenameIssue Differential Revision: https://reviews.llvm.org/D118931
-
Sanjay Patel authored
This is a translation of the transform added to InstCombine with: D118539
-
Ruslan Arutyunyan authored
containers Add test cases for iteration over the ordered associative container from end to begin using operator-- Reviewed By: Quuxplusone, rarutyun Differential Revision: https://reviews.llvm.org/D118114
-