diff options
author | Matthias Braun <matze@braunis.de> | 2015-09-09 18:08:03 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2015-09-09 18:08:03 +0000 |
commit | d9da16278972cf755b178497adf1371cf8612a51 (patch) | |
tree | 20929b9cb3c4f539a7e29db1373f18686b78ecac /llvm/lib/CodeGen/TailDuplication.cpp | |
parent | cc58005885cb4bc048a5ea68e44e30f3f954fe8c (diff) | |
download | llvm-d9da16278972cf755b178497adf1371cf8612a51.zip llvm-d9da16278972cf755b178497adf1371cf8612a51.tar.gz llvm-d9da16278972cf755b178497adf1371cf8612a51.tar.bz2 |
Save LaneMask with livein registers
With subregister liveness enabled we can detect the case where only
parts of a register are live in, this is expressed as a 32bit lanemask.
The current code only keeps registers in the live-in list and therefore
enumerated all subregisters affected by the lanemask. This turned out to
be too conservative as the subregister may also cover additional parts
of the lanemask which are not live. Expressing a given lanemask by
enumerating a minimum set of subregisters is computationally expensive
so the best solution is to simply change the live-in list to store the
lanemasks as well. This will reduce memory usage for targets using
subregister liveness and slightly increase it for other targets
Differential Revision: http://reviews.llvm.org/D12442
llvm-svn: 247171
Diffstat (limited to 'llvm/lib/CodeGen/TailDuplication.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TailDuplication.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TailDuplication.cpp b/llvm/lib/CodeGen/TailDuplication.cpp index ca929d9..4a71c66 100644 --- a/llvm/lib/CodeGen/TailDuplication.cpp +++ b/llvm/lib/CodeGen/TailDuplication.cpp @@ -791,8 +791,8 @@ TailDuplicatePass::TailDuplicate(MachineBasicBlock *TailBB, RS->enterBasicBlock(PredBB); if (!PredBB->empty()) RS->forward(std::prev(PredBB->end())); - for (unsigned LI : TailBB->liveins()) { - if (!RS->isRegUsed(LI, false)) + for (const auto &LI : TailBB->liveins()) { + if (!RS->isRegUsed(LI.PhysReg, false)) // If a register is previously livein to the tail but it's not live // at the end of predecessor BB, then it should be added to its // livein list. |