llvm with tablegen backend for capstone disassembler
Go to file
Tue Ly a68bbf42fa [libc][math] Implement double precision log function correctly rounded to all rounding modes.
Implement double precision log function correctly rounded to all
rounding modes.

See https://reviews.llvm.org/D150014 for a more detail description of the algorithm.

**Performance**

  - For `0.5 <= x <= 2`, the fast pass hitting rate is about 99.93%.

  - Reciprocal throughput from CORE-MATH's perf tool on Ryzen 5900X:
```
$ ./perf.sh log
GNU libc version: 2.35
GNU libc release: stable

-- CORE-MATH reciprocal throughput -- with FMA
[####################] 100 %
Ntrial = 20 ; Min = 17.465 + 0.596 clc/call; Median-Min = 0.602 clc/call; Max = 18.389 clc/call;

-- CORE-MATH reciprocal throughput -- without FMA (-march=x86-64-v2)
[####################] 100 %
Ntrial = 20 ; Min = 54.961 + 2.606 clc/call; Median-Min = 2.180 clc/call; Max = 59.583 clc/call;

-- System LIBC reciprocal throughput --
[####################] 100 %
Ntrial = 20 ; Min = 12.608 + 0.276 clc/call; Median-Min = 0.359 clc/call; Max = 13.147 clc/call;

-- LIBC reciprocal throughput -- with FMA
[####################] 100 %
Ntrial = 20 ; Min = 20.952 + 0.468 clc/call; Median-Min = 0.602 clc/call; Max = 21.881 clc/call;

-- LIBC reciprocal throughput -- without FMA
[####################] 100 %
Ntrial = 20 ; Min = 18.569 + 0.552 clc/call; Median-Min = 0.601 clc/call; Max = 19.259 clc/call;

```
  - Latency from CORE-MATH's perf tool on Ryzen 5900X:
```
$ ./perf.sh log --latency
GNU libc version: 2.35
GNU libc release: stable

-- CORE-MATH latency -- with FMA
[####################] 100 %
Ntrial = 20 ; Min = 48.431 + 0.699 clc/call; Median-Min = 0.073 clc/call; Max = 51.269 clc/call;

-- CORE-MATH latency -- without FMA (-march=x86-64-v2)
[####################] 100 %
Ntrial = 20 ; Min = 64.865 + 3.235 clc/call; Median-Min = 3.475 clc/call; Max = 71.788 clc/call;

-- System LIBC latency --
[####################] 100 %
Ntrial = 20 ; Min = 42.151 + 2.090 clc/call; Median-Min = 2.270 clc/call; Max = 44.773 clc/call;

-- LIBC latency -- with FMA
[####################] 100 %
Ntrial = 20 ; Min = 35.266 + 0.479 clc/call; Median-Min = 0.373 clc/call; Max = 36.798 clc/call;

-- LIBC latency -- without FMA
[####################] 100 %
Ntrial = 20 ; Min = 48.518 + 0.484 clc/call; Median-Min = 0.500 clc/call; Max = 49.896 clc/call;
```
  - Accurate pass latency:
```
$ ./perf.sh log --latency --simple_stat
GNU libc version: 2.35
GNU libc release: stable

-- CORE-MATH latency -- with FMA
598.306

-- CORE-MATH latency -- without FMA (-march=x86-64-v2)
632.925

-- LIBC latency -- with FMA
455.632

-- LIBC latency -- without FMA
488.564
```

Reviewed By: zimmermann6

Differential Revision: https://reviews.llvm.org/D150131
2023-05-23 10:35:15 -04:00
.github/workflows workflows/release-tasks: Remove stray backslash 2023-05-12 23:34:05 -07:00
bolt Reland^2 "[BOLT] Parallelize legacy profile merging" 2023-05-22 13:37:41 -07:00
clang [NFC][Clang] Fix Coverity bug with dereference null return value in clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr() 2023-05-23 07:25:21 -07:00
clang-tools-extra [clangd] Store paths as requested in PreambleStatCache 2023-05-23 14:30:58 +02:00
cmake Revert "Reland "[CMake] Bumps minimum version to 3.20.0."" 2023-05-17 10:53:33 -04:00
compiler-rt [ubsan][test] Remove --check-prefix=UNIQUE for x86_64-apple from e215996a29 2023-05-23 06:59:01 -07:00
cross-project-tests [WebAssembly] Add wasm_simd128.h intrinsics for relaxed SIMD 2023-05-18 08:24:58 -07:00
flang Reland "[flang] Handle array constants of any rank" 2023-05-23 09:25:22 -03:00
libc [libc][math] Implement double precision log function correctly rounded to all rounding modes. 2023-05-23 10:35:15 -04:00
libclc [libclc] Fix linking against libLLVMSupport 2023-05-22 12:22:05 +02:00
libcxx [libc] Fix typos in documentation 2023-05-22 23:25:16 -07:00
libcxxabi [libcxxabi] allow downstreams to override _LIBCPP_VERBOSE_ABORT 2023-05-18 14:02:48 -07:00
libunwind Revert "Reland "[CMake] Bumps minimum version to 3.20.0."" 2023-05-17 10:53:33 -04:00
lld [lld-macho] Remove partially supported 32-bit ARM arch 2023-05-20 13:06:03 -07:00
lldb [lldb] Fix racing issue when loading inlined symbols from crash report 2023-05-22 22:18:35 -07:00
llvm [InstCombine] Regenerate test checks (NFC) 2023-05-23 16:24:41 +02:00
llvm-libgcc Revert "Reland "[CMake] Bumps minimum version to 3.20.0."" 2023-05-17 10:53:33 -04:00
mlir [mlir][bufferization] Fix bug in findValueInReverseUseDefChain 2023-05-23 15:30:08 +02:00
openmp [OpenMP] Insert missing variable update inside loop 2023-05-23 09:19:04 -05:00
polly Revert "Reland "[CMake] Bumps minimum version to 3.20.0."" 2023-05-17 10:53:33 -04:00
pstl Revert "Reland "[CMake] Bumps minimum version to 3.20.0."" 2023-05-17 10:53:33 -04:00
runtimes Revert "Reland "[CMake] Bumps minimum version to 3.20.0."" 2023-05-17 10:53:33 -04:00
third-party Remove an extra // in the IWYU pragma for gtest-matchers.h 2023-03-14 13:11:53 +01:00
utils [libc][math] Make log10 correctly rounded for non-FMA targets and improve itsperformance. 2023-05-23 10:18:23 -04:00
.arcconfig
.arclint
.clang-format
.clang-tidy Add -misc-use-anonymous-namespace to .clang-tidy 2023-05-06 02:33:20 +03:00
.git-blame-ignore-revs [NFC] Add clang python reformat SHA to .git-blame-ignore-revs 2023-05-23 08:31:02 +02:00
.gitignore [llvm] Ignore .rej files in .gitignore 2022-04-28 08:44:51 -07:00
.mailmap Add entry to mailmap 2023-04-25 23:15:07 -07:00
CONTRIBUTING.md Added instruction to join the llvm discourse and discord group. 2023-03-27 17:02:07 -07:00
LICENSE.TXT [docs] Add LICENSE.txt to the root of the mono-repo 2022-08-24 09:35:00 +02:00
README.md [docs] Update README and GettingStarted 2023-03-08 12:55:59 -08:00
SECURITY.md

The LLVM Compiler Infrastructure

Welcome to the LLVM project!

This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.

The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.

C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.

Other components include: the libc++ C++ standard library, the LLD linker, and more.

Getting the Source Code and Building LLVM

Consult the Getting Started with LLVM page for information on building and running LLVM.

For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.

Getting in touch

Join the LLVM Discourse forums, Discord chat, or #llvm IRC channel on OFTC.

The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.