forked from OSchip/llvm-project
Refactor the includes of Function.h now that the dependency on Operation has been removed. The dependency was on the op casting methods, which have now moved out of Operation, used by the walker.
-- PiperOrigin-RevId: 247944666
This commit is contained in:
parent
3d62ef8018
commit
6a6cb40f23
|
@ -19,6 +19,7 @@
|
|||
#define MLIR_ANALYSIS_MLFUNCTIONMATCHER_H_
|
||||
|
||||
#include "mlir/IR/Function.h"
|
||||
#include "mlir/IR/Operation.h"
|
||||
#include "llvm/Support/Allocator.h"
|
||||
|
||||
namespace mlir {
|
||||
|
|
|
@ -22,7 +22,10 @@
|
|||
#ifndef MLIR_IR_FUNCTION_H
|
||||
#define MLIR_IR_FUNCTION_H
|
||||
|
||||
#include "mlir/IR/Operation.h"
|
||||
#include "mlir/IR/Attributes.h"
|
||||
#include "mlir/IR/Block.h"
|
||||
#include "mlir/IR/Identifier.h"
|
||||
#include "mlir/IR/Location.h"
|
||||
|
||||
namespace mlir {
|
||||
class BlockAndValueMapping;
|
||||
|
@ -245,15 +248,18 @@ public:
|
|||
|
||||
/// Emit an error about fatal conditions with this function, reporting up to
|
||||
/// any diagnostic handlers that may be listening.
|
||||
InFlightDiagnostic emitError(const Twine &message = {});
|
||||
InFlightDiagnostic emitError();
|
||||
InFlightDiagnostic emitError(const Twine &message);
|
||||
|
||||
/// Emit a warning about this function, reporting up to any diagnostic
|
||||
/// handlers that may be listening.
|
||||
InFlightDiagnostic emitWarning(const Twine &message = {});
|
||||
InFlightDiagnostic emitWarning();
|
||||
InFlightDiagnostic emitWarning(const Twine &message);
|
||||
|
||||
/// Emit a remark about this function, reporting up to any diagnostic
|
||||
/// handlers that may be listening.
|
||||
InFlightDiagnostic emitRemark(const Twine &message = {});
|
||||
InFlightDiagnostic emitRemark();
|
||||
InFlightDiagnostic emitRemark(const Twine &message);
|
||||
|
||||
/// Displays the CFG in a window. This is for use from the debugger and
|
||||
/// depends on Graphviz to generate the graph.
|
||||
|
@ -362,4 +368,4 @@ private:
|
|||
};
|
||||
} // end namespace llvm
|
||||
|
||||
#endif // MLIR_IR_FUNCTION_H
|
||||
#endif // MLIR_IR_FUNCTION_H
|
||||
|
|
|
@ -18,10 +18,12 @@
|
|||
#include "mlir/IR/Attributes.h"
|
||||
#include "AttributeDetail.h"
|
||||
#include "mlir/IR/AffineMap.h"
|
||||
#include "mlir/IR/Diagnostics.h"
|
||||
#include "mlir/IR/Dialect.h"
|
||||
#include "mlir/IR/Function.h"
|
||||
#include "mlir/IR/IntegerSet.h"
|
||||
#include "mlir/IR/Types.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
|
||||
using namespace mlir;
|
||||
using namespace mlir::detail;
|
||||
|
|
|
@ -16,15 +16,14 @@
|
|||
// =============================================================================
|
||||
|
||||
#include "mlir/IR/Function.h"
|
||||
#include "mlir/IR/Attributes.h"
|
||||
#include "mlir/IR/BlockAndValueMapping.h"
|
||||
#include "mlir/IR/Diagnostics.h"
|
||||
#include "mlir/IR/MLIRContext.h"
|
||||
#include "mlir/IR/Module.h"
|
||||
#include "mlir/IR/Types.h"
|
||||
#include "llvm/ADT/MapVector.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
|
||||
using namespace mlir;
|
||||
|
||||
Function::Function(Location location, StringRef name, FunctionType type,
|
||||
|
@ -118,18 +117,21 @@ void Function::erase() {
|
|||
/// any diagnostic handlers that may be listening. This function always
|
||||
/// returns failure. NOTE: This may terminate the containing application, only
|
||||
/// use when the IR is in an inconsistent state.
|
||||
InFlightDiagnostic Function::emitError() { return emitError({}); }
|
||||
InFlightDiagnostic Function::emitError(const Twine &message) {
|
||||
return getContext()->emitError(getLoc(), message);
|
||||
}
|
||||
|
||||
/// Emit a warning about this function, reporting up to any diagnostic
|
||||
/// handlers that may be listening.
|
||||
InFlightDiagnostic Function::emitWarning() { return emitWarning({}); }
|
||||
InFlightDiagnostic Function::emitWarning(const Twine &message) {
|
||||
return getContext()->emitWarning(getLoc(), message);
|
||||
}
|
||||
|
||||
/// Emit a remark about this function, reporting up to any diagnostic
|
||||
/// handlers that may be listening.
|
||||
InFlightDiagnostic Function::emitRemark() { return emitRemark({}); }
|
||||
InFlightDiagnostic Function::emitRemark(const Twine &message) {
|
||||
return getContext()->emitRemark(getLoc(), message);
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "llvm/ADT/DenseSet.h"
|
||||
#include "llvm/ADT/SetVector.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/Support/Allocator.h"
|
||||
#include "llvm/Support/RWMutex.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
|
Loading…
Reference in New Issue