[LLVMdev] What if there is no Legalized pass?

Tzu-Chien Chiu tzuchien.chiu at gmail.com
Wed May 11 02:48:28 PDT 2005


I cannot understand what does the paragraph mean. Could anyone please
elaborate it?

http://llvm.cs.uiuc.edu/ChrisLLVM/docs/CodeGenerator.html#selectiondag_legalize

"Instead of using a Legalize pass, we could require that every
target-specific selector supports and expands every operator and type
even if they are not supported and may require many instructions to
implement (in fact, this is the approach taken by the "simple"
selectors). However, using a Legalize pass allows all of the
cannonicalization patterns to be shared across targets which makes it
very easy to optimize the cannonicalized code because it is still in
the form of a DAG."

* what is "the cannonicalization pattern"? sum of product?
* "makes it very easy to optimize the cannonicalized code"? does it
refer to "the pre-legalize optimization" ?

-- 
Tzu-Chien Chiu,
Computer Graphics Guy,
<URL:http://www.csie.nctu.edu.tw/~jwchiu>




More information about the llvm-dev mailing list