Page MenuHomePhabricator

Enable embedded lto for XCOFF.
Needs ReviewPublic

Authored by sfertile on Jul 29 2022, 7:25 AM.

Details

Summary

The traditional system compiler (xlc) on AIX uses a 'fat' object format for LTO by default, embedding the intermediate representation into a special '.ipa' section in native XCOFF object files. Then at link time depending on command line options either a native link or an ipa link can be performed. This patch adds support for embedding the pre-link IR into the module which is then codegened to a native XCOFF object with the bitcode emebededed in the .info section. The .info section representation starts with a magic number, followed by an 8-byte size, an identifier string and a 4-byte unsigned difference, finally followed by the payload. The magic number and identifier string indcate to the linker that the embedded metadata is bitcode and it is appropriate for use in LTO.

Diff Detail

Unit TestsFailed

TimeTest
60,110 msx64 debian > AddressSanitizer-x86_64-linux.TestCases::scariness_score_test.cpp
Script: -- : 'RUN: at line 4'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -O0 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/asan/TestCases/scariness_score_test.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/asan/X86_64LinuxConfig/TestCases/Output/scariness_score_test.cpp.tmp

Event Timeline

sfertile created this revision.Jul 29 2022, 7:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2022, 7:25 AM
sfertile requested review of this revision.Jul 29 2022, 7:25 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 29 2022, 7:25 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript