[llvm-dev] Target DAG-combine vs. Target custom lowering

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 13 12:47:17 PDT 2016


On 10/13/2016 1:56 PM, Servius Womack via llvm-dev wrote:
> Hi,
>
> I am new to LLVM. I read the the Codegen documentation, and browsed thru
> the code of some of the backends. One thing i didn't understand was when
> should a transformation happen in the TargetLowering::PerformDAGCombine
> and not in the custom lowering phase.

Lowering is really "legalization", so rewriting some construct in a form 
that is legal on your target. This only happens once. Combining is 
mostly an optimization, and it happens several times, including before 
and after legalization.

-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