diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-17 07:30:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-17 07:30:41 +0000 |
commit | 860e8862c1fbd3b261da4a64a8c0096f9f373681 (patch) | |
tree | ba95a7260d5d7f0c2ef8f5f3f64c65d2d8c86718 /lib/Target/PowerPC/PPCISelLowering.h | |
parent | db40dc2d631faa52f4fbe655c5d7677d9b2ede8c (diff) | |
download | external_llvm-860e8862c1fbd3b261da4a64a8c0096f9f373681.zip external_llvm-860e8862c1fbd3b261da4a64a8c0096f9f373681.tar.gz external_llvm-860e8862c1fbd3b261da4a64a8c0096f9f373681.tar.bz2 |
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
Diffstat (limited to 'lib/Target/PowerPC/PPCISelLowering.h')
-rw-r--r-- | lib/Target/PowerPC/PPCISelLowering.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.h b/lib/Target/PowerPC/PPCISelLowering.h index f44f192..d68ac14 100644 --- a/lib/Target/PowerPC/PPCISelLowering.h +++ b/lib/Target/PowerPC/PPCISelLowering.h @@ -38,6 +38,17 @@ namespace llvm { /// operand, producing an f64 value containing the integer representation /// of that FP value. FCTIDZ, FCTIWZ, + + /// Hi/Lo - These represent the high and low 16-bit parts of a global + /// address respectively. These nodes have two operands, the first of + /// which must be a TargetGlobalAddress, and the second of which must be a + /// Constant. Selected naively, these turn into 'lis G+C' and 'li G+C', + /// though these are usually folded into other nodes. + Hi, Lo, + + /// GlobalBaseReg - On Darwin, this node represents the result of the mflr + /// at function entry, used for PIC code. + GlobalBaseReg, }; } |