[feat] Provided second constructor for LocalArrayNode
*/
package uk.ac.manchester.tornado.drivers.opencl.graal.nodes;
+import jdk.vm.ci.meta.JavaKind;
import org.graalvm.compiler.core.common.LIRKind;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.core.common.type.TypeReference;
@@ -65,6 +66,13 @@ public class LocalArrayNode extends FixedNode implements LIRLowerable, MarkLocal
this.arrayTemplate = OCLKind.resolveTemplateType(elementType);
}
+ public LocalArrayNode(OCLArchitecture.OCLMemoryBase memoryRegister, JavaKind kind, ConstantNode length) {
+ super(TYPE, StampFactory.forKind(kind));
+ this.memoryRegister = memoryRegister;
+ this.length = length;
+ this.arrayTemplate = OCLKind.resolveTemplateType(kind);
+ }
+
public OCLArchitecture.OCLMemoryBase getMemoryRegister() {
return memoryRegister;
}
