This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: porting gcc for a VLIW architecture
zysheu wrote:
> It is controll by the gcc at the latest pass . Do I need to define pattern
> to capture all the possible RTL code ?
No. You only need enough RTL codes such that the rest can be
synthesized from the operations you have defined.
> Do these patterns include standard name pattern and empty name pattern ?
Yes.
> Are expand patterns and split patterns needed to define asm output ?
No.
Gcc converts trees/gimple to RTL in the middle end. This is done by
calling patterns in the md file. Only named define_insn and
define_expand patterns can be called at this time, so this is the only
RTL that can be generated by the middle-end. After RTL is generated,
all insns must match a define_insn in the md file.
The optimizer uses define_insns to optimize the RTL. If we create new
RTL during optimization, we do a pattern match to make sure that the new
insn matches a define_insn in the md file. So you can have additional
unnamed/named patterns which are used for optimization.
Every define_insn has an assembly language template. When emitting
assembly during the final pass, for each insn, we find the define_insn
it matches and emit the assembly template.
define_split is also used by optimization, except it takes one or more
RTL insns as input and emits one or more RTL insns as output.
You can do a port without using any define_split or define_expand
patterns. This just allow better optimization and better initial RTL
generation.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com