[PATCH] D84980: [Attributor] Add time trace support.
Kuter Dinel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 30 17:18:53 PDT 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG49def10e02e3: [Attributor] Add time trace support. (authored by kuter).
Changed prior to commit:
https://reviews.llvm.org/D84980?vs=282033&id=282083#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84980/new/
https://reviews.llvm.org/D84980
Files:
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/Attributor.cpp
Index: llvm/lib/Transforms/IPO/Attributor.cpp
===================================================================
--- llvm/lib/Transforms/IPO/Attributor.cpp
+++ llvm/lib/Transforms/IPO/Attributor.cpp
@@ -931,6 +931,7 @@
}
void Attributor::runTillFixpoint() {
+ TimeTraceScope TimeScope("Attributor::runTillFixpoint");
LLVM_DEBUG(dbgs() << "[Attributor] Identified and initialized "
<< DG.SyntheticRoot.Deps.size()
<< " abstract attributes.\n");
@@ -1067,6 +1068,7 @@
}
ChangeStatus Attributor::manifestAttributes() {
+ TimeTraceScope TimeScope("Attributor::manifestAttributes");
size_t NumFinalAAs = DG.SyntheticRoot.Deps.size();
unsigned NumManifested = 0;
@@ -1129,6 +1131,7 @@
}
ChangeStatus Attributor::cleanupIR() {
+ TimeTraceScope TimeScope("Attributor::cleanupIR");
// Delete stuff at the end to avoid invalid references and a nice order.
LLVM_DEBUG(dbgs() << "\n[Attributor] Delete at least "
<< ToBeDeletedFunctions.size() << " functions and "
@@ -1297,6 +1300,8 @@
}
ChangeStatus Attributor::run() {
+ TimeTraceScope TimeScope("Attributor::run");
+
SeedingPeriod = false;
runTillFixpoint();
@@ -1316,6 +1321,8 @@
}
ChangeStatus Attributor::updateAA(AbstractAttribute &AA) {
+ TimeTraceScope TimeScope(AA.getName() + "::updateAA");
+
// Use a new dependence vector for this update.
DependenceVector DV;
DependenceStack.push_back(&DV);
Index: llvm/include/llvm/Transforms/IPO/Attributor.h
===================================================================
--- llvm/include/llvm/Transforms/IPO/Attributor.h
+++ llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -117,6 +117,7 @@
#include "llvm/Support/Casting.h"
#include "llvm/Support/DOTGraphTraits.h"
#include "llvm/Support/GraphWriter.h"
+#include "llvm/Support/TimeProfiler.h"
#include "llvm/Transforms/Utils/CallGraphUpdater.h"
namespace llvm {
@@ -1001,8 +1002,10 @@
return AA;
}
- AA.initialize(*this);
-
+ {
+ TimeTraceScope TimeScope(AA.getName() + "::initialize");
+ AA.initialize(*this);
+ }
// We can initialize (=look at) code outside the current function set but
// not call update because that would again spawn new abstract attributes in
// potentially unconnected code regions (=SCCs).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84980.282083.patch
Type: text/x-patch
Size: 2338 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200731/3d50cc3d/attachment.bin>
More information about the llvm-commits
mailing list