llvm.org GIT mirror llvm / 3472766
Convert some tab stops into spaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108130 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan Sands 9 years ago
33 changed file(s) with 77 addition(s) and 77 deletion(s). Raw diff Collapse all Expand all
399399
400400 Function *PrototypeAST::Codegen() {
401401 // Make the function type: double(double,double) etc.
402 std::vector Doubles(Args.size(),
402 std::vector Doubles(Args.size(),
403403 Type::getDoubleTy(getGlobalContext()));
404404 FunctionType *FT = FunctionType::get(Type::getDoubleTy(getGlobalContext()),
405405 Doubles, false);
406406
407407 Function *PrototypeAST::Codegen() {
408408 // Make the function type: double(double,double) etc.
409 std::vector Doubles(Args.size(),
409 std::vector Doubles(Args.size(),
410410 Type::getDoubleTy(getGlobalContext()));
411411 FunctionType *FT = FunctionType::get(Type::getDoubleTy(getGlobalContext()),
412412 Doubles, false);
651651
652652 Function *PrototypeAST::Codegen() {
653653 // Make the function type: double(double,double) etc.
654 std::vector Doubles(Args.size(),
654 std::vector Doubles(Args.size(),
655655 Type::getDoubleTy(getGlobalContext()));
656656 FunctionType *FT = FunctionType::get(Type::getDoubleTy(getGlobalContext()),
657657 Doubles, false);
755755
756756 Function *PrototypeAST::Codegen() {
757757 // Make the function type: double(double,double) etc.
758 std::vector Doubles(Args.size(),
758 std::vector Doubles(Args.size(),
759759 Type::getDoubleTy(getGlobalContext()));
760760 FunctionType *FT = FunctionType::get(Type::getDoubleTy(getGlobalContext()),
761761 Doubles, false);
173173 CodeGenOpt::Level OptLevel =
174174 CodeGenOpt::Default,
175175 bool GVsWithCode = true,
176 CodeModel::Model CMM =
177 CodeModel::Default);
176 CodeModel::Model CMM =
177 CodeModel::Default);
178178
179179 /// addModule - Add a Module to the list of modules that we can JIT from.
180180 /// Note that this takes ownership of the Module: when the ExecutionEngine is
4242
4343 if (isSimple())
4444 return DOTGraphTraits
45 ::getSimpleNodeLabel(BB, BB->getParent());
45 ::getSimpleNodeLabel(BB, BB->getParent());
4646 else
4747 return DOTGraphTraits
48 ::getCompleteNodeLabel(BB, BB->getParent());
48 ::getCompleteNodeLabel(BB, BB->getParent());
4949 }
5050 };
5151
405405
406406 // Create node data objects.
407407 for (Graph::NodeItr nItr = g.nodesBegin(), nEnd = g.nodesEnd();
408 nItr != nEnd; ++nItr) {
408 nItr != nEnd; ++nItr) {
409409 nodeDataList.push_back(NodeData());
410410 g.setNodeData(nItr, &nodeDataList.back());
411411 }
35723572 // we know that the element size of the sext'd result matches the
35733573 // element size of the compare operands.
35743574 if (VT.getSizeInBits() == N0VT.getSizeInBits())
3575 return DAG.getVSetCC(N->getDebugLoc(), VT, N0.getOperand(0),
3576 N0.getOperand(1),
3577 cast(N0.getOperand(2))->get());
3575 return DAG.getVSetCC(N->getDebugLoc(), VT, N0.getOperand(0),
3576 N0.getOperand(1),
3577 cast(N0.getOperand(2))->get());
35783578 // If the desired elements are smaller or larger than the source
35793579 // elements we can use a matching integer vector type and then
35803580 // truncate/sign extend
35813581 else {
3582 EVT MatchingElementType =
3583 EVT::getIntegerVT(*DAG.getContext(),
3584 N0VT.getScalarType().getSizeInBits());
3585 EVT MatchingVectorType =
3586 EVT::getVectorVT(*DAG.getContext(), MatchingElementType,
3587 N0VT.getVectorNumElements());
3588 SDValue VsetCC =
3589 DAG.getVSetCC(N->getDebugLoc(), MatchingVectorType, N0.getOperand(0),
3590 N0.getOperand(1),
3591 cast(N0.getOperand(2))->get());
3592 return DAG.getSExtOrTrunc(VsetCC, N->getDebugLoc(), VT);
3582 EVT MatchingElementType =
3583 EVT::getIntegerVT(*DAG.getContext(),
3584 N0VT.getScalarType().getSizeInBits());
3585 EVT MatchingVectorType =
3586 EVT::getVectorVT(*DAG.getContext(), MatchingElementType,
3587 N0VT.getVectorNumElements());
3588 SDValue VsetCC =
3589 DAG.getVSetCC(N->getDebugLoc(), MatchingVectorType, N0.getOperand(0),
3590 N0.getOperand(1),
3591 cast(N0.getOperand(2))->get());
3592 return DAG.getSExtOrTrunc(VsetCC, N->getDebugLoc(), VT);
35933593 }
35943594 }
35953595
39633963 // we know that the element size of the sext'd result matches the
39643964 // element size of the compare operands.
39653965 if (VT.getSizeInBits() == N0VT.getSizeInBits())
3966 return DAG.getVSetCC(N->getDebugLoc(), VT, N0.getOperand(0),
3967 N0.getOperand(1),
3968 cast(N0.getOperand(2))->get());
3966 return DAG.getVSetCC(N->getDebugLoc(), VT, N0.getOperand(0),
3967 N0.getOperand(1),
3968 cast(N0.getOperand(2))->get());
39693969 // If the desired elements are smaller or larger than the source
39703970 // elements we can use a matching integer vector type and then
39713971 // truncate/sign extend
39723972 else {
3973 EVT MatchingElementType =
3974 EVT::getIntegerVT(*DAG.getContext(),
3975 N0VT.getScalarType().getSizeInBits());
3976 EVT MatchingVectorType =
3977 EVT::getVectorVT(*DAG.getContext(), MatchingElementType,
3978 N0VT.getVectorNumElements());
3979 SDValue VsetCC =
3980 DAG.getVSetCC(N->getDebugLoc(), MatchingVectorType, N0.getOperand(0),
3981 N0.getOperand(1),
3982 cast(N0.getOperand(2))->get());
3983 return DAG.getSExtOrTrunc(VsetCC, N->getDebugLoc(), VT);
3973 EVT MatchingElementType =
3974 EVT::getIntegerVT(*DAG.getContext(),
3975 N0VT.getScalarType().getSizeInBits());
3976 EVT MatchingVectorType =
3977 EVT::getVectorVT(*DAG.getContext(), MatchingElementType,
3978 N0VT.getVectorNumElements());
3979 SDValue VsetCC =
3980 DAG.getVSetCC(N->getDebugLoc(), MatchingVectorType, N0.getOperand(0),
3981 N0.getOperand(1),
3982 cast(N0.getOperand(2))->get());
3983 return DAG.getSExtOrTrunc(VsetCC, N->getDebugLoc(), VT);
39843984 }
39853985 }
39863986
504504
505505 SDValue NewVAARG;
506506 NewVAARG = DAG.getVAArg(NVT, dl, Chain, Ptr, N->getOperand(2),
507 N->getConstantOperandVal(3));
507 N->getConstantOperandVal(3));
508508
509509 // Legalized the chain result - switch anything that used the old chain to
510510 // use the new one.
277277 FlaggedNodes.push_back(N);
278278 while (!FlaggedNodes.empty()) {
279279 O << DOTGraphTraits
280 ::getSimpleNodeLabel(FlaggedNodes.back(), DAG);
280 ::getSimpleNodeLabel(FlaggedNodes.back(), DAG);
281281 FlaggedNodes.pop_back();
282282 if (!FlaggedNodes.empty())
283283 O << "\n ";
265265 RawFn = (RawFunc)(intptr_t)
266266 sys::DynamicLibrary::SearchForAddressOfSymbol(F->getName());
267267 if (!RawFn)
268 RawFn = (RawFunc)(intptr_t)getPointerToGlobalIfAvailable(F);
268 RawFn = (RawFunc)(intptr_t)getPointerToGlobalIfAvailable(F);
269269 if (RawFn != 0)
270270 RawFunctions->insert(std::make_pair(F, RawFn)); // Cache for later
271271 } else {
9999 CodeGenOpt::Level OptLevel =
100100 CodeGenOpt::Default,
101101 bool GVsWithCode = true,
102 CodeModel::Model CMM = CodeModel::Default) {
102 CodeModel::Model CMM = CodeModel::Default) {
103103 return ExecutionEngine::createJIT(M, Err, JMM, OptLevel, GVsWithCode,
104 CMM);
104 CMM);
105105 }
106106
107107 virtual void addModule(Module *M);
9696 return GetOrCreateSymbol(Twine(MAI.getPrivateGlobalPrefix()) +
9797 Twine(LocalLabelVal) +
9898 "\2" +
99 Twine(NextInstance(LocalLabelVal)));
99 Twine(NextInstance(LocalLabelVal)));
100100 }
101101 MCSymbol *MCContext::GetDirectionalLocalSymbol(int64_t LocalLabelVal,
102102 int bORf) {
103103 return GetOrCreateSymbol(Twine(MAI.getPrivateGlobalPrefix()) +
104104 Twine(LocalLabelVal) +
105105 "\2" +
106 Twine(GetInstance(LocalLabelVal) + bORf));
106 Twine(GetInstance(LocalLabelVal) + bORf));
107107 }
108108
109109 MCSymbol *MCContext::LookupSymbol(StringRef Name) const {
3939 const MCSymbol &Sym = SRE.getSymbol();
4040
4141 if (SRE.getKind() == MCSymbolRefExpr::VK_ARM_HI16 ||
42 SRE.getKind() == MCSymbolRefExpr::VK_ARM_LO16)
42 SRE.getKind() == MCSymbolRefExpr::VK_ARM_LO16)
4343 OS << MCSymbolRefExpr::getVariantKindName(SRE.getKind());
4444
4545 // Parenthesize names that start with $ so that they don't look like
5050 OS << Sym;
5151
5252 if (SRE.getKind() != MCSymbolRefExpr::VK_None &&
53 SRE.getKind() != MCSymbolRefExpr::VK_ARM_HI16 &&
54 SRE.getKind() != MCSymbolRefExpr::VK_ARM_LO16)
53 SRE.getKind() != MCSymbolRefExpr::VK_ARM_HI16 &&
54 SRE.getKind() != MCSymbolRefExpr::VK_ARM_LO16)
5555 OS << '@' << MCSymbolRefExpr::getVariantKindName(SRE.getKind());
5656
5757 return;
228228 TokStart = CurPtr;
229229
230230 while (!isAtStartOfComment(*CurPtr) && // Start of line comment.
231 *CurPtr != ';' && // End of statement marker.
231 *CurPtr != ';' && // End of statement marker.
232232 *CurPtr != '\n' &&
233233 *CurPtr != '\r' &&
234234 (*CurPtr != 0 || CurPtr != CurBuf->getBufferEnd())) {
452452 IDVal = getTok().getString();
453453 Lex(); // Consume the integer token to be used as an identifier token.
454454 if (Lexer.getKind() != AsmToken::Colon) {
455 if (!TheCondState.Ignore)
456 return TokError("unexpected token at start of statement");
455 if (!TheCondState.Ignore)
456 return TokError("unexpected token at start of statement");
457457 }
458458 }
459459 }
282282
283283 #ifdef _MSC_VER
284284 if (ExitOnUnhandledExceptions)
285 _exit(-3);
285 _exit(-3);
286286 #endif
287287
288288 // Allow dialog box to pop up allowing choice to start debugger.
424424 const AsmToken &NextTok = Parser.getTok();
425425 if (NextTok.isNot(AsmToken::EndOfStatement)) {
426426 if (NextTok.isNot(AsmToken::Comma))
427 return Error(NextTok.getLoc(), "',' expected");
427 return Error(NextTok.getLoc(), "',' expected");
428428 Parser.Lex(); // Eat comma token.
429429 if(ParseMemoryOffsetReg(Negative, OffsetRegShifted, ShiftType,
430430 ShiftAmount, Offset, OffsetIsReg, OffsetRegNum,
487487
488488 const AsmToken &Tok = Parser.getTok();
489489 if (ParseShift(ShiftType, ShiftAmount, E))
490 return Error(Tok.getLoc(), "shift expected");
490 return Error(Tok.getLoc(), "shift expected");
491491 OffsetRegShifted = true;
492492 }
493493 }
13961396 } else if (MO.isGlobal()) {
13971397 MCSymbol *Symbol = MCInstLowering.GetGlobalAddressSymbol(MO);
13981398 const MCSymbolRefExpr *SymRef1 =
1399 MCSymbolRefExpr::Create(Symbol,
1400 MCSymbolRefExpr::VK_ARM_LO16, OutContext);
1399 MCSymbolRefExpr::Create(Symbol,
1400 MCSymbolRefExpr::VK_ARM_LO16, OutContext);
14011401 const MCSymbolRefExpr *SymRef2 =
1402 MCSymbolRefExpr::Create(Symbol,
1403 MCSymbolRefExpr::VK_ARM_HI16, OutContext);
1402 MCSymbolRefExpr::Create(Symbol,
1403 MCSymbolRefExpr::VK_ARM_HI16, OutContext);
14041404 V1 = MCOperand::CreateExpr(SymRef1);
14051405 V2 = MCOperand::CreateExpr(SymRef2);
14061406 } else {
3333 /// Uses and Defs by this instr. For the Uses part, the pred:$p operand is
3434 /// defined with two components:
3535 ///
36 /// def pred { // Operand PredicateOperand
36 /// def pred { // Operand PredicateOperand
3737 /// ValueType Type = OtherVT;
3838 /// string PrintMethod = "printPredicateOperand";
3939 /// string AsmOperandLowerMethod = ?;
5353 ///
5454 /// For the Defs part, in the simple case of only cc_out:$s, we have:
5555 ///
56 /// def cc_out { // Operand OptionalDefOperand
56 /// def cc_out { // Operand OptionalDefOperand
5757 /// ValueType Type = OtherVT;
5858 /// string PrintMethod = "printSBitModifierOperand";
5959 /// string AsmOperandLowerMethod = ?;
116116 DebugLoc dl = I->getDebugLoc();
117117 BuildMI(*MBB, I, dl, TII->get(PIC16::pagesel)).addExternalSymbol("$");
118118 Changed = true;
119 PageChanged = 0;
119 PageChanged = 0;
120120 }
121121 }
122122 }
229229 DenseMapIterator begin = map.begin();
230230 DenseMapIterator end = map.end();
231231 for (; begin != end; ++begin) {
232 begin->second.clear();
232 begin->second.clear();
233233 }
234234 map.clear();
235235 }
395395 /// this case the method returns true, otherwise false. It also obtains the
396396 /// Instruction and ConstantInt from the BinaryOperator and returns it.
397397 bool createBinaryOperatorInfo(BinaryOperator *BO, Instruction **I1,
398 Instruction **I2, ConstantInt **C1,
399 ConstantInt **C2);
398 Instruction **I2, ConstantInt **C1,
399 ConstantInt **C2);
400400
401401 /// This method creates a constraint between a Sigma and an Instruction.
402402 /// These constraints are created as soon as we find a comparator that uses a
957957 continue;
958958
959959 for (BasicBlock::iterator BI = BB->begin(), BE = BB->end();
960 BI != BE; ++BI) {
960 BI != BE; ++BI) {
961961 Instruction *Inst = BI;
962962
963963 if (!Inst->isSafeToSpeculativelyExecute() && !isa(Inst)
964 && !isa(Inst) && !isa(Inst))
964 && !isa(Inst) && !isa(Inst))
965965 return false;
966966 }
967967 }
20352035 }
20362036
20372037 static void WriteMDNodeComment(const MDNode *Node,
2038 formatted_raw_ostream &Out) {
2038 formatted_raw_ostream &Out) {
20392039 if (Node->getNumOperands() < 1)
20402040 return;
20412041 ConstantInt *CI = dyn_cast_or_null(Node->getOperand(0));
470470 Instruction *CallInst::CreateMalloc(Instruction *InsertBefore,
471471 const Type *IntPtrTy, const Type *AllocTy,
472472 Value *AllocSize, Value *ArraySize,
473 Function * MallocF,
473 Function * MallocF,
474474 const Twine &Name) {
475475 return createMalloc(InsertBefore, NULL, IntPtrTy, AllocTy, AllocSize,
476476 ArraySize, MallocF, Name);
268268 /// recreate the failure. This returns true if a compiler error is found.
269269 ///
270270 bool runManyPasses(const std::vector &AllPasses,
271 std::string &ErrMsg);
271 std::string &ErrMsg);
272272
273273 /// writeProgramToFile - This writes the current "Program" to the named
274274 /// bitcode file. If an error occurs, true is returned.
182182 --i; // Don't skip an element of the list
183183 Changed = true;
184184 }
185 if (!Error.empty())
186 return true;
185 if (!Error.empty())
186 return true;
187187 }
188188 // This can take a long time if left uncontrolled. For now, don't
189189 // iterate.
6363 FileType fileType,
6464 const std::string &InputFile,
6565 const std::string &OutputFile,
66 std::string *Error = 0,
66 std::string *Error = 0,
6767 const std::vector &GCCArgs =
6868 std::vector(),
6969 unsigned Timeout = 0,
111111 static cl::opt
112112 UnitAtATime("funit-at-a-time",
113113 cl::desc("Enable IPO. This is same as llvm-gcc's -funit-at-a-time"),
114 cl::init(true));
114 cl::init(true));
115115
116116 static cl::opt
117117 DisableSimplifyLibCalls("disable-simplify-libcalls",
3030 ~ARMDecoderEmitter() {
3131 shutdownBackend();
3232 }
33
33
3434 // run - Output the code emitter
3535 void run(raw_ostream &o);
3636
406406 default:
407407 // This class preceeds the RHS if it is a proper subset of the RHS.
408408 if (isSubsetOf(RHS))
409 return true;
409 return true;
410410 if (RHS.isSubsetOf(*this))
411 return false;
411 return false;
412412
413413 // Otherwise, order by name to ensure we have a total ordering.
414414 return ValueName < RHS.ValueName;
3232 MAP(C9, 38) \
3333 MAP(E8, 39) \
3434 MAP(F0, 40) \
35 MAP(F8, 41) \
35 MAP(F8, 41) \
3636 MAP(F9, 42)
3737
3838 // A clone of X86 since we can't depend on something that is generated.