similar to: writing llvm pass to instrument read and write

Displaying 20 results from an estimated 200 matches similar to: "writing llvm pass to instrument read and write"

2018 Jan 04
0
writing llvm pass for external library
Hello All, I am trying to write llvm pass to instrument function in external library. I am using clang to automatically load my pass. I have test.cpp which calls functions in library testlib.so. I have written llvm pass to instrument all reads and writes in test.cpp and call function(recordRW) in testlib.so. this is how my pass looks like - for (auto &BB : F) { for (auto &I : BB)
2008 Dec 17
1
How to iterate dataframe within a hash
Dear all, I have the following data structure > print(testlib) $tags tag count.raw count.adj err 1 aaaaaaaaaa 94 93 0.5 2 aaaaaaaaac 1 2 0.2 3 aaaaaaaaag 3 2 0.1 4 aaaaaaaaca 1 1 0.003 I want to iterate the data above and print
2007 Aug 30
4
Command line vs config file override for configuration params
Hi all I''m working on my modular recursive Makefile & svn-backed home for my Puppet manifests, custom functions, types, etc. So I''m trying to put together individual modules, test targets and so on. I have noticed that the $libdir (and probably the other configuration options too) sources from puppet.conf are not overridden by specifying --libdir=blah on the commmand line
2007 Feb 02
1
Working demo of search engine using boolean query.
Lately I was reading many articles about using boolean queries for search engine but I haven't seen any complete working demo. Therefore I put together very simple working demo of search engine using boolean query. Feel free to suggest any performance improvement or error while keeping it as simple as possible for understanding. Thanks, -Kevin Duraj http://myhealthcare.com
2011 Nov 25
0
NUT QA regression testing script (was: Upgraded Buildbot)
Hey Charles and the list, 2011/11/13 Arnaud Quette <aquette.dev at gmail.com>: > > 2011/11/12 Charles Lepple <clepple at gmail.com> >> >> On Sat, Nov 12, 2011 at 9:41 AM, Arnaud Quette <aquette.dev at gmail.com> >> wrote: >> > since I'm working on improving the Ubuntu regression testing suite [1], >> > which can also serve for
2003 Aug 19
1
Problems building dlls for use with winelib
Hi, I am currently having trouble building the DLLs of an application ported from Win32 to Winelib - compiling, thanks to some hints from Dimi O. Paun, now works fine, only(?) the final linking step fails. Since Winelib-documentation is unfortunately pretty outdated, I tried to orientate myself on the makefiles of the Winelib dlls in the cvs /wine/dlls/ directory. I tried the following
2011 Dec 13
1
[LLVMdev] [PATCH] utils/unittest: Consistency of gtest and gtest_main libs.
$(llvm-config --libs | tr " " "\n" | grep gtest) returns: -lgtest_main -lgtest instead of non-valid: -lLLVMgtest_main -lLLVMgtest It also fixes: $(ld): cannot find -lLLVMgtest $(ld): cannot find -lLLVMgtest_main --- unittests/Makefile.unittest | 2 +- utils/llvm-build/llvmbuild/componentinfo.py | 4 ++-- utils/llvm-build/llvmbuild/main.py |
2011 Oct 12
1
[LLVMdev] getting object from BitCastInst?
My pass is looking at StoreInsts acting on global variable that happen to be function pointers. From these StoreInsts I would like to get useful information(the function used if a direct assignment, function pointer used, etc) from the getValueOperand() method. Looking through several examples I see that this can return several things like: GlobalVariable, Function, LoadInst or BitCastInst
2011 Oct 19
2
[LLVMdev] dyn_cast<BitCastInst> fails?
I am trying to dyn_cast a Value* to a BitCastInst. The dump of what I want casted is "i8* bitcast (i32 (i32)* @f1 to i8*)", so it is a BitCastInst. For someone my dyn_cast always fails, does anyone see why? arg->dump(); BitCastInst *bitcast = dyn_cast<BitCastInst>(arg); assert(bitcast != NULL); Thank you
2013 Oct 10
0
[LLVMdev] Illegal BitCast assertion failed
Hi there, I'm having a bit of a problem while trying to create BitCast instructions. Well, first, I have some very generic functions written in C, for which I would like to make calls on another C file I'm playing with using an LLVM Pass. The simplified signature of two of these functions can be seen below: void write(void* data, unsigned b); // write b bytes starting, at address
2015 Jun 18
3
[LLVMdev] problem with replacing an instruction
I am trying to change this define void @main(float* noalias %arg0, float* noalias %arg1, float* noalias %arg2) { entrypoint: %0 = bitcast float* %arg1 to <4 x float>* intothis define void @main(float* noalias %arg0, float* noalias %arg1, float* noalias %arg2) { entrypoint: %0 = getelementptr float* %arg1, i64 0 %1 = bitcast float* %0 to <4 x float>* I must be close but
2010 Jun 12
1
[LLVMdev] Memory leak?
Hi folk, I get the following stack trace and do have any clue how to fix the problem. 0 opt 0x087ecc99 1 opt 0x087ed265 2 0xb7f6a400 __kernel_sigreturn + 0 3 opt 0x086d4198 llvm::LeakDetector::addGarbageObject(llvm::Value const*) + 29 4 opt 0x0872945f llvm::Instruction::Instruction(llvm::Type const*, unsigned int,
2013 Apr 16
1
[LLVMdev] Instruction does not dominate all uses
Hi, I am writing an alias profiler using the points-to relation. For this I'm inserting a function call of external function with the following type profile(int,int,int,void*,void*,...) I'm trying to pass the dereferenced pointer's memory address and the address of the location who are in alias set of the pointer. For this i'm using BitCastInst BitCastInst *init1= new
2006 Dec 06
1
Bug and patch for +terms with wildcards
In current Xapian SVN HEAD, there is a bug in the query parser concerned with the handling of wildcard terms with a "+" prefix. Specifically, a query such as "+foo* bar" will be parsed by the query parser into Xapian::Query("bar") if there are no terms in the database which start "foo". Instead, since the "+" term cannot be matched, I believe
2010 Sep 30
2
[LLVMdev] strange code behavior when non-prototyped user function are called
I noticed a strange behavior when a non-prototyped user-defined function is called. E.g. for the following test.c code segment: void foo(void); void bar(void); void foo(void){ bar(); } void bar(void){ printf("inside bar()"); } LLVM-GCC 2.7 -O0 will generate the following code for foo(), which is all fine. define void @foo() nounwind { entry: * call void @bar() nounwind*
2011 Aug 25
0
[LLVMdev] [RFC] Splitting init.trampoline into init.trampoline and adjust.trampoline
Hi Sanjoy, > Attached set of patches splits llvm.init.trampoline into an "init" > phase and an "adjust" phase, as discussed on the "Go on dragonegg" > thread. thanks for doing this. The patches look good, though the decomposition into individual patches is not that great (since things won't always work, in fact not even compile I think, with not all
2007 Nov 19
1
find document by doc path
Hi, I want to update a document. The document is identified by the document path e.g. /home/user/file.txt. To find the doc id by the path I need to assign the path to the document. In the FAQ is supposed to add the doc id (the path) as a term to the document. My idea is to at the path as a value by #define PATH_ID 0 add_value(PATH_ID, "/home/user/file.txt") and then do a query:
2008 Nov 17
0
[LLVMdev] Assertion `InReg && "Value not in map!"' failed
ok 1 last question for the day... I created a function in C. void writeToFile(char *str) { FILE *f; if((f=fopen("example","a"))==NULL){ printf("could not open file"); } else{ fprintf(f,str); fclose(f);} } used this to create .bc then using llc -march=cpp I got the cpp code to create this function. While instrumenting my code, I place call to this function.
2008 Nov 17
1
[LLVMdev] Assertion `InReg && "Value not in map!"' failed
Ah! I get it now. Thanks a lot ! I changed it to BitCastInst(AI,VoidPtrTy,"",j); And now I am getting the following error :(. I have been stuck with this error before also. I know I am missing out something silly. What is the cause of this error and Please let me know how to fix it. /home/bhavani/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1130: llvm::SDOperand
2015 Apr 15
1
[LLVMdev] How to do bitcast for double to <2 x double>
So, you need to bitcast `pinst` to a pointer to Vector of double, since it (I hope for your sake) is a pointer to integer. What you are trying to do is bitcast a pointer into a vector, which probably will lead to an assert or "bad code that doesn't work". -- Mats On 15 April 2015 at 21:57, zhi chen <zchenhn at gmail.com> wrote: > What I want to do is to change the pInst