This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GSoC] Generating patterns from meta-description

    Thank-you for selecting me for GSoC 2014, I am looking forward to
working with GCC community. I am grateful to Richard Biener and Diego Novillo
for choosing to mentor me for this project. Unfortunately, I couldn't
reply last week because I am in the middle of university exams, I
apologize for that.

* Time Commitments:
I have university exams up-to 5th May, and couple of exams on 24th may
and 27th may. Thereafter I am completely free, and can commit up-to
50 hours per week on average.

* Few questions regarding genmatch:

a) Lexical analysis and Parsing:
I believe this is already in place. We would continue with
hand-written recursive descent parser.

b) Intermediate representations:
For representing "matching" operands
we will need to use a decision tree (I am not yet decided on how it would be
implemented). For "simplification" operands, we can use AST (struct operand).

For example:
  (negate (negate @0))

  (negate (bit_not @0))
  (minus @0 { integer_one_node; }))

There would be 2 AST's to represent @0 and (minus @0 { integer_one_node; } ).
And one decision tree representing matching operands for both expressions.
Something like:
negate        minus
@0             @0   { integer_one_node' }

c) Code generation:
Currently code-generation is done for gimple by walking the AST by
calling .gen_gimple_match and .gen_gimple_transform on each node.
Would it be a good idea to separate code gen interfaces
(.gen_gimple_match and .gen_gimple_transform) from AST ?
We would be having two IR's (decision-tree and AST) and two targets
(generic and gimple). Code-generation for pattern-matching shall be
performed by tree-walk
of decision tree and for transforms by tree-walk of AST.

d) Handling Commutative operators:
Should it be hard-coded in genmatch which operators are commutative ?
Internally the pattern would be duplicated with operands reversed.

e) Finalizing syntax:
For example: plus vs PLUS vs PLUS_EXPR, currently all of them are accepted.
(I would prefer lowercase version). Similarly free-form if vs
lisp-style (if ...) etc.

* Upto 19th may:
I plan to do the following upto 19th May:
a) Separate code-gen interfaces from AST and add simple fixes to genmatch.
b) Study forwprop patterns.
c) Try to solve missed optimization bugs.
If there's something else I would need to do, I would be happy to hear
about that.

Let me thank-you once again for selecting me for GSoC, and
I hope I would be able to complete the project successfully within given time.

Thanks and Regards,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]