Skip to content

Commit

Permalink
[BACKEND] Update LLVM to llvm/llvm-project@1d40fefb08e9b114687677
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
ravil-mobile committed Oct 16, 2024
1 parent 8fb7342 commit 7794dd3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmake/llvm-hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
61f8a7f618901797ee8663389a29722f29216a96
1d40fefb08e9b11b72bf40274aa7839ae9f7fe07
5 changes: 3 additions & 2 deletions lib/Analysis/AxisInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1084,8 +1084,9 @@ LogicalResult AxisInfoAnalysis::visitOperation(

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

AxisInfo::DimVectorT knownContiguity(1, 1);
AxisInfo::DimVectorT knownDivisibility(1, 1);
Expand Down
7 changes: 4 additions & 3 deletions lib/Analysis/Utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,15 +896,16 @@ class ConstantAnalysis : public DataFlowAnalysis {

LogicalResult initialize(Operation *top) override {
WalkResult result = top->walk([&](Operation *op) {
if (failed(visit(op)))
ProgramPoint programPoint(op);
if (failed(visit(&programPoint)))
return WalkResult::interrupt();
return WalkResult::advance();
});
return success(!result.wasInterrupted());
}

LogicalResult visit(ProgramPoint point) override {
Operation *op = point.get<Operation *>();
LogicalResult visit(ProgramPoint *point) override {
Operation *op = point->getOperation();
Attribute value;
if (matchPattern(op, m_Constant(&value))) {
auto *constant = getOrCreate<dataflow::Lattice<dataflow::ConstantValue>>(
Expand Down
3 changes: 2 additions & 1 deletion lib/Target/LLVMIR/LLVMDIScope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ struct LLVMDIScopePass : public LLVMDIScopeBase<LLVMDIScopePass> {
auto subprogramAttr = LLVM::DISubprogramAttr::get(
context, distinctId, compileUnitAttr, fileAttr, funcNameAttr,
funcNameAttr, fileAttr, /*line=*/line, /*scopeline=*/line,
subprogramFlags, subroutineTypeAttr, /*retainNodes=*/{});
subprogramFlags, subroutineTypeAttr, /*retainNodes=*/{},
/*annotations=*/{});
funcOp->setLoc(FusedLoc::get(context, {loc}, subprogramAttr));
}

Expand Down

0 comments on commit 7794dd3

Please sign in to comment.