[PATCH] D31032: [LoadCombine] Avoid analysing dead basic blocks

Kenneth Hilmersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 07:39:53 PDT 2017


KennethH created this revision.
Herald added subscribers: mzolotukhin, jholewinski.

Added an IsAlive flag to BasicBlockPass::runOnBasicBlock
which tells if the BB is alive or dead.
Dead basic blocks may be forming a loop, for which SSA form is
fulfilled, but with a circular def-use chain. LoadCombine could
enter an infinite loop when analysing such dead code. This patch
solves the problem by simply avoiding to analyse dead basic blocks
in LoadCombine.


https://reviews.llvm.org/D31032

Files:
  include/llvm/Pass.h
  lib/IR/IRPrintingPasses.cpp
  lib/IR/LegacyPassManager.cpp
  lib/Target/NVPTX/NVPTXLowerAlloca.cpp
  lib/Transforms/Scalar/DCE.cpp
  lib/Transforms/Scalar/LoadCombine.cpp
  lib/Transforms/Vectorize/BBVectorize.cpp
  test/Transforms/LoadCombine/deadcode.ll
  tools/bugpoint-passes/TestPasses.cpp
  tools/opt/PassPrinters.cpp
  unittests/IR/LegacyPassManagerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31032.91999.patch
Type: text/x-patch
Size: 8053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170316/3153f437/attachment.bin>


More information about the llvm-commits mailing list