summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/Location.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Adjust License.txt file to use the LLVM licenseMehdi Amini2019-12-231-13/+4
| | | | PiperOrigin-RevId: 286906740
* Add OpaqueLoc to MLIR locations.MLIR Team2019-10-071-0/+21
| | | | | | | | | See RFC: https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/xE2IzfhE3Wg. Opaque location stores two pointers, one of them points to some data structure that is external to MLIR, and the other one is unique for each type and represents type id of that data structure. OpaqueLoc also stores an optional location that can be used if the first one is not suitable. OpaqueLoc is managed similar to FileLineColLoc. It is passed around by MLIR transformations and can be used in compound locations like CallSiteLoc. PiperOrigin-RevId: 273266510
* NFC: Remove unnecessary context parameters from several Location getters.River Riddle2019-08-261-12/+11
| | | | | | The context can be recovered by other means in these methods and doesn't need to be passed explicitly. PiperOrigin-RevId: 265532956
* NFC: Uniformize the return of the LocationAttr 'get' methods to 'Location'.River Riddle2019-06-251-12/+12
| | | | PiperOrigin-RevId: 255078768
* Refactor the location classes to be attributes instead of separate IR classes.River Riddle2019-06-221-49/+72
| | | | | | This will allow for locations to be used in the same contexts as attributes. Given that attributes are nullable types, the 'Location' class now represents a non-nullable wrapper around a 'LocationAttr'. This preserves the desired semantics we have for non-optional locations. PiperOrigin-RevId: 254505278
* Replace usages of 'UniquedFilename' with 'Identifier' and remove it. ↵River Riddle2019-06-191-1/+7
| | | | | | Identifier already contains all of the necessary functionality/verification, so having a separate class for filenames is unnecessary. PiperOrigin-RevId: 253855505
* Refactor NameLoc so that it also holds a child location. This removes ↵River Riddle2019-05-201-0/+10
| | | | | | | | the awkward use of CallSiteLoc as a variable usage location. -- PiperOrigin-RevId: 248014642
* NFC: Cleanup the definitions of the Location classes.River Riddle2019-05-201-6/+29
| | | | | | -- PiperOrigin-RevId: 247979132
* Support NameLoc and CallSiteLoc for mlir::LocationFeng Liu2019-03-291-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NameLoc can be used to represent a variable, node or method. The CallSiteLoc has two fields, one represents the concrete location and another one represents the caller's location. Multiple CallSiteLocs can be chained as a call stack. For example, the following call stack ``` AAA at file1:1 at file2:135 at file3:34 ``` can be formed by call0: ``` auto name = NameLoc::get("AAA"); auto file1 = FileLineColLoc::get("file1", 1); auto file2 = FileLineColLoc::get("file2", 135); auto file3 = FileLineColLoc::get("file3", 34); auto call2 = CallSiteLoc::get(file2, file3); auto call1 = CallSiteLoc::get(file1, call2); auto call0 = CallSiteLoc::get(name, call1); ``` PiperOrigin-RevId: 226941797
* - Add support for fused locations.River Riddle2019-03-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | These are locations that form a collection of other source locations with an optional metadata attribute. - Add initial support for print/dump for locations. Location Printing Examples: * Unknown : [unknown-location] * FileLineColLoc : third_party/llvm/llvm/projects/google-mlir/test/TensorFlowLite/legalize.mlir:6:8 * FusedLoc : <"tfl-legalize">[third_party/llvm/llvm/projects/google-mlir/test/TensorFlowLite/legalize.mlir:6:8, third_party/llvm/llvm/projects/google-mlir/test/TensorFlowLite/legalize.mlir:7:8] - Add diagnostic support for fused locs. * Prints the first location as the main location and the remaining as "fused from here" notes: e.g. third_party/llvm/llvm/projects/google-mlir/test/TensorFlowLite/legalize.mlir:6:8: error: This is an error. %1 = "tf.add"(%arg0, %0) : (i32, i32) -> i32 ^ third_party/llvm/llvm/projects/google-mlir/test/TensorFlowLite/legalize.mlir:7:8: error: Fused from here. %2 = "tf.relu"(%1) : (i32) -> i32 ^ PiperOrigin-RevId: 220835552
* Implement value type abstraction for locations.River Riddle2019-03-291-0/+38
Value type abstraction for locations differ from others in that a Location can NOT be null. NOTE: dyn_cast returns an Optional<T>. PiperOrigin-RevId: 220682078
OpenPOWER on IntegriCloud