1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/include/llvm
Sam McCall c06d4974d8 [ADT] llvm::bsearch, binary search for mere mortals
Summary:
Add to STLExtras a binary search function with a simple mental model:
You provide a range and a predicate which is true above a certain point.
bsearch() tells you that point.
Overloads are provided for integers, iterators, and containers.

This is more suitable than std:: alternatives in many cases:
 - std::binary_search only indicates presence/absence
 - upper_bound/lower_bound give you the opportunity to pick the wrong one
 - all of the options have confusing names and definitions when your predicate
   doesn't have simple "less than" semantics
 - all of the options require iterators
 - we plumb around a useless `value` parameter that should be a lambda capture

The API is inspired by Go's standard library, but we add an extra parameter as
well as some overloads and templates to show how clever C++ is.

Reviewers: ilya-biryukov, gribozavr

Subscribers: dexonsmith, kristina, llvm-commits

Tags: #llvm

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

llvm-svn: 358540
2019-04-16 23:53:28 +00:00
..
ADT [ADT] llvm::bsearch, binary search for mere mortals 2019-04-16 23:53:28 +00:00
Analysis [IR] Add WithOverflowInst class 2019-04-16 18:55:16 +00:00
AsmParser Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BinaryFormat [BinaryFormat] Update Mach-O ARM64E CPU subtype and dumping 2019-04-08 21:37:08 +00:00
Bitcode Add LLVM IR debug info support for Fortran COMMON blocks 2019-04-08 19:13:55 +00:00
CodeGen [TargetLowering] Rename preferShiftsToClearExtremeBits and shouldFoldShiftPairToMask (PR41359) 2019-04-16 20:57:28 +00:00
Config Moved everything SMT-related to LLVM and updated the cmake scripts. 2019-03-25 17:47:45 +00:00
DebugInfo [DWARF] Fix DWARFVerifier::DieRangeInfo::contains 2019-04-15 10:02:36 +00:00
Demangle llvm-undname: Tweak arena allocator 2019-04-16 13:52:30 +00:00
ExecutionEngine Simplify decoupling between RuntimeDyld/RuntimeDyldChecker, add 'got_addr' util. 2019-04-12 18:07:28 +00:00
FuzzMutate Fix misspelled filenames in file headers 2019-02-07 14:38:25 +00:00
IR [IR] Add WithOverflowInst class 2019-04-16 18:55:16 +00:00
IRReader [IRReader] Expose getLazyIRModule 2019-02-11 22:01:13 +00:00
LineEditor Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Linker Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LTO Revert [ThinLTO] Fix ThinLTOCodegenerator to export llvm.used symbols 2019-04-08 18:53:21 +00:00
MC Move getNumFrameInfos and getDwarfFrameInfos out of line and remove 2019-04-12 07:42:35 +00:00
MCA [MCA] Add an experimental MicroOpQueue stage. 2019-03-29 12:15:37 +00:00
Object [StackMaps] Update llvm-readobj to parse V3 Stackmaps 2019-04-13 03:55:13 +00:00
ObjectYAML [WebAssembly] Add DataCount section to object files 2019-04-12 22:27:48 +00:00
Option Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Passes [TimePasses] allow -time-passes reporting into a custom stream 2019-03-15 22:15:23 +00:00
ProfileData [ProfileSummary] Count callsite samples when computing total samples. 2019-04-03 19:54:43 +00:00
Remarks [Remarks] Emit a section containing remark diagnostics metadata 2019-03-27 01:13:59 +00:00
Support [Support][JSON] Add reserve() to json Array 2019-04-16 19:43:18 +00:00
TableGen [TableGen] Introduce !listsplat 'binary' operator 2019-04-10 18:26:36 +00:00
Target DAG: propagate whether an arg is a pointer for CallingConv decisions. 2019-04-15 12:03:54 +00:00
Testing/Support Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TextAPI [TextAPI] Fix off-by-one error in the bit index extraction loop 2019-04-05 12:58:15 +00:00
ToolDrivers Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Transforms Fix header guard typo and build error. 2019-04-15 17:29:21 +00:00
WindowsManifest Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WindowsResource Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XRay Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt
InitializePasses.h Remove esan. 2019-03-11 20:23:40 +00:00
LinkAllIR.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LinkAllPasses.h Recommit r354930 "[PGO] Context sensitive PGO (part 1)" 2019-02-27 17:24:33 +00:00
module.extern.modulemap [LLVM] Allow modulemap installation 2018-11-21 20:46:50 +00:00
module.install.modulemap [LLVM] Allow modulemap installation 2018-11-21 20:46:50 +00:00
module.modulemap Update modulemaps for Analysis/VecFuncs.def. 2019-04-09 17:05:36 +00:00
module.modulemap.build
Pass.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PassAnalysisSupport.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PassInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PassRegistry.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PassSupport.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00