similar to: [LLVMdev] clang promoting local to global

Displaying 20 results from an estimated 7000 matches similar to: "[LLVMdev] clang promoting local to global"

2012 Aug 15
0
[LLVMdev] clang promoting local to global
On Wed, Aug 15, 2012 at 11:26 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > I have a const array allocated inside a function and the IR is showing this > has a global function (ie. there is no allocation for the space inside the > function). > > For example: > > const int32 local_array[256] = {constValue, constValue, ..... } > > Is there any particular reason
2012 Aug 15
2
[LLVMdev] clang promoting local to global
Eli, thanks for responding, unfortunately, this did not resolve my issue. It's a locally allocated array in the C code, but I'm not seeing any alloca in the IR just geps from the variable, which is never setup. On Wed, Aug 15, 2012 at 11:33 AM, Eli Friedman <eli.friedman at gmail.com>wrote: > On Wed, Aug 15, 2012 at 11:26 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: >
2012 Aug 15
2
[LLVMdev] clang promoting local to global
#define r10(p,q,r,s) 0x##s##r##q##p #undef r #define r r10 const word it_tab[4][256] = { r(const, const, const, const), r(.......), r(.......) ....... }; All of this is done inside the function I want the alloc in. The variable is not declared/defined/used anywhere else. On Wed, Aug 15, 2012 at 12:00 PM, Eli Friedman <eli.friedman at gmail.com>wrote: > On Wed, Aug 15, 2012
2012 Aug 15
0
[LLVMdev] clang promoting local to global
On Wed, Aug 15, 2012 at 4:10 PM, Eli Friedman <eli.friedman at gmail.com>wrote: > On Wed, Aug 15, 2012 at 3:17 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > > So there are some #define (defined outside the function scope) that use > > it_tab that are used inside the function, is this why it is promoting it > to > > a global? > > Macros shouldn't
2012 Aug 15
2
[LLVMdev] clang promoting local to global
On Wed, Aug 15, 2012 at 3:17 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > So there are some #define (defined outside the function scope) that use > it_tab that are used inside the function, is this why it is promoting it to > a global? Macros shouldn't matter. Please give a complete testcase and steps to reproduce. And please don't top-post. -Eli > > On Wed,
2012 Aug 15
0
[LLVMdev] clang promoting local to global
So there are some #define (defined outside the function scope) that use it_tab that are used inside the function, is this why it is promoting it to a global? On Wed, Aug 15, 2012 at 2:57 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > #define r10(p,q,r,s) 0x##s##r##q##p > #undef r > #define r r10 > const word it_tab[4][256] = { r(const, const, const, const), >
2012 Aug 15
0
[LLVMdev] clang promoting local to global
On Wed, Aug 15, 2012 at 11:40 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > Eli, thanks for responding, unfortunately, this did not resolve my issue. > It's a locally allocated array in the C code, but I'm not seeing any alloca > in the IR just geps from the variable, which is never setup. That's strange; I just checked, and -fno-merge-all-constants definitely does
2012 Nov 16
5
[LLVMdev] Assert with getZExtValue()?
Was hoping it might get some help or a better explanation of this: /ADT/APInt.h:1217: uint64_t llvm::APInt::getZExtValue() const: Assertion `getActiveBits() <= 64 && "Too many bits for uint64_t"' failed. Program received signal SIGABRT, Aborted. 0x00007ffff6eb4d05 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64
2011 Dec 29
2
[LLVMdev] DW_AT_location not getting generated for local variables
I figured out my previous problem with DIBuilder. However, now I can't seem to get the compiler to emit location information for local variables. Here's how my IR looks: --- define i32 @"\01_main"() { init: %exception1 = alloca i8* %0 = alloca i32 %"bar:Int32" = alloca i32 %1 = alloca i32 %2 = alloca i32* br label %code code:
2012 Jan 02
0
[LLVMdev] DW_AT_location not getting generated for local variables
I found the problem. The llvm.dbg.declare call must have a !dbg tag, otherwise the location info is not generated. Changing the invocation in my original example to "call void @llvm.dbg.declare(metadata !{i32* %"bar:Int32"}, metadata !13), !dbg !16" causes MC to generate the local location as expected. -Joe On Thu, Dec 29, 2011 at 12:41 PM, Joe Groff <arcata at
2006 Oct 09
1
[PATCH] dbus terminate action
I was always annoyed that you couldn't terminate an action with dbus so I have written this patch which fixes that. Hopefully this can be included. I wrote the patch trying to repeat as little code as possible so I just added a boolean parameter to the dbusHandleActivateMessage and changed the name to dbusHandleActivateDeactivateMessage. You could probably change the deactivate parameter
2012 Oct 26
2
[LLVMdev] changes to raw_fd_ostream
I'm getting seemingly odd SegFaults when writing out using a raw_fd_ostream in the current trunk (last version worked, believe it was 153818, or similar). Again, nothing in the release notes... should I be scanning the svn log? For example, I have something like: raw_fd_ostream fout("out.txt", errorStr=""); .... fout<<"Hello World, how are you!"\n";
2010 Mar 17
2
[LLVMdev] llvm-gcc promotes i32 mul to i64 inside __muldi3
I'm building tool-chain for processor without integer MUL. So, I've defined __mulsi3 for integer multiplication (int32). Now I've got a problem with int64 multiplication which is implemented in libgcc2.c. Segfualt due to infinite recursion in i64 soft multiplication (libgcc2, __muldi3). LLVM-GCC (for my target) misoptimizes code if -O2 is passed. It promotes i32 multiplication to
2012 Oct 29
1
[LLVMdev] changes to raw_fd_ostream
So I did a clean checkout and build and still have this issue, did something changed with the way/when it's getting flushed? My old revision did not have this issue, this is an issue strictly with LLVM it seems. On Fri, Oct 26, 2012 at 3:27 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > It looks like some kind of file IO buffer overflow. I'm not dumping any > long strings
2012 Apr 25
2
[LLVMdev] Crash in JIT
Hello, [Using LLVM r155315, according to `svn log | head`] I am experimenting with programatically building and jitting functions in a module, and I seem to be coming across a crash in some generated code. Using the llvm-c interface I build up the module which dumps like this: ; ModuleID = 'MyModule' target datalayout = "i686-apple-darwin11" target triple =
2012 Apr 25
0
[LLVMdev] Crash in JIT
Hi David, I'm not certain, but to me the "LLVMSetTarget(module, "i686-apple-darwin11");" line looks suspicious. I'm not familiar with all the ins and outs of how target triples get handled, but it looks to me like that's requesting 32-bit code. I think that if you omit that line completely then the target will be inferred from the execution environment. My best
2007 Jan 27
3
keybindings patch, gnome-keybinding-bridge and vignettes plugins
Hi folks, For ubuntu specs and for a better desktop integration of compiz, I made some patchs and plugins. Focus prevention is now in main stream, and really better can i made :) First the workspace and terminal keybinding patch. Since my last email I updated the patch. http://gandalfn.club.fr/ubuntu/compiz-patch/91-workspaces-terminal-keybindings.patch It adds the support for vertical
2020 May 19
5
[PATCHv2] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
I've read up some more on the subject, and it seems the proper way to do this with GCC is g++ and target attributes. I've refactored the patch that way, and it indeed uses SSSE3 automatically on supporting CPUs, regardless of the build host, so this should be ideal both for home builders and distros. Getting the code to build right in c++ mode (checksum_sse2.cpp only) was a bit of an
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());*
2016 Mar 28
2
llvm extract struct elements and struct size in C++
LLVM Newbie here. I have the following C++ program using namespace std; struct A{ int i; int j; }; int main() { struct A obj; obj.i = 10; obj.j = obj.i; return 0; } Using clang++, I can see that LLVM IR contains struct field as below %struct.A = type { i32, i32 } I would like to obtain the structure elements using LLVM Pass. I write the following program - that iterates