[all-commits] [llvm/llvm-project] 9f2905: [CodeGen][MachinePipeliner] Fix -Wpessimizing-move...

Jie Fu (傅杰) via All-commits all-commits at lists.llvm.org
Mon Jan 22 00:18:24 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f290509421b874ecf8082fa8f754850fb121655
      https://github.com/llvm/llvm-project/commit/9f290509421b874ecf8082fa8f754850fb121655
  Author: Jie Fu <jiefu at tencent.com>
  Date:   2024-01-22 (Mon, 22 Jan 2024)

  Changed paths:
    M llvm/lib/CodeGen/MachinePipeliner.cpp

  Log Message:
  -----------
  [CodeGen][MachinePipeliner] Fix -Wpessimizing-move in MachinePipeliner.cpp (NFC)

/Users/jiefu/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:1044:19: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
 1044 |     CycleInstrs = std::move(Schedule.reorderInstructions(SSD, CycleInstrs));
      |                   ^
/Users/jiefu/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:1044:19: note: remove std::move call here
 1044 |     CycleInstrs = std::move(Schedule.reorderInstructions(SSD, CycleInstrs));
      |                   ^~~~~~~~~~                                              ~
/Users/jiefu/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:1395:21: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
 1395 |     auto LastUses = std::move(computeLastUses(OrderedInsts, Stages));
      |                     ^
/Users/jiefu/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:1395:21: note: remove std::move call here
 1395 |     auto LastUses = std::move(computeLastUses(OrderedInsts, Stages));
      |                     ^~~~~~~~~~                                     ~
/Users/jiefu/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:1502:9: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
 1502 |         std::move(computeMaxSetPressure(OrderedInsts, Stages, MaxStage + 1));
      |         ^
/Users/jiefu/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:1502:9: note: remove std::move call here
 1502 |         std::move(computeMaxSetPressure(OrderedInsts, Stages, MaxStage + 1));
      |         ^~~~~~~~~~                                                         ~
/Users/jiefu/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:3381:19: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
 3381 |     cycleInstrs = std::move(reorderInstructions(SSD, cycleInstrs));
      |                   ^
/Users/jiefu/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:3381:19: note: remove std::move call here
 3381 |     cycleInstrs = std::move(reorderInstructions(SSD, cycleInstrs));
      |                   ^~~~~~~~~~                                     ~
4 errors generated.




More information about the All-commits mailing list