[InferAddressSpaces][NFC] Small code improvements for the InferAddressSpaces pass
authorpsamolysov-intel <pavel.samolysov@intel.com>
Mon, 21 Mar 2022 15:56:26 +0000 (10:56 -0500)
committerChi-Chun, Chen <chichunchen844@gmail.com>
Mon, 21 Mar 2022 16:03:12 +0000 (11:03 -0500)
commit2ed030ba88f98e7e8a8fc1ae5c8b6964fb230bb9
tree912bb3cb6fc969fd3ede93378e13547216181be0
parent888894b65aea61266cdef7a329f755981c7315b0
[InferAddressSpaces][NFC] Small code improvements for the InferAddressSpaces pass

There is a bunch of code improvements in the patch: marking as const everything what can be
const and fixing some typos in comments.

Also the patch removes the shadowing parameter TTI from the rewriteWithNewAddressSpaces
method, the TTI parameter is not required because the same field is in the class.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D121671
llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp