Open nickdesaulniers opened 4 years ago
also, I recently used llvm-extract
to pull a function out of a huge piece of IR. It would be helpful to document that.
also:
object->print(llvm::errs());
is way better than
#include <string>
std::string out;
llvm::raw_string_ostream RSO(out);
object->print(RSO);
llvm::outs() << out.str();
opt -print-module-scope
for llc:
llc -stop-after=branch-folder -debug-only=branch-folder -print-before=branch-folder -print-after=branch-folder
also @gwelymernans mentioned opt -debug-pass=Arguments
.
how to manually invoke tablegen? how to print passes clang is running? dump() method cvise clean up recommendation of llvm-reduce print-before-all stop-after where to ask for more help
-o -: print to stdout rather than write output to file
-mllvm -debug-pass=Structure
-fno-discard-value-names
is handy when debugging LLVM to keep variable names in the IR rather than numbered identifiers.