- Jun 28, 2023
-
-
Serge Pavlov authored
If binary file specified as input with option --obj or -e is absent, now llvm-addr2line exits immediately. This patch extends this behavior to llvm-symbolizer. Previously llvm-symbolizer waited addresses from input stream or command line in this case. Differential Revision: https://reviews.llvm.org/D153219
-
Sven van Haastregt authored
Release BlockFrequencyInfo and BranchProbabilityInfo results and other per function information immediately afterwards, instead of holding onto the memory until the next `CodeGenPrepare::runOnFunction` call. Differential Revision: https://reviews.llvm.org/D152552 Co-authored-by:
Erik Hogeman <erik.hogeman@arm.com>
-
Nicolas Vasilache authored
This is almost NFC except for the fact that: - when multiple candidates are available we now return them in sorted order vs undetermined order previously - the type of the transform return is relaxed an a test is added for the case where the transform does not apply Differential Revision: https://reviews.llvm.org/D153941
-
Nikita Popov authored
-
Alexey Lapshin authored
DWARFLinker puts three names for subprograms into the .apple_names and .debug_names: short name, linkage name, name without template parameters. DW_TAG_subprogram DW_AT_linkage_name "_Z3fooIcEvv" DW_AT_name "foo<char>" short name: "foo<char>" linkage name: "_Z3fooIcEvv" name without template parameters: "foo" DWARFv5 does not require stripping template parameters for subprogram name. Current llvm-dwarfdump --verify reports the error if names stored in accelerator table do not match with DIE name(name with stripped template parameters stored in accelerator table does not match with original DIE name). This patch does not store name without template parameters into the .debug_names table. Differential Revision: https://reviews.llvm.org/D153869
-
Ties Stuij authored
Recently eXecute Only (XO) codegen was also allowed for armv6-M. Previously this was only implemented for ~armv7+, effectively if MOVW/MOVT is available. Regarding long calls, we remove the check for MOVW/MOVT when generating code for XO, which already was redundant as in the subtarget initialization we already check if XO is valid for the target. And targets that generate valid XO code should be able to handle the (wrapper globaladdress) node. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D153782
-
Jeremy Morse authored
X86's CMOV conversion transforms CMOV instructions into control flow between blocks, meaning the value is computed by a PHI rather than a "real" machine instruction. In instruction-referencing mode, we need to transfer the instruction label between the old CMOV and the new PHI instruction to mark where the variable value is computed. There's an extra complication in that memory operands can be unfolded from the CMOV and sunk into the new blocks -- the test checks both scenarios where the instruction number has to hop between instructions. This omission exposed by Dexter testing. Reviewed By: Orlando Differential Revision: https://reviews.llvm.org/D145565
-
OCHyams authored
In order to placate the machine-verifier, X86CmovConversion needs to reset the NoPHI property when it inserts a PHI. Fixes buildbot failure: https://lab.llvm.org/buildbot/#/builders/16/builds/50453 Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D153950
-
Sam McCall authored
Mutating join() isn't used and so appears to be an anti-optimization. Having Lattice vs Environment inconsistent is awkward, particularly when trying to minimize copies while joining. This patch eliminates the difference, but doesn't actually change the signature of join on concrete lattice types (as that's a breaking change). Differential Revision: https://reviews.llvm.org/D153908
-
Sam McCall authored
When an assertion like the following fails: EXPECT_THAT(map, ElementsAre(Pair("p", "nullable")))); Error message before: Actual: { 40-byte object <E8-A5 9C-7F 25-37 00-00 58-7E 51-51 D0-7F 00-00 00-00 00-00 00-00 00-00 01-00 00-00 00-00 00-00 00-DA C7-7F 25-37 00-00> } After: Actual: { ("p", "nonnull") } It is not ideal that we need to refer directly to DenseMapPair inside the internal namespace, but I believe the practical maintenance risk is low. This change is covered by DenseMap's unittests, as we've covered SmallString etc in the past. Differential Revision: https://reviews.llvm.org/D153930 -
Igor Kirillov authored
Precommit for D152258. Differential Revision: https://reviews.llvm.org/D153443
-
Martin Braenne authored
Depends On D153409 Reviewed By: xazax.hun Differential Revision: https://reviews.llvm.org/D153851
-
Martin Braenne authored
Reviewed By: sammccall, ymandel, gribozavr2, xazax.hun Differential Revision: https://reviews.llvm.org/D153409
-
Kadir Cetinkaya authored
We've been running this internally for months now, without any stability or correctness concerns. It has ~40% speed up on incremental diagnostics latencies (as preamble can get invalidated through code completion etc.). Differential Revision: https://reviews.llvm.org/D153882
-
Florian Hahn authored
This will enable follow-up refactoring to use the State directly in the constraint system, reducing the need to pass lots of arguments around.
-
Leonard Grey authored
Currently, we only return REGISTERS_UNAVAILABLE_FATAL if we receive KERN_INVALID_ARGUMENT from thread_status. In reality, there are other possible return values (MACH_SEND_INVALID_DEST for example) that make it dangerous to read memory. This can be demonstrated by running create_thread_leak.cpp in standalone mode where it will appear to hang due to a EXC_BAD_ACCESS while scanning the stack. This change reverses the current logic to treat MIG_ARRAY_TOO_LARGE as non-fatal, and all other errors as fatal. Differential revision: https://reviews.llvm.org/D153072
-
Kohei Yamaguchi authored
- Fix include paths for Transform Dialect Tutorial - Add math dialect's pass into Pass.md - Remove a include path of Quant dialect from Pass.md Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D153944
-
Jacob Bramley authored
This updates the documentation to match the implementation. Warning and Min interact in the same way as Warning and Max. Differential Revision: https://reviews.llvm.org/D153012
-
Nikita Popov authored
In order to also check return attributes.
-
Nikita Popov authored
Fold binop(shift(ShiftedC1, ShAmt), shift(ShiftedC2, add(ShAmt, AddC))) -> shift(binop(ShiftedC1, shift(ShiftedC2, AddC)), ShAmt) where both shifts are the same and AddC is a valid shift amount. Proofs: https://alive2.llvm.org/ce/z/PhVVeg Differential Revision: https://reviews.llvm.org/D152927 -
Nikita Popov authored
This converts the arg-count-mismatch.ll test to opaque pointers. The bitcasts of the called functions are now implicit and this affects behavior: We now infer memory attributes. This should be fine, as function-level attributes are not affected by signature mismatches. Differential Revision: https://reviews.llvm.org/D153406
-
Fangrui Song authored
Revert D153927 "Resubmit with fix: [NFC] Refactor MBB hotness/coldness into templated PSI functions." This reverts commit 4d8cf2ae. There is a library layering violation. LLVMAnalysis cannot depend on LLVMCodeGen. ``` llvm/include/llvm/Analysis/ProfileSummaryInfo.h:19:10: fatal error: 'llvm/CodeGen/MachineFunction.h' file not found 19 | #include "llvm/CodeGen/MachineFunction.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
-
Kai Sasaki authored
We can fold the complex.mul if the right value is obvious 1 or 0. Differential Revision: https://reviews.llvm.org/D153606
-
Fangrui Song authored
Commit 9f80831f introduced `#include <sys/rseq.h>`, but RSEQ_SIG is only defined by some glibc ports (aarch64,arm,mips,powerpc,s390,x86), causing other hosts (e.g., riscv64, loongarch64) to fail to build. Reviewed By: aidengrossman, xen0n Differential Revision: https://reviews.llvm.org/D153938
-
Hau Hsu authored
libpanel depends on libcurses, so when linking static libraries, libpanel should be places prior to libcurses. This patch resolves error like: ``` .../x86_64-centos6-linux-gnu/bin/ld: .../lib/libpanelw.a(p_show.o): in function `show_panel': p_show.c:(.text+0x39): undefined reference to `_nc_panelhook_sp' .../x86_64-centos6-linux-gnu/bin/ld: .../lib/libpanelw.a(p_show.o): in function `update_panels_sp': p_update.c:(.text+0x1f): undefined reference to `_nc_panelhook_sp' collect2: error: ld returned 1 exit status ``` Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D153844
-
Nicolas Vasilache authored
Revert "Revert "[mlir][Transform] Add support for mma.sync m16n8k16 f16 rewrite." and "[mlir][Transform] Introduce nvgpu transform extensions"" This reverts commit 6506692f. Differential Revision: https://reviews.llvm.org/D153845
-
Jean Perier authored
In WHERE and masked FORALL assignment, both the mask and the RHS may need to be saved in some temporary storage before evaluating the assignment. The code was trying to "optimize" that case when evaluating the RHS by not fetching the mask temporary that was just created, but in simple cases of WHERE construct where the evaluated mask is an hlfir.expr, this caused the hlfir.expr to be both used in an hlfir.associate and later in an hlfir.apply to create the fir.if to mask the RHS evaluation. This double usage prevents codegen from inlining the hlfir.expr at the hlfir.apply, and from "moving" the hlfir.expr storage into the temp during hlfir.associate bufferization. So this is pessimizing the code: this would lead to created two mask array temporary storages This was caught by the unexpectedly high number of "not yet implemented: hlfir.associate of hlfir.expr with more than one use" that were firing. Use the mask temporary instead (the hlfir.associate result) when possible. Some temporary (the "inlined stack") do not support fetching and pushing in the same run (a single counter is used to keep track of the fetching and pushing position). Add a canBeFetchedAfterPush() for safety, but this limitation is anyway not relevant for hlfir.expr since the inlined stack is only used to save "trivial" scalars. Also update the temporary storage name to only indicate "forall" if the top level construct is a FORALL. This is not a very precise name, but it should at least give a correct context to indicate in the IR why some temporary array storage was created. Differential Revision: https://reviews.llvm.org/D153880
-
Jean Perier authored
Lowering relies on dead code generation / unreachable block deletion to delete some code that is potentially invalid. However, calling mlir::simplifyRegion also merges block, which may promote SSA values to block arguments. Not all FIR types are intended to be block arguments. The added test shows an example where block merging led to fir.shape<> being block arguments (and a failure later in codegen). Reviewed By: tblah, clementval, vdonaldson Differential Revision: https://reviews.llvm.org/D153858
-
pvanhout authored
This allows PromoteAlloca to not be reliant on a second SROA run to remove the alloca completely. It just does the full transformation directly. Note PromoteAlloca is still reliant on SROA running first to canonicalize the IR. For instance, PromoteAlloca will no longer handle aggregate types because those should be simplified by SROA before reaching the pass. Reviewed By: #amdgpu, arsenm Differential Revision: https://reviews.llvm.org/D152706
-
Freddy Ye authored
Meanwhile this patch added missing tests for supported CPU names of cpu_dispatch/specific attribute and added more CHECKs for resolver function. Reviewed By: pengfei, skan Differential Revision: https://reviews.llvm.org/D152989
-
Petr Hosek authored
This is a follow up to D153931 but for the first stage.
-
Chuanqi Xu authored
Close https://github.com/llvm/llvm-project/issues/57222. This should be fixed with the series of bc73ef00. Add the test case for C++20 Named modules.
-
Han Shen authored
In D152399, we calculate BPI->BFI in MachineFunctionSplit pass just to use PSI->isFunctionHotInCallGraph, which is expensive. Instead, we can implement this directly with MBFI. Reviewer mentioned in the comment, that machine_size_opts already has isFunctionColdInCallGraph, isFunctionHotInCallGraphNthPercentile, etc implemented. These can be refactored and reused across MFS and machine size opts. This CL does this - it refactors out those internal static functions into PSI as templated functions, so they can be accessed easily. Differential Revision: https://reviews.llvm.org/D153927
-
Fangrui Song authored
This artificial size class map uses a very large kMaxSize (1<<34) which is not suitable for small kAddressSpaceSize systems (aarch64-*-linux-android, riscv64). Exposed by D153664.
-
Fangrui Song authored
Using "eabi" for aarch64 targets is a common mistake and warned by Clang Driver. We want to avoid it elsewhere as well. Just use the common "aarch64" without other triple components.
-
Fangrui Song authored
Commit 278ccdac says that kAllocatorSize must be >= (1<<32), but this is not accurate. This static_assert causes 128GiB kAllocatorSize to be unable to select DefaultSizeClassMap (kRegionSize is 1<<31). Relax the restriction to be able to satisfy the largest size class. This allows DefaultSizeClassMap to be usable with 128GiB kAllocatorSize, with check-{asan,lsan,sanitizer} passing. Reviewed By: #sanitizers, vitalybuka, kstoimenov Differential Revision: https://reviews.llvm.org/D153664
-
Fangrui Song authored
Similar to 02e9441d, but for llvm/test and one lld/test/ELF test.
-
Fangrui Song authored
Using "eabi" for aarch64 targets is a common mistake and warned by driver (D153430). We want to avoid them for -cc1 tests as well.
-