OpenVDB: openvdb_ax/codegen/LegacyIR.h File Reference

OpenVDB 12.1.0

Loading...
Searching...
No Matches
LegacyIR.h File Reference

Legacy IR utilities for LLVM_VERSION_MAJOR <= 15. More...

`#include <llvm/Config/llvm-config.h>`
`#include "Types.h"`
`#include "Utils.h"`
`#include <openvdb/version.h>`
`#include <openvdb/util/Assert.h>`
`#include <llvm/IR/IRBuilder.h>`

Go to the source code of this file.

## Namespaces
namespace | openvdb
namespace | openvdb::v12_1
namespace | openvdb::v12_1::ax
namespace | openvdb::v12_1::ax::codegen

## Functions
auto | ir_load (llvm::IRBuilder<> &B, llvm::Value *ptr, const char *Name="")
auto | ir_gep (llvm::IRBuilder<> &B, llvm::Value *ptr, llvm::ArrayRef< llvm::Value * > IdxList, const char *Name="")
auto | ir_constgep2_64 (llvm::IRBuilder<> &B, llvm::Value *ptr, uint64_t Idx0, uint64_t Idx1, const char *Name="")
auto | ir_constinboundsgep2_64 (llvm::IRBuilder<> &B, llvm::Value *ptr, uint64_t Idx0, uint64_t Idx1, const char *Name="")
llvm::Type * | getBaseContainedType (llvm::Type *const type)
| Return the base llvm value which is being pointed to through any number of layered pointers.
llvm::Value * | arrayCast (llvm::Value *ptrToArray, llvm::Type *targetElementType, llvm::IRBuilder<> &builder)
| Casts an array to another array of equal size but of a different element type. Both source and target array element types must be scalar types. The source array llvm Value should be a pointer to the array to cast.
llvm::Value * | arrayIndexUnpack (llvm::Value *ptrToArray, const int16_t index, llvm::IRBuilder<> &builder)
| Unpack a particular element of an array and return a pointer to that element The provided llvm Value is expected to be a pointer to an array.
void | arrayUnpack (llvm::Value *ptrToArray, std::vector< llvm::Value * > &values, llvm::IRBuilder<> &builder, const bool loadElements=false)
| Unpack an array type into llvm Values which represent all its elements The provided llvm Value is expected to be a pointer to an array If loadElements is true, values will store loaded llvm values instead of pointers to the array elements.
void | array3Unpack (llvm::Value *ptrToArray, llvm::Value *&value1, llvm::Value *&value2, llvm::Value *&value3, llvm::IRBuilder<> &builder)
| Unpack the first three elements of an array. The provided llvm Value is expected to be a pointer to an array.
llvm::Value * | array3Pack (llvm::Value *value1, llvm::Value *value2, llvm::Value *value3, llvm::IRBuilder<> &builder)
| Pack three values into a new array and return a pointer to the newly allocated array. If the values are of a mismatching type, the highets order type is uses, as defined by typePrecedence. All llvm values are expected to a be a loaded scalar type.
llvm::Value * | arrayPack (llvm::Value *value, llvm::IRBuilder<> &builder, const size_t size=3)
| Pack a loaded llvm scalar value into a new array of a specified size and return a pointer to the newly allocated array. Each element of the new array will have the value of the given scalar.
llvm::Value * | arrayPack (const std::vector< llvm::Value * > &values, llvm::IRBuilder<> &builder)
| Pack a vector of loaded llvm scalar values into a new array of equal size and return a pointer to the newly allocated array.
llvm::Value * | arrayPackCast (std::vector< llvm::Value * > &values, llvm::IRBuilder<> &builder)
| Pack a vector of loaded llvm scalar values into a new array of equal size and return a pointer to the newly allocated array. arrayPackCast first checks all the contained types in values and casts all types to the highest order type present. All llvm values in values are expected to be loaded scalar types.
llvm::Value * | scalarToMatrix (llvm::Value *scalar, llvm::IRBuilder<> &builder, const size_t dim=3)

## Detailed Description

Legacy IR utilities for LLVM_VERSION_MAJOR <= 15.

Authors
  Nick Avramoussis