[PATCH] [SimplifyCFG] Be more aggressive

hfinkel at anl.gov hfinkel at anl.gov
Thu Feb 12 06:22:35 PST 2015


When I run this change on my POWER7 box, I see no improvements and one major regression:

MultiSource/Benchmarks/Olden/power/power
	23.3258% +/- 9.53904%

I'll attempt to figure out what is going on here.

Generally speaking, I'd like to discuss a bit more, from a modeling perspective, what makes this a good idea? And, should we be using the same threshold for both FoldTwoEntryPHINode and SpeculativelyExecuteBB? We have costs for the instructions, do we need a cost for the branch? Do we need to consider whether or not we're speculating multiple instructions that are dependent on each other vs. independent?


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:57
@@ -56,1 +56,3 @@
+// Chosen as 2 so as to be cheap, but still to have enough power to fold
+// a select, so the "clamp" idiom (of a min followed by a max) will be caught.
 static cl::opt<unsigned>
----------------
jmolloy wrote:
> hfinkel wrote:
> > Do you mean two selects?
> No; the heuristic has to be enough that it will hoist *one* select, to then remove the branch and in the end cause two selects.
Okay, please explain that in the comment (there is no need to be terse).

http://reviews.llvm.org/D7507

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list