[llvm-dev] RFC: Removal of noduplicate attribute

Nicolai Hähnle-Montoro via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 29 03:06:03 PDT 2019

On Tue, Oct 29, 2019 at 6:04 AM Matt Arsenault via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> The QoI isn’t great for it, and we aren’t seeing any bug reports involving it so it doesn’t seem like it’s really in use. The only mention of the attribute I found on bugzilla is a comment mentioning that it exists as possibly being relevant to solving another problem.
> Similar to how clang tries to force convergent on all functions, noduplicate would have to be speculatively added to all functions if we were serious about preserving the semantics. As-is calls to noduplicate functions could be effectively duplicated by duplicating a call to a function that calls a noduplicate function, or a call to a noduplicate through an indirect call.

Indeed, the lack of clear use cases and even of clear semantics of
noduplicate is a concern. I would be in favor of removing it outright,
but if there are concerns then deprecating it in order to shake out
any users it may have is the least we should do.

Lerne, wie die Welt wirklich ist,
aber vergiss niemals, wie sie sein sollte.

More information about the llvm-dev mailing list