- Oct 07, 2023
-
-
Markus Böck authored
-
spupyrev authored
Aggressive inlining might produce huge functions with >10K of basic blocks. Since BFI treats _all_ blocks and jumps as "hot" having non-negative (but perhaps small) weight, the current implementation can be slow, taking minutes to produce an layout. This change introduces a few modifications that significantly (up to 50x on some instances) speeds up the computation. Some notable changes: - reduced the maximum chain size to 512 (from the prior 4096); - introeuced MaxMergeDensityRatio param to avoid merging chains with very differen densities; - dropped a couple of params that seem unnecessary. Looking at some "offline" metrics (e.g., the number of created fall-throughs), there shouldn't be problems; in fact, I do see some metrics go up. But it might be hard/impossible to measure perf difference for such small changes. I did test the performance clang-14 binary and do not record a perf or i-cache-related differences. My 5 benchmarks, with ext-tsp runtime (the lower the better) and "tsp-score" (the higher the better). **Before**: - benchmark 1: reordering running time is 2486 milliseconds score: 125503458 (128.3102%) - benchmark 2: reordering running time is 3443 milliseconds score: 12613997277 (129.7495%) - benchmark 2: reordering running time is 1978 milliseconds score: 1315881613 (105.8991%) - benchmark 4: reordering running time is 7364 milliseconds score: 89513906284 (100.3413%) - benchmark 5: reordering running time is 372605 milliseconds score: 21292505965077 (99.9979%) **After**: - benchmark 1: reordering running time is 2498 milliseconds score: 125510418 (128.3173%) - benchmark 2: reordering running time is 3201 milliseconds score: 12614502162 (129.7547%) - benchmark 3: reordering running time is 2137 milliseconds score: 1315938168 (105.9036%) - benchmark 4: reordering running time is 6242 milliseconds score: 89518095837 (100.3460%) - benchmark 5: reordering running time is 5819 milliseconds score: 21292295939119 (99.9969%)
-
Stella Laurenzo authored
This reverts commit fc865c20. Triggering assert on X86: ``` iree-compile: /work/third_party/llvm-project/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [To = llvm::PointerType, From = llvm::Type]: Assertion `detail::isPresent(Val) && "dyn_cast on a non-existent value"' failed. ``` See PR for comments and full stack trace.
-
PiJoules authored
The allocator should be tuned well enough for Fuchsia+RISCV.
-
Nitin John Raj authored
This patch adds minimal support for selecting G_SELECT. In the future we may want to fix this patch to select the other opcodes or handle that in the combiner.
-
LLVM GN Syncbot authored
-
Jonas Devlieghere authored
Add the ability to list all processes through the SB API. rdar://116188959
-
Brandon Wu authored
-
Philip Reames authored
The motivation of this change is simply to reduce test duplication. As can be seen in the (massive) test delta, we have many tests whose output differ only due to the use of addi on rv32 vs addiw on rv64 when the high bits are don't care. As an aside, we don't need to worry about the non-zero immediate restriction on the compressed variants because we're not directly forming the compressed variants. If we happen to get a zero immediate for the ADDI, then either a later optimization will strip the useless instruction or the encoder is responsible for not compressing the instruction.
-
Kazu Hirata authored
This patch fixes: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:10832:12: error: variable 'Changed' set but not used [-Werror,-Wunused-but-set-variable]
-
Abhinav271828 authored
Modified `Fraction.reduce()` to work with negative fractions as well. Added tests to verify the implementation of arithmetic and relational operators on Fractions.
-
Craig Topper authored
Retain name for SExt->ZExt and AShr->LShr. Previously SExt->ZExt copied the name with a numeric suffix. AShr->LShr dropped it.
-
Andrzej Warzynski authored
This patch constrains the patterns for converting `vector.contract` to `vector.outerproduct` so that * the reduction dimension is _not unrolled_ if the corresponding dimension is scalable. This is necessary as the current lowering is incorrect for scalable dims. Indeed, the following unrolling for `vector.contract` would be invalid if the corresponding dimension was scalable (K is the size of the reduction dimension): ``` // K times. This is valid if K _is not_ scalable. %lhs = vector.extract %LHS[0] %rhs = vector.extract %RHS[0] vector.outerproduct %lhs, %rhs %lhs = vector.extract %LHS[1] %rhs = vector.extract %RHS[1] vector.outerproduct %lhs, %rhs // ... ``` Instead, a `for` loop should be generated: ``` // This would be valid regardless of whether K is scalable or not scf.for %k = 0 to K step 1 %lhs = vector.extract LHS[%k] %rhs = vector.extract RHS[%k] vector.outerproduct %lhs, %rhs ``` However, the lowering of: * `vector.extract` of vector slices with dynamic indices is incomplete and hence the implementation proposed above (with `scf.for`) wouldn't work just yet, i.e. it wouldn't be possible to lower it further. Instead, this patch disables unrolling in cases when the reduction dimension is scalable, i.e. where the generated code would be functionally incorrect. In order to document unsupported cases, a dedicated test file is added: * "vector-contract-to-outerproduct-transforms-unsupported.mlir" This is the first patch in a series of patches that strives to update these patterns (and to test them) for scalable vectors. Resolves #68400
-
- Oct 06, 2023
-
-
Anatoly Trosinenko authored
Fix test failure in non-assertion builds introduced by f1b2dd2a.
-
Jon Roelofs authored
-
Philip Reames authored
-
Ben Mudd authored
This patch adds support for salvaging TRUNC nodes during SelectionDAG, fixing LLVM issue #63076: https://github.com/llvm/llvm-project/issues/63076 Reviewed in: https://github.com/llvm/llvm-project/pull/66922
-
Valentin Clement (バレンタイン クレメン) authored
This patch updates the lowering of OpenACC routine directive to avoid creating duplicate acc.routine operations when all the clauses are identical. If clauses differ an error is raised.
-
Michael Buch authored
Split out the assertions that fail on Windows in preparation to XFAILing them. Drive-by change: * Add a missing `self.build()` call in `test_union_in_anon_namespace` * Fix formatting * Add expectedFailureWindows decorator
-
Anatoly Trosinenko authored
Moving instructions that are recognized as branch targets by BTI can result in runtime crash. In outliner tests, replaced "BRK 1" with "HINT 0" (a.k.a. NOP) as a generic outlinable instruction.
-
Casey Carter authored
-
Jonas Devlieghere authored
Add myself to CODEOWNERS for the lldb subdirectory. Discourse discussion: https://discourse.llvm.org/t/usage-of-codeowners-file/73524
-
David Spickett authored
Spaces before the `.. option` for a few of these meant they were indented, as if they were sub-options somehow.
-
Jonas Devlieghere authored
dsymutil is using an excessive amount of memory because it's holding on to the DWARF Context, even after it's done processing the corresponding object file. This patch releases the input DWARF after cloning, at which point it is no longer needed. This has always been the intended behavior, though I didn't bisect to figure out when this regressed. When linking swift, this reduces peak (dirty) memory usage from 25 to 15 gigabytes. rdar://111525100
-
agozillon authored
[OpenMP][OpenMPIRBuilder] Move copyInput to a passed in lambda function and re-order kernel argument load/stores (#68124) This patch moves the existing copyInput function into a lambda argument that can be defined by a caller to the function. This allows more flexibility in how the function is defined, allowing Clang and MLIR to utilise their own respective functions and types inside of the lamba without affecting the OMPIRBuilder itself. The idea is to eventually replace/build on the existing copyInput function that's used and moved into OpenMPToLLVMIRTranslation.cpp to a slightly more complex implementation that uses MLIRs map information (primarily ByRef and ByCapture information at the moment). The patch also moves kernel load stores to the top of the kernel, prior to the first openmp runtime invocation. Just makes the IR a little closer to Clang.
-
David Spickett authored
Bridge network means that you can get to any port on the VM, from the host, which is great. However it is quite involved to setup in some cases, and I've certainly messed it up in the past. An alternative is forwarding a block of ports and using some hidden options to lldb-server to limit what it uses. This commit documents that and the pitfall that the port list isn't shared. The theory also works for Arm's FVP (which inspired me to write this up) but since QEMU is the preferred option upstream, it goes in that document. Along the way I fixed a link to the QEMU page that used the URL not a relative link to the document.
-
Lei authored
Add transformed register to kill flag work list for XVCVDPSP tranformations. Ref: reviews.llvm.org/D133103
-
Nikita Popov authored
-
Pete Steinfeld authored
I added instructions for setting the environment variable ROOT_DIR.
-
Natalie Chouinard authored
There is no log10 instruction in the GLSL Extended Instruction Set so to implement the HLSL log10 intrinsic when targeting Vulkan this change adds the logic to derive the result using the following formula: ``` log10(x) = log2(x) * (1 / log2(10)) = log2(x) * 0.30103 ``` -
Benjamin Maxwell authored
This is not yet supported and previously led to a confusing crash where an extract op with a kDynamic marker, but no dynamic positions was created. The verifier has also been updated to check for this, and hint at where the problem is likely to be.
-
Joseph Huber authored
Summary: There were a few tests that weren't enabled on the GPU. This is because the logic caused them to be skipped as we don't use CPU featured on the host. This also disables the logic making multiple versions of the memory functions.
-
Christian Sigg authored
[mlir][bazel] Fix after https://github.com/llvm/llvm-project/commit/ef8c26b7728c4417ffdaea8b633ceebf0adb292d
-
Jie Fu authored
/llvm-project/mlir/lib/Dialect/Transform/Transforms/TransformInterpreterPassBase.cpp:167:1: error: unused function 'saveReproToTempFile' [-Werror,-Wunused-function] saveReproToTempFile(llvm::raw_ostream &os, Operation *target, ^ 1 error generated.
-
Christian Sigg authored
[mlir][bazel] Fix after https://github.com/llvm/llvm-project/commit/ef8c26b7728c4417ffdaea8b633ceebf0adb292d
-
Petar Avramovic authored
Temporal divergence that was present in input or introduced in IR transforms, like code-sinking or LICM, is handled in SIFixSGPRCopies by changing sgpr source instr to vgpr instr. After 5b657f50, that moved LICM after AMDGPUCodeGenPrepare, machine-sinking can introduce temporal divergence by sinking instructions outside of the cycle. Add isSafeToSink callback in TargetInstrInfo.
-
Petar Avramovic authored
Introduced by 5b657f50 that moved LICM after AMDGPUCodeGenPrepare. Some instructions are no longer sunk during ir optimizations but in machine-sinking instead. If vgpr instruction used sgpr defined inside the cycle is sunk outside of the cycle we end up with not-handled case of temporal divergence. Add test for theoretical case when SALU instruction (represents uniform value) is sunk outside of the cycle. Add a test when SALU instruction can be sunk if it edits lane mask.
-
Petar Avramovic authored
This reverts commit 3f8ef57b.
-
Yingwei Zheng authored
This patch folds the pattern `a ne/eq (zext/sext (a ne/eq c))` into a boolean constant or a compare. Clang vs GCC: https://godbolt.org/z/4ro817WE8 Proof for `zext`: https://alive2.llvm.org/ce/z/6z9NRF Proof for `sext`: https://alive2.llvm.org/ce/z/tv5wuE Fixes #65073.
-