Skip to content

Commit

Permalink
[libc] NFC: Fix trivial typo in comments, documents, and messages
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D77462
  • Loading branch information
kiszk committed Apr 6, 2020
1 parent 1e34ab9 commit 0570de7
Show file tree
Hide file tree
Showing 24 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions libc/AOR_v20.02/math/math_config.h
Expand Up @@ -108,7 +108,7 @@ roundtoint (double_t x)
}

/* Convert x to nearest int in all rounding modes, ties have to be rounded
consistently with roundtoint. If the result is not representible in an
consistently with roundtoint. If the result is not representable in an
int32_t then the semantics is unspecified. */
static inline int32_t
converttoint (double_t x)
Expand Down Expand Up @@ -360,7 +360,7 @@ extern const struct powf_log2_data
needed for good precision in non-nearest rounding and !TOINT_INTRINSICS. */
#define EXP_POLY_WIDE 0
/* Use close to nearest rounding toint when !TOINT_INTRINSICS. This may be
needed for good precision in non-nearest rouning and !EXP_POLY_WIDE. */
needed for good precision in non-nearest rounding and !EXP_POLY_WIDE. */
#define EXP_USE_TOINT_NARROW 0
#define EXP2_POLY_ORDER 5
#define EXP2_POLY_WIDE 0
Expand Down
4 changes: 2 additions & 2 deletions libc/AOR_v20.02/math/pow.c
Expand Up @@ -58,7 +58,7 @@ log_inline (uint64_t ix, double_t *tail)
logctail = T[i].logctail;

/* Note: 1/c is j/N or j/N/2 where j is an integer in [N,2N) and
|z/c - 1| < 1/N, so r = z/c - 1 is exactly representible. */
|z/c - 1| < 1/N, so r = z/c - 1 is exactly representable. */
#if HAVE_FAST_FMA
r = fma (z, invc, -1.0);
#else
Expand Down Expand Up @@ -348,7 +348,7 @@ pow (double x, double y)
if (topx == 0)
{
/* Normalize subnormal x so exponent becomes negative. */
/* Without the barrier some versions of clang evalutate the mul
/* Without the barrier some versions of clang evaluate the mul
unconditionally causing spurious overflow exceptions. */
ix = asuint64 (opt_barrier_double (x) * 0x1p52);
ix &= 0x7fffffffffffffff;
Expand Down
2 changes: 1 addition & 1 deletion libc/AOR_v20.02/math/pow_log_data.c
Expand Up @@ -41,7 +41,7 @@ and z falls into the ith one, then table entries are computed as
tab[i].logctail = (double)(log(c) - logc)
where c is chosen near the center of the subinterval such that 1/c has only a
few precision bits so z/c - 1 is exactly representible as double:
few precision bits so z/c - 1 is exactly representable as double:
1/c = center < 1 ? round(N/center)/N : round(2*N/center)/N/2
Expand Down
2 changes: 1 addition & 1 deletion libc/AOR_v20.02/math/powf.c
Expand Up @@ -26,7 +26,7 @@ relerr_exp2: 1.69 * 2^-34 (Relative error of exp2(ylogx).)
#define OFF 0x3f330000

/* Subnormal input is normalized so ix has negative biased exponent.
Output is multiplied by N (POWF_SCALE) if TOINT_INTRINICS is set. */
Output is multiplied by N (POWF_SCALE) if TOINT_INTRINSICS is set. */
static inline double_t
log2_inline (uint32_t ix)
{
Expand Down
2 changes: 1 addition & 1 deletion libc/AOR_v20.02/math/test/mathbench.c
Expand Up @@ -635,7 +635,7 @@ readtrace (const char *name)
FILE *f = strcmp (name, "-") == 0 ? stdin : fopen (name, "r");
if (!f)
{
printf ("openning \"%s\" failed: %m\n", name);
printf ("opening \"%s\" failed: %m\n", name);
exit (1);
}
for (;;)
Expand Down
2 changes: 1 addition & 1 deletion libc/AOR_v20.02/string/aarch64/memchr-sve.S
Expand Up @@ -48,7 +48,7 @@ __memchr_aarch64_sve:
ret

/* First fault failed: only some of the vector is valid.
Perform the comparision only on the valid bytes. */
Perform the comparison only on the valid bytes. */
2: cmpeq p2.b, p0/z, z0.b, z1.b
b.any 1b

Expand Down
2 changes: 1 addition & 1 deletion libc/AOR_v20.02/string/aarch64/strchr-sve.S
Expand Up @@ -57,7 +57,7 @@ FUNC:
ret

/* First fault failed: only some of the vector is valid.
Perform the comparision only on the valid bytes. */
Perform the comparison only on the valid bytes. */
2: cmpeq p2.b, p0/z, z0.b, z1.b /* search for c */
cmpeq p3.b, p0/z, z0.b, 0 /* search for 0 */
orrs p4.b, p0/z, p2.b, p3.b /* c | 0 */
Expand Down
2 changes: 1 addition & 1 deletion libc/AOR_v20.02/string/aarch64/strnlen.S
Expand Up @@ -67,7 +67,7 @@ ENTRY_ALIGN (__strnlen_aarch64, 0)
especially on cores with a high number of issue slots per
cycle, as we get much better parallelism out of the operations. */

/* Start of critial section -- keep to one 64Byte cache line. */
/* Start of critical section -- keep to one 64Byte cache line. */
L(loop):
ldp data1, data2, [src], #16
L(realigned):
Expand Down
2 changes: 1 addition & 1 deletion libc/AOR_v20.02/string/aarch64/strrchr-sve.S
Expand Up @@ -46,7 +46,7 @@ __strrchr_aarch64_sve:
b 0b

/* First fault failed: only some of the vector is valid.
Perform the comparisions only on the valid bytes. */
Perform the comparisons only on the valid bytes. */
1: cmpeq p3.b, p0/z, z0.b, 0 /* search for 0 */
b.any 2f

Expand Down
2 changes: 1 addition & 1 deletion libc/AOR_v20.02/string/arm/strcpy.c
Expand Up @@ -120,7 +120,7 @@ __strcpy_arm (char* dst, const char* src)
"bne 5b\n\t"
"BX LR\n"

/* src and dst do not have a common word-alignement. Fall back to
/* src and dst do not have a common word-alignment. Fall back to
byte copying. */
"4:\n\t"
"ldrb r2, [r1], #1\n\t"
Expand Down
4 changes: 2 additions & 2 deletions libc/docs/header_generation.rst
Expand Up @@ -20,7 +20,7 @@ reading a ``.h.def`` file, the header generation tool does two things:

1. Copy the lines not containing commands as is into the output ``.h`` file.
2. Replace the line on which a command occurs with some other text as directed
by the command. The replacment text can span multiple lines.
by the command. The replacement text can span multiple lines.

Command syntax
~~~~~~~~~~~~~~
Expand Down Expand Up @@ -59,7 +59,7 @@ Available Commands
------------------

Sub-sections below describe the commands currently available. Under each command
is the discription of the arugments to the command, and the action taken by the
is the description of the arguments to the command, and the action taken by the
header generation tool when processing a command.

``include_file``
Expand Down
6 changes: 3 additions & 3 deletions libc/docs/implementation_standard.rst
Expand Up @@ -22,8 +22,8 @@ implementation header file will be ``src/math/round/round.h``. The rest of this
document explains the structure of implementation header files and ``.cpp``
files.

Implementaion Header File Structure
-----------------------------------
Implementation Header File Structure
------------------------------------

We will use the ``round`` function from the public ``math.h`` header file as an
example. The ``round`` function will be declared in an internal header file
Expand Down Expand Up @@ -82,4 +82,4 @@ a post build step. For example, for the ``round`` function, one can use
NOTE: We use a post build ``objcopy`` step to add an alias instead of using
the ``__attribute__((alias))``. For C++, this ``alias`` attribute requires
mangled names of the referees. Using the post build ``objcopy`` step helps
us avoid putting mangled names with ``alias`` atttributes.
us avoid putting mangled names with ``alias`` attributes.
2 changes: 1 addition & 1 deletion libc/include/__posix-types.h
Expand Up @@ -8,7 +8,7 @@

// This header file does not have a header guard. It is internal to LLVM libc
// and intended to be used to pick specific definitions without polluting the
// public headers with unneccesary definitions.
// public headers with unnecessary definitions.

#if defined(__need_off_t) && !defined(__llvm_libc_off_t_defined)
typedef __INT64_TYPE__ off_t;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/signal/linux/CMakeLists.txt
Expand Up @@ -22,7 +22,7 @@ add_object_library(
-Wframe-larger-than=0
-Werror
-Wno-attributes
# asan creates asan.module_ctor which uses stack space, causing warinngs.
# asan creates asan.module_ctor which uses stack space, causing warnings.
-fno-sanitize=address
DEPENDS
linux_syscall_h
Expand Down
2 changes: 1 addition & 1 deletion libc/src/signal/linux/__restore.cpp
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// This file is implemented seperately from sigaction.cpp so that we can
// This file is implemented separately from sigaction.cpp so that we can
// strongly control the options this file is compiled with. __restore_rt cannot
// make any stack allocations so we must ensure this.

Expand Down
4 changes: 2 additions & 2 deletions libc/src/stdlib/abort.cpp
Expand Up @@ -19,9 +19,9 @@ void LLVM_LIBC_ENTRYPOINT(abort)() {
// Unblock SIGABRT, raise it, if it was ignored or the handler returned,
// change its action to SIG_DFL, raise it again.
// TODO: When C11 mutexes land:
// Aquire recursive mutex (in case the current signal handler for SIGABRT
// Acquire recursive mutex (in case the current signal handler for SIGABRT
// itself calls abort we don't want to deadlock on the same thread trying
// to aquire it's own mutex.)
// to acquire it's own mutex.)
__llvm_libc::raise(SIGABRT);
__llvm_libc::raise(SIGKILL);
__llvm_libc::_Exit(127);
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strlen.cpp
Expand Up @@ -13,7 +13,7 @@
namespace __llvm_libc {

// TODO: investigate the performance of this function.
// There might be potential for compiler optmization.
// There might be potential for compiler optimization.
size_t LLVM_LIBC_ENTRYPOINT(strlen)(const char *src) {
const char *end = src;
while (*end != '\0')
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/x86/memcpy_arch_specific.h.inc
Expand Up @@ -4,7 +4,7 @@ namespace __llvm_libc {

static void CopyRepMovsb(char *__restrict dst, const char *__restrict src,
size_t count) {
// FIXME: Add MSVC suppport with
// FIXME: Add MSVC support with
// #include <intrin.h>
// __movsb(reinterpret_cast<unsigned char *>(dst),
// reinterpret_cast<const unsigned char *>(src), count);
Expand Down
2 changes: 1 addition & 1 deletion libc/src/threads/linux/thread_utils.h
Expand Up @@ -19,7 +19,7 @@ namespace __llvm_libc {
// The futex data has to be exactly 4 bytes long. However, we use a uint type
// here as we do not want to use `_Atomic uint32_t` as the _Atomic keyword which
// is C only. The header stdatomic.h does not define an atomic type
// corresponding to `uint32_t` or to something which is exaclty 4 bytes wide.
// corresponding to `uint32_t` or to something which is exactly 4 bytes wide.
using FutexData = atomic_uint;

// We use a tri-state mutex because we want to avoid making syscalls
Expand Down
2 changes: 1 addition & 1 deletion libc/utils/HdrGen/Main.cpp
Expand Up @@ -25,7 +25,7 @@ llvm::cl::opt<std::string> StandardHeader(
llvm::cl::desc("The standard header file which is to be generated."),
llvm::cl::value_desc("<header file>"));
llvm::cl::list<std::string> ReplacementValues(
"args", llvm::cl::desc("Command seperated <argument name>=<value> pairs."),
"args", llvm::cl::desc("Command separated <argument name>=<value> pairs."),
llvm::cl::value_desc("<name=value>[,name=value]"));

void ParseArgValuePairs(std::unordered_map<std::string, std::string> &Map) {
Expand Down
2 changes: 1 addition & 1 deletion libc/utils/UnitTest/README.md
Expand Up @@ -16,7 +16,7 @@ mixup/conflict problems.
LLVM libc's unit test framework is much less featureful as compared to gtest.
But, what is available strives to be exactly like gtest.

## Will it be made as featurful as gtest in future?
## Will it be made as featureful as gtest in future?

It is not clear if LLVM libc needs/will need every feature of gtest. We only
intend to extend it on an _as needed_ basis. Hence, it might never be as
Expand Down
2 changes: 1 addition & 1 deletion libc/utils/UnitTest/Test.h
Expand Up @@ -25,7 +25,7 @@ class RunContext;
// a TRUE or FALSE condition. That is because, C library funtions do not
// return boolean values, but use integral return values to indicate true or
// false conditions. Hence, it is more appropriate to use the other comparison
// condtions for such cases.
// conditions for such cases.
enum TestCondition {
Cond_None,
Cond_EQ,
Expand Down
2 changes: 1 addition & 1 deletion libc/utils/benchmarks/LibcBenchmark.h
Expand Up @@ -174,7 +174,7 @@ class RuntimeEstimationProgression {
//
// Note: The benchmark is not responsible for serializing the executions of
// `foo`. It is not suitable for measuring, very small & side effect free
// functions, as the processor is free to execute serveral executions in
// functions, as the processor is free to execute several executions in
// parallel.
//
// - Options: A set of parameters controlling the stopping conditions for the
Expand Down
4 changes: 2 additions & 2 deletions libc/utils/buildbot/Dockerfile
@@ -1,14 +1,14 @@
FROM debian:10

# Installing dependecies.
# Installing dependencies.
RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get install -y build-essential clang subversion git vim \
zip libstdc++6:i386 file binutils-dev binutils-gold cmake python-pip \
ninja-build
RUN python -m pip install buildbot-slave==0.8.12

# Temporary dependecies for AOR tests.
# Temporary dependencies for AOR tests.
RUN apt-get install -y libmpfr-dev libmpc-dev

# Change linker to gold.
Expand Down

0 comments on commit 0570de7

Please sign in to comment.