<div dir="ltr"><div><div><div>We'd like to be able to vary the latency of our load instructions based on what address space is being loaded from. I was thinking I could do this by overriding getOperandLatency in our target, but I'm wondering if the addrspace info is available when instructions are scheduled?<br><br></div>For example, I have this in our llvm IR:<br><br>  %0 = load i32 addrspace(4)* @answer, align 4<br>  store i32 %0, i32* @xint, align 4<br>  %1 = load i32 addrspace(2)* @seven, align 4<br>  store i32 %1, i32* %bint, align 4<br>  %2 = load i32 addrspace(3)* @two, align 4<br>  store i32 %2, i32* %cint, align 4<br><br></div>Loading from addrspace(4) or addrspace(3) should have a much higher latency than loading from addrspace(2) or addrspace(1).  But is that information available to the instruction scheduler in our overridden getOperandLatency method?<br><br></div>Phil<br><div><div><br></div></div></div>