Displaying 20 results from an estimated 20000 matches similar to: "beneficial optimization of undef examples needed"
2017 Jun 19
3
beneficial optimization of undef examples needed
Sanjoy,
You have changed the subject. We still need real world examples
showing how taking advantage of “undef” results in beneficial optimization.
My belief is that they don’t exist, my reasoning is this: real world programmers
are likely to run UBSan before compiling (or if they don’t they should), therefore
it is highly unlikely that any “undef” will actually exist during
2017 Jun 28
2
The nsw story revisited
Preface: This paper shows that "poison" was never actually necessary
in the first place. “Poison"s existence is based on incorrect assumptions
that are being explored for the first time.
I have been re-reading Dan Gohman's original post "the nsw story" [1]
and have come to the conclusion that Dan got it wrong in some respects.
He came up with "no signed
2017 Jun 28
2
The nsw story revisited
Chandler,
Please give some citations, I’ve search the llvm-dev archives and didn't find any.
Peter Lawrence.
> On Jun 28, 2017, at 12:01 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
>
> On Wed, Jun 28, 2017 at 9:39 AM Peter Lawrence <peterl95124 at sbcglobal.net <mailto:peterl95124 at sbcglobal.net>> wrote:
>
> Preface: This paper
2017 Jun 28
2
The nsw story revisited
On 06/28/2017 02:18 PM, Chandler Carruth wrote:
> On Wed, Jun 28, 2017 at 12:09 PM Peter Lawrence
> <peterl95124 at sbcglobal.net <mailto:peterl95124 at sbcglobal.net>> wrote:
>
> Chandler,
> Please give some citations, I’ve search the
> llvm-dev archives and didn't find any.
>
>
> They are all in the discussions from Nuno,
2017 Jun 14
2
the nsw story, revisited
John,
Sanjoy,
Nuno,
David,
Thanks for the tip, below are the relevant posts from the archives.
I am suggesting something similar to Dan's third option below (Tue Nov 29 2011
"the nsw story”, Dan Gohman), when hoisting an instruction with ‘nsw’ it looses
the ‘nsw’ attribute, but without saying “add-nsw is a fully side-effecting
instruction”.
This option was back then seen by
2017 Jun 29
2
The undef story
Sean,
Many thanks for taking the time to respond. I didn’t make
myself clear, I will try to be brief...
> On Jun 28, 2017, at 7:48 PM, Sean Silva <chisophugis at gmail.com> wrote:
>
>
>
> On Wed, Jun 28, 2017 at 3:33 PM, Peter Lawrence via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> Chandler,
>
2017 Jun 28
9
The undef story
Chandler,
where we disagree is in whether the current project is moving the issue
forward. It is not. It is making the compiler more complex for no additional value.
The current project is not based in evidence, I have asked for any SPEC benchmark
that shows performance gain by the compiler taking advantage of “undefined behavior”
and no one can show that.
The current project
2017 Jun 08
7
RFC: Killing undef and spreading poison
Hi Peter,
On Thu, Jun 8, 2017 at 9:41 AM, Peter Lawrence
<peterl95124 at sbcglobal.net> wrote:
>
>> On Jun 7, 2017, at 2:23 PM, Nuno Lopes <nunoplopes at sapo.pt> wrote:
>>
>> Since most add/sub operations compiled from C have the nsw attribute, we cannot simply restrict movement of these instructions.
>
> Nuno,
> I’m not saying the operations
2017 Jun 07
2
RFC: Killing undef and spreading poison
Since most add/sub operations compiled from C have the nsw attribute, we
cannot simply restrict movement of these instructions.
Sure, we could drop nsw when moving these instructions, but there are still
many other problems left. Please read more about the topic here:
https://blog.regehr.org/archives/1496
For example, doing loop unswitching, followed by inline (just to illustrate
that the
2017 Jun 08
2
RFC: Killing undef and spreading poison
Sanjoy,
in your blog post https://www.playingwithpointers.com/problem-with-undef.html <https://www.playingwithpointers.com/problem-with-undef.html>
you describe a problem with LLVM “undef”,
yet in your paper http://www.cs.utah.edu/~regehr/papers/undef-pldi17.pdf <http://www.cs.utah.edu/~regehr/papers/undef-pldi17.pdf>
you do not suggest fixing this problem, even though in
2017 Jun 29
2
The undef story
Chandler,
Al right then, stay on topic, what do you actually think
should be done about the fact that the current proposal will mis-compile
the function-inlining example, and won’t be able to hoist a loop-invariat
divide out of a loop.
Peter Lawrence.
> On Jun 28, 2017, at 11:03 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
>
> On Wed, Jun 28, 2017 at
2017 Jun 28
2
The undef story
Part I.
The original LangRef appeared to be “nice and pretty”
and originally ‘undef’ did not seem to stick out.
Then evidence came to light in the form of bug reports, and
in the form of Dan Gohman’s email “the nsw story”, that all
was not good for ‘undef’ [1,2].
A proposal was made based on that evidence.
A presentation was made at an llvm gathering.
A paper was written. The proposal has even
2017 Jun 19
3
killing undef and spreading poison
Sanjoy,
My belief is that this is a register allocation problem
that should not be addressed in the IR.
However you have changed the subject, and we still need an example
showing why the proposed definition for branch is the right one.
Peter Lawrence.
> On Jun 16, 2017, at 7:39 PM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote:
>
> Hi Peter,
>
> On
2017 Jun 17
3
killing undef and spreading poison
Nuno,
we still need some examples showing that the definition
“Branching on poison is immediate-UB” is the best choice,
so far we only have arguments against it (the one for loop-switching).
Excerpts from the Paper [1]
Here’s the example you give for GVN
t = x + 1;
if (t == y) {
w = x + 1;
foo(w);
}
Therefore, GVN can pick y as the
2017 Jun 15
2
Function Inlining and undef / poison question
Nuno,
One of your recent emails got me thinking about inlining.
I say this function is always well defined,
And it always executes statement S
F(a)
{
If (a == a) S;
}
And that if this function is inlined it must still be well defined,
And still always execute statement S
But if I read your example correctly you feel that the result
of inlining is undefined behavior because “if
2017 Jun 02
5
RFC: Killing undef and spreading poison
Sanjoy,
My answer is that step 3, commuting the multiply with the sign-extends, is invalid,
As this is what causes the `udiv` to fault. I think it is invalid with or without the “freeze”,
why do you think step 3, the commute, without the “freeze" is valid ?
Also, do you think you can come up with an example that does not depend on signed
overflow being “undefined” ?
Peter
2017 Jun 13
4
A tagged architecture, the elephant in the undef / poison room
Here’s what seems to really be going on
“undef” === models an uninitialized register, but
“poison” === turns the entire IR into a tagged architecture
Is this really the way to go ?
It seems like a odd choice given that none of our current targets
are tagged architectures, all of this tagged IR has to somehow be
reduced back down to normal target machine instructions.
This question
2017 Jun 19
3
the root cause is CP, was: A tagged architecture, the elephant in the undef / poison room
Sanjoy,
The point is this, you have to take a stand one way or
the other on the function-inlining issue:
[1. this function *always* executes statement S,
F(a) {
If (a == a) S;
}
but in llvm if you inline it and “a” happens to be “undef” then nothing can
be said about whether statement S is executed. This is indefensible.]
My belief is this: that llvm exists for a
2017 Jun 19
4
the root cause is CP, was: A tagged architecture, the elephant in the undef / poison room
> On Jun 16, 2017, at 8:23 PM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote:
>
> Hi Peter,
>
> On Tue, Jun 13, 2017 at 10:27 AM, Peter Lawrence via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> Here’s what seems to really be going on
>>
>> “undef” === models an uninitialized register, but
>
> No, it specifically does
2017 Jun 29
8
The undef story
> On Jun 29, 2017, at 4:39 AM, Hal Finkel <hfinkel at anl.gov> wrote:
>
> On 06/28/2017 05:33 PM, Peter Lawrence wrote:
>> Chandler,
>> where we disagree is in whether the current project is moving the issue
>> forward. It is not. It is making the compiler more complex for no additional value.
>>
>> The current project is not based in