summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/LoopCoalescing.cpp
diff options
context:
space:
mode:
authorMahesh Ravishankar <ravishankarm@google.com>2019-08-17 10:19:48 -0700
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-08-17 10:20:13 -0700
commitd745101339f3e56f202311a0243d1ba7ef04f56a (patch)
tree300dbddf775a9f1a366f5c544298f4651b55906a /mlir/lib/Transforms/LoopCoalescing.cpp
parentc268666f15ee5ad36ed39b0a38ec5bf9d58216d4 (diff)
downloadbcm5719-llvm-d745101339f3e56f202311a0243d1ba7ef04f56a.tar.gz
bcm5719-llvm-d745101339f3e56f202311a0243d1ba7ef04f56a.zip
Add spirv::GlobalVariableOp that allows module level definition of variables
FuncOps in MLIR use explicit capture. So global variables defined in module scope need to have a symbol name and this should be used to refer to the variable within the function. This deviates from SPIR-V spec, which assigns an SSA value to variables at all scopes that can be used to refer to the variable, which requires SPIR-V functions to allow implicit capture. To handle this add a new op, spirv::GlobalVariableOp that can be used to define module scope variables. Since instructions need an SSA value, an new spirv::AddressOfOp is added to convert a symbol reference to an SSA value for use with other instructions. This also means the spirv::EntryPointOp instruction needs to change to allow initializers to be specified using symbol reference instead of SSA value The current spirv::VariableOp which returns an SSA value (as defined by SPIR-V spec) can still be used to define function-scope variables. PiperOrigin-RevId: 263951109
Diffstat (limited to 'mlir/lib/Transforms/LoopCoalescing.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud