[PATCH] Allow BB duplication threshold to be adjusted through JumpThreading's ctor

Sanjay Patel spatel at rotateright.com
Mon Sep 22 14:45:41 PDT 2014


================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:50
@@ -49,3 +49,3 @@
           cl::desc("Max block size to duplicate for jump threading"),
           cl::init(6), cl::Hidden);
 
----------------
I have no opinion about the functionality of this patch, but how about giving a name to that magic '6'...like:
   static unsigned BBDuplicateThresholdDefault = 6;

Then you can use that constant as the default parameter assignment, and you don't have to introduce yet another magic number (-1) and cast signed to unsigned.

http://reviews.llvm.org/D5444






More information about the llvm-commits mailing list