NameDateSize

..08-May-202026

AsmParser/H08-May-20203

Disassembler/H08-May-20203

MCTargetDesc/H08-May-202012

README.txtH A D06-May-20203.9 KiB

SystemZ.hH A D08-May-20208.1 KiB

SystemZ.tdH A D06-May-20202.9 KiB

SystemZAsmPrinter.cppH A D08-May-202023.6 KiB

SystemZAsmPrinter.hH A D08-May-20201.9 KiB

SystemZCallingConv.cppH A D06-May-2020710

SystemZCallingConv.hH A D08-May-20204.9 KiB

SystemZCallingConv.tdH A D08-May-20207 KiB

SystemZConstantPoolValue.cppH A D06-May-20201.8 KiB

SystemZConstantPoolValue.hH A D06-May-20201.8 KiB

SystemZElimCompare.cppH A D08-May-202026.2 KiB

SystemZFeatures.tdH A D06-May-202010.8 KiB

SystemZFrameLowering.cppH A D08-May-202025.3 KiB

SystemZFrameLowering.hH A D08-May-20202.8 KiB

SystemZHazardRecognizer.cppH A D06-May-202014.8 KiB

SystemZHazardRecognizer.hH A D06-May-20205.9 KiB

SystemZInstrBuilder.hH A D06-May-20201.7 KiB

SystemZInstrDFP.tdH A D06-May-20209.3 KiB

SystemZInstrFormats.tdH A D08-May-2020178.9 KiB

SystemZInstrFP.tdH A D08-May-202026.1 KiB

SystemZInstrHFP.tdH A D06-May-20209.5 KiB

SystemZInstrInfo.cppH A D08-May-202062.9 KiB

SystemZInstrInfo.hH A D08-May-202013.6 KiB

SystemZInstrInfo.tdH A D08-May-2020102.7 KiB

SystemZInstrSystem.tdH A D06-May-202017.2 KiB

SystemZInstrVector.tdH A D08-May-202082.4 KiB

SystemZISelDAGToDAG.cppH A D08-May-202068.7 KiB

SystemZISelLowering.cppH A D08-May-2020307.4 KiB

SystemZISelLowering.hH A D08-May-202027.5 KiB

SystemZLDCleanup.cppH A D06-May-20204.9 KiB

SystemZLongBranch.cppH A D08-May-202016 KiB

SystemZMachineFunctionInfo.cppH A D06-May-2020508

SystemZMachineFunctionInfo.hH A D08-May-20203.8 KiB

SystemZMachineScheduler.cppH A D08-May-20208.8 KiB

SystemZMachineScheduler.hH A D06-May-20205.1 KiB

SystemZMCInstLower.cppH A D06-May-20203.2 KiB

SystemZMCInstLower.hH A D06-May-20201.3 KiB

SystemZOperands.tdH A D08-May-202025 KiB

SystemZOperators.tdH A D08-May-202048.6 KiB

SystemZPatterns.tdH A D08-May-20208.5 KiB

SystemZPostRewrite.cppH A D08-May-202010.3 KiB

SystemZProcessors.tdH A D08-May-20201.8 KiB

SystemZRegisterInfo.cppH A D08-May-202016.5 KiB

SystemZRegisterInfo.hH A D08-May-20203.7 KiB

SystemZRegisterInfo.tdH A D06-May-202012 KiB

SystemZSchedule.tdH A D08-May-20202.1 KiB

SystemZScheduleZ13.tdH A D06-May-202072.4 KiB

SystemZScheduleZ14.tdH A D06-May-202078.1 KiB

SystemZScheduleZ15.tdH A D08-May-202080.7 KiB

SystemZScheduleZ196.tdH A D06-May-202055.7 KiB

SystemZScheduleZEC12.tdH A D06-May-202057.4 KiB

SystemZSelectionDAGInfo.cppH A D08-May-202012.9 KiB

SystemZSelectionDAGInfo.hH A D06-May-20203.1 KiB

SystemZShortenInst.cppH A D08-May-202010.7 KiB

SystemZSubtarget.cppH A D06-May-20203.4 KiB

SystemZSubtarget.hH A D06-May-20209 KiB

SystemZTargetMachine.cppH A D08-May-202010 KiB

SystemZTargetMachine.hH A D06-May-20201.9 KiB

SystemZTargetTransformInfo.cppH A D08-May-202042.1 KiB

SystemZTargetTransformInfo.hH A D08-May-20204.5 KiB

SystemZTDC.cppH A D08-May-202013.1 KiB

TargetInfo/H08-May-20204

README.txt

1//===---------------------------------------------------------------------===//
2// Random notes about and ideas for the SystemZ backend.
3//===---------------------------------------------------------------------===//
4
5The initial backend is deliberately restricted to z10.  We should add support
6for later architectures at some point.
7
8--
9
10If an inline asm ties an i32 "r" result to an i64 input, the input
11will be treated as an i32, leaving the upper bits uninitialised.
12For example:
13
14define void @f4(i32 *%dst) {
15  %val = call i32 asm "blah $0", "=r,0" (i64 103)
16  store i32 %val, i32 *%dst
17  ret void
18}
19
20from CodeGen/SystemZ/asm-09.ll will use LHI rather than LGHI.
21to load 103.  This seems to be a general target-independent problem.
22
23--
24
25The tuning of the choice between LOAD ADDRESS (LA) and addition in
26SystemZISelDAGToDAG.cpp is suspect.  It should be tweaked based on
27performance measurements.
28
29--
30
31There is no scheduling support.
32
33--
34
35We don't use the BRANCH ON INDEX instructions.
36
37--
38
39We only use MVC, XC and CLC for constant-length block operations.
40We could extend them to variable-length operations too,
41using EXECUTE RELATIVE LONG.
42
43MVCIN, MVCLE and CLCLE may be worthwhile too.
44
45--
46
47We don't use CUSE or the TRANSLATE family of instructions for string
48operations.  The TRANSLATE ones are probably more difficult to exploit.
49
50--
51
52We don't take full advantage of builtins like fabsl because the calling
53conventions require f128s to be returned by invisible reference.
54
55--
56
57ADD LOGICAL WITH SIGNED IMMEDIATE could be useful when we need to
58produce a carry.  SUBTRACT LOGICAL IMMEDIATE could be useful when we
59need to produce a borrow.  (Note that there are no memory forms of
60ADD LOGICAL WITH CARRY and SUBTRACT LOGICAL WITH BORROW, so the high
61part of 128-bit memory operations would probably need to be done
62via a register.)
63
64--
65
66We don't use ICM, STCM, or CLM.
67
68--
69
70We don't use ADD (LOGICAL) HIGH, SUBTRACT (LOGICAL) HIGH,
71or COMPARE (LOGICAL) HIGH yet.
72
73--
74
75DAGCombiner doesn't yet fold truncations of extended loads.  Functions like:
76
77    unsigned long f (unsigned long x, unsigned short *y)
78    {
79      return (x << 32) | *y;
80    }
81
82therefore end up as:
83
84        sllg    %r2, %r2, 32
85        llgh    %r0, 0(%r3)
86        lr      %r2, %r0
87        br      %r14
88
89but truncating the load would give:
90
91        sllg    %r2, %r2, 32
92        lh      %r2, 0(%r3)
93        br      %r14
94
95--
96
97Functions like:
98
99define i64 @f1(i64 %a) {
100  %and = and i64 %a, 1
101  ret i64 %and
102}
103
104ought to be implemented as:
105
106        lhi     %r0, 1
107        ngr     %r2, %r0
108        br      %r14
109
110but two-address optimizations reverse the order of the AND and force:
111
112        lhi     %r0, 1
113        ngr     %r0, %r2
114        lgr     %r2, %r0
115        br      %r14
116
117CodeGen/SystemZ/and-04.ll has several examples of this.
118
119--
120
121Out-of-range displacements are usually handled by loading the full
122address into a register.  In many cases it would be better to create
123an anchor point instead.  E.g. for:
124
125define void @f4a(i128 *%aptr, i64 %base) {
126  %addr = add i64 %base, 524288
127  %bptr = inttoptr i64 %addr to i128 *
128  %a = load volatile i128 *%aptr
129  %b = load i128 *%bptr
130  %add = add i128 %a, %b
131  store i128 %add, i128 *%aptr
132  ret void
133}
134
135(from CodeGen/SystemZ/int-add-08.ll) we load %base+524288 and %base+524296
136into separate registers, rather than using %base+524288 as a base for both.
137
138--
139
140Dynamic stack allocations round the size to 8 bytes and then allocate
141that rounded amount.  It would be simpler to subtract the unrounded
142size from the copy of the stack pointer and then align the result.
143See CodeGen/SystemZ/alloca-01.ll for an example.
144
145--
146
147If needed, we can support 16-byte atomics using LPQ, STPQ and CSDG.
148
149--
150
151We might want to model all access registers and use them to spill
15232-bit values.
153
154--
155
156We might want to use the 'overflow' condition of eg. AR to support
157llvm.sadd.with.overflow.i32 and related instructions - the generated code
158for signed overflow check is currently quite bad.  This would improve
159the results of using -ftrapv.
160