Skip to content

Commit f49e20b

Browse files
committed
review
1 parent 875ecd2 commit f49e20b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Transforms/Scalar/StructurizeCFG.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class StructurizeCFG {
281281
ConstantInt *BoolTrue;
282282
ConstantInt *BoolFalse;
283283
Value *BoolPoison;
284-
TargetTransformInfo *TTI;
284+
const TargetTransformInfo *TTI;
285285
Function *Func;
286286
Region *ParentRegion;
287287

@@ -367,7 +367,7 @@ class StructurizeCFG {
367367

368368
public:
369369
void init(Region *R);
370-
bool run(Region *R, DominatorTree *DT, TargetTransformInfo *TTI);
370+
bool run(Region *R, DominatorTree *DT, const TargetTransformInfo *TTI);
371371
bool makeUniformRegion(Region *R, UniformityInfo &UA);
372372
};
373373

@@ -394,7 +394,7 @@ class StructurizeCFGLegacyPass : public RegionPass {
394394
return false;
395395
}
396396
Function *F = R->getEntry()->getParent();
397-
TargetTransformInfo *TTI =
397+
const TargetTransformInfo *TTI =
398398
&getAnalysis<TargetTransformInfoWrapperPass>().getTTI(*F);
399399
DominatorTree *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
400400
return SCFG.run(R, DT, TTI);
@@ -420,7 +420,7 @@ class StructurizeCFGLegacyPass : public RegionPass {
420420
/// operands are from different BB. If so, this instruction can be coalesced
421421
/// if its hoisted to predecessor block. So, this returns true.
422422
static bool isHoistableInstruction(Instruction *I, BasicBlock *BB,
423-
TargetTransformInfo *TTI) {
423+
const TargetTransformInfo *TTI) {
424424
if (I->getParent() != BB)
425425
return false;
426426

@@ -1396,7 +1396,7 @@ bool StructurizeCFG::makeUniformRegion(Region *R, UniformityInfo &UA) {
13961396

13971397
/// Run the transformation for each region found
13981398
bool StructurizeCFG::run(Region *R, DominatorTree *DT,
1399-
TargetTransformInfo *TTI) {
1399+
const TargetTransformInfo *TTI) {
14001400
if (R->isTopLevelRegion())
14011401
return false;
14021402

0 commit comments

Comments
 (0)