Update prebuilt Clang to r416183b from Android.
https://android.googlesource.com/platform/prebuilts/clang/host/
linux-x86/+/06a71ddac05c22edb2d10b590e1769b3f8619bef
clang 12.0.5 (based on r416183b) from build 7284624.
Change-Id: I277a316abcf47307562d8b748b84870f31a72866
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/linux-x64/clang/include/llvm/CodeGen/MachineScheduler.h b/linux-x64/clang/include/llvm/CodeGen/MachineScheduler.h
index 75a334f..a7edaaa 100644
--- a/linux-x64/clang/include/llvm/CodeGen/MachineScheduler.h
+++ b/linux-x64/clang/include/llvm/CodeGen/MachineScheduler.h
@@ -80,7 +80,6 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
-#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachinePassRegistry.h"
#include "llvm/CodeGen/RegisterPressure.h"
@@ -100,7 +99,9 @@
extern cl::opt<bool> ForceTopDown;
extern cl::opt<bool> ForceBottomUp;
+extern cl::opt<bool> VerifyScheduling;
+class AAResults;
class LiveIntervals;
class MachineDominatorTree;
class MachineFunction;
@@ -120,7 +121,7 @@
const MachineLoopInfo *MLI = nullptr;
const MachineDominatorTree *MDT = nullptr;
const TargetPassConfig *PassConfig = nullptr;
- AliasAnalysis *AA = nullptr;
+ AAResults *AA = nullptr;
LiveIntervals *LIS = nullptr;
RegisterClassInfo *RegClassInfo;
@@ -185,6 +186,9 @@
// first.
bool DisableLatencyHeuristic = false;
+ // Compute DFSResult for use in scheduling heuristics.
+ bool ComputeDFSResult = false;
+
MachineSchedPolicy() = default;
};
@@ -260,7 +264,7 @@
/// PreRA and PostRA MachineScheduler.
class ScheduleDAGMI : public ScheduleDAGInstrs {
protected:
- AliasAnalysis *AA;
+ AAResults *AA;
LiveIntervals *LIS;
std::unique_ptr<MachineSchedStrategy> SchedImpl;
@@ -756,7 +760,16 @@
unsigned getOtherResourceCount(unsigned &OtherCritIdx);
- void releaseNode(SUnit *SU, unsigned ReadyCycle);
+ /// Release SU to make it ready. If it's not in hazard, remove it from
+ /// pending queue (if already in) and push into available queue.
+ /// Otherwise, push the SU into pending queue.
+ ///
+ /// @param SU The unit to be released.
+ /// @param ReadyCycle Until which cycle the unit is ready.
+ /// @param InPQueue Whether SU is already in pending queue.
+ /// @param Idx Position offset in pending queue (if in it).
+ void releaseNode(SUnit *SU, unsigned ReadyCycle, bool InPQueue,
+ unsigned Idx = 0);
void bumpCycle(unsigned NextCycle);
@@ -954,7 +967,7 @@
if (SU->isScheduled)
return;
- Top.releaseNode(SU, SU->TopReadyCycle);
+ Top.releaseNode(SU, SU->TopReadyCycle, false);
TopCand.SU = nullptr;
}
@@ -962,7 +975,7 @@
if (SU->isScheduled)
return;
- Bot.releaseNode(SU, SU->BotReadyCycle);
+ Bot.releaseNode(SU, SU->BotReadyCycle, false);
BotCand.SU = nullptr;
}
@@ -1008,7 +1021,7 @@
/// initPolicy -> initialize(DAG) -> registerRoots -> pickNode ...
class PostGenericScheduler : public GenericSchedulerBase {
protected:
- ScheduleDAGMI *DAG;
+ ScheduleDAGMI *DAG = nullptr;
SchedBoundary Top;
SmallVector<SUnit*, 8> BotRoots;
@@ -1042,7 +1055,7 @@
void releaseTopNode(SUnit *SU) override {
if (SU->isScheduled)
return;
- Top.releaseNode(SU, SU->TopReadyCycle);
+ Top.releaseNode(SU, SU->TopReadyCycle, false);
}
// Only called for roots.
@@ -1051,7 +1064,7 @@
}
protected:
- void tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand);
+ virtual void tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand);
void pickNodeFromQueue(SchedCandidate &Cand);
};