[llvm-commits] [llvm] r53390 - /llvm/trunk/lib/CodeGen/RegAllocLocal.cpp
Chris Lattner
clattner at apple.com
Wed Jul 9 21:03:26 PDT 2008
On Jul 9, 2008, at 6:56 PM, Owen Anderson wrote:
> Author: resistor
> Date: Wed Jul 9 20:56:35 2008
> New Revision: 53390
>
> URL: http://llvm.org/viewvc/llvm-project?rev=53390&view=rev
> Log:
> Use DenseMap instead of std::map in local register allocation. This
> improves the time on instcombine from .31s to .22s
nice!
> if (MO.isReg() && MO.getReg() && MO.isDef()) {
> - std::map<unsigned, std::pair<MachineInstr*, unsigned>
> >::iterator
> + DenseMap<unsigned, std::pair<MachineInstr*, unsigned>
> >::iterator
> last = LastUseDef.find(MO.getReg());
Neither of these loops will care that iteration will be non-
deterministic, will they?
-Chris
>
> if (last != LastUseDef.end()) {
> // Check if this is a two address instruction. If so, then
> @@ -633,7 +646,7 @@
>
> // Finally, loop over the final use/def of each reg
> // in the block and determine if it is dead.
> - for (std::map<unsigned, std::pair<MachineInstr*, unsigned>
> >::iterator
> + for (DenseMap<unsigned, std::pair<MachineInstr*, unsigned>
> >::iterator
> I = LastUseDef.begin(), E = LastUseDef.end(); I != E; ++I) {
> MachineInstr* MI = I->second.first;
> unsigned idx = I->second.second;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list