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

Unified Diff: lib/Target/Mips/MipsNaClRewritePass.cpp

Issue 11883035: [MIPS] Skip masking loads and stores via thread pointer. (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Created 7 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Target/Mips/MipsNaClRewritePass.cpp
diff --git a/lib/Target/Mips/MipsNaClRewritePass.cpp b/lib/Target/Mips/MipsNaClRewritePass.cpp
index f675e5663a9a85cb7bba68b1fd927b5407d6b62b..1ef5632e0994687ae523b154dc43888e4e5a8b6e 100644
--- a/lib/Target/Mips/MipsNaClRewritePass.cpp
+++ b/lib/Target/Mips/MipsNaClRewritePass.cpp
@@ -209,9 +209,12 @@ bool IsDangerousLoad(const MachineInstr &MI, int *AddrIdx) {
break;
}
- if (MI.getOperand(*AddrIdx).getReg() == Mips::SP) {
- // The contents of SP do not require masking.
- return false;
+ switch (MI.getOperand(*AddrIdx).getReg()) {
+ default: break;
+ // The contents of SP and thread pointer register do not require masking.
+ case Mips::SP:
+ case Mips::T8:
+ return false;
}
return true;
@@ -238,9 +241,12 @@ bool IsDangerousStore(const MachineInstr &MI, int *AddrIdx) {
break;
}
- if (MI.getOperand(*AddrIdx).getReg() == Mips::SP) {
- // The contents of SP do not require masking.
- return false;
+ switch (MI.getOperand(*AddrIdx).getReg()) {
+ default: break;
+ // The contents of SP and thread pointer register do not require masking.
+ case Mips::SP:
+ case Mips::T8:
+ return false;
}
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698