- Oct 03, 2021
-
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Simon Pilgrim authored
Extension to PR51979 so codegen tests keep close to the costmodel tests
-
Dávid Bolvanský authored
-
mydeveloperday authored
[clang-format] allow clang-format to be passed a file of filenames so we can add a regression suite of "clean clang-formatted files" from LLVM This change now generates that list, and the change to clang-format allows us to run clang-format quickly over these files via the list of files. clang-format.exe -verbose -n --files=./clang/docs/tools/clang-formatted-files.txt ``` Clang-formating 7926 files Formatting [1/7925] clang/bindings/python/tests/cindex/INPUTS/header1.h .. Formatting [7925/7925] utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h ``` This is needed because putting all those files on the command line is too long, and invoking 7900+ clang-formats is much slower (too slow to be honest) Using this method it takes on 7.5 minutes (on my machine) to run `clang-format -n` over all of the files (7925), this should result in us testing any change quickly and easily. We should be able to use rerunning this list to ensure that we don't regress clang-format over a large code base, but also use it to ensure none of the previous files which were 100% clang-formatted remain so. (which the LLVM premerge checks should be enforcing) Reviewed By: HazardyKnusperkeks Differential Revision: https://reviews.llvm.org/D111000
-
Dávid Bolvanský authored
This reverts commit a4933f57. New warnings were fixed.
-
Dávid Bolvanský authored
-
Dávid Bolvanský authored
This reverts commit f62d18ff. Found some cases in LLVM itself.
-
Dávid Bolvanský authored
Motivation: https://arstechnica.com/gadgets/2021/07/google-pushed-a-one-character-typo-to-production-bricking-chrome-os-devices/ Warn for pattern boolA & boolB or boolA | boolB where boolA and boolB has possible side effects. Casting one operand to int is enough to silence this warning: for example (int)boolA & boolB or boolA| (int)boolB Fixes https://bugs.llvm.org/show_bug.cgi?id=51216 Differential Revision: https://reviews.llvm.org/D108003
-
hyeongyu kim authored
This patch is changing the InsertElement's placeholder to poison without changing the LSV's behavior. Regardless of whether `StoreTy` is FixedVectorType or not, the poison value will be overwritten with a different value. Therefore, whether the InsertElement's placeholder is poison or undef will not affect the result of the program. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D111005
-
Hsiangkai Wang authored
-
Michał Górny authored
Include mlir_tools_dir in the PATH used in test environment, as otherwise mlir-reduce is unable to find mlir-opt when building standalone (and hence mlir_tools_dir != llvm_tools_dir). Differential Revision: https://reviews.llvm.org/D110992
-
Mehdi Amini authored
First the leak sanitizer has to be disabled, as even an empty script leads to leak detection with Python. Then we need to preload the ASAN runtime, as the main binary (python) won't be linked against it. This will only work on Linux right now. Differential Revision: https://reviews.llvm.org/D111004
-
Mehdi Amini authored
This requires more config to work reliably during lit execution. But also I see many leaks when running manually right now.
-
Mehdi Amini authored
-
Min-Yih Hsu authored
This patch adds the functionalities to print MDNode in tree shape. For example, instead of printing a MDNode like this: ``` <0x5643e1166888> = !DILocalVariable(name: "foo", arg: 2, scope: <0x5643e11c9740>, file: <0x5643e11c6ec0>, line: 8, type: <0x5643e11ca8e0>, flags: DIFlagPublic | DIFlagFwdDecl, align: 8) ``` The printTree/dumpTree functions can give you: ``` <0x5643e1166888> = !DILocalVariable(name: "foo", arg: 2, scope: <0x5643e11c9740>, file: <0x5643e11c6ec0>, line: 8, type: <0x5643e11ca8e0>, flags: DIFlagPublic | DIFlagFwdDecl, align: 8) <0x5643e11c9740> = distinct !DISubprogram(scope: null, spFlags: 0) <0x5643e11c6ec0> = distinct !DIFile(filename: "file.c", directory: "/path/to/dir") <0x5643e11ca8e0> = distinct !DIDerivedType(tag: DW_TAG_pointer_type, baseType: <0x5643e11668d8>, size: 1, align: 2) <0x5643e11668d8> = !DIBasicType(tag: DW_TAG_unspecified_type, name: "basictype") ``` Which is useful when using it in debugger. Where sometimes printing the whole module to see all MDNodes is too expensive. Differential Revision: https://reviews.llvm.org/D110113 -
Min-Yih Hsu authored
AsmWriterContext is a simple compound that stores TypePrinting, SlotTracker (i.e. "Machine" in AsmWriter), and Module instances -- three of the most commonly used objects in the AsmWriter infrastructure. Previously these three objects are passed as separate function arguments to most of the printer functions in this file. Tidying them up can bring easier code refactoring on printer functions in the future (e.g. when we want to pass additional objects to all printer functions). NOTE: Theoritically, this patch should be NFC. Differential Revision: https://reviews.llvm.org/D110112
-
Dan Liew authored
Use of space as a separator for options is problematic for wrapper scripts (i.e. implementations of `%run`) that have to marshall environment variables to target different than the host. Rather than requiring every implementation of `%run` to support spaces in `TSAN_OPTIONS` it is simpler to fix this single test case. rdar://83637067 Differential Revision: https://reviews.llvm.org/D110967
-
Uday Bondhugula authored
NFC. Drop unnecessary use of OpBuilder in buildTripCountMapAndOperands. Rename this to getTripCountMapAndOperands and remove stale comments. Differential Revision: https://reviews.llvm.org/D110993
-
Mehdi Amini authored
See http://llvm.org/pr52047 for tracking.
-
Mehdi Amini authored
See http://llvm.org/pr52046 for tracking.
-
Mehdi Amini authored
-
Alfsonso Gregory authored
ParameterABIAttributes functions work with unsigned integers as the index, so having the getter be signed makes no sense. Additionally, for this reason, the loop vars that were signed were changed to unsigned too. Reviewed By: jeroen.dobbelaere Differential Revision: https://reviews.llvm.org/D110344
-
Takafumi Arakaki authored
This patch re-introduces the fix in the commit https://github.com/llvm/llvm-project/commit/66b0cebf7f736 by @yrnkrn > In DwarfEHPrepare, after all passes are run, RewindFunction may be a dangling > > pointer to a dead function. To make sure it's valid, doFinalization nullptrs > RewindFunction just like the constructor and so it will be found on next run. > > llvm-svn: 217737 It seems that the fix was not migrated to `DwarfEHPrepareLegacyPass`. This patch also updates `llvm/test/CodeGen/X86/dwarf-eh-prepare.ll` to include `-run-twice` to exercise the cleanup. Without this patch `llvm-lit -v llvm/test/CodeGen/X86/dwarf-eh-prepare.ll` fails with ``` -- Testing: 1 tests, 1 workers -- FAIL: LLVM :: CodeGen/X86/dwarf-eh-prepare.ll (1 of 1) ******************** TEST 'LLVM :: CodeGen/X86/dwarf-eh-prepare.ll' FAILED ******************** Script: -- : 'RUN: at line 1'; /home/arakaki/build/llvm-project/main/bin/opt -mtriple=x86_64-linux-gnu -dwarfehprepare -simplifycfg-require-and-preserve-domtree=1 -run-twice < /home/arakaki/repos/watch/llvm-project/llvm/test/CodeGen/X86/dwarf-eh-prepare.ll -S | /home/arakaki/build/llvm-project/main/bin/FileCheck /home/arakaki/repos/watch/llvm-project/llvm/test/CodeGen/X86/dwarf-eh-prepare.ll -- Exit Code: 2 Command Output (stderr): -- Referencing function in another module! call void @_Unwind_Resume(i8* %ehptr) #1 ; ModuleID = '<stdin>' void (i8*)* @_Unwind_Resume ; ModuleID = '<stdin>' in function simple_cleanup_catch LLVM ERROR: Broken function found, compilation aborted! PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Program arguments: /home/arakaki/build/llvm-project/main/bin/opt -mtriple=x86_64-linux-gnu -dwarfehprepare -simplifycfg-require-and-preserve-domtree=1 -run-twice -S 1. Running pass 'Function Pass Manager' on module '<stdin>'. 2. Running pass 'Module Verifier' on function '@simple_cleanup_catch' #0 0x000056121b570a2c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/arakaki/repos/watch/llvm-project/llvm/lib/Support/Unix/Signals.inc:569:0 #1 0x000056121b56eb64 llvm::sys::RunSignalHandlers() /home/arakaki/repos/watch/llvm-project/llvm/lib/Support/Signals.cpp:97:0 #2 0x000056121b56f28e SignalHandler(int) /home/arakaki/repos/watch/llvm-project/llvm/lib/Support/Unix/Signals.inc:397:0 #3 0x00007fc7e9b22980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980) #4 0x00007fc7e87d3fb7 raise /build/glibc-S7xCS9/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0 #5 0x00007fc7e87d5921 abort /build/glibc-S7xCS9/glibc-2.27/stdlib/abort.c:81:0 #6 0x000056121b4e1386 llvm::raw_svector_ostream::raw_svector_ostream(llvm::SmallVectorImpl<char>&) /home/arakaki/repos/watch/llvm-project/llvm/include/llvm/Support/raw_ostream.h:674:0 #7 0x000056121b4e1386 llvm::report_fatal_error(llvm::Twine const&, bool) /home/arakaki/repos/watch/llvm-project/llvm/lib/Support/ErrorHandling.cpp:114:0 #8 0x000056121b4e1528 (/home/arakaki/build/llvm-project/main/bin/opt+0x29e3528) #9 0x000056121adfd03f llvm::raw_ostream::operator<<(llvm::StringRef) /home/arakaki/repos/watch/llvm-project/llvm/include/llvm/Support/raw_ostream.h:218:0 FileCheck error: '<stdin>' is empty. FileCheck command line: /home/arakaki/build/llvm-project/main/bin/FileCheck /home/arakaki/repos/watch/llvm-project/llvm/test/CodeGen/X86/dwarf-eh-prepare.ll -- ******************** ******************** Failed Tests (1): LLVM :: CodeGen/X86/dwarf-eh-prepare.ll Testing Time: 0.22s Failed: 1 ``` Reviewed By: loladiro Differential Revision: https://reviews.llvm.org/D110979
-
Arthur O'Dwyer authored
The existing tests for transform_view::iterator weren't quite right, and can be simplified now that we have more of C++20 available to us. Having done that, let's use the same pattern for iota_view::iterator as well. Differential Revision: https://reviews.llvm.org/D110774
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Mehdi Amini authored
This happens when streaming an empty Twine as part of a diagnostic. Differential Revision: https://reviews.llvm.org/D111002
-
Mehdi Amini authored
-
Mehdi Amini authored
Trying to get MLIR ASAN-clean.
-
Philip Reames authored
Inspired by the needs to D111001 and D109845. The seperation of concerns also amakes it easier to reason about correctness and completeness.
-
Kazu Hirata authored
Note that getNumArgOperands is considered a legacy name. See llvm/include/llvm/IR/InstrTypes.h for details.
-
Lang Hames authored
The page size for the host process is only needed in the in-process use case.
-
Simon Pilgrim authored
Both ports are required for BitScan ops. Update the uops counts + port usage based off the most recent llvm-exegesis captures (PR36895) and what Intel AoM / Agner reports as well.
-
Craig Topper authored
This reverts commit 1f161919. We're seeing some issues with this internally. It seems that when the spill is created by register allocation, the GPR doesn't get allocated and an assertion fires during virtual register rewriting. The .mir test case contains the spill before register allocation so register allocation sees it as any other instruction.
-
mydeveloperday authored
-
Mehdi Amini authored
I guess this is why we should use unique_ptr as much as possible. Also fix the InterfaceAttachmentTest.cpp test. Differential Revision: https://reviews.llvm.org/D110984
-
- Oct 02, 2021
-
-
Simon Pilgrim authored
PR52040 identified several issues with the HOP(HOP'(X,X),HOP'(Y,Y)) -> HOP(PERMUTE(HOP'(X,Y)),PERMUTE(HOP'(X,Y)) slow-HOP fold. Not only was there a copy+paste typo when accessing the inner HOP operands, but the (unnecessary) ReplaceAllUsesOfValueWith call was missing one use checks. Now that we have better shuffle combines of HOPs we can just return a new HOP() sequence and not use ReplaceAllUsesOfValueWith at all - this actually improved pair_sum_v8i32_v4i32 codegen as it kicks off further shuffle combines.
-