forked from OSchip/llvm-project
[AVX] Unique BitInit
Keep only two copies of BitInit: one for true and one for false. llvm-svn: 136488
This commit is contained in:
parent
377e12cf75
commit
772b2c6bf1
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue