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

Remove the workaround for llvm.39241? #72

Open
ackelcn opened this issue Jul 1, 2022 · 0 comments
Open

Remove the workaround for llvm.39241? #72

ackelcn opened this issue Jul 1, 2022 · 0 comments

Comments

@ackelcn
Copy link

ackelcn commented Jul 1, 2022

I notice that direct_machine.cpp has a workaround for llvm.39241:

// In this file, &&foo is used in a static variable initializer, and it's not
// entirely clear whether this should prevent inlining of the function or not.
// In practice, though, clang 7 can end up inlining the function with ThinLTO,
// which breaks at least is_return. https://bugs.llvm.org/show_bug.cgi?id=39241
// So all in all, we need at least the noinline attribute. noclone
// is not supported by clang.
attribute((noinline))
const void * direct_run(const bool get_table_mode,
const instr * program,
const byte * data,
Machine::stack_t * stack,
slotref * & __map,
uint8 _dir,
Machine::status_t & status,
SlotMap * __smap=0)

This compiler bug is already marked as fixed: https://bugs.llvm.org/show_bug.cgi?id=39241

Shall the above workaround be removed?

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

1 participant