[PATCH] D95803: Ensure that InstructionCost actually implements a total ordering

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 10:01:48 PST 2021


ctetreau added inline comments.


================
Comment at: llvm/include/llvm/Support/InstructionCost.h:39-40
 private:
   CostType Value;
   CostState State;
 
----------------
sdesmalen wrote:
> Would it be an idea to explicitly initialize these values with 0 and Valid, respectively?
Sure, why not? I went ahead and added a test for this so (0, Valid) is the official behavior of the default constructor.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95803



More information about the llvm-commits mailing list