search for: devirt

Displaying 20 results from an estimated 49 matches for "devirt".

2016 Sep 20
2
[cfe-dev] Recent clang regressions
...ogle/home/prazek/llvm-build-release/./bin/clang -fuse-ld=gold -flto -fsanitize=cfi -fwhole-program-vtables --driver-mode=g++ -fsanitize-cfi-cross-dso -fvisibility=default -DSHARED_LIB -fPIC -g -fsanitize-stats -shared -o /usr/local/google/home/prazek/llvm-build-release/projects/compiler-rt/test/cfi/Devirt/cross-dso/Output/ stats.cpp.tmp.so /usr/local/google/home/prazek/llvm/projects/compiler-rt/test/cfi/cross-dso/stats.cpp /usr/local/google/home/prazek/llvm-build-release/./bin/clang -fuse-ld=gold -flto -fsanitize=cfi -fwhole-program-vtables --driver-mode=g++ -fsanitize-cfi-cross-dso -fvisibility=def...
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, though I did not dig deepe...
2016 Sep 20
2
Recent clang regressions
There seem to be some recent regressions in clang/llvm. I see some test failing, and there is also this issue: https://llvm.org/bugs/show_bug.cgi?id=30466 Is anyone working on it? Piotr -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160920/ade5e8cd/attachment.html>
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 cal...
2018 Jun 03
2
Retrieving the name of a indirect virtual method call in LLVM pass
...uld be foo(). The only "name" I can get is the type of the class, in which this case is class.A. Is there any way I can get the name of the virtual method (foo) that is being invoked? It isn't in the bitcode except for when it is defined. I tried taking a look at the whole-program-devirt source but can't find where they are actually finding the names of the functions when building the virtual tables for each class. I would greatly appreciate any help on this and if it is possible at all. Thanks, Ben Fu -------------- next part -------------- An HTML attachment...
2016 Jul 15
2
RFC: Coroutine Optimization Passes
.... Option 1: Force revisit of the SCC if there are any coroutine in it. This makes CGPassManager aware of a coroutine attribute and keep restarting the pipeline until no functions in SCC has coroutine attribute on them. https://reviews.llvm.org/D21569 Option 2: Add a ref parameter bool& Devirt parameter to runSCC virtual method. If a pass sets Devirt to true, it indicates to CGPassManager that the changes were made that require restart of the pipeline. https://reviews.llvm.org/D21570 Option 3: Similar to Option 2, but instead of an extra parameter to runSCC, I add another virtu...
2017 Jan 19
2
[RFC] IR-level Region Annotations
...to their type system, but we didn’t inject this > higher level information that helps the optimizer as first class IR > constructs. > FWIW, while i agree with the general point, i wouldn't use this example. Because we pretty much still suffer to this day because of it (both in AA, and devirt, and ...) :) We can't always even tell fields apart -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170119/b8ef48a0/attachment.html>
2016 Jul 15
4
RFC: Coroutine Optimization Passes
...I listed (repeated in P.S), or even some better way I did not think about? Thank you, Gor P.S. Option 1: https://reviews.llvm.org/D21569 (no longer relevant, since we are removing AttrKind::Coroutine) Option 2: https://reviews.llvm.org/D21570 (bool& Devirt in runSCC) Option 3: https://reviews.llvm.org/D21572 (virtual bool restatedRequested()) Option 4: Fake devirtualized call in a function pass, so that RefreshSCC will detect devirtualization and restart the pipeline by itself.
2016 Jan 28
2
Proposal: virtual constant propagation
...>> >> — >> Mehdi >> >> >>> On Jan 27, 2016, at 10:29 PM, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org> wrote: >>> >>> Hi Peter, >>> >>> Pete (Cooper, CC'ed) had a similar idea a few months ago about devirtualization and LTO: we can know the set of possible overload based on the knowledge of a closed type hierarchy. He worked on a prototype, and I continued to evolve it. I planned to submit something on the mailing list but couldn’t fit it in my planning before April :) >>> Our plan was about...
2017 Jan 19
3
[RFC] IR-level Region Annotations
...dn’t inject this >> higher level information that helps the optimizer as first class IR >> constructs. >> > > FWIW, while i agree with the general point, i wouldn't use this example. > Because we pretty much still suffer to this day because of it (both in AA, > and devirt, and ...) :) > We can't always even tell fields apart > > > Is it inherent to the infrastructure, i.e. using metadata instead of first > class IR construct or is it just a “quality of implementation” issue? > > Not to derail this conversation: IMHO, At some point there is...
2016 Jul 14
5
RFC: Strong GC References in LLVM
...bject o; void func() { Object val = this.o; } } class G { public static void f(I instance) { instance.func(); } } then when compiling func() separately there is nothing the load of val is control dependent on, but in G::f if we do some form of predicated devirtualization and then inline the body of F::func then the safety of the load is predicated on the devirtualization predicate passing too. If the predicated devirt. was itself conditional on some control flow based type refinement, then the safety of the load is control dependent on that control flow...
2018 Jun 08
1
Retrieving the name of a indirect virtual method call in LLVM pass
...led, which should be foo(). The only “name” I can get is the type of the class, in which this case is class.A. Is there any way I can get the name of the virtual method (foo) that is being invoked? It isn’t in the bitcode except for when it is defined. I tried taking a look at the whole-program-devirt source but can’t find where they are actually finding the names of the functions when building the virtual tables for each class. I would greatly appreciate any help on this and if it is possible at all. Thanks, Ben Fu _______________________________________________ LLVM Developers...
2017 Jan 20
2
[RFC] IR-level Region Annotations
...helps the optimizer as first class IR constructs. >>> >>> >>> FWIW, while i agree with the general point, i wouldn't use this >>> example. >>> Because we pretty much still suffer to this day because of it >>> (both in AA, and devirt, and ...) :) >>> We can't always even tell fields apart >> >> Is it inherent to the infrastructure, i.e. using metadata instead >> of first class IR construct or is it just a “quality of >> implementation” issue? >> >> >> Not t...
2012 Sep 29
2
[LLVMdev] Inlining and virtualization in Clang/LLVM
Hello, at the moment the devirtualization of calls is performed in Clang (as far as I understand) whilst inlining and constant propagation are the optimizer's (LLVM) job. It is probably necessary for Clang to perform "some" devirtualization (the meaning of `final` is not known to LLVM), however all the stuff to det...
2018 Feb 28
0
Missed optimization - spill/load generated instead of reg-to-reg move (and two other questions)
...w that we have anything like this, but we totally should if we don't.  You're more likely to get a useful answer if you send this separately to cfe-dev though.  The clang frontend devs don't tend to read emails apparently about register allocation.  :) If you want to assist with the devirt directly, you could capture the member pointer on the first iteration, then reuse.  This does require that all Nodes in your array are the exact same type though! > > Finally, I'm inclined to say that this routine should be vectorizable, > since > it's essentially just an ac...
2019 Dec 14
5
LLVM 9.0.1-rc3 has been tagged
Hi, I've just tagged LLVM 9.0.1-rc3. Testers can begin testing and uploading binaries. This will be the last release candidate unless there is a major problem. I'm planning to tag the final release on Dec 19. -Tom
2018 Feb 27
2
Missed optimization - spill/load generated instead of reg-to-reg move (and two other questions)
Hello all! I was looking through the results of disassembling a heavily-used short function in the program I'm working on, and ended up wondering why LLVM was generating that assembly and what changes would be necessary to improve the code. I asked on #llvm, but it seems that the people with the necessary expertise weren't around. Here is a condensed version of the code:
2019 Nov 23
5
LLVM 9.0.1-rc1 Release has been tagged
Hi, I've tagged the LLVM 9.0.1-rc1 release. Testers can begin testing and upload binaries. I've also updated the test-release.sh script to pull from GitHub instead of SVN, if you run into any issues with the new script, let me know. -Tom
2011 Dec 13
0
[LLVMdev] Implementing devirtualization
...te: > On Dec 10, 2011, at 12:26 PM, Nick Lewycky wrote: >> 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 >>>> substantial optimization pass, I would suggest FSIPSCCP as the largest >>>> thing yo...
2019 Dec 20
7
LLVM 9.0.1-final has been tagged
Hi, I've just tagged the 9.0.1-final release. Testers can begin uploading binaries. -Tom