[all-commits] [llvm/llvm-project] c5d012: [WebAssembly] Make BR_TABLE non-duplicable
Thomas Lively via All-commits
all-commits at lists.llvm.org
Thu Jun 11 15:12:03 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c5d012341e58bf5e4300024a7e4f4e509c08463f
https://github.com/llvm/llvm-project/commit/c5d012341e58bf5e4300024a7e4f4e509c08463f
Author: Thomas Lively <tlively at google.com>
Date: 2020-06-11 (Thu, 11 Jun 2020)
Changed paths:
M llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
M llvm/test/CodeGen/WebAssembly/indirectbr.ll
A llvm/test/CodeGen/WebAssembly/switch-in-loop.ll
Log Message:
-----------
[WebAssembly] Make BR_TABLE non-duplicable
Summary:
After their range checks were removed in 7f50c15be5c0, br_tables
started being duplicated into their predecessors by tail
folding. Unfortunately, when the br_tables were in loops this
transformation introduced bad irreducible control flow which was later
expanded into even more br_tables. This commit abuses the
`isNotDuplicable` property to prevent this irreducible control flow
from being introduced. This change saves a few dozen bytes of code
size and has a negligible affect on performance for most of the large
Emscripten benchmarks, but can improve performance significantly on
microbenchmarks of switches in loops.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81628
More information about the All-commits
mailing list