Displaying 20 results from an estimated 50000 matches similar to: "[LLVMdev] Implementing devirtualization"
2011 Dec 08
0
[LLVMdev] Implementing devirtualization
On Thu, Dec 8, 2011 at 9:56 AM, Vitor Luis Menezes <vitor at utexas.edu> wrote:
> Hello all,
>
> Our compilers class has been using LLVM, and a partner and I decided to
> implement devirtualization of virtual C++ calls in LLVM as a class project.
> We quickly realized that existing debug metadata generated by Clang didn't
> give us enough info to (precisely) implement
2011 Dec 08
2
[LLVMdev] Implementing devirtualization
We've got the following test case:
class A {
public:
int x;
A(int x) : x(x) {}
int hoo() {return 4;}
virtual int foo() {return x;}
virtual int goo() {return foo()+10;}
virtual int operator+(A &a) {
return x + a.x;
}
};
class B : public A {
public:
B(int x) : A(x) {}
int hoo() {return 2;}
virtual int foo() {return A::foo()*2;}
};
int main() {
A* a = new A(1);
2011 Dec 09
0
[LLVMdev] Implementing devirtualization
On Thu, Dec 8, 2011 at 2:11 PM, Vitor Luis Menezes <vitor at utexas.edu> wrote:
> We've got the following test case:
>
>
> class A {
> public:
> int x;
> A(int x) : x(x) {}
> int hoo() {return 4;}
> virtual int foo() {return x;}
> virtual int goo() {return foo()+10;}
> virtual int operator+(A &a) {
> return x + a.x;
> }
> };
2015 Jul 16
4
[LLVMdev] Improving loop vectorizer support for loops with a volatile iteration variable
----- Original Message -----
> From: "Hal Finkel" <hfinkel at anl.gov>
> To: "Chandler Carruth" <chandlerc at google.com>
> Cc: llvmdev at cs.uiuc.edu
> Sent: Thursday, July 16, 2015 1:58:02 AM
> Subject: Re: [LLVMdev] Improving loop vectorizer support for loops
> with a volatile iteration variable
> ----- Original Message -----
> >
2011 Dec 09
0
[LLVMdev] Implementing devirtualization
Vitor Luis Menezes wrote:
> Hello all,
>
> Our compilers class has been using LLVM, and a partner and I decided to
> implement devirtualization of virtual C++ calls in LLVM as a class
> project. We quickly realized that existing debug metadata generated by
> Clang didn't give us enough info to (precisely) implement this, and as
> such have already begun modifying Clang to
2011 Dec 09
1
[LLVMdev] Implementing devirtualization
On Thu, Dec 8, 2011 at 4:26 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Thu, Dec 8, 2011 at 2:11 PM, Vitor Luis Menezes <vitor at utexas.edu> wrote:
>> We've got the following test case:
>>
>>
>> class A {
>> public:
>> int x;
>> A(int x) : x(x) {}
>> int hoo() {return 4;}
>> virtual int foo() {return x;}
2011 Dec 09
2
[LLVMdev] Implementing devirtualization
On Dec 8, 2011, at 10:03 PM, Nick Lewycky wrote:
> Noalias returns, nocapture, SCC refinement, linkonce_odr and
> available_externally were added with the goal of making devirtualization
> in LLVM happen, but as orthogonal independent optimizations. I think
> LLVM should continue with this design. If you want to implement a single
> substantial optimization pass, I would suggest
2015 Aug 13
2
[LLVMdev] Improving loop vectorizer support for loops with a volatile iteration variable
Hi Gerolf,
I think we have several (perhaps separable) issues here:
1. Do we have a canonical form for loops, preserved through the optimizer, that allows naturally-constructed loop nests to remain separable?
2. Do we forbid non-lowering transformations that turn vectorizable loops into non-vectorizable loops?
3. How do we detect cases where transformations cause a negative answer to either
2017 Dec 07
2
devirtualization with new-PM pipeline
Chandler et al,
I have been playing with the new PM pipeline, being particularly
interested in how it can handle devirtualization.
Now, I discovered what I believe is a "regression" vs old PM on a rather
simple one-translation-unit testcase.
clang is able to devirtualize it with -O3 and fails to do so with
-fexperimental-new-pass-manager added.
It looks like a pipeline issue,
2019 Feb 21
3
Preserving debug metadata across optimization
Hi,
I've recently run into a problem of missing !dbg metadata after the
code has been optimized (even opt -O1).
The original code was generated using llvmlite python package and I've
verified that all instructions have their !dbg metadata present.
After optimizing the module (even opt -O1) I see that some
instructions (~25%) don't have any dbg metadata.
These are mostly getelementptr
2018 Nov 23
2
is this a bug in an optimization pass?
The frontend code is a pretty simple for loop, that counts from i = 0;
i != 10; i += 1
It gets optimized into and endless loop.
export fn entry() void {
var array: [10]Bar = undefined;
var x = for (array) |elem, i| {
if (i == 1) break elem;
} else bar2();
}
Here's the generated IR:
; ModuleID = 'test'
source_filename = "test"
target datalayout =
2020 Jan 17
3
Help with SROA throwing away no-alias information
I'm having an issue where SROA will throw away no-alias information on some
loads after inlining, because the loads are derived from a store to an
alloca which can be removed after inlining.
The pointers that were originally stored into the alloca do *not *have any
aliasing information - the only context that allowed me to assert aliasing
was that the inlined-function guaranteed it to be so.
2017 Dec 14
2
devirtualization with new-PM pipeline
Yes, this looks broken in the new PM. The DevirtSCCRepeatedPass::run method
first scans the functions in the SCC to collect value handles for indirect
calls, runs the CGSCC pass pipeline and then checks if any of the call
value handles now point to a direct call, in which case it runs the
pipeline again (which should inline the devirtualized call) . The problem
is scanning the initial SCC for
2014 Dec 26
3
[LLVMdev] Correct usage of `llvm.assume` for loop vectorization alignment?
Using LLVM ToT and Hal's helpful slide deck [1], I've been trying to use
`llvm.assume` to communicate pointer alignment guarantees to vector load
and store instructions. For example, in [2] %5 and %9 are guaranteed to be
32-byte aligned. However, if I run this IR through `opt -O3 -datalayout
-S`, the vectorized loads and stores are still 1-byte aligned [3]. What's
going wrong? Do I
2017 Jun 19
2
LLVM behavior different depending on function symbol name
On Mon, Jun 19, 2017 at 12:06 PM, Mehdi AMINI <joker.eph at gmail.com> wrote:
> Hi,
>
> 2017-06-19 8:45 GMT-07:00 Andrew Kelley via llvm-dev <
> llvm-dev at lists.llvm.org>:
>
>> Greetings,
>>
>> I have a Zig implementation of ceil which is emitted into LLVM IR like
>> this:
>>
>> ; Function Attrs: nobuiltin nounwind
>> define
2011 Dec 10
0
[LLVMdev] Implementing devirtualization
John McCall wrote:
> On Dec 8, 2011, at 10:03 PM, Nick Lewycky wrote:
>> Noalias returns, nocapture, SCC refinement, linkonce_odr and
>> available_externally were added with the goal of making devirtualization
>> in LLVM happen, but as orthogonal independent optimizations. I think
>> LLVM should continue with this design. If you want to implement a single
>>
2020 Jul 16
2
LLVM 11 and trunk selecting 4 wide instead of 8 wide loop vectorization for AVX-enabled target
Hey list,
I've recently done the first test run of bumping our Burst compiler from
LLVM 10 -> 11 now that the branch has been cut, and have noticed an
apparent loop vectorization codegen regression for X86 with AVX or AVX2
enabled. The following IR example is vectorized to 4 wide with LLVM 11 and
trunk whereas in LLVM 10 it (correctly as per what we want) vectorized it 8
wide matching the
2020 Jul 16
2
LLVM 11 and trunk selecting 4 wide instead of 8 wide loop vectorization for AVX-enabled target
Tried a bunch of them there (x86-64, haswell, znver2) and they all
defaulted to 4-wide - haswell additionally caused some extra loop unrolling
but still with 8-wide pows.
Cheers,
-Neil.
On Thu, Jul 16, 2020 at 2:39 PM Roman Lebedev <lebedev.ri at gmail.com> wrote:
> Did you specify the target CPU the code should be optimized for?
> For clang that is -march=native/znver2/... /
2018 Jun 27
2
can debug info for coroutines be improved?
I'm going to show the same function, first normally, and then as a
coroutine, and show how gdb can see the variable when it's a normal
function, but not when it's a coroutine. I'd like to understand if this can
be improved.
I'm trying to debug a real world problem, but the lack of debug info on
variables in coroutines is making it difficult. Should I file a bug? Is
this a
2010 Oct 23
2
[LLVMdev] Cast failure in SelectionDAGBuilder
I'm trying to track down the problem with the assertion failure in
SelectionDAGBuilder.cpp. This is the code:
*case* *Intrinsic*::gcroot:
*if* (GFI) {
*const* Value *Alloca = I.getArgOperand(0);
*const* Constant *TypeMap = cast<Constant>(I.getArgOperand(1));
* FrameIndexSDNode *FI =
cast<FrameIndexSDNode>(getValue(Alloca).getNode());*