Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers LCC > Re: LCC Optimiz...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 6 Topic 964 of 1070
Post > Topic >>

Re: LCC Optimizations: Where is the IR to optimize?

by CBFalconer <cbfalconer@[EMAIL PROTECTED] > Aug 3, 2007 at 06:21 PM

Eyahlin wrote: ** and top-posted - fixed **
** He also snipped attribution for quoted material, not fixed **
>>
>> While the AST LCC IR is suitable for optimizations like algebraic
>> simplifications and CSE, it isn't generally very optimization
>> friendly. You are better off writing a tree walker and emit your 3-
>> address IR and write optimization p***** over them. In this case you
>> will obviously lose the retagetability lburg provides, but mapping 3-
>> address IR to DLX machine code should be fairly trivial. If you are
>> adventurous you can use lburg as your tree walker and experiment
>> writing an ir.md to emit your machine-independent 3-address IR into
>> memory(with a few hacks in emitcode() I think - sorry it was a long
>> time ago!). In this case, you still need to figure out how to create
>> BB and CFG - this will need modifications in reduce() - everytime you
>> hit a if-else or loop boundary etc you need to create new BB etc. You
>> can write your optimizations, coloring allocator, list scheduler etc
>> etc to work on this. All these are more hacks than clean solutions, so
>> I think writing a tree walker and a new optimizing back-end is the
>> best solution.
>>
>> Does gcc have an option to generate code for DLX? If so, you can write
>> a C generating back end for lcc - c.md and compile it using gcc. This
>> is only good if you need practice writing md files for lburg!
> 
> Thanks for your ideas!
> 
> I have learned essential lburg information. In fact, the MD
> specification for DLX is almost finished! Thanks! lburg is a great
> program.
> 
> Your suggestion on rewriting a new tree walker is very convincing.
> Indeed, that will take care of the tightly-coupled LCC interface, and
> may even introduce global optimizations. Also, restructuring the DAGs
> to 3-address that the optimizations require allow easy manipulation
> and reordering of the code.
> 
> However, my project is due in a few months. I think it's not feasible
> to rewrite essential phases of lcc over again, with the need to code
> advanced optimizations as well in such a short amount of time.
> 
> Maybe there's a faster, or easier way to do it? I've chosen LCC for my
> front end because it's retargetable, and sup****ts a back end for MIPS,
> which is very similar to DLX. Also, a "do***entation" in the form of a
> book already exists, so I could learn about the design choices of the
> authors without needing to second-guess their intentions. However,
> problems arose when I tried to include optimizations. This is why I've
> originally asked for a way to *tap* the code list and not cause
> problems for the next phases after optimization. It's the most viable
> alternative that I could see while planning out the schedule for my
> project. But if there are other suggestions, I'm open to them.

Please do not strip attributions (the "joe wrote:" initial lines)
for any material you quote.

Please do not top-post.  Your answer belongs after (or intermixed
with) the quoted material to which you reply, after snipping all
irrelevant material.  See the following links:

-- 
  <http://www.catb.org/~esr/faqs/smart-questions.html>
  <http://www.caliburn.nl/topposting.html>
  <http://www.netmeister.org/news/learn2quote.html>
  <http://cfaj.freeshell.org/google/>
 (taming google)
  <http://members.fortunecity.com/nnqweb/>
 (newusers)



-- 
Posted via a free Usenet account from http://www.teranews.com
 




 6 Posts in Topic:
LCC Optimizations: Where is the IR to optimize?
Eyahlin <amostrea@[EMA  2007-07-14 22:34:45 
Re: LCC Optimizations: Where is the IR to optimize?
jacob navia <jacob@[EM  2007-07-18 00:57:43 
Re: LCC Optimizations: Where is the IR to optimize?
Eyahlin <amostrea@[EMA  2007-07-21 14:13:45 
Re: LCC Optimizations: Where is the IR to optimize?
TSB <tejas.belagod@[EM  2007-07-23 16:06:56 
Re: LCC Optimizations: Where is the IR to optimize?
Eyahlin <amostrea@[EMA  2007-08-03 14:15:15 
Re: LCC Optimizations: Where is the IR to optimize?
CBFalconer <cbfalconer  2007-08-03 18:21:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 18:30:15 CDT 2008.