[NFC] Fix "not used" warning

This commit is contained in:
Vitaly Buka 2021-04-26 22:09:10 -07:00
parent 5a26345fe2
commit f2a585e6d3
4 changed files with 8 additions and 11 deletions

View File

@ -1099,10 +1099,9 @@ void ASTStmtReader::VisitCastExpr(CastExpr *E) {
void ASTStmtReader::VisitBinaryOperator(BinaryOperator *E) {
bool hasFP_Features;
BinaryOperator::Opcode opc;
VisitExpr(E);
E->setHasStoredFPFeatures(hasFP_Features = Record.readInt());
E->setOpcode(opc = (BinaryOperator::Opcode)Record.readInt());
E->setOpcode((BinaryOperator::Opcode)Record.readInt());
E->setLHS(Record.readSubExpr());
E->setRHS(Record.readSubExpr());
E->setOperatorLoc(readSourceLocation());

View File

@ -836,9 +836,8 @@ dataExtractorFromSection(const NormalizedFile &normalizedFile,
// inspection" code if possible.
static uint64_t getCUAbbrevOffset(llvm::DataExtractor abbrevData,
uint64_t abbrCode) {
uint64_t curCode;
uint64_t offset = 0;
while ((curCode = abbrevData.getULEB128(&offset)) != abbrCode) {
while (abbrevData.getULEB128(&offset) != abbrCode) {
// Tag
abbrevData.getULEB128(&offset);
// DW_CHILDREN

View File

@ -502,7 +502,6 @@ LoopIdiomRecognize::isLegalStore(StoreInst *SI) {
// are stored. A store of i32 0x01020304 can never be turned into a memset,
// but it can be turned into memset_pattern if the target supports it.
Value *SplatValue = isBytewiseValue(StoredVal, *DL);
Constant *PatternValue = nullptr;
// Note: memset and memset_pattern on unordered-atomic is yet not supported
bool UnorderedAtomic = SI->isUnordered() && !SI->isSimple();
@ -515,10 +514,11 @@ LoopIdiomRecognize::isLegalStore(StoreInst *SI) {
CurLoop->isLoopInvariant(SplatValue)) {
// It looks like we can use SplatValue.
return LegalStoreKind::Memset;
} else if (!UnorderedAtomic && HasMemsetPattern && !DisableLIRP::Memset &&
// Don't create memset_pattern16s with address spaces.
StorePtr->getType()->getPointerAddressSpace() == 0 &&
(PatternValue = getMemSetPatternValue(StoredVal, DL))) {
}
if (!UnorderedAtomic && HasMemsetPattern && !DisableLIRP::Memset &&
// Don't create memset_pattern16s with address spaces.
StorePtr->getType()->getPointerAddressSpace() == 0 &&
getMemSetPatternValue(StoredVal, DL)) {
// It looks like we can use PatternValue!
return LegalStoreKind::MemsetPattern;
}

View File

@ -201,10 +201,9 @@ static void writeStringsAndOffsets(MCStreamer &Out, DWPStringPool &Strings,
}
static uint64_t getCUAbbrev(StringRef Abbrev, uint64_t AbbrCode) {
uint64_t CurCode;
uint64_t Offset = 0;
DataExtractor AbbrevData(Abbrev, true, 0);
while ((CurCode = AbbrevData.getULEB128(&Offset)) != AbbrCode) {
while (AbbrevData.getULEB128(&Offset) != AbbrCode) {
// Tag
AbbrevData.getULEB128(&Offset);
// DW_CHILDREN