[PATCH] D14094: Add multikey_qsort to STLExtras.h
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 14:50:53 PDT 2015
ruiu added inline comments.
================
Comment at: include/llvm/ADT/STLExtras.h:376
@@ +375,3 @@
+ ++Pos;
+ goto tailcall;
+ }
----------------
grosbach wrote:
> Does the compiler not auto-recognize the tail call pattern here? If not, it seems like it should.
Unlike Scheme we cannot assume that the tail call optimization is always in place. If a compiler does tail call optimization only in -O2 and not in -O0, this code could cause SEGV only in -O0 for some input. That would be confusing. So I think this is needed.
http://reviews.llvm.org/D14094
More information about the llvm-commits
mailing list