[PATCH] D39555: Introduce llvm-opt-fuzzer for fuzzing optimization passes
Justin Bogner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 7 15:50:16 PST 2017
bogner added a comment.
Repeating my comments from email, as it looks like they got missed.
================
Comment at: tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp:134-139
+ // Set up target dependant options
+ //
+
+ M->setTargetTriple(TM->getTargetTriple().normalize());
+ M->setDataLayout(TM->createDataLayout());
+ setFunctionAttributes(TM->getTargetCPU(), TM->getTargetFeatureString(), *M);
----------------
These don't change from input to input do they? We should probably set this up in the initialize function.
================
Comment at: tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp:141-160
+ // Create pass pipeline
+ //
+
+ PassBuilder PB(TM.get());
+
+ LoopAnalysisManager LAM;
+ FunctionAnalysisManager FAM;
----------------
Similarly here - we probably don't need to reconfigure the pass pipeline every time.
https://reviews.llvm.org/D39555
More information about the llvm-commits
mailing list