Subzero: Simplify the FakeKill instruction.

Even after earlier simplifications, FakeKill was still handled somewhat inefficiently for the register allocator.  For x86-32, any function containing call instructions would result in about 11 pre-colored Variables, each with an identical and relatively complex live range consisting of points.  They would start out on the UnhandledPrecolored list, then all move to the Inactive list, where they would be repeatedly compared against each register allocation candidate via overlapsRange().

We improve this by keeping around a single copy of that live range and directly masking out the Free[] register set when that live range overlaps the current candidate's live range.  This saves ~10 overlaps() calculations per candidate while FakeKills are still pending.

Also, slightly rearrange the initialization of the Unhandled etc. sets into a separate init routine, which will make it easier to reuse the register allocator in other situations such as Om1 post-lowering.

BUG= none
R=jvoung@chromium.org

Review URL: https://codereview.chromium.org/720343003
diff --git a/src/IceInst.cpp b/src/IceInst.cpp
index 090faba..5030f5f 100644
--- a/src/IceInst.cpp
+++ b/src/IceInst.cpp
@@ -114,8 +114,6 @@
 
 void Inst::livenessLightweight(Cfg *Func, LivenessBV &Live) {
   assert(!isDeleted());
-  if (llvm::isa<InstFakeKill>(this))
-    return;
   resetLastUses();
   VariablesMetadata *VMetadata = Func->getVMetadata();
   SizeT VarIndex = 0;
@@ -139,8 +137,6 @@
                     Liveness *Liveness, LiveBeginEndMap *LiveBegin,
                     LiveBeginEndMap *LiveEnd) {
   assert(!isDeleted());
-  if (llvm::isa<InstFakeKill>(this))
-    return true;
 
   Dead = false;
   if (Dest) {
@@ -181,15 +177,13 @@
           // twice.  ICE only allows a variable to have a single
           // liveness interval in a basic block (except for blocks
           // where a variable is live-in and live-out but there is a
-          // gap in the middle, and except for the special
-          // InstFakeKill instruction that can appear multiple
-          // times in the same block).  Therefore, this lowered
-          // sequence needs to represent a single conservative live
-          // range for t.  Since the instructions are being traversed
-          // backwards, we make sure LiveEnd is only set once by
-          // setting it only when LiveEnd[VarNum]==0 (sentinel value).
-          // Note that it's OK to set LiveBegin multiple times because
-          // of the backwards traversal.
+          // gap in the middle).  Therefore, this lowered sequence
+          // needs to represent a single conservative live range for
+          // t.  Since the instructions are being traversed backwards,
+          // we make sure LiveEnd is only set once by setting it only
+          // when LiveEnd[VarNum]==0 (sentinel value).  Note that it's
+          // OK to set LiveBegin multiple times because of the
+          // backwards traversal.
           if (LiveEnd) {
             // Ideally, we would verify that VarNum wasn't already
             // added in this block, but this can't be done very
@@ -452,10 +446,8 @@
   addSource(Src);
 }
 
-InstFakeKill::InstFakeKill(Cfg *Func, const VarList &KilledRegs,
-                           const Inst *Linked)
-    : InstHighLevel(Func, Inst::FakeKill, 0, NULL), KilledRegs(KilledRegs),
-      Linked(Linked) {}
+InstFakeKill::InstFakeKill(Cfg *Func, const Inst *Linked)
+    : InstHighLevel(Func, Inst::FakeKill, 0, NULL), Linked(Linked) {}
 
 // ======================== Dump routines ======================== //
 
@@ -757,14 +749,7 @@
   Ostream &Str = Func->getContext()->getStrDump();
   if (Linked->isDeleted())
     Str << "// ";
-  Str << "kill.pseudo ";
-  bool First = true;
-  for (Variable *Var : KilledRegs) {
-    if (!First)
-      Str << ", ";
-    First = false;
-    Var->dump(Func);
-  }
+  Str << "kill.pseudo scratch_regs";
 }
 
 void InstTarget::dump(const Cfg *Func) const {