Displaying 4 results from an estimated 4 matches for "getorcreatenod".
Did you mean:
getorcreatenode
2017 Jul 31
3
[RFC] Profile guided section layout
Hi Rafael,
On 07/31/2017 04:20 PM, Rafael Avila de Espindola via llvm-dev wrote:
> However, do we need to start with instrumentation? The original paper
> uses sampling with good results and current intel cpus can record every
> branch in a program.
>
> I would propose starting with just an lld patch that reads the call
> graph from a file. The format would be very similar to
2017 Jul 31
2
[RFC] Profile guided section layout
...const Edge E) {
+ if (E.From == E.To)
+ return;
+ auto Res = Edges.insert(E);
+ if (!Res.second)
+ Res.first->Weight = SaturatingAdd(Res.first->Weight, E.Weight);
+ };
+
+ {
+ llvm::DenseMap<const InputSectionBase *, NodeIndex> SecToNode;
+
+ auto GetOrCreateNode =
+ [&Nodes, &SecToNode](const InputSectionBase *IS) -> NodeIndex {
+ auto Res = SecToNode.insert(std::make_pair(IS, Nodes.size()));
+ if (Res.second)
+ Nodes.emplace_back(IS);
+ return Res.first->second;
+ };
+
+ // Create the graph.
+ for (cons...
2017 Jun 15
7
[RFC] Profile guided section layout
...const Edge E) {
+ if (E.From == E.To)
+ return;
+ auto Res = Edges.insert(E);
+ if (!Res.second)
+ Res.first->Weight = SaturatingAdd(Res.first->Weight, E.Weight);
+ };
+
+ {
+ llvm::DenseMap<const InputSectionBase *, NodeIndex> SecToNode;
+
+ auto GetOrCreateNode =
+ [&Nodes, &SecToNode](const InputSectionBase *IS) -> NodeIndex {
+ auto Res = SecToNode.insert(std::make_pair(IS, Nodes.size()));
+ if (Res.second)
+ Nodes.emplace_back(IS);
+ return Res.first->second;
+ };
+
+ // Create the graph.
+ for (cons...
2017 Aug 01
2
[RFC] Profile guided section layout
...const Edge E) {
+ if (E.From == E.To)
+ return;
+ auto Res = Edges.insert(E);
+ if (!Res.second)
+ Res.first->Weight = SaturatingAdd(Res.first->Weight, E.Weight);
+ };
+
+ {
+ llvm::DenseMap<const InputSectionBase *, NodeIndex> SecToNode;
+
+ auto GetOrCreateNode =
+ [&Nodes, &SecToNode](const InputSectionBase *IS) -> NodeIndex {
+ auto Res = SecToNode.insert(std::make_pair(IS, Nodes.size()));
+ if (Res.second)
+ Nodes.emplace_back(IS);
+ return Res.first->second;
+ };
+
+ // Create the graph.
+ for (cons...