This patch is being posted along with the following RFC:
[RFC] Adding function attributes to represent codegen optimization level
This patch is a WIP and not necessarily something that is ready for review. As such, please direct your comments to the RFC rather than here.
Chad
This doesn't make any sense. If it's a per-function attribute, we should be computing it per function. The maximum level set on any function doesn't have any useful meaning.