Change MRegisterDesc::AliasSet, TargetInstrDescriptor::ImplicitDefs
authorAlkis Evlogimenos <alkis@evlogimenos.com>
Wed, 8 Oct 2003 05:20:08 +0000 (05:20 +0000)
committerAlkis Evlogimenos <alkis@evlogimenos.com>
Wed, 8 Oct 2003 05:20:08 +0000 (05:20 +0000)
commit73ff5120eb8b8c0ccbfed8a17f1024c67a75f319
treeea737ea5c41b893d3584c3c2d2f0ba5e118d929d
parent6b8b22585c8ee1ee9bed9c218c604dfb3d88a851
Change MRegisterDesc::AliasSet, TargetInstrDescriptor::ImplicitDefs
and TargetInstrDescriptor::ImplicitUses to always point to a null
terminated array and never be null. So there is no need to check for
pointer validity when iterating over those sets. Code that looked
like:

if (const unsigned* AS = TID.ImplicitDefs) {
  for (int i = 0; AS[i]; ++i) {
    // use AS[i]
  }
}

was changed to:

for (const unsigned* AS = TID.ImplicitDefs; *AS; ++AS) {
  // use *AS
}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8960 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/LiveVariables.cpp
lib/CodeGen/PrologEpilogInserter.cpp
lib/CodeGen/RegAllocLocal.cpp
lib/CodeGen/RegAllocSimple.cpp
utils/TableGen/InstrInfoEmitter.cpp
utils/TableGen/RegisterInfoEmitter.cpp