[PATCH] D52803: [GISel]: Add support for CSEing continuously during GISel passes

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 2 14:33:04 PDT 2018


aditya_nandakumar created this revision.
aditya_nandakumar added reviewers: aemerson, qcolombet, dsanders, bogner, rtereshin, ab, volkan, rovka.
Herald added subscribers: kristina, kristof.beyls, mgorny.
Herald added a reviewer: javed.absar.

This patch adds support to continuously CSE instructions during each of the GISel passes. It consists of a GISelCSEInfo analysis pass that can be used by the CSEMIRBuilder.

This patch also includes some changes to MachineIRBuilderBase (which is separated out here - https://reviews.llvm.org/D52131). I have enabled it in the legalizer for now. I've also only updated AArch64 for the API and test changes - I'll update the rest post feedback.

I measured some off tree benchmarks for compile time and I didn't notice too much of a compile time regression (<1%). I'll try to get some numbers for AArch64 with llvm-test-suite.

Looking forward to your feedback.


Repository:
  rL LLVM

https://reviews.llvm.org/D52803

Files:
  include/llvm/CodeGen/GlobalISel/CSEInfo.h
  include/llvm/CodeGen/GlobalISel/CSEMIRBuilder.h
  include/llvm/CodeGen/GlobalISel/Combiner.h
  include/llvm/CodeGen/GlobalISel/CombinerHelper.h
  include/llvm/CodeGen/GlobalISel/CombinerInfo.h
  include/llvm/CodeGen/GlobalISel/ConstantFoldingMIRBuilder.h
  include/llvm/CodeGen/GlobalISel/GISelWorkList.h
  include/llvm/CodeGen/GlobalISel/IRTranslator.h
  include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
  include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
  include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
  include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
  include/llvm/CodeGen/GlobalISel/RegBankSelect.h
  include/llvm/CodeGen/GlobalISel/Utils.h
  include/llvm/InitializePasses.h
  include/llvm/Support/LowLevelTypeImpl.h
  lib/CodeGen/GlobalISel/CMakeLists.txt
  lib/CodeGen/GlobalISel/CSEInfo.cpp
  lib/CodeGen/GlobalISel/Combiner.cpp
  lib/CodeGen/GlobalISel/CombinerHelper.cpp
  lib/CodeGen/GlobalISel/IRTranslator.cpp
  lib/CodeGen/GlobalISel/Legalizer.cpp
  lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  lib/CodeGen/GlobalISel/LegalizerInfo.cpp
  lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
  lib/CodeGen/GlobalISel/RegBankSelect.cpp
  lib/CodeGen/GlobalISel/Utils.cpp
  lib/Target/AArch64/AArch64InstructionSelector.cpp
  lib/Target/AArch64/AArch64LegalizerInfo.cpp
  lib/Target/AArch64/AArch64LegalizerInfo.h
  lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
  lib/Target/ARM/ARMLegalizerInfo.cpp
  lib/Target/ARM/ARMLegalizerInfo.h
  test/CodeGen/AArch64/GlobalISel/gisel-commandline-option.ll
  test/CodeGen/AArch64/GlobalISel/legalize-cmp.mir
  test/CodeGen/AArch64/GlobalISel/legalize-div.mir
  test/CodeGen/AArch64/GlobalISel/legalize-phi.mir
  test/CodeGen/AArch64/GlobalISel/legalize-rem.mir
  test/CodeGen/AArch64/GlobalISel/legalize-shift.mir
  test/CodeGen/AArch64/GlobalISel/legalize-simple.mir
  tools/llvm-exegesis/lib/Assembler.cpp
  unittests/CodeGen/GlobalISel/CMakeLists.txt
  unittests/CodeGen/GlobalISel/CSETest.cpp
  unittests/CodeGen/GlobalISel/GISelMITest.h
  unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
  unittests/CodeGen/GlobalISel/LegalizerHelperTest.h
  unittests/CodeGen/GlobalISel/PatternMatchTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52803.168030.patch
Type: text/x-patch
Size: 101801 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181002/69aed131/attachment.bin>


More information about the llvm-commits mailing list