[PATCH] D40228: [Target] Keep the TargetOptions feature list sorted instead of sorting during CodeGen

2017-11-20 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. No strong opinion. I think I like that one more though. https://reviews.llvm.org/D40228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40228: [Target] Keep the TargetOptions feature list sorted instead of sorting during CodeGen

2017-11-20 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Yeah don't like it either, but was surprised to find that CodeGen even had a non-const reference to TargetOptions. Would it be better to make a copy and sort the copy during CodeGen? https://reviews.llvm.org/D40228

[PATCH] D40228: [Target] Keep the TargetOptions feature list sorted instead of sorting during CodeGen

2017-11-20 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. This seems strictly more difficult to keep under control? Though I guess the assert helps. Feel free to go ahead, but... https://reviews.llvm.org/D40228

[PATCH] D40228: [Target] Keep the TargetOptions feature list sorted instead of sorting during CodeGen

2017-11-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. Herald added a subscriber: nhaehnle. Currently CodeGen is calling std::sort on the features vector in TargetOptions for every function, but I don't think CodeGen should be modifying TargetOptions. This moves the sorting up to the creation/modification of