summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-01-23 13:11:23 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 15:32:49 -0700
commit1210e92d86c8408846b92b897614b2da94d3b5fd (patch)
treef1d0940eb5f913b5266dafb2d2e380a46f1b8a2b /mlir/lib/Transforms
parent565445085300c549e63c1ef254c35f0dae5d23f4 (diff)
downloadbcm5719-llvm-1210e92d86c8408846b92b897614b2da94d3b5fd.tar.gz
bcm5719-llvm-1210e92d86c8408846b92b897614b2da94d3b5fd.zip
Add asmparser/printer support for locations to make them round-trippable. Location printing is currently behind a command line flag "mlir-print-debuginfo", we can rethink this when we have a pass for stripping debug info or when we have support for printer flags.
Example inline notation: trailing-location ::= 'loc' '(' location ')' // FileLineCol Location. %1 = "foo"() : () -> i1 loc("mysource.cc":10:8) // Name Location return loc("foo") // CallSite Location return loc(callsite("foo" at "mysource.cc":19:9)) // Fused Location /// Without metadata func @inline_notation() loc(fused["foo", "mysource.cc":10:8]) /// With metadata return loc(fused<"myPass">["foo", "foo2"]) // Unknown location. return loc(unknown) Locations are currently only printed with inline notation at the line of each instruction. Further work is needed to allow for reference notation, e.g: ... return loc 1 } ... loc 1 = "source.cc":10:1 PiperOrigin-RevId: 230587621
Diffstat (limited to 'mlir/lib/Transforms')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud