+ option to enable it
Info about transformation: https://reviews.llvm.org/D45736
Differential D49809
[InstCombine] Unlocked IO transformation - off by default xbolva00 on Jul 25 2018, 11:17 AM. Authored by
Details
Diff Detail
Event TimelineComment Actions Sadly, i'm not seeing much answers to the questions @vsk raised
Comment Actions I sent it under r332452 but anyway.. Typical case is void log(data) { file = fopen(....) for (...) fwrite(data ..) ... maybe some more logging ... close(file); } // cond: file does not escape Here we replace e.g. fwrite (in this example) (which needs to lock and unlock internal lock to be thread safe) with fwrite_unlocked which does not do expensive lock/unlock.
-> off by default + option to enable. Maybe interceptors can be extended in the future to handle this transformation/function calls? Any ideas for option name? Is this one ok? |