Commit 8bd18e1b by Nicolas Capens Committed by Nicolas Capens

Work around empty set default parameter compilation issue.

Older versions of Clang don't allow using an empty set as the default parameter of a class with an explicit constructor. "error: chosen constructor is explicit in copy-initialization" BUG=chromium:630728 Change-Id: I580073788ce3346d1ecffab336a0fcee210b2e0f Reviewed-on: https://chromium-review.googlesource.com/431080Reviewed-by: 's avatarJim Stichnoth <stichnot@chromium.org>
parent 5c4d677c
...@@ -32,7 +32,7 @@ class LinearScan { ...@@ -32,7 +32,7 @@ class LinearScan {
public: public:
explicit LinearScan(Cfg *Func); explicit LinearScan(Cfg *Func);
void init(RegAllocKind Kind, CfgSet<Variable *> ExcludeVars = {}); void init(RegAllocKind Kind, CfgSet<Variable *> ExcludeVars);
void scan(const SmallBitVector &RegMask, bool Randomized); void scan(const SmallBitVector &RegMask, bool Randomized);
// Returns the number of times some variable has been assigned a register but // Returns the number of times some variable has been assigned a register but
// later evicted because of a higher-priority allocation. The idea is that we // later evicted because of a higher-priority allocation. The idea is that we
......
...@@ -514,8 +514,9 @@ void TargetLowering::regAlloc(RegAllocKind Kind) { ...@@ -514,8 +514,9 @@ void TargetLowering::regAlloc(RegAllocKind Kind) {
RegExclude |= RegSet_FramePointer; RegExclude |= RegSet_FramePointer;
SmallBitVector RegMask = getRegisterSet(RegInclude, RegExclude); SmallBitVector RegMask = getRegisterSet(RegInclude, RegExclude);
bool Repeat = (Kind == RAK_Global && getFlags().getRepeatRegAlloc()); bool Repeat = (Kind == RAK_Global && getFlags().getRepeatRegAlloc());
CfgSet<Variable *> EmptySet;
do { do {
LinearScan.init(Kind); LinearScan.init(Kind, EmptySet);
LinearScan.scan(RegMask, getFlags().getRandomizeRegisterAllocation()); LinearScan.scan(RegMask, getFlags().getRandomizeRegisterAllocation());
if (!LinearScan.hasEvictions()) if (!LinearScan.hasEvictions())
Repeat = false; Repeat = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment