[all-commits] [llvm/llvm-project] 3af5f3: [IR] Add utility to convert constant expression op...

Mahesha S via All-commits all-commits at lists.llvm.org
Mon Jun 7 14:53:24 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3af5f3e69247fb3ead05eefa99832c1c029e1997
      https://github.com/llvm/llvm-project/commit/3af5f3e69247fb3ead05eefa99832c1c029e1997
  Author: hsmahesha <mahesha.comp at gmail.com>
  Date:   2021-06-08 (Tue, 08 Jun 2021)

  Changed paths:
    M llvm/include/llvm/IR/ReplaceConstant.h
    M llvm/lib/IR/ReplaceConstant.cpp

  Log Message:
  -----------
  [IR] Add utility to convert constant expression operands (of an instruction) to instructions.

In the situation where we need to replace a constant operand C from a constant expression CE
by an instruction NI, it not possible without converting CE itself into an instruction. This
utility helps to convert the given set of constant expression operands from an instruction I
into a corresponding set of instructions.

The current use-case for this utility is from the patches - https://reviews.llvm.org/D103225
and https://reviews.llvm.org/D103655.

Reviewed By: rampitec

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




More information about the All-commits mailing list