[all-commits] [llvm/llvm-project] fd8275: [GlobalISel] Add missing pass dependencies for IRT...

qcolombet via All-commits all-commits at lists.llvm.org
Thu Oct 8 13:58:55 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fd8275e04a974c5125baf7ed44bc118672fc79ab
      https://github.com/llvm/llvm-project/commit/fd8275e04a974c5125baf7ed44bc118672fc79ab
  Author: Quentin Colombet <qcolombet at apple.com>
  Date:   2020-10-08 (Thu, 08 Oct 2020)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp

  Log Message:
  -----------
  [GlobalISel] Add missing pass dependencies for IRTranslator

The IRTranslator depends on the branch probability info pass when the
optimization level is different than None and it depends all the time on
the StackProtector pass.

We have to explicitly call out pass dependencies otherwise the pass manager
may not be able to schedule the IRTranslator.

Before this patch, we were lucky because previous passes depend on the branch
probability info pass (like the Global Variable Optimization) and the stack
protector pass is initialized in initializeCodeGen.
However, if the target has a custom pipeline without any passes like Global
Variable Optimization, the pipeline creation will fail, at least because of
the branch probability info pass dependency (it is unlikely that
initializeCodeGen is not called).

This patch adds the missing dependencies to the IRTranslator.

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




More information about the All-commits mailing list