Go to the documentation of this file.
14 #ifndef LLVM_ADT_PRIORITYQUEUE_H
15 #define LLVM_ADT_PRIORITYQUEUE_H
27 class Compare = std::less<typename Sequence::value_type> >
28 class PriorityQueue :
public std::priority_queue<T, Sequence, Compare> {
35 template<
class Iterator>
49 typename Sequence::size_type
i =
find(this->
c, t) - this->
c.begin();
53 typename Sequence::size_type parent = (
i - 1) / 2;
54 this->
c[
i] = this->
c[parent];
71 std::make_heap(this->
c.begin(),
this->c.end(),
this->comp);
void clear()
clear - Erase all elements from the queue.
This is an optimization pass for GlobalISel generic memory operations.
const_iterator end(StringRef path)
Get end iterator over path.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
void reheapify()
reheapify - If an element in the queue has changed in a way that affects its standing in the comparis...
bitcast float %x to i32 %s=and i32 %t, 2147483647 %d=bitcast i32 %s to float ret float %d } declare float @fabsf(float %n) define float @bar(float %x) nounwind { %d=call float @fabsf(float %x) ret float %d } This IR(from PR6194):target datalayout="e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple="x86_64-apple-darwin10.0.0" %0=type { double, double } %struct.float3=type { float, float, float } define void @test(%0, %struct.float3 *nocapture %res) nounwind noinline ssp { entry:%tmp18=extractvalue %0 %0, 0 t
the resulting code requires compare and branches when and if the revised code is with conditional branches instead of More there is a byte word extend before each where there should be only and the condition codes are not remembered when the same two values are compared twice More LSR enhancements i8 and i32 load store addressing modes are identical int int c
PriorityQueue - This class behaves like std::priority_queue and provides a few additional convenience...
PriorityQueue(Iterator begin, Iterator end, const Compare &compare=Compare(), const Sequence &sequence=Sequence())
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
int compare(DigitsT LDigits, int16_t LScale, DigitsT RDigits, int16_t RScale)
Compare two scaled numbers.
PriorityQueue(const Compare &compare=Compare(), const Sequence &sequence=Sequence())
QP Compare Ordered outs ins xscmpudp No builtin are required Or llvm fcmp order unorder compare DP QP Compare builtin are required DP Compare
void erase_one(const T &t)
erase_one - Erase one element from the queue, regardless of its position.
Analysis the ScalarEvolution expression for r is this