#
c5d24009 |
| 18-Jun-2020 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
WebAssembly: Don't store MachineFunction in MachineFunctionInfo
Soon it will be disallowed to depend on MachineFunction state in the constructor. This was only being used to get the MachineRegisterI
WebAssembly: Don't store MachineFunction in MachineFunctionInfo
Soon it will be disallowed to depend on MachineFunction state in the constructor. This was only being used to get the MachineRegisterInfo for an assert, which I'm not sure is necessarily worth it. I would think any missing defs would be caught by the verifier later instead.
show more ...
|
Revision tags: llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
#
16aabc86 |
| 19-Feb-2020 |
Thomas Lively <tlively@google.com> |
[WebAssembly] Fix memory bug introduced in 52861809994c
Summary: The instruction at `DefI` can sometimes be destroyed by `rematerializeCheapDef`, so it should not be used after calling that function
[WebAssembly] Fix memory bug introduced in 52861809994c
Summary: The instruction at `DefI` can sometimes be destroyed by `rematerializeCheapDef`, so it should not be used after calling that function. The fix is to use `Insert` instead when examining additional multivalue stackifications. `Insert` is the address of the new defining instruction after all moves and rematerializations have taken place.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74875
show more ...
|
Revision tags: llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init |
|
#
52861809 |
| 14-Jan-2020 |
Thomas Lively <tlively@google.com> |
[WebAssembly] Fix RegStackify and ExplicitLocals to handle multivalue
Summary: There is still room for improvement in the handling of multivalue nodes in both passes, but the current algorithm is at
[WebAssembly] Fix RegStackify and ExplicitLocals to handle multivalue
Summary: There is still room for improvement in the handling of multivalue nodes in both passes, but the current algorithm is at least correct and optimizes some simpler cases. In order to make future optimizations of these passes easier and build confidence that the current algorithms are correct, this CL also adds a script that automatically and exhaustively generates interesting multivalue test cases.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72902
show more ...
|
#
7b64a590 |
| 06-Feb-2020 |
Thomas Lively <tlively@google.com> |
Reland "[WebAssembly][InstrEmitter] Foundation for multivalue call lowering"
This reverts commit 649aba93a27170cb03a4b17c98a19b9237a880b8, now that the approach started there has been shown to be wo
Reland "[WebAssembly][InstrEmitter] Foundation for multivalue call lowering"
This reverts commit 649aba93a27170cb03a4b17c98a19b9237a880b8, now that the approach started there has been shown to be workable in the patch series culminating in https://reviews.llvm.org/D74192.
show more ...
|
#
649aba93 |
| 03-Feb-2020 |
Thomas Lively <tlively@google.com> |
Revert "[WebAssembly][InstrEmitter] Foundation for multivalue call lowering"
Summary: This reverts commit 3ef169e586f4d14efe690c23c878d5aa92a80eb5. The purpose of this commit was to allow stack mach
Revert "[WebAssembly][InstrEmitter] Foundation for multivalue call lowering"
Summary: This reverts commit 3ef169e586f4d14efe690c23c878d5aa92a80eb5. The purpose of this commit was to allow stack machines to perform instruction selection for instructions with variadic defs. However, MachineInstrs fundamentally cannot support variadic defs right now, so this change does not turn out to be useful.
Depends on D73927.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73928
show more ...
|
#
d966bf83 |
| 28-Jan-2020 |
Derek Schuff <dschuff@chromium.org> |
[WebAssembly] Preserve debug frame base information through register coloring
2 fixes:
Register coloring can re-assign virtual registers. When the frame base register is colored, update the DwarfFr
[WebAssembly] Preserve debug frame base information through register coloring
2 fixes:
Register coloring can re-assign virtual registers. When the frame base register is colored, update the DwarfFrameBase accordingly When the frame base register is stackified, do not attempt to encode DW_AT_frame_base as a local In the future we will presumably want to handle this case better but for now we can emit worse debug info rather than crashing.
Differential Revision: https://reviews.llvm.org/D73581
show more ...
|
#
3ef169e5 |
| 13-Dec-2019 |
Thomas Lively <tlively@google.com> |
[WebAssembly][InstrEmitter] Foundation for multivalue call lowering
Summary: WebAssembly is unique among upstream targets in that it does not at any point use physical registers to store values. Ins
[WebAssembly][InstrEmitter] Foundation for multivalue call lowering
Summary: WebAssembly is unique among upstream targets in that it does not at any point use physical registers to store values. Instead, it uses virtual registers to model positions in its value stack. This means that some target-independent lowering activities that would use physical registers need to use virtual registers instead for WebAssembly and similar downstream targets. This CL generalizes the existing `usesPhysRegsForPEI` lowering hook to `usesPhysRegsForValues` in preparation for using it in more places.
One such place is in InstrEmitter for instructions that have variadic defs. On register machines, it only makes sense for these defs to be physical registers, but for WebAssembly they must be virtual registers like any other values. This CL changes InstrEmitter to check the new target lowering hook to determine whether variadic defs should be physical or virtual registers.
These changes are necessary to support a generalized CALL instruction for WebAssembly that is capable of returning an arbitrary number of arguments. Fully implementing that instruction will require additional changes that are described in comments here but left for a follow up commit.
Reviewers: aheejin, dschuff, qcolombet
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71484
show more ...
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2 |
|
#
05c145d6 |
| 12-Aug-2019 |
Daniel Sanders <daniel_l_sanders@apple.com> |
[webassembly] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM
Summary: This clang-tidy check is looking for unsigned integer variables whose initializer starts with an implicit cast
[webassembly] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM
Summary: This clang-tidy check is looking for unsigned integer variables whose initializer starts with an implicit cast from llvm::Register and changes the type of the variable to llvm::Register (dropping the llvm:: where possible).
Reviewers: aheejin
Subscribers: jholewinski, MatzeB, qcolombet, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, wdng, nhaehnle, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, javed.absar, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, tpr, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, Jim, s.egerton, llvm-commits
Tags: #llvm
Differential Revision for whole review: https://reviews.llvm.org/D65962
llvm-svn: 368627
show more ...
|
#
2bea69bf |
| 01-Aug-2019 |
Daniel Sanders <daniel_l_sanders@apple.com> |
Finish moving TargetRegisterInfo::isVirtualRegister() and friends to llvm::Register as started by r367614. NFC
llvm-svn: 367633
|
Revision tags: llvmorg-9.0.0-rc1, llvmorg-10-init |
|
#
9f96a58c |
| 15-Jul-2019 |
Heejin Ahn <aheejin@gmail.com> |
[WebAssembly] Rename except_ref type to exnref
Summary: We agreed to rename `except_ref` to `exnref` for consistency with other reference types in https://github.com/WebAssembly/exception-handling/i
[WebAssembly] Rename except_ref type to exnref
Summary: We agreed to rename `except_ref` to `exnref` for consistency with other reference types in https://github.com/WebAssembly/exception-handling/issues/79. This also renames WebAssemblyInstrExceptRef.td to WebAssemblyInstrRef.td in order to use the file for other reference types in future.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64703
llvm-svn: 366145
show more ...
|
#
d8ddf839 |
| 12-Jul-2019 |
Wouter van Oortmerssen <aardappel@gmail.com> |
[WebAssembly] refactored utilities to not depend on MachineInstr
Summary: Most of these functions can work for MachineInstr and MCInst equally now.
Reviewers: dschuff
Subscribers: MatzeB, sbc100,
[WebAssembly] refactored utilities to not depend on MachineInstr
Summary: Most of these functions can work for MachineInstr and MCInst equally now.
Reviewers: dschuff
Subscribers: MatzeB, sbc100, jgravelle-google, aheejin, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64643
llvm-svn: 365965
show more ...
|
Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2 |
|
#
c45e39b3 |
| 04-Feb-2019 |
Craig Topper <craig.topper@intel.com> |
[CodeGen][ARC][SystemZ][WebAssembly] Use MachineInstr::isInlineAsm in more places instead of just comparing opcode. NFCI
I'm looking at adding a second INLINEASM opcode for better modeling asm-goto
[CodeGen][ARC][SystemZ][WebAssembly] Use MachineInstr::isInlineAsm in more places instead of just comparing opcode. NFCI
I'm looking at adding a second INLINEASM opcode for better modeling asm-goto as a terminator. Using the existing predicate will reduce teh number of places that will need to use the new opcode.
llvm-svn: 353095
show more ...
|
#
18c56a07 |
| 04-Feb-2019 |
Heejin Ahn <aheejin@gmail.com> |
[WebAssembly] clang-tidy (NFC)
Summary: This patch fixes clang-tidy warnings on wasm-only files. The list of checks used is: `-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-
[WebAssembly] clang-tidy (NFC)
Summary: This patch fixes clang-tidy warnings on wasm-only files. The list of checks used is: `-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming,modernize-*` (LLVM's default .clang-tidy list is the same except it does not have `modernize-*`. But I've seen in multiple CLs in LLVM the modernize style was recommended and code was fixed based on the style, so I added it as well.)
The common fixes are: - Variable names start with an uppercase letter - Function names start with a lowercase letter - Use `auto` when you use casts so the type is evident - Use inline initialization for class member variables - Use `= default` for empty constructors / destructors - Use `using` in place of `typedef`
Reviewers: sbc100, tlively, aardappel
Subscribers: dschuff, sunfish, jgravelle-google, yurydelendik, kripken, MatzeB, mgorny, rupprecht, llvm-commits
Differential Revision: https://reviews.llvm.org/D57500
llvm-svn: 353075
show more ...
|
#
d6f48786 |
| 30-Jan-2019 |
Heejin Ahn <aheejin@gmail.com> |
[WebAssembly] Exception handling: Switch to the new proposal
Summary: This switches the EH implementation to the new proposal: https://github.com/WebAssembly/exception-handling/blob/master/proposals
[WebAssembly] Exception handling: Switch to the new proposal
Summary: This switches the EH implementation to the new proposal: https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md (The previous proposal was https://github.com/WebAssembly/exception-handling/blob/master/proposals/old/Exceptions.md)
- Instruction changes - Now we have one single `catch` instruction that returns a except_ref value - `throw` now can take variable number of operations - `rethrow` does not have 'depth' argument anymore - `br_on_exn` queries an except_ref to see if it matches the tag and branches to the given label if true. - `extract_exception` is a pseudo instruction that simulates popping values from wasm stack. This is to make `br_on_exn`, a very special instruction, work: `br_on_exn` puts values onto the stack only if it is taken, and the # of values can vay depending on the tag.
- Now there's only one `catch` per `try`, this patch removes all special handling for terminate pad with a call to `__clang_call_terminate`. Before it was the only case there are two catch clauses (a normal `catch` and `catch_all` per `try`).
- Make `rethrow` act as a terminator like `throw`. This splits BB after `rethrow` in WasmEHPrepare, and deletes an unnecessary `unreachable` after `rethrow` in LateEHPrepare.
- Now we stop at all catchpads (because we add wasm `catch` instruction that catches all exceptions), this creates new `findWasmUnwindDestinations` function in SelectionDAGBuilder.
- Now we use `br_on_exn` instrution to figure out if an except_ref matches the current tag or not, LateEHPrepare generates this sequence for catch pads: ``` catch block i32 br_on_exn $__cpp_exception end_block extract_exception ```
- Branch analysis for `br_on_exn` in WebAssemblyInstrInfo
- Other various misc. changes to switch to the new proposal.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D57134
llvm-svn: 352598
show more ...
|
Revision tags: llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
#
be24c020 |
| 15-Jan-2019 |
Yury Delendik <ydelendik@mozilla.com> |
[WebAssembly] Fix updating/moving DBG_VALUEs in RegStackify
Summary: As described in PR40209, there can be issues in DBG_VALUEs handling when multiple defs present in a BB. This patch adds logic for
[WebAssembly] Fix updating/moving DBG_VALUEs in RegStackify
Summary: As described in PR40209, there can be issues in DBG_VALUEs handling when multiple defs present in a BB. This patch adds logic for detection of related to def DBG_VALUEs and localizes register update and movement to found DBG_VALUEs.
Reviewers: aheejin
Subscribers: mgorny, dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D56401
llvm-svn: 351216
show more ...
|
#
e73c7a1a |
| 10-Jan-2019 |
Heejin Ahn <aheejin@gmail.com> |
[WebAssembly] Fix stack pointer store check in RegStackify
Summary: We now use __stack_pointer global and global.get/global.set instruction. This fixes the checking routine for stack_pointer writes
[WebAssembly] Fix stack pointer store check in RegStackify
Summary: We now use __stack_pointer global and global.get/global.set instruction. This fixes the checking routine for stack_pointer writes accordingly.
This also fixes the existing __stack_pointer test in reg-stackify.ll: That test used to pass not because of __stack_pointer clashes but because the function `stackpointer_callee` was not marked as `readnone`, so it was assumed to possibly write to memory arbitraily, and `global.set` instruction was marked as `mayStore` in the .td definition, so they were identified as intervening writes. After we added `readnone` to its attribute, this test fails without this patch.
Reviewers: dschuff, sunfish
Subscribers: jgravelle-google, sbc100, llvm-commits
Differential Revision: https://reviews.llvm.org/D56094
llvm-svn: 350906
show more ...
|
#
6a87ddac |
| 08-Jan-2019 |
Thomas Lively <tlively@google.com> |
[WebAssembly] Massive instruction renaming
Summary: An automated renaming of all the instructions listed at https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329 as well as some simi
[WebAssembly] Massive instruction renaming
Summary: An automated renaming of all the instructions listed at https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329 as well as some similarly-named identifiers.
Reviewers: aheejin, dschuff, aardappel
Subscribers: sbc100, jgravelle-google, eraman, sunfish, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D56338
llvm-svn: 350609
show more ...
|
#
ce1d50f9 |
| 26-Dec-2018 |
Heejin Ahn <aheejin@gmail.com> |
[WebAssembly] Delete an unnecessary line in RegStackify
`OneUseInst` is set outside of the loop before and `OneUse` does not change throughout the loop, so this line is not necessary.
llvm-svn: 350
[WebAssembly] Delete an unnecessary line in RegStackify
`OneUseInst` is set outside of the loop before and `OneUse` does not change throughout the loop, so this line is not necessary.
llvm-svn: 350076
show more ...
|
#
99d39463 |
| 26-Dec-2018 |
Heejin Ahn <aheejin@gmail.com> |
[WebAssembly] Fix typos in comments in RegStackify (NFC)
llvm-svn: 350075
|
#
feb18fe9 |
| 20-Dec-2018 |
Thomas Lively <tlively@google.com> |
[WebAssembly] Emit a splat for v128 IMPLICIT_DEF
Summary: This is a code size savings and is also important to get runnable code while engines do not support v128.const.
Reviewers: aheejin, dschuff
[WebAssembly] Emit a splat for v128 IMPLICIT_DEF
Summary: This is a code size savings and is also important to get runnable code while engines do not support v128.const.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D55910
llvm-svn: 349724
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1 |
|
#
6ff31fe3 |
| 31-Oct-2018 |
Thomas Lively <tlively@google.com> |
[WebAssembly] Handle vector IMPLICIT_DEFs.
Summary: Also reduce the test case for implicit defs and test it with all register classes.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-go
[WebAssembly] Handle vector IMPLICIT_DEFs.
Summary: Also reduce the test case for implicit defs and test it with all register classes.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D53855
llvm-svn: 345794
show more ...
|
#
b3857e4d |
| 26-Sep-2018 |
Yury Delendik <ydelendik@mozilla.com> |
[WebAssembly] Fix MRI.hasOneNonDBGUse assert in WebAssemblyRegStackify pass
Summary: The OneUseDominatesOtherUses in the WebAssemblyRegStackify not properly validates register use using hasOneUse.
[WebAssembly] Fix MRI.hasOneNonDBGUse assert in WebAssemblyRegStackify pass
Summary: The OneUseDominatesOtherUses in the WebAssemblyRegStackify not properly validates register use using hasOneUse. Since we added/modified DBG_VALUE the assert started catching valid cases.
See also https://reviews.llvm.org/D49034#1247200
Fix verified by running the wasm waterfall.
Reviewed By: dschuff
Tags: #debug-info
Differential Revision: https://reviews.llvm.org/D49034
llvm-svn: 343154
show more ...
|
#
7c18d608 |
| 25-Sep-2018 |
Yury Delendik <ydelendik@mozilla.com> |
[WebAssembly] Move/clone DBG_VALUE during WebAssemblyRegStackify pass
Summary: The MoveForSingleUse or MoveAndTeeForMultiUse functions move wasm instructions, however DBG_VALUE stay unchanged -- mov
[WebAssembly] Move/clone DBG_VALUE during WebAssemblyRegStackify pass
Summary: The MoveForSingleUse or MoveAndTeeForMultiUse functions move wasm instructions, however DBG_VALUE stay unchanged -- moving or cloning these.
Reviewers: dschuff
Reviewed By: dschuff
Subscribers: mattd, MatzeB, dschuff, sbc100, jgravelle-google, aheejin, sunfish, llvm-commits, aardappel
Tags: #debug-info
Differential Revision: https://reviews.llvm.org/D49034
llvm-svn: 343007
show more ...
|
Revision tags: llvmorg-7.0.0, llvmorg-7.0.0-rc3 |
|
#
f208f631 |
| 05-Sep-2018 |
Heejin Ahn <aheejin@gmail.com> |
[WebAssembly] clang-format (NFC)
Summary: This patch runs clang-format on all wasm-only files.
Reviewers: aardappel, dschuff, sunfish, tlively
Subscribers: MatzeB, sbc100, jgravelle-google, llvm-c
[WebAssembly] clang-format (NFC)
Summary: This patch runs clang-format on all wasm-only files.
Reviewers: aardappel, dschuff, sunfish, tlively
Subscribers: MatzeB, sbc100, jgravelle-google, llvm-commits
Differential Revision: https://reviews.llvm.org/D51447
llvm-svn: 341439
show more ...
|