diff --git a/src/base/SMPBasicBlock.cpp b/src/base/SMPBasicBlock.cpp index ba66690fb563e1b824b6acd19984212ce49bffe7..73add82ff207c63c62561919e1578a77bf6a93e9 100644 --- a/src/base/SMPBasicBlock.cpp +++ b/src/base/SMPBasicBlock.cpp @@ -1145,7 +1145,7 @@ bool SMPBasicBlock::ComputeReachesOutSet(void) { // Add DefOp, remove previous defs of DefOp that now do not reach the end of the block. void SMPBasicBlock::UpdateDownExposedDefs(STARSOpndTypePtr DefOp, STARS_ea_t InstAddr) { #if 1 - if (DefOp->IsRegOp() && (!this->GetFunc()->IsInStackPtrCopySet(DefOp))) + if (!this->GetFunc()->IsInStackPtrCopySet(DefOp)) return; #endif // First, remove any definition of DefOp that precedes the current definition. @@ -2559,7 +2559,7 @@ bool SMPBasicBlock::PropagateLocalMetadata(const STARSOpndTypePtr &UseOp, SMPMet if (this->GetLastLocalName() == NameIter) { return false; } - assert(0 <= SSANum); + assert(0 <= SSANum); STARS_ea_t DefAddr = this->GetDefAddrFromUseAddr(UseOp, UseAddr, SSANum, true); if ((DefAddr == STARS_BADADDR) || STARS_IsLiveInPseudoID(DefAddr)) { @@ -2922,7 +2922,7 @@ set<SMPPhiFunction, LessPhi>::iterator SMPBasicBlock::InferPhiDefType(set<SMPPhi bool SafeFunc = this->MyFunc->IsSafe(); bool IndirectOp = MDIsIndirectMemoryOpnd(DefOp, this->MyFunc->UsesFramePointer()); bool UnsafeOp = (IndirectOp || ((! DefOp->IsRegOp()) && (!SafeFunc))); - // Relax the UnsafeOp definition with alias analysis? + // Relax the UnsafeOp definition with alias analysis? assert(UNINIT == DefPhi->GetDefType()); for (size_t index = 0; index < DefPhi->GetPhiListSize(); ++index) { diff --git a/src/base/SMPFunction.cpp b/src/base/SMPFunction.cpp index 80d0df3127586cc4719a0ac3f9e20cc2c5ba1f89..e26b20b00b6f4ab8232d9d1e364a5caba8ecd744 100644 --- a/src/base/SMPFunction.cpp +++ b/src/base/SMPFunction.cpp @@ -3810,7 +3810,7 @@ void SMPFunction::EmitStackFrameAnnotations(FILE *AnnotFile, SMPInstr *Instr) { // Mark functions with multiple entry points. These will be unsafe for fast returns and // are probably IDA Pro disassembly problems rather than true multi-entry functions. void SMPFunction::DetectMultiEntryFunction(void) { - this->MultipleEntryPoints = GetFuncInfo()->IsMultiEntry(); + this->MultipleEntryPoints = GetFuncInfo()->IsMultiEntry(); } // end of SMPFunction::DetectMultiEntryFunction() // Audit and fix the IDA Pro code cross references for jumps and jump targets. @@ -5206,6 +5206,10 @@ void SMPFunction::ComputeSSA(void) { if (DebugFlag) SMP_msg("Marking dead registers.\n"); CurrBlock->MarkDeadRegs(); #endif + bool SingleExprBlock = CurrBlock->FindSingleExpression(); + if (SingleExprBlock) { + CurrBlock->SetSingleExpression(); + } } #if STARS_BUILD_LOOP_BITSET diff --git a/src/base/SMPInstr.cpp b/src/base/SMPInstr.cpp index 65d7f68d848d5e402d67ff3f48471b83a175bb80..e3586d7949d51e8a6ab5ccad2597444fcf2befb9 100644 --- a/src/base/SMPInstr.cpp +++ b/src/base/SMPInstr.cpp @@ -57,7 +57,7 @@ using namespace std; #define SMP_DEBUG_BUILD_RTL 1 // should be left on, serious errors! #define SMP_VERBOSE_DEBUG_BUILD_RTL 0 #define SMP_VERBOSE_DEBUG_BUILD_RTL_DEF_USE 0 -#define SMP_VERBOSE_DEBUG_INFER_TYPES 1 +#define SMP_VERBOSE_DEBUG_INFER_TYPES 0 #define SMP_VERBOSE_DUMP 0 #define SMP_VERBOSE_FIND_POINTERS 0 #define STARS_DUMP_FG_INFO 1 // show signedness of DEFs and USEs in dump