[PATCH] D103048: [IR] make -stack-alignment= into a module attr

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 7 13:59:52 PDT 2021


nickdesaulniers added a comment.

In D103048#2795456 <https://reviews.llvm.org/D103048#2795456>, @tejohnson wrote:

>> Curiously, using ModFlagBehavior::Error doesn't error if one of two modules being linked together doesn't have such a module level attribute.
>
> Yeah, there's a Require behavior, but that only allows you to specify what the value should be after linking modules. Barring changing the behavior of Error, which I'm guessing is relied upon too many places, the main thing I can think of is to add a new module flag behavior with tbd name that is essentially like Error but treats a module without the module flag as having a conflicting value and issues an error for that as well.

I agree, that's what I was thinking we'd need to do, so I'm glad you came to a similar conclusion.  I'll work on implementing a new `ModFlagBehavior` in this patch implementing such semantics that then this module level IR node can use.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103048/new/

https://reviews.llvm.org/D103048



More information about the llvm-commits mailing list