[PATCH] D39115: [MIPS][MicroMIPS] Extending size reduction pass with LWP and SWP
Simon Dardis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 31 06:22:25 PDT 2018
sdardis added inline comments.
================
Comment at: lib/Target/Mips/MicroMipsSizeReduction.cpp:477
+
+ if (Reg1 == Reg2) {
+ ConsecutiveForward = ConsecutiveInstr(MI1, MI2);
----------------
Invert the test here. If Reg1 != Reg2 just return false immediately.
================
Comment at: lib/Target/Mips/MicroMipsSizeReduction.cpp:483
+
+ if (!Reduce)
+ return false;
----------------
if (!(ConsecutiveForward || ConsecutiveBackward))
return false;
and remove the Reduce variable altogether.
================
Comment at: test/CodeGen/Mips/micromips-sizereduction/micromips-lwp-swp.mir:6-8
+ ; ModuleID = '<stdin>'
+ source_filename = "<stdin>"
+ target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
----------------
This can be removed.
================
Comment at: test/CodeGen/Mips/micromips-sizereduction/micromips-lwp-swp.mir:15
+
+ declare i32* @f() #0
+
----------------
The attribute numbers can be removed.
================
Comment at: test/CodeGen/Mips/micromips-sizereduction/micromips-lwp-swp.mir:20-21
+
+ attributes #0 = { "target-cpu"="mips32r2" "target-features"="+micromips" }
+ attributes #1 = { nounwind }
+
----------------
This can be removed.
================
Comment at: test/CodeGen/Mips/micromips-sizereduction/micromips-no-lwp-swp.mir:6-8
+ ; ModuleID = '<stdin>'
+ source_filename = "<stdin>"
+ target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
----------------
This can be removed.
================
Comment at: test/CodeGen/Mips/micromips-sizereduction/micromips-no-lwp-swp.mir:15
+
+ declare i32* @f() #0
+
----------------
The attribute numbers can be removed.
================
Comment at: test/CodeGen/Mips/micromips-sizereduction/micromips-no-lwp-swp.mir:20-21
+
+ attributes #0 = { "target-cpu"="mips32r2" "target-features"="+micromips" }
+ attributes #1 = { nounwind "target-cpu"="mips32r2" "target-features"="+micromips" }
+
----------------
This can be removed.
https://reviews.llvm.org/D39115
More information about the llvm-commits
mailing list