[llvm] r232178 - unique_ptrs are unique already, no need to unique them any further.
David Blaikie
dblaikie at gmail.com
Fri Mar 13 10:07:53 PDT 2015
On Fri, Mar 13, 2015 at 9:59 AM, Benjamin Kramer <benny.kra at googlemail.com>
wrote:
> Author: d0k
> Date: Fri Mar 13 11:59:29 2015
> New Revision: 232178
>
> URL: http://llvm.org/viewvc/llvm-project?rev=232178&view=rev
> Log:
> unique_ptrs are unique already, no need to unique them any further.
>
Luls - nice.
>
> Modified:
> llvm/trunk/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
>
> Modified: llvm/trunk/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp?rev=232178&r1=232177&r2=232178&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp (original)
> +++ llvm/trunk/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp Fri Mar 13
> 11:59:29 2015
> @@ -142,7 +142,7 @@ private:
> int scavengeRegister(Chain *G, Color C, MachineBasicBlock &MBB);
> void scanInstruction(MachineInstr *MI, unsigned Idx,
> std::map<unsigned, Chain*> &Active,
> - std::set<std::unique_ptr<Chain>> &AllChains);
> + std::vector<std::unique_ptr<Chain>> &AllChains);
> void maybeKillChain(MachineOperand &MO, unsigned Idx,
> std::map<unsigned, Chain*> &RegChains);
> Color getColor(unsigned Register);
> @@ -336,7 +336,7 @@ bool AArch64A57FPLoadBalancing::runOnBas
> // been killed yet. This is keyed by register - all chains can only
> have one
> // "link" register between each inst in the chain.
> std::map<unsigned, Chain*> ActiveChains;
> - std::set<std::unique_ptr<Chain>> AllChains;
> + std::vector<std::unique_ptr<Chain>> AllChains;
> unsigned Idx = 0;
> for (auto &MI : MBB)
> scanInstruction(&MI, Idx++, ActiveChains, AllChains);
> @@ -603,10 +603,9 @@ bool AArch64A57FPLoadBalancing::colorCha
> return Changed;
> }
>
> -void AArch64A57FPLoadBalancing::
> -scanInstruction(MachineInstr *MI, unsigned Idx,
> - std::map<unsigned, Chain*> &ActiveChains,
> - std::set<std::unique_ptr<Chain>> &AllChains) {
> +void AArch64A57FPLoadBalancing::scanInstruction(
> + MachineInstr *MI, unsigned Idx, std::map<unsigned, Chain *>
> &ActiveChains,
> + std::vector<std::unique_ptr<Chain>> &AllChains) {
> // Inspect "MI", updating ActiveChains and AllChains.
>
> if (isMul(MI)) {
> @@ -625,7 +624,7 @@ scanInstruction(MachineInstr *MI, unsign
>
> auto G = llvm::make_unique<Chain>(MI, Idx, getColor(DestReg));
> ActiveChains[DestReg] = G.get();
> - AllChains.insert(std::move(G));
> + AllChains.push_back(std::move(G));
>
> } else if (isMla(MI)) {
>
> @@ -669,7 +668,7 @@ scanInstruction(MachineInstr *MI, unsign
> << TRI->getName(DestReg) << "\n");
> auto G = llvm::make_unique<Chain>(MI, Idx, getColor(DestReg));
> ActiveChains[DestReg] = G.get();
> - AllChains.insert(std::move(G));
> + AllChains.push_back(std::move(G));
>
> } else {
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150313/c1376cd5/attachment.html>
More information about the llvm-commits
mailing list