similar to: [LLVMdev] Generating GetElementPtr inlined in a function argument list programmatically

Displaying 20 results from an estimated 100 matches similar to: "[LLVMdev] Generating GetElementPtr inlined in a function argument list programmatically"

2013 Aug 19
0
[LLVMdev] Generating GetElementPtr inlined in a function argument list programmatically
On Aug 19, 2013, at 14:26 , chentommy <baiypwup at hotmail.com> wrote: > Hello LLVMDev List, > > > It's my first time sending a message to the List - I have been working on a tool for my research project using LLVM. Thanks for your awesome work! > > I have come across some bytecode like the following with an GetElementPtr instruction in brackets: > >
2013 Aug 22
2
[LLVMdev] Crash in CreateShl() method
Hi All, AllocaInst * AI = builder.CreateAlloca(type, 0, BBName); StoreInst* ST= builderTF.CreateStore(ConstantInt::get(type,1),AI); Value * Vresult = (Value*)ST; Vresult = builderWait.CreateShl(Vresult, 1); I need to make one bit shift left to the variable stored in the second step I've got crash in this step opt: /home/xx/llvm2/llvm/include/llvm/Support/Casting.h:237: typename
2010 Jan 04
0
[LLVMdev] support for attach embedded metadata to function/argument/basicblock proposal
hi all, As i know attach embedded metadata nodes to function/argument/basicblock is not support yet, but such feature maybe useful to us. for example, we got the conversation " > Sorry, forgot to post to list. > > For 2.7 I'm wondering if you could use custom metadata attached to the first instruction of a "special" block? You could register a unique kind (not sure
2013 Sep 28
1
[LLVMdev] use function address as global variable initializer
Hi I would like to initialize a global variable to the address of a function. Looking at how clang compiles the C code below, i see @main_ptr = global i8* bitcast (i32 ()* @main to i8*), align 8 but how do i generate i8* bitcast (i32 ()* @main to i8*), align 8 in LLVM IR and use it as initializer to a GlobalVariable. I know i will need to use the bitcast instruction. but as far i as i
2017 Aug 22
5
[RFC] mir-canon: A new tool for canonicalizing MIR for cleaner diffing.
Patch for review. On Mon, Aug 21, 2017 at 11:45 PM Puyan Lotfi <puyan.lotfi.llvm at gmail.com> wrote: > Ping. > > Still working on preparing code for review. Will have a patch for review > ready in the coming days. > > PL > > On Tue, Aug 15, 2017 at 12:06 PM Puyan Lotfi <puyan.lotfi.llvm at gmail.com> > wrote: > >> Hi, >> >> >>
2014 Mar 29
2
[LLVMdev] Cast specific pointer type to generic one
Hi, Suppose I have a pointer to "something" (a structure I defined) and I want to pass the pointer to a generic function, that gets a 64-bit address pointer. How do I do that? For instance: The function is: void Foo (void *); I get the specific pointer using getPointerOperand() on a store instruction that store to it: inst->getPointerOperand()->getType() Now I want
2011 Aug 19
1
[LLVMdev] LLVM: Very simple question
Hi, guys. I'm a newbie to LLVM and have a very simple question. Which instructions should I use (in terms of IRBuilder calls) to allocate an array of bytes in stack (alloca?), then to work with it (from a given offset) as with integer (bitcast?). I mean something like that: unsigned char var[8]; unsigned int offset = 3; int val = *(int*)(&var+offset); /* read */ *(int*)(&var+offset)
2012 Feb 29
1
[LLVMdev] how to remove inlined function
Hi! I'm using clang/llvm 3.0 release and I have a module that is generated by clang with some functions declared as inline. after inlining (llvm::createFunctionInliningPass) I'd like to remove the functions that were inlined. how can this be done? surprisingly they are removed if a print pass (llvm::createPrintModulePass) is present. is there an explanation for this? -Jochen
2013 Jul 13
1
[LLVMdev] Inlined call properly optimized, but not function itself
I saw something strange in the optimized LLVM code. It appears that sometimes an inlined function is optimized though the function itself is not optimized to the same level. Below is an example of an unoptimized/non-inlined function call: define void @_entry() uwtable { entry: %0 = call i64 @eval_expr() call void @trace_integer(i64 %0) ret void } 'eval_expr' is a big ugly series
2019 Jul 23
2
Accessing global variables arrays result in inlined getelementptrs
Hello, Using LLVM+clang to do some static analysis, I face some issues due to the fact that when manipulating arrays that are global variables, IR getelementptr instructions seem to be somehow inlined. For example: int a[256]; int main() {     a[0] = 1; } gives as a result the following IR code (with clang+llvm 8, without any flag). @a = common dso_local global [256 x i32]
2006 Dec 30
0
[joeyh@debian.org: Bug#405058: does not properly support nested divs in inlined html]
Howdy, The attached bug report was sent to the Debian bug tracking system. If you please preserve the CC to 405058-forwarded at bugs.debian.org on any responses? ----- Forwarded message from Joey Hess <joeyh at debian.org> ----- From: Joey Hess <joeyh at debian.org> To: Debian Bug Tracking System <submit at bugs.debian.org> Subject: Bug#405058: does not properly support
2010 Oct 30
0
[PATCH] Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) - generated by Coccinelle
This patch was generated using the Coccinelle scripts and btrfs code in v2.6.36-9657-g7a3f8fe. Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) The semantic patch that makes this change is available in scripts/coccinelle/api/err_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Chris Samuel
2012 Feb 24
1
[LLVMdev] DW_AT_inline not present in assembly for an inlined inline function
Hello I am trying to run following test case on Clang compiled output to compare the dwarf inline attributes in the resulting assembly output . /* Inlined inline function must have abstract DIE */ /* { dg-do compile } */ /* { dg-options "-O2 -gdwarf-2 -dA -fpreprocessed" } */ /* { dg-final { scan-assembler "3.*DW_AT_inline" } } */ #1 "test.h" inline int t() { } int
2020 Sep 29
2
restrict func param losing noalias when inlined
Given some code: void func (float * restrict a, float *b) { for (int i =0; i < 100; ++i) { a[i] = b[i] + 1; } } float * aa; float * bb; int main() { func(aa, bb); return 0; } produces IR that has the llvm.noalias intrinsic along with the !noalias metadata:for both the load and store, however, AA returns MayAlias, I would expect a NoAlias? This is also an older version of llvm:
2011 Jun 28
1
[LLVMdev] retrieve information from a macro inlined as x86_64 asm in LLVM IR
Hi LLVM devs, I work on a pass that creates multiple versions of a code region and switches between them. The decision about the version to be selected is taken by an external runtime system. I insert callbacks to this system in my code to pass the control of the execution. All callbacks are written in inline assembly, in macros. The problem comes when I need to send some information from
2014 Aug 04
3
[LLVMdev] Matching up inlined basic blocks with original basic blocks.
Hello All, I have some data tied to the basic blocks in a function, and after inlining that function, I'd like to recover that data in the inlined version. Is there some way to match up the inlined version of the function with the original basic blocks? Thanks, Jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL:
2016 Dec 15
0
distinct DISubprograms hindering sharing inlined subprogram descriptions
> On Dec 15, 2016, at 10:54 AM, David Blaikie via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Branching off from a discussion of improvements to DIGlobalVariable representations that Adrian's working on - got me thinking about related changes that have already been made to DISubprogram. > > To reduce duplicate debug info when things like linkonce_odr functions were
2016 Dec 15
0
distinct DISubprograms hindering sharing inlined subprogram descriptions
Trying to wrap my brain around this, so a few questions below. =) On Thu, Dec 15, 2016 at 10:54 AM, David Blaikie <dblaikie at gmail.com> wrote: > Branching off from a discussion of improvements to DIGlobalVariable > representations that Adrian's working on - got me thinking about related > changes that have already been made to DISubprogram. > > To reduce duplicate
2014 Mar 07
3
[LLVMdev] [RFC] Add second "failure" AtomicOrdering to cmpxchg instruction
Hi all, The C++11 (& C11) compare_exchange functions with explicit memory order allow you to specify two sets of semantics, one for when the exchange actually happens and one for when it fails. Unfortunately, at the moment the LLVM IR "cmpxchg" instruction only has one ordering, which means we get sub-optimal codegen. This probably affects all architectures which use
2016 Dec 15
1
distinct DISubprograms hindering sharing inlined subprogram descriptions
On Thu, Dec 15, 2016 at 11:35 AM Mehdi Amini <mehdi.amini at apple.com> wrote: > > > On Dec 15, 2016, at 10:54 AM, David Blaikie via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > > > Branching off from a discussion of improvements to DIGlobalVariable > representations that Adrian's working on - got me thinking about related > changes that have