search for: heig

Displaying 20 results from an estimated 56 matches for "heig".

Did you mean: hei
2015 Jul 17
2
[LLVMdev] LLVM instrumentation
...ot;); return 0; } I can’t understand the part “taken at leat once”, why main is executed two time? Greetings, Johan On 17 Jul 2015, at 16:56, David Siegel <david.siegel at artcom.de<mailto:david.siegel at artcom.de>> wrote: On 17.07.2015, at 16:31, Wehrli Johan <johan.wehrli at heig-vd.ch<mailto:johan.wehrli at heig-vd.ch>> wrote: […] My goal with the instrumentation is, once I have the information (time + call), to choose (during a second compilation) if some of my passes are applicable or not. Profile-guided optimization (PGO) [1] … mumble…mumble. Clang/LLVM has...
2015 Jul 17
3
[LLVMdev] LLVM instrumentation
...much code, however it may not suit your use case because the compiler can see information that otherwise might be missed in the context of a fully compiled binary. Please let me know your thoughts and then we can pick up from there. On Fri, Jul 17, 2015 at 2:43 AM, Wehrli Johan <johan.wehrli at heig-vd.ch<mailto:johan.wehrli at heig-vd.ch>> wrote: Hi everyone, I would like to instrument my code in order to know the number of times a function is called and its execution time. After some research, I find several leads in llvm/lib/ProfilData/ and llvm/lib/Transform/Instrumentation/ but...
2015 Mar 24
2
[LLVMdev] Propagate clang attribute to IR
> On 24 Mar 2015, at 14:55, Aaron Ballman <aaron at aaronballman.com> wrote: > > On Tue, Mar 24, 2015 at 9:48 AM, Rinaldini Julien > <julien.rinaldini at heig-vd.ch> wrote: >> Hi, >> >> I want to *tag* some functions with some *flags*. I was using annotate((“myFlag”)) and everything was working fine until I tried on ObjC method. It seems that clang just ignore it. >> >> So, to be able to *flag* my functions I’m trying t...
2012 Apr 26
0
[LLVMdev] Detect if a basicblock is part of a loop
Rinaldini, What exactly did you run? Specifically, you may be missing some analysis passes that are necessary for LoopInfo to have the loop information you desire. -Hal On Thu, 26 Apr 2012 14:02:04 +0000 Rinaldini Julien <julien.rinaldini at heig-vd.ch> wrote: > Hi, > > I'm trying to detect if a basicblock is part of a loop or not. > > I tried the llvm::LoopInfo like that > (http://llvm.org/docs/doxygen/html/classllvm_1_1LoopInfo.html#a4abca289c73cd09487e05d11d9f7d877): > > LoopInfo *loop = new LoopInfo();...
2015 Jul 17
2
[LLVMdev] LLVM instrumentation
Hi everyone, I would like to instrument my code in order to know the number of times a function is called and its execution time. After some research, I find several leads in llvm/lib/ProfilData/ and llvm/lib/Transform/Instrumentation/ but nothing conclusive. Does anyone know if this is already possible with LLVM or has a good suggestion for the beginning? I saw the -fprofile-instr-generate,
2016 Feb 22
2
Transfer information IR to binary
...lution for my problem was to used some temporary file but this is highly impractical. Maybe I can create a temporary section into the binary but I didn’t find a lot of information about it. Thanks, Johan > -- > Mats > > On 22 February 2016 at 14:45, Wehrli Johan <johan.wehrli at heig-vd.ch <mailto:johan.wehrli at heig-vd.ch>> wrote: > I will try to explain better what I do. > > The main goal behind this is to verify that a part of code is not modified by someone else (it is an integrity check). > > To do this, I create in IR a function who take 2 param...
2012 Apr 26
2
[LLVMdev] Detect if a basicblock is part of a loop
...> Rinaldini, > > What exactly did you run? Specifically, you may be missing some > analysis passes that are necessary for LoopInfo to have the loop > information you desire. > > -Hal > > On Thu, 26 Apr 2012 14:02:04 +0000 > Rinaldini Julien <julien.rinaldini at heig-vd.ch (mailto:julien.rinaldini at heig-vd.ch)> wrote: > > > Hi, > > > > I'm trying to detect if a basicblock is part of a loop or not. > > > > I tried the llvm::LoopInfo like that > > (http://llvm.org/docs/doxygen/html/classllvm_1_1LoopInfo.html#a4ab...
2012 Apr 26
2
[LLVMdev] Detect if a basicblock is part of a loop
Hi, I'm trying to detect if a basicblock is part of a loop or not. I tried the llvm::LoopInfo like that (http://llvm.org/docs/doxygen/html/classllvm_1_1LoopInfo.html#a4abca289c73cd09487e05d11d9f7d877): LoopInfo *loop = new LoopInfo(); bool isLoop = loop->getLoopFor(myBB); // getLoopFor - Return the inner most loop that BB lives in. If a basic block is in no loop (for example the entry
2014 Mar 26
2
[LLVMdev] Linking problem
Hi, I'm writing a pass that implements a jump table with an array of blockaddress and an indirectbr instruction. It get a blockaddress in the array (via getelementptr and an index) and then jump to this basicblock via the indirectbr. I tried to compile several libraries to test my pass and the run their test-suite. It works fine with, for e.g, libTomCrypt (in -O0,1,2,3). With GMP or
2011 Aug 11
5
[LLVMdev] IR code modification/transformation
Hi, I have a question about the llvm passes. I'm iterating over a basicblock and I can get an instruction and print it. Now, I want to iterate over the instruction and be able to modify the values of the instruction. For example, if my instruction is an add "<result> = add i32 4, %var" I want to transform it in a sub "<result> = sub i32 4, %var". I looked up
2014 Oct 29
2
[LLVMdev] Problem in X86 backend (again)
>> // Increment loop variable and jmp >> BuildMI(*MBB_erase, MBB_erase->end(), db, >> TII->get(X86::ADD64ri32),reg).addReg(reg).addImm(8); > > It looks like this instruction is defining virtual register "reg" the second time. Thx for your answer... Why would it define it again? I just want to use this register and add something to it... Cheers
2011 Aug 11
0
[LLVMdev] RE : IR code modification/transformation
Re-adding the list, below message was sent to me alone: On 11 August 2011 13:45, Rinaldini Julien <julien.rinaldini at heig-vd.ch> wrote: > Thx for all answers... > > I'll try that. But in a long term what I want to do will be a bit more complicated... It was just an example. In this case, the goal is to replace all add with sub that return the same result, like: > > var = var + 2 will become: >...
2015 Jul 15
2
[LLVMdev] SymbolRef and getSize
Hi everyone, I’m currently playing with the clang driver and I encounter a strange bug. It occurs when I used the getSize function from the SymbolRef class. On iOS, the number returned is not always correct (some function have the right size). Sadly, This is my code (at the end of the main function into driver.cpp) : #### ErrorOr<OwningBinary<Binary>> BinaryOrErr =
2015 Mar 24
2
[LLVMdev] Propagate clang attribute to IR
Hi, I want to *tag* some functions with some *flags*. I was using annotate((“myFlag”)) and everything was working fine until I tried on ObjC method. It seems that clang just ignore it. So, to be able to *flag* my functions I’m trying to add a *real* attribute to clang. I’ve added a new attribute to clang in tools/clang/include/clang/Basic/Attr.td: def NoFLA : Attr { let Spellings =
2016 Feb 22
2
Transfer information IR to binary
I will try to explain better what I do. The main goal behind this is to verify that a part of code is not modified by someone else (it is an integrity check). To do this, I create in IR a function who take 2 parameters, a begin and an end value. This function perform an hash over the code area (from begin to end) and return it. At first, I don’t know the addresses and the hash value so I put
2012 Apr 26
0
[LLVMdev] Detect if a basicblock is part of a loop
...y, 26 de April de 2012 at 11:57, Hal Finkel wrote: Rinaldini, What exactly did you run? Specifically, you may be missing some analysis passes that are necessary for LoopInfo to have the loop information you desire. -Hal On Thu, 26 Apr 2012 14:02:04 +0000 Rinaldini Julien <julien.rinaldini at heig-vd.ch<mailto:julien.rinaldini at heig-vd.ch>> wrote: Hi, I'm trying to detect if a basicblock is part of a loop or not. I tried the llvm::LoopInfo like that (http://llvm.org/docs/doxygen/html/classllvm_1_1LoopInfo.html#a4abca289c73cd09487e05d11d9f7d877): LoopInfo *loop = new LoopIn...
2015 Jun 05
2
[LLVMdev] LLVM-ar and openssl
Hi everyone, I encountered a strange bug when I tried to compile openssl (https://www.openssl.org/) with clang and llvm-ar on a 64-bit OS X. I changed the openssl makefile to use llvm-ar instead of simply ar. Openssl will then create two static libraries libssl.a and libcrypto.a. The problem occurs when it tries to link these two static libraries to the final openssl executable. I get the
2014 Oct 29
2
[LLVMdev] Problem in X86 backend
Hi Julien, > On Oct 28, 2014, at 2:14 AM, Rinaldini Julien <julien.rinaldini at heig-vd.ch> wrote: > > Hum, in fact, I'm still a bit lost ;) > > It seems to works in -O0, but in -O1, -O2 and -O3, I got this error (+ the dump of the function): > > # Machine code for function foo: Post SSA > Function Live Ins: %RDI in %vreg7 > > BB#0: derived fro...
2012 Jun 13
0
[LLVMdev] llvm-mc problem after a pass
...is seen by the asm parser as an end-of-line, so the '18' is a new token at the start of a line, not part of the comment. Is your pass perhaps using label names which might include literal "^M" characters? -Jim On Jun 13, 2012, at 5:51 AM, Rinaldini Julien <julien.rinaldini at heig-vd.ch> wrote: > Hi, > > I'm having some problem with llvm-mc on a program after applying a pass: > > ../../../build/Release+Asserts/bin/clang -emit-llvm -c -I./testprof/ -I./src/headers/ -I../libtommath-0.42.0/ -Wall -Wsign-compare -W -Wshadow -Wno-unused-parameter -DLTC_S...
2013 May 13
1
[LLVMdev] Problem with MachineFunctionPass and JMP
Hi ! I'm trying to modify the code in a machine function pass… I added a new basicblock and I want to add a jump to an another BB from my new BB. Here is my code : bool Obfuscation::runOnMachineFunction(MachineFunction &MF) { MachineBasicBlock *newEntry = MF.CreateMachineBasicBlock(); MF.insert(MF.begin(), newEntry); std::vector<MachineBasicBlock*> origBB;