diff options
| author | 2012-11-13 16:31:10 -0800 | |
|---|---|---|
| committer | 2012-11-14 12:23:53 -0800 | |
| commit | f0504cdc5b6400edd4b39eea64ac280465042d5b (patch) | |
| tree | 09aea792db81ef23e4b5264acc76b677382e3e84 /src/compiler/codegen/LocalOptimizations.cc | |
| parent | ec13743da80a80c1817cf6660c28917fc28846bc (diff) | |
Quick backend: rename target-specific #defines
Another step towards a single compiler. The #include build mechanism
relies on macros with the same name to take on different values for
our various targets. This CL prepends a target-specific string
(and exposes some needed by common code as functions rather than #defines).
Macros and #defines still available for use from target-dependent code,
but functions added for target independent use. For example,
rRET0 for Arm becomes rARM_RET0 in target-dependent code, and
targetRegister(kRet0) in target-independent code.
No logic changes, other than adding functions to return previously #defined
values. As of this CL, the primary target includes, xxxLIR.h, have no
macro collisions.
Change-Id: I5e11df844815b7d129b525a209dd7c46bd9a4a09
Diffstat (limited to 'src/compiler/codegen/LocalOptimizations.cc')
| -rw-r--r-- | src/compiler/codegen/LocalOptimizations.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/codegen/LocalOptimizations.cc b/src/compiler/codegen/LocalOptimizations.cc index d2275aad4a..2688d65877 100644 --- a/src/compiler/codegen/LocalOptimizations.cc +++ b/src/compiler/codegen/LocalOptimizations.cc @@ -151,7 +151,7 @@ void applyLoadStoreElimination(CompilationUnit* cUnit, LIR* headLIR, DCHECK(!(EncodingMap[checkLIR->opcode].flags & IS_STORE)); /* Same value && same register type */ if (checkLIR->aliasInfo == thisLIR->aliasInfo && - REGTYPE(checkLIR->operands[0]) == REGTYPE(nativeRegId)) { + sameRegType(checkLIR->operands[0], nativeRegId)) { /* * Different destination register - insert * a move @@ -166,8 +166,7 @@ void applyLoadStoreElimination(CompilationUnit* cUnit, LIR* headLIR, /* Must alias */ if (checkLIR->aliasInfo == thisLIR->aliasInfo) { /* Only optimize compatible registers */ - bool regCompatible = - REGTYPE(checkLIR->operands[0]) == REGTYPE(nativeRegId); + bool regCompatible = sameRegType(checkLIR->operands[0], nativeRegId); if ((isThisLIRLoad && isCheckLIRLoad) || (!isThisLIRLoad && isCheckLIRLoad)) { /* RAR or RAW */ |