- Dec 09, 2020
-
-
Jinsong Ji authored
-
Mehdi Amini authored
-
Kazu Hirata authored
The declaration was introduced without a corresponding definition on Feb 2, 2016 in commit e1100f53.
-
Kazu Hirata authored
-
Sam Clegg authored
The main this this test does is to add the `IsNotPIC` predicate to the all the atomic instructions pattern that directly refer to `tglobaladdr`. This is because in PIC mode we need to generate separate instruction sequence (either a direct global.get, or __memory_base + offset) for accessing global addresses. As part of this change I noticed that many of the `Requires` attributes added to the instruction in `WebAssemblyInstrAtomics.td` were being honored. This is because the wrapped in a `let Predicates = [HasAtomics]` block and it seems that that outer wrapping overrides any `Requires` on defs within it. As a workaround I removed the outer `let` and added `HasAtomics` to all the inner `Requires`. I believe that all the instrucitons that don't have `Requires` explicit bottom out in `ATOMIC_I` and `ATOMIC_NRI` which have `HasAtomics` so this should not remove this predicate from any patterns (at least that is the idea). The alternative to this approach looks like implementing something like `PredicateControl` in `Mips.td` where we can split the predicates into groups so they don't clobber each other. Differential Revision: https://reviews.llvm.org/D92744
-
Dávid Bolvanský authored
-
Duncan P. N. Exon Smith authored
Allow hashing FileEntryRef and DirectoryEntryRef via `hash_value`, and use that to implement `DenseMapInfo`. This hash should be equal whenever the entry is the same (the name used to reference it is not relevant). Also add `DirectoryEntryRef::isSameRef` to simplify the implementation and facilitate testing. Differential Revision: https://reviews.llvm.org/D92627
-
Chen Zheng authored
Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D92393
-
Duncan P. N. Exon Smith authored
Add an overload of `RedirectingFileSystem::create` that builds a redirecting filesystem off of a simple vector of string pairs. This is intended to be used to support `clang::arcmt::FileRemapper` and `clang::PreprocessorOptions::RemappedFiles`. Differential Revision: https://reviews.llvm.org/D91317
-
Duncan P. N. Exon Smith authored
Uniformly return uniquely-owned filesystems from VFS creation APIs. The one exception is `getRealFileSystem`, which has a single instance and needs to be shared. This is almost NFC, except that it fixes a memory leak in `vfs::collectVFSFromYAML()`. Depends on https://reviews.llvm.org/D92888 Differential Revision: https://reviews.llvm.org/D92890
-
Duncan P. N. Exon Smith authored
Allow a `std::unique_ptr` to be moved into the an `IntrusiveRefCntPtr`, and remove a couple of now-unnecessary `release()` calls. Differential Revision: https://reviews.llvm.org/D92888
-
Wei Mi authored
MD5 is used. Currently during sample profile loading, NameTable has to be loaded entirely up front before any name string is retrieved. That is because NameTable is stored using ULEB128 encoding and cannot be directly accessed like an array. However, if MD5 is used to represent name in the NameTable, it has fixed length. If MD5 names are stored in uint64_t type instead of ULEB128, NameTable can be accessed like an array then in many cases only part of the NameTable has to be read. This is helpful for reducing compile time especially when small source file is compiled. We find that after this change, the elapsed time to build a large application distributively is reduced by 5% and the accumulative cpu time used for building is also reduced by 5%. The size of the profile is slightly reduced with this change by ~0.2%, and that also indicates encoding MD5 in ULEB128 doesn't save the storage space. Differential Revision: https://reviews.llvm.org/D92621
-
Giorgis Georgakoudis authored
Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D92779
-
Craig Topper authored
[RISCV] Share VTYPE encoding code between the assembler and the CustomInserter for adding VSETVLI before vector instructions This merges the SEW and LMUL enums that each used into singles enums in RISCVBaseInfo.h. The patch also adds a new encoding helper to take SEW, LMUL, tail agnostic, mask agnostic and turn it into a vtype immediate. I also stopped storing the Encoding in the VTYPE operand in the assembler. It is easy to calculate when adding the operand which should only happen once per instruction. Differential Revision: https://reviews.llvm.org/D92813
-
Ilya Leoshkevich authored
FEntryInserter prepends FENTRY_CALL to the first basic block. In case there are other instructions, PostRA Machine Instruction Scheduler can move FENTRY_CALL call around. This actually occurs on SystemZ (see the testcase). This is bad for the following reasons: * FENTRY_CALL clobbers registers. * Linux Kernel depends on whatever FENTRY_CALL expands to to be the very first instruction in the function. Fix by adding isCall attribute to FENTRY_CALL, which prevents reordering by making it a scheduling boundary for PostRA Machine Instruction Scheduler. Reviewed By: niravd Differential Revision: https://reviews.llvm.org/D91218
-
Philip Reames authored
-
Duncan P. N. Exon Smith authored
Add a `hash_value` for Optional so that other data structures with optional fields can easily hash them. I have a use for this in an upcoming patch. Differential Revision: https://reviews.llvm.org/D92676
-
Duncan P. N. Exon Smith authored
`OptionalTest` was empty; drop it and switch all the tests to use the shorter `TEST` instead of `TEST_F`. Differential Revision: https://reviews.llvm.org/D92675
-
Arthur Eubanks authored
Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D92869
-
Arthur Eubanks authored
Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D92885
-
Nathan James authored
-
Arthur O'Dwyer authored
Because in C++20 mode, it tests that `copy_n` is constexpr; so it depends on the compiler supporting `is_constant_evaluated`.
-
Jessica Paquette authored
This was not obvious when reading the imported tablegen patterns in AArch64GenDAGISel. Update select-select.mir.
-
Anna Thomas authored
This patch adds new PM support for the pass and the pass can be now used during middle-end transforms. The old pass is remamed to ScalarizeMaskedMemIntrinLegacyPass. Reviewed-By: skatkov, aeubanks Differential Revision: https://reviews.llvm.org/D92743
-
Arthur O'Dwyer authored
Relevant blog post: https://quuxplusone.github.io/blog/2019/09/26/uglification-doesnt-stop-adl/ Differential Revision: https://reviews.llvm.org/D92776
-
Arthur O'Dwyer authored
The GCC C++20 buildbot hit this ADL call; Clang doesn't, presumably because it uses a compiler builtin instead of this codepath in <type_traits>. https://buildkite.com/llvm-project/libcxx-ci/builds/674
-
Matt Morehouse authored
The non-pthread functions are all clear discard functions. Some of the pthread ones could clear shadow, but aren't worth writing custom wrappers for. I can't think of any reasonable scenario where we would pass tainted memory to these pthread functions. Reviewed By: stephan.yichao.zhao Differential Revision: https://reviews.llvm.org/D92877
-
Arthur Eubanks authored
LSR currently only runs in the codegen pass manager. There are a couple issues with LSR and the NPM. 1) Lots of tests assume that LCSSA isn't run before LSR. This breaks a bunch of tests' expected output. This is fixable with some time put in. 2) LSR doesn't preserve LCSSA. See llvm/test/Analysis/MemorySSA/update-remove-deadblocks.ll. LSR's use of SCEVExpander is the only use of SCEVExpander where the PreserveLCSSA option is off. Turning it on causes some code sinking out of loops to fail due to SCEVExpander's inability to handle the newly created trivial PHI nodes in the broken critical edge (I was looking at llvm/test/Transforms/LoopStrengthReduce/X86/2011-11-29-postincphi.ll). I also tried simply just calling formLCSSA() at the end of LSR, but the extra PHI nodes cause regressions in codegen tests. We'll delay figuring these issues out until later. This causes the number of check-llvm failures with -enable-new-pm true by default to go from 60 to 29. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D92796
-
Jessica Paquette authored
`TryFoldBinOpIntoSelect` didn't have a check for `Optimized`, meaning you could end up folding twice. (e.g. a select with a G_ADD on the true side, and a G_SUB on the false side) Add in the missing `if` and a test.
-
Duncan P. N. Exon Smith authored
Simplify the DenseMapInfo for `EditEntry` by migrating from `FoldingSetNodeID` to `llvm::hash_combine`. Besides the cleanup, this reduces the diff for a future patch which changes the type of one of the fields. There should be no real functionality change here, although I imagine the hash value will churn since its a different hashing infrastructure. Differential Revision: https://reviews.llvm.org/D92630
-
Arthur Eubanks authored
Codegen-specific passes are being ported to the NPM. Rename for better clarity and note that ported passes that fully work with the NPM should be removed from these lists. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D92818
-
Kazushi (Jam) Marukawa authored
SX Aurora VE uses an intermediate representation similar to VP as its MIR. VE itself uses invidiual VL register as its own vector length register at the hardware level. So, LLVM needs to insert load VL (LVL) instruction just before vector instructions if the value of VL is changed. This LVLGen pass generates LVL instructions for such purpose. Previously, a bug is pointed out in D91416. This patch correct this bug and add a regression test. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D92716
-
Fangrui Song authored
Currently when -gsplit-dwarf is specified (could be buried in a build system), there is no convenient way to cancel debug fission without affecting the debug information amount (all of -g0, -g1 -fsplit-dwarf-inlining and -gline-directives-only can, but they affect the debug information amount). Reviewed By: #debug-info, dblaikie Differential Revision: https://reviews.llvm.org/D92809
-
Siva Chandra Reddy authored
Couple of helper functions enableExcept and disableExcept have been added. In a later round, they will be used to implemented the GNU extension functions feenableexcept and fedisableexcept. Differential Revision: https://reviews.llvm.org/D92821
-
Saleem Abdulrasool authored
This adds the bitcode format schema required for serialization of the YAML data to a binary format. APINotes are pre-compiled and re-used in the binary format from the frontend. These definitions provide the data layout representation enabling writing (and eventually) reading of the data in bitcode format. This is extracted from the code contributed by Apple at https://github.com/llvm/llvm-project-staging/tree/staging/swift/apinotes. Differential Revision: https://reviews.llvm.org/D91997 Reviewed By: Gabor Marton
-
Saleem Abdulrasool authored
This adds a set of metaprogramming helpers to help define records and serialize them out. This is motivated by API Notes which use the bitcode format to serialize out a binary representation of the data. These helpers are generically useful though and could help simplify some of the existing bitcode consumers as well. This is extracted from the code contributed by Apple at https://github.com/llvm/llvm-project-staging/tree/staging/swift/apinotes. Differential Revision: https://reviews.llvm.org/D88582
-
Fangrui Song authored
RFC: http://lists.llvm.org/pipermail/cfe-dev/2020-May/065430.html Agreement from GCC: https://sourceware.org/pipermail/gcc-patches/2020-May/545688.html g_flags_Group options generally don't affect the amount of debugging information. -gsplit-dwarf is an exception. Its order dependency with other gN_Group options make it inconvenient in a build system: * -g0 -gsplit-dwarf -> level 2 -gsplit-dwarf "upgrades" the amount of debugging information despite the previous intention (-g0) to drop debugging information * -g1 -gsplit-dwarf -> level 2 -gsplit-dwarf "upgrades" the amount of debugging information. * If we have a higher-level -gN, -gN -gsplit-dwarf will supposedly decrease the amount of debugging information. This happens with GCC -g3. The non-orthogonality has confused many users. GCC 11 will change the semantics (-gsplit-dwarf no longer implies -g2) despite the backwards compatibility break. This patch matches its behavior. New semantics: * If there is a g_Group, allow split DWARF if useful (none of: -g0, -gline-directives-only, -g1 -fno-split-dwarf-inlining) * Otherwise, no-op. To restore the original behavior, replace -gsplit-dwarf with -gsplit-dwarf -g. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D80391
-
Florian Hahn authored
It seems like the order here is wrong. Types like i32 do not take any arguments. Currently this is not a problem, because the patterns are not actually used with any nodes, but will fail once it is used with real ISD nodes. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D91345
-
Harald van Dijk authored
D92346 added TLS_(base_)addrX32 to handle TLS in x32 mode, but missed the different TLS models. This diff fixes the logic for the local dynamic model where `RAX` was used when `EAX` should be, and extends the tests to cover all four TLS models. Fixes https://bugs.llvm.org/show_bug.cgi?id=26472. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D92737
-
Duncan P. N. Exon Smith authored
Clarify the logic for using the preamble (and overriding the main file buffer) in `ASTUnit::CodeComplete` by factoring out a couple of lambdas (`getUniqueID` and `hasSameUniqueID`). While refactoring the logic, hoist the check for `Line > 1` and locally check if the filenames are equal (both to avoid unnecessary `stat` calls) and skip copying out the filenames to `std::string`. Besides fewer calls to `stat`, there's no functionality change here. Differential Revision: https://reviews.llvm.org/D91296
-