You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Implement the nop opcode. This opcode doesn't do anything, but it would be good to emit a nop in debug builds since it can affect debugging. It might be possible do this by calling the llvm.donothing intrinsic. The method to fill in is:
I'd suggest using the optimization level since skipping nops is an optimization. You probably need to propagate WebAssemblyCodeGenCompilationBuilder's _optimizationMode field to WebAssemblyCodeGenCompilation so that the ILToWebAssemblyImporter can check it.
Activity
jacano commentedon Oct 20, 2017
Just wondering how to detect whether we are in a debug build or not in order to activate this emit...
Could I use this argument to activate it?
corert/src/ILCompiler/src/Program.cs
Line 126 in d7a8b3a
Or using the optimization level?
morganbr commentedon Oct 20, 2017
I'd suggest using the optimization level since skipping nops is an optimization. You probably need to propagate WebAssemblyCodeGenCompilationBuilder's _optimizationMode field to WebAssemblyCodeGenCompilation so that the ILToWebAssemblyImporter can check it.
MichalStrehovsky commentedon Oct 20, 2017
Why do we need to do that? LLVM wouldn't optimize this away on it's own when set up to optimize?
morganbr commentedon Oct 20, 2017
That's fine too. Having the plumbing for optimization will probably come in handy at some point, but it's optional for this change.
jacano commentedon Oct 22, 2017
Yes, emscripten could do that for us. So only the llvm.donothing intrinsic call.
Emit donothing on nop. Fix dotnet#4529
Emit donothing on nop. Fix dotnet#4529 (dotnet#4776)