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

Unified Diff: src/IceTargetLoweringX8632.cpp

Issue 369573005: Avoid assigning esp (or ebp for framepointer-using frames) in Om1. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 6 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: src/IceTargetLoweringX8632.cpp
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index fec2d625f544eff323a05acacd436868da414501..49375a61ae122495f85974c97eeef28c4c38765c 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -2521,7 +2521,11 @@ void TargetX8632::postLower() {
if (Ctx->getOptLevel() != Opt_m1)
return;
// TODO: Avoid recomputing WhiteList every instruction.
- llvm::SmallBitVector WhiteList = getRegisterSet(RegSet_All, RegSet_None);
+ RegSetMask RegInclude = RegSet_All;
+ RegSetMask RegExclude = RegSet_None | RegSet_StackPointer;
Jim Stichnoth 2014/07/02 23:03:36 Could probably just use RegSetMask RegExclude =
Jim Stichnoth 2014/07/02 23:23:44 Actually, it would be even better to use RegSet_No
jvoung (off chromium) 2014/07/02 23:43:38 Okay so the idea is mark esp as a non-int register
+ if (hasFramePointer())
+ RegExclude |= RegSet_FramePointer;
+ llvm::SmallBitVector WhiteList = getRegisterSet(RegInclude, RegExclude);
// Make one pass to black-list pre-colored registers. TODO: If
// there was some prior register allocation pass that made register
// assignments, those registers need to be black-listed here as
« 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