llvm.org GIT mirror llvm / d74ea2b
Patches to make the LLVM sources more -pedantic clean. Patch provided by Anton Korobeynikov! This is a step towards closing PR786. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28447 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 13 years ago
42 changed file(s) with 45 addition(s) and 45 deletion(s). Raw diff Collapse all Expand all
4141 // Bit fields of the flags variable used for different operand properties
4242 enum {
4343 DEFFLAG = 0x01, // this is a def of the operand
44 USEFLAG = 0x02, // this is a use of the operand
44 USEFLAG = 0x02 // this is a use of the operand
4545 };
4646
4747 public:
4040 enum HazardType {
4141 NoHazard, // This instruction can be emitted at this cycle.
4242 Hazard, // This instruction can't be emitted at this cycle.
43 NoopHazard, // This instruction can't be emitted, and needs noops.
43 NoopHazard // This instruction can't be emitted, and needs noops.
4444 };
4545
4646 /// getHazardType - Return the hazard type of emitting this node. There are
4242 DSAFieldLimit("dsa-field-limit", cl::Hidden,
4343 cl::desc("Number of fields to track before collapsing a node"),
4444 cl::init(256));
45 };
45 }
4646
4747 #if 0
4848 #define TIME_REGION(VARNAME, DESC) \
191191 enum {
192192 UniversalSet = 0,
193193 NullPtr = 1,
194 NullObject = 2,
194 NullObject = 2
195195 };
196196
197197 public:
5858 EnableJoining("join-liveintervals",
5959 cl::desc("Join compatible live intervals"),
6060 cl::init(true));
61 };
61 }
6262
6363 void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const
6464 {
6464 enum LegalizeAction {
6565 Legal, // The target natively supports this operation.
6666 Promote, // This operation should be executed in a larger type.
67 Expand, // Try to expand this to other ops, otherwise use a libcall.
67 Expand // Try to expand this to other ops, otherwise use a libcall.
6868 };
6969
7070 /// ValueTypeActions - This is a bitvector that contains two bits for each
5959
6060 RegisterPass
6161 X("twoaddressinstruction", "Two-Address instruction pass");
62 };
62 }
6363
6464 const PassInfo *llvm::TwoAddressInstructionPassID = X.getPassInfo();
6565
2222
2323 enum CompressionTypes {
2424 COMP_TYPE_NONE = '0',
25 COMP_TYPE_BZIP2 = '2',
25 COMP_TYPE_BZIP2 = '2'
2626 };
2727
2828 static int getdata(char*& buffer, size_t &size,
4141 int IsInf (float f) { return isinf (f); }
4242 int IsInf (double d) { return isinf (d); }
4343
44 }; // end namespace llvm;
44 } // end namespace llvm;
3030 int IsNAN (float f) { return isnan (f); }
3131 int IsNAN (double d) { return isnan (d); }
3232
33 }; // end namespace llvm;
33 } // end namespace llvm;
3030 namespace ARMISD {
3131 enum {
3232 FIRST_NUMBER = ISD::BUILTIN_OP_END+ARM::INSTRUCTION_LIST_END,
33 RET_FLAG,
33 RET_FLAG
3434 };
3535 }
3636
4141 CALL,
4242
4343 /// DIVCALL - used for special library calls for div and rem
44 DivCall,
44 DivCall
4545
4646 };
4747 }
2222 reloc_gprellow,
2323 reloc_gprelhigh,
2424 reloc_gpdist,
25 reloc_bsr,
25 reloc_bsr
2626 };
2727 }
2828 }
17471747 OP_VSPLTISW3,
17481748 OP_VSLDOI4,
17491749 OP_VSLDOI8,
1750 OP_VSLDOI12,
1750 OP_VSLDOI12
17511751 };
17521752
17531753 if (OpNum == OP_COPY) {
4343 /// PPC970_Mask/Shift - This is a bitmask that selects the pipeline type that
4444 /// an instruction is issued to.
4545 PPC970_Shift = 3,
46 PPC970_Mask = 0x07 << PPC970_Shift,
46 PPC970_Mask = 0x07 << PPC970_Shift
4747 };
4848 enum PPC970_Unit {
4949 /// These are the various PPC970 execution unit pipelines. Each instruction
5555 PPC970_CRU = 4 << PPC970_Shift, // Control Register Unit
5656 PPC970_VALU = 5 << PPC970_Shift, // Vector ALU
5757 PPC970_VPERM = 6 << PPC970_Shift, // Vector Permute Unit
58 PPC970_BRU = 7 << PPC970_Shift, // Branch Unit
58 PPC970_BRU = 7 << PPC970_Shift // Branch Unit
5959 };
6060 }
6161
164164 void *PPCJITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) {
165165 // If this is just a call to an external function, emit a branch instead of a
166166 // call. The code is the same except for one bit of the last instruction.
167 if (Fn != PPC32CompilationCallback) {
167 if (Fn != (void*)PPC32CompilationCallback) {
168168 MCE.startFunctionStub(4*4);
169169 void *Addr = (void*)(intptr_t)MCE.getCurrentPCValue();
170170 MCE.emitWordBE(0);
4949 // relocated to point to a POINTER to the indicated global. The low-16
5050 // bits of the instruction are rewritten with the low 16-bits of the
5151 // address of the pointer.
52 reloc_absolute_ptr_low,
52 reloc_absolute_ptr_low
5353 };
5454 }
5555 }
7474 FCC_UGE = 12+16, // Unordered or Greater or Equal
7575 FCC_LE = 13+16, // Less or Equal
7676 FCC_ULE = 14+16, // Unordered or Less or Equal
77 FCC_O = 15+16, // Ordered
77 FCC_O = 15+16 // Ordered
7878 };
7979 }
8080
4747 ITOF, // Int to FP within a FP register.
4848
4949 CALL, // A call instruction.
50 RET_FLAG, // Return with a flag operand.
50 RET_FLAG // Return with a flag operand.
5151 };
5252 }
5353
2828 Store = (1<<2),
2929 DelaySlot = (1<<3)
3030 };
31 };
31 }
3232
3333 class SparcInstrInfo : public TargetInstrInfo {
3434 const SparcRegisterInfo RI;
3939 // Unless explicitly enabled, disable the V9 instructions.
4040 if (!EnableV9)
4141 IsV9 = false;
42 };
42 }
2727 bool UnsafeFPMath;
2828 bool FiniteOnlyFPMathOption;
2929 Reloc::Model RelocationModel;
30 };
30 }
3131 namespace {
3232 cl::opt PrintCode("print-machineinstrs",
3333 cl::desc("Print generated machine code"),
6969 clEnumValN(Reloc::DynamicNoPIC, "dynamic-no-pic",
7070 "Relocatable external references, non-relocatable code"),
7171 clEnumValEnd));
72 };
72 }
7373
7474 //---------------------------------------------------------------------------
7575 // TargetMachine Class
4646 struct X86ISelAddressMode {
4747 enum {
4848 RegBase,
49 FrameIndexBase,
49 FrameIndexBase
5050 } BaseType;
5151
5252 struct { // This is really a union, discriminated by BaseType!
155155
156156 /// PINSRW - Insert the lower 16-bits of a 32-bit value to a vector,
157157 /// corresponds to X86::PINSRW.
158 PINSRW,
158 PINSRW
159159 };
160160
161161 // X86 specific condition code. These correspond to X86_*_COND in
3434 struct X86AddressMode {
3535 enum {
3636 RegBase,
37 FrameIndexBase,
37 FrameIndexBase
3838 } BaseType;
3939
4040 union {
161161 SpecialFP = 7 << FPTypeShift,
162162
163163 OpcodeShift = 16,
164 OpcodeMask = 0xFF << OpcodeShift,
164 OpcodeMask = 0xFF << OpcodeShift
165165 // Bits 25 -> 31 are unused
166166 };
167167 }
166166 }
167167
168168 void *X86JITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) {
169 if (Fn != X86CompilationCallback) {
169 if (Fn != (void*)X86CompilationCallback) {
170170 MCE.startFunctionStub(5);
171171 MCE.emitByte(0xE9);
172172 MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4);
2424
2525 // reloc_absolute_word - Absolute relocation, just add the relocated value
2626 // to the value already in memory.
27 reloc_absolute_word = 1,
27 reloc_absolute_word = 1
2828 };
2929 }
3030 }
161161
162162 RegisterOpt X("insert-rs-profiling-framework",
163163 "Insert random sampling instrumentation framework");
164 };
164 }
165165
166166 //Local utilities
167167 static void ReplacePhiPred(BasicBlock* btarget,
2525 void IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum,
2626 GlobalValue *CounterArray);
2727 };
28 };
28 }
528528 case Type::DoubleTyID:
529529 return true; // This is the largest type...
530530 }
531 };
531 }
532532
533533 //===----------------------------------------------------------------------===//
534534 // Factory Function Implementation
7373
7474 RegisterAnalysis P2("print-callgraph",
7575 "Print Call Graph to 'dot' file");
76 };
76 }
2626 enum TestResult {
2727 NoFailure, // No failure of the predicate was detected
2828 KeepSuffix, // The suffix alone satisfies the predicate
29 KeepPrefix, // The prefix alone satisfies the predicate
29 KeepPrefix // The prefix alone satisfies the predicate
3030 };
3131
3232 virtual ~ListReducer() {}
7979 QuickAppend, ///< Quickly append to end of archive
8080 ReplaceOrInsert, ///< Replace or Insert members
8181 DisplayTable, ///< Display the table of contents
82 Extract, ///< Extract files back to file system
82 Extract ///< Extract files back to file system
8383 };
8484
8585 // Modifiers to follow operation to vary behavior
6262 bool MultipleFiles = false;
6363
6464 std::string ToolName;
65 };
65 }
6666
6767 char TypeCharForSymbol (GlobalValue &GV) {
6868 if (GV.isExternal ()) return 'U';
6464 PREPROCESSES_FLAG = 0x0002, ///< Does this action preprocess?
6565 TRANSLATES_FLAG = 0x0004, ///< Does this action translate?
6666 OUTPUT_IS_ASM_FLAG = 0x0008, ///< Action produces .ll files?
67 FLAGS_MASK = 0x000F, ///< Union of all flags
67 FLAGS_MASK = 0x000F ///< Union of all flags
6868 };
6969
7070 /// This type is the input list to the CompilerDriver. It provides
130130 EMIT_RAW_FLAG = 0x0080, ///< Emit raw, unoptimized bytecode
131131 KEEP_TEMPS_FLAG = 0x0100, ///< Don't delete temporary files
132132 STRIP_OUTPUT_FLAG = 0x0200, ///< Strip symbols from linked output
133 DRIVER_FLAGS_MASK = 0x03FF, ///< Union of the above flags
133 DRIVER_FLAGS_MASK = 0x03FF ///< Union of the above flags
134134 };
135135
136136 /// @}
101101 TRUETOK, ///< A boolean true value (true/yes/on)
102102 VERBOSE_SUBST, ///< The substitution item %verbose%
103103 VERSION_TOK, ///< The name "version" (and variants)
104 WOPTS_SUBST, ///< The %WOpts% substitution
104 WOPTS_SUBST ///< The %WOpts% substitution
105105 };
106106
107107 extern ConfigLexerTokens Configlex();
6363 }
6464 YY_FATAL_ERROR("Substitition tokens not allowed in names" );
6565 return ERRORTOK;
66 };
66 }
6767
6868 inline llvm::ConfigLexerTokens handleValueContext(llvm::ConfigLexerTokens token) {
6969 ConfigLexerState.StringVal = yytext;
6363 }
6464 YY_FATAL_ERROR("Substitition tokens not allowed in names" );
6565 return ERRORTOK;
66 };
66 }
6767
6868 inline llvm::ConfigLexerTokens handleValueContext(llvm::ConfigLexerTokens token) {
6969 ConfigLexerState.StringVal = yytext;
7373
7474 RegisterAnalysis P2("print-callgraph",
7575 "Print Call Graph to 'dot' file");
76 };
76 }
459459 OP_VSPLTISW3,
460460 OP_VSLDOI4,
461461 OP_VSLDOI8,
462 OP_VSLDOI12,
462 OP_VSLDOI12
463463 };
464464
465465 struct vmrghw : public Operator {
3636 OS << " enum {\n NoRegister,\n";
3737
3838 for (unsigned i = 0, e = Registers.size(); i != e; ++i)
39 OS << " " << Registers[i].getName() << ", \t// " << i+1 << "\n";
39 OS << " " << Registers[i].getName() << (i != (e-1) ? ", \t// " : " \t// ") << i+1 << "\n";
4040
4141 OS << " };\n";
4242 if (!Namespace.empty())