similar to: [LLVMdev] LLVM custom dynamic casting mechanism

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] LLVM custom dynamic casting mechanism"

2012 Oct 05
2
[LLVMdev] TableGen: Requesting feedback for "TGContext"
> It won't cause a negative effect, go for it! Dynamic_cast is realllly slow compared to dyn_cast, it is worth the memory. Ok, here's the first batch. It converts the RecTy hierarchy over to use LLVM-style RTTI. Along the way, I also wrote up a new doc "How to set up LLVM-style RTTI for your class hierarchy", which covers the previously undocumented (albeit not that
2012 Oct 05
0
[LLVMdev] TableGen: Requesting feedback for "TGContext"
On Oct 4, 2012, at 5:15 PM, Sean Silva <silvas at purdue.edu> wrote: >> It won't cause a negative effect, go for it! Dynamic_cast is realllly slow compared to dyn_cast, it is worth the memory. > > Ok, here's the first batch. It converts the RecTy hierarchy over to > use LLVM-style RTTI. Along the way, I also wrote up a new doc "How to > set up LLVM-style
2017 Jun 09
2
Subclassing LLVM Type
This [1] might worth reading, Malhar. [1] http://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html 2017-06-10 4:12 GMT+08:00 Tim Northover via llvm-dev < llvm-dev at lists.llvm.org>: > On 9 June 2017 at 12:03, Jajoo, Malhar via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > Is there some way around this ( without suggesting a change to my entire > AST ) ? > > LLVM
2012 Oct 04
0
[LLVMdev] TableGen: Requesting feedback for "TGContext"
It won't cause a negative effect, go for it! Dynamic_cast is realllly slow compared to dyn_cast, it is worth the memory. -Chris On Oct 3, 2012, at 9:39 PM, Sean Silva <silvas at purdue.edu> wrote: > Thanks for the feedback! > >>> Does anybody have anything else they think should go into TGContext or >>> any other responsibilities it should have? Or any
2017 Jun 09
2
Subclassing LLVM Type
Hi, I was wondering if it was possible to create a Dummy Type by subclassing LLVM Type. I do not want to create a new type or even do much with this dummy type , all I need is a placeholder type until I generate IR. I want to use this approach as most of my AST is already configured to accept a Type* and not a DummyType* ( which is my own class ) I explored this a bit and did manage to
2005 Apr 22
6
[LLVMdev] isa and friends as an alternative to dynamic cast?
I see a bunch of definitions scattered throughout LLVM, and I could not find good documentation on them. I don't understand why they exist when LLVM is being compiled with RTTI enabled. It seems to me that: isa<T>(x) is a substitute for (dynamic_cast<T>(x) != NULL) and there are some other similar casting tools defined in Casting.h. Why should I use these instead of C++'s
2012 Oct 04
2
[LLVMdev] TableGen: Requesting feedback for "TGContext"
Thanks for the feedback! >> Does anybody have anything else they think should go into TGContext or >> any other responsibilities it should have? Or any feedback about the >> idea in general? > > All memory allocations should go into its bump pointer, RecordKeeper should as well. Any other global state that exist should also. Sounds good. >> I'm also hoping
2012 Nov 29
2
[LLVMdev] [cfe-dev] UB in TypeLoc casting
Moving to LLVM dev to discuss the possibility of extending the cast infrastructure to handle this. On Tue, Nov 20, 2012 at 5:51 PM, John McCall <rjmccall at apple.com> wrote: > On Nov 18, 2012, at 5:05 PM, David Blaikie <dblaikie at gmail.com> wrote: >> TypeLoc casting looks bogus. >> >> TypeLoc derived types return true from classof when the dynamic type >>
2008 Dec 10
2
[LLVMdev] dyn_cast really doesn't like multiple inheritance
Been having a bit of a problem with dyn_cast: Suppose I have a class A that inherits from two base classes, both of which support dyn_cast. In order to use dyn_cast on A, I need to do a bunch of extra work: 1) Since dyn_cast uses reinterpret_cast rather than static_cast, the pointer value won't get adjusted by the cast operation, making the pointer invalid. I end up having to redefine
2012 Dec 17
4
[LLVMdev] BasicBlock back()
Hello, I am a beginner of LLVM. I am trying to move among the instructions of a BasicBlock and I cannot. In this particular example, I try to get the previous instruction of the end instruction. I am trying 2 methods: 1. I have the following sequence of code: bool patternDC::runOnBasicBlock(BasicBlock &BB) { ... if (BB.getTerminator()) { Instruction* current =
2012 Nov 30
3
[LLVMdev] [cfe-dev] UB in TypeLoc casting
On Thu, Nov 29, 2012 at 7:43 PM, Eli Friedman <eli.friedman at gmail.com>wrote: > On Thu, Nov 29, 2012 at 3:49 PM, David Blaikie <dblaikie at gmail.com> wrote: > > Moving to LLVM dev to discuss the possibility of extending the cast > > infrastructure to handle this. > > > > On Tue, Nov 20, 2012 at 5:51 PM, John McCall <rjmccall at apple.com> wrote:
2012 Dec 05
0
[LLVMdev] [cfe-dev] UB in TypeLoc casting
On Thu, Nov 29, 2012 at 8:16 PM, Richard Smith <richard at metafoo.co.uk> wrote: > On Thu, Nov 29, 2012 at 7:43 PM, Eli Friedman <eli.friedman at gmail.com> > wrote: >> >> On Thu, Nov 29, 2012 at 3:49 PM, David Blaikie <dblaikie at gmail.com> wrote: >> > Moving to LLVM dev to discuss the possibility of extending the cast >> > infrastructure to
2013 Mar 18
2
[LLVMdev] Help with LLVM 3.2 linking error
Il giorno 18/mar/2013, alle ore 15:14, Óscar Fuentes <ofv at wanadoo.es> ha scritto: > Nicola Gigante <nicola.gigante at gmail.com> writes: > >> The error I get is the following: >> Undefined symbols for architecture x86_64: >> "typeinfo for llvm::FoldingSetImpl", referenced from: >> typeinfo for llvm::FoldingSet<Type> in Program.o
2013 Feb 11
3
[LLVMdev] [cfe-dev] UB in TypeLoc casting
On Wed, Dec 5, 2012 at 1:06 PM, David Blaikie <dblaikie at gmail.com> wrote: > On Thu, Nov 29, 2012 at 8:16 PM, Richard Smith <richard at metafoo.co.uk> wrote: >> On Thu, Nov 29, 2012 at 7:43 PM, Eli Friedman <eli.friedman at gmail.com> >> wrote: >>> >>> On Thu, Nov 29, 2012 at 3:49 PM, David Blaikie <dblaikie at gmail.com> wrote:
2012 Dec 17
0
[LLVMdev] BasicBlock back()
On 12/17/12 10:34 AM, Alexandru Ionut Diaconescu wrote: > Hello, > > I am a beginner of LLVM. I am trying to move among the instructions of > a BasicBlock and I cannot. In this particular example, I try to get > the previous instruction of the end instruction. I am trying 2 methods: > > > > 1. I have the following sequence of code: > > bool
2017 Jun 28
2
Multiple Inheritance with dyn_cast
Hello, I recently ran into an issue where I wanted to use dyn_cast with a Multiple Inheritance hierarchy. LLVM’s help page on RTTI claims that it can be done, and that Clang’s Decl and DeclContext implement it; however, when I try to use it I run into odd behavior. Here’s my sample code which doesn’t work: ``` struct Base { void *ptr; bool hasInfo; }; struct Info { int size; static
2013 Mar 18
2
[LLVMdev] Help with LLVM 3.2 linking error
Hello I'm trying to link my project with llvm 3.2 libraries. I haven't touched the project for some months. Previously I used to link to an svn build of llvm 3.1 and everything worked fine. I've compiled llvm with ./configure --enable-libcpp --enable-cxx11 Currently I'm only using StringRef, SmallVector and FoldingSet, so I only link libLLVMSupport and libLLVMCore. Are they
2013 Mar 20
2
[LLVMdev] Help with LLVM 3.2 linking error
Il giorno 18/mar/2013, alle ore 18:47, Óscar Fuentes ha scritto: > > You can try building LLVM with > > CXXFLAGS=-frtti configure .... > CXXFLAGS=-frtti make ... > > I'm not sure if CXXFLAGS takes precedence over the hard-coded -fno-rtti > in the makefiles, though. > > With the cmake build, you can try as above (but replacing `configure' > with
2013 Mar 18
0
[LLVMdev] Help with LLVM 3.2 linking error
Nicola Gigante <nicola.gigante at gmail.com> writes: > The error I get is the following: > Undefined symbols for architecture x86_64: > "typeinfo for llvm::FoldingSetImpl", referenced from: > typeinfo for llvm::FoldingSet<Type> in Program.o > ld: symbol(s) not found for architecture x86_64 > > Looking at the error the question is: is llvm built
2013 Mar 20
0
[LLVMdev] Help with LLVM 3.2 linking error
Nicola Gigante <nicola.gigante at gmail.com> writes: >> Adding an option for enabling RTTI on the cmake build is trivial. Dunno >> about the `configure' build. You can try filing a feature request on >> Bugzilla. > > Ok, I've managed to refactor some code and remove uses of dynamic_cast. > Making my project work without rtti is a good thing anyway, but