History log of /llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp (Results 76 – 100 of 111)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 39bf39f3 02-Aug-2016 Derek Schuff <dschuff@google.com>

[WebAssembly] Initial SIMD128 support.

Kicks off the implementation of wasm SIMD128 support (spec:
https://github.com/stoklund/portable-simd/blob/master/portable-simd.md),
adding support for add, su

[WebAssembly] Initial SIMD128 support.

Kicks off the implementation of wasm SIMD128 support (spec:
https://github.com/stoklund/portable-simd/blob/master/portable-simd.md),
adding support for add, sub, mul for i8x16, i16x8, i32x4, and f32x4.

The spec is WIP, and might change in the near future.

Patch by João Porto

Differential Revision: https://reviews.llvm.org/D22686

llvm-svn: 277543

show more ...


Revision tags: llvmorg-3.9.0-rc1
# 500d0469 08-Jul-2016 Duncan P. N. Exon Smith <dexonsmith@apple.com>

WebAssembly: Avoid implicit iterator conversions, NFC

Avoid implicit conversions from MachineInstrBundleIterator to
MachineInstr* in the WebAssembly backend by preferring MachineInstr&
over MachineI

WebAssembly: Avoid implicit iterator conversions, NFC

Avoid implicit conversions from MachineInstrBundleIterator to
MachineInstr* in the WebAssembly backend by preferring MachineInstr&
over MachineInstr*.

llvm-svn: 274912

show more ...


# 9cfc75c2 30-Jun-2016 Duncan P. N. Exon Smith <dexonsmith@apple.com>

CodeGen: Use MachineInstr& in TargetInstrInfo, NFC

This is mostly a mechanical change to make TargetInstrInfo API take
MachineInstr& (instead of MachineInstr* or MachineBasicBlock::iterator)
when th

CodeGen: Use MachineInstr& in TargetInstrInfo, NFC

This is mostly a mechanical change to make TargetInstrInfo API take
MachineInstr& (instead of MachineInstr* or MachineBasicBlock::iterator)
when the argument is expected to be a valid MachineInstr. This is a
general API improvement.

Although it would be possible to do this one function at a time, that
would demand a quadratic amount of churn since many of these functions
call each other. Instead I've done everything as a block and just
updated what was necessary.

This is mostly mechanical fixes: adding and removing `*` and `&`
operators. The only non-mechanical change is to split
ARMBaseInstrInfo::getOperandLatencyImpl out from
ARMBaseInstrInfo::getOperandLatency. Previously, the latter took a
`MachineInstr*` which it updated to the instruction bundle leader; now,
the latter calls the former either with the same `MachineInstr&` or the
bundle leader.

As a side effect, this removes a bunch of MachineInstr* to
MachineBasicBlock::iterator implicit conversions, a necessary step
toward fixing PR26753.

Note: I updated WebAssembly, Lanai, and AVR (despite being
off-by-default) since it turned out to be easy. I couldn't run tests
for AVR since llc doesn't link with it turned on.

llvm-svn: 274189

show more ...


Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1
# 6c8f20d7 23-May-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Speed up LiveIntervals updating.

Use the more specific LiveInterval::removeSegment instead of
LiveInterval::shrinkToUses when we know the specific range that's
being removed.

llvm-svn

[WebAssembly] Speed up LiveIntervals updating.

Use the more specific LiveInterval::removeSegment instead of
LiveInterval::shrinkToUses when we know the specific range that's
being removed.

llvm-svn: 270463

show more ...


# 1054570a 17-May-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Model the stack evaluation order more precisely.

We currently don't represent get_local and set_local explicitly; they
are just implied by virtual register use and def. This avoids a l

[WebAssembly] Model the stack evaluation order more precisely.

We currently don't represent get_local and set_local explicitly; they
are just implied by virtual register use and def. This avoids a lot of
clutter, but it does complicate stackifying: get_locals read their
operands at their position in the stack evaluation order, rather than
at their parent instruction. This patch adds code to walk the stack to
determine the precise ordering, when needed.

llvm-svn: 269854

show more ...


# d08cd15f 17-May-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Don't stackify calls past stack pointer modifications.

llvm-svn: 269843


# 12de0b91 17-May-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Stackify induction variable increment instructions.

This handles instructions where the defined register is also used, as in
"x = x + 1".

llvm-svn: 269830


# 2644d74b 17-May-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Improve the precision of memory and side effect dependence tracking.

MachineInstr::isSafeToMove is more conservative than is needed here;
use a more explicit check, and incorporate kno

[WebAssembly] Improve the precision of memory and side effect dependence tracking.

MachineInstr::isSafeToMove is more conservative than is needed here;
use a more explicit check, and incorporate knowledge of some
WebAssembly-specific opcodes.

llvm-svn: 269736

show more ...


# 33e694a8 12-May-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Fast-isel support for calls, arguments, and selects.

llvm-svn: 269273


# 0cfb5f85 10-May-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Move register stackification and coloring to a late phase.

Move the register stackification and coloring passes to run very late, after
PEI, tail duplication, and most other passes. Th

[WebAssembly] Move register stackification and coloring to a late phase.

Move the register stackification and coloring passes to run very late, after
PEI, tail duplication, and most other passes. This means that all code emitted
and expanded by those passes is now exposed to these passes. This also
eliminates the need for prologue/epilogue code to be manually stackified,
which significantly simplifies the code.

This does require running LiveIntervals a second time. It's useful to think
of these late passes not as late optimization passes, but as a domain-specific
compression algorithm based on knowledge of liveness information. It's used to
compress the code after all conventional optimizations are complete, which is
why it uses LiveIntervals at a phase when actual optimization passes don't
typically need it.

Differential Revision: http://reviews.llvm.org/D20075

llvm-svn: 269012

show more ...


# 369ebfe4 14-Mar-2016 Hans Wennborg <hans@hanshq.net>

Try to fix build of WebAssemblyRegStackify.cpp on Windows

It's failing to build on VS2015 with:

C:\b\build\slave\ClangToTWin\build\src\third_party\llvm\lib\Target\WebAssembly\WebAssemblyRegStackify

Try to fix build of WebAssemblyRegStackify.cpp on Windows

It's failing to build on VS2015 with:

C:\b\build\slave\ClangToTWin\build\src\third_party\llvm\lib\Target\WebAssembly\WebAssemblyRegStackify.cpp(520):
error C2668: 'llvm::make_reverse_iterator': ambiguous call to overloaded function
C:\b\build\slave\ClangToTWin\build\src\third_party\llvm\include\llvm/ADT/STLExtras.h(217):
note: could be 'std::reverse_iterator<llvm::MachineBasicBlock::iterator>
llvm::make_reverse_iterator<llvm::MachineInstrBundleIterator<llvm::MachineInstr>>(IteratorTy)'
with
[
IteratorTy=llvm::MachineInstrBundleIterator<llvm::MachineInstr>
]
C:\b\depot_tools\win_toolchain\vs_files\391bbf1220d3edcd3cc3fccdb56224181e3b13a7\win_sdk\bin\..\..\VC\include\xutility(1217):
note: or 'std::reverse_iterator<llvm::MachineBasicBlock::iterator>
std::make_reverse_iterator<llvm::MachineInstrBundleIterator<llvm::MachineInstr>>(_RanIt)' [found using argument-dependent lookup]
with
[
_RanIt=llvm::MachineInstrBundleIterator<llvm::MachineInstr>
]

I don't have VS2015 locally at the moment, but hopefully this will help.

llvm-svn: 263418

show more ...


Revision tags: llvmorg-3.8.0
# 1afd1e2b 28-Feb-2016 JF Bastien <jfb@google.com>

WebAssembly: fix build

More API churn, experimental target got sad.

llvm-svn: 262179


# 13d3b9b7 27-Feb-2016 JF Bastien <jfb@google.com>

WebAssembly: fix build

It was broken by the work for PR26753.

llvm-svn: 262140


Revision tags: llvmorg-3.8.0-rc3
# 595e8ab2 22-Feb-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Properly ignore llvm.dbg.value instructions.

llvm-svn: 261538


# f8f8f093 16-Feb-2016 Derek Schuff <dschuff@google.com>

[WebAssemly] Don't move calls or stores past intervening loads

The register stackifier currently checks for intervening stores (and
loads that may alias them) but doesn't account for the fact that t

[WebAssemly] Don't move calls or stores past intervening loads

The register stackifier currently checks for intervening stores (and
loads that may alias them) but doesn't account for the fact that the
instruction being moved may affect intervening loads.

Differential Revision: http://reviews.llvm.org/D17298

llvm-svn: 261014

show more ...


# 8aa237c3 16-Feb-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Create new registers instead of reusing old ones in RegStackify.

This avoids some complications updating LiveIntervals to be aware of the new
register lifetimes, because we can just co

[WebAssembly] Create new registers instead of reusing old ones in RegStackify.

This avoids some complications updating LiveIntervals to be aware of the new
register lifetimes, because we can just compute new intervals from scratch
rather than describe how the old ones have been changed.

llvm-svn: 260971

show more ...


Revision tags: llvmorg-3.8.0-rc2
# fbfe5ec4 28-Jan-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Don't stackify a register def past a get_local use in the same tree.

llvm-svn: 259013


# adf28177 28-Jan-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Enhanced register stackification

This patch revamps the RegStackifier pass with a new tree traversal mechanism,
enabling three major new features:

- Stackification of values with mul

[WebAssembly] Enhanced register stackification

This patch revamps the RegStackifier pass with a new tree traversal mechanism,
enabling three major new features:

- Stackification of values with multiple uses, using the result value of set_local
- More aggressive stackification of instructions with side effects
- Reordering operands in commutative instructions to enable more stackification.

llvm-svn: 259009

show more ...


# 7e64917f 20-Jan-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Don't stackify stores across instructions with side effects.

llvm-svn: 258285


Revision tags: llvmorg-3.8.0-rc1
# b6fd39a3 19-Jan-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Rematerialize constants rather than hold them live in registers.

Teach the register stackifier to rematerialize constants that have multiple
uses instead of leaving them in registers.

[WebAssembly] Rematerialize constants rather than hold them live in registers.

Teach the register stackifier to rematerialize constants that have multiple
uses instead of leaving them in registers. In the WebAssembly encoding, it's
the same code size to materialize most constants as it is to read a value
from a register.

llvm-svn: 258142

show more ...


# 8f59cf75 06-Jan-2016 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Don't use range-based loop for a list that's being modified

The first instruction in a block is what the rend() iterator points to, so
if it moves, we need to re-evaluate rend() so tha

[WebAssembly] Don't use range-based loop for a list that's being modified

The first instruction in a block is what the rend() iterator points to, so
if it moves, we need to re-evaluate rend() so that we continue to iterate
through the rest of the instructions.

llvm-svn: 256953

show more ...


# 8887d1fa 25-Dec-2015 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Fix handling of COPY instructions in WebAssemblyRegStackify.

Move RegStackify after coalescing and teach it to use LiveIntervals instead
of depending on SSA form. This avoids a problem

[WebAssembly] Fix handling of COPY instructions in WebAssemblyRegStackify.

Move RegStackify after coalescing and teach it to use LiveIntervals instead
of depending on SSA form. This avoids a problem where a register in a COPY
instruction is stackified and then subsequently coalesced with a register
that is not stackified.

This also puts it after the scheduler, which allows us to simplify the
EXPR_STACK constraint, as we no longer have instructions being reordered
after stackification and before coloring.

llvm-svn: 256402

show more ...


# 8bb5f292 16-Dec-2015 Derek Schuff <dschuff@google.com>

[WebAssembly] Implement eliminateCallFramePseudo

Summary:
Implement eliminateCallFramePsuedo to handle ADJCALLSTACKUP/DOWN
pseudo-instructions. Add a test calling a vararg function which causes non-

[WebAssembly] Implement eliminateCallFramePseudo

Summary:
Implement eliminateCallFramePsuedo to handle ADJCALLSTACKUP/DOWN
pseudo-instructions. Add a test calling a vararg function which causes non-0
adjustments. This revealed an issue with RegisterCoalescer wherein it
eliminates a COPY from SP32 to a vreg but failes to update the live ranges
of EXPR_STACK, causing a machineinstr verifier failure (so this test
is commented out).

Also add a dynamic alloca test, which causes a callseq_end dag node with
a 0 (instead of undef) second argument to be generated. We currently fail to
select that, so adjust the ADJCALLSTACKUP tablegen code to handle it.

Differential Revision: http://reviews.llvm.org/D15587

llvm-svn: 255844

show more ...


# a712a6c4 14-Dec-2015 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Avoid adding redundant EXPR_STACK uses.

llvm-svn: 255563


# 31448f16 08-Dec-2015 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Fix a typo in a comment.

llvm-svn: 254999


12345