[PATCH] D35097: [InstCombine] Make InstCombine's IRBuilder be passed by reference everywhere

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 16:07:05 PDT 2017


craig.topper created this revision.

Previously the InstCombiner class contained a pointer to an IR builder that had been passed to the constructor. Sometimes this would be passed to helper functions as either a pointer or the pointer would be dereferenced to be passed by reference.

This patch makes it a reference everywhere including the InstCombiner class itself so there is more inconsistency. This a large, but mechanical patch. I've done very minimal formatting changes on it despite what clang-format wanted to do.


https://reviews.llvm.org/D35097

Files:
  lib/Transforms/InstCombine/InstCombineAddSub.cpp
  lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  lib/Transforms/InstCombine/InstCombineCasts.cpp
  lib/Transforms/InstCombine/InstCombineCompares.cpp
  lib/Transforms/InstCombine/InstCombineInternal.h
  lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  lib/Transforms/InstCombine/InstCombinePHI.cpp
  lib/Transforms/InstCombine/InstCombineSelect.cpp
  lib/Transforms/InstCombine/InstCombineShifts.cpp
  lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  lib/Transforms/InstCombine/InstructionCombining.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35097.105559.patch
Type: text/x-patch
Size: 220480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170706/d2db5182/attachment-0001.bin>


More information about the llvm-commits mailing list