[PATCH] D101713: [NFC] Use ArgListEntry indirect types more in ISel lowering

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 2 13:09:49 PDT 2021


aeubanks added inline comments.


================
Comment at: llvm/include/llvm/IR/InstrTypes.h:1746-1747
+  Type *getParamInAllocaType(unsigned ArgNo) const {
+    Type *Ty = Attrs.getParamInAllocaType(ArgNo);
+    return Ty ? Ty : getArgOperand(ArgNo)->getType()->getPointerElementType();
+  }
----------------
dblaikie wrote:
> When does the 'Ty' come back as null? Would that only be it older bitcode, that should be auto-upgraded when loading?
ah you're right
there was one test that was failing when assuming the type was never null, turns out we need to check more closely for these attributes on the arguments, some tests were missing that: https://reviews.llvm.org/D101725


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101713



More information about the llvm-commits mailing list