• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

AsmParser/23-Nov-2023-1,5911,267

Disassembler/23-Nov-2023-497391

MCTargetDesc/23-Nov-2023-1,3551,014

TargetInfo/23-Nov-2023-5425

CMakeLists.txtD23-Nov-20231.5 KiB6355

README.txtD23-Nov-20233.9 KiB160108

SystemZ.hD23-Nov-20238.2 KiB202132

SystemZ.tdD23-Nov-20232.9 KiB7959

SystemZAsmPrinter.cppD23-Nov-202323.5 KiB730590

SystemZAsmPrinter.hD23-Nov-20231.9 KiB5638

SystemZCallingConv.cppD23-Nov-2023710 219

SystemZCallingConv.hD23-Nov-20234.9 KiB13783

SystemZCallingConv.tdD23-Nov-20237 KiB158126

SystemZConstantPoolValue.cppD23-Nov-20231.8 KiB5136

SystemZConstantPoolValue.hD23-Nov-20231.7 KiB5832

SystemZCopyPhysRegs.cppD23-Nov-20233.8 KiB12179

SystemZElimCompare.cppD23-Nov-202326.2 KiB747534

SystemZFeatures.tdD23-Nov-202312.3 KiB326271

SystemZFrameLowering.cppD23-Nov-202330.4 KiB796585

SystemZFrameLowering.hD23-Nov-20233.1 KiB7047

SystemZHazardRecognizer.cppD23-Nov-202314.8 KiB464319

SystemZHazardRecognizer.hD23-Nov-20235.9 KiB16258

SystemZISelDAGToDAG.cppD23-Nov-202370.2 KiB1,9691,379

SystemZISelLowering.cppD23-Nov-2023321.4 KiB8,4276,360

SystemZISelLowering.hD23-Nov-202328.4 KiB726419

SystemZInstrBuilder.hD23-Nov-20231.6 KiB4525

SystemZInstrDFP.tdD23-Nov-20239.3 KiB247208

SystemZInstrFP.tdD23-Nov-202326.2 KiB600505

SystemZInstrFormats.tdD23-Nov-2023184.3 KiB5,2724,563

SystemZInstrHFP.tdD23-Nov-20239.5 KiB240197

SystemZInstrInfo.cppD23-Nov-202369.8 KiB1,9941,593

SystemZInstrInfo.hD23-Nov-202314.6 KiB363210

SystemZInstrInfo.tdD23-Nov-2023105.8 KiB2,3692,035

SystemZInstrSystem.tdD23-Nov-202317.2 KiB523404

SystemZInstrVector.tdD23-Nov-202384.3 KiB1,7891,573

SystemZLDCleanup.cppD23-Nov-20234.9 KiB14689

SystemZLongBranch.cppD23-Nov-202316 KiB472301

SystemZMCInstLower.cppD23-Nov-20233.2 KiB10378

SystemZMCInstLower.hD23-Nov-20231.3 KiB4424

SystemZMachineFunctionInfo.cppD23-Nov-2023508 173

SystemZMachineFunctionInfo.hD23-Nov-20233.8 KiB10157

SystemZMachineScheduler.cppD23-Nov-20238.8 KiB261163

SystemZMachineScheduler.hD23-Nov-20235.1 KiB15673

SystemZOperands.tdD23-Nov-202324.9 KiB667560

SystemZOperators.tdD23-Nov-202347.9 KiB

SystemZPatterns.tdD23-Nov-20238.5 KiB176158

SystemZPostRewrite.cppD23-Nov-202310.3 KiB273191

SystemZProcessors.tdD23-Nov-20231.8 KiB4132

SystemZRegisterInfo.cppD23-Nov-202316.3 KiB423330

SystemZRegisterInfo.hD23-Nov-20233.5 KiB9660

SystemZRegisterInfo.tdD23-Nov-202312 KiB325276

SystemZSchedule.tdD23-Nov-20232.1 KiB6755

SystemZScheduleZ13.tdD23-Nov-202372.4 KiB1,5601,266

SystemZScheduleZ14.tdD23-Nov-202378.1 KiB1,6501,351

SystemZScheduleZ15.tdD23-Nov-202380.7 KiB1,6961,392

SystemZScheduleZ196.tdD23-Nov-202355.7 KiB1,241999

SystemZScheduleZEC12.tdD23-Nov-202357.4 KiB1,2861,032

SystemZSelectionDAGInfo.cppD23-Nov-202312.9 KiB277192

SystemZSelectionDAGInfo.hD23-Nov-20233.1 KiB7548

SystemZShortenInst.cppD23-Nov-202312 KiB401299

SystemZSubtarget.cppD23-Nov-20233.9 KiB10266

SystemZSubtarget.hD23-Nov-20239.2 KiB255139

SystemZTDC.cppD23-Nov-202313.5 KiB397277

SystemZTargetMachine.cppD23-Nov-202311.5 KiB324185

SystemZTargetMachine.hD23-Nov-20232.1 KiB5930

SystemZTargetTransformInfo.cppD23-Nov-202343.7 KiB1,183836

SystemZTargetTransformInfo.hD23-Nov-20235 KiB12384

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