Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
what is best in optimizer pipeline
value numbering
code motion
peepholing
loop idiom recognition
legalization
thread gassing
op banning
View Results
 
  • Locked thread
eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

i love the way that this triggers certain people

"the C code I wrote in 1992 ran as I expected then and is therefore correct and should always run as it did!"

I'll admit to a slight amount of this myself: I do expect things like *foo = 12; to work even if foo is NULL because IMO dereferncing NULL shouldn't be undefined in C as it can be important in certain use cases (embedded & OS work on some architectures), but I'm OK with that being an extension that has to be enabled

Adbot
ADBOT LOVES YOU

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Raluek posted:

restore from tape, probably

tfw u boot from tape

(actually booted and installed an Apollo from "tape" in MAME, 'twas interesting though not as interesting as actually using the system)

(also never actually used the QIC drive on my LispM)

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

rjmccall posted:

the way better alternative is to say that basic blocks can have parameters and gotos can have arguments, which ends up looking kindof like a functional program with a lot of explicit tail calls:

code:

  if %whatever goto trueBlock else goto falseBlock
trueBlock:
  %fooResult = call @foo()
  goto contBlock(%fooResult)
falseBlock:
  %barResult = call @bar()
  goto contBlock(%barResult)
contBlock(%mergedValue):
  call @baz(%mergedValue)

this looks like a transformation, is there a semantic difference I'm not seeing or is it really just a means of making phi nodes implicit so they're easier to reason about?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Cocoa Crispies posted:

write one to disabuse yourself of that notion

start by reading An Incremental Approach to Compiler Construction and the more complete tutorial Compilers: Backend to Frontend and Back to Front Again

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
is it PowerPC Mach-O, which is gratuitously different than the ABI defined as part of the architecture itself?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
is it the classic Mac, where calls to OS & Toolbox functions had to be emit as individual instructions in the 0xA000 range, some passing parameters and receiving return values via specific registers, and where every 32KB of code had to be in its own segment due to the use of PC-relative addressing for everything (to accommodate manual loading and unloading of segments on low-memory systems)?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
every so often I think it might be fun to write a toy Pascal compiler that targets LLVM

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
like basically follow Wirth’s classic Compiler Construction but tweak it for classic Pascal and wire it up to LLVM

Adbot
ADBOT LOVES YOU

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Volmarias posted:

I would like to write a toy compiler (or even just an interpreter for a toy language) but not want to have to read 10,000 pages first. Where should I realistically start?

that Nicklaus Wirth “Compiler Construction” book, seriously

in print it’s a trade paperback under 1cm thick and is all built around exercises

  • Locked thread