[all-commits] [llvm/llvm-project] 067c03: [GlobalOpt] Handle undef global_ctors gracefully

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Mar 10 07:02:39 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 067c035012fc061ad6378458774ac2df117283c6
      https://github.com/llvm/llvm-project/commit/067c035012fc061ad6378458774ac2df117283c6
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-03-10 (Thu, 10 Mar 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/CtorUtils.cpp
    A llvm/test/Transforms/GlobalOpt/undef-ctor-dtor.ll

  Log Message:
  -----------
  [GlobalOpt] Handle undef global_ctors gracefully

If there are no ctors, then this can have an arbirary zero-sized
value. The current code checks for null, but it could also be
undef or poison.

Replacing the specific null check with a check for
non-ConstantArray.




More information about the All-commits mailing list