diff options
author | Chris Bieneman <beanz@apple.com> | 2014-07-16 16:27:31 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2014-07-16 16:27:31 +0000 |
commit | 80a866a3169ee7856e21a6c814d80dc92d3c3a5f (patch) | |
tree | 5acb3dbd64d034f72971697e1b1e3fd1f1643489 /llvm/lib/Target/ARM/ARMSubtarget.cpp | |
parent | 3e037d98e6da3579fb338229356ed5be5ddbe6fc (diff) | |
download | bcm5719-llvm-80a866a3169ee7856e21a6c814d80dc92d3c3a5f.tar.gz bcm5719-llvm-80a866a3169ee7856e21a6c814d80dc92d3c3a5f.zip |
Added documentation for SizeMultiplier in the ARM subtarget hook for register coalescing. Also fixed some 80 col violations.
No functional code changes.
llvm-svn: 213169
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMSubtarget.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp index ea9e2b84c19..e605b86d7c9 100644 --- a/llvm/lib/Target/ARM/ARMSubtarget.cpp +++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp @@ -476,8 +476,17 @@ bool ARMSubtarget::shouldCoalesce(MachineInstr *MI, auto AFI = MF->getInfo<ARMFunctionInfo>(); auto It = AFI->getCoalescedWeight(MBB); - DEBUG(dbgs() << "\tARM::shouldCoalesce - Coalesced Weight: " << It->second << "\n"); - DEBUG(dbgs() << "\tARM::shouldCoalesce - Reg Weight: " << NewRCWeight.RegWeight << "\n"); + DEBUG(dbgs() << "\tARM::shouldCoalesce - Coalesced Weight: " + << It->second << "\n"); + DEBUG(dbgs() << "\tARM::shouldCoalesce - Reg Weight: " + << NewRCWeight.RegWeight << "\n"); + + // This number is the largest round number that which meets the criteria: + // (1) addresses PR18825 + // (2) generates better code in some test cases (like vldm-shed-a9.ll) + // (3) Doesn't regress any test cases (in-tree, test-suite, and SPEC) + // In practice the SizeMultiplier will only factor in for straight line code + // that uses a lot of NEON vectors, which isn't terribly common. unsigned SizeMultiplier = MBB->size()/100; SizeMultiplier = SizeMultiplier ? SizeMultiplier : 1; if (It->second < NewRCWeight.WeightLimit * SizeMultiplier) { |