[InstSimplify] Pass pointer and indices separately to SimplifyGEPInst.
authorFlorian Hahn <flo@fhahn.com>
Fri, 14 Jan 2022 09:59:43 +0000 (09:59 +0000)
committerFlorian Hahn <flo@fhahn.com>
Fri, 14 Jan 2022 09:59:52 +0000 (09:59 +0000)
commit1ef9bfa0136c443425a668f65a04f46c04b0ecc0
treed9724a3374587c8d8347a22308b8865723c31bb1
parent8e5a5b619d34c7846e35d219c0747b9c29654f15
[InstSimplify] Pass pointer and indices separately to SimplifyGEPInst.

This doesn't require callers to put the pointer operand and the indices
in a container like a vector when calling the function. This is not
really an issue with the existing callers. But when using it from
IRBuilder the inputs are available as separate pointer value and indices
ArrayRef.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D117038
llvm/include/llvm/Analysis/InstructionSimplify.h
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/lib/Analysis/PHITransAddr.cpp
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/lib/Transforms/Scalar/NewGVN.cpp