Skip to content

Commit 43cfd81

Browse files
bors[bot]vext01
andauthored
46: Fix the "-yk-no-fallthrough" flag. r=ltratt a=vext01 Co-authored-by: Edd Barrett <vext01@gmail.com>
2 parents d4e99bc + ebf2331 commit 43cfd81

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

llvm/lib/CodeGen/CodeGen.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818

1919
using namespace llvm;
2020

21-
llvm::cl::opt<bool> YkNoFallThrough(
22-
"yk-no-fallthrough", cl::Hidden, cl::init(false),
21+
bool YkNoFallThrough;
22+
llvm::cl::opt<bool, true> YkNoFallThroughParser(
23+
"yk-no-fallthrough", cl::Hidden, cl::location(YkNoFallThrough),
24+
cl::init(false),
2325
cl::desc("Always emit a branch even if fallthrough is possible. This "
2426
"is required for the yk JIT, so that the machine IR has the "
2527
"same block structure as the high-level IR"));

llvm/lib/CodeGen/SelectionDAG/FastISel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
using namespace llvm;
111111
using namespace PatternMatch;
112112

113-
extern cl::opt<bool> YkNoFallThrough;
113+
extern bool YkNoFallThrough;
114114

115115
#define DEBUG_TYPE "isel"
116116

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static cl::opt<unsigned> SwitchPeelThreshold(
129129
"switch statement. A value greater than 100 will void this "
130130
"optimization"));
131131

132-
extern cl::opt<bool> YkNoFallThrough;
132+
extern bool YkNoFallThrough;
133133

134134
// Limit the width of DAG chains. This is important in general to prevent
135135
// DAG-based analysis from blowing up. For example, alias analysis and

0 commit comments

Comments
 (0)