[PATCH] D158246: [amdgpu] WIP variadics

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 18 13:33:50 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:74-77
+    Value *Mask = ConstantInt::get(IntPtrTy, ~(DataAlignMinusOne));
+    Value *vaListAligned = Builder.CreateIntToPtr(
+        Builder.CreateAnd(Builder.CreatePtrToInt(Incr, IntPtrTy), Mask),
+        Incr->getType());
----------------
Can you use ptrmask?


================
Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:142
+  bool runOnModule(Module &M) override {
+    bool Apply = ApplicableToAllDefault | ApplyToAllOverride;
+    bool Changed = false;
----------------
This would be better as a pass parameter. Don't see much point to specifying individual functions by name


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158246



More information about the cfe-commits mailing list