This patch is refactoring the CallAnalyzer::visitGetElementPtr code in order to simplify fixing the bug https://bugs.llvm.org/show_bug.cgi?id=33642 "[InlineCost] CallAnalyzer::visitGetElementPtr can return true for GEPs which are not cost-free".
The code responsible for analysis of inbounds GEPs is extracted into a separate function: CallAnalyzer::canFoldInboundsGEP. With the patch SROA enabling/disabling code is localized at one place instead of spreading across the code of CallAnalyzer::visitGetElementPtr.