mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Disable machine LICM speculation check (for profitability) until I have time to investigate the regressions.
llvm-svn: 141813
This commit is contained in:
parent
19d2ebc9a4
commit
6ffc02582e
@ -37,10 +37,16 @@
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
using namespace llvm;
|
||||
|
||||
static cl::opt<bool>
|
||||
AvoidSpeculation("avoid-speculation",
|
||||
cl::desc("MachineLICM should avoid speculation"),
|
||||
cl::init(false), cl::Hidden);
|
||||
|
||||
STATISTIC(NumHoisted,
|
||||
"Number of machine instructions hoisted out of loops");
|
||||
STATISTIC(NumLowRP,
|
||||
@ -1052,14 +1058,17 @@ bool MachineLICM::IsProfitableToHoist(MachineInstr &MI) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// High register pressure situation, only hoist if the instruction is going to
|
||||
// be remat'ed.
|
||||
// Also, do not "speculate" in high register pressure situation. If an
|
||||
// Do not "speculate" in high register pressure situation. If an
|
||||
// instruction is not guaranteed to be executed in the loop, it's best to be
|
||||
// conservative.
|
||||
if ((!IsGuaranteedToExecute(MI.getParent()) && !MayCSE(&MI)) ||
|
||||
(!TII->isTriviallyReMaterializable(&MI, AA) &&
|
||||
!MI.isInvariantLoad(AA)))
|
||||
if (AvoidSpeculation &&
|
||||
(!IsGuaranteedToExecute(MI.getParent()) && !MayCSE(&MI)))
|
||||
return false;
|
||||
|
||||
// High register pressure situation, only hoist if the instruction is going to
|
||||
// be remat'ed.
|
||||
if (!TII->isTriviallyReMaterializable(&MI, AA) &&
|
||||
!MI.isInvariantLoad(AA))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user