edw@ius2.cs.cmu.edu (Eddie Wyatt) (04/12/87)
I haven't seen any other postings about compiler control lines to control optimization. Something like : #sacred :-) a = (b + c) + f; #endsacred Seriously I think this has been the best proposal yet. It has no affect on existing code and seems to allow the most flexiblity over what parts of the code may be optimized. I like the fact that the C compiler optimizes my code to a degree for me. I don't have to rewrite expressions like xbar = x - 0.0 to xbar = x and angle = (PI/180.0)*x/2.0 to angle = (PI/360.0)*x. Why would I write code like this in the first place. Take a look at a previous posting I made with a set of macros that I do use. I am not totally insensitive to the complaints the numerically analysis people are giving. I do think that the unitary '+' is an awlful hack to the problem. In turn though, I do not think the number crunching community has been listening to the complaints of us speed oriented programmers. The types of applications that I am dealing with are autonomous vehicles where every millisecond counts. -- Eddie Wyatt They say there are strangers, who threaten us In our immigrants and infidels They say there is strangeness, too dangerous In our theatres and bookstore shelves Those who know what's best for us- Must rise and save us from ourselves Quick to judge ... Quick to anger ... Slow to understand... Ignorance and prejudice and fear [all] Walk hand in hand. - RUSH
hen@bu-cs.UUCP (04/17/87)
Many people who object to the use of unary plus to preserve order are advocating some sort of compiler directive such as #immune2optimization ... { code which you think you did real good } ... #ok2optimize I don't understand what this is supposed to mean - is the code only exempt from explicit reordering, but a candidate for common subexpression elimination? Can the optimizer do code hoisting? Constant rippling into the immune section? Constant rippling out of the immune section? Or os the directive supposed to take arguments, so the code looks like #immune2optimization reordering,rippling,hoisting,jamming,unscrolling ... { code which you think you did real good } ... #ok2optimize If the latter is what people have in mind, can these things be nested? Thanks, folks, but I think I prefer unary plus. I may or may not think it makes my listing look ugly, but at least I can understand how any when to use it. Bill Henneman Gnurd in Residence
jtr485@umich.UUCP (Johnathan Tainter) (04/19/87)
In article <1100@ius2.cs.cmu.edu>, edw@ius2.cs.cmu.edu.UUCP writes: > > I haven't seen any other postings about compiler control lines to > control optimization. Something like : > > #sacred :-) > a = (b + c) + f; > #endsacred I think under Draft Standard #pragma sacrosanct a = (b + c) #pragma ~sacrosanct is intended. My objection to this is that it overloads the preprocessor semantics for something inherently later in the process. Not too serious a problem but I think it could have been avoided. Just introducing pragma as a reserved word and using pragma sacrosanct; a = (b + c) pragma ~sacrosanct; appeals to me. > Eddie Wyatt --j.a.tainter