Skip to content

Commit

Permalink
Merge rust-lang#46
Browse files Browse the repository at this point in the history
46: Fix the "-yk-no-fallthrough" flag. r=ltratt a=vext01



Co-authored-by: Edd Barrett <vext01@gmail.com>
  • Loading branch information
bors[bot] and vext01 committed Sep 23, 2022
2 parents d4e99bc + ebf2331 commit 43cfd81
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions llvm/lib/CodeGen/CodeGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@

using namespace llvm;

llvm::cl::opt<bool> YkNoFallThrough(
"yk-no-fallthrough", cl::Hidden, cl::init(false),
bool YkNoFallThrough;
llvm::cl::opt<bool, true> YkNoFallThroughParser(
"yk-no-fallthrough", cl::Hidden, cl::location(YkNoFallThrough),
cl::init(false),
cl::desc("Always emit a branch even if fallthrough is possible. This "
"is required for the yk JIT, so that the machine IR has the "
"same block structure as the high-level IR"));
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
using namespace llvm;
using namespace PatternMatch;

extern cl::opt<bool> YkNoFallThrough;
extern bool YkNoFallThrough;

#define DEBUG_TYPE "isel"

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static cl::opt<unsigned> SwitchPeelThreshold(
"switch statement. A value greater than 100 will void this "
"optimization"));

extern cl::opt<bool> YkNoFallThrough;
extern bool YkNoFallThrough;

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

0 comments on commit 43cfd81

Please sign in to comment.