Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0f0cf84
[gn] port 900c51791979 (amdgpu SDNodeInfo)
nico Nov 17, 2025
5f38ae4
[AMDGPU] update LDS block size for gfx1250 (#167614)
changpeng Nov 18, 2025
26b15b7
[gn] port 43dacd07f660064 (ppc SDNodeInfo)
nico Nov 18, 2025
1bf902e
[bazel] Fix #168108 (#168461)
pranavk Nov 18, 2025
2c4bce4
[gn] port 320c18a066b29 (systemz SDNodeInfo)
nico Nov 18, 2025
eb20b53
Revert "Reapply "[compiler-rt] Default to Lit's Internal Shell" (#168…
boomanaiden154 Nov 17, 2025
efee326
[CI] Gracefully Fail when Job Completion Timestamp is None (#168457)
boomanaiden154 Nov 18, 2025
5ba8579
[Arm64EC] Preserve X9 for indirect calls. (#167782)
efriedma-quic Nov 18, 2025
be96137
[gn build] Port 1425d75c7116
llvmgnsyncbot Nov 18, 2025
ec3e5dc
[gn build] Port 472e4ab0b02d
llvmgnsyncbot Nov 18, 2025
307d7ed
[gn build] Port 49d5bb0ad0cb
llvmgnsyncbot Nov 18, 2025
186b8ba
[lldb] Update Lua typemap for #167764 (#168464)
JDevlieghere Nov 18, 2025
f6ebb35
Add documentation about CMAKE_OSX_SYSROOT (#168024)
echristo Nov 18, 2025
17f0afe
[ORC] Merge GetDylibInterface.h APIs into MachO.h. (#168462)
lhames Nov 18, 2025
5b1a4db
[RISCV] Remove unused function declaration. NFC (#168459)
topperc Nov 18, 2025
7c09f12
[gn build] Port 17f0afe40ae8
llvmgnsyncbot Nov 18, 2025
a5590a2
[libc] implement inet_addr (#167708)
c8ef Nov 18, 2025
4b0d422
[ORC] Support scanning "fallback" slices for interfaces. (#168472)
lhames Nov 18, 2025
d464c99
[ORC] Make tests work with Internal Shell (#168471)
boomanaiden154 Nov 18, 2025
0e3fba8
[RISCV] Remove Match_InvalidXSfmmVType. NFC (#168465)
topperc Nov 18, 2025
3fb98e7
[libc++][span] Mark functions as `[[nodiscard]]` (#168033)
H-G-Hristov Nov 18, 2025
b3c5491
InstCombine: Stop transforming EQ/NE of SHR to 0 to ULT/UGT if >1 use
pcc Nov 18, 2025
35a95fe
[clang][NVPTX] Fix SM requirement of f32-tf32 rna satfinite conversio…
Wolfram70 Nov 18, 2025
951ab04
[mlir][NVVM] Add no-rollback option to NVVM lowering passes (#168477)
matthias-springer Nov 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .ci/metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,13 @@ def github_get_metrics(
started_at = job.started_at
completed_at = job.completed_at

if completed_at is None:
logging.info(
f"Workflow {task.id} is marked completed but has a job without a "
"completion timestamp."
)
continue

# GitHub API can return results where the started_at is slightly
# later then the created_at (or completed earlier than started).
# This would cause a -23h59mn delta, which will show up as +24h
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/BuiltinsNVPTX.td
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ def __nvvm_f2bf16_rz : NVPTXBuiltinSMAndPTX<"__bf16(float)", SM_80, PTX70>;
def __nvvm_f2bf16_rz_relu : NVPTXBuiltinSMAndPTX<"__bf16(float)", SM_80, PTX70>;

def __nvvm_f2tf32_rna : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_80, PTX70>;
def __nvvm_f2tf32_rna_satfinite : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_89, PTX81>;
def __nvvm_f2tf32_rna_satfinite : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_80, PTX81>;
def __nvvm_f2tf32_rn : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_90, PTX78>;
def __nvvm_f2tf32_rn_relu : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_90, PTX78>;
def __nvvm_f2tf32_rn_satfinite : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_100, PTX86>;
Expand Down
10 changes: 7 additions & 3 deletions clang/test/CodeGen/builtins-nvptx.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
// RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_89 -target-feature +ptx81 -DPTX=81\
// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \
// RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX81_SM89 %s
// RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_80 -target-feature +ptx81 -DPTX=81 \
// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \
// RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX81_SM80 %s
// RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_90 -target-feature +ptx78 -DPTX=78 \
// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \
// RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX78_SM90 %s
Expand Down Expand Up @@ -1025,6 +1028,10 @@ __device__ void nvvm_cvt_sm80() {

// CHECK_PTX70_SM80: call i32 @llvm.nvvm.f2tf32.rna(float 1.000000e+00)
__nvvm_f2tf32_rna(1);
#if PTX >= 81
// CHECK_PTX81_SM80: call i32 @llvm.nvvm.f2tf32.rna.satfinite(float 1.000000e+00)
__nvvm_f2tf32_rna_satfinite(1.0f);
#endif
#endif
// CHECK: ret void
}
Expand Down Expand Up @@ -1058,9 +1065,6 @@ __device__ void nvvm_cvt_sm89() {
__nvvm_e5m2x2_to_f16x2_rn(0x4c4c);
// CHECK_PTX81_SM89: call <2 x half> @llvm.nvvm.e5m2x2.to.f16x2.rn.relu(i16 19532)
__nvvm_e5m2x2_to_f16x2_rn_relu(0x4c4c);

// CHECK_PTX81_SM89: call i32 @llvm.nvvm.f2tf32.rna.satfinite(float 1.000000e+00)
__nvvm_f2tf32_rna_satfinite(1.0f);
#endif
// CHECK: ret void
}
Expand Down
8 changes: 3 additions & 5 deletions compiler-rt/test/lit.common.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,16 @@ def push_dynamic_library_lookup_path(config, new_path):
config.environment[dynamic_library_lookup_var] = new_ld_library_path_64


# TODO: Consolidate the logic for turning on the internal shell by default for all LLVM test suites.
# See https://github.com/llvm/llvm-project/issues/106636 for more details.
#
# Choose between lit's internal shell pipeline runner and a real shell. If
# LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
if use_lit_shell:
# 0 is external, "" is default, and everything else is internal.
execute_external = use_lit_shell == "0"
else:
# Otherwise we default to internal everywhere.
execute_external = False
# Otherwise we default to internal on Windows and external elsewhere, as
# bash on Windows is usually very slow.
execute_external = not sys.platform in ["win32"]

# Allow expanding substitutions that are based on other substitutions
config.recursiveExpansionLimit = 10
Expand Down
4 changes: 3 additions & 1 deletion compiler-rt/test/orc/TestCases/Darwin/arm64/objc-imageinfo.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: (cd %t; %clang -c *.S)
// RUN: pushd %t
// RUN: %clang -c *.S
// RUN: popd

// Check individual versions are loadable.

Expand Down
1 change: 1 addition & 0 deletions libc/config/linux/aarch64/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,7 @@ if(LLVM_LIBC_FULL_BUILD)
# arpa/inet.h entrypoints
libc.src.arpa.inet.htonl
libc.src.arpa.inet.htons
libc.src.arpa.inet.inet_addr
libc.src.arpa.inet.inet_aton
libc.src.arpa.inet.ntohl
libc.src.arpa.inet.ntohs
Expand Down
1 change: 1 addition & 0 deletions libc/config/linux/riscv/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,7 @@ if(LLVM_LIBC_FULL_BUILD)
# arpa/inet.h entrypoints
libc.src.arpa.inet.htonl
libc.src.arpa.inet.htons
libc.src.arpa.inet.inet_addr
libc.src.arpa.inet.inet_aton
libc.src.arpa.inet.ntohl
libc.src.arpa.inet.ntohs
Expand Down
1 change: 1 addition & 0 deletions libc/config/linux/x86_64/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,7 @@ if(LLVM_LIBC_FULL_BUILD)
# arpa/inet.h entrypoints
libc.src.arpa.inet.htonl
libc.src.arpa.inet.htons
libc.src.arpa.inet.inet_addr
libc.src.arpa.inet.inet_aton
libc.src.arpa.inet.ntohl
libc.src.arpa.inet.ntohs
Expand Down
7 changes: 7 additions & 0 deletions libc/include/arpa/inet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ header_template: inet.h.def
macros: []
types:
- type_name: in_addr
- type_name: in_addr_t
enums: []
objects: []
functions:
Expand All @@ -18,6 +19,12 @@ functions:
return_type: uint16_t
arguments:
- type: uint16_t
- name: inet_addr
standards:
- POSIX
return_type: in_addr_t
arguments:
- type: const char *
- name: inet_aton
standards:
- llvm_libc_ext
Expand Down
1 change: 1 addition & 0 deletions libc/include/llvm-libc-macros/netinet-in-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#define INADDR_ANY __LLVM_LIBC_CAST(static_cast, in_addr_t, 0x00000000)
#define INADDR_BROADCAST __LLVM_LIBC_CAST(static_cast, in_addr_t, 0xffffffff)
#define INADDR_NONE __LLVM_LIBC_CAST(static_cast, in_addr_t, 0xffffffff)

#define INET_ADDRSTRLEN 16
#define INET6_ADDRSTRLEN 46
Expand Down
15 changes: 15 additions & 0 deletions libc/src/arpa/inet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ add_entrypoint_object(
libc.src.__support.str_to_integer
)

add_entrypoint_object(
inet_addr
SRCS
inet_addr.cpp
HDRS
inet_addr.h
DEPENDS
libc.include.arpa_inet
libc.include.llvm-libc-macros.netinet_in_macros
libc.include.llvm-libc-types.in_addr
libc.include.llvm-libc-types.in_addr_t
libc.src.__support.common
libc.src.arpa.inet.inet_aton
)

add_entrypoint_object(
ntohl
SRCS
Expand Down
23 changes: 23 additions & 0 deletions libc/src/arpa/inet/inet_addr.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//===-- Implementation of inet_addr function ------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/arpa/inet/inet_addr.h"
#include "include/llvm-libc-macros/netinet-in-macros.h"
#include "include/llvm-libc-types/in_addr.h"
#include "include/llvm-libc-types/in_addr_t.h"
#include "src/__support/common.h"
#include "src/arpa/inet/inet_aton.h"

namespace LIBC_NAMESPACE_DECL {

LLVM_LIBC_FUNCTION(in_addr_t, inet_addr, (const char *cp)) {
in_addr addr;
return inet_aton(cp, &addr) ? addr.s_addr : INADDR_NONE;
}

} // namespace LIBC_NAMESPACE_DECL
21 changes: 21 additions & 0 deletions libc/src/arpa/inet/inet_addr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//===-- Implementation header of inet_addr ----------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_ARPA_INET_INET_ADDR_H
#define LLVM_LIBC_SRC_ARPA_INET_INET_ADDR_H

#include "include/llvm-libc-types/in_addr_t.h"
#include "src/__support/macros/config.h"

namespace LIBC_NAMESPACE_DECL {

in_addr_t inet_addr(const char *cp);

} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SRC_ARPA_INET_INET_ADDR_H
11 changes: 11 additions & 0 deletions libc/test/src/arpa/inet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ add_libc_unittest(
libc.src.arpa.inet.ntohs
)

add_libc_unittest(
inet_addr
SUITE
libc_arpa_inet_unittests
SRCS
inet_addr_test.cpp
DEPENDS
libc.src.arpa.inet.htonl
libc.src.arpa.inet.inet_addr
)

add_libc_unittest(
inet_aton
SUITE
Expand Down
25 changes: 25 additions & 0 deletions libc/test/src/arpa/inet/inet_addr_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//===-- Unittests for inet_addr -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/arpa/inet/htonl.h"
#include "src/arpa/inet/inet_addr.h"
#include "test/UnitTest/Test.h"

namespace LIBC_NAMESPACE_DECL {

TEST(LlvmLibcInetAddr, ValidTest) {
ASSERT_EQ(htonl(0x7f010204), inet_addr("127.1.2.4"));
ASSERT_EQ(htonl(0x7f010004), inet_addr("127.1.4"));
}

TEST(LlvmLibcInetAddr, InvalidTest) {
ASSERT_EQ(htonl(0xffffffff), inet_addr(""));
ASSERT_EQ(htonl(0xffffffff), inet_addr("x"));
}

} // namespace LIBC_NAMESPACE_DECL
Loading
Loading