@@ -195,11 +195,9 @@ class InstrRefLDVTest : public testing::Test {
195
195
}
196
196
197
197
bool vlocJoin (MachineBasicBlock &MBB, InstrRefBasedLDV::LiveIdxT &VLOCOutLocs,
198
- SmallPtrSet<const MachineBasicBlock *, 8 > &InScopeBlocks,
199
198
SmallPtrSet<const MachineBasicBlock *, 8 > &BlocksToExplore,
200
199
DbgValue &InLoc) {
201
- return LDV->vlocJoin (MBB, VLOCOutLocs, InScopeBlocks, BlocksToExplore,
202
- InLoc);
200
+ return LDV->vlocJoin (MBB, VLOCOutLocs, BlocksToExplore, InLoc);
203
201
}
204
202
205
203
void buildVLocValueMap (const DILocation *DILoc,
@@ -2184,14 +2182,14 @@ TEST_F(InstrRefLDVTest, vlocJoinDiamond) {
2184
2182
DbgValue JoinedLoc = DbgValue (3 , EmptyProps, DbgValue::NoVal);
2185
2183
VLiveOuts[1 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2186
2184
VLiveOuts[2 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2187
- bool Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2185
+ bool Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, JoinedLoc);
2188
2186
EXPECT_TRUE (Result); // Output locs should have changed.
2189
2187
EXPECT_EQ (JoinedLoc.Kind , DbgValue::Def);
2190
2188
EXPECT_EQ (JoinedLoc.ID , LiveInRsp);
2191
2189
2192
2190
// And if we did it a second time, leaving the live-ins as it was, then
2193
2191
// we should report no change.
2194
- Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2192
+ Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, JoinedLoc);
2195
2193
EXPECT_FALSE (Result);
2196
2194
2197
2195
// If the live-in variable values are different, but there's no PHI placed
@@ -2200,7 +2198,7 @@ TEST_F(InstrRefLDVTest, vlocJoinDiamond) {
2200
2198
VLiveOuts[1 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2201
2199
VLiveOuts[2 ] = DbgValue (LiveInRax, EmptyProps, DbgValue::Def);
2202
2200
JoinedLoc = DbgValue (3 , EmptyProps, DbgValue::NoVal);
2203
- Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2201
+ Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, JoinedLoc);
2204
2202
EXPECT_TRUE (Result);
2205
2203
EXPECT_EQ (JoinedLoc.Kind , DbgValue::Def);
2206
2204
// RPO is blocks 0 2 1 3, so LiveInRax is picked as the first predecessor
@@ -2216,7 +2214,7 @@ TEST_F(InstrRefLDVTest, vlocJoinDiamond) {
2216
2214
// Try placing a PHI. With differing input values (LiveInRsp, LiveInRax),
2217
2215
// this PHI should not be eliminated.
2218
2216
JoinedLoc = DbgValue (3 , EmptyProps, DbgValue::VPHI);
2219
- Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2217
+ Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, JoinedLoc);
2220
2218
// Expect no change.
2221
2219
EXPECT_FALSE (Result);
2222
2220
EXPECT_EQ (JoinedLoc.Kind , DbgValue::VPHI);
@@ -2230,7 +2228,7 @@ TEST_F(InstrRefLDVTest, vlocJoinDiamond) {
2230
2228
VLiveOuts[1 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2231
2229
VLiveOuts[2 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2232
2230
JoinedLoc = DbgValue (3 , EmptyProps, DbgValue::VPHI);
2233
- Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2231
+ Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, JoinedLoc);
2234
2232
EXPECT_TRUE (Result);
2235
2233
EXPECT_EQ (JoinedLoc.Kind , DbgValue::Def);
2236
2234
EXPECT_EQ (JoinedLoc.ID , LiveInRsp);
@@ -2242,7 +2240,7 @@ TEST_F(InstrRefLDVTest, vlocJoinDiamond) {
2242
2240
VLiveOuts[1 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2243
2241
VLiveOuts[2 ] = DbgValue (LiveInRax, EmptyProps, DbgValue::Def);
2244
2242
JoinedLoc = DbgValue (2 , EmptyProps, DbgValue::VPHI);
2245
- Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2243
+ Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, JoinedLoc);
2246
2244
EXPECT_TRUE (Result);
2247
2245
EXPECT_EQ (JoinedLoc.Kind , DbgValue::Def);
2248
2246
EXPECT_EQ (JoinedLoc.ID , LiveInRax); // from block 2
@@ -2252,7 +2250,7 @@ TEST_F(InstrRefLDVTest, vlocJoinDiamond) {
2252
2250
VLiveOuts[1 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2253
2251
VLiveOuts[2 ] = DbgValue (0 , EmptyProps, DbgValue::VPHI);
2254
2252
JoinedLoc = DbgValue (2 , EmptyProps, DbgValue::VPHI);
2255
- Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2253
+ Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, JoinedLoc);
2256
2254
EXPECT_TRUE (Result);
2257
2255
EXPECT_EQ (JoinedLoc.Kind , DbgValue::VPHI);
2258
2256
EXPECT_EQ (JoinedLoc.BlockNo , 0 );
@@ -2262,7 +2260,7 @@ TEST_F(InstrRefLDVTest, vlocJoinDiamond) {
2262
2260
VLiveOuts[1 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2263
2261
VLiveOuts[2 ] = DbgValue (LiveInRsp, PropsWithIndirect, DbgValue::Def);
2264
2262
JoinedLoc = DbgValue (3 , EmptyProps, DbgValue::VPHI);
2265
- Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2263
+ Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, JoinedLoc);
2266
2264
EXPECT_FALSE (Result);
2267
2265
EXPECT_EQ (JoinedLoc.Kind , DbgValue::VPHI);
2268
2266
EXPECT_EQ (JoinedLoc.BlockNo , 3 );
@@ -2273,7 +2271,7 @@ TEST_F(InstrRefLDVTest, vlocJoinDiamond) {
2273
2271
VLiveOuts[1 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2274
2272
VLiveOuts[2 ] = DbgValue (LiveInRsp, PropsWithIndirect, DbgValue::Def);
2275
2273
JoinedLoc = DbgValue (2 , EmptyProps, DbgValue::VPHI);
2276
- Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2274
+ Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, JoinedLoc);
2277
2275
EXPECT_TRUE (Result);
2278
2276
EXPECT_EQ (JoinedLoc.Kind , DbgValue::Def);
2279
2277
EXPECT_EQ (JoinedLoc.ID , LiveInRsp);
@@ -2289,7 +2287,7 @@ TEST_F(InstrRefLDVTest, vlocJoinDiamond) {
2289
2287
VLiveOuts[1 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2290
2288
VLiveOuts[2 ] = DbgValue (LiveInRsp, PropsWithExpr, DbgValue::Def);
2291
2289
JoinedLoc = DbgValue (3 , EmptyProps, DbgValue::VPHI);
2292
- Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2290
+ Result = vlocJoin (*MBB3, VLiveOutIdx, AllBlocks, JoinedLoc);
2293
2291
EXPECT_FALSE (Result);
2294
2292
}
2295
2293
@@ -2343,7 +2341,7 @@ TEST_F(InstrRefLDVTest, vlocJoinLoops) {
2343
2341
VLiveOuts[0 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2344
2342
VLiveOuts[1 ] = DbgValue (LiveInRax, EmptyProps, DbgValue::Def);
2345
2343
DbgValue JoinedLoc = DbgValue (LiveInRax, EmptyProps, DbgValue::Def);
2346
- bool Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2344
+ bool Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, JoinedLoc);
2347
2345
EXPECT_TRUE (Result);
2348
2346
EXPECT_EQ (JoinedLoc.Kind , DbgValue::Def);
2349
2347
EXPECT_EQ (JoinedLoc.ID , LiveInRsp);
@@ -2352,7 +2350,7 @@ TEST_F(InstrRefLDVTest, vlocJoinLoops) {
2352
2350
VLiveOuts[0 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2353
2351
VLiveOuts[1 ] = DbgValue (LiveInRax, EmptyProps, DbgValue::Def);
2354
2352
JoinedLoc = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2355
- Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2353
+ Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, JoinedLoc);
2356
2354
EXPECT_FALSE (Result);
2357
2355
EXPECT_EQ (JoinedLoc.Kind , DbgValue::VPHI);
2358
2356
EXPECT_EQ (JoinedLoc.BlockNo , 1 );
@@ -2361,7 +2359,7 @@ TEST_F(InstrRefLDVTest, vlocJoinLoops) {
2361
2359
VLiveOuts[0 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2362
2360
VLiveOuts[1 ] = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2363
2361
JoinedLoc = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2364
- Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2362
+ Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, JoinedLoc);
2365
2363
EXPECT_TRUE (Result);
2366
2364
EXPECT_EQ (JoinedLoc.Kind , DbgValue::Def);
2367
2365
EXPECT_EQ (JoinedLoc.ID , LiveInRsp);
@@ -2374,7 +2372,7 @@ TEST_F(InstrRefLDVTest, vlocJoinLoops) {
2374
2372
VLiveOuts[0 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2375
2373
VLiveOuts[1 ] = DbgValue (1 , PropsWithExpr, DbgValue::VPHI);
2376
2374
JoinedLoc = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2377
- Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2375
+ Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, JoinedLoc);
2378
2376
EXPECT_FALSE (Result);
2379
2377
EXPECT_EQ (JoinedLoc.Kind , DbgValue::VPHI);
2380
2378
EXPECT_EQ (JoinedLoc.BlockNo , 1 );
@@ -2383,7 +2381,7 @@ TEST_F(InstrRefLDVTest, vlocJoinLoops) {
2383
2381
VLiveOuts[0 ] = DbgValue (LiveInRsp, EmptyProps, DbgValue::Def);
2384
2382
VLiveOuts[1 ] = DbgValue (0 , EmptyProps, DbgValue::VPHI);
2385
2383
JoinedLoc = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2386
- Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2384
+ Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, JoinedLoc);
2387
2385
EXPECT_FALSE (Result);
2388
2386
EXPECT_EQ (JoinedLoc.Kind , DbgValue::VPHI);
2389
2387
EXPECT_EQ (JoinedLoc.BlockNo , 1 );
@@ -2447,7 +2445,7 @@ TEST_F(InstrRefLDVTest, vlocJoinBadlyNestedLoops) {
2447
2445
VLiveOuts[1 ] = DbgValue (LiveInRax, EmptyProps, DbgValue::Def);
2448
2446
VLiveOuts[2 ] = DbgValue (LiveInRbx, EmptyProps, DbgValue::Def);
2449
2447
DbgValue JoinedLoc = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2450
- bool Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2448
+ bool Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, JoinedLoc);
2451
2449
EXPECT_FALSE (Result);
2452
2450
EXPECT_EQ (JoinedLoc.Kind , DbgValue::VPHI);
2453
2451
EXPECT_EQ (JoinedLoc.BlockNo , 1 );
@@ -2457,7 +2455,7 @@ TEST_F(InstrRefLDVTest, vlocJoinBadlyNestedLoops) {
2457
2455
VLiveOuts[1 ] = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2458
2456
VLiveOuts[2 ] = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2459
2457
JoinedLoc = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2460
- Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2458
+ Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, JoinedLoc);
2461
2459
EXPECT_TRUE (Result);
2462
2460
EXPECT_EQ (JoinedLoc.Kind , DbgValue::Def);
2463
2461
EXPECT_EQ (JoinedLoc.ID , LiveInRsp);
@@ -2468,7 +2466,7 @@ TEST_F(InstrRefLDVTest, vlocJoinBadlyNestedLoops) {
2468
2466
VLiveOuts[1 ] = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2469
2467
VLiveOuts[2 ] = DbgValue (1 , PropsWithIndirect, DbgValue::VPHI);
2470
2468
JoinedLoc = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2471
- Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2469
+ Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, JoinedLoc);
2472
2470
EXPECT_FALSE (Result);
2473
2471
EXPECT_EQ (JoinedLoc.Kind , DbgValue::VPHI);
2474
2472
EXPECT_EQ (JoinedLoc.BlockNo , 1 );
@@ -2478,7 +2476,7 @@ TEST_F(InstrRefLDVTest, vlocJoinBadlyNestedLoops) {
2478
2476
VLiveOuts[1 ] = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2479
2477
VLiveOuts[2 ] = DbgValue (2 , EmptyProps, DbgValue::VPHI);
2480
2478
JoinedLoc = DbgValue (1 , EmptyProps, DbgValue::VPHI);
2481
- Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, AllBlocks, JoinedLoc);
2479
+ Result = vlocJoin (*MBB1, VLiveOutIdx, AllBlocks, JoinedLoc);
2482
2480
EXPECT_FALSE (Result);
2483
2481
EXPECT_EQ (JoinedLoc.Kind , DbgValue::VPHI);
2484
2482
EXPECT_EQ (JoinedLoc.BlockNo , 1 );
0 commit comments