summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/SystemZInstrInfo.h
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-03 10:10:02 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-03 10:10:02 +0000
commitfa487e83a83c260d6a50f3df00a0eb012553a912 (patch)
treef6ddd72df044eaa9cabbce37fd4b04f64b978139 /lib/Target/SystemZ/SystemZInstrInfo.h
parentb81b477cd4392a51112c3af0659ea9fc176e74f1 (diff)
downloadllvm-fa487e83a83c260d6a50f3df00a0eb012553a912.tar.gz
llvm-fa487e83a83c260d6a50f3df00a0eb012553a912.tar.bz2
llvm-fa487e83a83c260d6a50f3df00a0eb012553a912.tar.xz
[SystemZ] Fold more spills
Add a mapping from register-based <INSN>R instructions to the corresponding memory-based <INSN>. Use it to cut down on the number of spill loads. Some instructions extend their operands from smaller fields, so this required a new TSFlags field to say how big the unextended operand is. This optimisation doesn't trigger for C(G)R and CL(G)R because in practice we always combine those instructions with a branch. Adding a test for every other case probably seems excessive, but it did catch a missed optimisation for DSGF (fixed in r185435). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185529 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZInstrInfo.h')
-rw-r--r--lib/Target/SystemZ/SystemZInstrInfo.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/SystemZ/SystemZInstrInfo.h b/lib/Target/SystemZ/SystemZInstrInfo.h
index 8d9a3eaacf..11d486cafb 100644
--- a/lib/Target/SystemZ/SystemZInstrInfo.h
+++ b/lib/Target/SystemZ/SystemZInstrInfo.h
@@ -32,8 +32,14 @@ namespace SystemZII {
SimpleBDXStore = (1 << 1),
Has20BitOffset = (1 << 2),
HasIndex = (1 << 3),
- Is128Bit = (1 << 4)
+ Is128Bit = (1 << 4),
+ AccessSizeMask = (31 << 5),
+ AccessSizeShift = 5
};
+ static inline unsigned getAccessSize(unsigned int Flags) {
+ return (Flags & AccessSizeMask) >> AccessSizeShift;
+ }
+
// SystemZ MachineOperand target flags.
enum {
// Masks out the bits for the access model.