[PATCH] D52537: Ignore dropped call operands when allocating MD slot numbers

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 26 19:21:18 PDT 2018


dexonsmith added a comment.

The change looks correct, but I'm not sure it's the right one.  Looking at Instructions.h at `getCalledFunction()`:

  /// Return the function called, or null if this is an
  /// indirect function invocation.
  ///  
  Function *getCalledFunction() const {
    return dyn_cast<Function>(Op<-3>());
  }

it seems like we could just change this to `dyn_cast_or_null`, and that would also match the documentation comment.

I don't have a strong opinion; wouldn't mind @hfinkel's thoughts.


Repository:
  rL LLVM

https://reviews.llvm.org/D52537





More information about the llvm-commits mailing list