[llvm] r245131 - AMDGPU/SI: Make comments more precise.
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 17:12:31 PDT 2015
Author: arsenm
Date: Fri Aug 14 19:12:30 2015
New Revision: 245131
URL: http://llvm.org/viewvc/llvm-project?rev=245131&view=rev
Log:
AMDGPU/SI: Make comments more precise.
True branch instructions do behave as expected with liveness.
Avoid the phrasing "branch decision is based on a value in an SGPR"
because this could be misleading. A VALU compare instruction's
result is still based on an SGPR, even though that condition
may be divergent.
Modified:
llvm/trunk/lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp?rev=245131&r1=245130&r2=245131&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp Fri Aug 14 19:12:30 2015
@@ -7,9 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-/// \file
-/// SALU instructions ignore control flow, so we need to modify the live ranges
-/// of the registers they define in some cases.
+/// \file SALU instructions ignore the execution mask, so we need to modify the
+/// live ranges of the registers they define in some cases.
///
/// The main case we need to handle is when a def is used in one side of a
/// branch and not another. For example:
@@ -138,7 +137,8 @@ bool SIFixSGPRLiveRanges::runOnMachineFu
if (MBB.succ_size() < 2)
continue;
- // We have structured control flow, so number of successors should be two.
+ // We have structured control flow, so the number of successors should be
+ // two.
assert(MBB.succ_size() == 2);
MachineBasicBlock *SuccA = *MBB.succ_begin();
MachineBasicBlock *SuccB = *(++MBB.succ_begin());
@@ -161,10 +161,10 @@ bool SIFixSGPRLiveRanges::runOnMachineFu
unsigned Reg = RegLR.first;
LiveRange *LR = RegLR.second;
- // FIXME: We could be smarter here. If the register is Live-In to
- // one block, but the other doesn't have any SGPR defs, then there
- // won't be a conflict. Also, if the branch decision is based on
- // a value in an SGPR, then there will be no conflict.
+ // FIXME: We could be smarter here. If the register is Live-In to one
+ // block, but the other doesn't have any SGPR defs, then there won't be a
+ // conflict. Also, if the branch condition is uniform then there will be
+ // no conflict.
bool LiveInToA = LIS->isLiveInToMBB(*LR, SuccA);
bool LiveInToB = LIS->isLiveInToMBB(*LR, SuccB);
More information about the llvm-commits
mailing list