Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/e10589a505b44f4f0394500c6a0d2db5baa7f3f4 >--------------------------------------------------------------- commit e10589a505b44f4f0394500c6a0d2db5baa7f3f4 Author: David Terei <[email protected]> Date: Thu Jan 12 11:58:15 2012 -0800 Improve LLVM TBAA hierachy (#5567). >--------------------------------------------------------------- compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 4 ++-- compiler/llvmGen/LlvmCodeGen/Regs.hs | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs index 4309dcd..ee4a29b 100644 --- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs +++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs @@ -550,7 +550,7 @@ genStore env addr@(CmmMachOp (MO_Sub _) [ = genStore_fast env addr r (negate $ fromInteger n) val -- generic case -genStore env addr val = genStore_slow env addr val [top] +genStore env addr val = genStore_slow env addr val [other] -- | CmmStore operation -- This is a special case for storing to a global register pointer @@ -1032,7 +1032,7 @@ genLoad env e@(CmmMachOp (MO_Sub _) [ = genLoad_fast env e r (negate $ fromInteger n) ty -- generic case -genLoad env e ty = genLoad_slow env e ty [top] +genLoad env e ty = genLoad_slow env e ty [other] -- | Handle CmmLoad expression. -- This is a special case for loading from a global register pointer diff --git a/compiler/llvmGen/LlvmCodeGen/Regs.hs b/compiler/llvmGen/LlvmCodeGen/Regs.hs index 55b2e0d..15a1897 100644 --- a/compiler/llvmGen/LlvmCodeGen/Regs.hs +++ b/compiler/llvmGen/LlvmCodeGen/Regs.hs @@ -4,7 +4,7 @@ module LlvmCodeGen.Regs ( lmGlobalRegArg, lmGlobalRegVar, alwaysLive, - stgTBAA, top, base, stack, heap, rx, tbaa, getTBAA + stgTBAA, top, base, stack, heap, rx, other, tbaa, getTBAA ) where #include "HsVersions.h" @@ -70,6 +70,11 @@ stgTBAA , MetaUnamed heapN [MetaStr (fsLit "heap"), MetaNode topN] , MetaUnamed rxN [MetaStr (fsLit "rx"), MetaNode heapN] , MetaUnamed baseN [MetaStr (fsLit "base"), MetaNode topN] + -- FIX: Not 100% sure about 'others' place. Might need to be under 'heap'. + -- OR I think the big thing is Sp is never aliased, so might want + -- to change the hieracy to have Sp on its own branch that is never + -- aliased (e.g never use top as a TBAA node). + , MetaUnamed otherN [MetaStr (fsLit "other"), MetaNode topN] ] -- | Id values @@ -79,6 +84,7 @@ stackN = LMMetaUnamed 1 heapN = LMMetaUnamed 2 rxN = LMMetaUnamed 3 baseN = LMMetaUnamed 4 +otherN = LMMetaUnamed 5 -- | The various TBAA types top, heap, stack, rx, base :: MetaData @@ -87,6 +93,7 @@ heap = (tbaa, heapN) stack = (tbaa, stackN) rx = (tbaa, rxN) base = (tbaa, baseN) +other = (tbaa, otherN) -- | The TBAA metadata identifier tbaa :: LMString _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
