I’m creating my own algorithm in InstructionCombining.cpp
and I need to get the TargetTransformInfo
to complete it.
The solution I get TargetTransformInfo is that moving the TargetTransformInfo &TTI;
from private
to public
in InstCombiner.h
file. And then I can get the TTI in InstrutionCombining.cpp
.
But I think that is not a good way to do that. I only want to do some changes in InstructionCombining.cpp
without others.
How do I get TargetTransformInfo
in InstructionCombining.cpp
?