[PATCH] D105838: [GlobalOpt] Fix a miscompile when evaluating struct initializers.
Jon Roelofs via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 14 12:29:48 PDT 2021
jroelofs marked 4 inline comments as done.
jroelofs added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/Evaluator.cpp:180
+/// additional pointers to try. Returns the first non-null return value from
+/// Func, or nullptr if the type can't be introspected further.
static Constant *
----------------
jroelofs wrote:
> aeubanks wrote:
> > ConstantLoad?
> I thought renaming would help clarify what the callback is expected to do. Here in some sense it behaves kind of like a constexpr load would, returning a constant if it can evaluate a load from a constant pointer, and nullptr if it cannot.
Just noticed you meant the comment needed updating after renaming it `TryLoad`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105838/new/
https://reviews.llvm.org/D105838
More information about the llvm-commits
mailing list