[llvm-dev] Accessing SSA chains in LLVM

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 2 10:09:58 PST 2019


On 1/2/2019 11:20 PM, Akshay Gupta via llvm-dev wrote:
> As the mem2reg pass doesn't convert LLVM-IR to complete SSA. Different 
> basic blocks may have same variable name on assignment. How can we 
> access the SSA chains in LLV??

If you mean value names, then they are meaningless. Each value 
represents its definition, some values have operands. For operands, the 
pointer immediately gives you the definition, for definitions there is 
use_iterator that will traverse all of its uses.

Also, mem2reg doesn't "convert to SSA". LLVM IR is always in SSA.

-Krzysztof

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


More information about the llvm-dev mailing list