[PATCH] D81170: GlobalISel: Make known bits/alignment API more consistent

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 09:30:35 PDT 2020


paquette accepted this revision.
paquette added a comment.
This revision is now accepted and ready to land.

LGTM aside from nits



================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:78
 
-  // Try to infer alignment for MI.
-  static Align inferPtrAlignment(const MachineInstr &MI);
+  /// Return the known alignment for the pointer-like value \p R.
+  Align computeKnownAlignment(Register R, unsigned Depth = 0);
----------------
Fancy Doxygen `\return`?


================
Comment at: llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp:49
 KnownBits GISelKnownBits::getKnownBits(MachineInstr &MI) {
+  assert(MI.getNumExplicitDefs() == 1);
   return getKnownBits(MI.getOperand(0).getReg());
----------------
String on the assert?


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

https://reviews.llvm.org/D81170





More information about the llvm-commits mailing list