[PATCH] D135435: [Attributor] Use ConstantFoldLoadFromConst()

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 02:59:53 PDT 2022


nikic created this revision.
nikic added a reviewer: jdoerfert.
Herald added subscribers: ormris, okura, kuter, hiraditya.
Herald added a reviewer: homerdin.
Herald added a project: All.
nikic requested review of this revision.
Herald added a reviewer: sstefan1.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When determining the initial value of the object, use the constant folding API to load a given type at a given offset in the global initializer. This makes it work for cases where the load doesn't directly correspond to an aggregate member.

This appears to regress the static_global_simplifiable_2 test though, any idea why?


https://reviews.llvm.org/D135435

Files:
  llvm/lib/Transforms/IPO/Attributor.cpp
  llvm/test/Transforms/Attributor/value-simplify-pointer-info-struct.ll
  llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135435.466018.patch
Type: text/x-patch
Size: 11884 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221007/5ab188dd/attachment.bin>


More information about the llvm-commits mailing list