[PATCH] D78326: [PredicateInfo] Factor out temporary state (NFC)
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 14:31:38 PDT 2020
fhahn added inline comments.
================
Comment at: include/llvm/Transforms/Utils/PredicateInfo.h:249
void buildPredicateInfo();
- void processAssume(IntrinsicInst *, BasicBlock *, SmallVectorImpl<Value *> &);
- void processBranch(BranchInst *, BasicBlock *, SmallVectorImpl<Value *> &);
- void processSwitch(SwitchInst *, BasicBlock *, SmallVectorImpl<Value *> &);
- void renameUses(SmallVectorImpl<Value *> &);
+ void processAssume(IntrinsicInst *, BasicBlock *, State &);
+ void processBranch(BranchInst *, BasicBlock *, State &);
----------------
Could all those helpers be moved into `State`?
That way, we would not need to thread the parameter through the code and we would even more cleanly separate the build phase. If it is possible to move the construction parts into State, it might make sense to rename it to something like PredicateInfoBuilder and PredicateInfo itself would only contain PredicateMap, CreatedDeclarations, AllInfos. The builder could hold references to those.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78326/new/
https://reviews.llvm.org/D78326
More information about the llvm-commits
mailing list