- Nov 01, 2022
-
-
Matheus Izvekov authored
Closes #58679. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D136977
-
Matheus Izvekov authored
Closes #58673. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D136962
-
Alex Brachet authored
Differential Revision: https://reviews.llvm.org/D133487
-
Alexey Bataev authored
We can skip the analysis of the operands opcodes, can compare directly them in some cases.
-
Sameer Sahasrabuddhe authored
When translating offset info from the callee at a call site, first check if the offset is Unknown. Any offset in the caller should be added only if the callee offset is valid. Differential Revision: https://reviews.llvm.org/D137011
-
- Oct 31, 2022
-
-
LLVM GN Syncbot authored
-
Mengxuan Cai authored
Loop Fusion (Function Pass) requires loops in simplified form. With legacy-pm, loop-simplify pass is added as a dependency for loop-fusion. But the new pass manager does not always ensure this format. This patch tries to invoke simplifyLoop() on loops that are not in simplified form only for new PM. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D136781
-
Freddy Ye authored
For more details about these instructions, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D135930
-
Lang Hames authored
Updates the aarch64 pointer jump stub sequence to: ADRP x16, <ptr>@page21 LDR x16, [x16, <ptr>@pageoff12] BR x16 from: LDR x16, <ptr>@ldrimm19 BR x16 The old sequence can only reference pointers within +/-1Mb, which may not be enough for large object files. The new sequence can reach pointers within +/-4Gb. (A future pre-fixup-pass could apply range-based optimizations to turn this into an ldr-br-nop sequence.) Also adds createPointerJumpStubBlock and createAnonymousPointerJumpStub utilities along the same lines as their x86-64 counterparts. The PLTTableManager is updated to use the new utility functions.
-
Valentin Clement authored
This patch fix issues found during call to deallocate. fir.class can be handled the same way as fir.box in fir.store operation code generation. In MutableBox::createNewFirBox, the fir.class is also already a boxed entity. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D137079
-
Serge Pavlov authored
A part of the unit test CommandLineTest/BadResponseFile, added in the commit fd3d7a9f (Handle errors in expansion of response files) fails on AIX. The test checks if an error is issued when `file` in `@file` is a path to directory. This change excludes that check on AIX platform. Differential Revision: https://reviews.llvm.org/D136090
-
bixia1 authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D136654
-
Jan Sjodin authored
Re-apply of: 3d0e9edd Reverted in: 0cb65b0a A function parameter was using the wrong type 'llvm::TargetRegion' instead of 'const llvm:: TargetRegion&', which caused the error in the address sanitizer. The correct type is now used. This patch puts the individual target region information attributes into a struct so that the nested mappings are not needed and passing the information around is simplified. Reviewed By: jdoerfert, mikerice Differential Revision: https://reviews.llvm.org/D136601
-
Lechen Yu authored
When multiple threads invoke checkDeviceAndCtors, both of them may read true from the shared variable Device.HasPendingGlobals, and then invoke initLibrary redundantly. Therefore only protecting the access to Device.HasPendingGlobals is not sufficient to guarantee that initLibrary is invoked just once. To fix this race condition, we move the invocation of initLibrary into the critical section, and remove the same lock inside initLibrary. Differential Revision: https://reviews.llvm.org/D136952
-
Jean Perier authored
This patch moves intrinsic evaluate::Constant<T> lowering into its own unit outside of ScalarExpr and genarr lowering so that it can be used by the new lowering without any changes. DerivedType lowering cannot be shared at that stage because it is too correlated with the current lowering (requires structure constructor and designator lowering). The code had to be refactored quite a bit so that it could be carved out, but the only "functional" change is that the length of character arrays lowered by genarr is now `index` instead of `i64` (see test change). One non-functional benefit of the change is that `toEvExpr` is not needed anymore and some compile time copies of big constant arrays that it was causing are removed (see old calls in previous genarr code), although I am not sure any compile time speed-ups are visible here. Differential Revision: https://reviews.llvm.org/D136955
-
Michael Buch authored
Be less strict about the `std::` namespace string. Depending on platform it may contain an inline namespace, e.g., `__1`.
-
rkayaith authored
Update docs to describe the behaviour when a default-valued attribute is used as an optional-group's anchor after D134993. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D136987
-
Haojian Wu authored
PragmaIncludes captures the pragma-based header-mapping information, it is used in the "Location => Header" step to determine the final spelling header for a symbol (rather than the header directive). The structure is by design to be used inside the include-cleaner library and clangd. Differential Revision: https://reviews.llvm.org/D136071
-
Michał Górny authored
This reverts commit 64959325. It broke the flang-aarch64-out-of-tree buildbot.
-
David Spickett authored
+all includes it since 5d67b051.
-
Brendon Cahoon authored
The existing way of creating the predicate in the guard blocks uses a boolean value per outgoing block. This increases the number of live booleans as the number of outgoing blocks increases. The new way added in this change is to store one integer to represent the outgoing block we want to branch to, then at each guard block, an integer equality check is performed to decide which a specific outgoing block is taken. Using an integer reduces the number of live values and decreases register pressure especially in cases where there are a large number of outgoing blocks. The integer based approach is used when the number of outgoing blocks crosses a threshold, which is currently set to 32. Patch by Ruiling Song. Differential review: https://reviews.llvm.org/D127831
-
Michał Górny authored
Exclude building googletest and LLVMTestingSupport libraries from the `all` target. If unittests are being built, these libraries will be built as a dependency anyway. If they are not being built, building them makes little sense as they are not installed or used otherwise. This will also make standalone builds of other projects easier, as it makes it possible to include these directories without having to cover them with additional conditions to prevent them from being built unconditionally. Differential Revision: https://reviews.llvm.org/D137035
-
Nikita Popov authored
-
Valentin Clement authored
The runtime function `AllocatableDeallocate/PointerDeallocate` is reponsible to deallocate and finalize it. This patch just adds tests to make sure the correct runtime function is called. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D137068
-
Haojian Wu authored
Allowing us to test this feature (context: a recent crash in semantic highlighting.) Differential Revision: https://reviews.llvm.org/D137063
-
David Sherwood authored
This patch adds the assembly/disassembly for the following instructions: sqrshrn : Signed saturating rounding shift right narrow by immediate and interleave sqrshrun : Signed saturating rounding shift right unsigned narrow by immediate and interleave uqrshrn : Unsigned saturating rounding shift right narrow by immediate and interleave The reference can be found here: https://developer.arm.com/documentation/ddi0602/2022-09 Differential Revision: https://reviews.llvm.org/D136690
-
Brendon Cahoon authored
Differential review: https://reviews.llvm.org/D127830
-
Chuanqi Xu authored
Now isa supports the variant args, which could simplify the codes further. This patch simplify the uses in clang/Serialization
-
Sanjay Patel authored
This is a sibling to: 6064e92b ...but we canonicalize the shl+add to shl+xor, so the pattern is different than I expected: https://alive2.llvm.org/ce/z/8CX16e I have not found any patterns that are safe to propagate no-wrap, so that is not included here.
-
Sanjay Patel authored
-
David Green authored
The sme2 predicate was as AssemblerPredicate, not AssemblerPredicateWithAll like all the other features, meaning it wasn't included in +all. This fixes that inconsistency, allowing the instructions to be decoded by default. Differential Revision: https://reviews.llvm.org/D137016
-
Simon Pilgrim authored
[X86] combineConcatVectorOps - fold concat(GF2P8AFFINEQB(x,y,c),GF2P8AFFINEQB(z,w,c)) -> GF2P8AFFINEQB(concat(x,z),concat(y,w),c) Pulled out of D137026
-
Michael Buch authored
This patch implements the `GetFunctionDisplayName` API which gets used by the frame-formatting code to decide how to print a function name. Currently this API trivially returns `false`, so we try to parse the demangled function base-name by hand. We try find the closing parenthesis by doing a forward scan through the demangled name. However, for arguments that contain parenthesis (e.g., function pointers) this would leave garbage in the frame function name. By re-using the `CPlusPlusLanguage` parser for this we offload the need to parse function names to a component that knows how to do this already. We leave the existing parsing code in `FormatEntity` since it's used in cases where a language-plugin is not available (and is not necessarily C++ specific). **Example** For following function: ``` int foo(std::function<int(void)> const& func) { return 1; } ``` Before patch: ``` frame #0: 0x000000010000151c a.out`foo(func= Function = bar() )> const&) at sample.cpp:11:49 ``` After patch: ``` frame #0: 0x000000010000151c a.out`foo(func= Function = bar() ) at sample.cpp:11:49 ``` **Testing** * Added shell test -
Michael Buch authored
This patch adds a way to extract the return type out of the `CPlusPlusNameParser`. This will be useful for cases where we want a function's basename *and* the return type but not the function arguments; this is currently not possible (the parser either gives us the full name or just the basename). Since the parser knows how to handle return types already we should just expose this to users that need it. **Testing** * Added unit-tests Differential Revision: https://reviews.llvm.org/D136935
-
Michael Buch authored
Hopefully makes the code more readable and allows us to re-use argument pretty-printing code from the `CPlusPlusLanguage` plugin in a follow-up commit. Differential Revision: https://reviews.llvm.org/D136934
-
Simon Pilgrim authored
Add explicit cast to fix MSVC error: "'return': cannot convert from 'int (__cdecl *)(int)' to '`anonymous-namespace'::Plus1FunctionRef::FuncT'"
-
Tom Eccles authored
Only add the option processing and store the result. No attributes are added to FIR yet. Only the "off" and "fast" options are supported. "fast-honor-pragmas" is not applicable because we do not implement `#pragma clang fp contract()` in Fortran [1]. "on" is not supported because it is unclear how to fuse only within individual statements. gfortran also does not implement "on": treating it as an "off". Currently the default value is "off" to preserve existing behavior. gfortran uses "fast" by default and that may be the right thing for flang-new after further discussion in the future, but that can be changed separately. gfortran's documentation is available [[ https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html | here ]]. [1] https://clang.llvm.org/docs/LanguageExtensions.html#extensions-to-specify-floating-point-flags Reviewed By: vzakhari, awarzynski Differential Revision: https://reviews.llvm.org/D136080
-
Sander de Smalen authored
This aligns with what was done for SVE, which consistently uses 32bit immediates at the LLVM IR level. Additionally, this change forces the intrinsic operands to be immediates using ImmArg<>, which subsequently requires the codegenerator to match TargetConstants instead of Constants. Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D136933
-
Benjamin Kramer authored
Found by msan -fsanitize-memory-use-after-dtor. ==8259==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x55dbec54d2b8 in dtorRecord(clang::interp::Block*, char*, clang::interp::Descriptor*) clang/lib/AST/Interp/Descriptor.cpp:150:22 #1 0x55dbec54bfcf in dtorArrayDesc(clang::interp::Block*, char*, clang::interp::Descriptor*) clang/lib/AST/Interp/Descriptor.cpp:97:7 #2 0x55dbec508578 in invokeDtor clang/lib/AST/Interp/InterpBlock.h:79:7 #3 0x55dbec508578 in clang::interp::Program::~Program() clang/lib/AST/Interp/Program.h:55:19 #4 0x55dbec50657a in operator() third_party/crosstool/v18/stable/toolchain/bin/../include/c++/v1/__memory/unique_ptr.h:55:5 #5 0x55dbec50657a in std::__msan::unique_ptr<clang::interp::Program, std::__msan::default_delete<clang::interp::Program>>::~unique_ptr() third_party/crosstool/v18/stable/toolchain/bin/../include/c++/v1/__memory/unique_ptr.h:261:7 #6 0x55dbec5035a1 in clang::interp::Context::~Context() clang/lib/AST/Interp/Context.cpp:27:22 #7 0x55dbebec1daa in operator() third_party/crosstool/v18/stable/toolchain/bin/../include/c++/v1/__memory/unique_ptr.h:55:5 #8 0x55dbebec1daa in std::__msan::unique_ptr<clang::interp::Context, std::__msan::default_delete<clang::interp::Context>>::~unique_ptr() third_party/crosstool/v18/stable/toolchain/bin/../include/c++/v1/__memory/unique_ptr.h:261:7 #9 0x55dbebe285f9 in clang::ASTContext::~ASTContext() clang/lib/AST/ASTContext.cpp:1038:40 #10 0x55dbe941ff13 in llvm::RefCountedBase<clang::ASTContext>::Release() const llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:101:7 #11 0x55dbe94353ef in release llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:159:38 #12 0x55dbe94353ef in release llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:224:7 #13 0x55dbe94353ef in ~IntrusiveRefCntPtr llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:191:27 #14 0x55dbe94353ef in clang::CompilerInstance::setASTContext(clang::ASTContext*) clang/lib/Frontend/CompilerInstance.cpp:178:3 #15 0x55dbe95ad0ad in clang::FrontendAction::EndSourceFile() clang/lib/Frontend/FrontendAction.cpp:1100:8 #16 0x55dbe9445fcf in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) clang/lib/Frontend/CompilerInstance.cpp:1047:11 #17 0x55dbe6b3afef in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:266:25 #18 0x55dbe6b13288 in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) clang/tools/driver/cc1_main.cpp:250:15 #19 0x55dbe6b0095f in ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) clang/tools/driver/driver.cpp:319:12 #20 0x55dbe6aff41c in clang_main(int, char**) clang/tools/driver/driver.cpp:395:12 #21 0x7f9be07fa632 in __libc_start_main #22 0x55dbe6a702e9 in _start Member fields were destroyed #0 0x55dbe6a7da5d in __sanitizer_dtor_callback_fields compiler-rt/lib/msan/msan_interceptors.cpp:949:5 #1 0x55dbec5094ac in ~SmallVectorImpl llvm/include/llvm/ADT/SmallVector.h:479:7 #2 0x55dbec5094ac in ~SmallVectorImpl llvm/include/llvm/ADT/SmallVector.h:612:3 #3 0x55dbec5094ac in llvm::SmallVector<clang::interp::Record::Base, 8u>::~SmallVector() llvm/include/llvm/ADT/SmallVector.h:1207:3 #4 0x55dbec508e79 in clang::interp::Record::~Record() clang/lib/AST/Interp/Record.h:24:7 #5 0x55dbec508612 in clang::interp::Program::~Program() clang/lib/AST/Interp/Program.h:49:26 #6 0x55dbec50657a in operator() third_party/crosstool/v18/stable/toolchain/bin/../include/c++/v1/__memory/unique_ptr.h:55:5 #7 0x55dbec50657a in std::__msan::unique_ptr<clang::interp::Program, std::__msan::default_delete<clang::interp::Program>>::~unique_ptr() third_party/crosstool/v18/stable/toolchain/bin/../include/c++/v1/__memory/unique_ptr.h:261:7 #8 0x55dbec5035a1 in clang::interp::Context::~Context() clang/lib/AST/Interp/Context.cpp:27:22 #9 0x55dbebec1daa in operator() third_party/crosstool/v18/stable/toolchain/bin/../include/c++/v1/__memory/unique_ptr.h:55:5 #10 0x55dbebec1daa in std::__msan::unique_ptr<clang::interp::Context, std::__msan::default_delete<clang::interp::Context>>::~unique_ptr() third_party/crosstool/v18/stable/toolchain/bin/../include/c++/v1/__memory/unique_ptr.h:261:7 #11 0x55dbebe285f9 in clang::ASTContext::~ASTContext() clang/lib/AST/ASTContext.cpp:1038:40 #12 0x55dbe941ff13 in llvm::RefCountedBase<clang::ASTContext>::Release() const llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:101:7 #13 0x55dbe94353ef in release llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:159:38 #14 0x55dbe94353ef in release llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:224:7 #15 0x55dbe94353ef in ~IntrusiveRefCntPtr llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:191:27 #16 0x55dbe94353ef in clang::CompilerInstance::setASTContext(clang::ASTContext*) clang/lib/Frontend/CompilerInstance.cpp:178:3 #17 0x55dbe95ad0ad in clang::FrontendAction::EndSourceFile() clang/lib/Frontend/FrontendAction.cpp:1100:8 #18 0x55dbe9445fcf in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) clang/lib/Frontend/CompilerInstance.cpp:1047:11 #19 0x55dbe6b3afef in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:266:25 #20 0x55dbe6b13288 in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) clang/tools/driver/cc1_main.cpp:250:15 #21 0x55dbe6b0095f in ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) clang/tools/driver/driver.cpp:319:12 #22 0x55dbe6aff41c in clang_main(int, char**) clang/tools/driver/driver.cpp:395:12 #23 0x7f9be07fa632 in __libc_start_main #24 0x55dbe6a702e9 in _start -
Hassnaa Hamdi authored
When streaming mode is enabled, lower some operations and disable some code paths; to force generateing code compatible to streaming mode. Add streaming-mode flag for new sve-fixed-length testing files: build_vector.ll concat.ll extract-subvector.ll extract-vector-elt.ll int-shifts.ll loads.ll shuffle.ll stores.ll Differential Revision: https://reviews.llvm.org/D135564
-