Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1621

Re: Maximal Munch instruction selection: how to connect tiles?

From Hans-Peter Diettrich <DrDiettrich1@netscape.net>
Newsgroups comp.compilers
Subject Re: Maximal Munch instruction selection: how to connect tiles?
Date 2015-09-29 17:16 +0200
Organization Compilers Central
Message-ID <15-09-026@comp.compilers> (permalink)
References <15-09-024@comp.compilers>

Show all headers | View raw


CC)sar schrieb:
> Given the expression a = b + c; my compiler currently produces the
> following IR-tree:
>
>     =
>   /     \
> a       + (_t1)
>        /    \
>      b      c
>  ...

> I am trying to use the maximal munch strategy to produce assembly code
> for this tree but I'm stuck with the following questions: ...

You can consider many more cases, like the x86 addressing modes with
base, index and scaling, which can be used for some arithmetic
expressions in general.

In case the '+' operator stores the result in memory, a '+=' opcode (add
to memory) could be used in above expression. All that can end up in
multiple possible different instruction sequences, which have to be
"weighted" for the final selection of the "best" sequence. The sequences
then can map to different tree structures, which are created from the
AST. That means that modifications should be applied to copies of the
AST, and it's unpredictable how big the different trees for more complex
expressions will become.

DoDi

Back to comp.compilers | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Maximal Munch instruction selection: how to connect tiles? César <divcesar@gmail.com> - 2015-09-28 15:56 -0300
  Re: Maximal Munch instruction selection: how to connect tiles? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2015-09-29 17:16 +0200

csiph-web