Add an initial hack at legalizing GlobalAddress into the appropriate nodes
authorChris Lattner <sabre@nondot.org>
Thu, 17 Nov 2005 07:30:41 +0000 (07:30 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 17 Nov 2005 07:30:41 +0000 (07:30 +0000)
commit860e8862c1fbd3b261da4a64a8c0096f9f373681
treeba95a7260d5d7f0c2ef8f5f3f64c65d2d8c86718
parentdb40dc2d631faa52f4fbe655c5d7677d9b2ede8c
Add an initial hack at legalizing GlobalAddress into the appropriate nodes
on Darwin to remove smarts from the isel.  This is currently disabled by
default (uncomment setOperationAction(ISD::GlobalAddress to enable it).
tblgen needs to become smarter about tglobaladdr nodes and bigger patterns
needed to be added to the .td file.  However, we can currently emit stuff like
this:  :)

        li r2, lo16(L_x$non_lazy_ptr)
        lis r3, ha16(L_x$non_lazy_ptr)
        lwzx r2, r3, r2

The obvious improvements will follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24390 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h
lib/Target/PowerPC/PPCInstrInfo.td