@@ -239,7 +239,7 @@ class StructurizeCFG {
239
239
Type *Boolean ;
240
240
ConstantInt *BoolTrue;
241
241
ConstantInt *BoolFalse;
242
- UndefValue *BoolUndef ;
242
+ Value *BoolPoison ;
243
243
244
244
Function *Func;
245
245
Region *ParentRegion;
@@ -956,7 +956,7 @@ void StructurizeCFG::wireFlow(bool ExitUseAllowed,
956
956
BasicBlock *Next = needPostfix (Flow, ExitUseAllowed);
957
957
958
958
// let it point to entry and next block
959
- BranchInst *Br = BranchInst::Create (Entry, Next, BoolUndef , Flow);
959
+ BranchInst *Br = BranchInst::Create (Entry, Next, BoolPoison , Flow);
960
960
Br->setDebugLoc (TermDL[Flow]);
961
961
Conditions.push_back (Br);
962
962
addPhiValues (Flow, Entry);
@@ -997,7 +997,7 @@ void StructurizeCFG::handleLoops(bool ExitUseAllowed,
997
997
// Create an extra loop end node
998
998
LoopEnd = needPrefix (false );
999
999
BasicBlock *Next = needPostfix (LoopEnd, ExitUseAllowed);
1000
- BranchInst *Br = BranchInst::Create (Next, LoopStart, BoolUndef , LoopEnd);
1000
+ BranchInst *Br = BranchInst::Create (Next, LoopStart, BoolPoison , LoopEnd);
1001
1001
Br->setDebugLoc (TermDL[LoopEnd]);
1002
1002
LoopConds.push_back (Br);
1003
1003
addPhiValues (LoopEnd, LoopStart);
@@ -1125,7 +1125,7 @@ void StructurizeCFG::init(Region *R) {
1125
1125
Boolean = Type::getInt1Ty (Context);
1126
1126
BoolTrue = ConstantInt::getTrue (Context);
1127
1127
BoolFalse = ConstantInt::getFalse (Context);
1128
- BoolUndef = UndefValue ::get (Boolean );
1128
+ BoolPoison = PoisonValue ::get (Boolean );
1129
1129
1130
1130
this ->UA = nullptr ;
1131
1131
}
0 commit comments