summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
diff options
context:
space:
mode:
authorNicolas Vasilache <ntv@google.com>2019-08-19 10:21:15 -0700
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-08-19 10:21:40 -0700
commit9bf69e6a2e9d1ef60ac9e4efa8fda9b6c3560e63 (patch)
tree447bea3897341fe71df28bc8b08f84320d57a452 /mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
parentc9f37fca379035b6334b50380ef05b00026de0cc (diff)
downloadbcm5719-llvm-9bf69e6a2e9d1ef60ac9e4efa8fda9b6c3560e63.tar.gz
bcm5719-llvm-9bf69e6a2e9d1ef60ac9e4efa8fda9b6c3560e63.zip
Refactor linalg lowering to LLVM
The linalg.view type used to be lowered to a struct containing a data pointer, offset, sizes/strides information. This was problematic when passing to external functions due to ABI, struct padding and alignment issues. The linalg.view type is now lowered to LLVMIR as a *pointer* to a struct containing the data pointer, offset and sizes/strides. This simplifies the interfacing with external library functions and makes it trivial to add new functions without creating a shim that would go from a value type struct to a pointer type. The consequences are that: 1. lowering explicitly uses llvm.alloca in lieu of llvm.undef and performs the proper llvm.load/llvm.store where relevant. 2. the shim creation function `getLLVMLibraryCallDefinition` disappears. 3. views are passed by pointer, scalars are passed by value. In the future, other structs will be passed by pointer (on a per-need basis). PiperOrigin-RevId: 264183671
Diffstat (limited to 'mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud