[PATCH] D49514: [compiler-rt] [builtins] Add logb/logbf/logbl methods to compiler-rt to avoid libm dependencies when possible.
Saleem Abdulrasool via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 21 13:20:36 PDT 2018
compnerd added inline comments.
================
Comment at: lib/builtins/fp_lib.h:274
+// the __compiler_rt prefix.
+static __inline fp_t __compiler_rt_logbX(fp_t x) {
+ rep_t rep = toRep(x);
----------------
I don't see why we need `__inline`, I'm pretty sure that we compile in C99 mode, so `inline` should be fine. Doesn't this require GNU semantics though? Did you try building the windows target with this change?
================
Comment at: lib/builtins/fp_lib.h:302
+ }
+}
+#endif
----------------
Is this taken from somewhere else or is this code written from scratch?
================
Comment at: lib/builtins/fp_lib.h:323
+}
+ #endif
#endif
----------------
Why the fallback to `libm`?
Additionally, the names are different, so is there a reason to not just define the variants unconditionally?
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D49514
More information about the llvm-commits
mailing list