summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/SystemZ.h
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-09-25 10:11:07 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-09-25 10:11:07 +0000
commitc2b840cb7c58e59c68aaa589841c41fb272df66d (patch)
treeb9ba05d65c96d6b7e9d32d3fa75caa9c4abeb45b /lib/Target/SystemZ/SystemZ.h
parent8ba3f9c9008223136207295b48b53c8aefffa178 (diff)
downloadllvm-c2b840cb7c58e59c68aaa589841c41fb272df66d.tar.gz
llvm-c2b840cb7c58e59c68aaa589841c41fb272df66d.tar.bz2
llvm-c2b840cb7c58e59c68aaa589841c41fb272df66d.tar.xz
[SystemZ] Add instruction-shortening pass
When loading immediates into a GR32, the port prefered LHI, followed by LLILH or LLILL, followed by IILF. LHI and IILF are natural 32-bit operations, but LLILH and LLILL also clear the upper 32 bits of the register. This was represented as taking a 32-bit subreg of a 64-bit assignment. Using subregs for something as simple as a move immediate was probably a bad idea. Also, I have patches to add support for the high-word facility, and we don't want something like LLILH and LLILL to stop the high word of the same GPR from being used. This patch therefore uses LHI and IILF to begin with and adds a late machine-specific pass to use LLILH and LLILL if the other half of the register is not live. The high-word patches extend this behavior to IIHF, LLIHL and LLIHH. No behavioral change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZ.h')
-rw-r--r--lib/Target/SystemZ/SystemZ.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Target/SystemZ/SystemZ.h b/lib/Target/SystemZ/SystemZ.h
index 1647d93c02..4a6b4db9d6 100644
--- a/lib/Target/SystemZ/SystemZ.h
+++ b/lib/Target/SystemZ/SystemZ.h
@@ -106,6 +106,7 @@ namespace llvm {
FunctionPass *createSystemZISelDag(SystemZTargetMachine &TM,
CodeGenOpt::Level OptLevel);
FunctionPass *createSystemZElimComparePass(SystemZTargetMachine &TM);
+ FunctionPass *createSystemZShortenInstPass(SystemZTargetMachine &TM);
FunctionPass *createSystemZLongBranchPass(SystemZTargetMachine &TM);
} // end namespace llvm;
#endif