I've been trying to get my head around the rationale behind the option groups 
in Options.td. This is how it seems to work currently:

  - Some groups provide HelpText which gets printed by the -help option

  - Some groups provide functionality, i.e. they're actually referenced by 
code. For example, the driver will determine its action by looking at the last 
option in Action_Group, decide the opt level by last option in O_Group, etc.

  - Some groups provide functionality by being part of another group. For 
example, f_Group doesn't provide any functionality in itself, but it's part of 
CompileOnly_Group which is referenced by code. This means we could 
s/f_Group/CompileOnly_Group/ without any functionality change.

  - Some groups might have a documentary function. For example, 
m_hexagon_features_Group doesn't actually do anything, but it tells the reader 
of Optionts.td that options such as -mieee-rnd-near are Hexagon related.

  This still leaves us with groups with unclear value. For example, the only 
purpose of m_Group seems to be to contain all options that start with 'm'. Or 
most of them; e.g. -maltivec isn't part of m_Group, and others might be missing 
too - we wouldn't notice since the group doesn't have any real function.

  Should we kill the groups that don't have any function or clear documentary 
purpose (the f_Group and m_Group are the big examples here)?

  I've uploaded a patch that removes the ones that seem to be obviously useless.

http://llvm-reviews.chandlerc.com/D1227
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to