|
LLVM 24.0.0git
|
Reinterprets the bits of a value as another type of the same size, for example float 1.0 as i32 0x3f800000, a null pointer as i64 0, or <2 x i32> as double. More...
#include "llvm/Transforms/Vectorize/SandboxVectorizer/Passes/LoadStoreVec.h"
Static Public Member Functions | |
| static LLVM_ABI bool | canReinterpret (Type *SrcTy, Type *DestTy, const DataLayout &DL) |
| static LLVM_ABI Value * | reinterpretValue (Value *V, Type *DestTy, BasicBlock::iterator WhereIt, Context &Ctx, const DataLayout &DL) |
Reinterprets V as DestTy, which must have the same size in DL, inserting casts before WhereIt. | |
| static LLVM_ABI Constant * | reinterpretConstant (Constant *C, Type *DestTy, const DataLayout &DL) |
Reinterprets constant C as DestTy, e.g., float 1.0 to i32 0x3f800000, or a null pointer to i64 0. | |
Reinterprets the bits of a value as another type of the same size, for example float 1.0 as i32 0x3f800000, a null pointer as i64 0, or <2 x i32> as double.
Used by createConstantVector() to pack constants, and by vectorizeLoads() to unpack each load from the vector load.
Definition at line 43 of file LoadStoreVec.h.
|
static |
SrcTy can be reinterpreted as DestTy. False when either type is a non-integral pointer, which has no stable integer representation. Definition at line 89 of file LoadStoreVec.cpp.
References DL, and llvm::sandboxir::isNonIntegralPtr().
Referenced by reinterpretConstant(), and reinterpretValue().
|
static |
Reinterprets constant C as DestTy, e.g., float 1.0 to i32 0x3f800000, or a null pointer to i64 0.
Definition at line 143 of file LoadStoreVec.cpp.
References C(), canReinterpret(), DL, llvm::sandboxir::ConstantExpr::getBitCast(), llvm::sandboxir::ConstantExpr::getIntToPtr(), llvm::sandboxir::ConstantExpr::getPtrToInt(), llvm_unreachable, and Opc.
|
static |
Reinterprets V as DestTy, which must have the same size in DL, inserting casts before WhereIt.
Casts of constants fold, so nothing is inserted for those.
Definition at line 131 of file LoadStoreVec.cpp.
References canReinterpret(), llvm::sandboxir::CastInst::create(), DL, Opc, and V.