llvm.org GIT mirror llvm / 568f7e8
Remove neverHasSideEffects support from TableGen CodeGenInstruction. Everyone should use hasSideEffects now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222809 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 4 years ago
5 changed file(s) with 0 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
122122 bit hasCtrlDep = 0;
123123 bit isNotDuplicable = 0;
124124 bit hasSideEffects = 0;
125 bit neverHasSideEffects = 0;
126125 InstrItinClass Itinerary = NoItinerary;
127126 string Constraints = "";
128127 string DisableEncoding = "";
395395 // hasSideEffects - The instruction has side effects that are not
396396 // captured by any operands of the instruction or other flags.
397397 //
398 // neverHasSideEffects (deprecated) - Set on an instruction with no pattern
399 // if it has no side effects. This is now equivalent to setting
400 // "hasSideEffects = 0".
401398 bit hasSideEffects = ?;
402 bit neverHasSideEffects = 0;
403399
404400 // Is this instruction a "real" instruction (with a distinct machine
405401 // encoding), or is it a pseudo instruction used for codegen modeling
31103110 CodeGenInstruction &InstInfo =
31113111 const_cast(*Instructions[i]);
31123112
3113 // Treat neverHasSideEffects = 1 as the equivalent of hasSideEffects = 0.
3114 // This flag is obsolete and will be removed.
3115 if (InstInfo.neverHasSideEffects) {
3116 assert(!InstInfo.hasSideEffects);
3117 InstInfo.hasSideEffects_Unset = false;
3118 }
3119
31203113 // Get the primary instruction pattern.
31213114 const TreePattern *Pattern = getInstruction(InstInfo.TheDef).getPattern();
31223115 if (!Pattern) {
324324 mayStore_Unset = Unset;
325325 hasSideEffects = R->getValueAsBitOrUnset("hasSideEffects", Unset);
326326 hasSideEffects_Unset = Unset;
327 neverHasSideEffects = R->getValueAsBit("neverHasSideEffects");
328327
329328 isAsCheapAsAMove = R->getValueAsBit("isAsCheapAsAMove");
330329 hasExtraSrcRegAllocReq = R->getValueAsBit("hasExtraSrcRegAllocReq");
333332 isPseudo = R->getValueAsBit("isPseudo");
334333 ImplicitDefs = R->getValueAsListOfDefs("Defs");
335334 ImplicitUses = R->getValueAsListOfDefs("Uses");
336
337 if (neverHasSideEffects + hasSideEffects > 1)
338 PrintFatalError(R->getName() + ": multiple conflicting side-effect flags set!");
339335
340336 // Parse Constraints.
341337 ParseConstraints(R->getValueAsString("Constraints"), Operands);
246246 bool isNotDuplicable : 1;
247247 bool hasSideEffects : 1;
248248 bool hasSideEffects_Unset : 1;
249 bool neverHasSideEffects : 1;
250249 bool isAsCheapAsAMove : 1;
251250 bool hasExtraSrcRegAllocReq : 1;
252251 bool hasExtraDefRegAllocReq : 1;