[all-commits] [llvm/llvm-project] 20b5f0: [IR] Export ConstantFold.h header (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Jun 23 02:32:31 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 20b5f0c641c98e68d66dbaf882556e14f1fba9b8
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    A llvm/include/llvm/IR/ConstantFold.h
    M llvm/lib/IR/ConstantFold.cpp
    R llvm/lib/IR/ConstantFold.h
    M llvm/lib/IR/Constants.cpp

  Log Message:
  [IR] Export ConstantFold.h header (NFC)

This is in preparation for https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179.
As part of that change, we'll want to invoke some of these constant
folding APIs explicitly, as it won't happen as part of
ConstantExpr::getXYZ() anymore.

Ideally, we'd merge these with the DL-aware constant folding APIs
and only call those, but this is not easily possible for some
current usages (most important IRBuilder, which uses DL-independent
constant folding by default, and some major layering changes would
be needed to change that).

This is basically a reboot of D115035 with different motivation.

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

More information about the All-commits mailing list