@@ -1407,6 +1407,8 @@ bool Attributor::isAssumedDead(const AbstractAttribute &AA,
1407
1407
const AAIsDead *FnLivenessAA,
1408
1408
bool &UsedAssumedInformation,
1409
1409
bool CheckBBLivenessOnly, DepClassTy DepClass) {
1410
+ if (!Configuration.UseLiveness )
1411
+ return false ;
1410
1412
const IRPosition &IRP = AA.getIRPosition ();
1411
1413
if (!Functions.count (IRP.getAnchorScope ()))
1412
1414
return false ;
@@ -1419,6 +1421,8 @@ bool Attributor::isAssumedDead(const Use &U,
1419
1421
const AAIsDead *FnLivenessAA,
1420
1422
bool &UsedAssumedInformation,
1421
1423
bool CheckBBLivenessOnly, DepClassTy DepClass) {
1424
+ if (!Configuration.UseLiveness )
1425
+ return false ;
1422
1426
Instruction *UserI = dyn_cast<Instruction>(U.getUser ());
1423
1427
if (!UserI)
1424
1428
return isAssumedDead (IRPosition::value (*U.get ()), QueryingAA, FnLivenessAA,
@@ -1467,6 +1471,8 @@ bool Attributor::isAssumedDead(const Instruction &I,
1467
1471
bool &UsedAssumedInformation,
1468
1472
bool CheckBBLivenessOnly, DepClassTy DepClass,
1469
1473
bool CheckForDeadStore) {
1474
+ if (!Configuration.UseLiveness )
1475
+ return false ;
1470
1476
const IRPosition::CallBaseContext *CBCtx =
1471
1477
QueryingAA ? QueryingAA->getCallBaseContext () : nullptr ;
1472
1478
@@ -1527,6 +1533,8 @@ bool Attributor::isAssumedDead(const IRPosition &IRP,
1527
1533
const AAIsDead *FnLivenessAA,
1528
1534
bool &UsedAssumedInformation,
1529
1535
bool CheckBBLivenessOnly, DepClassTy DepClass) {
1536
+ if (!Configuration.UseLiveness )
1537
+ return false ;
1530
1538
// Don't check liveness for constants, e.g. functions, used as (floating)
1531
1539
// values since the context instruction and such is here meaningless.
1532
1540
if (IRP.getPositionKind () == IRPosition::IRP_FLOAT &&
@@ -1572,6 +1580,8 @@ bool Attributor::isAssumedDead(const BasicBlock &BB,
1572
1580
const AbstractAttribute *QueryingAA,
1573
1581
const AAIsDead *FnLivenessAA,
1574
1582
DepClassTy DepClass) {
1583
+ if (!Configuration.UseLiveness )
1584
+ return false ;
1575
1585
const Function &F = *BB.getParent ();
1576
1586
if (!FnLivenessAA || FnLivenessAA->getAnchorScope () != &F)
1577
1587
FnLivenessAA = getOrCreateAAFor<AAIsDead>(IRPosition::function (F),
0 commit comments