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

Option -disable-fp-elim removed in 1.24.0-beta1? #3576

Closed
jondegenhardt opened this issue Oct 3, 2020 · 3 comments
Closed

Option -disable-fp-elim removed in 1.24.0-beta1? #3576

jondegenhardt opened this issue Oct 3, 2020 · 3 comments

Comments

@jondegenhardt
Copy link
Contributor

My CI pipeline for tsv-utils has started failing on the MacOS builds with the new 1.24.0-beta1 LDC compiler. The problem is clear from the error message:

ldc2: Unknown command line argument '-disable-fp-elim'.  Try: 'ldc2 --help'

The -disable-fp-elim switch is something I added to the builds of one of my tools on MacOS a while ago, when using LTO with druntime/phobos. It avoids unhandled exception issues. See issue #2585. I don't use the flag on Linux builds.

I don't know if it's still needed for the latest compiler versions (haven't tested it in at least a year), but it is needed on the older versions.

Before I precede with looking into this further, can you give me some info on changes to this option in the beta?

@kinke
Copy link
Member

kinke commented Oct 3, 2020

It's not available with LLVM 11+ anymore (and has been a legacy alias for -frame-pointer=all since LLVM 8 and undocumented for a while now). Still supporting this legacy option was made impossible (or at least, tedious) by an LLVM 11 API change (see cacdc46 for some context):

llvm::Optional<llvm::FramePointer::FP> framePointerUsage() {
#if LDC_LLVM_VER >= 1100
// Defaults to `FP::None`; no way to check if set explicitly by user except
// indirectly via setFunctionAttributes()...
return codegen::getFramePointerUsage();
#else
if (::FramePointerUsage.getNumOccurrences() > 0)
return ::FramePointerUsage.getValue();
if (disableFPElim.getNumOccurrences() > 0)
return disableFPElim ? llvm::FramePointer::All : llvm::FramePointer::None;
return llvm::None;
#endif
}

@jondegenhardt
Copy link
Contributor Author

Okay, thanks. I'll do some testing and find out if there are still uncaught exceptions errors without this flag.

@jondegenhardt
Copy link
Contributor Author

Using 1.24.0-beta1 I was unable to reproduce the unhandled exception issues the -disable-fp-elim switch was guarding against. Closing this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants