[AVX] Create Inits Via Factory Method

Replace uses of new *Init with *Init::get.  This hides the allocation
implementation so that we can unique Inits in various ways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136486 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Greene
2011-07-29 19:07:07 +00:00
parent f37dd02f77
commit dcd35c797d
6 changed files with 346 additions and 141 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ void CodeEmitterGen::reverseBits(std::vector<Record*> &Insts) {
NewBits[middle] = BI->getBit(middle);
}
BitsInit *NewBI = new BitsInit(ArrayRef<const Init *>(NewBits));
const BitsInit *NewBI = BitsInit::get(NewBits);
// Update the bits in reversed order so that emitInstrOpBits will get the
// correct endianness.