Displaying 7 results from an estimated 7 matches for "min_element".
2018 Aug 14
3
[RFC] Delaying phi-to-select transformation until later in the pass pipeline
...9;m
trying to do which made me think of doing this is described below, but from the
benchmarking I've done it looks like this is overall a good idea regardless of
if I manage to get that done or not.
Motivation
==========
My goal is to get clang to optimize some code containing a call to
std::min_element which is dereferenced, so something like:
float min_element_example(float *data, int size)
{
return *std::min_element(data, data+size);
}
which, after inlining a specialization, looks like:
float min_element_example_inlined(float *first, float *last)
{
for (float *p = first; p...
2019 Sep 03
2
SourceMgr vs EXPENSIVE_CHECKS
...cluded from /usr/include/c++/8/algorithm:62,
> from test.cpp:1:
> test.cpp:3:27: in ‘constexpr’ expansion of ‘std::min<int>(std::initializer_list<int>{((const int*)(& ._61)), 6})’
> /usr/include/c++/8/bits/stl_algo.h:3451:31: error: ‘constexpr _FIter std::min_element(_FIter, _FIter) [with _FIter = const int*]’ called in a constant expression
> { return *std::min_element(__l.begin(), __l.end()); }
> ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/c++/8/bits/stl_algo.h:5610:12: note: ‘constexpr _FIter std::min_element(_FIter,...
2019 Oct 02
2
SourceMgr vs EXPENSIVE_CHECKS
...+/8/algorithm:62,
>> > from test.cpp:1:
>> > test.cpp:3:27: in ‘constexpr’ expansion of ‘std::min<int>(std::initializer_list<int>{((const int*)(& ._61)), 6})’
>> > /usr/include/c++/8/bits/stl_algo.h:3451:31: error: ‘constexpr _FIter std::min_element(_FIter, _FIter) [with _FIter = const int*]’ called in a constant expression
>> > { return *std::min_element(__l.begin(), __l.end()); }
>> > ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
>> > /usr/include/c++/8/bits/stl_algo.h:5610:12: note: ‘constexpr _FIte...
2018 Apr 18
1
[RFC] Making GVN able to visit the same block more than once
...to
be quite difficult to resolve, so I thought I'd send out an RFC to make sure
that I'm not barking up the wrong tree with how I'm trying to do this.
Motivation and current behaviour
================================
The motiviating example here for what I'm trying to do is std::min_element, or
rather std::min_element after it's inlined into a function where the result is
dereferenced. If we have
fload min_element_example(float *first, float *last) {
return *std::min_element(first, last);
}
then after inlining we have something that looks like
float min_element(float...
2019 Sep 03
2
SourceMgr vs EXPENSIVE_CHECKS
...g unsigned
int> >*>()’
/home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/PointerUnion.h:64:25:
in ‘constexpr’ expansion of
‘std::min<int>(std::initializer_list<int>{((const int*)(& ._125)),
4})’
/usr/include/c++/8/bits/stl_algo.h:3451:31: error: ‘constexpr _FIter
std::min_element(_FIter, _FIter) [with _FIter = const int*]’ called in
a constant expression
{ return *std::min_element(__l.begin(), __l.end()); }
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_algo.h:5610:12: note: ‘constexpr _FIter
std::min_element(_FIter, _FIter) [with _...
2018 Aug 15
2
[RFC] Delaying phi-to-select transformation until later in the pass pipeline
...but from the
> benchmarking I've done it looks like this is overall a good idea
> regardless of
> if I manage to get that done or not.
>
> Motivation
> ==========
>
> My goal is to get clang to optimize some code containing a call to
> std::min_element which is dereferenced, so something like:
>
> float min_element_example(float *data, int size)
> {
> return *std::min_element(data, data+size);
> }
>
> which, after inlining a specialization, looks like:
>
> float min_element_example_in...
2018 Aug 17
2
[RFC] Delaying phi-to-select transformation until later in the pass pipeline
...rking I've done it looks like this is overall a good idea regardless of
>>> if I manage to get that done or not.
>>>
>>> Motivation
>>> ==========
>>>
>>> My goal is to get clang to optimize some code containing a call to
>>> std::min_element which is dereferenced, so something like:
>>>
>>> float min_element_example(float *data, int size)
>>> {
>>> return *std::min_element(data, data+size);
>>> }
>>>
>>> which, after inlining a specialization, looks like:
>&g...