[all-commits] [llvm/llvm-project] 873c0d: [ThinLTO/LowerTypeTests] Handle unpromoted local t...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Mon Mar 2 09:32:00 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 873c0d0786dcf22f4af39f65df824917f70f2170
      https://github.com/llvm/llvm-project/commit/873c0d0786dcf22f4af39f65df824917f70f2170
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2020-03-02 (Mon, 02 Mar 2020)

  Changed paths:
    M llvm/lib/Transforms/IPO/LowerTypeTests.cpp
    M llvm/test/ThinLTO/X86/nodevirt-nonpromoted-typeid.ll

  Log Message:
  -----------
  [ThinLTO/LowerTypeTests] Handle unpromoted local type ids

Summary:
Fixes an issue that cropped up after the changes in D73242 to delay
the lowering of type tests. LTT couldn't handle any type tests with
non-string type id (which happens for local vtables, which we try to
promote during the compile step but cannot always when there are no
exported symbols).

We can simply treat the same as having an Unknown resolution, which
delays their lowering, still allowing such type tests to be used in
subsequent optimization (e.g. planned usage during ICP). The final
lowering which simply removes these handles them fine.

Beefed up an existing ThinLTO test for such unpromoted type ids so that
the internal vtable isn't removed before lower type tests, which hides
the problem.

Reviewers: evgeny777, pcc

Subscribers: inglorion, hiraditya, steven_wu, dexonsmith, aganea, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list