summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorChris Lattner <clattner@google.com>2018-12-28 08:48:09 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 14:43:13 -0700
commit69d9e990facf4d07c31b96e47e98cde07228f229 (patch)
treecf76ee03ebef0e449412063a04fd773dcf9c5115 /mlir/lib/IR/Function.cpp
parentf845bc4542719878d9d21d94eef96fb05a254913 (diff)
downloadbcm5719-llvm-69d9e990facf4d07c31b96e47e98cde07228f229.tar.gz
bcm5719-llvm-69d9e990facf4d07c31b96e47e98cde07228f229.zip
Eliminate the using decls for MLFunction and CFGFunction standardizing on
Function. This is step 18/n towards merging instructions and statements, NFC. PiperOrigin-RevId: 227139399
Diffstat (limited to 'mlir/lib/IR/Function.cpp')
-rw-r--r--mlir/lib/IR/Function.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/mlir/lib/IR/Function.cpp b/mlir/lib/IR/Function.cpp
index 19b137071f4..0e777c65f23 100644
--- a/mlir/lib/IR/Function.cpp
+++ b/mlir/lib/IR/Function.cpp
@@ -32,11 +32,11 @@ Function::Function(Kind kind, Location location, StringRef name,
location(location), type(type), blocks(this) {
this->attrs = AttributeListStorage::get(attrs, getContext());
- // Creating of an MLFunction automatically populates the entry block and
+ // Creating of a Function automatically populates the entry block and
// arguments.
// TODO(clattner): Unify this behavior.
if (kind == Kind::MLFunc) {
- // The body of an MLFunction always has one block.
+ // The body of an ML Function always has one block.
auto *entry = new StmtBlock();
blocks.push_back(entry);
@@ -158,18 +158,18 @@ bool Function::emitError(const Twine &message) const {
}
//===----------------------------------------------------------------------===//
-// MLFunction implementation.
+// Function implementation.
//===----------------------------------------------------------------------===//
-const OperationInst *MLFunction::getReturnStmt() const {
+const OperationInst *Function::getReturnStmt() const {
return cast<OperationInst>(&getBody()->back());
}
-OperationInst *MLFunction::getReturnStmt() {
+OperationInst *Function::getReturnStmt() {
return cast<OperationInst>(&getBody()->back());
}
-void MLFunction::walk(std::function<void(OperationInst *)> callback) {
+void Function::walk(std::function<void(OperationInst *)> callback) {
struct Walker : public StmtWalker<Walker> {
std::function<void(OperationInst *)> const &callback;
Walker(std::function<void(OperationInst *)> const &callback)
@@ -182,7 +182,7 @@ void MLFunction::walk(std::function<void(OperationInst *)> callback) {
v.walk(this);
}
-void MLFunction::walkPostOrder(std::function<void(OperationInst *)> callback) {
+void Function::walkPostOrder(std::function<void(OperationInst *)> callback) {
struct Walker : public StmtWalker<Walker> {
std::function<void(OperationInst *)> const &callback;
Walker(std::function<void(OperationInst *)> const &callback)
OpenPOWER on IntegriCloud