OpaquePtr: add Type parameter to Loads analysis API.
authorTim Northover <tnorthover@apple.com>
Tue, 9 Jul 2019 11:35:35 +0000 (11:35 +0000)
committerTim Northover <tnorthover@apple.com>
Tue, 9 Jul 2019 11:35:35 +0000 (11:35 +0000)
commit60afa49abed6efdd7196d38ec884727090cfe373
treea9af173067a23e1f6fa896cfb31bde34ec7cb3b3
parent01eaae6dd12862cda6b42d565a215b07a178aba6
OpaquePtr: add Type parameter to Loads analysis API.

This makes the functions in Loads.h require a type to be specified
independently of the pointer Value so that when pointers have no structure
other than address-space, it can still do its job.

Most callers had an obvious memory operation handy to provide this type, but a
SROA and ArgumentPromotion were doing more complicated analysis. They get
updated to merge the properties of the various instructions they were
considering.

llvm-svn: 365468
12 files changed:
llvm/include/llvm/Analysis/Loads.h
llvm/lib/Analysis/Loads.cpp
llvm/lib/Analysis/MemDerefPrinter.cpp
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/lib/Transforms/Scalar/MergeICmps.cpp
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp