SCEVExpander: give new insts a name that identifies the reponsible pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133992 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick
2011-06-28 05:07:32 +00:00
parent a5d950f673
commit 5e7645be4c
5 changed files with 14 additions and 9 deletions

View File

@@ -30,6 +30,10 @@ namespace llvm {
/// memory.
class SCEVExpander : public SCEVVisitor<SCEVExpander, Value*> {
ScalarEvolution &SE;
// New instructions receive a name to identifies them with the current pass.
const char* Label;
std::map<std::pair<const SCEV *, Instruction *>, AssertingVH<Value> >
InsertedExpressions;
std::set<AssertingVH<Value> > InsertedValues;
@@ -67,8 +71,8 @@ namespace llvm {
public:
/// SCEVExpander - Construct a SCEVExpander in "canonical" mode.
explicit SCEVExpander(ScalarEvolution &se)
: SE(se), IVIncInsertLoop(0), CanonicalMode(true),
explicit SCEVExpander(ScalarEvolution &se, const char *label)
: SE(se), Label(label), IVIncInsertLoop(0), CanonicalMode(true),
Builder(se.getContext(), TargetFolder(se.TD)) {}
/// clear - Erase the contents of the InsertedExpressions map so that users