1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/lib/Target/AArch64
Florian Hahn ad99b95580 [CGP] Add support for sinking operands to their users, if they are free.
This patch improves code generation for some AArch64 ACLE intrinsics. It adds
support to CGP to duplicate and sink operands to their user, if they can be
folded into a target instruction, like zexts and sub into usubl. It adds a
TargetLowering hook shouldSinkOperands, which looks at the operands of
instructions to see if sinking is profitable.

I decided to add a new target hook, as for the sinking to be profitable,
at least on AArch64, we have to look at multiple operands of an
instruction, instead of looking at the users of a zext for example.

The sinking is done in CGP, because it works around an instruction
selection limitation. If instruction selection is not limited to a
single basic block, this patch should not be needed any longer.

Alternatively this could be done in the LoopSink pass, which tries to
undo LICM for instructions in blocks that are not executed frequently.

Note that we do not force the operands to sink to have a single user,
because we duplicate them before sinking. Therefore this is only
desirable if they really can be done for free. Additionally we could
consider the impact on live ranges later on.

This should fix https://bugs.llvm.org/show_bug.cgi?id=40025.

As for performance, we have internal code that uses intrinsics and can
be speed up by 10% by this change.

Reviewers: SjoerdMeijer, t.p.northover, samparker, efriedma, RKSimon, spatel

Reviewed By: samparker

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

llvm-svn: 353152
2019-02-05 10:27:40 +00:00
..
AsmParser Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Disassembler Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstPrinter Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCTargetDesc [AsmPrinter] Remove hidden flag -print-schedule. 2019-02-04 12:51:26 +00:00
TargetInfo Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Utils Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64.td [AArch64] Add 'apple-latest' CPU alias 2019-01-28 19:27:33 +00:00
AArch64A53Fix835769.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64A57FPLoadBalancing.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64AdvSIMDScalarPass.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64AsmPrinter.cpp [COFF, ARM64] Don't put jump table into a separate COFF section for EK_LabelDifference32 2019-01-29 09:36:48 +00:00
AArch64BranchTargets.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64CallingConvention.cpp [AArch64] Include AArch64GenCallingConv.inc once 2019-01-28 21:28:40 +00:00
AArch64CallingConvention.h [AArch64] Include AArch64GenCallingConv.inc once 2019-01-28 21:28:40 +00:00
AArch64CallingConvention.td [AArch64] Include AArch64GenCallingConv.inc once 2019-01-28 21:28:40 +00:00
AArch64CallLowering.cpp GlobalISel: Fix creating MMOs with align 0 2019-01-31 01:38:47 +00:00
AArch64CallLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64CleanupLocalDynamicTLSPass.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64CollectLOH.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64CompressJumpTables.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64CondBrTuning.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64ConditionalCompares.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64ConditionOptimizer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64DeadRegisterDefinitionsPass.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64ExpandPseudoInsts.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64FalkorHWPFFix.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64FastISel.cpp [AArch64] Optimize floating point materialization 2019-02-01 12:26:06 +00:00
AArch64FrameLowering.cpp [AArch64] Fix unused variable [NFC] 2019-02-01 23:42:34 +00:00
AArch64FrameLowering.h [COFF, ARM64] Fix localaddress to handle stack realignment and variable size objects 2019-02-01 21:41:33 +00:00
AArch64GenRegisterBankInfo.def Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64InstrAtomics.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64InstrFormats.td [AArch64] Add patterns for zext/sext of shift amount. 2019-01-22 00:21:35 +00:00
AArch64InstrInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64InstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64InstrInfo.td hwasan: Move memory access checks into small outlined functions on aarch64. 2019-01-23 02:20:10 +00:00
AArch64InstructionSelector.cpp [GlobalISel][AArch64][NFC] Fix incorrect comment in selectUnmergeValues 2019-01-25 21:28:27 +00:00
AArch64ISelDAGToDAG.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64ISelLowering.cpp [CGP] Add support for sinking operands to their users, if they are free. 2019-02-05 10:27:40 +00:00
AArch64ISelLowering.h [CGP] Add support for sinking operands to their users, if they are free. 2019-02-05 10:27:40 +00:00
AArch64LegalizerInfo.cpp [GlobalISel][AArch64] Select G_FEXP 2019-01-30 23:46:15 +00:00
AArch64LegalizerInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64LoadStoreOptimizer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64MachineFunctionInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64MacroFusion.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64MacroFusion.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64MCInstLower.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64MCInstLower.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64PBQPRegAlloc.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64PBQPRegAlloc.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64PerfectShuffle.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64PfmCounters.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64PreLegalizerCombiner.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64PromoteConstant.cpp [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
AArch64RedundantCopyElimination.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64RegisterBankInfo.cpp [GlobalISel][AArch64] Select G_FEXP 2019-01-30 23:46:15 +00:00
AArch64RegisterBankInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64RegisterBanks.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64RegisterInfo.cpp [COFF, ARM64] Fix localaddress to handle stack realignment and variable size objects 2019-02-01 21:41:33 +00:00
AArch64RegisterInfo.h [COFF, ARM64] Fix localaddress to handle stack realignment and variable size objects 2019-02-01 21:41:33 +00:00
AArch64RegisterInfo.td hwasan: Move memory access checks into small outlined functions on aarch64. 2019-01-23 02:20:10 +00:00
AArch64SchedA53.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedA57.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedA57WriteRes.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedCyclone.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedExynosM1.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedExynosM3.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedExynosM4.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedFalkor.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedFalkorDetails.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedKryo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedKryoDetails.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedPredExynos.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedPredicates.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedThunderX2T99.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedThunderX.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64Schedule.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SelectionDAGInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SelectionDAGInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SIMDInstrOpt.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SpeculationHardening.cpp [SLH] AArch64: correctly pick temporary register to mask SP 2019-01-23 08:18:39 +00:00
AArch64StorePairSuppress.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64Subtarget.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64Subtarget.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SVEInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SystemOperands.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64TargetMachine.cpp [COFF, ARM64] Don't put jump table into a separate COFF section for EK_LabelDifference32 2019-01-29 09:36:48 +00:00
AArch64TargetMachine.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64TargetObjectFile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64TargetObjectFile.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64TargetTransformInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64TargetTransformInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [AArch64] Include AArch64GenCallingConv.inc once 2019-01-28 21:28:40 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SVEInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00