1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/include/llvm
Artyom Skrobov d5f3afc063 Adding support for TargetLoweringBase::LibCall
Summary:
TargetLoweringBase::Expand is defined as "Try to expand this to other ops,
otherwise use a libcall." For ISD::UDIV and ISD::SDIV, the choice between
the two possibilities was defined in a rather convoluted way:

- if DIVREM is legal, expand to DIVREM
- if DIVREM has a custom lowering, expand to DIVREM
- if DIVREM libcall is defined and a remainder from the same division is
  computed elsewhere, expand to a DIVREM libcall
- else, expand to a DIV libcall

This had the undesirable effect that if both DIV and DIVREM are implemented
as libcalls, then ISD::UDIV and ISD::SDIV are expanded to the heavier DIVREM
libcall, even when the remainder isn't used.

The new code adds a new LegalizeAction, TargetLoweringBase::LibCall, so that
backends can directly control whether they prefer an expansion or a conversion
to a libcall. This makes the generic lowering code even more generic,
allowing its reuse in a wider range of target-specific configurations.

The useful effect is that ARM backend will now generate a call
to __aeabi_{i,u}div rather than __aeabi_{i,u}divmod in cases where
it doesn't need the remainder. There's no functional change outside
the ARM backend.

Reviewers: t.p.northover, rengolin

Subscribers: t.p.northover, llvm-commits, aemerson

Differential Revision: http://reviews.llvm.org/D13862

llvm-svn: 250826
2015-10-20 13:14:52 +00:00
..
ADT Add hashing and DenseMapInfo for ArrayRef 2015-10-18 14:04:56 +00:00
Analysis Removed parameter "Consecutive" from isLegalMaskedLoad() / isLegalMaskedStore(). 2015-10-19 07:43:38 +00:00
AsmParser AsmParser: Save and restore the parsing state for types using SlotMapping. 2015-08-21 21:32:39 +00:00
Bitcode Pass FunctionInfoIndex by reference to WriteFunctionSummaryToFile (NFC) 2015-10-19 19:06:06 +00:00
CodeGen Revert "RegisterPressure: allocatable physreg uses are always kills" 2015-10-19 17:44:22 +00:00
Config Make the default triple optional by allowing an empty string 2015-09-16 05:34:32 +00:00
DebugInfo [llvm-pdbdump] Provide a mechanism to dump the raw contents of a PDB 2015-10-15 01:27:19 +00:00
ExecutionEngine [Orc] Make CompileOnDemandLayer::findSymbol call BaseLayer::findSymbol if no 2015-10-20 04:35:02 +00:00
IR AVX512: Implemented encoding and intrinsics for VPBROADCASTB/W/D/Q instructions. 2015-10-20 11:56:42 +00:00
IRReader Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LibDriver LibDriver: Replace references to lld-link2 with lld-link. 2015-08-06 19:00:42 +00:00
LineEditor Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Linker New bitcode linker flags: 2015-09-01 17:55:55 +00:00
LTO Reapply "LTO: Disable extra verify runs in release builds" 2015-09-15 23:05:59 +00:00
MC Use binary search in isCPUStringValid since the array is sorted. 2015-10-17 16:37:09 +00:00
Object [llvm-readobj/ELF] Print GNU Hash section 2015-10-14 12:11:50 +00:00
Option Add an ArgList::AddAllArgs that accepts a vector of OptSpecifier. 2015-07-29 17:34:41 +00:00
Passes Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ProfileData Minor Instr PGO code restructuring 2015-10-18 01:02:29 +00:00
Support Add emacs c++ mode hint. 2015-10-16 00:44:01 +00:00
TableGen Re-commit r247216: "Fix Clang-tidy misc-use-override warnings, other minor fixes" 2015-09-10 16:49:58 +00:00
Target Adding support for TargetLoweringBase::LibCall 2015-10-20 13:14:52 +00:00
Transforms Fix -Wdeprecated regarding ORC copying ValueMaterializers 2015-10-19 22:15:55 +00:00
CMakeLists.txt
InitializePasses.h [WinEH] Add a funclet layout pass 2015-09-17 20:45:18 +00:00
LinkAllIR.h
LinkAllPasses.h [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
module.modulemap Rename one of our two llvm::GCOVOptions classes to llvm::GCOV::Options. We used 2015-10-14 00:04:19 +00:00
module.modulemap.build
Pass.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
PassAnalysisSupport.h [LPM] Teach the legacy pass manager to support *using* an analysis 2015-08-19 03:02:12 +00:00
PassInfo.h Reformat partially. 2015-10-05 04:46:30 +00:00
PassRegistry.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
PassSupport.h Support: Clean up TSan annotations. 2015-08-18 22:31:24 +00:00