similar to: [CodeGen] Read/Write Machine IR from/to Persistent File

Displaying 20 results from an estimated 1000 matches similar to: "[CodeGen] Read/Write Machine IR from/to Persistent File"

2019 Nov 27
2
Writing a Pass in LLVM MC (Machine Code) level to Analyze Assembly Code
Hi All, A self-follow up and rephrase of my previous question with updated subject: What I want to do is to analyze hand-written assembly code with 'full details' where semantics of each instruction can be known in LLVM passes. Many of such instructions have no corresponding counterparts in IR/MIR forms, such as 'syscall' 'iret', etc. At MC level, such assembly code can
2019 Nov 25
2
[Machine IR] Analyzing Assembly Source Code in MIR passes
Llvm-mctoll will raise a binary back to LLVM IR. Not exactly what you want but it might be something you can leverage. https://github.com/microsoft/llvm-mctoll On Mon, Nov 25, 2019 at 1:19 PM Nicolai Hähnle via llvm-dev < llvm-dev at lists.llvm.org> wrote: > On Thu, Nov 21, 2019 at 3:37 AM Lele Ma via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > My goal is to write
2018 Mar 20
2
MIR YAML deserialisation failure
Valentin, in terms of limitations as Sean pointed out, an important one is that .mir doesn't have MachineFunctionInfo which may result in failure on accesses to global variables due to use of register X2. The verifier considers it an undefined register. Also, it's probably easier to reduce test cases using bugpoint starting from an IR test case. With the code you provided, I get a
2018 Mar 19
2
MIR YAML deserialisation failure
Hello, I am trying to isolate an assertion failure in if-converter (on PPC) and I generated a textual debuglog with: ``` LLVM_ARGS=-print-before-all -print-module-scope -filter-print-funcs=japi1__require_7687 ``` and after splicing out the the MIR before the if-converter pass I would like to run `llc -march=ppc64le -run-pass=if-converter input.mir` so that I can start minimising the MIR. This
2018 Mar 20
0
MIR YAML deserialisation failure
Hello Valentin, To generate a mir test case i think the process is to first create an IR file by passing '-S -emit-llvm' to clang, then you can feed that file into llc and use stop-before to get the mir just before the if-converter pass, eg: `llc -stop-before=if-converter -simplify-mir -o test.mir test.ll`. Also there is a MIR language reference: https://llvm.org/docs/MIRLangRef.html
2018 Mar 20
2
MIR YAML deserialisation failure
I'm not sure if this helps, but here it is in case it does. I typically use bugpoint in a way as to keep the actual failure that I'm after. For example, with the test case you've pasted, I was looking for a specific assert. So I used bugpoint this way: $ cat reduceme.sh #!/bin/bash llc -filetype=obj $1 2>&1 | grep 'Cannot lower calls with arbitrary operand bundles'
2018 Mar 20
0
MIR YAML deserialisation failure
Thank you both! I was running into the issue that bugpoint was reducing my test-case into other failures and I hadn't managed yet to find the right point in the Julia pass pipeline to insert the module to reproduce the issue reliably from llc and that's why I started looking at using the MIR. I will go back at looking at the pass pipeline and the IR and get a reproducer that way!
2018 Mar 22
0
MIR YAML deserialisation failure
In our fork of LLVM we often need to reduce a crash testcase for a specific assertion. After writing lots of "only give me this specific assertion" scripts like the above I decided to write a script that automates all this for me: <https://github.com/CTSRD-CHERI/clang/blob/master/utils/creduce_crash_testcase.py>. (It's called creduce_crash_test.py but it will actually use
2019 Nov 21
2
[Machine IR] Analyzing Assembly Source Code in MIR passes
Dear LLVM developers, My goal is to write LLVM Machine IR (MIR) passes to analyze the assembly source code. But it seems I need to find a way to translate the handwritten assembly code into MIR format first. Is there any materials, or any modules in LLVM source code, that can help to translate assembly code into LLVM MIR for analysis? Or is there any easier ways to analyze assembly code in MIR
2014 Sep 29
2
[LLVMdev] questions about getAnalysisUsage
Hi, I notice that there are several different methods called inside getAnalysisUsage(). The parameters of addRequiredID and addPreservedID are passID. What is the difference between Required and Preserved? There are also function named addRequired<PassName>() called. What is the difference between addRequired<PassName>() and addRequiredID(PassID)? Thanks a lot! Best,
2018 Jan 09
1
Suggestions on register allocation by using reinforcement learning
Hi everyone, I'm quite new to LLVM *and doing a Q-learning *(*just a hobby*)* on register allocation for LLVM. RegAllocRL is based on* *RegAllocBase*,* RegAllocBasic and add some feature to implement Q-learning algorithm. * *I*’*ve currently run as MachineFunctionPass and things seem to work in simple case. In order to make progress on training*, *I have questions and want to get some
2003 Dec 17
2
Troubles with voicemail and cisco 7905 SIP
I'm deploying a fairly large number of Cisco 7905 with SIP connected to an asterisk PBX. The problem: the 7905 has this nice "feature": You can set a "voice mail number" in configuration, so that you can listen your voice mail just by hitting the "messages" key on the phone. It just autodials "8500" or whatever else. The customer wants this, so
2015 Apr 28
2
[LLVMdev] RFC: Machine Level IR text-based serialization format
2015-04-28 10:09 GMT-07:00 Krzysztof Parzyszek <kparzysz at codeaurora.org>: > Looks good. How are you planning to "assemble" the MI-level YAML > description into the actual in-memory IR? I plan on developing a parser for the new text format for the machine instructions. This parser will parse instructions, operands and memory operands, and it will after run the machine
2011 Jan 12
1
[LLVMdev] About adding a pass into llvm
I have seen INITIALIZE_PASS(LiveVariables, "livevars", "Live Variable Analysis", false, false); in the llvm/lib/codegen/LiveVariables.cpp, where LiveVariables is a subclass of MachineFunctionPass, and #define INITIALIZE_PASS(passName, arg, name, cfg, analysis) \ static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis) in PassSupport.h Is this code used
2019 Apr 11
2
Upper case vs lower case in printed and parsed MIR
I am confused about the rules for when upper and lower case letters should be used in MIR. As an example our downstream target has upper case letters in its sub-register indices and as a result we cannot import exported MIR without manually 'lower casing' it first which is obviously rather annoying. Looking in https://llvm.org/docs/MIRLangRef.html it is stated that instruction names are
2013 Jul 02
2
Recoding variables based on reference values in data frame
I'm new to R (previously used SAS primarily) and I have a genetics data frame consisting of genotypes for each of 300+ subjects (ID1, ID2, ID3, ...) at 3000+ genetic locations (SNP1, SNP2, SNP3...). A small subset of the data is shown below: SNP_ID SNP1 SNP2 SNP3 SNP4 Maj_Allele C G C A Min_Allele T A T G ID1 CC GG CT AA ID2 CC GG CC AA ID3 CC GG nc AA
2016 Mar 22
2
Passing llvm option -mem2reg to clang
I have used the following command for my pass (without -mem2reg): clang -Xclang -load -Xclang MYPASS.so -c ../../tests/test1.c For mem2reg, I tried the following: clang -mllvm -mem2reg -Xclang -load -Xclang MYPASS.so -c ../../tests/test1.c On Mon, Mar 21, 2016 at 9:26 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > >> On Mar 21, 2016, at 6:23 PM, Syed Rafiul Hussain
2003 Sep 18
1
e100p and E-bit alarm indication
We connected an * box with an e100p to an E1/PRI from a telco here in Italy. After we had it working perfectly the telco told us that, despite the circuit appeared to work fine, and we could place calls on it, they had an "E-bit2 alarm indication constantly on that caused the circuit to be flagged as "faulty" every time. (The E-bit indication, is an alarm sent back from us to
2018 Aug 11
2
MachineInstr sizes for ARM jumptables
Hi llvm developers, I might be overlooking something, but I think the ARMConstantIsland pass uses the wrong size for the MachineInstrs representing jump tables: Currently, there is the following calculation in doInitialJumpTablePlacement (lib/Target/ARM/ARMConstantIslandPass.cpp:588): ---------------------------------------------------------------------- unsigned Size = JT[JTI].MBBs.size() *
2003 Jul 30
3
nested for() loops for returning a nearest point
I'm trying to do the following: For each ordered pair of a data frame (D1) containing longitudes and latitudes and unique point IDs, calculate the distance to every point in another data frame (D2) also containing longitudes, latitudes and point IDs, and return to a new variable in D1 the point ID of the nearest element of D2. Dramatis personae (mostly self-explanatory): D1$long