We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07c993e commit 54c1680Copy full SHA for 54c1680
compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -1751,6 +1751,17 @@ LLVMRustModuleCost(LLVMModuleRef M) {
1751
return std::distance(std::begin(f), std::end(f));
1752
}
1753
1754
+extern "C" uint64_t
1755
+LLVMRustModuleInstructionStats(LLVMModuleRef M) {
1756
+ auto f = unwrap(M)->functions();
1757
+ for (auto &func : f)
1758
+ {
1759
+ auto name = func.getName();
1760
+ auto count = func.getInstructionCount();
1761
+ }
1762
+ return unwrap(M)->getInstructionCount();
1763
+}
1764
+
1765
// Vector reductions:
1766
extern "C" LLVMValueRef
1767
LLVMRustBuildVectorReduceFAdd(LLVMBuilderRef B, LLVMValueRef Acc, LLVMValueRef Src) {
0 commit comments