uwsampa / accept

an approximate compiler
http://accept.rocks
MIT License
37 stars 14 forks source link

Run ACCEPT passes in isolation rather than with -O1 #22

Open sampsyo opened 10 years ago

sampsyo commented 10 years ago

Running the ACCEPT passes currently requires invoking opt or whatever with the -O1 optimization level, which wastes time since we don't need all those other optimizations at this point. It should instead be possible to run ACCEPT optimizations in isolation.

However, we can't do this now since it seems to be impossible to cleanly require an analysis pass from a FunctionPass. That is, using addRequired<>() from the getAnalysisUsage method in a FunctionPass leads to an assertion failure along the lines of "Unable to schedule…". As far as I can tell this is by design. It may be solved in later LLVM versions, which have recently undergone a complete refactor of the pass manager system. Or we could move to ModulePasses.