Skip to content
  1. Mar 05, 2020
  2. Mar 03, 2020
    • Sjoerd Meijer's avatar
      Revert "[Driver] Default to -fno-common for all targets" · 4e363563
      Sjoerd Meijer authored
      This reverts commit 0a9fc923.
      
      Going to look at the asan failures.
      
      I find the failures in the test suite weird, because they look
      like compile time test and I don't understand how that can be
      failing, but will have a brief look at that too.
      4e363563
    • Sjoerd Meijer's avatar
      [Driver] Default to -fno-common for all targets · 0a9fc923
      Sjoerd Meijer authored
      This makes -fno-common the default for all targets because this has performance
      and code-size benefits and is more language conforming for C code.
      Additionally, GCC10 also defaults to -fno-common and so we get consistent
      behaviour with GCC.
      
      With this change, C code that uses tentative definitions as definitions of a
      variable in multiple translation units will trigger multiple-definition linker
      errors. Generally, this occurs when the use of the extern keyword is neglected
      in the declaration of a variable in a header file. In some cases, no specific
      translation unit provides a definition of the variable. The previous behavior
      can be restored by specifying -fcommon.
      
      As GCC has switched already, we benefit from applications already being ported
      and existing documentation how to do this. For example:
      - https://gcc.gnu.org/gcc-10/porting_to.html
      - https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
      
      Differential revision: https://reviews.llvm.org/D75056
      0a9fc923
  3. Feb 25, 2020
  4. Feb 17, 2020
    • Yaxun (Sam) Liu's avatar
      [OpenCL][CUDA][HIP][SYCL] Add norecurse · fb44b9db
      Yaxun (Sam) Liu authored
      norecurse function attr indicates the function is not called recursively
      directly or indirectly.
      
      Add norecurse to OpenCL functions, SYCL functions in device compilation
      and CUDA/HIP kernels.
      
      Although there is LLVM pass adding norecurse to functions, it only works
      for whole-program compilation. Also FE adding norecurse can make that
      pass run faster since functions with norecurse do not need to be checked
      again.
      
      Differential Revision: https://reviews.llvm.org/D73651
      fb44b9db
  5. Jan 28, 2020
  6. Jan 18, 2020
    • Matt Arsenault's avatar
      Consolidate internal denormal flushing controls · a4451d88
      Matt Arsenault authored
      Currently there are 4 different mechanisms for controlling denormal
      flushing behavior, and about as many equivalent frontend controls.
      
      - AMDGPU uses the fp32-denormals and fp64-f16-denormals subtarget features
      - NVPTX uses the nvptx-f32ftz attribute
      - ARM directly uses the denormal-fp-math attribute
      - Other targets indirectly use denormal-fp-math in one DAGCombine
      - cl-denorms-are-zero has a corresponding denorms-are-zero attribute
      
      AMDGPU wants a distinct control for f32 flushing from f16/f64, and as
      far as I can tell the same is true for NVPTX (based on the attribute
      name).
      
      Work on consolidating these into the denormal-fp-math attribute, and a
      new type specific denormal-fp-math-f32 variant. Only ARM seems to
      support the two different flush modes, so this is overkill for the
      other use cases. Ideally we would error on the unsupported
      positive-zero mode on other targets from somewhere.
      
      Move the logic for selecting the flush mode into the compiler driver,
      instead of handling it in cc1. denormal-fp-math/denormal-fp-math-f32
      are now both cc1 flags, but denormal-fp-math-f32 is not yet exposed as
      a user flag.
      
      -cl-denorms-are-zero, -fcuda-flush-denormals-to-zero and
      -fno-cuda-flush-denormals-to-zero will be mapped to
      -fp-denormal-math-f32=ieee or preserve-sign rather than the old
      attributes.
      
      Stop emitting the denorms-are-zero attribute for the OpenCL flag. It
      has no in-tree users. The meaning would also be target dependent, such
      as the AMDGPU choice to treat this as only meaning allow flushing of
      f32 and not f16 or f64. The naming is also potentially confusing,
      since DAZ in other contexts refers to instructions implicitly treating
      input denormals as zero, not necessarily flushing output denormals to
      zero.
      
      This also does not attempt to change the behavior for the current
      attribute. The LangRef now states that the default is ieee behavior,
      but this is inaccurate for the current implementation. The clang
      handling is slightly hacky to avoid touching the existing
      denormal-fp-math uses. Fixing this will be left for a future patch.
      
      AMDGPU is still using the subtarget feature to control the denormal
      mode, but the new attribute are now emitted. A future change will
      switch this and remove the subtarget features.
      a4451d88
  7. Jan 17, 2020
  8. Dec 03, 2019
  9. Nov 05, 2019
  10. Sep 05, 2019
  11. Aug 27, 2019
  12. Aug 06, 2019
    • Matt Arsenault's avatar
      Builtins: Start adding half versions of math builtins · acd0a53c
      Matt Arsenault authored
      The implementation of the OpenCL builtin currently library uses 2
      different hacks to get to the corresponding IR intrinsics from the
      source. This will allow removal of those.
      
      This is the set that is currently used (minus a few vector ones).
      
      llvm-svn: 367973
      acd0a53c
  13. Aug 05, 2019
  14. Aug 03, 2019
    • Tim Northover's avatar
      IR: print value numbers for unnamed function arguments · a009a60a
      Tim Northover authored
      For consistency with normal instructions and clarity when reading IR,
      it's best to print the %0, %1, ... names of function arguments in
      definitions.
      
      Also modifies the parser to accept IR in that form for obvious reasons.
      
      llvm-svn: 367755
      a009a60a
  15. Aug 02, 2019
  16. Jul 31, 2019
  17. Jul 25, 2019
  18. Jul 22, 2019
  19. Jul 17, 2019
  20. Jul 16, 2019
  21. Jul 10, 2019
  22. Jul 09, 2019
  23. Jul 08, 2019
  24. Jun 25, 2019
  25. Jun 24, 2019
  26. Jun 22, 2019
  27. Jun 20, 2019
  28. Jun 19, 2019
  29. Jun 18, 2019
  30. Jun 14, 2019
  31. Jun 05, 2019
    • Tim Northover's avatar
      LLVM IR: Generate new-style byval-with-Type from Clang · c46827c7
      Tim Northover authored
      LLVM IR recently added a Type parameter to the byval Attribute, so that
      when pointers become opaque and no longer have an element type the
      information will still be present in IR.
      
      For now the Type parameter is optional (which is why Clang didn't need
      this change at the time), but it will become mandatory soon.
      
      llvm-svn: 362652
      c46827c7
Loading