- Jan 12, 2022
-
-
Leonard Grey authored
Depends on D112160 This adds the new options `--call-graph-profile-sort` (default), `--no-call-graph-profile-sort` and `--print-symbol-order=`. If call graph profile sorting is enabled, reads `__LLVM,__cg_profile` sections from object files and uses the resulting graph to put callees and callers close to each other in the final binary via the C3 clustering heuristic. Differential Revision: https://reviews.llvm.org/D112164
-
Simon Pilgrim authored
The pointer is always dereferenced immediately below, so assert the cast is correct instead of returning nullptr
-
Simon Pilgrim authored
[clang-tidy] UseDefaultMemberInitCheck::checkDefaultInit - Use cast<> instead of dyn_cast<> to avoid dereference of nullptr The pointer is always dereferenced immediately below, so assert the cast is correct instead of returning nullptr
-
Paulo Matos authored
Adds overload of TransformToPotentiallyEvaluated for TypeSourceInfo to properly deal with VLAs in nested calls of sizeof and typeof. Fixes PR31042 (https://github.com/llvm/llvm-project/issues/30390). Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D27800
-
Marek Kurdej authored
-
Simon Pilgrim authored
Noticed while investigating how to improve funnel shift codegen
-
Simon Pilgrim authored
Noticed while investigating how to improve funnel shift codegen
-
Nico Weber authored
This reverts commit aad49c8e. Breaks tests on Windows, see comments on https://reviews.llvm.org/D113825
-
Michał Górny authored
Set the current thread ID to the thread where an event happened. As a result, e.g. when a signal is delivered to a thread other than the first one, the respective T packet refers to the signaled thread rather than the first thread (with no stop reason). While this doesn't strictly make a difference to the LLDB client, it is the expected behavior. Differential Revision: https://reviews.llvm.org/D117103
-
Kadir Cetinkaya authored
std::remove from algorithm is a lot more common than the overload from the cstdio (which deletes files). This patch introduces a set of symbols for which we should prefer the overloaded versions. Differential Revision: https://reviews.llvm.org/D114724
-
Leonard Grey authored
This ports the `.cg_profile` assembly directive and call graph profile section generation to MachO from COFF/ELF. Due to MachO section naming rules, the section is called `__LLVM,__cg_profile` rather than `.llvm.call-graph-profile` as in COFF/ELF. Support for llvm-readobj is included to facilitate testing. Corresponding LLD change is D112164 Differential Revision: https://reviews.llvm.org/D112160
-
Marco Elver authored
When `-ftrivial-auto-var-init=` is enabled, allocas unconditionally receive auto-initialization since [1]. In certain cases, it turns out, this is causing problems. For example, when using alloca to add a random stack offset, as the Linux kernel does on syscall entry [2]. In this case, none of the alloca'd stack memory is ever used, and initializing it should be controllable; furthermore, it is not always possible to safely call memset (see [2]). Introduce `__builtin_alloca_uninitialized()` (and `__builtin_alloca_with_align_uninitialized`), which never performs initialization when `-ftrivial-auto-var-init=` is enabled. [1] https://reviews.llvm.org/D60548 [2] https://lkml.kernel.org/r/YbHTKUjEejZCLyhX@elver.google.com Reviewed By: glider Differential Revision: https://reviews.llvm.org/D115440
-
Pietro Albini authored
Differential Revision: https://reviews.llvm.org/D117027
-
Florian Hahn authored
This patch adds a new BranchOnCount VPInstruction opcode with 2 operands. It first compares its 2 operands (increment of canonical induction and vector trip count), followed by a branch to either the exit block or back to the vector header. It must be the last recipe in the exit block of the topmost vector loop region. This extracts parts from D113224 and was discussed in D113223. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D116479
-
Rosie Sumpter authored
This is required to query the legality more precisely in the LoopVectorizer. This adds another TTI function named 'forceScalarizeMaskedGather/Scatter' function to work around the hack introduced for MVE, where isLegalMaskedGather/Scatter would return an answer by second-guessing where the function was called from, based on the Type passed in (vector vs scalar). The new interface makes this explicit. It is also used by X86 to check for vector widths where gather/scatters aren't profitable (or don't exist) for certain subtargets. Differential Revision: https://reviews.llvm.org/D115329
-
Sven van Haastregt authored
All kernels can be called from the host as per the SPIR_KERNEL calling convention. As such, all kernels should have external linkage, but block enqueue kernels were created with internal linkage. Reported-by: Pedro Olsen Ferreira Differential Revision: https://reviews.llvm.org/D115523
-
Jeremy Morse authored
This feature was previously controlled by a TargetOptions flag, and I figured that codegen::InitTargetOptionsFromCodeGenFlags would default it to "on" for all frontends. Enabling by default was discussed here: https://lists.llvm.org/pipermail/llvm-dev/2021-November/153653.html and originally supposed to happen in 3c045070, but it didn't actually take effect, as it turns out frontends initialize TargetOptions themselves. This patch moves the flag from a TargetOptions flag to a global flag to CodeGen, where it isn't immediately affected by the frontend being used. Hopefully this will actually cause instr-ref to be on by default on x86_64 now! This patch is easily reverted, and chances of turbulence are moderately high. If you need to revert, please consider instead commenting out the 'return true' part of llvm::debuginfoShouldUseDebugInstrRef to turn the feature off, and dropping me an email. Differential Revision: https://reviews.llvm.org/D116821
-
Kuba Mracek authored
The test checks that an array of Obj-C literal integers (e.g. `@1`) gets a UBSan warning when cast to an NSString, however the actual concrete Obj-C class of literal integers doesn't always need to be __NSCFNumber. Let's relax the test expectations to allow NSConstantIntegerNumber. Which exact subclass of NSNumber is used is not actually important for the test (the test is just checking that the invalid cast warning is thrown).
-
David Sherwood authored
-
Simon Moll authored
llvm.vp.merge interprets the %evl operand differently than the other vp intrinsics: all lanes at positions greater or equal than the %evl operand are passed through from the second vector input. Otherwise it behaves like llvm.vp.select. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D116725
-
Simon Pilgrim authored
Noticed while investigating how to improve funnel shift codegen
-
Simon Pilgrim authored
Noticed while investigating how to improve funnel shift codegen
-
Florian Hahn authored
Depends on D116935. Reviewed By: nikic, lebedev.ri Differential Revision: https://reviews.llvm.org/D116969
-
David Spickett authored
Due to a missing cast the << 60 always resulted in zero leaving the top nibble empty. So we weren't actually testing that lldb ignores those bits in addition to the tag bits. Correct that and also set the top nibbles to ascending values so that we can catch if lldb only removes one of the tag bits and top nibble, but not both. In future the tag manager will likely only remove the tag bits and leave non-address bits to the ABI plugin but for now make sure we're testing what we claim to implement.
-
Shao-Ce SUN authored
According the newest RISC-V Privileged Spec, updated CSRs. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D116645
-
Chuanqi Xu authored
-
LLVM GN Syncbot authored
-
Phoebe Wang authored
rG1bb0caf5 changed the datalayout of f80 on Windows 32 bits. But it missed the related use in the LLD tests. This patch will fix the problem catched by buildbot.
-
serge-sans-paille authored
This patch implements detection of incomplete bidirectional sequence withing comments and string literals within clang-tidy. It detects the bidi part of https://www.trojansource.codes/trojan-source.pdf Differential Revision: https://reviews.llvm.org/D112913
-
Florian Hahn authored
Similar to memset, memset_pattern{4,8,16} all will return and do not unwind. Use fallthrough to include all attributes also set for memset. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D114904 -
Alexey Lapshin authored
SizeOf() method of DIE values(unsigned SizeOf(const AsmPrinter *AP, dwarf::Form Form) const) depends on AsmPrinter. AsmPrinter is too specific class here. This patch removes dependency on AsmPrinter and use dwarf::FormParams structure instead. It allows calculate DIE values size without using AsmPrinter. That refactoring is useful for D96035([dsymutil][DWARFlinker] implement separate multi-thread processing for compile units.) Differential Revision: https://reviews.llvm.org/D116997
-
Florian Hahn authored
This reverts commit 41fbdfa4. The commit breaks stage 2 builds with debug info, e.g. https://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/5088/console Clang crashes with the following assertion when building llvm-project/llvm/lib/Support/Timer.cpp /usr/local/bin/sccache /Users/buildslave/jenkins/workspace/clang-stage2-Rthinlto/host-compiler/bin/clang++ -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support -I/Users/buildslave/jenkins/workspace/clang-stage2-Rthinlto/llvm-project/llvm/lib/Support -Iinclude -I/Users/buildslave/jenkins/workspace/clang-stage2-Rthinlto/llvm-project/llvm/include -fno-stack-protector -fno-common -Wno-profile-instr-unprofiled -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -fmodules -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-Rthinlto/clang-build/Build/module.cache -fcxx-modules -Xclang -fmodules-local-submodule-visibility -gmodules -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -flto=thin -O2 -g -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -std=c++14 -fno-exceptions -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Timer.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/Timer.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/Timer.cpp.o -c /Users/buildslave/jenkins/workspace/clang-stage2-Rthinlto/llvm-project/llvm/lib/Support/Timer.cpp Assertion failed: (((getOffset()+Offset) & MacroIDBit) == 0 && "offset overflow"), function getLocWithOffset, file /Users/buildslave/jenkins/workspace/clang-stage1-RA/llvm-project/clang/include/clang/Basic/SourceLocation.h, line 135.
-
Diana Picus authored
When converting a fir.alloca of an array to the LLVM dialect, we used to multiply the allocated size by all the constant factors encoded in the array type. This is fine when the array type is converted to the element type for the purposes of the allocation, but if it's converted to an array type, then we might be allocating too much space. For example, for `%2 = fir.alloca !fir.array<8x16x32xf32>, %0, %1` we would allocate %0 * %1 * 8 * 16 * 32 x llvm.array<32 x array<16 * array<8 x f32>>>. We really only need to allocate %0 * %1 such arrays. This patch fixes the issue by taking note of the array type that we're trying to allocate. It tries to match the behaviour of LLVMTypeConverter::convertPointerLike, which returns a pointer to the element type only when the array type doesn't have a constant interior. We consequently only multiply with the constant factors in the array type if the array type doesn't have a constant interior. This has the nice side effect that it gets rid of some redundant multiplications with the constant 1 in some cases. Differential Revision: https://reviews.llvm.org/D116926
-
David Spickett authored
"shell" is an alias to "platform shell -h --". Previously you would get this help text: (lldb) help shell Run a shell command on the host. Expects 'raw' input (see 'help raw-input'.) Syntax: shell <shell-command> Command Options Usage: 'shell' is an abbreviation for 'platform shell -h --' Since the code doesn't handle the base command having options but the alias removing them. With these changes you get: (lldb) help shell Run a shell command on the host. Expects 'raw' input (see 'help raw-input'.) Syntax: shell <shell-command> 'shell' is an abbreviation for 'platform shell -h --' Note that we already handle a non-alias command having no options, for example "quit": (lldb) help quit Quit the LLDB debugger. Syntax: quit [exit-code] Reviewed By: JDevlieghere, jingham Differential Revision: https://reviews.llvm.org/D117004
-
Kadir Cetinkaya authored
Differential Revision: https://reviews.llvm.org/D117037
-
Matthias Springer authored
This change makes it possible to use a different buffer deallocation strategy. E.g., `-buffer-deallocation` can be used, which also works for allocations that are not in destination-passing style. Differential Revision: https://reviews.llvm.org/D117096
-
Andrzej Warzynski authored
LLVM has a documented mechanism for passing configuration information to an out of tree project using CMake. See https://llvm.org/docs/CMake.html#embedding-llvm-in-your-project. Similar logic applies to "standalone" builds of other sub-projects within LLVM that depend on each other. For example, a standalone build of Flang will use this mechanism to acquire Clang's configuration. Currently, the relevant CMake modules for Clang will only be copied into the installation directory. This means that in order to configure a standalone build of Flang, one has to first build and then install Clang. This is not required for LLVM nor for MLIR - other sub-projects that Flang depends on (i.e. the CMake modules for LLVM and MLIR are available in the build dir, so installation is not needed). This change removes the need for installing Clang in order to access its configuration. It makes sure that the required CMake modules are copied into the build directory. This will make Clang behave consistently with LLVM and MLIR in this respect. It will also simplify building Flang as standalone sub-project. Differential Revision: https://reviews.llvm.org/D116731
-
Phoebe Wang authored
MSVC currently doesn't support 80 bits long double. ICC supports it when the option `/Qlong-double` is specified. Changing the alignment of f80 to 16 bytes so that we can be compatible with ICC's option. Reviewed By: rnk, craig.topper Differential Revision: https://reviews.llvm.org/D115942
-
Konstantin Varlamov authored
This needs a proper solution in a follow-up. The issue is that the Standard defines conversions between `in_out_result` classes with different template types as just `return {in, out};`. Because the expression uses list initialization, it will fail to compile if the conversion happens to be narrowing -- which is probably unintended. Surprisingly, this error wasn't caught by the CI. Differential Revision: https://reviews.llvm.org/D117089 -
David Green authored
FeaturePerfMon relates to the PMU extensions available in armv7-a, and should not be available in v7-m (it requires loading from a system register with a mrc). Sink it down a level in the dependency map so that it isn't present in ARMv7m or HasV8MMainlineOps. It is also removed from the Neoverse-N2, as it will already be transitively included. Differential Revision: https://reviews.llvm.org/D117022
-