title: Using LLVM opt with built-in passes
body: <p>I have successfully run llvm opt with my toy transformation pass but do not see how to use 'opt' with built-in transformation passes  <a href="http://llvm.org/docs/Passes.html#introduction" rel="nofollow">http://llvm.org/docs/Passes.html#introduction</a></p>
  
  <p>I have an empty hi.c file</p>
  
  <pre><code>int main(){
  }
  </code></pre>
  
  <p>For example, if I want to use -instcount pass,  </p>
  
  <pre><code>opt -instcount hi.c
  </code></pre>
  
  <p>gives me strange error.</p>
  
  <pre><code>opt: hi.c:1:1: error: expected top-level entity
  int main(){
  ^
  </code></pre>
  
  <p>Use opt -instcount hi.bc does not work neither, with </p>
  
  <pre><code>WARNING: You're attempting to print out a bitcode file.
  This is inadvisable as it may cause display problems. If
  you REALLY want to taste LLVM bitcode first-hand, you
  can force output with the `-f' option.
  </code></pre>
  
  <p>If I use opt <code>-inst-count -f hi.bc</code>, the output is a messy bitcode.</p>
  
  <p>Question: how should we use 'opt' with built-in transformation passes (those from the link above)? Thanks for your ideas. 'opt -help' says </p>
  
  <p><code>opt [options] &lt;input bitcode file&gt;</code></p>
  
  <p>but my example above 'opt -instcount hi.bc' does not work as expected (see above).</p>