Integrate LLVM at llvm/llvm-project@e1669843f2
Updates LLVM usage to match [e1669843f2aa](https://github.com/llvm/llvm-project/commit/e1669843f2aa) PiperOrigin-RevId: 331987679
This commit is contained in:
		
							parent
							
								
									1800f44a29
								
							
						
					
					
						commit
						1880f87737
					
				|  | @ -1,2 +1,2 @@ | |||
| 7841e21c98495ba5e33e0d2507d985bd5b938445 | ||||
| e1669843f2aaf1e4929afdd8f125c14536d27664 | ||||
| 
 | ||||
|  |  | |||
|  | @ -44,9 +44,15 @@ class HloClientDialect : public Dialect { | |||
|   static StringRef getDialectNamespace() { return "chlo"; } | ||||
| }; | ||||
| 
 | ||||
| }  // namespace chlo
 | ||||
| }  // namespace mlir
 | ||||
| 
 | ||||
| #define GET_OP_CLASSES | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h.inc" | ||||
| 
 | ||||
| namespace mlir { | ||||
| namespace chlo { | ||||
| 
 | ||||
| template <typename T> | ||||
| static Value getConstantLike(OpBuilder& b, Location loc, T constant, | ||||
|                              Value val) { | ||||
|  |  | |||
|  | @ -37,7 +37,7 @@ include "mlir-hlo/Dialect/mhlo/IR/infer_fusibility_op_interface.td" | |||
| 
 | ||||
| def HLOClient_Dialect : Dialect { | ||||
|   let name = "chlo"; | ||||
|   let cppNamespace = "chlo"; | ||||
|   let cppNamespace = "::mlir::chlo"; | ||||
|   let summary = [{ | ||||
|     Client HLO Ops | ||||
|   }]; | ||||
|  |  | |||
|  | @ -19,7 +19,6 @@ limitations under the License. | |||
| #define TENSORFLOW_COMPILER_MLIR_HLO_INCLUDE_MLIR_HLO_DIALECT_MHLO_IR_HLO_OPS_H_ | ||||
| 
 | ||||
| #include "llvm/ADT/StringRef.h" | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/infer_fusibility_op_interface.h" | ||||
| #include "mlir/IR/Attributes.h" | ||||
| #include "mlir/IR/Dialect.h" | ||||
| #include "mlir/IR/DialectImplementation.h" | ||||
|  | @ -32,11 +31,14 @@ limitations under the License. | |||
| #include "mlir/Interfaces/InferTypeOpInterface.h" | ||||
| #include "mlir/Interfaces/SideEffectInterfaces.h" | ||||
| 
 | ||||
| // clang-format off
 | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops_structs.h.inc" | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/infer_fusibility_op_interface.h" | ||||
| // clang-format on
 | ||||
| 
 | ||||
| namespace mlir { | ||||
| class OpBuilder; | ||||
| 
 | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops_structs.h.inc" | ||||
| 
 | ||||
| namespace mhlo { | ||||
| 
 | ||||
| class MhloDialect : public Dialect { | ||||
|  | @ -77,10 +79,10 @@ LogicalResult deriveShapeFromFirstOperand( | |||
|     OpBuilder *builder, Operation *op, | ||||
|     SmallVectorImpl<Value> *reifiedReturnShapes); | ||||
| 
 | ||||
| #define GET_OP_CLASSES | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h.inc" | ||||
| 
 | ||||
| }  // end namespace mhlo
 | ||||
| }  // end namespace mlir
 | ||||
| 
 | ||||
| #define GET_OP_CLASSES | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h.inc" | ||||
| 
 | ||||
| #endif  //  TENSORFLOW_COMPILER_MLIR_HLO_INCLUDE_MLIR_HLO_DIALECT_MHLO_IR_HLO_OPS_H_
 | ||||
|  |  | |||
|  | @ -27,7 +27,7 @@ include "mlir-hlo/Dialect/mhlo/IR/infer_fusibility_op_interface.td" | |||
| 
 | ||||
| def HLO_Dialect : Dialect { | ||||
|   let name = "mhlo"; | ||||
|   let cppNamespace = "mhlo"; | ||||
|   let cppNamespace = "::mlir::mhlo"; | ||||
| } | ||||
| 
 | ||||
| class HLO_Op<string mnemonic, list<OpTrait> traits> : | ||||
|  |  | |||
|  | @ -33,9 +33,11 @@ limitations under the License. | |||
| 
 | ||||
| namespace mlir { | ||||
| class OpBuilder; | ||||
| }  // namespace mlir
 | ||||
| 
 | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops_structs.h.inc" | ||||
| 
 | ||||
| namespace mlir { | ||||
| namespace lmhlo { | ||||
| 
 | ||||
| class LmhloDialect : public Dialect { | ||||
|  | @ -44,10 +46,10 @@ class LmhloDialect : public Dialect { | |||
|   static StringRef getDialectNamespace() { return "lmhlo"; } | ||||
| }; | ||||
| 
 | ||||
| #define GET_OP_CLASSES | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.h.inc" | ||||
| 
 | ||||
| }  // namespace lmhlo
 | ||||
| }  // end namespace mlir
 | ||||
| 
 | ||||
| #define GET_OP_CLASSES | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.h.inc" | ||||
| 
 | ||||
| #endif  // TENSORFLOW_COMPILER_MLIR_HLO_INCLUDE_MLIR_HLO_DIALECT_MHLO_IR_LHLO_OPS_H_
 | ||||
|  |  | |||
|  | @ -41,7 +41,7 @@ include "mlir-hlo/Dialect/mhlo/IR/hlo_ops_base.td" | |||
| 
 | ||||
| def LHLO_Dialect : Dialect { | ||||
|   let name = "lmhlo"; | ||||
|   let cppNamespace = "lmhlo"; | ||||
|   let cppNamespace = "::mlir::lmhlo"; | ||||
| } | ||||
| 
 | ||||
| //===----------------------------------------------------------------------===// | ||||
|  |  | |||
|  | @ -303,9 +303,15 @@ void ConstantLikeOp::getCanonicalizationPatterns( | |||
|   results.insert<ConstantLikeToConstant>(context); | ||||
| } | ||||
| 
 | ||||
| }  // namespace chlo
 | ||||
| }  // namespace mlir
 | ||||
| 
 | ||||
| #define GET_OP_CLASSES | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.cc.inc" | ||||
| 
 | ||||
| namespace mlir { | ||||
| namespace chlo { | ||||
| 
 | ||||
| //===----------------------------------------------------------------------===//
 | ||||
| // chlo Dialect Constructor
 | ||||
| //===----------------------------------------------------------------------===//
 | ||||
|  |  | |||
|  | @ -60,7 +60,11 @@ limitations under the License. | |||
| 
 | ||||
| namespace mlir { | ||||
| #include "hlo_patterns.cc.inc" | ||||
| }  // namespace mlir
 | ||||
| 
 | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops_structs.cc.inc" | ||||
| 
 | ||||
| namespace mlir { | ||||
| namespace mhlo { | ||||
| 
 | ||||
| Operation* MhloDialect::materializeConstant(OpBuilder& builder, Attribute value, | ||||
|  | @ -2469,9 +2473,15 @@ void CompareOp::build(OpBuilder& builder, OperationState& result, Value lhs, | |||
|   build(builder, result, new_type, lhs, rhs, comparison_direction); | ||||
| } | ||||
| 
 | ||||
| }  // namespace mhlo
 | ||||
| }  // namespace mlir
 | ||||
| 
 | ||||
| #define GET_OP_CLASSES | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.cc.inc" | ||||
| 
 | ||||
| namespace mlir { | ||||
| namespace mhlo { | ||||
| 
 | ||||
| //===----------------------------------------------------------------------===//
 | ||||
| // mhlo Dialect Interfaces
 | ||||
| //===----------------------------------------------------------------------===//
 | ||||
|  |  | |||
|  | @ -29,6 +29,7 @@ limitations under the License. | |||
| #include "llvm/ADT/StringRef.h" | ||||
| #include "llvm/Support/FormatVariadic.h" | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.h.inc" | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops_structs.cc.inc" | ||||
| #include "mlir/Dialect/StandardOps/IR/Ops.h" | ||||
| #include "mlir/IR/Attributes.h" | ||||
| #include "mlir/IR/Builders.h" | ||||
|  | @ -46,7 +47,6 @@ limitations under the License. | |||
| #include "mlir/IR/Value.h" | ||||
| 
 | ||||
| namespace mlir { | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops_structs.cc.inc" | ||||
| namespace lmhlo { | ||||
| 
 | ||||
| LmhloDialect::LmhloDialect(MLIRContext *context) | ||||
|  | @ -159,9 +159,15 @@ static LogicalResult Verify(ReshapeMemRefCastOp op) { | |||
|   return success(); | ||||
| } | ||||
| 
 | ||||
| }  // namespace lmhlo
 | ||||
| }  // namespace mlir
 | ||||
| 
 | ||||
| #define GET_OP_CLASSES | ||||
| #include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.cc.inc" | ||||
| 
 | ||||
| namespace mlir { | ||||
| namespace lmhlo { | ||||
| 
 | ||||
| // TODO(cheshire): Support folding, reuse code from hlo_ops.cc.
 | ||||
| 
 | ||||
| void FusionOp::build(OpBuilder &builder, OperationState &result, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue