similar to: Integrating llvm pass with pass manager

Displaying 20 results from an estimated 4000 matches similar to: "Integrating llvm pass with pass manager"

2018 Jan 13
0
Integrating llvm pass with pass manager
Do you pull clang under llvm/tools and compile it as well? In theory, if `opt` recognize the option, so does `clang -mllvm`. 2018-01-12 8:47 GMT+08:00 sangeeta chowdhary <sangitachowdhary at gmail.com>: > Hello, > > I have tried giving this option like this > > clang -c -emit-llvm -mllvm -rdetector hello.c -c -o hello.bc > but I am getting error " Unknown command
2018 Jan 11
0
Integrating llvm pass with pass manager
`-mypass` should be only recognize by the backend part (i.e. llvm). You should add `-mllvm` to tell clang the following argument have to be passed to the backend part. 2018-01-08 8:02 GMT+08:00 sangeeta chowdhary via llvm-dev < llvm-dev at lists.llvm.org>: > Hello, > > I have followed steps given in - https://stackoverflow.com/ >
2018 Jan 13
2
Integrating llvm pass with pass manager
Clang doesn’t support adding passes from the command line the way opt does. Opt has special parsing in opt.cpp for this that clang doesn’t have. I’m not sure what the correct way to do this is. I think your plugin needs to do something to tell clang/llvm when to run the pass. I’ll try to look later when I’m back at a computer. On Fri, Jan 12, 2018 at 7:00 PM 陳韋任 via llvm-dev <llvm-dev at
2018 Jan 14
2
Integrating llvm pass with pass manager
I have taken SimplePass and added in Transform directory, “libLLVMSimplePass.a” is built but I can not see this pass in opt —help. I don’t even see the name of pass while registering it in the example. > On Jan 13, 2018, at 7:35 AM, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote: > > On 13 Jan 2018, at 03:45, Craig Topper via llvm-dev <llvm-dev at lists.llvm.org>
2020 Jun 24
2
Function name demangling in llvm ir
(though, usual caveat: you /usually/ shouldn't be doing that - instead relying only on whatever semantics the IR actually carries, rather than implying extra semantics based on the demangled name) On Wed, Jun 24, 2020 at 12:48 PM Johannes Doerfert via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > I have not tried it but maybe > > `std::string llvm::demangle(const
2018 Jan 15
0
Integrating llvm pass with pass manager
On 14 Jan 2018, at 00:14, sangeeta chowdhary <sangitachowdhary at gmail.com> wrote: > > I have taken SimplePass and added in Transform directory, “libLLVMSimplePass.a” is built but I can not see this pass in opt —help. I don’t even see the name of pass while registering it in the example. The SimplePass example is intended to be built out of tree, so I’ve no idea what happens if you
2018 Aug 21
4
different output with fast-math flag
This is of course not homework. I am trying to understand how fast math optimizations work in llvm. When I compared IR for both the programs, the only thing I have noticed is that fdiv and fmul are replaced with fdiv fast and fmul fast. Not sure what happens in fdiv fast and fmul fast. I feel that its because d/max is really small number and fast-math does not care about small numbers and consider
2018 Jan 13
0
Integrating llvm pass with pass manager
Look back to the SO link [1] you posted, I assume you register your pass by writing something like below already, INITIALIZE_PASS_BEGIN ... INITIALIZE_PASS_END ModulePass *llvm::createYourPass() { return new YourPass(); } The only suggestion I can give is looking at other existing pass to see what you might miss. For example, take a look on X86OptimizeLEAs.cpp. It works like
2018 Aug 11
2
Need help in understanding llvm optimization
I am sorry to not make my question clear. My question is how this value is calculated without having fadd and fsub in IR? On Sat, Aug 11, 2018 at 4:06 PM, Craig Topper <craig.topper at gmail.com> wrote: > Neither 1e16 or 1e16+1 can be accurately represented in a double. The > largest integer than be accurately represented is 2^53. As the number gets > larger floating sacrifices
2018 Aug 11
4
Need help in understanding llvm optimization
Hi, I have below code in C - int main() { double x,y; x = 1e16; y = (x + 1) - x; printf("y:%e\n", y); return 0; } llvm bitcode looks like this for this function - ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64
2020 Feb 29
2
Preserving the type of structure
Hello, LLVM IR flattens out the structure with one integer element to i32. Is there any way to disable this? I want to preserve the type information of the structure. I tried compiling the program with O0, it maintains the type for most of the instructions but for all. Regards, Sangeeta -------------- next part -------------- An HTML attachment was scrubbed... URL:
2020 Jun 24
2
Function name demangling in llvm ir
Hello, I am doing some program analysis with C++ programs. I need to check if some particular function is called in the program, for that I need the name of the function being called in the call instruction. Since C++ mangles the name of the function, I need a way to demangle the function name in llvm IR. Is there any way to achieve that in llvm pass? Regards, Sangeeta -------------- next part
2020 Jun 15
2
Need help in creating clone functions
Hello, I am working on creating a llvm pass which clones a certain function with a different name using CloneFunctionInto. I create a call instruction to call a new cloned function from the old function. In llvm IR and in .s file everything looks as expected, but when I call this program with gdb and set a breakpoint on this new function, gdb shows the name of the original function. I know it has
2017 Oct 22
2
How to dump broken IR from LLVM backend?
You can also `-disable-verify -o <output-filename> ` which will disable the verify check. On Sat, 21 Oct 2017 at 23:54 Dipanjan Das via llvm-dev < llvm-dev at lists.llvm.org> wrote: > > Yes, that definitely works. Wanted to know if there's a switch for file > output or not. > > On 21 October 2017 at 23:45, 陳韋任 <chenwj.cs97g at g2.nctu.edu.tw> wrote: >
2017 Oct 22
2
How to dump broken IR from LLVM backend?
Just use Unix IO redirect? `llc -mllvm -print-after-all &> a.txt` 2017-10-22 14:17 GMT+08:00 Dipanjan Das via llvm-dev < llvm-dev at lists.llvm.org>: > > Seems like "-mllvm -print-after-all" does the trick. Is there any switch > that dumps the output to a file instead of console? > > On 21 October 2017 at 21:33, Dipanjan Das <mail.dipanjan.das at
2018 Aug 30
2
Instruction does not dominate all uses!
Hello All, I am instrumenting IR to pass addres of the function to runtime but I am getting error - Instruction does not dominate all uses. I used M.dump() to get below dump, not able to figure out what I am doing wrong. Any help would be much appreciated. define dso_local double @mysqrt(double %val1) local_unnamed_addr #0 { entry: %0 = bitcast double (double)* @mysqrt to i8* %1 = call
2018 May 23
1
How to create a call to a function which returns a struct
Hello, I am trying to create a call to a function which returns a struct in llvm pass. I also want to read struct fields returned from this function call. Can somebody help me with this? Regards, Sangeeta
2018 Aug 21
2
different output with fast-math flag
Why the output is different for this below program when compiled using clang with fast-math optimization #include<stdio.h> int main() { double d = 1.0; double max = 1.79769e+308; d /= max; printf("d:%e:\n", d); d *= max; printf("d:%e:\n", d); return 0; } prints 0 with fast math but 1 without fast math. -------------- next part -------------- An
2017 Jun 09
2
[Newbie Question] Compute a schedule region's scheduled cycles.
Also you might need to check use PostRASchedulerList or PostMachineScheduler, PostRASchedulerList is considered deprecated as mentioned in [1]. [1] http://lists.llvm.org/pipermail/llvm-dev/2017-April/112348.html HTH, chenwj 2017-06-10 4:03 GMT+08:00 陳韋任 <chenwj.cs97g at g2.nctu.edu.tw>: > Not saying I am totally understand how thing works, but I think you're > misleading >
2017 Apr 14
2
Options for timing passes in LLVM?
Thanks :) From: 陳韋任 [mailto:chenwj.cs97g at g2.nctu.edu.tw] Sent: 14 April 2017 12:53 To: Martin J. O'Riordan <martin.oriordan at movidius.com> Cc: LLVM Developers <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Options for timing passes in LLVM? Refer to `llc` document [1], it would be `--time-passes`. [1] http://llvm.org/docs/CommandGuide/llc.html HTH,