- Jul 06, 2022
-
-
Nikita Popov authored
-
David Spickett authored
For example the predres extension adds one instruction that is a sys alias. Previously this wasn't disassembled properly with "+all". This was because a check for "+all" was added to haveFeatures in AArch64SysReg but not in SysAlias. Reviewed By: MaskRay, lenary Differential Revision: https://reviews.llvm.org/D129147
-
Nikita Popov authored
As integer div/rem constant expressions are no longer supported, constants can no longer trap and are always safe to speculate. Remove the Constant::canTrap() method and its usages.
-
Nikita Popov authored
D128820 stopped creating div/rem constant expressions by default; this patch removes support for them entirely. The getUDiv(), getExactUDiv(), getSDiv(), getExactSDiv(), getURem() and getSRem() on ConstantExpr are removed, and ConstantExpr::get() now only accepts binary operators for which ConstantExpr::isSupportedBinOp() returns true. Uses of these methods may be replaced either by corresponding IRBuilder methods, or ConstantFoldBinaryOpOperands (if a constant result is required). On the C API side, LLVMConstUDiv, LLVMConstExactUDiv, LLVMConstSDiv, LLVMConstExactSDiv, LLVMConstURem and LLVMConstSRem are removed and corresponding LLVMBuild methods should be used. Importantly, this also means that constant expressions can no longer trap! This patch still keeps the canTrap() method to minimize diff -- I plan to drop it in a separate NFC patch. Differential Revision: https://reviews.llvm.org/D129148
-
Nikita Popov authored
The div/rem constant expressions are going away in D129148. Convert some tests to use InstSimplify instead, to show that the constant folding still happens.
-
wanglei authored
Differential Revision: https://reviews.llvm.org/D128432
-
Nikita Popov authored
There was a lot of unnecessary code here. Add the -O0 flag to avoid using constant expressions, otherwise it may get folded away during EarlyCSE. Verified that this test fails prior to the fixing commit.
-
wanglei authored
Ensure callee-saved registers are accessed relative to the stackpointer. Differential Revision: https://reviews.llvm.org/D128430
-
Adrian Kuegel authored
-
Fangrui Song authored
In the majority of cases (e.g. orphan sections), an OutputSection has at most one InputSectionDescription (isd). By changing the return type to ArrayRef<InputSection *> we can just reference the isd->sections. For OutputSections with more than one InputSectionDescription we use a caller provided SmallVector to copy the elements as before. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D129111
-
Carl Ritson authored
Merge tests and fixes from D128110 and D128315 on top of already committed D128800. Original author: arsenm Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D128882
-
Elvina Yakubova authored
Changed acquire implemetaion to __atomic_test_and_set() and release to __atomic_clear() so it eliminates inline asm usage and is arch independent. Elvina Yakubova, Advanced Software Technology Lab, Huawei Reviewers: yota9, maksfb, rafauler Differential Revision: https://reviews.llvm.org/D129162
-
Alex Bradbury authored
Use the isExternRefType and isFuncRefType helpers rather than reimplementing that logic in this function (which acts as a blocker to work to prototype alternative IR-level representations of reference types). This relands 8ccc7e0a (which had compilation errors).
-
Alex Bradbury authored
This reverts commit 8ccc7e0a. Wrong version of the patch was pushed.
-
Alex Bradbury authored
Use the isExternRefType and isFuncRefType helpers rather than reimplementing that logic in this function (which acts as a blocker to work to prototype alternative IR-level representations of reference types).
-
jacquesguan authored
This patch folds InsertOp(SplatOp(X), SplatOp(X)) to SplatOp(X). Differential Revision: https://reviews.llvm.org/D129058
-
Alexandre Ganea authored
Differential Revision: https://reviews.llvm.org/D129152
-
Alexandre Ganea authored
Previously, the warning seen: [22/95] Building CXX object tools\clang\lib\StaticAnalyzer\Checker...bj.clangStaticAnalyzerCheckers.dir\NoReturnFunctionChecker.cpp.objC:\git\llvm-project\clang\lib\StaticAnalyzer\Checkers\NoReturnFunctionChecker.cpp(149): warning C4305: 'if': truncation from 'size_t' to 'bool' C:\git\llvm-project\clang\include\clang/Analysis/SelectorExtras.h(28): note: see reference to function template instantiation 'clang::Selector clang::getKeywordSelector<const char,const char,const char,const char>(clang::ASTContext &,const char *,const char *,const char *,const char *)' being compiled C:\git\llvm-project\clang\lib\StaticAnalyzer\Checkers\NoReturnFunctionChecker.cpp(125): note: see reference to function template instantiation 'void clang::lazyInitKeywordSelector<const char,const char,const char,const char>(clang::Selector &,clang::ASTContext &,const char *,const char *,const char *,const char *)' being compiled
-
Alexandre Ganea authored
Previously, these warnings were seen: [6599/7564] Building native mlir-pdll... [270/278] Building CXX object tools/mlir/lib/Tools/PDLL/CodeGen/CMakeFiles/obj.MLIRPDLLCodeGen.dir/CPPGen.cpp.obj In file included from C:/git/llvm-project/mlir/lib/Tools/PDLL/CodeGen/CPPGen.cpp:20: C:/git/llvm-project/mlir/include\mlir/Tools/PDLL/ODS/Operation.h(202,16): warning: unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier [-Wmicrosoft-unqualified-friend] friend class Dialect; ^ ::mlir:: 1 warning generated. [278/278] Linking CXX executable bin\mlir-pdll.exe [6857/7564] Building CXX object tools/mlir/unittests/ExecutionEngine/CMakeFiles/MLIRExecutionEngineTests.dir/Invoke.cpp.obj In file included from C:/git/llvm-project/mlir/unittests/ExecutionEngine/Invoke.cpp:20: C:/git/llvm-project/mlir/include\mlir/ExecutionEngine/MemRefUtils.h(104,27): warning: shift count >= width of type [-Wshift-count-overflow] assert(sizeof(T) < (1ul << 32) && "Elemental type overflows"); ^ ~~ C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\assert.h(40,17): note: expanded from macro 'assert' (!!(expression)) || \ ^~~~~~~~~~ 1 warning generated. -
Félix Cloutier authored
Clang only allows you to use __attribute__((format)) on variadic functions. There are legit use cases for __attribute__((format)) on non-variadic functions, such as: (1) variadic templates ```c++ template<typename… Args> void print(const char *fmt, Args… &&args) __attribute__((format(1, 2))); // error: format attribute requires variadic function ``` (2) functions which take fixed arguments and a custom format: ```c++ void print_number_string(const char *fmt, unsigned number, const char *string) __attribute__((format(1, 2))); // ^error: format attribute requires variadic function void foo(void) { print_number_string(“%08x %s\n”, 0xdeadbeef, “hello”); print_number_string(“%d %s”, 0xcafebabe, “bar”); } ``` This change allows Clang users to attach __attribute__((format)) to non-variadic functions, including functions with C++ variadic templates. It replaces the error with a GCC compatibility warning and improves the type checker to ensure that received arrays are treated like pointers (this is a possibility in C++ since references to template types can bind to arrays). Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D112579 rdar://84629099 -
Julian Lettner authored
In my previous change [1], I added log output that made a test that expected "no output" fail. The easiest solution is to only print the new hint/warning when we at least ask for `verbosity=1`. [1] https://reviews.llvm.org/D128936 Radar-Id: rdar://96437354
-
Med Ismail Bennani authored
This patch should fix event handling for finite progress reports. Previously, the event handler would get stuck when receiving a finite progress report, and stop displaying upcoming reports. This was due to the fact that we were checking if the progress event was completed by calling `GetCompleted` but returns the completion amount instead of saying whether it's completed. That caused the current event id to remain the same, preventing all the following progress reports to be shown to the user. This patch also adds some logging to facilitate debugging progress events. rdar://91788326 Differential Revision: https://reviews.llvm.org/D128768 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Craig Topper authored
It might be possible to rewrite (and (shl/shr X, C2), C1) in a way that gives us a left shift that can be folded into a SHXADD.
-
River Riddle authored
This commit refactors the syntax of "ugly" attribute/type formats to not use strings for wrapping. This means that moving forward attirbutes and type formats will always need to be in some recognizable form, i.e. if they use incompatible characters they will need to manually wrap those in a string, the framework will no longer do it automatically. This has the benefit of greatly simplifying how parsing attributes/types work, given that we currently rely on some extremely complicated nested parser logic which is quite problematic for a myriad of reasons; unecessary complexity(we create a nested source manager/lexer/etc.), diagnostic locations can be off/wrong given string escaping, etc. Differential Revision: https://reviews.llvm.org/D118505
-
Vadim Paretsky authored
This check-in adds 4 APIs to support MSVC, specifically: * 3 APIs (__kmpc_sections_init, __kmpc_next_section, __kmpc_end_sections) to support the dynamic scheduling of OMP sections. * 1 API (__kmpc_copyprivate_light, a light-weight version of __kmpc_copyrprivate) to support the OMP single copyprivate clause. Differential Revision: https://reviews.llvm.org/D128403
-
Amara Emerson authored
To do this, we need to implement a target hook and make a minor change to the call lowering to demote arguments to sret if they can't be handled by the calling conventions. Fixes issue 56295 Differential Revision: https://reviews.llvm.org/D129098
-
Lang Hames authored
Add missing dependency on lli when building compiler-rt with LLVM_BUILD_EXTERNAL_COMPILER_RT. Previously we would non-deterministically fail the tests due to the missing binary. This is essentially identical to 0e5ea403, which added an earlier dependence on llvm-jitlink. rdar://96467892
-
Anton Afanasyev authored
GCC automatically links math library by adding `-lm` to linker command line, since C++ runtime `libstdc++` requires libm, so add it to `RISCVToochain` as well. Differential Revision: https://reviews.llvm.org/D129065
-
Muhammad Omair Javaid authored
This is a follow up on my last commit where one of the decorator was left unremoved. This patch removes Xfail decorator from TestLoadUnload.py as it is now passing on Arm/Linux buildbot.
-
Chris Bieneman authored
Based on feedback from @Aaron.Ballman. Remove the unused static ID char (can re-add it later if needed). Add test to cover some invalid HLSL vector instantations ensuring that the appropriate error messages are generated.
-
Muhammad Omair Javaid authored
This patch removes Xfail decorator from TestLoadUnload.py as it is now passing on Arm/Linux buildbot.
-
Dmitri Gribenko authored
-
LLVM GN Syncbot authored
-
Dmitri Gribenko authored
new clang-tidy checker for assignments within the condition clause of an 'if' statement. Reviewed By: gribozavr2 Differential Revision: https://reviews.llvm.org/D127114
-
Craig Topper authored
-
Craig Topper authored
This should make it easier to add more peepholes in the future.
-
Craig Topper authored
Instead of deleting nodes as we go, delete all dead nodes if a change is made. This allows adding peepholes that might make multiple nodes dead.
-
Jay Foad authored
According to D127731, PPCTLSDynamicCall does not preserve LiveIntervals, so stop claiming that it does and remove the code that tried to repair them. NFCI. Differential Revision: https://reviews.llvm.org/D128421
-
Joe Nash authored
-
Joseph Huber authored
Libomptarget grew out of a project that was originally not in LLVM. As we develop libomptarget this has led to an increasingly large clash between the naming conventions used. This patch fixes most of the variable names that did not confrom to the LLVM standard, that is `VariableName` for variables and `functionName` for functions. This patch was primarily done using my editor's linting messages, if there are any issues I missed arising from the automation let me know. Reviewed By: saiislam Differential Revision: https://reviews.llvm.org/D128997
-