1. Apr 02, 2024
    • mingmingl's avatar
      run 'git merge main' · a39df806
      mingmingl authored
      a39df806
    • mingmingl's avatar
      merge precommit test · fc6e3fc4
      mingmingl authored
      fc6e3fc4
    • Mingming Liu's avatar
      [NFC]Precommit test for vtable import (#79363) · f3ec73fc
      Mingming Liu authored
      A precommit test case to show function summary and global values when a function has instructions annotated with vtable profiles and indirect call profiles.
      - This is a precommit test for https://github.com/llvm/llvm-project/pull/79381
      f3ec73fc
    • Vlad Serebrennikov's avatar
      [clang] Factor out OpenACC part of `Sema` (#84184) · e45f6e56
      Vlad Serebrennikov authored
      This patch moves OpenACC parts of `Sema` into a separate class
      `SemaOpenACC` that is placed in a separate header `Sema/SemaOpenACC.h`.
      This patch is intended to be a model of factoring things out of `Sema`,
      so I picked a small OpenACC part.
      
      Goals are the following:
      1) Split `Sema` into manageable parts.
      2) Make dependencies between parts visible.
      3) Improve Clang development cycle by avoiding recompiling unrelated
      parts of the compiler.
      4) Avoid compile-time regressions.
      5) Avoid notational regressions in the code that uses Sema.
      e45f6e56
    • Gulfem Savrun Yeniceri's avatar
    • mingmingl's avatar
      run 'git merge main' · 163b3e8c
      mingmingl authored
      163b3e8c
    • Kai Nacke's avatar
      [GOFF] Wrap debug output with LLVM_DEBUG (#87252) · 6634c3e9
      Kai Nacke authored
      The content of a GOFF record is always dumped if NDEBUG is not defined,
      which produces rather confusing output. This changes wrap the dumping
      code in LLVM_DEBUG, so the dump is only done when debug output of this
      module is requested.
      6634c3e9
    • Russell Greene's avatar
      [clang-cl] Allow a colon after /Fo option (#87209) · 5ff2773d
      Russell Greene authored
      Modeled after
      https://github.com/llvm/llvm-project/commit/8513a681f7d8d1188706762e712168aebc3119dd#
      
      According to
      https://learn.microsoft.com/en-us/cpp/build/reference/fo-object-file-name?view=msvc-170,
      `/Fo` accepts a trailing-colon variant. This is also tested in practice.
      This allows clang-cl to parse this.
      
      I just copied one of the existing tests, let me know if this is not the
      best way to do this. I tested that the test does not pass beofre the
      Options.td change, and that it does after.
      
      See also #46065
      5ff2773d
    • mingmingl's avatar
      Main main branch. · 672c6352
      mingmingl authored
      672c6352
    • Aaron Ballman's avatar
      [C99] Claim conformance to WG14 N570 · 4746877c
      Aaron Ballman authored
      4746877c
    • lntue's avatar
      [libc][math] Implement atan2f correctly rounded to all rounding modes. (#86716) · 2be72258
      lntue authored
      We compute atan2f(y, x) in 2 stages:
      - Fast step: perform computations in double precision , with relative
      errors < 2^-50
      - Accurate step: if the result from the Fast step fails Ziv's rounding
      test, then we perform computations in double-double precision, with
      relative errors < 2^-100.
      
      On Ryzen 5900X, worst-case latency is ~ 200 clocks, compared to average
      latency ~ 60 clocks, and average reciprocal throughput ~ 20 clocks.
      2be72258
    • Peiming Liu's avatar
    • Nick Desaulniers's avatar
      [libc] fixup missing include for fullbuild (#87266) · 2cfd7d43
      Nick Desaulniers authored
      Fixes #86928
      2cfd7d43
    • Eric's avatar
      Update the "Current Status" section of the website to be current. (#84507) · 53d256bb
      Eric authored
      
      
      The section discusses the reasons for the libraries inception more than
      a decade ago. Now it discusses the progess libc++ has made, and the many
      impressive acomplishments our contributors have brought it.
      
      The initial section remains below.
      
      ---------
      
      Co-authored-by: default avatarLouis Dionne <ldionne.2@gmail.com>
      53d256bb
    • Chris B's avatar
      [HLSL] Implement array temporary support (#79382) · 9434c083
      Chris B authored
      HLSL constant sized array function parameters do not decay to pointers.
      Instead constant sized array types are preserved as unique types for
      overload resolution, template instantiation and name mangling.
      
      This implements the change by adding a new `ArrayParameterType` which
      represents a non-decaying `ConstantArrayType`. The new type behaves the
      same as `ConstantArrayType` except that it does not decay to a pointer.
      
      Values of `ConstantArrayType` in HLSL decay during overload resolution
      via a new `HLSLArrayRValue` cast to `ArrayParameterType`.
      
      `ArrayParamterType` values are passed indirectly by-value to functions
      in IR generation resulting in callee generated memcpy instructions.
      
      The behavior of HLSL function calls is documented in the [draft language
      specification](https://microsoft.github.io/hlsl-specs/specs/hlsl.pdf)
      under the Expr.Post.Call heading.
      
      Additionally the design of this implementation approach is documented in
      [Clang's
      documentation](https://clang.llvm.org/docs/HLSL/FunctionCalls.html)
      
      Resolves #70123
      9434c083
    • ChiaHungDuan's avatar
    • Shourya Goel's avatar
      [libc][POSIX] implement fseeko, ftello (#86928) · 55b74030
      Shourya Goel authored
      
      Fixes: #85287
      55b74030
    • Mingming Liu's avatar
      [nfc] Disable the a cpp compiler-rt test on ppc bigendian systems due to build errors (#87262) · 5bbc640f
      Mingming Liu authored
      `Linux/instrprof-vtable-value-prof.cpp` needs to be built for the test
      to run. However, cpp compile & link failed with undefined-ABI error [1].
      See original failure in
      https://lab.llvm.org/buildbot/#/builders/18/builds/16429
      
      [1] 
      ```
      FAIL: Profile-powerpc64 :: Linux/instrprof-vtable-value-prof.cpp (2406 of 2414)
      ******************** TEST 'Profile-powerpc64 :: Linux/instrprof-vtable-value-prof.cpp' FAILED ********************
      Exit Code: 1
      Command Output (stderr):
      --
      RUN: at line 3: /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_debug/./bin/clang  --driver-mode=g++  -m64  -ldl  -fprofile-generate -fuse-ld=lld -O2 -g -fprofile-generate=. -mllvm -enable-vtable-value-profiling /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc64/Linux/Output/instrprof-vtable-value-prof.cpp.tmp-test
      + /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_debug/./bin/clang --driver-mode=g++ -m64 -ldl -fprofile-generate -fuse-ld=lld -O2 -g -fprofile-generate=. -mllvm -enable-vtable-value-profiling /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc64/Linux/Output/instrprof-vtable-value-prof.cpp.tmp-test
      ld.lld: error: /lib/../lib64/Scrt1.o: ABI version 1 is not supported
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      
      ```
      5bbc640f
    • Caslyn Tonelli's avatar
      [libc] Include algorithm.h to parser.h (#87125) · d83271b0
      Caslyn Tonelli authored
      This includes algorithm.h directly to provide the definition for
      `cpp:max` in parser.h. This will define `max(...)` in the libc namespace
      for build systems that pull in parser.h explicitly.
      d83271b0
    • Jakub Kuderski's avatar
      [mlir][TD] Allow op printing flags as `transform.print` attrs (#86846) · a8cfa7cb
      Jakub Kuderski authored
      Introduce 3 new optional attributes to the `transform.print` ops:
      * `assume_verified`
      * `use_local_scope`
      * `skip_regions`
      
      The primary motivation is to allow printing on large inputs that
      otherwise take forever to print and verify. For the full context, see
      this IREE issue: https://github.com/openxla/iree/issues/16901.
      
      Also add some tests and fix the op description.
      a8cfa7cb
    • Nikolas Klauser's avatar
      [libc++] Optimize the two range overload of mismatch (#86853) · 985c1a44
      Nikolas Klauser authored
      ```
      -----------------------------------------------------------------------------
      Benchmark                                                 old             new
      -----------------------------------------------------------------------------
      bm_mismatch_two_range_overload<char>/1               0.941 ns         1.88 ns
      bm_mismatch_two_range_overload<char>/2                1.43 ns         2.15 ns
      bm_mismatch_two_range_overload<char>/3                1.95 ns         2.55 ns
      bm_mismatch_two_range_overload<char>/4                2.58 ns         2.90 ns
      bm_mismatch_two_range_overload<char>/5                3.75 ns         3.31 ns
      bm_mismatch_two_range_overload<char>/6                5.00 ns         3.83 ns
      bm_mismatch_two_range_overload<char>/7                5.59 ns         4.35 ns
      bm_mismatch_two_range_overload<char>/8                6.37 ns         4.84 ns
      bm_mismatch_two_range_overload<char>/16               11.8 ns         6.72 ns
      bm_mismatch_two_range_overload<char>/64               45.5 ns         2.59 ns
      bm_mismatch_two_range_overload<char>/512               366 ns         12.6 ns
      bm_mismatch_two_range_overload<char>/4096             2890 ns         91.6 ns
      bm_mismatch_two_range_overload<char>/32768           23038 ns          758 ns
      bm_mismatch_two_range_overload<char>/262144         142813 ns         6573 ns
      bm_mismatch_two_range_overload<char>/1048576        366679 ns        26710 ns
      bm_mismatch_two_range_overload<short>/1              0.934 ns         1.88 ns
      bm_mismatch_two_range_overload<short>/2               1.30 ns         2.58 ns
      bm_mismatch_two_range_overload<short>/3               1.76 ns         3.28 ns
      bm_mismatch_two_range_overload<short>/4               2.24 ns         3.98 ns
      bm_mismatch_two_range_overload<short>/5               2.80 ns         4.92 ns
      bm_mismatch_two_range_overload<short>/6               3.58 ns         6.01 ns
      bm_mismatch_two_range_overload<short>/7               4.29 ns         7.03 ns
      bm_mismatch_two_range_overload<short>/8               4.67 ns         7.39 ns
      bm_mismatch_two_range_overload<short>/16              9.86 ns         13.1 ns
      bm_mismatch_two_range_overload<short>/64              38.9 ns         4.55 ns
      bm_mismatch_two_range_overload<short>/512              348 ns         27.7 ns
      bm_mismatch_two_range_overload<short>/4096            2881 ns          225 ns
      bm_mismatch_two_range_overload<short>/32768          23111 ns         1715 ns
      bm_mismatch_two_range_overload<short>/262144        184846 ns        14416 ns
      bm_mismatch_two_range_overload<short>/1048576       742885 ns        57264 ns
      bm_mismatch_two_range_overload<int>/1                0.838 ns         1.19 ns
      bm_mismatch_two_range_overload<int>/2                 1.19 ns         1.65 ns
      bm_mismatch_two_range_overload<int>/3                 1.83 ns         2.06 ns
      bm_mismatch_two_range_overload<int>/4                 2.38 ns         2.42 ns
      bm_mismatch_two_range_overload<int>/5                 3.60 ns         2.47 ns
      bm_mismatch_two_range_overload<int>/6                 3.68 ns         3.05 ns
      bm_mismatch_two_range_overload<int>/7                 4.32 ns         3.36 ns
      bm_mismatch_two_range_overload<int>/8                 5.18 ns         3.58 ns
      bm_mismatch_two_range_overload<int>/16                10.6 ns         2.84 ns
      bm_mismatch_two_range_overload<int>/64                39.0 ns         7.78 ns
      bm_mismatch_two_range_overload<int>/512                247 ns         53.9 ns
      bm_mismatch_two_range_overload<int>/4096              1927 ns          429 ns
      bm_mismatch_two_range_overload<int>/32768            15569 ns         3393 ns
      bm_mismatch_two_range_overload<int>/262144          125413 ns        28504 ns
      bm_mismatch_two_range_overload<int>/1048576         504549 ns       112729 ns
      ```
      985c1a44
  2. Apr 01, 2024