Introduce a new Location abstraction to represent location data in a structured
(and more useful) way rather than hacking up a pile of attributes for it.  In
the future this will grow to represent inlined locations, fusion cases etc, but
for now we start with simple Unknown and File/Line/Col locations.  NFC.

PiperOrigin-RevId: 210485775
diff --git a/lib/IR/Instructions.cpp b/lib/IR/Instructions.cpp
index bd48783..90a5016 100644
--- a/lib/IR/Instructions.cpp
+++ b/lib/IR/Instructions.cpp
@@ -146,8 +146,8 @@
 // OperationInst
 //===----------------------------------------------------------------------===//
 
-/// Create a new OperationInst with the specific fields.
-OperationInst *OperationInst::create(Attribute *location, Identifier name,
+/// Create a new OperationInst with the specified fields.
+OperationInst *OperationInst::create(Location *location, Identifier name,
                                      ArrayRef<CFGValue *> operands,
                                      ArrayRef<Type *> resultTypes,
                                      ArrayRef<NamedAttribute> attributes,
@@ -186,7 +186,7 @@
                 getContext());
 }
 
-OperationInst::OperationInst(Attribute *location, Identifier name,
+OperationInst::OperationInst(Location *location, Identifier name,
                              unsigned numOperands, unsigned numResults,
                              ArrayRef<NamedAttribute> attributes,
                              MLIRContext *context)
@@ -281,7 +281,7 @@
 //===----------------------------------------------------------------------===//
 
 /// Create a new OperationInst with the specific fields.
-ReturnInst *ReturnInst::create(Attribute *location,
+ReturnInst *ReturnInst::create(Location *location,
                                ArrayRef<CFGValue *> operands) {
   auto byteSize = totalSizeToAlloc<InstOperand>(operands.size());
   void *rawMem = malloc(byteSize);
@@ -296,7 +296,7 @@
   return inst;
 }
 
-ReturnInst::ReturnInst(Attribute *location, unsigned numOperands)
+ReturnInst::ReturnInst(Location *location, unsigned numOperands)
     : TerminatorInst(Kind::Return, location), numOperands(numOperands) {}
 
 void ReturnInst::destroy() {
@@ -314,7 +314,7 @@
 // BranchInst
 //===----------------------------------------------------------------------===//
 
-BranchInst::BranchInst(Attribute *location, BasicBlock *dest,
+BranchInst::BranchInst(Location *location, BasicBlock *dest,
                        ArrayRef<CFGValue *> operands)
     : TerminatorInst(Kind::Branch, location), dest(this, dest) {
   addOperands(operands);
@@ -338,7 +338,7 @@
 // CondBranchInst
 //===----------------------------------------------------------------------===//
 
-CondBranchInst::CondBranchInst(Attribute *location, CFGValue *condition,
+CondBranchInst::CondBranchInst(Location *location, CFGValue *condition,
                                BasicBlock *trueDest, BasicBlock *falseDest)
     : TerminatorInst(Kind::CondBranch, location),
       condition(condition), dests{{this}, {this}}, numTrueOperands(0) {