- Jul 15, 2023
-
-
Jon Roelofs authored
The bug happens when you build e.g. an x64_64;arm64 JIT with LLVM_HOST_TRIPLE=x86_64-apple-macos, and then run it on an apple-m1 not under Rosetta. In that case, sys::getProcessTriple() will return an x86_64 triple, not an arm64 one. Differential revision: https://reviews.llvm.org/D138449
-
Sterling Augustine authored
This reverts commit 245d10b7 which causes errors like the ones below on slightly older versions of clang: ``` In file included from .../clang/lib/AST/Interp/Source.h:17: In file included from .../llvm/include/llvm/ADT/PointerUnion.h:19: In file included from .../llvm/include/llvm/ADT/PointerIntPair.h:18: .../llvm/include/llvm/Support/PointerLikeTypeTraits.h:61:28: error: invalid application of 'alignof' to an incomplete type 'clang::Decl' 61 | detail::ConstantLog2<alignof(T)>::value; | ^~~~~~~~~~ .../llvm/include/llvm/Support/PointerLikeTypeTraits.h:101:56: note: in instantiation of static data member 'llvm::PointerLikeTypeTraits<clang::Decl *>::NumLowBitsAvailable' requested here 101 | static constexpr int NumLowBitsAvailable = NonConst::NumLowBitsAvailable; | ^ .../llvm/include/llvm/ADT/PointerUnion.h:38:54: note: in instantiation of static data member 'llvm::PointerLikeTypeTraits<const clang::Decl *>::NumLowBitsAvailable' requested here 38 | return std::min<int>({PointerLikeTypeTraits<Ts>::NumLowBitsAvailable...}); | ^ .../llvm/include/llvm/ADT/PointerUnion.h:52:48: note: in instantiation of function template specialization 'llvm::pointer_union_detail::lowBitsAvailable<const clang::Decl *, const clang::Stmt *>' requested here 52 | static constexpr int NumLowBitsAvailable = lowBitsAvailable<PTs...>(); | ^ .../llvm/include/llvm/ADT/PointerIntPair.h:169:28: note: in instantiation of static data member 'llvm::pointer_union_detail::PointerUnionUIntTraits<const clang::Decl *, const clang::Stmt *>::NumLowBitsAvailable' requested here 169 | static_assert(PtrTraits::NumLowBitsAvailable < | ^ .../llvm/include/llvm/ADT/PointerIntPair.h:111:13: note: in instantiation of template class 'llvm::PointerIntPairInfo<void *, 1, llvm::pointer_union_detail::PointerUnionUIntTraits<const clang::Decl *, const clang::Stmt *>>' requested here 111 | Value = Info::updateInt(Info::updatePointer(0, PtrVal), | ^ .../llvm/include/llvm/ADT/PointerIntPair.h:89:5: note: in instantiation of member function 'llvm::PointerIntPair<void *, 1, int, llvm::pointer_union_detail::PointerUnionUIntTraits<const clang::Decl *, const clang::Stmt *>>::setPointerAndInt' requested here 89 | setPointerAndInt(PtrVal, IntVal); | ^ .../llvm/include/llvm/ADT/PointerUnion.h:77:16: note: in instantiation of member function 'llvm::PointerIntPair<void *, 1, int, llvm::pointer_union_detail::PointerUnionUIntTraits<const clang::Decl *, const clang::Stmt *>>::PointerIntPair' requested here 77 | : Base(ValTy(const_cast<void *>( | ^ .../clang/lib/AST/Interp/Source.h:76:31: note: in instantiation of member function 'llvm::pointer_union_detail::PointerUnionMembers<llvm::PointerUnion<const clang::Decl *, const clang::Stmt *>, llvm::PointerIntPair<void *, 1, int, llvm::pointer_union_detail::PointerUnionUIntTraits<const clang::Decl *, const clang::Stmt *>>, 1, const clang::Stmt *>::PointerUnionMembers' requested here 76 | SourceInfo(const Stmt *E) : Source(E) {} | ^ .../clang/lib/AST/Interp/Source.h:22:7: note: forward declaration of 'clang::Decl' 22 | class Decl; | ^ ```
-
Anna Thomas authored
Addressed most of post-commit comments in D154309.
-
Anna Thomas authored
Follow-up testcase for PR63602. Suggested by Ayal in D154309, more complete fix coming up which should handle this testcase as well.
-
Fangrui Song authored
-
Valentin Clement authored
The extent information is available here so just add it to the acc.bounds operation so it can be retrieved easily if needed. Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D155319
-
Maurice Heumann authored
In change https://reviews.llvm.org/D152790, it was discovered that the alignment requirement calculation for LDRD/STRD codegen was suboptimal and the calculation for volatile loads and stores was adjusted. This change here adopts the calculation for the remaining non-volatile occurances. Recommitting after undefined behavior fix in D155093. Differential Revision: https://reviews.llvm.org/D153800
-
Maurice Heumann authored
The value to be formatted here, Val, is an int64_t which cannot be formatted using %x. This commit adjusts all misuses I was able to find in the llvm-dwarfdump project. Failing tests in https://reviews.llvm.org/D153800 lead to the discovery and analysis of this issue. Differential Revision: https://reviews.llvm.org/D155093
-
Fangrui Song authored
We pay the one-off boilerplate overhead to create `*Dumper` classes that derive from objdump::Dumper a la llvm-readobj. This has two primary advantages. First, a lot object file format specific code can be moved from llvm-objdump.cpp to *Dump.cpp files. Refactor `printPrivateHeaders` as an example. Second, with the introduction of ELFDumper<ELFT>, we can simplify a few dispatch functions in ELFDump.cpp. In addition, the ObjectFile specific dumpers contains a ObjectFile specific reference so that we can remove a lot of `cast<*ObjectFile>(Obj)`. Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D155045
-
Konstantina Mitropoulou authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D155265
-
Nikolas Klauser authored
-
Mikhail Gudim authored
This fixes some bugs in the original commit: (1) Operands are passed in correct order when creating new constant and the binary operator. New tests were added to cover these cases. (2) Check was added to see if it is safe to commute the select and the binary operator. Reviewed By: Craig Topper Differential Revision: https://reviews.llvm.org/D152147
-
Petr Hosek authored
This will result in a tool that's not usable, but it'll still link correctly rather than failing with a CMake error. This matches what we do for other tools that have dependencies such as llvm-mt. Differential Revision: https://reviews.llvm.org/D155323
-
Michael Maitland authored
Now that RISCV pseudo instructions now account for SEW in some cases, it useful that RISCV SEW instruments exist so that llvm-mca can use the SEW specific scheduler classes. Differential Revision: https://reviews.llvm.org/D154142
-
Michael Maitland authored
Now that scheduler resources are split by SEW for some instructions, add the ability to map (BaseInstr, LMUL, SEW) -> Pseudo. For BaseInstrs that are not split by SEW, 0 is the default key. This does not change the size of the table since there was an 8 bit hole. Differential Revision: https://reviews.llvm.org/D154136
-
Krzysztof Drewniak authored
No matter how one constructs their SerializeTo* pass, we want to ensure that the LLVM initialization code runs once and only once. This commit adds a static once_flag to ensure that. I've run into mysterious segfaults when calling MLIR GPU compiles from multiple threads, and this commit is a potential fix for the issue. Reviewed By: fmorac Differential Revision: https://reviews.llvm.org/D155226
-
Aart Bik authored
(1) without the check, the results may silently be wrong, so check is needed (2) add pruning step to guarantee 2:4 property Note, in the longer run, we may want to split out the pruning step somehow, or make it optional. Reviewed By: K-Wu Differential Revision: https://reviews.llvm.org/D155320
-
Adrian Munera authored
Summary: These were missing from the list of all architectures. Differential Revision: https://reviews.llvm.org/D155287
-
Kamau Bridgeman authored
Future cpu instructions dmxxinstdmr512 and dmxxextfdmr512 insert and extract quad vectors from the new wide accumulator(wacc) register class. The introduction of these new instructions renders the p10 instructions xxmtacc and xxmfacc obsolete since the new wacc register class is a better choice for handing quad vector operations. This patch ensures that, for future cpu, instructions dmxxinstdmr512 and dmxxextfdmr512 are generated by custom lowering the intrinsics for xxm[t|f]acc to produce no instructions. Reviewed By: amyk, lei Differential Revision: https://reviews.llvm.org/D153034
-
Caslyn Tonelli authored
Include the "llvm/ADT/StringExtras.h" in unittest to resolve a "use of undeclared identifier 'utostr'" error that surfaces on mac-x64 builds after https://reviews.llvm.org/D155178. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D155314
-
Thomas Köppe authored
The convention for TableGen help messages is to omit the period. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D155242
-
Joseph Huber authored
This points users to the `libc` documentation and explains the basics of how it's used inside the runtime. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D155318
-
Fangrui Song authored
-
Craig Topper authored
We can use an i64 clmul to emulate i32 clmul. For clmulh and clmulr we need to zero extend the 32 bit input to 64 bits then extract either bits [63:32] or [62:31]. Unfortunately, without Zba we need to use 2 shifts for the zero extends. These can be optimized out later if the producing instruction already zeroed the upper bits or if we can use lwu. There are alternative sequences we can use for clmulh/clmulr when the zero extend isn't free, but those are best handled by a DAG combine to give the best opportunity for removing the extend. This allows us to implement i32 clmul C intrinsics proposed in https://github.com/riscv-non-isa/riscv-c-api-doc/pull/44. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D154729
-
Craig Topper authored
This is different than the target independent __builtin_clz/ctz, but logically makes more sense.
-
LLVM GN Syncbot authored
-
Kamau Bridgeman authored
Adding the td definitions, and their associated assembly and disassembly test cases for the decimal floating point test instructions defined in section 5.6.3 of ISA 3.1 Reviewed By: lei, amyk Differential Revision: https://reviews.llvm.org/D154606
-
Christian Trott authored
This commit implements default_accessor in support of C++23 mdspan (https://wg21.link/p0009 ). default_accessor is the trivial accessor using plain pointers and reference to element types. Co-authored-by:
Damien L-G <dalg24@gmail.com> Differential Revision: https://reviews.llvm.org/D153935
-
Lang Hames authored
GCC warns when strncpy doesn't copy the null terminator. See discussion at https://reviews.llvm.org/rG9d701c8a8d65.
-
Alex Langford authored
This uses some friend class trickery to avoid some unneeded temporary std::string allocations. Differential Revision: https://reviews.llvm.org/D155035
-
Shubham Sandeep Rastogi authored
Disable GetOrCreateModuleWithCachedModule and GetOrCreateModuleWithCachedModuleAndSymbol tests on arm64, because of test failures
-
Kazuki Sakamoto authored
D153735 added the tests but it is failing due to POSIX path vs Windows path. https://lab.llvm.org/buildbot/#/builders/219/builds/4084 Fix it. - MODULE_PLATFORM_PATH is POSIX path. - Normalize self.input_dir, FileSpec and SymbolFileSpec fullpath. Differential Revision: https://reviews.llvm.org/D155124
-
Simon Cook authored
This is a mostly NFC change cleaning up and clarifying components of the in-tree CORE-V (xcv*) extensions following discussions on the remaining extensions. This makes the following changes to the xcbitmanip and xcvmac support: 1. Add missing extensions from RISCVISAInfo, such that they can be supported in clang's -march option. 2. Clarify the extension version number is 1.0.0 in documentation. 3. Clarify the extensions are by OpenHW Group, and the capitilization of the CORE-V extension family. 4. Add CORE-V to extension name in RISCVFeatures, both to be consistent with other vendors, and also better distinguish e.g. CORE-V bit manipulation vs RISC-V's standard Zb extensions. Differential Revision: https://reviews.llvm.org/D155283
-
Garvit Gupta authored
Support for below CSRs is addeed - 1. Branch Prediction Mode CSR 2. Feature Disable CSR 3. Power Dial CSR 4. RNMI CSRs spec:https://sifive.cdn.prismic.io/sifive/767804da-53b2-4893-97d5-b7c030ae0a94_s76mc_core_complex_manual_21G3.pdf This patch removes AltName field from SysReg class because we are now using separate class for custom vendor CSRs. Also, all use of AltName have been changed to DeprecatedName because both were interchangeably used for old names which are not in use in latest RISCV spec. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D153499
-
Dmitry Vyukov authored
The test seems to segfault on aarch64 with tsan: https://lab.llvm.org/buildbot/#/builders/179/builds/6662 Reason unknown, needs debugging. Reviewed By: melver, Caslyn Differential Revision: https://reviews.llvm.org/D155272
-
Nikita Popov authored
This is very likely the cause of a stage 2 failure in Transforms/LoopVectorize/check-prof-info.ll. Revert until I can investigate this. This reverts commit 3d199d08.
-
Alex Brachet authored
This helps transition code bases to handle the new warning added in 3632e2f5 Before: ``` clang/test/FixIt/format.cpp:10:16: warning: format specifies type 'int' but the argument has type 'N::E' [-Wformat] 10 | printf("%d", N::E::One); // expected-warning{{format specifies type 'int' but the argument has type 'N::E'}} | ~~ ^~~~~~~~~ | %d ``` After: ``` clang/test/FixIt/format.cpp:10:16: warning: format specifies type 'int' but the argument has type 'N::E' [-Wformat] 10 | printf("%d", N::E::One); // expected-warning{{format specifies type 'int' but the argument has type 'N::E'}} | ~~ ^~~~~~~~~ | static_cast<int>( ) ``` Differential Revision: https://reviews.llvm.org/D153623
-
Alex Brachet authored
This patch changes the -Wformat diagnostic to suggest static_cast over a C-style cast for {,Objective}C++ when recommending the argument be casted rather than changing the format string. Before: ``` clang/test/FixIt/format.mm:11:16: warning: format specifies type 'unichar' (aka 'unsigned short') but the argument has type 'wchar_t' [-Wformat] 11 | NSLog(@"%C", wchar_data); // expected-warning{{format specifies type 'unichar' (aka 'unsigned short') but the argument has type 'wchar_t'}} | ~~ ^~~~~~~~~~ | (unsigned short) ``` After: ``` clang/test/FixIt/format.mm:11:16: warning: format specifies type 'unichar' (aka 'unsigned short') but the argument has type 'wchar_t' [-Wformat] 11 | NSLog(@"%C", wchar_data); // expected-warning{{format specifies type 'unichar' (aka 'unsigned short') but the argument has type 'wchar_t'}} | ~~ ^~~~~~~~~~ | static_cast<unsigned short>( ) ``` Differential Revision: https://reviews.llvm.org/D153622 -
Lei Huang authored
Add td definitions and asm/disasm tests for the dfp format instructions in ISA 3.1 section 5.6.6 Reviewed By: stefanp, kamaub Differential Revision: https://reviews.llvm.org/D154465
-
- Jul 14, 2023
-
-
David Green authored
This allows llvm-exegesis to generate them as constants.
-