- Dec 06, 2021
-
-
Kristina Bessonova authored
This is almost a reincarnation of https://reviews.llvm.org/D15977 originally implemented by Amjad Aboud. It was discussed on llvm-dev [0], committed with its backend counterpart [1], but finally reverted [2]. This patch makes clang to emit debug info for function-local static variables, records (classes, structs and unions) and typdefs correctly scoped if those function-local entites defined within a lexical (bracketed) block. Before this patch, clang emits all those entities directly scoped in DISubprogram no matter where they were really defined, causing debug info loss (reported several times in [3], [4], [5]). [0] https://lists.llvm.org/pipermail/llvm-dev/2015-November/092551.html [1] https://reviews.llvm.org/rG30e7a8f694a19553f64b3a3a5de81ce317b9ec2f [2] https://reviews.llvm.org/rGdc4531e552af6c880a69d226d3666756198fbdc8 [3] https://bugs.llvm.org/show_bug.cgi?id=19238 [4] https://bugs.llvm.org/show_bug.cgi?id=23164 [5] https://bugs.llvm.org/show_bug.cgi?id=44695 Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D113743
-
Matthias Springer authored
This is a cleanup of ModuleBufferization. Instead of storing information about writable function arguments in BufferizationAliasInfo, we can use isWritable and make the decision there, based on dialect-specifc bufferization state. Differential Revision: https://reviews.llvm.org/D114930
-
Balazs Benics authored
Some projects [1,2,3] have flex-generated files besides bison-generated ones. Unfortunately, the comment `"/* A lexical scanner generated by flex */"` generated by the tools is not necessarily at the beginning of the file, thus we need to quickly skim through the file for this needle string. Luckily, StringRef can do this operation in an efficient way. That being said, now the bison comment is not required to be at the very beginning of the file. This allows us to detect a couple more cases [4,5,6]. Alternatively, we could say that we only allow whitespace characters before matching the bison/flex header comment. That would prevent the (probably) unnecessary string search in the buffer. However, I could not verify that these tools would actually respect this assumption. Additionally to this, e.g. the Twin project [1] has other non-whitespace characters (some preprocessor directives) before the flex-generated header comment. So the heuristic in the previous paragraph won't work with that. Thus, I would advocate the current implementation. According to my measurement, this patch won't introduce measurable performance degradation, even though we will do 2 linear scans. I introduce the ignore-bison-generated-files and ignore-flex-generated-files to disable skipping these files. Both of these options are true by default. [1]: https://github.com/cosmos72/twin/blob/master/server/rcparse_lex.cpp#L7 [2]: https://github.com/marcauresoar/make-examples/blob/22362cdcf9dd7c597b5049ce7f176621e2e9ac7a/sandbox/count-words/lexer.c#L6 [3]: https://github.com/vladcmanea/2nd-faculty-year-Formal-Languages---Automata-assignments/blob/11abdf64629d9eb741438ba69f04636769d5a374/lab1/lex.yy.c#L6 [4]: https://github.com/KritikaChoudhary/System-Software-Lab/blob/47f5b2cfe2a2738fd54eae9f8439817f6a22034e/B_yacc/1/y1.tab.h#L2 [5]: https://github.com/VirtualMonitor/VirtualMonitor/blob/71d1bf9b1e7b392a7bd0c73dc217138dc5865651/src/VBox/Additions/x11/x11include/xorg-server-1.8.0/parser.h#L2 [6]: https://github.com/bspaulding/DrawTest/blob/3f773ceb13de14275429036b9cbc5aa19e29bab9/Framework/OpenEars.framework/Versions/A/Headers/jsgf_parser.h#L2 Reviewed By: xazax.hun Differential Revision: https://reviews.llvm.org/D114510
-
Matthias Springer authored
Remove all function calls related to buffer equivalence from bufferize implementations. Add a new PostAnalysisStep for scf.for that ensures that yielded values are equivalent to the corresponding BBArgs. (This was previously checked in `bufferize`.) This will be relaxed in a subsequent commit. Note: This commit changes two test cases. These were broken by design and should not have passed. With the new scf.for PostAnalysisStep, this bug was fixed. Differential Revision: https://reviews.llvm.org/D114927
-
Paulo Matos authored
This patch implements the intrinsic for ref.null. In the process of implementing int_wasm_ref_null_func() and int_wasm_ref_null_extern() intrinsics, it removes the redundant HeapType. This also causes the textual assembler syntax for ref.null to change. Instead of receiving an argument: `func` or `extern`, the instruction mnemonic is either ref.null_func or ref.null_extern, without the need for a further operand. Reviewed By: tlively Differential Revision: https://reviews.llvm.org/D114979
-
MaheshRavishankar authored
Adding the default implementation of `getLoopIteratorTypes` and `getLoopBounds` allows ExternalModels to override these methods. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D115101
-
Matthias Springer authored
Collect equivalent BBArgs right after the equivalence analysis of the FuncOp and before bufferizing. This is in preparation of decoupling bufferization from aliasInfo. Also gather equivalence info for CallOps, which was missing in the previous commit. Differential Revision: https://reviews.llvm.org/D114847
-
Nikita Popov authored
This adds support for header deprecation using LLVM_ATTRIBUTE_C_DEPRECATED (note that we can't use LLVM_ATTRIBUTE_DEPRECATED, which is C++ specific). This will not help people using the FFI interface, but may help people using the C headers. Differential Revision: https://reviews.llvm.org/D114936
-
Michal Terepeta authored
To support creating both a mask with just a single `true` and `false` values, I had to relax the restriction in the verifier that the rank is always equal to the length of the attribute array, in other words, we now allow: - `vector.constant_mask [0] : vector<i1>` which gets lowered to `arith.constant dense<false> : vector<i1>` - `vector.constant_mask [1] : vector<i1>` which gets lowered to `arith.constant dense<true> : vector<i1>` (the attribute list for the 0-D case must be a singleton containing either `0` or `1`) Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D115023
-
gysit authored
This revision makes the padding pattern independent of the application order. It addresses the concern that we cannot rely on the execution order of the greedy rewriter (https://reviews.llvm.org/D114689). Instead, the pattern is updated to apply repeatedly till all operations are padded. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D114851
-
Tan S. B authored
This avoids mishandling nested compound statements that are followed by another compound statement. Fixes https://llvm.org/PR38314 and https://llvm.org/PR48305. Differential Revision: https://reviews.llvm.org/D114583
-
Zi Xuan Wu authored
Add all CompressPat to map instructions between 16-bit and 32-bit with using the CompressInstEmitter infra. Although it's only used in asm printer, also enable it in asm parser to debug mapping when -enable-csky-asm-compressed-inst is on. Differential Revision: https://reviews.llvm.org/D115026
-
Noah Shutty authored
This reverts commit af69947e because it caused buildbot failures.
-
Noah Shutty authored
This adds a Debuginfod library containing the `fetchDebuginfo` function which queries servers specified by the `DEBUGINFOD_URLS` environment variable for the debuginfo, executable, or a specified source file associated with a given build id. This diff was split out from D111252. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D112758
-
Shivam Gupta authored
current link is pointing to https://llvm.org/docs/CodeGenerator.html#segmented-stacks while it point to https://llvm.org/docs/CodeGenerator.html#tail-call-optimization or id81. Differential Revision: https://reviews.llvm.org/D115119
-
Qiu Chaofan authored
Implement 'back-to-back' FX fusion according to Power10 User Manual '19.1.5.4 Fusion', not enabled by default. Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D114345
-
Nikolas Klauser authored
Disable clang-tidy checks as discussed in D114915 Reviewed By: ldionne, #libc Spies: cjdb, aheejin, libcxx-commits Differential Revision: https://reviews.llvm.org/D114985
-
Arthur O'Dwyer authored
As discussed on the Discord, 2021-12-01 through 2021-12-05. Our new consistent style for this is "don't align the right-braces" (but still align the left-braces, as shown).
-
Jack Andersen authored
Expanding on D109750. Since `DBG_VALUE` instructions have final register validity determined in `LDVImpl::handleDebugValue`, there is no apparent reason to immediately prune unused register operands as their defs are erased. Consequently, this renders `MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval` moot; gaining a substantial performance improvement. The only necessary changes involve making relevant passes consider invalid DBG_VALUE vregs uses as valid. Reviewed By: MatzeB Differential Revision: https://reviews.llvm.org/D112852
-
Jez Ng authored
We were fetching archive symbols too eagerly, bloating binary size as well as just screwing up binaries that expected to look up certain symbols only at runtime. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D115092
-
Jack Andersen authored
Improves cross-distro portability of LLVM cmake package by resolving paths for terminfo and libffi via import targets. When LLVMExports.cmake is generated for installation, it contains absolute library paths which are likely to be a common cause of portability issues. To mitigate this, the discovery logic for these dependencies is refactored into find modules which get installed alongside LLVMConfig.cmake. The result is cleaner, cmake-friendly management of these dependencies that respect the environment of the LLVM package importer. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D114327
-
Jack Andersen authored
-
Mehdi Amini authored
Also as a test for invalid ops which was missing.
-
Michael Liao authored
-
Arthur O'Dwyer authored
-
Arthur O'Dwyer authored
-
Arthur O'Dwyer authored
-
Nico Weber authored
src/ryu/*.cpp includes files relative to src, so src/ needs to be passes as -I flag now.
-
Mark de Wever authored
-
Kazu Hirata authored
-
- Dec 05, 2021
-
-
Sanjay Patel authored
Reduce code duplication for commutative pattern matching and fix a miscompile. We can't safely propagate an undef element in this transform: https://alive2.llvm.org/ce/z/s5xy55
-
Sanjay Patel authored
The last test shows a miscompile: https://alive2.llvm.org/ce/z/s5xy55
-
Sanjay Patel authored
D114962
-
Kristina Bessonova authored
-
Nilay Vaish authored
The same comment appears in the very next line. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D115018
-
Nico Weber authored
-
Mark de Wever authored
Microsoft would like to contribute its implementation of floating-point to_chars to libc++. This uses the impossibly fast Ryu and Ryu Printf algorithms invented by Ulf Adams at Google. Upstream repos: https://github.com/microsoft/STL and https://github.com/ulfjack/ryu . Licensing notes: MSVC's STL is available under the Apache License v2.0 with LLVM Exception, intentionally chosen to match libc++. We've used Ryu under the Boost Software License. This patch contains minor changes from Jorg Brown at Google, to adapt the code to libc++. He verified that it works in Google's Linux-based environment, but then I applied more changes on top of his, so any compiler errors are my fault. (I haven't tried to build and test libc++ yet.) Please tell me if we need to do anything else in order to follow https://llvm.org/docs/DeveloperPolicy.html#attribution-of-changes . Notes: * libc++'s integer charconv is unchanged (except for a small refactoring). MSVC's integer charconv hasn't been tuned for performance yet, so you're not missing anything. * Floating-point from_chars isn't part of this patch because Jorg found that MSVC's implementation (derived from our CRT's strtod) was slower than Abseil's. If you're unable to use Abseil or another implementation due to licensing or technical considerations, Microsoft would be delighted if you used MSVC's from_chars (and you can just take it, or ask us to provide a patch like this). Ulf is also working on a novel algorithm for from_chars. * This assumes that float is IEEE 32-bit, double is IEEE 64-bit, and long double is also IEEE 64-bit. * I have added MSVC's charconv tests (the whole thing: integer/floating from_chars/to_chars), but haven't adapted them to libcxx's harness at all. (These tests will be available in the microsoft/STL repo soon.) * Jorg added int128 codepaths. These were originally present in upstream Ryu, and I removed them from microsoft/STL purely for performance reasons (MSVC doesn't support int128; Clang on Windows does, but I found that x64 intrinsics were slightly faster). * The implementation is split into 3 headers. In MSVC's STL, charconv contains only Microsoft-written code. xcharconv_ryu.h contains code derived from Ryu (with significant modifications and additions). xcharconv_ryu_tables.h contains Ryu's large lookup tables (they were sufficiently large to make editing inconvenient, hence the separate file). The xmeow.h convention is MSVC's for internal headers; you may wish to rename them. * You should consider separately compiling the lookup tables (see https://github.com/microsoft/STL/issues/172 ) for compiler throughput and reduced object file size. * See https://github.com/StephanTLavavej/llvm-project/commits/charconv for fine-grained history. (If necessary, I can perform some rebase surgery to show you what Jorg changed relative to the microsoft/STL repo; currently that's all fused into the first commit.) Differential Revision: https://reviews.llvm.org/D70631
-
Mark de Wever authored
In the bootstrap build generating debug information causes an ICE. This is a work-around for llvm.org/PR52584
-
Florian Hahn authored
VPWidenIntOrFpInductionRecipes can either be constructed with a PHI and an optional cast or a PHI and a trunc instruction. Reflect this in 2 separate constructors. This also simplifies a follow-up change.
-
Kristina Bessonova authored
This is another attempt to make function-local declarations (like static variables, structs/classes and other) be correctly emitted within a lexical (bracketed) block. Fixes https://bugs.llvm.org/show_bug.cgi?id=19238. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D113741
-