llvm.org GIT mirror llvm / 8819c84
Remove several unused variables. Patch by Alp Toker. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191757 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 7 years ago
25 changed file(s) with 8 addition(s) and 51 deletion(s). Raw diff Collapse all Expand all
165165 }
166166 }
167167
168 std::string errorInfo;
169168 std::string filename = EdgeProfileFilename;
170169
171170 // Open a handle to the file
23922392 Lex.Lex();
23932393
23942394 ValID Fn, Label;
2395 LocTy FnLoc, LabelLoc;
23962395
23972396 if (ParseToken(lltok::lparen, "expected '(' in block address expression") ||
23982397 ParseValID(Fn) ||
31843183
31853184 // Parse the instructions in this block until we get a terminator.
31863185 Instruction *Inst;
3187 SmallVector, 4> MetadataOnInst;
31883186 do {
31893187 // This instruction may have three possibilities for a name: a) none
31903188 // specified, b) name specified "%foo =", c) number specified: "%4 =".
19481948 case ISD::SIGN_EXTEND: {
19491949 EVT InVT = Op.getOperand(0).getValueType();
19501950 unsigned InBits = InVT.getScalarType().getSizeInBits();
1951 APInt InSignBit = APInt::getSignBit(InBits);
19521951 APInt NewBits = APInt::getHighBitsSet(BitWidth, BitWidth - InBits);
19531952
19541953 KnownZero = KnownZero.trunc(InBits);
20602059 const APInt &RA = Rem->getAPIntValue().abs();
20612060 if (RA.isPowerOf2()) {
20622061 APInt LowBits = RA - 1;
2063 APInt Mask2 = LowBits | APInt::getSignBit(BitWidth);
20642062 ComputeMaskedBits(Op.getOperand(0), KnownZero2,KnownOne2,Depth+1);
20652063
20662064 // The low bits of the first operand are unchanged by the srem.
37863784 for (unsigned i = 0; i < NumMemOps; i++) {
37873785 EVT VT = MemOps[i];
37883786 unsigned VTSize = VT.getSizeInBits() / 8;
3789 SDValue Value, Store;
3787 SDValue Value;
37903788
37913789 Value = DAG.getLoad(VT, dl, Chain,
37923790 getMemBasePlusOffset(Src, SrcOff, dl, DAG),
38023800 for (unsigned i = 0; i < NumMemOps; i++) {
38033801 EVT VT = MemOps[i];
38043802 unsigned VTSize = VT.getSizeInBits() / 8;
3805 SDValue Value, Store;
3803 SDValue Store;
38063804
38073805 Store = DAG.getStore(Chain, dl, LoadValues[i],
38083806 getMemBasePlusOffset(Dst, DstOff, dl, DAG),
20212021 }
20222022 }
20232023
2024 SDValue Res;
20252024 if (InputChains.size() == 1)
20262025 return InputChains[0];
20272026 return CurDAG->getNode(ISD::TokenFactor, SDLoc(ChainNodesMatched[0]),
637637
638638 bool
639639 TailDuplicatePass::canCompletelyDuplicateBB(MachineBasicBlock &BB) {
640 SmallPtrSet Succs(BB.succ_begin(), BB.succ_end());
641
642640 for (MachineBasicBlock::pred_iterator PI = BB.pred_begin(),
643641 PE = BB.pred_end(); PI != PE; ++PI) {
644642 MachineBasicBlock *PredBB = *PI;
218218 errs() << "Running 'dotty' program... ";
219219 if (!ExecGraphViewer(dotty, args, Filename, wait, ErrMsg))
220220 return;
221 #endif
222 }
221 #else
222 (void)Filename;
223 (void)ErrMsg;
224 #endif
225 }
98139813 }
98149814
98159815 static SDValue LowerIntVSETCC_AVX512(SDValue Op, SelectionDAG &DAG) {
9816 SDValue Cond;
98179816 SDValue Op0 = Op.getOperand(0);
98189817 SDValue Op1 = Op.getOperand(1);
98199818 SDValue CC = Op.getOperand(2);
98499848
98509849 static SDValue LowerVSETCC(SDValue Op, const X86Subtarget *Subtarget,
98519850 SelectionDAG &DAG) {
9852 SDValue Cond;
98539851 SDValue Op0 = Op.getOperand(0);
98549852 SDValue Op1 = Op.getOperand(1);
98559853 SDValue CC = Op.getOperand(2);
4545 !ConstantSize ||
4646 ConstantSize->getZExtValue() >
4747 Subtarget->getMaxInlineSizeThreshold()) {
48 SDValue InFlag(0, 0);
49
5048 // Check to see if there is a specialized entry-point for memory zeroing.
5149 ConstantSDNode *V = dyn_cast(Src);
5250
926926 StructType *GlobalStructTy = StructType::get(IntptrTy, IntptrTy,
927927 IntptrTy, IntptrTy,
928928 IntptrTy, IntptrTy, NULL);
929 SmallVector Initializers(n), DynamicInit;
930
929 SmallVector Initializers(n);
931930
932931 Function *CtorFunc = M.getFunction(kAsanModuleCtorName);
933932 assert(CtorFunc);
247247
248248 // If the edge isn't critical, then BB has a single successor or Succ has a
249249 // single pred. Split the block.
250 BasicBlock::iterator SplitPoint;
251250 if (BasicBlock *SP = Succ->getSinglePredecessor()) {
252251 // If the successor only has a single pred, split the top of the successor
253252 // block.
345345 // Scan all of the uses and see if the live range is live across an unwind
346346 // edge. If we find a use live across an invoke edge, create an alloca
347347 // and spill the value.
348 std::set InvokesWithStoreInserted;
349348
350349 // Find all of the blocks that this value is live in.
351350 std::set LiveBBs;
37573757 return true;
37583758 }
37593759
3760 SmallPtrSet ReadOnlyPtr;
37613760 for (I = Loads.begin(), IE = Loads.end(); I != IE; ++I) {
37623761 LoadInst *LD = cast(*I);
37633762 Value* Ptr = LD->getPointerOperand();
21712171 assert(isPowerOf2_32(ReduxWidth) &&
21722172 "We only handle power-of-two reductions for now");
21732173
2174 SmallVector ShuffleMask(ReduxWidth, 0);
21752174 Value *TmpVec = ValToReduce;
21762175 for (unsigned i = ReduxWidth / 2; i != 0; i >>= 1) {
21772176 if (IsPairwiseReduction) {
300300 if (AI == 0) AI = Interpreter;
301301 assert(AI && "Interpreter should have been created already!");
302302 bool CreatedBitcode = false;
303 std::string ErrMsg;
304303 if (BitcodeFile.empty()) {
305304 // Emit the program to a bitcode file...
306305 SmallString<128> UniqueFilename;
193193
194194 BasicBlock::iterator LI = L->begin(), LE = L->end();
195195 BasicBlock::iterator RI = R->begin();
196
197 llvm::SmallVector, 20> TentativePairs;
198196
199197 do {
200198 assert(LI != LE && RI != R->end());
8181 Options.UseInitArray = UseInitArray;
8282
8383 unsigned BaseArg = 0;
84 std::string ErrorMessage;
8584
8685 LTOCodeGenerator CodeGen;
8786
259259 getSectionsAndSymbols(Header, MachOOF, Sections, Symbols, FoundFns,
260260 BaseSegmentAddress);
261261
262 // Make a copy of the unsorted symbol list. FIXME: duplication
263 std::vector UnsortedSymbols(Symbols);
264262 // Sort the symbols by address, just in case they didn't come in that way.
265263 std::sort(Symbols.begin(), Symbols.end(), SymbolSorter());
266264
146146
147147 bool ProfileInfoPrinterPass::runOnModule(Module &M) {
148148 ProfileInfo &PI = getAnalysis();
149 std::map FuncFreqs;
150 std::map BlockFreqs;
151 std::map EdgeFreqs;
152149
153150 // Output a report. Eventually, there will be multiple reports selectable on
154151 // the command line, for now, just keep things simple.
419419
420420 template
421421 void ELFDumper::printFileHeaders() {
422 error_code EC;
423
424422 const typename ELFO::Elf_Ehdr *Header = Obj->getHeader();
425423
426424 {
511509 void ELFDumper::printRelocations() {
512510 ListScope D(W, "Relocations");
513511
514 error_code EC;
515512 int SectionNumber = -1;
516513 for (typename ELFO::Elf_Shdr_Iter SecI = Obj->begin_sections(),
517514 SecE = Obj->end_sections();
768765 void ELFDumper::printNeededLibraries() {
769766 ListScope D(W, "NeededLibraries");
770767
771 error_code EC;
772
773768 typedef std::vector LibsTy;
774769 LibsTy Libs;
775770
397397 }
398398
399399 void MachODumper::printSymbol(symbol_iterator SymI) {
400 error_code EC;
401
402400 StringRef SymbolName;
403401 if (SymI->getName(SymbolName))
404402 SymbolName = "";
7171 const object::coff_relocation *reloc = Obj.getCOFFRelocation(rIter);
7272 COFFYAML::Relocation Rel;
7373 object::symbol_iterator Sym = rIter->getSymbol();
74 StringRef Name;
7574 Sym->getName(Rel.SymbolName);
7675 Rel.VirtualAddress = reloc->VirtualAddress;
7776 Rel.Type = reloc->Type;
28382838 unsigned VariantCount = Target.getAsmParserVariantCount();
28392839 for (unsigned VC = 0; VC != VariantCount; ++VC) {
28402840 Record *AsmVariant = Target.getAsmParserVariant(VC);
2841 std::string CommentDelimiter =
2842 AsmVariant->getValueAsString("CommentDelimiter");
2843 std::string RegisterPrefix = AsmVariant->getValueAsString("RegisterPrefix");
28442841 int AsmVariantNo = AsmVariant->getValueAsInt("Variant");
28452842
28462843 OS << "static const MatchEntry MatchTable" << VC << "[] = {\n";
28912888 OS << " default: // unreachable\n";
28922889 for (unsigned VC = 0; VC != VariantCount; ++VC) {
28932890 Record *AsmVariant = Target.getAsmParserVariant(VC);
2894 std::string CommentDelimiter =
2895 AsmVariant->getValueAsString("CommentDelimiter");
2896 std::string RegisterPrefix = AsmVariant->getValueAsString("RegisterPrefix");
28972891 int AsmVariantNo = AsmVariant->getValueAsInt("Variant");
28982892 OS << " case " << AsmVariantNo << ": Start = MatchTable" << VC
28992893 << "; End = array_endof(MatchTable" << VC << "); break;\n";
29492943 OS << " default: // unreachable\n";
29502944 for (unsigned VC = 0; VC != VariantCount; ++VC) {
29512945 Record *AsmVariant = Target.getAsmParserVariant(VC);
2952 std::string CommentDelimiter =
2953 AsmVariant->getValueAsString("CommentDelimiter");
2954 std::string RegisterPrefix = AsmVariant->getValueAsString("RegisterPrefix");
29552946 int AsmVariantNo = AsmVariant->getValueAsInt("Variant");
29562947 OS << " case " << AsmVariantNo << ": Start = MatchTable" << VC
29572948 << "; End = array_endof(MatchTable" << VC << "); break;\n";
835835 Cond = std::string("MI->getNumOperands() == ") + llvm::utostr(LastOpNo);
836836 IAP->addCond(Cond);
837837
838 std::map OpMap;
839838 bool CantHandle = false;
840839
841840 for (unsigned i = 0, e = LastOpNo; i != e; ++i) {
239239
240240 void MapTableEmitter::buildRowInstrMap() {
241241 for (unsigned i = 0, e = InstrDefs.size(); i < e; i++) {
242 std::vector InstrList;
243242 Record *CurInstr = InstrDefs[i];
244243 std::vector KeyValue;
245244 ListInit *RowFields = InstrMapDesc.getRowFields();
20372037 }
20382038
20392039 DecoderTableInfo TableInfo;
2040 std::set Sizes;
20412040 for (std::map,
20422041 std::vector >::const_iterator
20432042 I = OpcMap.begin(), E = OpcMap.end(); I != E; ++I) {