use of com.oracle.svm.core.graal.llvm.util.LLVMUtils.LLVMConstant in project graal by oracle.
the class LLVMGenerator method emitConstant.
/* Constants */
@Override
public Value emitConstant(LIRKind kind, Constant constant) {
boolean uncompressedObject = isUncompressedObjectKind(kind);
LLVMTypeRef actualType = uncompressedObject ? builder.objectType(true) : ((LLVMKind) kind.getPlatformKind()).get();
LLVMValueRef value = emitLLVMConstant(actualType, (JavaConstant) constant);
Value val = new LLVMConstant(value, constant);
return uncompressedObject ? emitUncompress(val, ReferenceAccess.singleton().getCompressEncoding(), false) : val;
}
Aggregations