[all-commits] [llvm/llvm-project] da9bcd: [llvm][NFC] Inliner.cpp: ensure InlineHistory ID i...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Fri Apr 10 15:31:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: da9bcdaad9b603de4f0eea4509c38f30b1f4dc36
      https://github.com/llvm/llvm-project/commit/da9bcdaad9b603de4f0eea4509c38f30b1f4dc36
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2020-04-10 (Fri, 10 Apr 2020)

  Changed paths:
    M llvm/lib/Transforms/IPO/Inliner.cpp

  Log Message:
  -----------
  [llvm][NFC] Inliner.cpp: ensure InlineHistory ID is always initialized;

Summary:
The inline history is associated with a call site. There are two locations
we fetch inline history. In one, we fetch it together with the call
site. In the other, we initialize it under certain conditions, use it
later under same conditions (different if check), and otherwise is
uninitialized. Although currently there is no uninitialized use, the
code is more challenging to maintain correctly, than if the value were
always initialized.

Changed to the upfront initialization pattern already present in this
file.

Reviewers: davidxl, dblaikie

Subscribers: eraman, hiraditya, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list