Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
43570a28 |
| 15-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[WebAssembly] Remove unused includes (NFC) (#116318)
Identified with misc-include-cleaner.
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4 |
|
#
cd3667d1 |
| 02-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[CodeGen] Update a few places that were passing Register to raw_ostream::operator<< (#106877)
These would implicitly cast the register to `unsigned`. Switch most of
them to use printReg will give a
[CodeGen] Update a few places that were passing Register to raw_ostream::operator<< (#106877)
These would implicitly cast the register to `unsigned`. Switch most of
them to use printReg will give a more readable output. Change some
others to use Register::id() so we can eventually remove the implicit
cast to `unsigned`.
show more ...
|
Revision tags: llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1 |
|
#
984dc4b9 |
| 26-Jul-2023 |
Reid Kleckner <rnk@google.com> |
[WebAssembly] Create separation between MC and CodeGen layers
Move WebAssemblyUtilities from Utils to the CodeGen library. It primarily deals in MIR layer types, so it really lives in the CodeGen li
[WebAssembly] Create separation between MC and CodeGen layers
Move WebAssemblyUtilities from Utils to the CodeGen library. It primarily deals in MIR layer types, so it really lives in the CodeGen library.
Move a variety of other things around to try create better separation.
See issue #64166 for more info on layering.
Move llvm/include/CodeGen/WasmAddressSpaces.h back to llvm/lib/Target/WebAssembly/Utils.
Differential Revision: https://reviews.llvm.org/D156472
show more ...
|
Revision tags: llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0 |
|
#
4f2401f4 |
| 13-Mar-2023 |
Heejin Ahn <aheejin@gmail.com> |
[WebAssembly] Use MachineInstr::setDebugValueUndef
When making `DBG_VALUE`/`DBG_VALUE_LIST` instructions undefined, there is a method that takes care of it so we don't need to do it manually. This c
[WebAssembly] Use MachineInstr::setDebugValueUndef
When making `DBG_VALUE`/`DBG_VALUE_LIST` instructions undefined, there is a method that takes care of it so we don't need to do it manually. This changes the test because previously we are converting `DBG_VALUE_LIST`s into `DBG_VALUE $noreg` but now we leave `DBG_VALUE_LIST` but set it to undef by turning all its register operands `$noreg`. The effect is the same.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D145998
show more ...
|
Revision tags: llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
981a28f7 |
| 30-Nov-2022 |
Heejin Ahn <aheejin@gmail.com> |
[WebAssembly] Nullify dangling register DBG_VALUEs
Register-based `DBG_VALUE` should have been converted into either local-based or stack-operand-based, so at this point they don't contain any infor
[WebAssembly] Nullify dangling register DBG_VALUEs
Register-based `DBG_VALUE` should have been converted into either local-based or stack-operand-based, so at this point they don't contain any information.
This CL nullifies them, i.e., turning them info `DBG_VALUE $noreg, $noreg, ...`, which makes the variable appear as "optimized out". It is not safe to simply remove these instruction because at this point, because the fact that there is a `DBG_VALUE` here means the location this variable resides has changed to somewhere else; we've lost that information where that was.
---
The below is not really about the CL itself, but a pre-existing bug in `llvm-locstats` variable coverage we are going to be affected after this CL. Feel free to skip if you don't have time.
This CL has an unexpected side effect of increasing variable coverage reported by `llvm-locstats`, due to a bug mentioned in https://lists.llvm.org/pipermail/llvm-dev/2021-January/148139.html. Currently inlined functions' formal parameters that don't have any coverage, including those who only have `DBG_VALUE $noreg, $noreg`s associated with them, don't generate `DW_TAG_formal_parameter` DIEs, and they don't get into consideration in `llvm-dwarf --statistics` and `llvm-locstats`. This is a known bug mentioned in https://lists.llvm.org/pipermail/llvm-dev/2021-January/148139.html. For example, this is a snippet of `llvm-dwarfdump` output of `wc`, where `isword` is inlined into another function. `isword` has a formal parameter `c`, which doesn't have any coverage in this inlined area, so its `DW_TAG_formal_parameter` was not generated: ``` 0x0000018d: DW_TAG_inlined_subroutine DW_AT_abstract_origin (0x0000012c "isword") DW_AT_low_pc (0x00000166) DW_AT_high_pc (0x0000016d) DW_AT_call_file ("/usr/local/google/home/aheejin/test/dwarf-verify/wc/wc.c") DW_AT_call_line (100) DW_AT_call_column (0x0a) ```
But our dangling-register-based formal parameters currently generate `DW_TAG_formal_parameter` DIEs, even though they don't have any meaningful coverage, and this happened to generate correct statistics, because it correctly sees this `c` doesn't have any coverage in this inlined area. So our current `llvm-dwarfdump` (before this CL) is like: ``` 0x0000018d: DW_TAG_inlined_subroutine DW_AT_abstract_origin (0x0000012c "isword") DW_AT_low_pc (0x00000166) DW_AT_high_pc (0x0000016d) DW_AT_call_file ("/usr/local/google/home/aheejin/test/dwarf-verify/wc/wc.c") DW_AT_call_line (100) DW_AT_call_column (0x0a)
0x0000019a: DW_TAG_formal_parameter DW_AT_abstract_origin (0x00000134 "c") ``` Note that this `DW_TAG_formal_parameter` doesn't have any `DW_AT_location` attribute under it, meaning it doesn't have any coverage.
On the other hand, if the `DW_TAG_formal_parameter` is not generated, `llvm-dwarfdump --statistics` wouldn't even know about the parameter's existence, and doesn't include it in the coverage computation, making the overall coverage (incorrectly) go up.
`DBG_VALUE $noreg, $noreg` used to generate this empty `DW_TAG_formal_parameter`, but it changed for consistency in D95617.
It looks this bug in `llvm-dwarf --statistics` (and `llvm-locstats`, which uses `llvm-dwarf --statistics`) has not been fixed so far. So we get the coverage that's little incorrectly higher than our actual coverage. But this bug apparently affects every target in LLVM.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D139675
show more ...
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
#
71fbfb49 |
| 12-May-2021 |
Heejin Ahn <aheejin@gmail.com> |
[WebAssembly] Omit DBG_VALUE after terminator
When a stackified variable has an associated `DBG_VALUE` instruction, DebugFixup pass adds a `DBG_VALUE` instruction after the stackified value's last u
[WebAssembly] Omit DBG_VALUE after terminator
When a stackified variable has an associated `DBG_VALUE` instruction, DebugFixup pass adds a `DBG_VALUE` instruction after the stackified value's last use to clear the variable's debug range info. But when the last use instruction is a terminator, it can cause a verification failure (when run with `-verify-machineinstrs`) because there are no instructions allowed after a terminator.
For example: ``` %myvar = ... DBG_VALUE target-index(wasm-operand-stack), $noreg, !"myvar", ... BR_IF 0, %myvar, ... DBG_VALUE $noreg, $noreg, !"myvar", ... ``` In this test, `%myvar` is stackified, so the first `DBG_VALUE` instruction's first operand has changed to `wasm-operand-stack` to denote it. And an additional `DBG_VALUE` instruction is added after its last use, `BR_IF`, to signal variable `myvar` is not in the operand stack anymore. But because the `DBG_VALUE` instruction is added after the `BR_IF`, a terminator, it fails MachineVerifier.
`DBG_VALUE` instructions are used in `DbgEntityHistoryCalculator` to compute value ranges to emit DWARF info, and it turns out the `DbgEntityHistoryCalculator` terminates ranges at the end of a BB, so we don't need to emit `DBG_VALUE` after a terminator.
Fixes https://bugs.llvm.org/show_bug.cgi?id=50175.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D102309
show more ...
|
#
0b2bc69b |
| 21-Apr-2021 |
Heejin Ahn <aheejin@gmail.com> |
[WebAssembly] Put utility functions in Utils directory (NFC)
This CL 1. Creates Utils/ directory under lib/Target/WebAssembly 2. Moves existing WebAssemblyUtilities.cpp|h into the Utils/ directory 3
[WebAssembly] Put utility functions in Utils directory (NFC)
This CL 1. Creates Utils/ directory under lib/Target/WebAssembly 2. Moves existing WebAssemblyUtilities.cpp|h into the Utils/ directory 3. Creates Utils/WebAssemblyTypeUtilities.cpp|h and put type declarataions and type conversion functions scattered in various places into this single place.
It has been suggested several times that it is not easy to share utility functions between subdirectories (AsmParser, DIsassembler, MCTargetDesc, ...). Sometimes we ended up [[ https://reviews.llvm.org/D92840#2478863 | duplicating ]] the same function because of this.
There are already other targets doing this: AArch64, AMDGPU, and ARM have Utils/ subdirectory under their target directory.
This extracts the utility functions into a single directory Utils/ and make them sharable among all passes in WebAssembly/ and its subdirectories. Also I believe gathering all type-related conversion functionalities into a single place makes it more usable. (Actually I was working on another CL that uses various type conversion functions scattered in multiple places, which became the motivation for this CL.)
Reviewed By: dschuff, aardappel
Differential Revision: https://reviews.llvm.org/D100995
show more ...
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
#
10e2e7de |
| 15-May-2020 |
Wouter van Oortmerssen <aardappel@gmail.com> |
[WebAssembly] iterate stack in DebugFixup from the top.
Differential Revision: https://reviews.llvm.org/D80045
|
#
62efd1ec |
| 15-May-2020 |
Wouter van Oortmerssen <aardappel@gmail.com> |
[WebAssembly] Fixed debugloc in DebugFixup pass
BuildMI requires this debug loc to be from the same sub program as the variable metadata passed in.
Differential Revision: https://reviews.llvm.org/
[WebAssembly] Fixed debugloc in DebugFixup pass
BuildMI requires this debug loc to be from the same sub program as the variable metadata passed in.
Differential Revision: https://reviews.llvm.org/D80019
show more ...
|
#
2b7fe086 |
| 30-Apr-2020 |
Wouter van Oortmerssen <aardappel@gmail.com> |
[WebAssembly] Added Debug Fixup pass
This pass changes debug_value instructions referring to stackified registers into TI_OPERAND_STACK with correct stack depth.
|