Skip to content

Build Failure From nocapture Deprecation #1178

@ryberger-nvidia

Description

@ryberger-nvidia

LLVM has deprecated the nocapture attribute in favor of a the more rich captures(...) attribute. The PR deprecating nocapture just hit ToT a few days ago causing a build failure as AttrKind::NoCapture no longer exists. nocapture also no longer exists on LangRef.

To retain functionality, Alive can just translate any capture(provenance) attributes into Alive IR's nocapture attribute until all variants captures attribute is supported (if that is even a priority).

To add to the fix above, two options I've briefly explored for captures(...) are:

a) Silently drop the attribute when another form that Alive doesn't yet support is used (this sounds risky to me as I haven't fully grokked everything yet, I haven't had time to dig in to this outside of the build failure)
b) assert/error/crash when any other form of captures(...) comes up (not very user friendly, but may be more correct if captures has implications on refinement checking)

The full support of the attribute can be left until a later date, but I'd love to get the build failure out of the way. With a bit more guidance about the two options above, I'm happy to submit a PR unless someone else beats me to it by the end of the week.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions