[AVX] Unique BitInit

Keep only two copies of BitInit: one for true and one for false.

llvm-svn: 136488
This commit is contained in:
David Greene 2011-07-29 19:07:10 +00:00
parent 377e12cf75
commit 772b2c6bf1
1 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,4 @@
//===- Record.cpp - Record implementation ---------------------------------===//
//
// The LLVM Compiler Infrastructure
@ -448,7 +449,10 @@ const UnsetInit *UnsetInit::get() {
}
const BitInit *BitInit::get(bool V) {
return new BitInit(V);
static const BitInit True(true);
static const BitInit False(false);
return V ? &True : &False;
}
const BitsInit *BitsInit::get(ArrayRef<const Init *> Range) {