[llvm-dev] In ISel, where Constant<0> comes from?

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Mon Dec 17 06:40:33 PST 2018


On 12/17/2018 8:08 AM, Gleb Popov via llvm-dev wrote:
> 
> However, I don't see that Constant node when compiling using X86 
> backend. How does it achieve this? And why initial DAGs are different at 
> all? I got impression that initial DAG is fully target-independent, so 
> these DAG should be the same before starting ISel. Am I wrong?

The selection DAG is very much target-specific. The differences in the 
initial DAG usually come from lowering function arguments and return 
values, and from lowering calls to other functions. This is where 
different calling conventions are applied, so the initial DAG may be 
different even for the same target if you change the calling convention.

Later on more differences appear from legalization (which each target 
needs to customize to match its needs), and custom DAG combines. All of 
this happens before the actual selection process starts.

-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