[PATCH] D112370: [BasicAA] Use index size instead of pointer size

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 4 09:45:01 PDT 2021


aardappel added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:509
   // FIXME: Subtarget is null here, so can't Subtarget->hasAddr64() ?
-  if (M.getDataLayout().getMaxPointerSize() == 8) {
+  if (M.getDataLayout().getPointerSize() == 8) {
     // Can't use EmitFeature since "wasm-feature-memory64" is not a module
----------------
tlively wrote:
> nikic wrote:
> > @aardappel @tlively Is it okay to check the address space zero pointer size here? I don't really want to retain a separate getMaxPointerSize() method for only this usage, which looks like a bit of a hack anyway.
> Yes, AS 0 is the correct one to check here.
LGTM


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

https://reviews.llvm.org/D112370



More information about the llvm-commits mailing list