similar to: [LLVMdev] Localizing Globals ?

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] Localizing Globals ?"

2009 Jun 16
0
[LLVMdev] Localizing Globals ?
On Tue, Jun 16, 2009 at 2:35 AM, Sanjiv Gupta<sanjiv.gupta at microchip.com> wrote: > What if my global variable was into a different address space than stack? It doesn't matter in terms of semantics: because AnalyzeGlobal returned false, we're guaranteed the address of the global is never taken. I wouldn't be surprised if we end up generating invalid IR in some cases,
2009 Jun 17
2
[LLVMdev] Localizing Globals ?
Eli Friedman wrote: > On Tue, Jun 16, 2009 at 2:35 AM, Sanjiv Gupta<sanjiv.gupta at microchip.com> wrote: > >> What if my global variable was into a different address space than stack? >> > > It doesn't matter in terms of semantics: because AnalyzeGlobal > returned false, we're guaranteed the address of the global is never > taken. I
2010 Oct 28
2
[LLVMdev] global optimizer precision
Hi all, I had a look at the interprocedural optimizer. In my opinion the routine 'GlobalOpt::ProcessInternalGlobal' is a little bit to conservative. It removes global variables if the only routine using this variable is main. Typically this condition is valid only for very few global variables. Here is a code snippet containing the test before the transformation: file:
2013 Jul 08
1
[LLVMdev] Special cased global-to-local-in-main replacement in GlobalOpt
Hello, GlobalOpt has an interesting special-case optimization for globals that are only accessed within "main". These globals are replaced by allocas within the "main" function (and the GV itself is deleted). The full condition for this happening is: // If this is a first class global and has only one accessing function // and this function is main (which we know is not
2009 Jun 17
0
[LLVMdev] Localizing Globals ?
On Tue, Jun 16, 2009 at 9:12 PM, Sanjiv Gupta<sanjiv.gupta at microchip.com> wrote: > The problem is replaceAllUsesWith asserts for type mismatch here. Try > attached .bc with llvm-ld. > > assert(New->getType() == getType() && >        "replaceAllUses of value with new value of different type!"); Ah, right; it probably isn't worth the effort to fix
2009 Apr 28
1
[LLVMdev] AddressSpace of a GlobalAddress
Every GlobalAddress has a GlobalValue, Every GlobalValue is a PointerType, Every PointerType has an AddressSpace. So is it ok to add a method getAddressSpace in GlobalAddressSDNode class itself? Currently we have to do GSDN->getGlobal()->getType()->getAddressSpace(). - Sanjiv
2009 Jul 16
3
[LLVMdev] llvm-ld -disable-opt behavior.
On Wed, 2009-07-15 at 10:37 -0700, Devang Patel wrote: > On Wed, Jul 15, 2009 at 9:32 AM, sanjiv gupta<sanjiv.gupta at microchip.com> wrote: > > Consider the example command line below > > > > $ llvm-ld -disable-opt hello.bc -l std -o hello.out > > > > Why does -disable-opt links in all the bitcode from the libstd.so into > > hello.out? > > ...
2009 Jun 29
4
[LLVMdev] llvmc for PIC16
Mikhail Glushenkov wrote: > Hi Sanjiv, > > 2009/6/18 Sanjiv Gupta <sanjiv.gupta at microchip.com>: > >> Hi Mikhail, >> Thanks for your wonderful help so far. I have few more questions to ask: >> >> How do I modify the driver to pick tools from where the driver itself >> resides, rather than from the PATH? >> Do I need to write some C++ code
2009 Jul 21
7
[LLVMdev] LLVM and Interrupt Service Routines.
Hi, Apparently, there is no explicit support for ISRs in the llvm framework. I could not find a matching attribute that can be used to mark a function as an ISR, which codegen and optimizer can use accordingly. ISRs aren't called explicity from any function, so currently the optimizer deletes them. We are planning to introduce a new "interrupt" attribute (to be modeled similiar to
2009 Jul 15
3
[LLVMdev] llvm-ld -disable-opt behavior.
Consider the example command line below $ llvm-ld -disable-opt hello.bc -l std -o hello.out Why does -disable-opt links in all the bitcode from the libstd.so into hello.out? - Sanjiv
2009 Oct 05
2
[LLVMdev] SoftenSetCCOpernads in LegalizeFloatTypes.cpp
Sanjiv Gupta wrote: > Sanjiv Gupta wrote: > >> Duncan Sands wrote: >> >> >>> Hi Sanjiv, I think a lot of the softening code assumes you are dealing >>> with float (32 bits). So it's not just a matter of changing the libcall >>> return type. >>> >>> >>> >> Yes, we are dealing with 32-bits
2009 Dec 25
1
[LLVMdev] SoftenSetCCOpernads in LegalizeFloatTypes.cpp
On Mon, 2009-10-05 at 16:54 -0700, Eli Friedman wrote: > On Mon, Oct 5, 2009 at 11:11 AM, Sanjiv Gupta > <sanjiv.gupta at microchip.com> wrote: > > Sanjiv Gupta wrote: > >> Sanjiv Gupta wrote: > >> > >>> Duncan Sands wrote: > >>> > >>> > >>>> Hi Sanjiv, I think a lot of the softening code assumes you are
2009 Sep 10
4
[LLVMdev] tblgen bug in handling case , switch_on
Mikhail Glushenkov wrote: > Hi Sanjiv, > > On Sun, Sep 6, 2009 at 8:13 PM, Mikhail > Glushenkov<the.dead.shall.rise at gmail.com> wrote: > >> Hi Sanjiv, >> >> On Sun, Sep 6, 2009 at 8:07 PM, Mikhail >> Glushenkov<the.dead.shall.rise at gmail.com> wrote: >> >>> [...] >>> >> [Sorry, the formatting was a
2009 Jun 23
3
[LLVMdev] llvmc for PIC16
> BTW, Chris's Makefile changes broke llvmc yesterday (r75379). I'm > working on a fix. Hi Mikhail, Did you get a chance to fix this. I still get errors while building examples. i00202 at ubuntu:~/projects/llvm/tools/llvmc/example/mcc16$ make make[1]: Entering directory `/home/i00202/projects/llvm/tools/llvmc/example/mcc16/plugins' make[2]: Entering directory
2009 Jul 11
1
[LLVMdev] Why the optimizer removes unused "volatile" globals?
PIC16 does not want globals marked with section attributes being deleted. But I see llvm-ld removes them even if the user marks them as "volatile".I wonder why? - Sanjiv
2009 Jun 30
0
[LLVMdev] llvmc for PIC16
Hi Sanjiv, 2009/6/29 Sanjiv Gupta <sanjiv.gupta at microchip.com>: > I want to retrieve the value of argv[0] (which was passed to main function > of the driver) in PrependCustomizedPath. I've added a way to access argv[0] in hooks: http://thread.gmane.org/gmane.comp.compilers.llvm.cvs/50789 -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against
2009 Jul 02
2
[LLVMdev] llvmc for PIC16
Hi Sanjiv, On Wed, Jul 1, 2009 at 7:02 PM, Sanjiv Gupta<sanjiv.gupta at microchip.com> wrote: > I found out the problem. Looks like I can not rely on argv[0] to contain the > full path of the executable always. Yeah, that's what I was thinking. > Can I rely on: > static Path GetMainExecutable(const char *argv0, void *MainAddr); Clang relies on it. According to
2008 Aug 19
2
[LLVMdev] Type Legalizer - Load handling problem
On Mon, 2008-08-18 at 08:50 -0700, Eli Friedman wrote: > On Mon, Aug 18, 2008 at 6:31 AM, <Sachin.Punyani at microchip.com> wrote: > > assert(Res.getValueType() == N->getValueType(0) && N->getNumValues() == 1 && > > "Invalid operand expansion"); > > > > LOAD node has two values but the assertion checks N->getNumValues() == 1 >
2009 Jul 12
2
[LLVMdev] llvm-ld's output file names.
Hi Mikhail, I have one more problem related to driver/llvm-ld at my hand for which i could not think of any solution. May be you can help. We use llvm-ld as a linker to link .bc alongwith other .bc libs. example $ llvm-ld foo.bc -l std -o tmp.bc Now this command generates two files 1. tmp.bc (lli executable script) 2. tmp.bc.bc (the linked output .bc) Now i am interested only in
2009 Jul 15
0
[LLVMdev] llvm-ld -disable-opt behavior.
On Wed, Jul 15, 2009 at 9:32 AM, sanjiv gupta<sanjiv.gupta at microchip.com> wrote: > Consider the example command line below > > $ llvm-ld -disable-opt hello.bc -l std -o hello.out > > Why does -disable-opt links in all the bitcode from the libstd.so into > hello.out? ... because it just disables optimization passed. It does not disable linking. ? - Devang