llvm-project/llvm/lib/Target/Mips
Simon Atanasyan c1b482f2a5 [mips] Always check that `shift and add` optimization is efficient.
The D45316 introduced the `shouldTransformMulToShiftsAddsSubs` function
to check that breaking down constant multiplications into a series
of shifts, adds, and subs is efficient. Unfortunately, this function
does not check maximum number of steps on all paths of the algorithm.
This patch fixes this bug.

Fix for PR41929.

Differential Revision: https://reviews.llvm.org/D62166

llvm-svn: 361606
2019-05-24 08:39:40 +00:00
..
AsmParser [Mips] Create a TargetInfo header. NFC 2019-05-14 23:34:37 +00:00
Disassembler [Mips] Create a TargetInfo header. NFC 2019-05-14 23:34:37 +00:00
MCTargetDesc [ARM] Support .reloc *, R_ARM_NONE, * 2019-05-17 02:51:54 +00:00
TargetInfo [Mips] Create a TargetInfo header. NFC 2019-05-14 23:34:37 +00:00
CMakeLists.txt [Mips] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 01:38:56 +00:00
LLVMBuild.txt [Mips] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 01:38:56 +00:00
MSA.txt
MicroMips32r6InstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicroMips32r6InstrInfo.td [mips] Fix encoding of the `mov.d` command for microMIPS R6 2019-03-13 14:23:12 +00:00
MicroMipsDSPInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicroMipsDSPInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicroMipsInstrFPU.td [mips] Fix encoding of the `mov.d` command for microMIPS R6 2019-03-13 14:23:12 +00:00
MicroMipsInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicroMipsInstrInfo.td [mips] Join some adjacent `let DecoderNamespace` blocks. NFC 2019-03-13 16:00:42 +00:00
MicroMipsSizeReduction.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips.td [mips] Support for +abs2008 attribute 2019-01-28 14:59:30 +00:00
Mips16FrameLowering.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16FrameLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16HardFloat.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
Mips16HardFloatInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16HardFloatInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16ISelDAGToDAG.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16ISelDAGToDAG.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16ISelLowering.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16ISelLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16InstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16InstrInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16InstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16InstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16RegisterInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16RegisterInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips32r6InstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips32r6InstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips64InstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips64r6InstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsAnalyzeImmediate.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsAnalyzeImmediate.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsAsmPrinter.cpp [Mips] Create a TargetInfo header. NFC 2019-05-14 23:34:37 +00:00
MipsAsmPrinter.h [AsmPrinter] refactor to remove remove AsmVariant. NFC 2019-04-10 16:38:43 +00:00
MipsBranchExpansion.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsCCState.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsCCState.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsCallLowering.cpp [MIPS GlobalISel] Lower float and double arguments in registers 2019-03-25 11:23:41 +00:00
MipsCallLowering.h [MIPS GlobalISel] Lower float and double arguments in registers 2019-03-25 11:23:41 +00:00
MipsCallingConv.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsCondMov.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsConstantIslandPass.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsDSPInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsDSPInstrInfo.td [MIPS][microMIPS] Fix PseudoMTLOHI_MM matching and expansion 2019-03-13 11:04:38 +00:00
MipsDelaySlotFiller.cpp [mips] Use range-based `for` loops. NFC 2019-05-15 21:26:25 +00:00
MipsEVAInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsEVAInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsExpandPseudo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsFastISel.cpp [Mips] Fix missing masking in fast-isel of br (PR40325) 2019-02-25 18:54:17 +00:00
MipsFrameLowering.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsFrameLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsISelDAGToDAG.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsISelDAGToDAG.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsISelLowering.cpp [Mips] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 01:38:56 +00:00
MipsISelLowering.h [TargetLowering] Change getOptimalMemOpType to take a function attribute list 2019-04-30 08:38:12 +00:00
MipsInstrFPU.td [mips] Fix encoding of the `mov.d` command for microMIPS R6 2019-03-13 14:23:12 +00:00
MipsInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsInstrInfo.cpp Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
MipsInstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsInstrInfo.td [mips] Map SW instruction to its microMIPS R6 variant 2019-03-13 13:09:30 +00:00
MipsInstructionSelector.cpp [MIPS GlobalISel] Select float constants 2019-03-28 16:58:12 +00:00
MipsLegalizerInfo.cpp [MIPS GlobalISel] Select floating point arithmetic operations 2019-04-03 14:12:59 +00:00
MipsLegalizerInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMCInstLower.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMCInstLower.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMSAInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMSAInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMTInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMTInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMachineFunction.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMachineFunction.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsModuleISelDAGToDAG.cpp CodeGen: Remove pipeline dependencies on StackProtector; NFC 2018-07-13 00:08:38 +00:00
MipsOptimizePICCall.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsOptionRecord.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsOs16.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsPreLegalizerCombiner.cpp [MIPS GlobalISel] Combine extending loads 2019-01-24 10:09:52 +00:00
MipsRegisterBankInfo.cpp [MIPS GlobalISel] Select floating point arithmetic operations 2019-04-03 14:12:59 +00:00
MipsRegisterBankInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsRegisterBanks.td [MIPS GlobalISel] Add floating point register bank 2019-03-25 11:30:46 +00:00
MipsRegisterInfo.cpp [mips] Use AltOrders to prevent using odd FP-registers 2019-04-02 13:57:32 +00:00
MipsRegisterInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsRegisterInfo.td [mips] Remove unused FGRH32 register class. NFC 2019-04-03 10:08:27 +00:00
MipsSEFrameLowering.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSEFrameLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSEISelDAGToDAG.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSEISelDAGToDAG.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSEISelLowering.cpp [mips] Always check that `shift and add` optimization is efficient. 2019-05-24 08:39:40 +00:00
MipsSEISelLowering.h [MIPS] Use custom bitcast lowering to avoid excessive instructions 2019-04-25 07:47:28 +00:00
MipsSEInstrInfo.cpp [Mips] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 01:38:56 +00:00
MipsSEInstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSERegisterInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSERegisterInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSchedule.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsScheduleGeneric.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsScheduleP5600.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSubtarget.cpp [mips] Support for +abs2008 attribute 2019-01-28 14:59:30 +00:00
MipsSubtarget.h [mips] Support for +abs2008 attribute 2019-01-28 14:59:30 +00:00
MipsTargetMachine.cpp [Mips] Create a TargetInfo header. NFC 2019-05-14 23:34:37 +00:00
MipsTargetMachine.h [Mips][CodeGen] Remove MachineFunction::setSubtarget. Change Mips to just copy the subtarget from the MachineFunction instead of recalculating it. 2019-04-24 06:48:31 +00:00
MipsTargetObjectFile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsTargetObjectFile.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsTargetStreamer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Relocation.txt [mips] Removal of microMIPS64R6 2017-12-11 11:21:40 +00:00