[PATCH] D61038: Add "const" in GetUnderlyingObjects

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 14:21:00 PDT 2019


bjope created this revision.
bjope added reviewers: hfinkel, materi.
Herald added subscribers: atanasyan, jrtc27, hiraditya, eraman, sdardis, jholewinski.
Herald added a project: LLVM.

Both the input Value pointer and the returned Value
pointers in GetUnderlyingObjects are now declared as
const.

It turned out that all current (in-tree) uses of
GetUnderlyingObjects were trivial to update, being
satisfied with have those Value pointers declared
as const. Actually, in the past several of the users
had to use const_cast, just because of ValueTracking
not providing a version of GetUnderlyingObjects with
"const" Value pointers. With this patch we get rid
of those const casts.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D61038

Files:
  llvm/include/llvm/Analysis/ValueTracking.h
  llvm/lib/Analysis/GlobalsModRef.cpp
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/lib/Analysis/LoopAccessAnalysis.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
  llvm/lib/CodeGen/MachinePipeliner.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
  llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
  llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
  llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
  llvm/lib/Transforms/Utils/InlineFunction.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61038.196326.patch
Type: text/x-patch
Size: 17600 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190423/33918067/attachment.bin>


More information about the llvm-commits mailing list