Page MenuHomePhabricator

kripken (Alon Zakai)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 23 2014, 10:15 AM (456 w, 2 d)

Recent Activity

Oct 18 2022

kripken added inline comments to D125729: [WebAssembly] Update supported features in the generic CPU configuration.
Oct 18 2022, 11:39 AM · Restricted Project, Restricted Project

Jun 22 2022

kripken updated subscribers of D122539: [SelectionDAG][DAGCombiner] Reuse exist node by reassociate.

This somehow caused a regression in the wasm targets, which I bisected to here. Certain files when compiled with -O1 appear to hang for a very long time (maybe forever). This happened on the Bullet physics engine codebase in the Emscripten test suite, but affects all wasm targets (wasm32-unknown-unknown, -wasi, and -emscripten).

Jun 22 2022, 7:52 PM · Restricted Project, Restricted Project

Jun 21 2022

kripken added inline comments to D125729: [WebAssembly] Update supported features in the generic CPU configuration.
Jun 21 2022, 8:13 AM · Restricted Project, Restricted Project

May 13 2022

kripken accepted D125515: [WebAssembly] Fix register use-def in FixIrreducibleControlFlow.
May 13 2022, 4:38 PM · Restricted Project, Restricted Project
kripken added inline comments to D125515: [WebAssembly] Fix register use-def in FixIrreducibleControlFlow.
May 13 2022, 1:01 PM · Restricted Project, Restricted Project

Jan 26 2022

kripken accepted D118286: [WebAssembly] Error out for setjmp within catch clause for Wasm SjLj.

Seems reasonable to me, this restriction doesn't worry me, and great to have a clear error.

Jan 26 2022, 2:51 PM · Restricted Project

Jul 11 2021

kripken added a comment to D105510: [ScalarEvolution] Strictly enforce pointer/int type rules..

Crash should be fixed by rG6144085c29b3

Jul 11 2021, 6:04 PM · Restricted Project
kripken added a comment to D105510: [ScalarEvolution] Strictly enforce pointer/int type rules..

This caused assertions to be hit on some tests as well as real-world code that we run.

Do all the failures you're seeing involve WidenIV::getWideRecurrence()?

Jul 11 2021, 3:16 PM · Restricted Project
kripken added a comment to D105510: [ScalarEvolution] Strictly enforce pointer/int type rules..

This caused assertions to be hit on some tests as well as real-world code that we run. Here is a testcase:

Jul 11 2021, 11:36 AM · Restricted Project

Jul 9 2021

kripken accepted D105749: WebAssembly: Update datalayout to match fp128 ABI change.
Jul 9 2021, 4:45 PM · Restricted Project, Restricted Project
kripken added inline comments to D105749: WebAssembly: Update datalayout to match fp128 ABI change.
Jul 9 2021, 4:01 PM · Restricted Project, Restricted Project

Jul 2 2021

kripken accepted D104808: [clang][emscripten] Reduce alignof long double from 16 to 8 bytes.

I believe we have all agreed that this is the right path forward, and so this can land?

Jul 2 2021, 10:46 AM · Restricted Project

Jun 23 2021

kripken added a comment to D104808: [clang][emscripten] Reduce alignof long double from 16 to 8 bytes.

Do we still intend to unify Emscripten's ABI with wasm32-unknown-unknown or wasm32-wasi eventually? This is talking a step away from that.

Jun 23 2021, 1:17 PM · Restricted Project

May 20 2021

kripken accepted D102791: [WebAssembly] Warn on exception spec for Emscripten EH.

I'm not very familiar with this code, but it looks right, and sgtm to add a warning here.

May 20 2021, 7:11 AM · Restricted Project

May 19 2021

kripken accepted D102795: [WebAssembly] Ignore filters in Emscripten EH landingpads.

Nice find!

May 19 2021, 12:40 PM · Restricted Project

Mar 23 2021

kripken added inline comments to D99171: [WebAssembly] Fold xor by inverting branch target.
Mar 23 2021, 7:57 PM · Restricted Project

Feb 22 2021

kripken added a comment to D90948: [WebAssembly] call_indirect issues table number relocs.

I think this broke the LLVM roll on Emscripten CI. I don't have time to bisect atm, but this is the only wasm-related commit in the range, and the compiler crash is on a file and function modified in this patch:

Feb 22 2021, 7:26 AM · Restricted Project

Feb 5 2021

kripken accepted D96171: [clang][emscripten] Add builtin define for __EMSCRIPTEN_PTHREADS__.
Feb 5 2021, 1:30 PM · Restricted Project

Jan 26 2021

kripken added a comment to D95125: [WebAssembly] Enable loop unrolling.

As mentioned earlier VMs are working on this, and the benefit of them doing it is that code size matters quite a bit on wasm, and doing it there would be better.

Like I said, I am not from this field, but I don't see according to which criteria this is better:

  • In terms of implementation, I guess letting the LLVM based producer do the loop-unrolling is better as loop-unrolling is a non-trivial optimisation (to do this properly) to (re)implement, this is leveraging the existing LLVM infrastructure, and enabling this is a few lines of code which much beat reimplementing loop-unrolling in a consumer.
Jan 26 2021, 8:55 AM · Restricted Project
kripken added a comment to D95125: [WebAssembly] Enable loop unrolling.

Webassembly and runtimes is not my field, just saying so you can take my remarks with a bit (or a lot) of salt, but I do have a few opinions on loop-unrolling. :-)
I look at this problem slightly differently:

What concerns me is that some existing users will definitely be harmed by this, if the default for -O2 changes.

I.e., the way I look at this is that we deliver on of its promises:

WebAssembly aims to execute at native speed by taking advantage of common hardware capabilities available on a wide range of platforms.

If this is the goal, if we want parity with native execution, that means we would have to apply the same tricks as ahead of time compiled code, otherwise we would never achieve this. Loop-unrolling is known to greatly improve performance, and also to be an enabler for other optimisations. Thus, without loop-unrolling I don't think near native execution speeds will be feasible.

Jan 26 2021, 6:34 AM · Restricted Project

Jan 25 2021

kripken added a comment to D95125: [WebAssembly] Enable loop unrolling.

The unrolling would be disabled at -Os and -Oz, see

AFAIK, loop unrolling is disabled at -O1 for all targets. I don't think there's currently a backend mechanism to make a decision on the opt level, but the loop unroller uses them to adjust thresholds to be more aggressive in some situations.

Jan 25 2021, 8:18 AM · Restricted Project

Jan 22 2021

kripken added a comment to D95125: [WebAssembly] Enable loop unrolling.

I'm inclined to merge this and leave it to users for whom the code size increase is unacceptable to use -Os/-Oz/-fno-unroll-loops to disable it.

Jan 22 2021, 2:20 PM · Restricted Project

Jan 21 2021

kripken added a comment to D95125: [WebAssembly] Enable loop unrolling.

Very interesting perf data!

Jan 21 2021, 2:19 PM · Restricted Project

Nov 25 2020

kripken accepted D92038: [lld][WebAssembly] Ensure stub symbols always get address 0.

I don't know enough to tell if these changes are sufficient, but they make sense to me.

Nov 25 2020, 8:46 AM · Restricted Project

Oct 27 2020

kripken accepted D90261: [lld][WebAssembly] Fix memory size in dylink section for -pie exectuables.
Oct 27 2020, 3:26 PM · Restricted Project

Oct 12 2020

kripken accepted D89152: [lld][WebAssembly] Add support for -Bsymbolic.

I'm not an expert on the LLVM details here, but, the logic looks correct and that it properly corresponds to the original idea of this optimization (that this will replace).

Oct 12 2020, 5:08 PM · Restricted Project

Sep 25 2020

kripken added a comment to D88323: [WebAssembly] Check features before making SjLj vars thread-local.

I don't understand the LLVM side enough to review, but running this locally it fixes all the issues we had earlier!

Sep 25 2020, 11:23 AM · Restricted Project

Sep 24 2020

kripken added a comment to D88262: [WebAssembly] Make SjLj lowering globals thread-local.

I can do a roll if needed, sure. (Is one needed? Let's see on the bots I guess...)

Sep 24 2020, 3:11 PM · Restricted Project
kripken added a comment to D88262: [WebAssembly] Make SjLj lowering globals thread-local.

Just to be sure, is it ok to do this even when atomics are not enabled?

Sep 24 2020, 2:44 PM · Restricted Project

Jul 3 2020

kripken accepted D83017: [WebAssembly] Do not omit range checks for i64 switches.

Thanks!

Jul 3 2020, 4:42 PM · Restricted Project

Jul 1 2020

kripken added a comment to D83017: [WebAssembly] Do not omit range checks for i64 switches.

It looks like this pattern-matches on the switch's input. Does that mean that if we see a valid wrap there, we would also optimize this less?

Jul 1 2020, 6:54 PM · Restricted Project

Apr 13 2020

kripken added a comment to D77908: [WebAssembly] Enable nontrapping-fptoint for `default` cpu.

As a less controversial version of this change I could instead create a new CPU called current and leave generic as is (basically leave it at mvp) until we can agree that a features is widespread enough to warrant being part of generic?

Apr 13 2020, 10:12 AM · Restricted Project

Apr 12 2020

kripken added a comment to D77908: [WebAssembly] Enable nontrapping-fptoint for `default` cpu.

Is the general plan for LLVM documented somewhere?

Apr 12 2020, 10:09 AM · Restricted Project

Mar 23 2020

kripken accepted D76547: [WebAssembly] Add wasm-exported function attribute.
Mar 23 2020, 4:21 PM · Restricted Project

Mar 6 2020

kripken accepted D75770: [WebAssembly] Add SIMD integer min/max builtins.
Mar 6 2020, 1:48 PM · Restricted Project

Feb 21 2020

kripken updated the diff for D74999: [WebAssembly] Fix a non-determinism problem in FixIrreducibleControlFlow.

Remove unneeded & in lambda capture.

Feb 21 2020, 4:30 PM · Restricted Project
kripken added a comment to D74999: [WebAssembly] Fix a non-determinism problem in FixIrreducibleControlFlow.

There seem to be multiple places that call Graph.getLoopEntries(). I guess we should sort all of them..? How about sort LoopEntries at the end of calculate() once and for all?

Feb 21 2020, 4:20 PM · Restricted Project
kripken updated the summary of D74999: [WebAssembly] Fix a non-determinism problem in FixIrreducibleControlFlow.
Feb 21 2020, 4:02 PM · Restricted Project
kripken created D74999: [WebAssembly] Fix a non-determinism problem in FixIrreducibleControlFlow.
Feb 21 2020, 4:02 PM · Restricted Project

Feb 7 2020

kripken accepted D74269: [WebAssembly] Add debug info to insts in Emscripten SjLj.

Nice, thanks! Will help with debug info coverage too.

Feb 7 2020, 5:35 PM · Restricted Project

Jan 28 2020

kripken accepted D73581: [WebAssembly] Preserve debug frame base information through register coloring.

Makes sense to me, nice. Also verified no crashes on wasm0 and wasm3 on the emscripten test suite.

Jan 28 2020, 4:43 PM · Restricted Project

Aug 16 2019

kripken accepted D66356: [WebAssembly] Forbid use of EM_ASM with setjmp/longjmp.

lgtm module the error message, let's find the best phrasing there.

Aug 16 2019, 11:00 AM · Restricted Project

Aug 8 2019

kripken resigned from D65922: [lld][WebAssembly] Allow linking of PIC code into static binaries.

Nothing looks wrong to me here, but I don't know enough to fully understand it, sorry - like what the various indexes are, what a virtual address means here, etc.

Aug 8 2019, 11:02 AM · Restricted Project

Jul 26 2019

kripken added a comment to D65358: [WebAssembly] allow EM_ASM to be used with setjmp.

To make sure I understand, is the issue that in the presence of a setjmp we turn those calls into invokes, which means in wasm we end up with an indirect call - and then in binaryen we don't see the emscripten_asm_const_int etc., and instead just the indirect call? (Or does the backend do more processing here?)

Jul 26 2019, 5:11 PM · Restricted Project

Jul 17 2019

kripken accepted D64872: [WebAssembly] Fix bug handling hidden comdat symbols.

I'm not an expert on this but it looks right to me.

Jul 17 2019, 11:24 AM · Restricted Project

Jul 7 2019

kripken accepted D64280: [lld][WebAssembly] Report undefined symbols during scanRelocations.

This looks right to me, but I'm not an expert on this stuff.

Jul 7 2019, 5:17 PM · Restricted Project

Jun 22 2019

kripken accepted D63688: [Support] Fix build under Emscripten.
Jun 22 2019, 4:55 PM · Restricted Project

May 10 2019

kripken added a comment to D61772: [WebAssembly] Don't assume that strongly defined symbol are DSO-local.

This may have broken CI, as it shows as one of the commits in the first broken roll here:

May 10 2019, 9:40 AM · Restricted Project

May 9 2019

kripken added a comment to D61539: [WebAssembly] Don't generate unused table entries..

I bisected the failure on emscripten's wasm0.test_dylink_rtti (and two others, also failing on the waterfall) which hits

May 9 2019, 10:23 AM · Restricted Project

Apr 22 2019

kripken accepted D60966: [WebAssembly] Emit br_table for most switch instructions.

I'm in favor of this. There are a bunch of tradeoffs that VMs can make, and this lets them make their own choices, by emitting the higher-level construct, which is also smaller in size in the wasm.

Apr 22 2019, 11:57 AM · Restricted Project

Apr 19 2019

kripken accepted D60928: [WebAssembly] Fix R_WASM_FUNCTION_OFFSET_I32 relocation warnings.

Not an expert on this code but it looks right to me.

Apr 19 2019, 5:26 PM · Restricted Project

Apr 18 2019

kripken added a comment to D60882: [WebAssembly] Error on relocations against undefined data symbols..

As mentioned on the issue, I'd prefer if we got imports for such globals, but if that's not possible then definitely an error instead of just silently emitting a 0 is better, lgtm.

Apr 18 2019, 2:05 PM · Restricted Project

Apr 3 2019

kripken accepted D60232: [WebAssembly] EmscriptenEHSjLj: Don't abort if __THREW__ is defined.

Fair enough. Slightly worries me since it's not obvious from the name or the docs, and so perhaps it might change one day, but that's overly paranoid perhaps.

Apr 3 2019, 5:14 PM · Restricted Project
kripken added inline comments to D60232: [WebAssembly] EmscriptenEHSjLj: Don't abort if __THREW__ is defined.
Apr 3 2019, 4:31 PM · Restricted Project

Apr 2 2019

kripken added reviewers for D60167: [WebAssembly] Add Emscripten OS definition + small_printf: dschuff, sbc100.
Apr 2 2019, 5:34 PM · Restricted Project
kripken created D60167: [WebAssembly] Add Emscripten OS definition + small_printf.
Apr 2 2019, 5:27 PM · Restricted Project

Mar 27 2019

kripken added a comment to D54647: [WebAssembly] Initial implementation of PIC code generation.

This broke wasm2.test_openjpeg on CI, reproducible locally. Errors on error: undefined symbol: __memory_base

Mar 27 2019, 5:51 PM · Restricted Project

Mar 26 2019

kripken added a reviewer for D59855: [WebAssembly] Add some whitespace for clarity: tlively.
Mar 26 2019, 5:24 PM · Restricted Project
kripken created D59855: [WebAssembly] Add some whitespace for clarity.
Mar 26 2019, 5:24 PM · Restricted Project

Mar 25 2019

kripken accepted D59462: [WebAssembly] Optimize the number of routing blocks in FixIrreducibleCFG.

Nice!

Mar 25 2019, 2:48 PM · Restricted Project

Mar 19 2019

kripken added a comment to D59462: [WebAssembly] Optimize the number of routing blocks in FixIrreducibleCFG.

Thanks for the explanation! I think I understand.

Mar 19 2019, 2:58 PM · Restricted Project

Mar 18 2019

kripken added a comment to D59462: [WebAssembly] Optimize the number of routing blocks in FixIrreducibleCFG.

Nice idea, and overall looks good to me. I didn't quite understand the TII part though.

Mar 18 2019, 1:44 PM · Restricted Project
kripken accepted D59456: [WebAssembly] Improve readability of irreducibility tests.
Mar 18 2019, 1:14 PM · Restricted Project
kripken accepted D59454: [WebAssembly] Small improvements in FixIrreducibleControlFlow (NFC).

I'm not that familiar with the BuildMI parts though.

Mar 18 2019, 1:03 PM · Restricted Project

Mar 15 2019

kripken added a comment to D58919: [WebAssembly] Irreducible control flow rewrite.

Great, and thanks for the comments!

Mar 15 2019, 6:14 PM · Restricted Project

Mar 14 2019

kripken updated the diff for D58919: [WebAssembly] Irreducible control flow rewrite.
  • Thanks, indeed one of the tests removed before (func_2) was still irreducible at -O0, restored it into the main irreducible file test, which is now at -O0. The other (tre_parse) was actually not irreducible, so we mis-identified it, and I left it out.
    • Fixed extra newline at the end of a test.
    • Renamed the title to have [WebAssembly]
Mar 14 2019, 2:14 PM · Restricted Project
kripken retitled D58919: [WebAssembly] Irreducible control flow rewrite from WebAssembly: Irreducible control flow rewrite to [WebAssembly] Irreducible control flow rewrite.
Mar 14 2019, 2:06 PM · Restricted Project

Mar 13 2019

kripken updated the diff for D58919: [WebAssembly] Irreducible control flow rewrite.

Various changes from the feedback:

Mar 13 2019, 1:43 PM · Restricted Project
kripken added inline comments to D58919: [WebAssembly] Irreducible control flow rewrite.
Mar 13 2019, 1:40 PM · Restricted Project

Mar 12 2019

kripken updated the diff for D58919: [WebAssembly] Irreducible control flow rewrite.

Review feedback changes, in particular:

Mar 12 2019, 1:57 PM · Restricted Project
kripken added a comment to D58919: [WebAssembly] Irreducible control flow rewrite.

What changes fixed the previous bug?

Mar 12 2019, 1:52 PM · Restricted Project

Mar 5 2019

kripken added a comment to D58953: [WebAssembly] Disable MachineBlockPlacement pass.

Code change lgtm, thanks!

Mar 5 2019, 6:53 AM · Restricted Project

Mar 4 2019

kripken created D58919: [WebAssembly] Irreducible control flow rewrite.
Mar 4 2019, 12:31 PM · Restricted Project

Jan 29 2019

kripken added a comment to D57323: [WebAssembly] Enable main-function signature rewriting for WASI.

This broke binaryen2.test_exceptions_white_list_2

Jan 29 2019, 10:23 AM

Jan 6 2019

kripken accepted D56356: [WebAssembly] Move CFG-changing passes before RegStackify.

From the point of view of FixIrreducibleControlFlow this sounds good.

Jan 6 2019, 3:34 PM

Dec 18 2018

kripken updated the diff for D55467: [WebAssembly] Optimize Irreducible Control Flow.

Use SmallPtrSet for our sets, and return to using a vector for SortedEntries which we sort, avoiding SetVector.

Dec 18 2018, 1:00 PM
kripken added inline comments to D55467: [WebAssembly] Optimize Irreducible Control Flow.
Dec 18 2018, 12:59 PM

Dec 17 2018

kripken updated the diff for D55467: [WebAssembly] Optimize Irreducible Control Flow.
  • Use SetVector for determinism
  • Simplify names in exceptions testcase
  • Improve comments about canonicalization
Dec 17 2018, 3:43 PM
kripken added a comment to D55467: [WebAssembly] Optimize Irreducible Control Flow.

Thanks for the comments, uploading an updated patch now.

Dec 17 2018, 3:41 PM

Dec 14 2018

kripken updated the diff for D55467: [WebAssembly] Optimize Irreducible Control Flow.
Dec 14 2018, 11:12 AM
kripken added a comment to D55467: [WebAssembly] Optimize Irreducible Control Flow.

Thanks, submitting a fixed patch now.

Dec 14 2018, 11:11 AM

Dec 13 2018

kripken added a comment to D55467: [WebAssembly] Optimize Irreducible Control Flow.

Do we know what part of the optimizer or codegen is introducing the irreducible control flow in malloc?

Some other musl libc elements with irreducible control flow that show up in a hello world are actually irreducible in the source (!), I verified.

Do you by chance remember which functions this was?

Dec 13 2018, 3:24 PM
kripken added a comment to D55467: [WebAssembly] Optimize Irreducible Control Flow.

Is it possible to reduce test cases more while they exhibit the same behavior? We usually try to avoid big generated test cases to our LLVM regression tests, so..

Dec 13 2018, 3:07 PM
kripken updated the diff for D55467: [WebAssembly] Optimize Irreducible Control Flow.
Dec 13 2018, 3:01 PM
kripken added a comment to D55467: [WebAssembly] Optimize Irreducible Control Flow.

Thanks for the comments @aheejin!

Dec 13 2018, 3:01 PM

Dec 12 2018

kripken added a comment to D55467: [WebAssembly] Optimize Irreducible Control Flow.

Do we know what part of the optimizer or codegen is introducing the irreducible control flow in malloc?

Not for malloc - I think @jgravelle-google may have been looking into that though?

Dec 12 2018, 11:26 AM

Dec 10 2018

kripken updated the diff for D55467: [WebAssembly] Optimize Irreducible Control Flow.

Use llvm::sort following @mgrang's feedback. Thanks!

Dec 10 2018, 3:13 PM
kripken added a comment to D55467: [WebAssembly] Optimize Irreducible Control Flow.

Do we know what part of the optimizer or codegen is introducing the irreducible control flow in malloc?

Dec 10 2018, 3:09 PM

Dec 7 2018

kripken created D55467: [WebAssembly] Optimize Irreducible Control Flow.
Dec 7 2018, 5:39 PM

Oct 22 2018

kripken accepted D53240: [WebAssembly] WebAssemblyLowerEmscriptenEHSjLj: use getter/setter for accessing tempRet0.
Oct 22 2018, 11:54 AM

Aug 9 2018

kripken added a comment to D50472: Fix wasm backend compilation on gcc 5.4: variable name cannot match class.

No, I think I don't. I think someone else landed the few patches I had a few years ago.

Aug 9 2018, 3:16 PM
kripken added a comment to D50472: Fix wasm backend compilation on gcc 5.4: variable name cannot match class.

Thanks aheejin!

Aug 9 2018, 3:13 PM

Aug 8 2018

kripken created D50472: Fix wasm backend compilation on gcc 5.4: variable name cannot match class.
Aug 8 2018, 1:44 PM

Nov 6 2016

kripken added a comment to D11691: [WebAssembly] Add Relooper.

Hi, I have a project to rewrite llvm code as OpenCL https://github.com/hughperkins/cuda-on-cl It currently outputs lots of conditional branches, is labels and gotos, in the output .I want to 'reloop' this into fors/whiles/ etc. To what extent can I use the code in this PR to achieve this? What are the preferred option(s) for me to use this code from my own code? (eg drop the sourcecod into my repo? build as a shared object somehow? some other approach?)

Nov 6 2016, 9:29 AM