mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-08 04:11:27 +00:00
[Attributor][NFC] Fix comments and unnecessary comma
This commit is contained in:
parent
b8b863840b
commit
e7eaee28c5
@ -1840,7 +1840,9 @@ struct DerefState : AbstractState {
|
|||||||
/// ```
|
/// ```
|
||||||
/// In that case, AccessedBytesMap is `{0:4, 4:4, 8:4, 40:4}`.
|
/// In that case, AccessedBytesMap is `{0:4, 4:4, 8:4, 40:4}`.
|
||||||
/// AccessedBytesMap is std::map so it is iterated in accending order on
|
/// AccessedBytesMap is std::map so it is iterated in accending order on
|
||||||
/// key(Offset). So KnownBytes will be updated like this: |Access | KnownBytes
|
/// key(Offset). So KnownBytes will be updated like this:
|
||||||
|
///
|
||||||
|
/// |Access | KnownBytes
|
||||||
/// |(0, 4)| 0 -> 4
|
/// |(0, 4)| 0 -> 4
|
||||||
/// |(4, 4)| 4 -> 8
|
/// |(4, 4)| 4 -> 8
|
||||||
/// |(8, 4)| 8 -> 12
|
/// |(8, 4)| 8 -> 12
|
||||||
|
@ -1564,7 +1564,7 @@ struct AANoFreeFloating : AANoFreeImpl {
|
|||||||
isa<PHINode>(UserI) || isa<SelectInst>(UserI)) {
|
isa<PHINode>(UserI) || isa<SelectInst>(UserI)) {
|
||||||
Follow = true;
|
Follow = true;
|
||||||
return true;
|
return true;
|
||||||
};
|
}
|
||||||
|
|
||||||
// Unknown user.
|
// Unknown user.
|
||||||
return false;
|
return false;
|
||||||
@ -3254,7 +3254,8 @@ struct AAAlignImpl : AAAlign {
|
|||||||
bool followUse(Attributor &A, const Use *U, const Instruction *I) {
|
bool followUse(Attributor &A, const Use *U, const Instruction *I) {
|
||||||
bool TrackUse = false;
|
bool TrackUse = false;
|
||||||
|
|
||||||
unsigned int KnownAlign = getKnownAlignForUse(A, *this, getAssociatedValue(), U, I, TrackUse);
|
unsigned int KnownAlign =
|
||||||
|
getKnownAlignForUse(A, *this, getAssociatedValue(), U, I, TrackUse);
|
||||||
takeKnownMaximum(KnownAlign);
|
takeKnownMaximum(KnownAlign);
|
||||||
|
|
||||||
return TrackUse;
|
return TrackUse;
|
||||||
@ -3950,14 +3951,14 @@ struct AAValueSimplifyArgument final : AAValueSimplifyImpl {
|
|||||||
// callback calls).
|
// callback calls).
|
||||||
Value *ArgOp = ACS.getCallArgOperand(getArgNo());
|
Value *ArgOp = ACS.getCallArgOperand(getArgNo());
|
||||||
if (!ArgOp)
|
if (!ArgOp)
|
||||||
return false;
|
return false;
|
||||||
// We can only propagate thread independent values through callbacks.
|
// We can only propagate thread independent values through callbacks.
|
||||||
// This is different to direct/indirect call sites because for them we
|
// This is different to direct/indirect call sites because for them we
|
||||||
// know the thread executing the caller and callee is the same. For
|
// know the thread executing the caller and callee is the same. For
|
||||||
// callbacks this is not guaranteed, thus a thread dependent value could
|
// callbacks this is not guaranteed, thus a thread dependent value could
|
||||||
// be different for the caller and callee, making it invalid to propagate.
|
// be different for the caller and callee, making it invalid to propagate.
|
||||||
if (ACS.isCallbackCall())
|
if (ACS.isCallbackCall())
|
||||||
if (auto *C =dyn_cast<Constant>(ArgOp))
|
if (auto *C = dyn_cast<Constant>(ArgOp))
|
||||||
if (C->isThreadDependent())
|
if (C->isThreadDependent())
|
||||||
return false;
|
return false;
|
||||||
return checkAndUpdate(A, *this, *ArgOp, SimplifiedAssociatedValue);
|
return checkAndUpdate(A, *this, *ArgOp, SimplifiedAssociatedValue);
|
||||||
@ -5558,8 +5559,8 @@ void Attributor::identifyDefaultAbstractAttributes(Function &F) {
|
|||||||
// Call site argument attribute "align".
|
// Call site argument attribute "align".
|
||||||
getOrCreateAAFor<AAAlign>(CSArgPos);
|
getOrCreateAAFor<AAAlign>(CSArgPos);
|
||||||
|
|
||||||
// Call site argument attribute "nofree".
|
// Call site argument attribute "nofree".
|
||||||
getOrCreateAAFor<AANoFree>(CSArgPos);
|
getOrCreateAAFor<AANoFree>(CSArgPos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user