search for: horwitz

Displaying 20 results from an estimated 51 matches for "horwitz".

2012 Nov 14
1
[LLVMdev] problem trying to write an LLVM register-allocation pass
...all aliases of the elements of usedPregSet. The attached Gcra includes code for this. It also moves the erasure of the subreg index out of the inner loop so that if a vreg appears multiple times in an instruction all subreg indexes will be cleared. - Lang. On Tue, Nov 13, 2012 at 2:58 PM, Susan Horwitz <horwitz at cs.wisc.edu> wrote: > Lang - > > Your fix does prevent the assembler errors, but it doesn't seem to produce > correct assembly. > > I created a slightly modified version that, for each instruction that > includes a vreg, adds a check that the preg selecte...
2012 Nov 13
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...#39;vreg'. The update > adds a new variable, preg_op, to hold the subregister of preg that will > be used for the operand currently being rewritten, and preg_op will be > set to a subreg of preg where appropriate. > > - Lang. > > > On Sun, Nov 11, 2012 at 10:30 AM, Susan Horwitz <horwitz at cs.wisc.edu > <mailto:horwitz at cs.wisc.edu>> wrote: > > Sorry about that. I created the assembly file and attached it (as > math.txt). > > Susan > > On 11/11/2012 12:41 AM, Lang Hames wrote: >> Hi Susan, >> >>...
2012 Nov 13
5
[LLVMdev] problem trying to write an LLVM register-allocation pass
...sical register of the same class as 'vreg'. The update adds a new variable, preg_op, to hold the subregister of preg that will be used for the operand currently being rewritten, and preg_op will be set to a subreg of preg where appropriate. - Lang. On Sun, Nov 11, 2012 at 10:30 AM, Susan Horwitz <horwitz at cs.wisc.edu> wrote: > Sorry about that. I created the assembly file and attached it (as > math.txt). > > Susan > > On 11/11/2012 12:41 AM, Lang Hames wrote: > > Hi Susan, > > It looks like the bitcode you have attached is corrupted. You should &gt...
2012 Nov 11
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...ake sure to attach it as a binary file. Alternatively you can attach > the LLVM assembly as text. You can generate an assembly file from > bitcode with: > > llvm-dis -o <asm file> <bitcode> > > Regards, > Lang. > > > On Fri, Nov 9, 2012 at 11:15 AM, Susan Horwitz <horwitz at cs.wisc.edu > <mailto:horwitz at cs.wisc.edu>> wrote: > > Thanks Lang, we are making progress! I no longer get the failed > assertion, but the code I'm using for vregs that don't get > allocated a preg, and thus need to be spilled and re-...
2012 Nov 11
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...ode you have attached is corrupted. You should make sure to attach it as a binary file. Alternatively you can attach the LLVM assembly as text. You can generate an assembly file from bitcode with: llvm-dis -o <asm file> <bitcode> Regards, Lang. On Fri, Nov 9, 2012 at 11:15 AM, Susan Horwitz <horwitz at cs.wisc.edu> wrote: > Thanks Lang, we are making progress! I no longer get the failed > assertion, but the code I'm using for vregs that don't get allocated a > preg, and thus need to be spilled and re-loaded is causing assembler errors. > > I suspect the...
2012 Nov 08
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...is helps! Cheers, Lang. On Wed, Nov 7, 2012 at 2:56 PM, Lang Hames <lhames at gmail.com> wrote: > Hi Susan, > > Sorry for the delayed response. Thanks for the test cases - I'm looking in > to this now. > > - Lang. > > > On Mon, Nov 5, 2012 at 2:58 PM, Susan Horwitz <horwitz at cs.wisc.edu> wrote: > >> Hi Lang, >> >> I looked more into one of the problems I'm now having, and I've attached >> 3 files: >> >> Gcra.cpp is like your version except that for two specific vregs it uses >> hard-coded pregs inst...
2012 Nov 05
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...getSubReg(PhysReg, MO.getSubReg()); > MO.setSubReg(0); > } > MO.setReg(PhysReg); > > Adding this code to Gcra fixes the assembly issue for me. I've attached > my updated copy. Hope this helps. > > Cheers, > Lang. > > > On Sun, Nov 4, 2012 at 2:08 PM, Susan Horwitz <horwitz at cs.wisc.edu > <mailto:horwitz at cs.wisc.edu>> wrote: > > My tst.bc is attached. I had to use ssh to copy it from my office > machine to my home laptop. In case that corrupts it, I also put a > copy here: > http://pages.cs.wisc.edu/~horwit...
2012 Nov 09
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...Hames <lhames at gmail.com > <mailto:lhames at gmail.com>> wrote: > > Hi Susan, > > Sorry for the delayed response. Thanks for the test cases - I'm > looking in to this now. > > - Lang. > > > On Mon, Nov 5, 2012 at 2:58 PM, Susan Horwitz <horwitz at cs.wisc.edu > <mailto:horwitz at cs.wisc.edu>> wrote: > > Hi Lang, > > I looked more into one of the problems I'm now having, and > I've attached 3 files: > > Gcra.cpp is like your version except that for tw...
2012 Nov 04
3
[LLVMdev] problem trying to write an LLVM register-allocation pass
My tst.bc is attached. I had to use ssh to copy it from my office machine to my home laptop. In case that corrupts it, I also put a copy here: http://pages.cs.wisc.edu/~horwitz/LANG/tst.bc I created the file like this: clang -emit-llvm -O0 -c tst.c -o tst.bc opt -mem2reg tst.bc > tst.mem2reg mv tst.mem2reg tst.bc Susan On 11/4/2012 3:27 PM, Lang Hames wrote: > Hi Susan, > > I tested the version of Gcra.cpp that I sent you on x86-64 systems > running M...
2012 Nov 07
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
Hi Susan, Sorry for the delayed response. Thanks for the test cases - I'm looking in to this now. - Lang. On Mon, Nov 5, 2012 at 2:58 PM, Susan Horwitz <horwitz at cs.wisc.edu> wrote: > Hi Lang, > > I looked more into one of the problems I'm now having, and I've attached 3 > files: > > Gcra.cpp is like your version except that for two specific vregs it uses > hard-coded pregs instead of the first in the correspo...
2012 Nov 03
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
....h. (If you search for > createRegAllocPBQP you'll see where to add the declarations). > > With that setup, running your allocator on the tst.c file you attached > previously yielded a sane assembly file. > > Cheers, > Lang. > > On Thu, Nov 1, 2012 at 3:13 PM, Susan Horwitz <horwitz at cs.wisc.edu > <mailto:horwitz at cs.wisc.edu>> wrote: > > I still get a coredump: > > 0 libLLVM-3.1.so <http://libLLVM-3.1.so> 0x00007f0158a4e67f > 1 libLLVM-3.1.so <http://libLLVM-3.1.so> 0x00007f0158a500ca > 2 libpthread...
2012 Nov 05
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...getReg(); if (MO.getSubReg() != 0) { PhysReg = TRI->getSubReg(PhysReg, MO.getSubReg()); MO.setSubReg(0); } MO.setReg(PhysReg); Adding this code to Gcra fixes the assembly issue for me. I've attached my updated copy. Hope this helps. Cheers, Lang. On Sun, Nov 4, 2012 at 2:08 PM, Susan Horwitz <horwitz at cs.wisc.edu> wrote: > My tst.bc is attached. I had to use ssh to copy it from my office > machine to my home laptop. In case that corrupts it, I also put a copy > here: > http://pages.cs.wisc.edu/~horwitz/LANG/tst.bc > > I created the file like this: >...
2012 Nov 01
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...in PEI indicates that the > MachineRegisterInfo object still contained some virtregs post > register-allocation. You need to call MRI->clearVirtRegs() at the end of > your allocator. > > Hope this helps! > > Cheers, > Lang. > > On Thu, Nov 1, 2012 at 2:41 PM, Susan Horwitz <horwitz at cs.wisc.edu > <mailto:horwitz at cs.wisc.edu>> wrote: > > Hi again Lang, > > I decided to try the approach you proposed to see whether it makes > the assembly-code problem go away. Again, I tried a very simple > register allocator (attac...
2012 Nov 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...include/lib/CodeGen/LinkAllCodeGenComponents.h. (If you search for createRegAllocPBQP you'll see where to add the declarations). With that setup, running your allocator on the tst.c file you attached previously yielded a sane assembly file. Cheers, Lang. On Thu, Nov 1, 2012 at 3:13 PM, Susan Horwitz <horwitz at cs.wisc.edu> wrote: > I still get a coredump: > > 0 libLLVM-3.1.so 0x00007f0158a4e67f > 1 libLLVM-3.1.so 0x00007f0158a500ca > 2 libpthread.so.0 0x0000003a86c0f500 > 3 libLLVM-3.1.so 0x00007f01583c346c > 4 libLLVM-3.1.so 0x00007f0158546349 llvm::FPPas...
2012 Nov 04
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...likely that there is any fundamental problem with the register allocation APIs or the code generator that would prevent you from building a working allocator. The APIs certainly could have changed in a way that would break existing allocators though. - Lang. On Sat, Nov 3, 2012 at 4:34 PM, Susan Horwitz <horwitz at cs.wisc.edu> wrote: > Lang - > > Your version does NOT work for me (i.e., I still get an error from the > assembler when I run your code on my tst.c) unless I force compilation and > assembly for a 32-bit X86 machine: > > llc -march=x86 -regalloc=gc tst.bc...
2012 Nov 01
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...; > The VirtRegRewriter pass (in VirtRegMap.cpp) will run after your > allocator and apply the mapping that you described in the VirtRegMap. > > I hope this helps. Let me know if it doesn't fix your issue. > > Cheers, > Lang. > > On Wed, Oct 31, 2012 at 3:54 PM, Susan Horwitz <horwitz at cs.wisc.edu > <mailto:horwitz at cs.wisc.edu>> wrote: > > Thanks Lang! > > Here's another question: I'm trying to process this input: > > int main() { > return 0; > } > > but I'm getting an error >...
2012 Nov 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...In your case the Assertion that is triggering in PEI indicates that the MachineRegisterInfo object still contained some virtregs post register-allocation. You need to call MRI->clearVirtRegs() at the end of your allocator. Hope this helps! Cheers, Lang. On Thu, Nov 1, 2012 at 2:41 PM, Susan Horwitz <horwitz at cs.wisc.edu> wrote: > Hi again Lang, > > I decided to try the approach you proposed to see whether it makes the > assembly-code problem go away. Again, I tried a very simple register > allocator (attached) that just calls vrm.assignVirt2Phys for every vreg in >...
2012 Nov 15
5
[LLVMdev] problem trying to write an LLVM register-allocation pass
...on of Gcra.cpp that Lang wrote). So I'm wondering if I should really be using the flag? I'm using it like this: llc -verify-machineinstrs -load Debug/lib/P4.so -regalloc=gc xxx.bc Susan On 11/15/2012 01:13 PM, Jakob Stoklund Olesen wrote: > > On Nov 15, 2012, at 7:53 AM, Susan Horwitz<horwitz at cs.wisc.edu> > wrote: > >> Lang - >> >> Attached is a new example for which I still get assembler errors. >> >> Susan > > Hi Susan, > > You should never be getting assembler errors if 'llc > -verify-machineinstrs' approves...
2012 Nov 16
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...know the verifier well, but if it's using other built in infrastructure for register allocation then it may not be a good fit for your allocator. I'll try to find time to look at the example files you sent in the next couple of days. Cheers, Lang. On Thu, Nov 15, 2012 at 5:21 PM, Susan Horwitz <horwitz at cs.wisc.edu> wrote: > Well, now I can't reproduce what I thought I had before (an example that > works fine with your code except when using that flag). I do have a small > example that works fine with *my* code except when using that flag. I've > attached t...
2012 Oct 31
3
[LLVMdev] problem trying to write an LLVM register-allocation pass
...see Passes.cpp), so you needn't > require them explicitly - you can just assume they have been run. If you > just remove those lines from your getAnalysisUsage method your pass > should now run as you expect. > > Cheers, > Lang. > > On Wed, Oct 31, 2012 at 1:46 PM, Susan Horwitz <horwitz at cs.wisc.edu > <mailto:horwitz at cs.wisc.edu>> wrote: > > I'm trying to write a MachineFunctionPass to do register allocation. > I have code that worked with an old version of LLVM. It does not > work with llvm-3.1. (or various other version...