[PATCH] D99845: [GlobalOpt] Delete write-only constants with cast users

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 3 13:12:43 PDT 2021


lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:330
+      // TODO: We should try to cast the Init value to the new type.
+      Changed |= CleanupConstantGlobalUsers(CI, nullptr, DL, GetTLI);
+      if (CI->use_empty()) {
----------------
Recursion within worklist, really?!



================
Comment at: llvm/test/Transforms/GlobalOpt/writeonly-internal-bitcast.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -globalopt %s -S -o - | FileCheck %s
+
----------------
Precommit?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99845/new/

https://reviews.llvm.org/D99845



More information about the llvm-commits mailing list