llvm.org GIT mirror llvm / 690a3cb
MachineFunctionProperties/MIRParser: Rename AllVRegsAllocated->NoVRegs, compute it Rename AllVRegsAllocated to NoVRegs. This avoids the connotation of running after register and simply describes that no vregs are used in a machine function. With that we can simply compute the property and do not need to dump/parse it in .mir files. Differential Revision: http://reviews.llvm.org/D23850 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279698 91177308-0d34-0410-b5e6-96231b3b80d8 Matthias Braun 3 years ago
79 changed file(s) with 73 addition(s) and 132 deletion(s). Raw diff Collapse all Expand all
380380 StringRef Name;
381381 unsigned Alignment = 0;
382382 bool ExposesReturnsTwice = false;
383 // MachineFunctionProperties
384 bool AllVRegsAllocated = false;
385383 // GISel MachineFunctionProperties.
386384 bool Legalized = false;
387385 bool RegBankSelected = false;
406404 YamlIO.mapRequired("name", MF.Name);
407405 YamlIO.mapOptional("alignment", MF.Alignment);
408406 YamlIO.mapOptional("exposesReturnsTwice", MF.ExposesReturnsTwice);
409 YamlIO.mapOptional("allVRegsAllocated", MF.AllVRegsAllocated);
410407 YamlIO.mapOptional("legalized", MF.Legalized);
411408 YamlIO.mapOptional("regBankSelected", MF.RegBankSelected);
412409 YamlIO.mapOptional("selected", MF.Selected);
7878 /// Each of these has checking code in the MachineVerifier, and passes can
7979 /// require that a property be set.
8080 class MachineFunctionProperties {
81 // TODO: Add MachineVerifier checks for AllVRegsAllocated
8281 // Possible TODO: Allow targets to extend this (perhaps by allowing the
8382 // constructor to specify the size of the bit vector)
8483 // Possible TODO: Allow requiring the negative (e.g. VRegsAllocated could be
9998 // that affect the values in registers, for example by the register
10099 // scavenger.
101100 // When this property is clear, liveness is no longer reliable.
102 // AllVRegsAllocated: All virtual registers have been allocated; i.e. all
103 // register operands are physical registers.
101 // NoVRegs: The machine function does not use any virtual registers.
104102 // Legalized: In GlobalISel: the MachineLegalizer ran and all pre-isel generic
105103 // instructions have been legalized; i.e., all instructions are now one of:
106104 // - generic and always legal (e.g., COPY)
119117 IsSSA,
120118 NoPHIs,
121119 TracksLiveness,
122 AllVRegsAllocated,
120 NoVRegs,
123121 Legalized,
124122 RegBankSelected,
125123 Selected,
171171
172172 MachineFunctionProperties getRequiredProperties() const override {
173173 return MachineFunctionProperties().set(
174 MachineFunctionProperties::Property::AllVRegsAllocated);
174 MachineFunctionProperties::Property::NoVRegs);
175175 }
176176
177177 const char *getPassName() const override {
2929 bool runOnMachineFunction(MachineFunction &F) override;
3030 MachineFunctionProperties getRequiredProperties() const override {
3131 return MachineFunctionProperties().set(
32 MachineFunctionProperties::Property::AllVRegsAllocated);
32 MachineFunctionProperties::Property::NoVRegs);
3333 }
3434 };
3535 }
202202
203203 MachineFunctionProperties getRequiredProperties() const override {
204204 return MachineFunctionProperties().set(
205 MachineFunctionProperties::Property::AllVRegsAllocated);
205 MachineFunctionProperties::Property::NoVRegs);
206206 }
207207
208208 private:
128128
129129 MachineFunctionProperties getRequiredProperties() const override {
130130 return MachineFunctionProperties().set(
131 MachineFunctionProperties::Property::AllVRegsAllocated);
131 MachineFunctionProperties::Property::NoVRegs);
132132 }
133133 };
134134
216216
217217 MachineFunctionProperties getRequiredProperties() const override {
218218 return MachineFunctionProperties().set(
219 MachineFunctionProperties::Property::AllVRegsAllocated);
219 MachineFunctionProperties::Property::NoVRegs);
220220 }
221221
222222 /// Print to ostream with a message.
311311 Properties.set(MachineFunctionProperties::Property::IsSSA);
312312 else
313313 Properties.clear(MachineFunctionProperties::Property::IsSSA);
314
315 const MachineRegisterInfo &MRI = MF.getRegInfo();
316 if (MRI.getNumVirtRegs() == 0)
317 Properties.set(MachineFunctionProperties::Property::NoVRegs);
314318 }
315319
316320 bool MIRParserImpl::initializeMachineFunction(MachineFunction &MF) {
323327 if (YamlMF.Alignment)
324328 MF.setAlignment(YamlMF.Alignment);
325329 MF.setExposesReturnsTwice(YamlMF.ExposesReturnsTwice);
326 if (YamlMF.AllVRegsAllocated)
327 MF.getProperties().set(MachineFunctionProperties::Property::AllVRegsAllocated);
328330
329331 if (YamlMF.Legalized)
330332 MF.getProperties().set(MachineFunctionProperties::Property::Legalized);
173173 YamlMF.Name = MF.getName();
174174 YamlMF.Alignment = MF.getAlignment();
175175 YamlMF.ExposesReturnsTwice = MF.exposesReturnsTwice();
176 YamlMF.AllVRegsAllocated = MF.getProperties().hasProperty(
177 MachineFunctionProperties::Property::AllVRegsAllocated);
178176
179177 YamlMF.Legalized = MF.getProperties().hasProperty(
180178 MachineFunctionProperties::Property::Legalized);
5555
5656 MachineFunctionProperties getRequiredProperties() const override {
5757 return MachineFunctionProperties().set(
58 MachineFunctionProperties::Property::AllVRegsAllocated);
58 MachineFunctionProperties::Property::NoVRegs);
5959 }
6060
6161 private:
5656 static const char *getPropertyName(MachineFunctionProperties::Property Prop) {
5757 typedef MachineFunctionProperties::Property P;
5858 switch(Prop) {
59 case P::AllVRegsAllocated: return "AllVRegsAllocated";
6059 case P::IsSSA: return "IsSSA";
6160 case P::Legalized: return "Legalized";
6261 case P::NoPHIs: return "NoPHIs";
62 case P::NoVRegs: return "NoVRegs";
6363 case P::RegBankSelected: return "RegBankSelected";
6464 case P::Selected: return "Selected";
6565 case P::TracksLiveness: return "TracksLiveness";
313313
314314 void MachineVerifier::verifyProperties(const MachineFunction &MF) {
315315 // If a pass has introduced virtual registers without clearing the
316 // AllVRegsAllocated property (or set it without allocating the vregs)
316 // NoVRegs property (or set it without allocating the vregs)
317317 // then report an error.
318318 if (MF.getProperties().hasProperty(
319 MachineFunctionProperties::Property::AllVRegsAllocated) &&
320 MRI->getNumVirtRegs()) {
321 report(
322 "Function has AllVRegsAllocated property but there are VReg operands",
323 &MF);
324 }
319 MachineFunctionProperties::Property::NoVRegs) &&
320 MRI->getNumVirtRegs())
321 report("Function has NoVRegs property but there are VReg operands", &MF);
325322 }
326323
327324 unsigned MachineVerifier::verify(MachineFunction &MF) {
3131 bool runOnMachineFunction(MachineFunction &F) override;
3232 MachineFunctionProperties getRequiredProperties() const override {
3333 return MachineFunctionProperties().set(
34 MachineFunctionProperties::Property::AllVRegsAllocated);
34 MachineFunctionProperties::Property::NoVRegs);
3535 }
3636 };
3737 }
9797
9898 MachineFunctionProperties getRequiredProperties() const override {
9999 return MachineFunctionProperties().set(
100 MachineFunctionProperties::Property::AllVRegsAllocated);
100 MachineFunctionProperties::Property::NoVRegs);
101101 }
102102
103103 bool runOnMachineFunction(MachineFunction &Fn) override;
7979 MachineFunctionProperties getRequiredProperties() const override {
8080 MachineFunctionProperties MFP;
8181 if (UsesCalleeSaves)
82 MFP.set(MachineFunctionProperties::Property::AllVRegsAllocated);
82 MFP.set(MachineFunctionProperties::Property::NoVRegs);
8383 return MFP;
8484 }
8585
164164
165165 MachineFunctionProperties getSetProperties() const override {
166166 return MachineFunctionProperties().set(
167 MachineFunctionProperties::Property::AllVRegsAllocated);
167 MachineFunctionProperties::Property::NoVRegs);
168168 }
169169
170170 private:
6262
6363 MachineFunctionProperties getRequiredProperties() const override {
6464 return MachineFunctionProperties().set(
65 MachineFunctionProperties::Property::AllVRegsAllocated);
65 MachineFunctionProperties::Property::NoVRegs);
6666 }
6767
6868 /// \brief Calculate the liveness information for the given machine function.
176176 bool runOnMachineFunction(MachineFunction&) override;
177177 MachineFunctionProperties getSetProperties() const override {
178178 return MachineFunctionProperties().set(
179 MachineFunctionProperties::Property::AllVRegsAllocated);
179 MachineFunctionProperties::Property::NoVRegs);
180180 }
181181 };
182182 } // end anonymous namespace
8989
9090 MachineFunctionProperties getRequiredProperties() const override {
9191 return MachineFunctionProperties().set(
92 MachineFunctionProperties::Property::AllVRegsAllocated);
92 MachineFunctionProperties::Property::NoVRegs);
9393 }
9494
9595 const char *getPassName() const override {
121121
122122 MachineFunctionProperties getRequiredProperties() const override {
123123 return MachineFunctionProperties().set(
124 MachineFunctionProperties::Property::AllVRegsAllocated);
124 MachineFunctionProperties::Property::NoVRegs);
125125 }
126126
127127 const char *getPassName() const override {
176176
177177 MachineFunctionProperties getRequiredProperties() const override {
178178 return MachineFunctionProperties().set(
179 MachineFunctionProperties::Property::AllVRegsAllocated);
179 MachineFunctionProperties::Property::NoVRegs);
180180 }
181181
182182 const char *getPassName() const override {
4545
4646 MachineFunctionProperties getRequiredProperties() const override {
4747 return MachineFunctionProperties().set(
48 MachineFunctionProperties::Property::AllVRegsAllocated);
48 MachineFunctionProperties::Property::NoVRegs);
4949 }
5050
5151 const char *getPassName() const override { return AARCH64_DEAD_REG_DEF_NAME; }
161161
162162 MachineFunctionProperties getRequiredProperties() const override {
163163 return MachineFunctionProperties().set(
164 MachineFunctionProperties::Property::AllVRegsAllocated);
164 MachineFunctionProperties::Property::NoVRegs);
165165 }
166166
167167 const char *getPassName() const override {
5353 bool runOnMachineFunction(MachineFunction &MF) override;
5454 MachineFunctionProperties getRequiredProperties() const override {
5555 return MachineFunctionProperties().set(
56 MachineFunctionProperties::Property::AllVRegsAllocated);
56 MachineFunctionProperties::Property::NoVRegs);
5757 }
5858 const char *getPassName() const override {
5959 return "AArch64 Redundant Copy Elimination";
196196
197197 MachineFunctionProperties getRequiredProperties() const override {
198198 return MachineFunctionProperties().set(
199 MachineFunctionProperties::Property::AllVRegsAllocated);
199 MachineFunctionProperties::Property::NoVRegs);
200200 }
201201
202202 const char *getPassName() const override {
5252
5353 MachineFunctionProperties getRequiredProperties() const override {
5454 return MachineFunctionProperties().set(
55 MachineFunctionProperties::Property::AllVRegsAllocated);
55 MachineFunctionProperties::Property::NoVRegs);
5656 }
5757
5858 const char *getPassName() const override {
9494
9595 MachineFunctionProperties getRequiredProperties() const override {
9696 return MachineFunctionProperties().set(
97 MachineFunctionProperties::Property::AllVRegsAllocated);
97 MachineFunctionProperties::Property::NoVRegs);
9898 }
9999
100100 const char *getPassName() const override {
2828
2929 MachineFunctionProperties getRequiredProperties() const override {
3030 return MachineFunctionProperties().set(
31 MachineFunctionProperties::Property::AllVRegsAllocated);
31 MachineFunctionProperties::Property::NoVRegs);
3232 }
3333
3434 const char *getPassName() const override {
3737
3838 MachineFunctionProperties getRequiredProperties() const override {
3939 return MachineFunctionProperties().set(
40 MachineFunctionProperties::Property::AllVRegsAllocated);
40 MachineFunctionProperties::Property::NoVRegs);
4141 }
4242
4343 const char *getPassName() const override {
147147
148148 MachineFunctionProperties getRequiredProperties() const override {
149149 return MachineFunctionProperties().set(
150 MachineFunctionProperties::Property::AllVRegsAllocated);
150 MachineFunctionProperties::Property::NoVRegs);
151151 }
152152
153153 const char *getPassName() const override {
5050 bool runOnMachineFunction(MachineFunction &Fn) override;
5151 MachineFunctionProperties getRequiredProperties() const override {
5252 return MachineFunctionProperties().set(
53 MachineFunctionProperties::Property::AllVRegsAllocated);
53 MachineFunctionProperties::Property::NoVRegs);
5454 }
5555 };
5656
8484
8585 MachineFunctionProperties getRequiredProperties() const override {
8686 return MachineFunctionProperties().set(
87 MachineFunctionProperties::Property::AllVRegsAllocated);
87 MachineFunctionProperties::Property::NoVRegs);
8888 }
8989
9090 private:
4646
4747 MachineFunctionProperties getRequiredProperties() const override {
4848 return MachineFunctionProperties().set(
49 MachineFunctionProperties::Property::AllVRegsAllocated);
49 MachineFunctionProperties::Property::NoVRegs);
5050 }
5151
5252 const char *getPassName() const override {
181181 bool runOnMachineFunction(MachineFunction &MF) override;
182182 MachineFunctionProperties getRequiredProperties() const override {
183183 return MachineFunctionProperties().set(
184 MachineFunctionProperties::Property::AllVRegsAllocated);
184 MachineFunctionProperties::Property::NoVRegs);
185185 }
186186 };
187187
5050 bool runOnMachineFunction(MachineFunction &MF) override;
5151 MachineFunctionProperties getRequiredProperties() const override {
5252 return MachineFunctionProperties().set(
53 MachineFunctionProperties::Property::AllVRegsAllocated);
53 MachineFunctionProperties::Property::NoVRegs);
5454 }
5555
5656 private:
8484 bool runOnMachineFunction(MachineFunction &Fn) override;
8585 MachineFunctionProperties getRequiredProperties() const override {
8686 return MachineFunctionProperties().set(
87 MachineFunctionProperties::Property::AllVRegsAllocated);
87 MachineFunctionProperties::Property::NoVRegs);
8888 }
8989
9090 private:
5656
5757 MachineFunctionProperties getRequiredProperties() const override {
5858 return MachineFunctionProperties().set(
59 MachineFunctionProperties::Property::AllVRegsAllocated);
59 MachineFunctionProperties::Property::NoVRegs);
6060 }
6161
6262 static char ID;
4848 bool runOnMachineFunction(MachineFunction &Fn) override;
4949 MachineFunctionProperties getRequiredProperties() const override {
5050 return MachineFunctionProperties().set(
51 MachineFunctionProperties::Property::AllVRegsAllocated);
51 MachineFunctionProperties::Property::NoVRegs);
5252 }
5353 };
5454 }
7979 bool runOnMachineFunction(MachineFunction &Fn) override;
8080 MachineFunctionProperties getRequiredProperties() const override {
8181 return MachineFunctionProperties().set(
82 MachineFunctionProperties::Property::AllVRegsAllocated);
82 MachineFunctionProperties::Property::NoVRegs);
8383 }
8484
8585 private:
5959
6060 MachineFunctionProperties getRequiredProperties() const override {
6161 return MachineFunctionProperties().set(
62 MachineFunctionProperties::Property::AllVRegsAllocated);
62 MachineFunctionProperties::Property::NoVRegs);
6363 }
6464
6565 void insertDefsUses(MachineBasicBlock::instr_iterator MI,
6868
6969 MachineFunctionProperties getRequiredProperties() const override {
7070 return MachineFunctionProperties().set(
71 MachineFunctionProperties::Property::AllVRegsAllocated);
71 MachineFunctionProperties::Property::NoVRegs);
7272 }
7373
7474 private:
4040
4141 MachineFunctionProperties getRequiredProperties() const override {
4242 return MachineFunctionProperties().set(
43 MachineFunctionProperties::Property::AllVRegsAllocated);
43 MachineFunctionProperties::Property::NoVRegs);
4444 }
4545
4646 const char *getPassName() const override {
363363
364364 MachineFunctionProperties getRequiredProperties() const override {
365365 return MachineFunctionProperties().set(
366 MachineFunctionProperties::Property::AllVRegsAllocated);
366 MachineFunctionProperties::Property::NoVRegs);
367367 }
368368
369369 void doInitialPlacement(std::vector &CPEMIs);
212212
213213 MachineFunctionProperties getRequiredProperties() const override {
214214 return MachineFunctionProperties().set(
215 MachineFunctionProperties::Property::AllVRegsAllocated);
215 MachineFunctionProperties::Property::NoVRegs);
216216 }
217217
218218 void getAnalysisUsage(AnalysisUsage &AU) const override {
7575
7676 MachineFunctionProperties getRequiredProperties() const override {
7777 return MachineFunctionProperties().set(
78 MachineFunctionProperties::Property::AllVRegsAllocated);
78 MachineFunctionProperties::Property::NoVRegs);
7979 }
8080
8181 private:
7373
7474 MachineFunctionProperties getRequiredProperties() const override {
7575 return MachineFunctionProperties().set(
76 MachineFunctionProperties::Property::AllVRegsAllocated);
76 MachineFunctionProperties::Property::NoVRegs);
7777 }
7878
7979 private:
4747
4848 MachineFunctionProperties getRequiredProperties() const override {
4949 return MachineFunctionProperties().set(
50 MachineFunctionProperties::Property::AllVRegsAllocated);
50 MachineFunctionProperties::Property::NoVRegs);
5151 }
5252
5353 const char *getPassName() const override {
195195
196196 MachineFunctionProperties getRequiredProperties() const override {
197197 return MachineFunctionProperties().set(
198 MachineFunctionProperties::Property::AllVRegsAllocated);
198 MachineFunctionProperties::Property::NoVRegs);
199199 }
200200
201201 void getAnalysisUsage(AnalysisUsage &AU) const override {
6363
6464 MachineFunctionProperties getRequiredProperties() const override {
6565 return MachineFunctionProperties().set(
66 MachineFunctionProperties::Property::AllVRegsAllocated);
66 MachineFunctionProperties::Property::NoVRegs);
6767 }
6868
6969 void insertCallDefsUses(MachineBasicBlock::iterator MI,
6565 bool runOnMachineFunction(MachineFunction &F) override;
6666 MachineFunctionProperties getRequiredProperties() const override {
6767 return MachineFunctionProperties().set(
68 MachineFunctionProperties::Property::AllVRegsAllocated);
68 MachineFunctionProperties::Property::NoVRegs);
6969 }
7070
7171 private:
139139 bool runOnMachineFunction(MachineFunction &F) override;
140140 MachineFunctionProperties getRequiredProperties() const override {
141141 return MachineFunctionProperties().set(
142 MachineFunctionProperties::Property::AllVRegsAllocated);
142 MachineFunctionProperties::Property::NoVRegs);
143143 }
144144
145145 private:
3636 bool runOnMachineFunction(MachineFunction &F) override;
3737 MachineFunctionProperties getRequiredProperties() const override {
3838 return MachineFunctionProperties().set(
39 MachineFunctionProperties::Property::AllVRegsAllocated);
39 MachineFunctionProperties::Property::NoVRegs);
4040 }
4141
4242 private:
195195 // Has no asserts of its own, but was not written to handle virtual regs.
196196 disablePass(&ShrinkWrapID);
197197
198 // These functions all require the AllVRegsAllocated property.
198 // These functions all require the NoVRegs property.
199199 disablePass(&MachineCopyPropagationID);
200200 disablePass(&PostRASchedulerID);
201201 disablePass(&FuncletLayoutID);
5050
5151 MachineFunctionProperties getRequiredProperties() const override {
5252 return MachineFunctionProperties().set(
53 MachineFunctionProperties::Property::AllVRegsAllocated);
53 MachineFunctionProperties::Property::NoVRegs);
5454 }
5555
5656 const char *getPassName() const override {
124124
125125 MachineFunctionProperties getRequiredProperties() const override {
126126 return MachineFunctionProperties().set(
127 MachineFunctionProperties::Property::AllVRegsAllocated);
127 MachineFunctionProperties::Property::NoVRegs);
128128 }
129129
130130 private:
9494 // This pass runs after regalloc and doesn't support VReg operands.
9595 MachineFunctionProperties getRequiredProperties() const override {
9696 return MachineFunctionProperties().set(
97 MachineFunctionProperties::Property::AllVRegsAllocated);
97 MachineFunctionProperties::Property::NoVRegs);
9898 }
9999
100100 private:
7777
7878 MachineFunctionProperties getRequiredProperties() const override {
7979 return MachineFunctionProperties().set(
80 MachineFunctionProperties::Property::AllVRegsAllocated);
80 MachineFunctionProperties::Property::NoVRegs);
8181 }
8282
8383 const char *getPassName() const override { return "X86 FP Stackifier"; }
5656
5757 MachineFunctionProperties getRequiredProperties() const override {
5858 return MachineFunctionProperties().set(
59 MachineFunctionProperties::Property::AllVRegsAllocated);
59 MachineFunctionProperties::Property::NoVRegs);
6060 }
6161
6262 const char *getPassName() const override {
3939 bool runOnMachineFunction(MachineFunction &MF) override;
4040 MachineFunctionProperties getRequiredProperties() const override {
4141 return MachineFunctionProperties().set(
42 MachineFunctionProperties::Property::AllVRegsAllocated);
42 MachineFunctionProperties::Property::NoVRegs);
4343 }
4444 const char *getPassName() const override {return "X86 vzeroupper inserter";}
4545
2828 bool runOnMachineFunction(MachineFunction &Fn) override;
2929 MachineFunctionProperties getRequiredProperties() const override {
3030 return MachineFunctionProperties().set(
31 MachineFunctionProperties::Property::AllVRegsAllocated);
31 MachineFunctionProperties::Property::NoVRegs);
3232 }
3333
3434 const char *getPassName() const override {
2727 name: promote-load-from-store
2828 alignment: 2
2929 exposesReturnsTwice: false
30 allVRegsAllocated: true
3130 tracksRegLiveness: false
3231 liveins:
3332 - { reg: '%x0' }
8281 name: store-pair
8382 alignment: 2
8483 exposesReturnsTwice: false
85 allVRegsAllocated: true
8684 tracksRegLiveness: false
8785 liveins:
8886 - { reg: '%x0' }
1414 name: test_mov_0
1515 alignment: 2
1616 exposesReturnsTwice: false
17 allVRegsAllocated: true
1817 tracksRegLiveness: false
1918 frameInfo:
2019 isFrameAddressTaken: false
7878 name: f
7979 alignment: 1
8080 exposesReturnsTwice: false
81 allVRegsAllocated: true
8281 tracksRegLiveness: true
8382 liveins:
8483 - { reg: '%r0' }
1313 ---
1414 name: foo
1515 tracksRegLiveness: true
16 allVRegsAllocated: true
1716 body: |
1817 bb.0:
1918 successors: %bb.1, %bb.2
3232 name: test_tlsdesc_callseq_length
3333 alignment: 2
3434 exposesReturnsTwice: false
35 allVRegsAllocated: true
3635 tracksRegLiveness: false
3736 liveins:
3837 - { reg: '%w0' }
1212 # CHECK-LABEL: name: copyprop1
1313 # CHECK: bb.0:
1414 # CHECK-NOT: %w20 = COPY
15 name: copyprop1
16 allVRegsAllocated: true
17 body: |
15 name: copyprop1
16 body: |
1817 bb.0:
1918 liveins: %w0, %w1
2019 %w20 = COPY %w1
2726 # CHECK-LABEL: name: copyprop2
2827 # CHECK: bb.0:
2928 # CHECK: %w20 = COPY
30 name: copyprop2
31 allVRegsAllocated: true
32 body: |
29 name: copyprop2
30 body: |
3331 bb.0:
3432 liveins: %w0, %w1
3533 %w20 = COPY %w1
4240 # CHECK-LABEL: name: copyprop3
4341 # CHECK: bb.0:
4442 # CHECK-NOT: COPY
45 name: copyprop3
46 allVRegsAllocated: true
47 body: |
43 name: copyprop3
44 body: |
4845 bb.0:
4946 liveins: %w0, %w1
5047 %w20 = COPY %w1
5754 # CHECK-LABEL: name: copyprop4
5855 # CHECK: bb.0:
5956 # CHECK-NOT: COPY
60 name: copyprop4
61 allVRegsAllocated: true
62 body: |
57 name: copyprop4
58 body: |
6359 bb.0:
6460 liveins: %w0, %w1
6561 %w20 = COPY %w0
8989 name: f
9090 alignment: 1
9191 exposesReturnsTwice: false
92 allVRegsAllocated: true
9392 tracksRegLiveness: true
9493 liveins:
9594 - { reg: '%r0' }
99 ---
1010 name: foo
1111 tracksRegLiveness: true
12 allVRegsAllocated: true
1312 body: |
1413 bb.0:
1514 successors:
174174 name: test0a
175175 alignment: 2
176176 exposesReturnsTwice: false
177 allVRegsAllocated: false
178177 tracksRegLiveness: true
179178 registers:
180179 - { id: 0, class: gpr }
219218 name: test0b
220219 alignment: 2
221220 exposesReturnsTwice: false
222 allVRegsAllocated: false
223221 tracksRegLiveness: true
224222 registers:
225223 - { id: 0, class: gpr }
262260 name: test1a
263261 alignment: 2
264262 exposesReturnsTwice: false
265 allVRegsAllocated: false
266263 tracksRegLiveness: true
267264 registers:
268265 - { id: 0, class: gpr }
309306 name: test1b
310307 alignment: 2
311308 exposesReturnsTwice: false
312 allVRegsAllocated: false
313309 tracksRegLiveness: true
314310 registers:
315311 - { id: 0, class: gpr }
356352 name: test2a
357353 alignment: 2
358354 exposesReturnsTwice: false
359 allVRegsAllocated: false
360355 tracksRegLiveness: true
361356 registers:
362357 - { id: 0, class: gpr }
403398 name: test2b
404399 alignment: 2
405400 exposesReturnsTwice: false
406 allVRegsAllocated: false
407401 tracksRegLiveness: true
408402 registers:
409403 - { id: 0, class: gpr }
450444 name: test3
451445 alignment: 2
452446 exposesReturnsTwice: false
453 allVRegsAllocated: false
454447 tracksRegLiveness: true
455448 registers:
456449 - { id: 0, class: gpr }
497490 name: test4
498491 alignment: 2
499492 exposesReturnsTwice: false
500 allVRegsAllocated: false
501493 tracksRegLiveness: true
502494 registers:
503495 - { id: 0, class: gpr }
608600 name: testBB
609601 alignment: 2
610602 exposesReturnsTwice: false
611 allVRegsAllocated: false
612603 tracksRegLiveness: true
613604 registers:
614605 - { id: 0, class: gpr }
4343 name: mm_update_next_owner
4444 alignment: 4
4545 exposesReturnsTwice: false
46 allVRegsAllocated: true
4746 tracksRegLiveness: true
4847 liveins:
4948 - { reg: '%x3' }
2525 name: test1
2626 alignment: 4
2727 exposesReturnsTwice: false
28 allVRegsAllocated: true
2928 tracksRegLiveness: true
3029 frameInfo:
3130 isFrameAddressTaken: false
3131 name: fn1
3232 alignment: 2
3333 exposesReturnsTwice: false
34 allVRegsAllocated: false
3534 tracksRegLiveness: true
3635 registers:
3736 - { id: 0, class: g8rc }
1818
1919 ---
2020 name: foo
21 allVRegsAllocated: true
2221 tracksRegLiveness: true
2322 liveins:
2423 - { reg: '%edi' }
3737
3838 ---
3939 name: test_movb_killed
40 allVRegsAllocated: true
4140 tracksRegLiveness: true
4241 liveins:
4342 - { reg: '%edi' }
5352
5453 ---
5554 name: test_movb_impuse
56 allVRegsAllocated: true
5755 tracksRegLiveness: true
5856 liveins:
5957 - { reg: '%edi' }
6967
7068 ---
7169 name: test_movb_impdef_gr64
72 allVRegsAllocated: true
7370 tracksRegLiveness: true
7471 liveins:
7572 - { reg: '%edi' }
8582
8683 ---
8784 name: test_movb_impdef_gr32
88 allVRegsAllocated: true
8985 tracksRegLiveness: true
9086 liveins:
9187 - { reg: '%edi' }
10197
10298 ---
10399 name: test_movb_impdef_gr16
104 allVRegsAllocated: true
105100 tracksRegLiveness: true
106101 liveins:
107102 - { reg: '%edi' }
117112
118113 ---
119114 name: test_movw_impdef_gr32
120 allVRegsAllocated: true
121115 tracksRegLiveness: true
122116 liveins:
123117 - { reg: '%edi' }
133127
134128 ---
135129 name: test_movw_impdef_gr64
136 allVRegsAllocated: true
137130 tracksRegLiveness: true
138131 liveins:
139132 - { reg: '%edi' }
8484 name: imp_null_check_with_bitwise_op_0
8585 # CHECK-LABEL: name: imp_null_check_with_bitwise_op_0
8686 alignment: 4
87 allVRegsAllocated: true
8887 tracksRegLiveness: true
8988 liveins:
9089 - { reg: '%rdi' }
127126 ---
128127 name: imp_null_check_with_bitwise_op_1
129128 alignment: 4
130 allVRegsAllocated: true
131129 tracksRegLiveness: true
132130 liveins:
133131 - { reg: '%rdi' }
175173 name: imp_null_check_with_bitwise_op_2
176174 # CHECK-LABEL: name: imp_null_check_with_bitwise_op_2
177175 alignment: 4
178 allVRegsAllocated: true
179176 tracksRegLiveness: true
180177 liveins:
181178 - { reg: '%rdi' }
219216 name: imp_null_check_with_bitwise_op_3
220217 # CHECK-LABEL: name: imp_null_check_with_bitwise_op_3
221218 alignment: 4
222 allVRegsAllocated: true
223219 tracksRegLiveness: true
224220 liveins:
225221 - { reg: '%rdi' }
2424 # CHECK-NOT: COPY
2525 # CHECK-NEXT: NOOP implicit %rax, implicit %rdi
2626 name: copyprop_remove_kill0
27 allVRegsAllocated: true
2827 body: |
2928 bb.0:
3029 %rax = COPY %rdi
4241 # CHECK-NOT: COPY
4342 # CHECK-NEXT: NOOP implicit %rax, implicit %rdi
4443 name: copyprop_remove_kill1
45 allVRegsAllocated: true
4644 body: |
4745 bb.0:
4846 %rax = COPY %rdi
6058 # CHECK-NOT: COPY
6159 # CHECK-NEXT: NOOP implicit %rax, implicit %rdi
6260 name: copyprop_remove_kill2
63 allVRegsAllocated: true
6461 body: |
6562 bb.0:
6663 %ax = COPY %di
7875 # CHECK-NOT: COPY
7976 # CHECK-NEXT: NOOP implicit %rax, implicit %rdi
8077 name: copyprop0
81 allVRegsAllocated: true
8278 body: |
8379 bb.0:
8480 %rax = COPY %rdi
9591 # CHECK-NEXT: NOOP implicit %rax
9692 # CHECK-NEXT: NOOP implicit %rax, implicit %rdi
9793 name: copyprop1
98 allVRegsAllocated: true
9994 body: |
10095 bb.0:
10196 %rax = COPY %rdi
112107 # CHECK-NOT: %rax = COPY %rdi
113108 # CHECK-NEXT: NOOP implicit %rax, implicit %rdi
114109 name: copyprop2
115 allVRegsAllocated: true
116110 body: |
117111 bb.0:
118112 %rax = COPY %rdi
131125 # CHECK-NEXT: %rbp = COPY %rax
132126 # CHECK-NEXT: NOOP implicit %rax, implicit %rbp
133127 name: nocopyprop0
134 allVRegsAllocated: true
135128 body: |
136129 bb.0:
137130 %rax = COPY %rbp
149142 # CHECK-NEXT: %rax = COPY %rbp
150143 # CHECK-NEXT: NOOP implicit %rax, implicit %rbp
151144 name: nocopyprop1
152 allVRegsAllocated: true
153145 body: |
154146 bb.0:
155147 %rbp = COPY %rax
167159 # CHECK-NEXT: %rax = COPY %rbp
168160 # CHECK-NEXT: NOOP implicit %rax, implicit %rbp
169161 name: nocopyprop2
170 allVRegsAllocated: true
171162 body: |
172163 bb.0:
173164 %rax = COPY %rbp
185176 # CHECK-NEXT: %rbp = COPY %rax
186177 # CHECK-NEXT: NOOP implicit %rax, implicit %rbp
187178 name: nocopyprop3
188 allVRegsAllocated: true
189179 body: |
190180 bb.0:
191181 %rbp = COPY %rax
202192 # CHECK-NEXT: %rax = COPY %rip
203193 # CHECK-NEXT: NOOP implicit %rax
204194 name: nocopyprop4
205 allVRegsAllocated: true
206195 body: |
207196 bb.0:
208197 %rax = COPY %rip
218207 # CHECK-NEXT: %rip = COPY %rax
219208 # CHECK-NEXT: %rip = COPY %rax
220209 name: nocopyprop5
221 allVRegsAllocated: true
222210 body: |
223211 bb.0:
224212 %rip = COPY %rax
1010 ---
1111 # CHECK-LABEL: main
1212 name: main
13 allVRegsAllocated: true
1413 tracksRegLiveness: true
1514 frameInfo:
1615 stackSize: 52
156156 name: add
157157 alignment: 4
158158 exposesReturnsTwice: false
159 allVRegsAllocated: true
160159 tracksRegLiveness: true
161160 liveins:
162161 - { reg: '%edi' }
158158 name: main
159159 alignment: 4
160160 exposesReturnsTwice: false
161 allVRegsAllocated: true
162161 tracksRegLiveness: true
163162 liveins:
164163 - { reg: '%edi' }