Skip to content
  1. Dec 28, 2013
    • Chandler Carruth's avatar
      Disable transforms that introduce calls to exp10*() on Linux due to · f5689f83
      Chandler Carruth authored
      widespread glibc bugs.
      
      The glibc implementation of exp10 has a very serious precision bug in
      version 2.15 (and older versions). This is still very widely used (the
      current Ubuntu LTS for example uses it) and so it isn't reasonable to
      make transforms that produce these functions. This fixes many
      miscompiles introduced when we started transforming pow(10.0, ...) into
      exp10, and it may have fixed other latent miscompiles where exp10
      provided sufficient precision but exp10f did not.
      
      This is all really horrible. The primary bug has been fixed for over
      a year and glibc 2.18 works correctly for the test cases I have, but it
      will be 2017 before the LTS using 2.15 is no longer supported by Ubuntu
      (and thus reasonable for folks to be relying on). =[ We're either going
      to need to live without these optimizations, or find a way to switch
      behavior more dynamically than using simply the fact that the OS is
      "Linux".
      
      To make matters worse, there appears to be significant testing and
      fixing of numerous other bugs in the exp10 family of functions right now
      in glibc. While those haven't been causing problems I've seen in the
      wild, it gives me concerns that we may need to wait until an even later
      release of glibc before we can reliably transform code into exp10.
      
      llvm-svn: 198093
      f5689f83
  2. Dec 26, 2013
  3. Dec 16, 2013
  4. Dec 15, 2013
  5. Dec 12, 2013
  6. Dec 08, 2013
  7. Dec 05, 2013
  8. Nov 03, 2013
  9. Aug 29, 2013
  10. Jul 22, 2013
  11. Jul 03, 2013
  12. May 27, 2013
    • Preston Gurd's avatar
      Convert sqrt functions into sqrt instructions when -ffast-math is in effect. · 048f99de
      Preston Gurd authored
      When -ffast-math is in effect (on Linux, at least), clang defines
      __FINITE_MATH_ONLY__ > 0 when including <math.h>. This causes the
      preprocessor to include <bits/math-finite.h>, which renames the sqrt functions.
      For instance, "sqrt" is renamed as "__sqrt_finite". 
      
      This patch adds the 3 new names in such a way that they will be treated
      as equivalent to their respective original names.
      
      llvm-svn: 182739
      048f99de
  13. Mar 13, 2013
  14. Mar 09, 2013
    • Benjamin Kramer's avatar
      TLI: Microoptimize calls to strlen+memcmp to strncmp. · 160f72dc
      Benjamin Kramer authored
      The strlen+memcmp was hidden in a call to StringRef::operator==. We check if
      there are any null bytes in the string upfront so we can simplify the comparison
      Small speedup when compiling code with many function calls.
      
      llvm-svn: 176766
      160f72dc
  15. Mar 05, 2013
    • Meador Inge's avatar
      Add more functions to the TLI. · b904e6e4
      Meador Inge authored
      
      
      This patch adds many more functions to the target library information.
      All of the functions being added were discovered while doing the migration
      of the simplify-libcalls attribute annotation functionality to the
      functionattrs pass.  As a part of that work the attribute annotation logic
      will query TLI to determine if a function should be annotated or not.
      
      Signed-off-by: default avatarMeador Inge <meadori@codesourcery.com>
      llvm-svn: 176514
      b904e6e4
  16. Nov 22, 2012
  17. Nov 10, 2012
    • Meador Inge's avatar
      Add more functions to the target library information. · 2526a42e
      Meador Inge authored
      In the process of migrating optimizations from the simplify-libcalls pass
      to the instcombine pass I noticed that a few functions are missing from
      the target library information.  These functions need to be available for
      querying in the instcombine library call simplifiers.  More functions will
      probably be added in the future as more simplifiers are migrated to
      instcombine.
      
      llvm-svn: 167659
      2526a42e
  18. Aug 29, 2012
    • Benjamin Kramer's avatar
      Make MemoryBuiltins aware of TargetLibraryInfo. · 8bcc9711
      Benjamin Kramer authored
      This disables malloc-specific optimization when -fno-builtin (or -ffreestanding)
      is specified. This has been a problem for a long time but became more severe
      with the recent memory builtin improvements.
      
      Since the memory builtin functions are used everywhere, this required passing
      TLI in many places. This means that functions that now have an optional TLI
      argument, like RecursivelyDeleteTriviallyDeadFunctions, won't remove dead
      mallocs anymore if the TLI argument is missing. I've updated most passes to do
      the right thing.
      
      Fixes PR13694 and probably others.
      
      llvm-svn: 162841
      8bcc9711
  19. Aug 22, 2012
  20. Aug 03, 2012
  21. Jul 25, 2012
  22. Jul 24, 2012
  23. Apr 18, 2012
  24. Feb 12, 2012
  25. Dec 20, 2011
  26. Dec 08, 2011
  27. Dec 01, 2011
  28. Nov 30, 2011
  29. Nov 17, 2011
  30. Jun 09, 2011
  31. May 21, 2011
  32. Apr 20, 2011
  33. Apr 19, 2011
  34. Mar 03, 2011
Loading