mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Bytecode format for LLVM 1.2 no longer explicitly encodes zeros in primitive
type planes. This saves about 5k on 176.gcc, and is needed for a subsequent patch of mine I'm working on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10908 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -406,6 +406,10 @@ int SlotCalculator::insertValue(const Value *D, bool dontIgnore) {
|
||||
return doInsertValue(D);
|
||||
}
|
||||
|
||||
static inline bool hasNullValue(unsigned TyID) {
|
||||
return TyID != Type::LabelTyID && TyID != Type::TypeTyID &&
|
||||
TyID != Type::VoidTyID;
|
||||
}
|
||||
|
||||
// doInsertValue - This is a small helper function to be called only
|
||||
// be insertValue.
|
||||
@ -435,7 +439,7 @@ int SlotCalculator::doInsertValue(const Value *D) {
|
||||
|
||||
// If this is the first value to get inserted into the type plane, make sure
|
||||
// to insert the implicit null value...
|
||||
if (Table[Ty].empty() && Ty >= Type::FirstDerivedTyID && BuildBytecodeInfo) {
|
||||
if (Table[Ty].empty() && BuildBytecodeInfo && hasNullValue(Ty)) {
|
||||
Value *ZeroInitializer = Constant::getNullValue(Typ);
|
||||
|
||||
// If we are pushing zeroinit, it will be handled below.
|
||||
|
Reference in New Issue
Block a user