nodejs / llparse

Generating parsers in LLVM IR
http://llparse.org
Other
584 stars 30 forks source link

Optimize node that skips to itself #19

Closed indutny closed 6 years ago

indutny commented 6 years ago

n/t

indutny commented 6 years ago

If LLVM doesn't

indutny commented 6 years ago

LLVM does it:

; Function Attrs: minsize nounwind readnone ssp uwtable
define internal fastcc i8* @llparse__n_eof(%state* noalias nocapture nonnull readnone %state, i8* noalias nonnull readonly %pos, i8* noalias nonnull readnone %endpos, i32 %match) #3 {
no_data:
  ret i8* bitcast (i8* (%state*, i8*, i8*, i32)* @llparse__n_eof to i8*)
}