[PATCH] bugpoint Enhancement.
JF Bastien
jfb at chromium.org
Fri Mar 27 14:43:33 PDT 2015
Could you also add tests for this in `test/BugPoint/`?
REPOSITORY
rL LLVM
================
Comment at: tools/bugpoint/CrashDebugger.cpp:49
@@ +48,3 @@
+ cl::opt<bool>
+ DontReducePassList("dont-reduce-pass-list",
+ cl::desc("Skip pass list reduction steps"),
----------------
`disable-pass-list-reduction` would be more idiomatic.
================
Comment at: tools/bugpoint/CrashDebugger.cpp:209
@@ +208,3 @@
+ if (!UsedVar || !UsedVar->hasInitializer()) return;
+ if (isa<ConstantAggregateZero>(UsedVar->getInitializer())) {
+ assert(UsedVar->use_empty());
----------------
Isn't this always false? At least `InstrProfiling.cpp` does `cast<ConstantArray>(LLVMUsed->getInitializer())` so one of these is wrong :-)
================
Comment at: tools/bugpoint/CrashDebugger.cpp:216
@@ +215,3 @@
+ std::vector<Constant*> Used;
+ for(auto OpIt : OldUsedVal->operand_values()) {
+ Constant *Op = cast<Constant>(OpIt->stripPointerCasts());
----------------
Using `Value *V` is clearer.
================
Comment at: tools/bugpoint/CrashDebugger.cpp:298
@@ +297,3 @@
+ RemoveFunctionReferences(M, "llvm.used");
+ RemoveFunctionReferences(M, "llvm.compiler.used");
+ }
----------------
Can you instead replace all uses of the function with `Undef` of that type before deleting the function?
http://reviews.llvm.org/D8555
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list