Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: src/IceTargetLoweringMIPS32.cpp

Issue 2275883002: [SubZero] Branch optimization (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Tests added for branch optimization. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceInstMIPS32.cpp ('k') | tests_lit/llvm2ice_tests/branch-opt.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringMIPS32.cpp
diff --git a/src/IceTargetLoweringMIPS32.cpp b/src/IceTargetLoweringMIPS32.cpp
index 7a91331cd8aa95362b94b4553e8c71a5ed644a99..7a3271438b177e00656a560dcd0f2eda173c1e70 100644
--- a/src/IceTargetLoweringMIPS32.cpp
+++ b/src/IceTargetLoweringMIPS32.cpp
@@ -396,9 +396,9 @@ void TargetMIPS32::translateOm1() {
}
bool TargetMIPS32::doBranchOpt(Inst *Instr, const CfgNode *NextNode) {
- (void)Instr;
- (void)NextNode;
- UnimplementedError(getFlags());
+ if (auto *Br = llvm::dyn_cast<InstMIPS32Br>(Instr)) {
+ return Br->optimizeBranch(NextNode);
+ }
return false;
}
« no previous file with comments | « src/IceInstMIPS32.cpp ('k') | tests_lit/llvm2ice_tests/branch-opt.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698