Show / Hide Table of Contents

Class DeadCodeEliminationHelper

Inheritance
Object
DeadCodeEliminationHelper
Namespace: BenchmarkDotNet.Engines
Assembly: BenchmarkDotNet.dll
Syntax
public static class DeadCodeEliminationHelper

Methods

KeepAliveWithoutBoxing<T>(T)

This method can't get inlined, so any value send to it will not get eliminated by the dead code elimination

Declaration
public static void KeepAliveWithoutBoxing<T>(T value)
Parameters
Type Name Description
T value
Type Parameters
Name Description
T

KeepAliveWithoutBoxing<T>(ref T)

This method can't get inlined, so any value send to it will not get eliminated by the dead code elimination

Declaration
public static void KeepAliveWithoutBoxing<T>(ref T value)
Parameters
Type Name Description
T value
Type Parameters
Name Description
T

KeepAliveWithoutBoxingReadonly<T>(in T)

This method can't get inlined, so any value send to it will not get eliminated by the dead code elimination it's not called KeepAliveWithoutBoxing because compiler would not be able to diff ref and in

Declaration
public static void KeepAliveWithoutBoxingReadonly<T>(in T value)
Parameters
Type Name Description
T value
Type Parameters
Name Description
T
In This Article
Back to top Copyright © 2013–2021 .NET Foundation and contributors