|
@@ -359,7 +359,8 @@ bool MergedLoadStoreMotion::mergeLoads(BasicBlock *BB) {
|
|
BasicBlock *Succ0 = BI->getSuccessor(0);
|
|
BasicBlock *Succ0 = BI->getSuccessor(0);
|
|
BasicBlock *Succ1 = BI->getSuccessor(1);
|
|
BasicBlock *Succ1 = BI->getSuccessor(1);
|
|
// #Instructions in Succ1 for Compile Time Control
|
|
// #Instructions in Succ1 for Compile Time Control
|
|
- int Size1 = Succ1->size();
|
|
|
|
|
|
+ // int Size1 = Succ1->size(); // HLSL Change
|
|
|
|
+ int Size1 = Succ1->compute_size_no_dbg(); // HLSL Change
|
|
int NLoads = 0;
|
|
int NLoads = 0;
|
|
for (BasicBlock::iterator BBI = Succ0->begin(), BBE = Succ0->end();
|
|
for (BasicBlock::iterator BBI = Succ0->begin(), BBE = Succ0->end();
|
|
BBI != BBE;) {
|
|
BBI != BBE;) {
|
|
@@ -529,7 +530,8 @@ bool MergedLoadStoreMotion::mergeStores(BasicBlock *T) {
|
|
return false; // No. More than 2 predecessors.
|
|
return false; // No. More than 2 predecessors.
|
|
|
|
|
|
// #Instructions in Succ1 for Compile Time Control
|
|
// #Instructions in Succ1 for Compile Time Control
|
|
- int Size1 = Pred1->size();
|
|
|
|
|
|
+ // int Size1 = Succ1->size(); // HLSL Change
|
|
|
|
+ int Size1 = Pred1->compute_size_no_dbg(); // HLSL Change
|
|
int NStores = 0;
|
|
int NStores = 0;
|
|
|
|
|
|
for (BasicBlock::reverse_iterator RBI = Pred0->rbegin(), RBE = Pred0->rend();
|
|
for (BasicBlock::reverse_iterator RBI = Pred0->rbegin(), RBE = Pred0->rend();
|