search for: devirtualizes

Displaying 20 results from an estimated 259 matches for "devirtualizes".

Did you mean: devirtualize
2019 Dec 11
5
RFC: Safe Whole Program Devirtualization Enablement
Please send any comments. As mentioned at the end I will follow up with some patches as soon as they are cleaned up and I create some test cases. RFC: Safe Whole Program Devirtualization Enablement =================================================== High Level Summary ------------------ The goal of the changes described in this RFC is to support aggressive Whole Program Devirtualization without
2010 Oct 13
4
[LLVMdev] Missed devirtualization opportunities
On Wed, Oct 13, 2010 at 12:45 AM, Nick Lewycky <nicholas at mxc.ca> wrote: > Kenneth Uildriks wrote: >>> >>> You're right, I hadn't thought this through. The whole point of making >>> them >>> local is to say that "I'm sure these callees won't modify that memory" >>> regardless of what functions actually get called,
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
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,
2010 Oct 14
0
[LLVMdev] Missed devirtualization opportunities
Kenneth Uildriks wrote: > On Wed, Oct 13, 2010 at 12:45 AM, Nick Lewycky<nicholas at mxc.ca> wrote: >> Kenneth Uildriks wrote: >>>> >>>> You're right, I hadn't thought this through. The whole point of making >>>> them >>>> local is to say that "I'm sure these callees won't modify that memory" >>>>
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
2017 Nov 30
3
Question about visibility analysis for whole program devirtualization pass
Hi! I have a question about whole program devirtualization pass. According to my understanding devirtualization is performed only for the classes that have hidden LTO visibility and this visibility is controlled by attributes in the source level or command line options. So visibility analysis is currently performed only in the front-end. But LLVM has LTO internalization pass that uses
2010 Oct 13
0
[LLVMdev] Missed devirtualization opportunities
On Oct 13, 2010, at 4:35 AM, Kenneth Uildriks wrote: > On Wed, Oct 13, 2010 at 12:45 AM, Nick Lewycky <nicholas at mxc.ca> wrote: >> Kenneth Uildriks wrote: >>>> >>>> You're right, I hadn't thought this through. The whole point of making >>>> them >>>> local is to say that "I'm sure these callees won't modify
2011 Dec 08
4
[LLVMdev] Implementing devirtualization
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 insert such metadata. However, for devirtualization we also
2010 Oct 13
0
[LLVMdev] Missed devirtualization opportunities
Kenneth Uildriks wrote: >> You're right, I hadn't thought this through. The whole point of making them >> local is to say that "I'm sure these callees won't modify that memory" >> regardless of what functions actually get called, even indirectly. We can't >> know that they won't modify the vptr in advance, so invariant doesn't work
2010 Oct 14
2
[LLVMdev] Missed devirtualization opportunities
On Wed, Oct 13, 2010 at 11:16 PM, Nick Lewycky <nicholas at mxc.ca> wrote: > Kenneth Uildriks wrote: >> >> On Wed, Oct 13, 2010 at 12:45 AM, Nick Lewycky<nicholas at mxc.ca>  wrote: >>> >>> Kenneth Uildriks wrote: >>>>> >>>>> You're right, I hadn't thought this through. The whole point of making >>>>>
2010 Oct 11
0
[LLVMdev] Missed devirtualization opportunities
On Oct 11, 2010, at 9:12 AM, Kenneth Uildriks wrote: > 3. The front-end, recognizing that scribbling on an instance's vtbl > pointer has undefined results, eliminated the loads of the vtbl > pointer and replaced them with @classvtbl.TestVirtual. This would > allow devirtualization within a function at least, but (I think) would > do less to allow analysis to spot
2015 Feb 04
2
[LLVMdev] IR extension proposal: bitset constants
On Tue, Feb 03, 2015 at 04:03:45PM -0800, Sean Silva wrote: > One other thing: if this can be used for control-flow integrity, I assume > it has to have good knowledge of the available indirect call targets. Could > we also use this information for devirtualization? I would expect so. If a bitset contains only one element, we should be able to teach the lowering pass to simply test that
2017 Dec 06
2
Question about visibility analysis for whole program devirtualization pass
Hi Peter, Thanks for the reply. I agree that the base class vtable may be not referenced by a derived class. However, the vtable of a derived class has to reference its parent type_info, and so having type_info internalized means that the class is final, doesn’t it? Thanks, Nikolai From: Peter Collingbourne [mailto:peter at pcc.me.uk] Sent: Wednesday, December 6, 2017 4:36 AM To: Gainullin,
2018 Mar 20
0
[cfe-dev] RFC: Devirtualization v2
Sounds like it works! Basically, adding these extra strip.invariant.group calls before pointer comparisons breaks the transform that was problematic. Presumably, clang would only strip invariant groups from pointers to dynamic types before casting them or using them in a comparison, so that the value equivalence optimization still works in the general case. The proposal trades value equivalence
2015 Jan 07
2
[LLVMdev] Inclusion of iostream affects devirtualization in release_35
Hello, I've stumbled upon the following behavior in branches/release_35 (as of 218689) under ubuntu 14.04 LTS amd64: whenever I include the (system-wise) gnu iostream header, clang++ stops devirtualizing the following code: #if BREAKAGE_ENSUES #include <iostream> #endif struct Base { virtual int foo() const = 0; }; struct A : Base { int a; A(const int a) : a(a) { } int foo() const
2010 Oct 13
3
[LLVMdev] Missed devirtualization opportunities
> You're right, I hadn't thought this through. The whole point of making them > local is to say that "I'm sure these callees won't modify that memory" > regardless of what functions actually get called, even indirectly. We can't > know that they won't modify the vptr in advance, so invariant doesn't work > here. Making it non-local just means
2016 Jun 20
2
Intended behavior of CGSCC pass manager.
On Sun, Jun 19, 2016 at 12:01 AM, Sanjoy Das <sanjoy at playingwithpointers.com > wrote: > Hi David, > > Xinliang David Li wrote: > >> I believe it is primarily used for ordering the visitation of > CallSCC's (i.e. SCC's in the "call graph"). > > This is what it can do -- but what benefit does it provide? > > One benefit is that once you
2010 Oct 11
4
[LLVMdev] Missed devirtualization opportunities
I took the output of clang, simplified it, and used it as a testbase. Essentially, there is one class with one virtual function; I create an instance and call the virtual method all in one function: ; The TestVirtual class vtbl @classvtbl.TestVirtual = constant %classvtbltype.TestVirtual { ; Pointers to the virtual methods for the TestVirtual class ... } ; ... define i32 @main() nounwind { ;
2010 Oct 14
0
[LLVMdev] Missed devirtualization opportunities
On Oct 14, 2010, at 5:08 AM, Kenneth Uildriks wrote: > On Wed, Oct 13, 2010 at 11:16 PM, Nick Lewycky <nicholas at mxc.ca> wrote: >> Kenneth Uildriks wrote: >>> >>> On Wed, Oct 13, 2010 at 12:45 AM, Nick Lewycky<nicholas at mxc.ca> wrote: >>>> >>>> Kenneth Uildriks wrote: >>>>>> >>>>>> You're