LiveVariables analysis now uses intersect for the merge of block-level expression liveness information.
The rationale is that a block-level expression cannot be live in a parent block unless it is live in all of the successor blocks. llvm-svn: 48618
This commit is contained in:
@@ -168,8 +168,17 @@ void TransferFuncs::VisitDeclStmt(DeclStmt* DS) {
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
namespace {
|
||||
typedef ExprDeclBitVector_Types::Union Merge;
|
||||
typedef DataflowSolver<LiveVariables,TransferFuncs,Merge> Solver;
|
||||
|
||||
struct Merge {
|
||||
typedef ExprDeclBitVector_Types::ValTy ValTy;
|
||||
|
||||
void operator()(ValTy& Dst, const ValTy& Src) {
|
||||
Dst.OrDeclBits(Src);
|
||||
Dst.AndExprBits(Src);
|
||||
}
|
||||
};
|
||||
|
||||
typedef DataflowSolver<LiveVariables, TransferFuncs, Merge> Solver;
|
||||
} // end anonymous namespace
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
Reference in New Issue
Block a user