[LLVMdev] Loads not hoisted out of the loop

Krzysztof Parzyszek kparzysz at codeaurora.org
Fri Jan 18 09:22:26 PST 2013

On 1/18/2013 11:11 AM, Dimitri Tcaciuc wrote:
> Right, I see. Is there any other way to solve this? As the last resort,
> I was considering silently transforming each Array argument into
> separate data and metadata arguments, but that would certainly add other
> complications I'd rather avoid.

Depends on what information you have available.  If all you have is the 
LLVM IR, then the only universal solution that I can think of is 
interprocedural analysis, where you would track the pointer values, and 
potentially determine that they never point to overlapping memory areas.

> I was also think ing a hypothetical LLVM-based Fortran compiler would be
> the model to aim for, where they have dimension-aware arrays that never
> alias (AFAIK?). I wonder how one would solve that problem there.

I think the proper way would be to use metadata after all, and have some 
alias analysis that could understand it.


Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation

More information about the llvm-dev mailing list