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 patch makes a copy before sorting.
Differential D40228
[Target] Make a copy of TargetOptions feature list before sorting during CodeGen craig.topper on Nov 19 2017, 1:05 PM. Authored by
Details
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 patch makes a copy before sorting.
Diff Detail
Event TimelineComment Actions This seems strictly more difficult to keep under control? Though I guess the assert helps. Feel free to go ahead, but... Comment Actions 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? |