CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PCH optimizations ?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Kruse



Joined: 18 Jul 2007
Posts: 3

View user's profile Send private message

PCH optimizations ?
PostPosted: Wed Jul 18, 2007 6:27 pm     Reply with quote

Anyone know if the PCH does any optimizations that resembles 'procedural abstraction' ?

Does it use the extended mode opportunity in the most 18F controllers ?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 18, 2007 8:23 pm     Reply with quote

Are you asking about the extended instruction set ? It's not supported.
You must use the NOXINST fuse setting. If you use XINST, your
program will be behave in an unstable manner. It won't run correctly.
RickinPa
Guest







abstractions
PostPosted: Wed Jul 18, 2007 11:09 pm     Reply with quote

I have the CCS compiler set to 9 on optimizations and a bunch of nested if's with the same last line of code - something like - flag = 1; - they do not get optimized. There are a bunch of individual bsf commands in the listing. So I would say, if its doing procedural abstraction, its not too optimized.
Kruse



Joined: 18 Jul 2007
Posts: 3

View user's profile Send private message

PostPosted: Thu Jul 19, 2007 6:31 pm     Reply with quote

Thank you.

So it seems C18 is the only one that incorporate this very efficient optimization.
Ttelmah
Guest







PostPosted: Fri Jul 20, 2007 1:59 am     Reply with quote

Remember that the high optimisation for PCH, is opt 11, not 9. With this set, on some parts of the code, there does appear to be an attempt to perform bypassing of this sort. However it also appears to be very easy to 'defeat', not being very smart about working out what is common code...

Best Wishes
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Fri Jul 20, 2007 2:50 am     Reply with quote

Kruse wrote:
So it seems C18 is the only one that incorporate this very efficient optimization.
Optimization is always a difficult issue in compilers and this is where you will see the difference between the cheap and expensive compilers. I expect the HiTech compiler to have more advanced optimization algorithms as well.

The CCS compiler's ROM optimization doesn't perform all the known tricks but the RAM allocation and re-use is extremely efficient and better than in most other PIC compilers.

Ask yourself if you are willing to pay several hundreds to thousands of dollars extra for saving a few ROM bytes. Sometimes it is cheaper to buy the processor type with more memory.
Kruse



Joined: 18 Jul 2007
Posts: 3

View user's profile Send private message

PostPosted: Fri Jul 20, 2007 3:45 pm     Reply with quote

I allready have both C18 (Microchip) and PICC18-PRO (Hi-tech).
C18 does procedural optimiztions but PICC don't, additionally PICC is very erratic, quite picky and generates the most cryptic error messages I've seen.
.. and ofcourse the most expensive ($1300).
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group