[PATCH] [AtomicExpand] Set branch weights when new basic blocks are created
Philip Reames
listmail at philipreames.com
Wed Feb 25 09:42:05 PST 2015
First, please update with full context. I need to see the surrounding code to interpret a few of your changes.
I'm a bit concerned about the general approach. Without profiling data, unconditionally predicting no contention seems questionable. Can you quantify the performance impact here for both the contented and uncontended case?
================
Comment at: lib/CodeGen/AtomicExpandPass.cpp:388
@@ +387,3 @@
+ unsigned ExitWeight =
+ BranchProbabilityInfo::getBranchWeightAtomicExpand(true);
+ unsigned LoopWeight =
----------------
Please extract a helper function for this shared code
http://reviews.llvm.org/D7804
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list