[PATCH] D116971: [AttributorAttributes] Remove hardcoded parameters

Bryce Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 10 15:30:01 PST 2022


Bryce-MW added a comment.

At least for now, I'll leave in the getAllocSizeArgs function since I don't see another way to get the non constant size. If we can't handle non-constant alignment, what should we do with calls that have it? I suspect that's a situation that would be very rare so I would be fine just cancelling the conversion but I'm not sure how to do that inside of manifest. Maybe I can just change line 5967 to continue; but I want to check if I have to set something to invalid or something else. It seems like the old version just asserts that it's constant so I suppose I could do that as well but it doesn't feel right to me.



================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:5967
+        } else {
+          Alignment = max(Alignment, MaybeAlign(llvm::Value::MaximumAlignment));
+        }
----------------
jdoerfert wrote:
> I'm not sure I understand why we take the maximum of something and the MaximumAlignment?
Now that I look at it again, I do agree that it doesn't make any sense. Especially since Alignment starts at 1


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116971



More information about the llvm-commits mailing list