Skip to content

[compiler-rt] replicate changes from llvm/ProfileData/InstrProfData.inc #143574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2025

Conversation

andrurogerz
Copy link
Contributor

@andrurogerz andrurogerz commented Jun 10, 2025

Purpose

The compiler-rt project check-same-common-code.test test case started failing after #142861 was merged. This change addresses the failure.

Overview

This patch replicates the changes made by #142861 to llvm/include/llvm/ProfileData/InstrProfData.inc in the duplicated file compiler-rt/include/profile/InstrProfData.inc. These files otherwise match.

Validation

Locally built check-profile target and verified check-same-common-code.test now passes.

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we can merge this for now, but we will need to revisit this. I'm not sure that we want to have this copy dllimport symbols from within LLVM.

@compnerd compnerd merged commit c309525 into llvm:main Jun 10, 2025
9 checks passed
@boomanaiden154
Copy link
Contributor

Where exactly does LLVM_ABI get defined in compiler-rt?

@andrurogerz
Copy link
Contributor Author

Where exactly does LLVM_ABI get defined in compiler-rt?

It doesn't; it is relying on picking it up from llvm/include/Support/Compiler.h. @boomanaiden154 if you don't think this is a good idea, or is incorrect, I am happy to revert this change along with the change to the file it is duped from, llvm\ProfileData\InstrProfData.inc.

@compnerd
Copy link
Member

@boomanaiden154 this is basically just to appease the diff check; the dll annotations aren't being applied to the profile runtime. I don't think that the profile runtime should be exposing these interfaces ever (the runtime's ABI is a pure C interface).

@boomanaiden154
Copy link
Contributor

It doesn't; it is relying on picking it up from llvm/include/Support/Compiler.h

And that's getting pulled into the compiler-rt build tree? I'm mostly just wondering why we aren't running into build errors when compiling compiler-rt.

this is basically just to appease the diff check; the dll annotations aren't being applied to the profile runtime. I don't think that the profile runtime should be exposing these interfaces ever (the runtime's ABI is a pure C interface).

Yeah, I got that this was to appease the diff check. I agree it doesn't make sense to export them from the runtime given it's always (?) statically linked and a pure C interface. Having LLVM_ABI be noop on the compiler-rt side for the common headers seems reasonable enough to me (or some other annotation in the file that maps to LLVM_ABI in certain contexts that is more clear). I guess stripping LLVM_ABI and then running diff would work too.

rorth pushed a commit to rorth/llvm-project that referenced this pull request Jun 11, 2025
…nc (llvm#143574)

## Purpose
The compiler-rt project `check-same-common-code.test` test case started
failing after llvm#142861 was merged. This change addresses the failure.

## Overview
This patch replicates the changes made by llvm#142861 to
llvm/include/llvm/ProfileData/InstrProfData.inc in the duplicated file
compiler-rt/include/profile/InstrProfData.inc. These files otherwise
match.

## Validation
Locally built `check-profile` target and verified
`check-same-common-code.test` now passes.
tomtor pushed a commit to tomtor/llvm-project that referenced this pull request Jun 14, 2025
…nc (llvm#143574)

## Purpose
The compiler-rt project `check-same-common-code.test` test case started
failing after llvm#142861 was merged. This change addresses the failure.

## Overview
This patch replicates the changes made by llvm#142861 to
llvm/include/llvm/ProfileData/InstrProfData.inc in the duplicated file
compiler-rt/include/profile/InstrProfData.inc. These files otherwise
match.

## Validation
Locally built `check-profile` target and verified
`check-same-common-code.test` now passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants