diff options
| author | 2012-11-13 12:13:16 -0800 | |
|---|---|---|
| committer | 2012-11-13 13:13:40 -0800 | |
| commit | ec13743da80a80c1817cf6660c28917fc28846bc (patch) | |
| tree | f551225a325636dc56e0a3c01c55a59316e9e829 /src/compiler/codegen/LocalOptimizations.cc | |
| parent | f42b6f912dd390808bbd5c025d773ebb02a06ed7 (diff) | |
Revert "Revert "Refactor codegen resource masks""
This reverts commit 4b39c9f1b77ff32cf5760e6bf77c189678e2c9a6.
The problem with the original commit was failure to widen a
couple of local variables to hold the newly widenened to 64-bits
EncodingMap flag field - thus we lost some high-order resource
attributes and broke instruction scheduling for x86.
Change-Id: I04d7caf79e2cc802c39369ca04666629218ccaea
Diffstat (limited to 'src/compiler/codegen/LocalOptimizations.cc')
| -rw-r--r-- | src/compiler/codegen/LocalOptimizations.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/codegen/LocalOptimizations.cc b/src/compiler/codegen/LocalOptimizations.cc index c0e6036b7f..d2275aad4a 100644 --- a/src/compiler/codegen/LocalOptimizations.cc +++ b/src/compiler/codegen/LocalOptimizations.cc @@ -121,7 +121,7 @@ void applyLoadStoreElimination(CompilationUnit* cUnit, LIR* headLIR, * region bits since stopMask is used to check data/control * dependencies. */ - stopUseRegMask = (ENCODE_REG_PC | thisLIR->useMask) & ~ENCODE_MEM; + stopUseRegMask = (getPCUseDefEncoding() | thisLIR->useMask) & ~ENCODE_MEM; } for (checkLIR = NEXT_LIR(thisLIR); @@ -232,7 +232,7 @@ void applyLoadStoreElimination(CompilationUnit* cUnit, LIR* headLIR, if (cUnit->instructionSet == kX86) { // Prevent stores from being sunk between ops that generate ccodes and // ops that use them. - int flags = EncodingMap[checkLIR->opcode].flags; + uint64_t flags = EncodingMap[checkLIR->opcode].flags; if (sinkDistance > 0 && (flags & IS_BRANCH) && (flags & USES_CCODES)) { checkLIR = PREV_LIR(checkLIR); sinkDistance--; @@ -298,7 +298,7 @@ void applyLoadHoisting(CompilationUnit* cUnit, LIR* headLIR, LIR* tailLIR) * conservatively here. */ if (stopUseAllMask & ENCODE_HEAP_REF) { - stopUseAllMask |= ENCODE_REG_PC; + stopUseAllMask |= getPCUseDefEncoding(); } } |