[all-commits] [llvm/llvm-project] 7a2f5d: [CodeMetrics] use hasOneLiveUse instead of hasOneU...

sinan via All-commits all-commits at lists.llvm.org
Mon Jul 25 22:47:41 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7a2f5dca09f022ca56d661acdd919da32147e767
      https://github.com/llvm/llvm-project/commit/7a2f5dca09f022ca56d661acdd919da32147e767
  Author: Sinan Lin <sinan.lin at linux.alibaba.com>
  Date:   2022-07-26 (Tue, 26 Jul 2022)

  Changed paths:
    M llvm/lib/Analysis/CodeMetrics.cpp

  Log Message:
  -----------
  [CodeMetrics] use hasOneLiveUse instead of hasOneUse while analyzing inlinable callsites

It would be better for CodeMetrics to use hasOneLiveUse while analyzing
static and called once callsites, since inline cost now uses
hasOneLiveUse instead of hasOneUse to avoid overpessimization on dead
constant cases (since this patch https://reviews.llvm.org/D109294).

This change has no noticeable influence now, but it helps improve the
accuracy of cost models of passes that use CodeMetrics.

Reviewed By: fhahn, nikic

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




More information about the All-commits mailing list