[all-commits] [llvm/llvm-project] d633db: [SCEV] Fix and validate ValueExprMap/ExprValueMap ...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Nov 22 06:27:43 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d633db8f9dd4a361e60a9030c82adc490d5797e3
      https://github.com/llvm/llvm-project/commit/d633db8f9dd4a361e60a9030c82adc490d5797e3
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-11-22 (Mon, 22 Nov 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/ScalarEvolution.h
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/CodeGen/PowerPC/more-dq-form-prepare.ll

  Log Message:
  -----------
  [SCEV] Fix and validate ValueExprMap/ExprValueMap consistency

This adds validation for consistency of ValueExprMap and
ExprValueMap, and fixes identified issues:

* Addrec construction directly wrote to ValueExprMap in a few places,
  without updating ExprValueMap. Add a helper to ensures they stay
  consistent. The adjustment in forgetSymbolicName() explicitly
  drops the old value from the map, so that we don't rely on it
  being overwritten.
* forgetMemoizedResultsImpl() was dropping the SCEV from
  ExprValueMap, but not dropping the corresponding entries from
  ValueExprMap.

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




More information about the All-commits mailing list