[all-commits] [llvm/llvm-project] 6d4a3e: Revert "[TableGen] Use heap allocated arrays inste...

tmatheson-arm via All-commits all-commits at lists.llvm.org
Sun Jul 9 02:18:53 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d4a3e917c1e32b665e1177c92f6b90032817feb
  Author: Tomas Matheson <tomas.matheson at arm.com>
  Date:   2023-07-09 (Sun, 09 Jul 2023)

  Changed paths:
    M llvm/utils/TableGen/CodeGenDAGPatterns.cpp
    M llvm/utils/TableGen/CodeGenDAGPatterns.h
    M llvm/utils/TableGen/DAGISelMatcherGen.cpp

  Log Message:
  Revert "[TableGen] Use heap allocated arrays instead of vectors for TreePatternNode::Types and ResultPerm. NFC"

While working on DAGISelMatcherEmitter I've hit several runtime errors
caused by accessing TreePatternNode::Types out of bounds. These were
difficult to debug because the switch from std::vector to unique_ptr
removes bounds checking.

I don't think the slight reduction in class size is worth the extra
debugging and memory safety problems, so I suggest we revert this.

This reverts commit d34125a1a825208b592cfa8f5fc3566303d691a4.

Differential Revision: https://reviews.llvm.org/D154781

More information about the All-commits mailing list