search for: addpreregalloc

Displaying 20 results from an estimated 45 matches for "addpreregalloc".

2017 Feb 23
2
Bundling MachineInstr instructions before register allocation seems to always give errors
Hello. I am having difficulties to bundle MachineInstr instructions, before register allocation (RA). More exactly, I registered a simple pass in addPreRegAlloc() that is trying to create bundles. I see that it is written at http://llvm.org/docs/CodeGenerator.html#machineinstr-bundles: <<Packing / bundling of MachineInstr’s should be done as part of the register allocation super-pass. More specifically, the pass wh...
2014 Jul 14
3
[LLVMdev] Register Machine Pass
...it. > > > > > > I have built a machine function pass similar to the one found in > > HexagonHardwareLoops.cpp. So I have generated a machine pass.cpp file, > > modified 'Target'.h and 'Target'TargetMachine.cpp (to add pass via > > addPass() in the addPreRegAlloc()). All this builds/compiles fine. > > > > > > When running llc the pass does not get executed. > > > > > > I seem to be missing some steps? Potentially registration of the > > machine pass? > > That should be all you need to do. Are you running in...
2014 Jul 14
2
[LLVMdev] Register Machine Pass
...n about registering a machine pass? I'm unable to find it. I have built a machine function pass similar to the one found in HexagonHardwareLoops.cpp. So I have generated a machine pass.cpp file, modified 'Target'.h and 'Target'TargetMachine.cpp (to add pass via addPass() in the addPreRegAlloc()). All this builds/compiles fine. When running llc the pass does not get executed. I seem to be missing some steps? Potentially registration of the machine pass? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/...
2018 May 05
4
How to add assembly instructions in CodeGen
...e generated code, I get segmentation fault (precisely in printf with XMM registers). Where should I add my pass? My pass depends on the MachineBasicBlock information as well. Therefore, I cannot add my pass too early in LLVM IR. What is the proper pass to add my custom MachineFunctionPass? I tried addPreRegAlloc, but it failed due to insufficient register allocation error or something on that line. Can anybody please help me write a MachineFunctionPass where I can insert assembly instruction without breaking the alignment? I am doing this for X86_64. Regards, Soham Sinha PhD Student, Department of Comput...
2009 Sep 09
2
[LLVMdev] [PATCH] & Question: Preserving ProfileInfo for backend.
...hat accessing execution counts in a MachineFunction pass (using the BasicBlock* corresponding to the respective MachineBasicBlock) returned 0 for all blocks. Running llc with --debug-pass=Structure I noticed that the NoProfileInfo pass was being executed. I tried adding a ProfileLoaderPass in the addPreRegAlloc function of the X86 target machine to load the profile information but receive the following runtime error when the pass manager attempts to add the ProfileLoader pass: llc: <path to llvm>/llvm/lib/VMCore/PassManager.cpp:1597: virtual void llvm::ModulePass::assignPassManager(llvm::PMStack&am...
2009 Aug 02
2
[LLVMdev] code-altering Passes for llc
...tending llc to include runtime checks for calls (in X86). So a call 'call target' is altered to look like this: [some check] jne error_function call target I've done this by implementing a MachineFunctionPass that is instantiated and added to the PassManager in X86TargetMachine::addPreRegAlloc. In order to create the jne-instruction I need some BasicBlock that contains the error routine. So I tried to create a ModulePass to insert some basic block e. g. in the beginning of the program, to use it for the jne-instruction. Unfortunately, llc then produces the error llc: PassManager.cpp:...
2018 May 07
0
How to add assembly instructions in CodeGen
...code, I get segmentation fault (precisely in printf with XMM registers). Where should I add my pass? > > My pass depends on the MachineBasicBlock information as well. Therefore, I cannot add my pass too early in LLVM IR. What is the proper pass to add my custom MachineFunctionPass? I tried addPreRegAlloc, but it failed due to insufficient register allocation error or something on that line. > > Can anybody please help me write a MachineFunctionPass where I can insert assembly instruction without breaking the alignment? I am doing this for X86_64. > > Regards, > Soham Sinha > PhD...
2018 May 07
0
How to add assembly instructions in CodeGen
...the custom event sleds. - use pseudo-instructions and preserving those until lowering, where the lowering > My pass depends on the MachineBasicBlock information as well. Therefore, I cannot add my pass too early in LLVM IR. What is the proper pass to add my custom MachineFunctionPass? I tried addPreRegAlloc, but it failed due to insufficient register allocation error or something on that line. > Can anybody please help me write a MachineFunctionPass where I can insert assembly instruction without breaking the alignment? I am doing this for X86_64. You can look at the XRay lowering for the PATCHA...
2015 Oct 22
2
add intrinsic function support for customized backend
Hi, All, I want to add one intrinsic function for my particular backend. Let's say the intrinsic function is named "foo" which takes two i32 inputs and has one i32 output. First, I add this line "def int_foo : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrReadArgMem]>;" in /include/llvm/IR/Intrinsics.td. Then, in my target/InstrInfo.td, I'm supposed
2009 Aug 02
0
[LLVMdev] code-altering Passes for llc
...in X86). So > a call > 'call target' is altered to look like this: > > [some check] > jne error_function > call target > > I've done this by implementing a MachineFunctionPass that is > instantiated > and added to the PassManager in X86TargetMachine::addPreRegAlloc. > > In order to create the jne-instruction I need some BasicBlock that > contains > the error routine. So I tried to create a ModulePass to insert some > basic > block e. g. in the beginning of the program, to use it for the > jne-instruction. Unfortunately, llc then produ...
2009 Sep 06
0
[LLVMdev] How to differentiate between external and internal calls in llc?
I have a MachineFunctionPass plugged into llc during LLVMTargetMachine::addPreRegAlloc. In this Pass I need to extend calls (i. e. CALL32m, CALL32r) iff they call function within the program. CALL32m has, I think, ten different possibilities for the four operands giving the target address. At the moment I have excluded calls that give the displacement as GlobalAddress or JumpTable...
2009 Sep 08
0
[LLVMdev] [PATCH] & Question: Preserving ProfileInfo for backend.
On Sep 8, 2009, at 1:27 AM, Andreas Neustifter wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > the second part of my work is to preserve the profiling information > through all the transformation passes and make it available to the > backend machinery. > > Attached is an example patch on how I plan to preserve the information > for a given
2009 Sep 24
0
[LLVMdev] Split MachineBasicBlocks
...asicBlocks the resulting programs suffer from segmentation faults. I have reproduced the error using a simple MachineFunctionPass in the X86 backend that splits MachineBasicBlocks before CALL32m instructions (and inserts a fallthrough-jmp). The MachineFunctionPass is plugged into X86TargetMachine::addPreRegAlloc. The split-method is basically stolen from BranchFolder::SplitMBBAt. Currently I use the gcc benchmark from SPEC2000 to generate the error, but I guess every reasonably complex program will do. I have attached my MachineFunctionPass, in case you need to look at the code. Does anyone have an idea w...
2009 Sep 09
0
[LLVMdev] [PATCH] & Question: Preserving ProfileInfo for backend.
...lock) > returned 0 for all blocks. Running llc with I > noticed that the NoProfileInfo pass was being executed. Yes, llc currently does not support the loading of profiles, but I attach a patch that does that, can you try that please? > I tried > adding a ProfileLoaderPass in the addPreRegAlloc function of the X86 > target machine to load the profile information but receive the > following runtime error when the pass manager attempts to add the > ProfileLoader pass: > > llc: <path to llvm>/llvm/lib/VMCore/PassManager.cpp:1597: virtual void > llvm::ModulePass::assi...
2009 Jul 14
0
[LLVMdev] Writing pass for llc
On Sun, Jul 12, 2009 at 2:09 PM, shu<shuguang.feng at gmail.com> wrote: > Is there a beginner's tutorial/documentation on how to write passes > for the llc tool?  I've managed to write some simple analysis passes > for the opt tool but can't figure out how to do the same for llc. > What is the proper way to integrate a new MachineFunction pass with > llc?  Is there
2018 May 07
2
How to add assembly instructions in CodeGen
...; - use pseudo-instructions and preserving those until lowering, where the > lowering > > > My pass depends on the MachineBasicBlock information as well. Therefore, > I cannot add my pass too early in LLVM IR. What is the proper pass to add > my custom MachineFunctionPass? I tried addPreRegAlloc, but it failed due to > insufficient register allocation error or something on that line. > > > Can anybody please help me write a MachineFunctionPass where I can insert > assembly instruction without breaking the alignment? I am doing this for > X86_64. > > > You can loo...
2009 Sep 08
2
[LLVMdev] [PATCH] & Question: Preserving ProfileInfo for backend.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, the second part of my work is to preserve the profiling information through all the transformation passes and make it available to the backend machinery. Attached is an example patch on how I plan to preserve the information for a given transformation pass. And now comes the question into place: whats the best way to attach the profile info
2009 Jul 12
3
[LLVMdev] Writing pass for llc
Is there a beginner's tutorial/documentation on how to write passes for the llc tool? I've managed to write some simple analysis passes for the opt tool but can't figure out how to do the same for llc. What is the proper way to integrate a new MachineFunction pass with llc? Is there a way to register passes and selectively enable them on the command line (as with opt) or do I need to
2018 May 08
0
How to add assembly instructions in CodeGen
...do-instructions and preserving those until lowering, where the >> lowering >> > My pass depends on the MachineBasicBlock information as well. Therefore, >> I cannot add my pass too early in LLVM IR. What is the proper pass to add >> my custom MachineFunctionPass? I tried addPreRegAlloc, but it failed due to >> insufficient register allocation error or something on that line. >> > Can anybody please help me write a MachineFunctionPass where I can insert >> assembly instruction without breaking the alignment? I am doing this for >> X86_64. >> You...
2013 Jan 07
4
[LLVMdev] instruction scheduling issue
On 1/7/2013 2:15 PM, Xu Liu wrote: > > This would be ideal. How can I do the instrumentation pass after the > instruction scheduling? You could derive your own class from TargetPassConfig, and add the annotation pass in YourDerivedTargetPassConfig::addPreEmitPass. This will add your annotation pass very late, just before the final code is emitted. If you're using the X86 target,