[all-commits] [llvm/llvm-project] 5d87b5: [GISelKnownBits] Add support for PHIs

qcolombet via All-commits all-commits at lists.llvm.org
Fri Jan 24 16:44:05 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5d87b5d20296b0476dab0f42fe6ed896a7c46783
      https://github.com/llvm/llvm-project/commit/5d87b5d20296b0476dab0f42fe6ed896a7c46783
  Author: Quentin Colombet <qcolombet at apple.com>
  Date:   2020-01-24 (Fri, 24 Jan 2020)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
    M llvm/unittests/CodeGen/GlobalISel/GISelMITest.h
    M llvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp

  Log Message:
  -----------
  [GISelKnownBits] Add support for PHIs

Teach the GISelKnowBits analysis how to deal with PHI operations.
PHIs are essentially COPYs happening on edges, so we can just reuse
the code for COPY.

This is NFC COPY-wise has we leave Depth untouched when calling
computeKnownBitsImpl for COPYs, like it was before this patch.
Increasing Depth is however required for PHIs as they may loop back to
themselves and we would end up in an infinite loop if we were not
increasing Depth.

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




More information about the All-commits mailing list