[PATCH] D125114: [SimplifyLibCalls] handle subobjects of constant aggregates
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 17 06:32:54 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:660
+
+ SmallVector<Constant*, 256> Ar;
+ Type *Int8Ty = Type::getInt8Ty(GV->getContext());
----------------
There is no need to convert the values to ConstantInt, you should be able to use the `ConstantDataArray::get()` constructor with the SmallVector directly.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4109
// Look through bitcast instructions and geps.
V = V->stripPointerCasts();
----------------
You can replace this with stripAndAccumulateOffsets(), in which case you don't need explicit handling for GEPs.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125114/new/
https://reviews.llvm.org/D125114
More information about the llvm-commits
mailing list