Page MenuHomePhabricator

[builtins] Change si_int to int in some helper declarations
AbandonedPublic

Authored by atrosinenko on Jun 5 2020, 9:52 AM.

Details

Reviewers
howard.hinnant
Summary

This patch changes types of some integer function arguments or return values from si_int to the default int type (typedefed to native_int to make it obvious this is intentional) to make it more compatible with libgcc.

The compiler-rt/lib/builtins/README.txt has a link to the libgcc specification. This specification has an explicit note on int, float and other such types being just illustrations in some cases while the actual types are expressed with machine modes.

Such usage of always-32-bit-wide integer type may lead to issues on 16-bit platforms such as MSP430. Provided libgcc2.h can be used as a reference for all targets supported by the libgcc, this patch fixes some existing differences in helper declarations.

This patch is expected to not change behavior at all for targets with 32-bit int type.

Diff Detail

Unit TestsFailed

TimeTest
550 msClang.Driver::Unknown Unit Message ("")
Script: -- : 'RUN: at line 5'; c:\ws\prod\llvm-project\build\bin\clang.exe -c -v -target x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 -std=c++11 --rocm-path=C:\ws\prod\llvm-project\clang\test\Driver/Inputs/rocm -nogpulib C:\ws\prod\llvm-project\clang\test\Driver\hip-include-path.hip 2>&1 | c:\ws\prod\llvm-project\build\bin\filecheck.exe -check-prefixes=COMMON,WRAP,HIP C:\ws\prod\llvm-project\clang\test\Driver\hip-include-path.hip
250 msClang.Preprocessor::Unknown Unit Message ("")
Script: -- : 'RUN: at line 11'; c:\ws\prod\llvm-project\build\bin\clang.exe -x hip -E -target x86_64-linux-gnu -msse3 --cuda-gpu-arch=gfx803 -nogpulib -nogpuinc -o - C:\ws\prod\llvm-project\clang\test\Preprocessor\hip-host-cpu-macros.cu 2>&1 | c:\ws\prod\llvm-project\build\bin\filecheck.exe C:\ws\prod\llvm-project\clang\test\Preprocessor\hip-host-cpu-macros.cu
170 mscfi-devirt-lld-thinlto-x86_64.cfi-devirt-lld-thinlto-x86_64::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang/llvm-project/build/./bin/clang -m64 -fuse-ld=lld -flto=thin -fsanitize=cfi -fwhole-program-vtables --driver-mode=g++ -fvisibility=hidden -c -DTU1 -o /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang/llvm-project/build/projects/compiler-rt/test/cfi/Devirt-lld-thinlto-x86_64/Output/anon-namespace.cpp.tmp1.o /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang/llvm-project/compiler-rt/test/cfi/anon-namespace.cpp
160 mscfi-devirt-lld-thinlto-x86_64.cfi-devirt-lld-thinlto-x86_64::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang/llvm-project/build/./bin/clang -m64 -fuse-ld=lld -flto=thin -fsanitize=cfi -fwhole-program-vtables --driver-mode=g++ -fvisibility=hidden -o /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang/llvm-project/build/projects/compiler-rt/test/cfi/Devirt-lld-thinlto-x86_64/Output/bad-cast.cpp.tmp1 /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang/llvm-project/compiler-rt/test/cfi/bad-cast.cpp
100 mscfi-devirt-lld-thinlto-x86_64.cfi-devirt-lld-thinlto-x86_64::Unknown Unit Message ("")
Script: -- : 'RUN: at line 2'; /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang/llvm-project/build/./bin/clang -m64 -fuse-ld=lld -flto=thin -fsanitize=cfi -fwhole-program-vtables --driver-mode=g++ -fvisibility=hidden -o /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang/llvm-project/build/projects/compiler-rt/test/cfi/Devirt-lld-thinlto-x86_64/Output/bad-split.cpp.tmp1 /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang/llvm-project/compiler-rt/test/cfi/bad-split.cpp && /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang/llvm-project/build/projects/compiler-rt/test/cfi/Devirt-lld-thinlto-x86_64/Output/bad-split.cpp.tmp1
View Full Test Results (114 Failed)

Event Timeline

atrosinenko created this revision.Jun 5 2020, 9:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2020, 9:52 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
atrosinenko edited the summary of this revision. (Show Details)Jun 5 2020, 9:53 AM
atrosinenko abandoned this revision.Jun 5 2020, 10:41 AM

Sorry, forgot to add cfe-commits to CC. Will reopen soon.