[all-commits] [llvm/llvm-project] a0757d: Patch by @wecing (Chenguang Wang).

Tim Shen via All-commits all-commits at lists.llvm.org
Fri Feb 19 12:45:09 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a0757d8ebdefa1c54896d70d2a04f68fc23f7916
      https://github.com/llvm/llvm-project/commit/a0757d8ebdefa1c54896d70d2a04f68fc23f7916
  Author: Tim Shen <timshen at google.com>
  Date:   2021-02-19 (Fri, 19 Feb 2021)

  Changed paths:
    M llvm/lib/IR/ConstantFold.cpp
    A llvm/test/tools/llvm-as/slow-ptrtoint.ll

  Log Message:
  -----------
  Patch by @wecing (Chenguang Wang).

The current getFoldedSizeOf() implementation uses naive recursion, which
could be really slow when the input structure type is too complex.

This issue was first brought up in
http://llvm.org/bugs/show_bug.cgi?id=8281; this change fixes it by
adding memoization.

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




More information about the All-commits mailing list