Skip to content
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

Improve compiler warning to include the offending file when emitting error in RISCVTargetLowering #100663

Open
hiraditya opened this issue Jul 25, 2024 · 3 comments
Labels
backend:RISC-V enhancement Improving things as opposed to bug fixing, e.g. new or missing feature

Comments

@hiraditya
Copy link
Collaborator

the warning generated from:

"target-abi)\n";
ABI = Subtarget.is64Bit() ? RISCVABI::ABI_LP64 : RISCVABI::ABI_ILP32;
} else if ((ABI == RISCVABI::ABI_ILP32D || ABI == RISCVABI::ABI_LP64D) &&
!Subtarget.hasStdExtD()) {
errs() << "Hard-float 'd' ABI can't be used for a target that "

doesn't include the module name, which makes it hard to find which file error was coming from?

It might be okay with non-lto + non-parallel builds but it becomes hard to debug the problem otherwise.

Context: #69780 (comment)

@hiraditya hiraditya added backend:RISC-V enhancement Improving things as opposed to bug fixing, e.g. new or missing feature and removed new issue labels Jul 25, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 25, 2024

@llvm/issue-subscribers-backend-risc-v

Author: AdityaK (hiraditya)

the warning generated from:

"target-abi)\n";
ABI = Subtarget.is64Bit() ? RISCVABI::ABI_LP64 : RISCVABI::ABI_ILP32;
} else if ((ABI == RISCVABI::ABI_ILP32D || ABI == RISCVABI::ABI_LP64D) &&
!Subtarget.hasStdExtD()) {
errs() << "Hard-float 'd' ABI can't be used for a target that "

doesn't include the module name, which makes it hard to find which file error was coming from?

It might be okay with non-lto + non-parallel builds but it becomes hard to debug the problem otherwise.

Context: #69780 (comment)

@topperc
Copy link
Collaborator

topperc commented Jul 25, 2024

By the time we get here there should only be one Module. Do you want the Function name?

Given where the error is, it's impossible to get the function name. We would need to do it in getSubtargetImpl in RISCVTargetMachine I think.

@hiraditya
Copy link
Collaborator Author

The function name is even better. Backtrace from within gdb tells me that Function is available only two levels up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:RISC-V enhancement Improving things as opposed to bug fixing, e.g. new or missing feature
Projects
None yet
Development

No branches or pull requests

3 participants