[all-commits] [llvm/llvm-project] 7ef433: [NFC][RemoveDIs] Switch ConstantExpr::getAsInstruc...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Tue Mar 19 07:31:04 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ef433f62c199c414bffdcac1c8ee3159b29c5f5
      https://github.com/llvm/llvm-project/commit/7ef433f62c199c414bffdcac1c8ee3159b29c5f5
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M llvm/include/llvm/IR/Constants.h
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    M llvm/lib/IR/Constants.cpp
    M llvm/lib/IR/ReplaceConstant.cpp
    M llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp

  Log Message:
  -----------
  [NFC][RemoveDIs] Switch ConstantExpr::getAsInstruction to not insert (#84737)

Because the RemoveDIs work is putting a debug-info bit into
BasicBlock::iterator and iterators are needed for insertion, the
getAsInstruction method declaration would need to use a fully defined
instruction-iterator, which leads to a complicated
header-inclusion-order problem. Much simpler to instead just not insert,
and make it the callers problem to insert.

This is proportionate because there are only four call-sites to
getAsInstruction -- it would suck if we did this everywhere.

---------

Merged by: Stephen Tozer <stephen.tozer at sony.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list