Skip to content

Commit 322cf39

Browse files
committed
[BACKEND] Update LLVM to llvm/llvm-project@b5cc222d7429fe6f1
Upgrading LLVM repo, because we need a feature that has been recently submitted in llvm/llvm-project#d741435d7 Changes made: - changed the signature of `visit` method in `ConstantAnalysis` - i.e., accepts an instance of the `ProgramPoint`. - updated calls to `getLatticeElementFor` -i.e., accepts an instance of the `ProgramPoint`. - added the required last parameter to `LLVM::DISubprogramAttr::get` - i.e., an empty `annotations`.
1 parent 8fb7342 commit 322cf39

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

cmake/llvm-hash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
61f8a7f618901797ee8663389a29722f29216a96
1+
b5cc222d7429fe6f18c787f633d5262fac2e676f

lib/Analysis/AxisInfo.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,8 +1084,9 @@ LogicalResult AxisInfoAnalysis::visitOperation(
10841084

10851085
void AxisInfoAnalysis::visitForOpInductionVar(
10861086
scf::ForOp op, ArrayRef<dataflow::Lattice<AxisInfo> *> argLattices) {
1087-
auto lb = getLatticeElementFor(op, op.getLowerBound())->getValue();
1088-
auto step = getLatticeElementFor(op, op.getStep())->getValue();
1087+
ProgramPoint programPoint(op);
1088+
auto lb = getLatticeElementFor(&programPoint, op.getLowerBound())->getValue();
1089+
auto step = getLatticeElementFor(&programPoint, op.getStep())->getValue();
10891090

10901091
AxisInfo::DimVectorT knownContiguity(1, 1);
10911092
AxisInfo::DimVectorT knownDivisibility(1, 1);

lib/Analysis/Utility.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -896,15 +896,16 @@ class ConstantAnalysis : public DataFlowAnalysis {
896896

897897
LogicalResult initialize(Operation *top) override {
898898
WalkResult result = top->walk([&](Operation *op) {
899-
if (failed(visit(op)))
899+
ProgramPoint programPoint(op);
900+
if (failed(visit(&programPoint)))
900901
return WalkResult::interrupt();
901902
return WalkResult::advance();
902903
});
903904
return success(!result.wasInterrupted());
904905
}
905906

906-
LogicalResult visit(ProgramPoint point) override {
907-
Operation *op = point.get<Operation *>();
907+
LogicalResult visit(ProgramPoint *point) override {
908+
Operation *op = point->getOperation();
908909
Attribute value;
909910
if (matchPattern(op, m_Constant(&value))) {
910911
auto *constant = getOrCreate<dataflow::Lattice<dataflow::ConstantValue>>(

lib/Target/LLVMIR/LLVMDIScope.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ struct LLVMDIScopePass : public LLVMDIScopeBase<LLVMDIScopePass> {
104104
auto subprogramAttr = LLVM::DISubprogramAttr::get(
105105
context, distinctId, compileUnitAttr, fileAttr, funcNameAttr,
106106
funcNameAttr, fileAttr, /*line=*/line, /*scopeline=*/line,
107-
subprogramFlags, subroutineTypeAttr, /*retainNodes=*/{});
107+
subprogramFlags, subroutineTypeAttr, /*retainNodes=*/{},
108+
/*annotations=*/{});
108109
funcOp->setLoc(FusedLoc::get(context, {loc}, subprogramAttr));
109110
}
110111

0 commit comments

Comments
 (0)