diff options
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 6 | 
2 files changed, 6 insertions, 2 deletions
| diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp index ee4b87227ae..93830b1f51e 100644 --- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -255,7 +255,7 @@ bool SROA::performScalarRepl(Function &F) {      uint64_t AllocaSize = TD->getTypePaddedSize(AI->getAllocatedType());      // Do not promote any struct whose size is too big. -    if (AllocaSize >= SRThreshold) continue; +    if (AllocaSize > SRThreshold) continue;      if ((isa<StructType>(AI->getAllocatedType()) ||           isa<ArrayType>(AI->getAllocatedType())) && diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 25579614ecf..96cd299242d 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -33,6 +33,10 @@ using namespace llvm;  STATISTIC(NumSpeculations, "Number of speculative executed instructions"); +#include "llvm/Support/CommandLine.h" +static cl::opt<bool> +DisableXForm("disable-xform", cl::Hidden, cl::init(false)); +  /// SafeToMergeTerminators - Return true if it is safe to merge these two  /// terminator instructions together.  /// @@ -1782,7 +1786,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) {        }        // If we found some, do the transformation! -      if (!UncondBranchPreds.empty()) { +      if (!UncondBranchPreds.empty() && !DisableXForm) {          while (!UncondBranchPreds.empty()) {            BasicBlock *Pred = UncondBranchPreds.back();            DOUT << "FOLDING: " << *BB | 

