Integrate LLVM at llvm/llvm-project@d1978fa4bf
Updates LLVM usage to match [d1978fa4bf0d](https://github.com/llvm/llvm-project/commit/d1978fa4bf0d) PiperOrigin-RevId: 355848094
This commit is contained in:
parent
99bc05f2e4
commit
1c4521cc42
|
@ -15,9 +15,9 @@
|
||||||
|
|
||||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||||
|
|
||||||
LLVM_COMMIT = "91e7a17133324ac4beaf6ed45c170436c2d91c98"
|
LLVM_COMMIT = "d1978fa4bf0d7da0b3cd88879e9411467edcb01f"
|
||||||
|
|
||||||
LLVM_SHA256 = "07ef834c47337dc7b38c765693a3b5a1835aac2f716fd9a06c374a71722c20de"
|
LLVM_SHA256 = "7cf83492b954d713f727bbafb00aa93e412281cc6e0cab90a38a3c00ca63cc4a"
|
||||||
|
|
||||||
LLVM_BAZEL_TAG = "llvm-project-{commit}".format(commit = LLVM_COMMIT)
|
LLVM_BAZEL_TAG = "llvm-project-{commit}".format(commit = LLVM_COMMIT)
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
91e7a17133324ac4beaf6ed45c170436c2d91c98
|
d1978fa4bf0d7da0b3cd88879e9411467edcb01f
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ struct LegalizeGatherToTorchIndexSelectPass
|
||||||
void runOnFunction() override {
|
void runOnFunction() override {
|
||||||
OwningRewritePatternList patterns;
|
OwningRewritePatternList patterns;
|
||||||
PopulateGatherToTorchIndexSelectPatterns(&getContext(), &patterns);
|
PopulateGatherToTorchIndexSelectPatterns(&getContext(), &patterns);
|
||||||
applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
(void)applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -201,7 +201,7 @@ void PopulateMhloToStdPatterns(OwningRewritePatternList *patterns,
|
||||||
void LegalizeToStandardPass::runOnFunction() {
|
void LegalizeToStandardPass::runOnFunction() {
|
||||||
OwningRewritePatternList patterns;
|
OwningRewritePatternList patterns;
|
||||||
mlir::mhlo::PopulateMhloToStdPatterns(&patterns, &getContext());
|
mlir::mhlo::PopulateMhloToStdPatterns(&patterns, &getContext());
|
||||||
applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
(void)applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end namespace mhlo
|
} // end namespace mhlo
|
||||||
|
|
|
@ -259,7 +259,7 @@ struct LegalizeTrigonometricToApproximationPass
|
||||||
void runOnFunction() override {
|
void runOnFunction() override {
|
||||||
OwningRewritePatternList patterns;
|
OwningRewritePatternList patterns;
|
||||||
PopulateTrigonometricToApproximationPatterns(&getContext(), &patterns);
|
PopulateTrigonometricToApproximationPatterns(&getContext(), &patterns);
|
||||||
applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
(void)applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ class LhloFuseLinalgPass
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
auto patterns = linalg::getLinalgTilingCanonicalizationPatterns(ctx);
|
auto patterns = linalg::getLinalgTilingCanonicalizationPatterns(ctx);
|
||||||
applyPatternsAndFoldGreedily(func, std::move(patterns));
|
(void)applyPatternsAndFoldGreedily(func, std::move(patterns));
|
||||||
|
|
||||||
// Fuse producers of tiled linalg ops.
|
// Fuse producers of tiled linalg ops.
|
||||||
llvm::SmallDenseSet<Operation*> erase_set;
|
llvm::SmallDenseSet<Operation*> erase_set;
|
||||||
|
@ -185,7 +185,7 @@ class LhloFuseLinalgPass
|
||||||
}
|
}
|
||||||
|
|
||||||
auto patterns = linalg::getLinalgTilingCanonicalizationPatterns(ctx);
|
auto patterns = linalg::getLinalgTilingCanonicalizationPatterns(ctx);
|
||||||
applyPatternsAndFoldGreedily(func, std::move(patterns));
|
(void)applyPatternsAndFoldGreedily(func, std::move(patterns));
|
||||||
}
|
}
|
||||||
for (auto* e : erase_set) e->erase();
|
for (auto* e : erase_set) e->erase();
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,7 @@ struct LhloLegalizeToAffinePass
|
||||||
OwningRewritePatternList patterns;
|
OwningRewritePatternList patterns;
|
||||||
auto func = getFunction();
|
auto func = getFunction();
|
||||||
populateLHLOToAffineConversionPattern(func.getContext(), &patterns);
|
populateLHLOToAffineConversionPattern(func.getContext(), &patterns);
|
||||||
applyPatternsAndFoldGreedily(func, std::move(patterns));
|
(void)applyPatternsAndFoldGreedily(func, std::move(patterns));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ void LowerComplexPass::runOnFunction() {
|
||||||
OwningRewritePatternList patterns;
|
OwningRewritePatternList patterns;
|
||||||
mlir::mhlo::PopulateComplexLoweringPatterns(&getContext(), &patterns);
|
mlir::mhlo::PopulateComplexLoweringPatterns(&getContext(), &patterns);
|
||||||
|
|
||||||
applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
(void)applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<FunctionPass> mlir::mhlo::createLowerComplexPass() {
|
std::unique_ptr<FunctionPass> mlir::mhlo::createLowerComplexPass() {
|
||||||
|
|
|
@ -182,7 +182,7 @@ struct LegalizeGeneralDotPass
|
||||||
void runOnFunction() override {
|
void runOnFunction() override {
|
||||||
OwningRewritePatternList patterns;
|
OwningRewritePatternList patterns;
|
||||||
mlir::mhlo::PopulateGeneralDotOpLoweringPatterns(&patterns, &getContext());
|
mlir::mhlo::PopulateGeneralDotOpLoweringPatterns(&patterns, &getContext());
|
||||||
applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
(void)applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ void OptimizeMhloPass::runOnFunction() {
|
||||||
mlir::OwningRewritePatternList patterns;
|
mlir::OwningRewritePatternList patterns;
|
||||||
mlir::mhlo::PopulateOptimizeMHLOPatterns(&getContext(), &patterns);
|
mlir::mhlo::PopulateOptimizeMHLOPatterns(&getContext(), &patterns);
|
||||||
|
|
||||||
applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
(void)applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<mlir::FunctionPass> mlir::mhlo::createOptimizeMhloPass() {
|
std::unique_ptr<mlir::FunctionPass> mlir::mhlo::createOptimizeMhloPass() {
|
||||||
|
|
|
@ -87,7 +87,7 @@ struct TestInferShapedTypeMethodsPass
|
||||||
OwningRewritePatternList patterns;
|
OwningRewritePatternList patterns;
|
||||||
patterns.insert<ReifyReturnTypeShapesPattern>(&getContext());
|
patterns.insert<ReifyReturnTypeShapesPattern>(&getContext());
|
||||||
patterns.insert<InferReturnTypeComponentsPattern>(&getContext());
|
patterns.insert<InferReturnTypeComponentsPattern>(&getContext());
|
||||||
applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
(void)applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ struct TestUnfuseBatchNormPass
|
||||||
void runOnOperation() override {
|
void runOnOperation() override {
|
||||||
OwningRewritePatternList patterns;
|
OwningRewritePatternList patterns;
|
||||||
PopulateUnfuseBatchNormPatterns(&getContext(), &patterns);
|
PopulateUnfuseBatchNormPatterns(&getContext(), &patterns);
|
||||||
applyPatternsAndFoldGreedily(getOperation(), std::move(patterns));
|
(void)applyPatternsAndFoldGreedily(getOperation(), std::move(patterns));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue