[all-commits] [llvm/llvm-project] 014575: Fix Block::eraseArguments: keep track the first re...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Sat Feb 27 11:23:04 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 014575932fc3acbb0f1c5b46ff2bfcebf69e6e62
      https://github.com/llvm/llvm-project/commit/014575932fc3acbb0f1c5b46ff2bfcebf69e6e62
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2021-02-27 (Sat, 27 Feb 2021)

  Changed paths:
    M mlir/lib/IR/Block.cpp

  Log Message:
  -----------
  Fix Block::eraseArguments: keep track the first removed element while removing

Not only this is likely more efficient than BitVector::find_first(), but
also if the BitVector is empty find_first() returns -1, which
llvm::drop_begin isn't robust against.




More information about the All-commits mailing list