Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove IgnoreImplicitTraps [DO NOT LAND] #6647

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
58fd5d5
fix
kripken May 13, 2024
f2833c7
fix
kripken May 13, 2024
47928b4
Merge remote-tracking branch 'origin/main' into why.cse.5
kripken May 22, 2024
3c92c23
work
kripken May 22, 2024
6d202d0
remove
kripken May 22, 2024
062a3af
remove
kripken May 22, 2024
2b163d4
format
kripken May 22, 2024
a5efff4
tests. still need renames
kripken May 22, 2024
629a95d
moves
kripken May 22, 2024
5c56af1
moves
kripken May 22, 2024
f6bc4ad
test
kripken May 22, 2024
7ed93c9
Effects: Add missing mayNotReturn copy
kripken May 23, 2024
dd76ee8
fix
kripken May 23, 2024
40f84c8
Merge remote-tracking branch 'origin/main' into why.cse.5
kripken May 29, 2024
be5ad79
show problem
kripken May 29, 2024
429fbd2
fix
kripken May 29, 2024
d38961c
Merge remote-tracking branch 'origin/main' into vacuum.iloop
kripken May 29, 2024
1442250
comment
kripken May 29, 2024
dcbc2a3
Merge remote-tracking branch 'myself/vacuum.iloop' into why.cse.5
kripken May 29, 2024
20a3d9a
Merge remote-tracking branch 'origin/main' into missing
kripken May 30, 2024
b3a2831
fix
kripken May 30, 2024
844b6f2
test
kripken May 30, 2024
80f9774
Merge remote-tracking branch 'myself/missing' into why.cse.5
kripken May 30, 2024
d92e471
test.is.ok
kripken May 30, 2024
f47b156
Merge remote-tracking branch 'origin/main' into why.cse.5
kripken May 31, 2024
e7ce187
test.ok
kripken May 31, 2024
f15e9e0
test.ok
kripken May 31, 2024
910591c
script
kripken Jun 5, 2024
e4603f6
work
kripken Jun 5, 2024
d3c6f1c
work
kripken Jun 5, 2024
83bfec7
work
kripken Jun 10, 2024
c4a8983
Merge remote-tracking branch 'origin/main' into why.cse.5
kripken Jun 10, 2024
4efe806
test
kripken Jun 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ Current Trunk
- The build-time option to use legacy WasmGC opcodes is removed.
- The strings in `string.const` instructions must now be valid WTF-8.
- The `TraverseCalls` flag for `ExpressionRunner` is removed.
- Remove the "ignore implicit effects" options. That is replaced by the
now-mature "traps never happen" option which has proven far more useful.
- The C API `BinaryenSideEffectImplicitTrap` is removed.

v117
----
Expand Down
39 changes: 39 additions & 0 deletions scripts/diff_metrics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
'''
Given two files that are the output of --metrics, show a nice diff of them
'''

import os, sys

def parse(filename):
ret = {}
for line in open(filename).readlines():
if ' : ' in line:
item, count = line.split(' : ')
ret[item.strip()] = int(count)
return ret

a = parse(sys.argv[1])
b = parse(sys.argv[2])

items = set(list(a.keys()) + list(a.keys()))

longest_name = max([len(item) for item in items])

for item in sorted(list(items)):
prefix = item + (' ' * (longest_name - len(item))) + ': '

if item in a and item not in b:
value = f'-{a[item]}'
elif item not in a and item in b:
value = f'+{a[item]}'
else:
diff = b[item] - a[item]
# ensure a + or - prefix
value = str(diff)
if diff > 0:
value = '+' + value

# left-justify
value = '{:>8}'.format(value)
print(f'{prefix} {value}')

4 changes: 0 additions & 4 deletions src/binaryen-c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5940,10 +5940,6 @@ BinaryenSideEffects BinaryenSideEffectWritesTable(void) {
return static_cast<BinaryenSideEffects>(
EffectAnalyzer::SideEffects::WritesTable);
}
BinaryenSideEffects BinaryenSideEffectImplicitTrap(void) {
return static_cast<BinaryenSideEffects>(
EffectAnalyzer::SideEffects::ImplicitTrap);
}
BinaryenSideEffects BinaryenSideEffectTrapsNeverHappen(void) {
return static_cast<BinaryenSideEffects>(
EffectAnalyzer::SideEffects::TrapsNeverHappen);
Expand Down
1 change: 0 additions & 1 deletion src/binaryen-c.h
Original file line number Diff line number Diff line change
Expand Up @@ -3294,7 +3294,6 @@ BINARYEN_API BinaryenSideEffects BinaryenSideEffectReadsMemory(void);
BINARYEN_API BinaryenSideEffects BinaryenSideEffectWritesMemory(void);
BINARYEN_API BinaryenSideEffects BinaryenSideEffectReadsTable(void);
BINARYEN_API BinaryenSideEffects BinaryenSideEffectWritesTable(void);
BINARYEN_API BinaryenSideEffects BinaryenSideEffectImplicitTrap(void);
BINARYEN_API BinaryenSideEffects BinaryenSideEffectTrapsNeverHappen(void);
BINARYEN_API BinaryenSideEffects BinaryenSideEffectIsAtomic(void);
BINARYEN_API BinaryenSideEffects BinaryenSideEffectThrows(void);
Expand Down
3 changes: 0 additions & 3 deletions src/ir/effects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ std::ostream& operator<<(std::ostream& o, wasm::EffectAnalyzer& effects) {
if (effects.trap) {
o << "trap\n";
}
if (effects.implicitTrap) {
o << "implicitTrap\n";
}
if (effects.isAtomic) {
o << "isAtomic\n";
}
Expand Down
Loading
Loading