Displaying 20 results from an estimated 500 matches similar to: "[LLVMdev] Loop Unfolding in LLVM"
2015 May 07
2
[LLVMdev] Integer ID for LLVM::Instruction*?
David,
As you suggested, I try to compile the following test code:
*include "llvm/IR/Instruction.h"#include "stdint.h"extern void
callback(intptr_t);void foo(){ llvm::Instruction* i; intptr_t
zzzz=static_cast<intptr_t>(i); callback(zzzz);}*
but got this compilation error:
* 'intptr_t' (aka 'long') is not allowed intptr_t
2015 May 06
5
[LLVMdev] Integer ID for LLVM::Instruction*?
Hi,
I wonder whether we can easily retrieve an LLVM instruction ID that
uniquely identifies the instruction. In my case, I need to avoid using
llvm::Instruction* directly. Given an 'inst' of type llvm::instruction*, is
there some readily usable method as simple as "int id = inst->id( )"?
Thanks.
Zhoulai
-------------- next part --------------
An HTML attachment was
2015 Jul 24
2
[LLVMdev] Transforming SwitchInst to BranchInst
Hi,
Are there some built-in LLVM transformation pass, or written library code
that transforms LLVM::SwitchInst into if-condition statements (LLVM::
BranchInst)?
The purpose of the transformation is that we have a legacy program analyzer
that includes an LLVM pass manipulating if-condition statements. Statements
of LLVM::SwithchInst should have been handled in the same manner but was
not done.
2015 Apr 19
2
[LLVMdev] LLVM IR for inline functions
Hi,
I have a naive question on how to generate LLVM IR for inline functions. I
have compiled this C code:
*inline void func1()*
* {*
* int x=3;*
* }*
* void func2()*
* {*
* func1();*
* int y = 4;*
* }*
into LLVM IR, using
clang -emit-llvm -S -c <filename>
But the generated LLVM IR file does *not* have func1() expanded (see below
for the relevant parts).
*; Function Attrs: nounwind
2016 Aug 13
2
A "hello world" coverage sanitizer
Thank you, kcc. I am unsure if I misunderstand your reply. It seems that
trace-bb, rather than trace-pc, fits better for my problem, given that my
instrumentation is to put before each conditional statement. Do I
misunderstand something here?
"
Tracing basic blocks
<http://clang.llvm.org/docs/SanitizerCoverage.html#id11>
With -fsanitize-coverage=trace-bb the compiler will insert
2015 Jul 09
2
[LLVMdev] How to use get the memory location of a function argument correctly?
Hi all, i hope to get the MemoryLocation for argument %1 in a CallInst like
"call void @function(i32* %1)", and i found an interface "getForArgument()"
which seems available for this. However, i don't know how to correcly fill
the 3rd argument TargetLibraryInfo in my own code and can't find an example
in google. Does anybody know how to do it? Or some other advice for
2015 Apr 09
3
[LLVMdev] BasicBlock.h in the binary and in the source differ
Hi, I am using LLVM to develop a tool, using Mac OS 10.9. I have download
llvm source and binary from
http://llvm.org/releases/download.html
I just find the BasicBlock.h file of the binary package
clang+llvm-3.6.0-x86_64-apple-darwin/include/llvm/IR/BasicBlock.h
is slightly different from that of the source
llvm/include/llvm/IR/BasicBlock.h
In particular, llvm:: getModule(..)
2016 Jul 21
2
Remove zext-unfolding from InstCombine
Hi all,
I have a question regarding a transformation that is carried out in InstCombine, which has been introduced by r48715. It unfolds expressions of the form `zext(or(icmp, (icmp)))` to `or(zext(icmp), zext(icmp)))` to expose pairs of `zext(icmp)`. In a subsequent iteration these `zext(icmp)` pairs could then (possibly) be optimized by another optimization (which has already been there before
2005 Oct 03
1
ML optimization question--unidimensional unfolding scaling
I'm trying to put together an R routine to conduct unidimensional unfolding
scaling analysis using maximum likelihood. My problem is that ML
optimization will get stuck at latent scale points that are far from
optimal. The point optimizes on one of the observed variables but not
others and for ML to move away from this 'local optimum', it has to move in
a direction in which the
2016 Jul 27
2
Remove zext-unfolding from InstCombine
Hi Sanjay,
thank you a lot for your answer. I understand that in your examples it is desirable that `foo` and `goo` are canonicalized to the same IR, i.e., something like `@goo`. However, I still have a few open questions, but please correct me in case I'm thinking in the wrong direction.
> Am 21.07.2016 um 18:51 schrieb Sanjay Patel <spatel at rotateright.com>:
>
> I've
2005 Nov 03
1
ML optimization question--unidimensional unfolding scalin g
Alternatively, just type debug(optim) before using it, then step through it
by hitting enter repeatedly...
When you're done, do undebug(optim).
Andy
> From: Spencer Graves
>
> Have you looked at the code for "optim"? If you
> execute "optim", it
> will list the code. You can copy that into a script file and walk
> through it line by line to
2015 Apr 09
2
[LLVMdev] BasicBlock.h in the binary and in the source differ
The source is cloned from
https://github.com/llvm-mirror/llvm
Thanks.
Zhoulai
On Thu, Apr 9, 2015 at 9:15 AM, Jonathan Roelofs <jonathan at codesourcery.com>
wrote:
>
>
> On 4/9/15 9:58 AM, Zhoulai wrote:
>
>> Hi, I am using LLVM to develop a tool, using Mac OS 10.9. I have
>> download llvm source and binary from
>>
>>
2016 Aug 12
2
A "hello world" coverage sanitizer
Hi, all
I want to instrument a program automatically so that it prints "hello"
before each conditional statement. For example, consider the function P
below.
int P(int x) {
if (x<3)
if (x>0)
return 1;
return 0;
}
Let P_instrum be the instrumented version of P. It is expected that:
-- P_instrum(1) prints two "hello"s
--
2011 Aug 02
0
[LLVMdev] clang: Manual unfolding doesn't match automatic unfolding
Here's the code and compilation steps:
#include <stdint.h>
typedef unsigned int uint128_t __attribute__((mode(TI)));
typedef struct{
uint64_t l[5];
} s;
void f(s * restrict r, const s * restrict x, const s * restrict y) {
uint128_t t[5] = {0, 0, 0, 0, 0};
#define BODY(i,j) { int i_ = i < j ? i : j; int j_ = i < j ? j :
i; uint128_t m = (uint128_t) x->l[i_] *
2015 Nov 28
2
endwhile jumping out of macro
Hi
I have a 3 level nested while-endwhile loop in a macro that when the
execution reaches endwhile, it is jumping out to the While at the caller
macro.
It shouldn't since the are instructions after the endwhile.
-- Executing [s at macro-call-from-outside:72] EndWhile("DAHDI/i1/1234567-4a7f", "") in new stack
== Channel 'DAHDI/i1/1234567-4a7f' jumping out of
2015 Jun 10
4
[LLVMdev] The use iterator not working...
Thanks Dan and Jon. I made an incorrect assumption that the "use" iterator
was actually giving me the "user" when de-referencing it.
Did it always have this behavior in previous LLVM versions? I've seen lots
of examples of the "use" iterator being dereferenced and resulting
Instruction pointer being treated as the "user"?
Thanks,
Zack
On Tue, Jun 9,
2005 Sep 05
1
Unexpected results with "While" and "EndWhile" applications
I seem to be having a conceptual problem with the "While" and
"EndWhile" applications. It seems that on the first cycle, even if
the result of the "While" is false that the enclosed applications
will get run. Is this expected? It seems to be counter-intuitive,
but I don't know what the intent of the While routines is. I could
of course put a
2016 Apr 11
2
User controlled i/o block size?
I hope this isn't a FAQ.
Per the man page I see ways to control the blocksize for hash
comparison reasons, but no way to control it for i/o performance
reasons.
I'm using rsync to copy folder trees full of large files and I'd like
to have control of how much data is read / written at a time. Maybe
read 10 MB, write 10 MB, etc.
Is there an existing way to do that?
== details ==
2015 May 02
5
[LLVMdev] Modifying LoopUnrollingPass
Hi Zhoulai,
I am trying to modify "LoopUnrollPass" in llvm which produces multiple
copies of loop equal to the loop unroll factor.Currently, using multicore
architecture, say 3 for example and the execution goes like:
for 3 cores if there are 9 iterations of loop
core instruction
1 0,3,6
2 1,4,7
3 2,5,8
But I want to to
2016 Aug 04
2
Remove zext-unfolding from InstCombine
Hi Sanjay,
> Am 02.08.2016 um 21:39 schrieb Sanjay Patel <spatel at rotateright.com>:
>
> Hi Matthias -
>
> Sorry for the delayed reply. I think you're on the right path with D22864.
No problem, thank you for your answer!
> If I'm understanding it correctly, my foo() example and zext_or_icmp_icmp() will be equivalent after your patch is added to InstCombine.