[PATCH] D51850: [IndVars][NFC] Refactor to make modifications of Changed transparent

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 10 01:02:42 PDT 2018


mkazantsev created this revision.
mkazantsev added reviewers: skatkov, uabelho, sanjoy.

IndVarSimplify's design is somewhat odd in the way how it reports that
some transform has made a change. It has a `Changed` field which can
be set from within any function, which makes it hard to track whether or
not it was set properly after a transform was made. It leads to oversights
in marking it properly, see example in PR38855.

This patch removes the `Changed` field, turns it into a local and unifies
the signatures of all relevant transform functions to return boolean value
which designates whether or not this transform has made a change.


https://reviews.llvm.org/D51850

Files:
  lib/Transforms/Scalar/IndVarSimplify.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51850.164624.patch
Type: text/x-patch
Size: 12810 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180910/e3adf016/attachment.bin>


More information about the llvm-commits mailing list