Search in sources :

Example 1 with LLVMConstant

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;
}
Also used : Value(jdk.vm.ci.meta.Value) AllocatableValue(jdk.vm.ci.meta.AllocatableValue) RegisterValue(jdk.vm.ci.code.RegisterValue) LLVMValueRef(com.oracle.svm.shadowed.org.bytedeco.llvm.LLVM.LLVMValueRef) LLVMTypeRef(com.oracle.svm.shadowed.org.bytedeco.llvm.LLVM.LLVMTypeRef) LLVMConstant(com.oracle.svm.core.graal.llvm.util.LLVMUtils.LLVMConstant)

Aggregations

LLVMConstant (com.oracle.svm.core.graal.llvm.util.LLVMUtils.LLVMConstant)1 LLVMTypeRef (com.oracle.svm.shadowed.org.bytedeco.llvm.LLVM.LLVMTypeRef)1 LLVMValueRef (com.oracle.svm.shadowed.org.bytedeco.llvm.LLVM.LLVMValueRef)1 RegisterValue (jdk.vm.ci.code.RegisterValue)1 AllocatableValue (jdk.vm.ci.meta.AllocatableValue)1 Value (jdk.vm.ci.meta.Value)1