- Jan 12, 2022
-
-
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 -fcx...
-
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 directo...
-
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
-
Lang Hames authored
This is needed for DWARF eh-frame exception handling on AArch64. https://github.com/llvm/llvm-project/issues/52921. Original patch by David Nadlinger <code@klickverbot.at> (thanks David!), testcase and comments added by me.
-
Andrzej Warzynski authored
The `flang` wrapper script has been written in a relatively modern version of Bash and it fails on systems with older versions. This patch makes the script check the version of Bash being used to run it and generates an error when unsupported version is used. This was discussed in more detail in: * https://github.com/flang-compiler/f18-llvm-project/issues/1344. Many thanks to Anthony Cabrera for the suggestion and for identifying the oldest version of Bash that we can use here. Differential Revision: https://reviews.llvm.org/D116608
-
Florian Hahn authored
Depends on D116935. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D116968
-
Phoebe Wang authored
-
Simon Tatham authored
Two functions in the `is_32bit_windows` family were retrieving the output of a tool via `subprocess.check_output`, and then iterating over it using `for line in output`. But in Python, that gets you the output one //character// at a time, not a line at a time. So the regexes that looked for a platform name were never matching. (This is a mistake that Python makes uniquely easy, because iterating over a file and over a string have different default behaviour, and because the element type of a string is still a string so you don't even get a type mismatch error to warn you about it!) Reviewed By: michaelplatings Differential Revision: https://reviews.llvm.org/D117030
-
Matthias Springer authored
This op is an example for how to deal with ops who's OpResult may aliasing with one of multiple OpOperands. Differential Revision: https://reviews.llvm.org/D116868
-
Nikita Popov authored
This is part of copyAttributesFrom().
-
Nikita Popov authored
This hasn't been used in a long time.
-
Nikita Popov authored
GlobalOpt can optimize a global with undef initializer and a single store to put the stored value into the initializer instead. Currently, this requires the type of the global and the store to match. This patch extends support to cases with different types (but same size), in which case we create a new global to replace the old one. Differential Revision: https://reviews.llvm.org/D117034
-
Carlos Galvez authored
Often we run into situations where we want to ignore warnings from system headers, but Clang will still give warnings about the contents of a macro defined in a system header used in user-code. Introduce a ShowInSystemMacro option to be able to specify which warnings we do want to keep raising warnings for. The current behavior is kept in this patch (i.e. warnings from system macros are enabled by default). The decision as to whether this should be an opt-in or opt-out feature can be made in a separate patch. To put the feature to test, replace duplicated code for Wshadow and Wold-style-cast with the SuppressInSystemMacro tag. Also disable the warning for C++20 designators, fixing #52944. Differential Revision: https://reviews.llvm.org/D116833
-
Chuanqi Xu authored
This fixes bug49888. The root cause for this is that simplifyTerminatorLeadingToRet didn't handle lifetime markers well. Another issue also noted in D116327 is that we deleted some inlined optimization pass in CoroSplit so that simplifyTerminatorLeadingToRet need to remove dead instructions by hand. This patch fixes bug49888 by skipping lifetime markers and bitcast instruction and removing dead instructions by hand in simplifyTerminatorLeadingToRet. Reviewed By: junparser Differential Revision: https://reviews.llvm.org/D116330
-
Stanislav Gatev authored
This is part of the implementation of the dataflow analysis framework. See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev. Reviewed-by: ymandel, xazax.hun Differential Revision: https://reviews.llvm.org/D117012
-
Uday Bondhugula authored
Add inliner interface for GPU dialect. The interface marks all GPU dialect ops legal to inline anywhere. Differential Revision: https://reviews.llvm.org/D116889
-
Esme-Yi authored
Summary: The patch adds support for dumping auxiliary symbols in llvm-readobj for XCOFF. Reviewed By: jhenderson, Higuoxing Differential Revision: https://reviews.llvm.org/D113825
-