@@ -230,10 +230,9 @@ void printIR(raw_ostream &OS, const Function *F) {
230
230
OS << *F;
231
231
}
232
232
233
- void printIR (raw_ostream &OS, const Module *M,
234
- bool ShouldPreserveUseListOrder = false ) {
233
+ void printIR (raw_ostream &OS, const Module *M) {
235
234
if (isFunctionInPrintList (" *" ) || forcePrintModuleIR ()) {
236
- M->print (OS, nullptr , ShouldPreserveUseListOrder );
235
+ M->print (OS, nullptr );
237
236
} else {
238
237
for (const auto &F : M->functions ()) {
239
238
printIR (OS, &F);
@@ -323,21 +322,20 @@ bool shouldPrintIR(Any IR) {
323
322
324
323
// / Generic IR-printing helper that unpacks a pointer to IRUnit wrapped into
325
324
// / llvm::Any and does actual print job.
326
- void unwrapAndPrint (raw_ostream &OS, Any IR,
327
- bool ShouldPreserveUseListOrder = false ) {
325
+ void unwrapAndPrint (raw_ostream &OS, Any IR) {
328
326
if (!shouldPrintIR (IR))
329
327
return ;
330
328
331
329
if (forcePrintModuleIR ()) {
332
330
auto *M = unwrapModule (IR);
333
331
assert (M && " should have unwrapped module" );
334
- printIR (OS, M, ShouldPreserveUseListOrder );
332
+ printIR (OS, M);
335
333
return ;
336
334
}
337
335
338
336
if (any_isa<const Module *>(IR)) {
339
337
const Module *M = any_cast<const Module *>(IR);
340
- printIR (OS, M, ShouldPreserveUseListOrder );
338
+ printIR (OS, M);
341
339
return ;
342
340
}
343
341
@@ -497,8 +495,7 @@ void TextChangeReporter<IRUnitT>::handleInitialIR(Any IR) {
497
495
auto *M = unwrapModule (IR, /* Force=*/ true );
498
496
assert (M && " Expected module to be unwrapped when forced." );
499
497
Out << " *** IR Dump At Start ***\n " ;
500
- M->print (Out, nullptr ,
501
- /* ShouldPreserveUseListOrder=*/ true );
498
+ M->print (Out, nullptr );
502
499
}
503
500
504
501
template <typename IRUnitT>
@@ -538,8 +535,7 @@ void IRChangedPrinter::registerCallbacks(PassInstrumentationCallbacks &PIC) {
538
535
void IRChangedPrinter::generateIRRepresentation (Any IR, StringRef PassID,
539
536
std::string &Output) {
540
537
raw_string_ostream OS (Output);
541
- unwrapAndPrint (OS, IR,
542
- /* ShouldPreserveUseListOrder=*/ true );
538
+ unwrapAndPrint (OS, IR);
543
539
OS.str ();
544
540
}
545
541
0 commit comments