title: Can lambda expressions be optimized by the compiler?
body: <p>Can the compiler/runtime reorder or inline expression trees?</p>
  
  <p>If I got the following code:</p>
  
  <pre><code>public static int SomeSimpleMethod(int x) {
      return x;
  }
  
  void Main() {
      Expression&lt;Func&lt;bool&gt;&gt; expr = () =&gt; SomeSimpleMethod(2) == 3;
  }
  </code></pre>
  
  <p>Can <code>expr</code> then include something else than (in pseudo code)</p>
  
  <pre><code>Expression.Lambda
      Expression.Equals
           Expression.Call
               Expression.Constant
           Expression.Constant
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>I am just parsing the expression tree to find some items like the name of the method call ("SomeSimpleMethod"). The lambda will never be executed so I just want to ensure that the method call is not optimized away from the expression tree.</p>