Displaying 20 results from an estimated 532 matches for "machinefunctionpass".
2013 Mar 15
2
[LLVMdev] write a simple MachineFunctionPass
Hello everyone,
I have written several complex passes till now, but I cannot write a
MachineFunctionPass pass. It just gives me segfault. Hence I reduced the
pass to the following form :
using namespace llvm;
namespace {
class CFGexplorator : public MachineFunctionPass {
public:
static char ID; // Pass identification, replacement for typeid
CFGexplorator() : MachineFunctionPass(ID) {...
2013 Aug 06
2
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
I want to create share memory in my MachineFunctionPass, and insert
load/store instruction for it. The way to create share memory is to add
global variables which are in share memory address space (not sure if it is
the only way). Therefore, I should add global variables in fixed size in
doInitialization, and record its real size in other place like
Mac...
2013 Aug 07
2
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
...a register allocator. I know PTX is
virtual ISA, but I will use PTX as the input of the simulator, gpgpu-sim,
so it makes sense.
Whether to insert shared memory is depend on the analysis that needs
LiveAnalysis, PTX InstrInfo, PTX RegisterInfo, etc. That's why I need to
add global variables in MachineFunctionPass.
Antony
2013/8/6 Justin Holewinski <justin.holewinski at gmail.com>
> Yes, global variables are the only way to access shared memory.
>
> I'm just trying to get an idea of what you're aiming to accomplish to see
> if we can improve on the interface here. A MachineFunc...
2013 Aug 06
0
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
Yes, global variables are the only way to access shared memory.
I'm just trying to get an idea of what you're aiming to accomplish to see
if we can improve on the interface here. A MachineFunctionPass runs after
instruction selection and relying on doInitialization to run before
instruction selection is an implementation detail that I do not believe is
guaranteed anywhere (I could be wrong!). And modifying the IR does in fact
violate the rules for a MachineFunctionPass (see bullet 1 in
http://l...
2013 Mar 15
0
[LLVMdev] write a simple MachineFunctionPass
I found that : "Code generator passes are registered and initialized
specially by TargetMachine::addPassesToEmitFile and similar routines, so
they cannot generally be run from the *opt* or *bugpoint* commands."...So
how I can run a MachineFunctionPass? In the end, I just want to apply a DFS
on a CFG of a function. And I need oriented edges and wanted to use
MachineBasicBlock::const_succ_iterator. It is there a way to get the CFG
with oriented edges by using a FunctionPass?
Thank you !
On Fri, Mar 15, 2013 at 1:30 PM, Alexandru Ionut Diaconescu...
2011 Jul 08
2
[LLVMdev] Best location in code generation for insertion of instrumentation to measure stack depth?
I investigated the MachineFunctionPass (that is runOnMachineFunction, I
believe). In my experimentation it didn't seem that the MachineFrameInfo was
populated (it consistently said that the stack depth was 0, for example). I
might have been doing something wrong?
On Fri, Jul 8, 2011 at 5:21 PM, John Criswell <criswell at illinoi...
2016 Feb 27
1
Need help on how to write MachineFunctionPass
Deer All,
I wanted to write MachineFunctionPass which needs to be run after global
register allocation pass.
I have read LLVM documentation and blogs and able to write simple pass
which will is invoked through opt command line.
However, I could able to find any blogs or document to explains clear steps
for writing MachineFunctionPass.
Please s...
2013 Aug 07
0
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
...know PTX is
> virtual ISA, but I will use PTX as the input of the simulator, gpgpu-sim,
> so it makes sense.
> Whether to insert shared memory is depend on the analysis that needs
> LiveAnalysis, PTX InstrInfo, PTX RegisterInfo, etc. That's why I need to
> add global variables in MachineFunctionPass.
>
> Antony
>
>
> 2013/8/6 Justin Holewinski <justin.holewinski at gmail.com>
>
>> Yes, global variables are the only way to access shared memory.
>>
>> I'm just trying to get an idea of what you're aiming to accomplish to see
>> if we can imp...
2016 Mar 01
2
How to write a simple MachineFunctionPass
Hello everyone,
I have written simple LLVM passes, but I cannot able to write a
MachineFunctionPass pass.
I am following the steps form the following link but it is not working:
http://www.gabriel.urdhr.fr/2014/09/26/adding-a-llvm-pass/
Please share the sample MachineFunctionPass code or steps to follow to
write MachineFunctionPass.
Thanks,
Bala
--
Thanks,
Bala
IIITA Allahabad
-------------- n...
2013 Aug 05
2
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
Hello,
I want to add a global variable of arrayType in my MachineFunctionPass.
However, I only get const Module from MachineFunction.getMMI().getModule().
I can't add any global variable to a const Module.
Another way is to add a global variable in doInitialization in my
MachineFunctionPass, but I can't determine the size of my arrayType for
global variable in doIni...
2013 Aug 08
2
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
...virtual ISA, but I will use PTX as the input of the simulator, gpgpu-sim,
>> so it makes sense.
>> Whether to insert shared memory is depend on the analysis that needs
>> LiveAnalysis, PTX InstrInfo, PTX RegisterInfo, etc. That's why I need to
>> add global variables in MachineFunctionPass.
>>
>> Antony
>>
>>
>> 2013/8/6 Justin Holewinski <justin.holewinski at gmail.com>
>>
>>> Yes, global variables are the only way to access shared memory.
>>>
>>> I'm just trying to get an idea of what you're aiming to acco...
2013 Aug 05
2
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
...share
memory in CUDA. What I mean is share memory, so MachineFrameInfo is not
suitable to me.
And I need codegen data, so FunctionPass is also not suitable.
Anyway, thanks for the suggestion.
Antony
2013/8/5 Justin Holewinski <justin.holewinski at gmail.com>
> If you're running a MachineFunctionPass, then the code has already been
> lowered to machine instructions and modifying the original IR will most
> likely not do what you want. You should only be using the IR as an
> immutable object for reference. If you want to change the IR, I would
> suggest using a FunctionPass instead...
2014 Sep 17
3
[LLVMdev] Need guidance regarding MachineFunctionPass implementation
Hello all,
I need to modify llvm bytecode / native code just before it is emitted i.e.
after all the regular operations and optimizations are done. I was told
that this can be achieved by implementing a MachineFunctionPass.
I searched the internet for some tutorials or some example
MachineFunctionPass but found nothing. Kindly point some links, or anything
that may help. Thank you.
Regards,
Sachin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm...
2013 Aug 05
0
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
Can you tell us a bit more about what you're trying to accomplish?
Changes to the IR performed during MachineFunctionPass::doInitialization
will likely propagate down through code generation, but at that point what
is the purpose of using a MachineFunctionPass? You won't have any analysis
or instruction information available until runOnMachineFunction.
On Mon, Aug 5, 2013 at 12:00 PM, Anthony Yu <swpenim at...
2011 Jul 08
0
[LLVMdev] Best location in code generation for insertion of instrumentation to measure stack depth?
On 7/8/11 4:49 PM, Andrew Ruef wrote:
> I investigated the MachineFunctionPass (that is runOnMachineFunction,
> I believe).
A MachineFunctionPass is a class that you inherit from to write a
transform that operates on MachineInstrs (i.e., native code instructions
generated from the LLVM IR instructions). The runOnMachineFunction()
method is its entry point (i.e., the...
2013 Aug 05
3
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
...> > -----Original Message-----
> > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> > On Behalf Of Antony Yu
> > Sent: Monday, August 05, 2013 3:41 AM
> > To: llvmdev at cs.uiuc.edu
> > Subject: [LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
> >
> > Hello,
> >
> > I want to add a global variable of arrayType in my MachineFunctionPass.
> > However, I only get const Module from
> > MachineFunction.getMMI().getModule().
> > I can't add any global variable to a const Module.
> > Another...
2013 Aug 08
0
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
...t I will use PTX as the input of the simulator, gpgpu-sim,
>>> so it makes sense.
>>> Whether to insert shared memory is depend on the analysis that needs
>>> LiveAnalysis, PTX InstrInfo, PTX RegisterInfo, etc. That's why I need to
>>> add global variables in MachineFunctionPass.
>>>
>>> Antony
>>>
>>>
>>> 2013/8/6 Justin Holewinski <justin.holewinski at gmail.com>
>>>
>>>> Yes, global variables are the only way to access shared memory.
>>>>
>>>> I'm just trying to get an id...
2013 Aug 05
0
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
...t runOnMachineFunction.
Micah
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Antony Yu
> Sent: Monday, August 05, 2013 3:41 AM
> To: llvmdev at cs.uiuc.edu
> Subject: [LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
>
> Hello,
>
> I want to add a global variable of arrayType in my MachineFunctionPass.
> However, I only get const Module from
> MachineFunction.getMMI().getModule().
> I can't add any global variable to a const Module.
> Another way is to add a global variable in do...
2016 Mar 01
0
How to write a simple MachineFunctionPass
First you should learn how to write a pass and then a MachineFunctionPass.
>From LLVM website, you can refer to
http://llvm.org/docs/WritingAnLLVMPass.html
And for outside pass, you can refer to
http://adriansampson.net/blog/llvm.html
It's a great article.
And the author put the source code on Github
<https://github.com/sampsyo/llvm-pass-skeleton>.
2016-0...
2013 Aug 05
0
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
If you're running a MachineFunctionPass, then the code has already been
lowered to machine instructions and modifying the original IR will most
likely not do what you want. You should only be using the IR as an
immutable object for reference. If you want to change the IR, I would
suggest using a FunctionPass instead of a MachineFunctio...