similar to: [LLVMdev] Determining the register type of a MachineOperand

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Determining the register type of a MachineOperand"

2008 Sep 24
0
[LLVMdev] Determining the register type of a MachineOperand
You can get to the MachineInstr from a MachineOperand. Then get to its TargetInstrDesc and TargetOperandInfo which has register class information. Evan On Sep 23, 2008, at 12:44 PM, Villmow, Micah wrote: > How do I determine what type of register(i.e. i32, f32, etc..) I am > accessing from a MachineOperand? I.e. how do I get to the MVT > struct, or equivalent information, from
2008 Sep 24
2
[LLVMdev] Determining the register type of a MachineOperand
This only has the register class information, not the register type information. My register class has multiple register types and I need to know how to differentiate which register type of my register class of the current register. The information in the MVT data type is what I need, i.e. the position in the GPRVT array of each register. Something equivalent to MVT getValueType() but for
2008 Sep 24
0
[LLVMdev] Determining the register type of a MachineOperand
To my knowledge, I don't think there is an easy way to get the MVT information from a MachineOperand. Why do you need it for? In my mind, the MachineInstr and its associated operands represent a physical machine instruction and I typically want to think of those as machine opcodes and machine register files. I am typically interested in the mapping of MVTs to register classes
2008 Sep 10
3
[LLVMdev] Determining the names of all the functions in a module
I am attemping to figure out how to access the function names that are stored in a module so that I know which function I am currently in. I am attempting to write a backend that targets a language that only allows integer function names and I need to create mapping between the string and the integer. I've looked in the header files but I cannot determine how to extract the function
2008 Sep 24
1
[LLVMdev] Accessor function setFPImm in MachineOperand
I need to modify the FPImmediate in the MachineOperand but there is no accessor function for this variable. Any other way of doing this without creating a new operand via CreateFPImm? Micah Villmow Systems Engineer Advanced Technology & Performance Advanced Micro Devices Inc. 4555 Great America Pkwy, Santa Clara, CA. 95054 P: 408-572-6219 F: 408-572-6596 -------------- next part
2008 Sep 23
2
[LLVMdev] Store patterns accepting i32 only?
I'm trying to write a store pattern that accepts both i32 and f32, however, when tablegen generates the code, it only generates the code for i32 only. def ADDR : ComplexPattern<i32, 2, "SelectADDR", [], []>; def MEM : Operand<i32> { let PrintMethod = "printMemOperand"; let MIOperandInfo = (ops GPR, GPR); } def global_st :
2008 Nov 18
3
[LLVMdev] 32 bit boolean results
Is there a way to tell LLVM to treat Boolean results as 32bit values instead of 1 bit values? Thanks, Micah Villmow Systems Engineer Advanced Technology & Performance Advanced Micro Devices Inc. 4555 Great America Pkwy, Santa Clara, CA. 95054 P: 408-572-6219 F: 408-572-6596 -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Sep 11
0
[LLVMdev] Determining the names of all the functions in a module
A Function is a Value. See Value.h, look for getName(), etc. Evan On Sep 10, 2008, at 12:18 PM, Villmow, Micah wrote: > I am attemping to figure out how to access the function names that > are stored in a > module so that I know which function I am currently in. I am > attempting to write a > backend that targets a language that only allows integer function > names and I
2008 Oct 14
3
[LLVMdev] CFG modifcations and code gen
As stated in an earlier email, I am working on getting break/continue to work correctly for my backend, but I ran into another issue with codegen and the CFG. It seems that code gen is not done based on the CFG, but rather on the block numbers, and the function call MachineFunction::RenumberBlocks doesn't renumber the blocks based on the CFG. So how can I modify the CFG so that when codegen
2008 Sep 25
2
[LLVMdev] Going from argument to register and back
I am having trouble trying to figure out two pieces of information from attempting to map arguments to registers. How do I determine, based on the argument name, which register the value is supposed to be assigned to? I can hard-coded it currently and it will be correct 100% of the time with the current set of assumptions, but I would rather determine it dynamically so that I can change my
2008 Oct 20
2
[LLVMdev] Virtual Register allocation across functions
Is there currently a way to have virtual register allocation information be saved across functions so that if I create a new virtual register in a function that it doesn't use a virtual register allocated in any previous function? Thanks, Micah Villmow Systems Engineer Advanced Technology & Performance Advanced Micro Devices Inc. 4555 Great America Pkwy, Santa Clara, CA. 95054
2008 Oct 24
2
[LLVMdev] SetCC tablegen pattern
I am attempting to match setcc using tablegen w/ the following patterns: def FEQ : Instruction<(outs GPRF32:$dst), (ins GPRF32:$src0, GPRF32:$src1), "eq $dst, $src0, $src1", [(set GPRF32:$dst, (seteq GPRF32:$src0, GPRF32:$src1))]>; And it is failing stating that the result must be an integer. Is there a way around this other than modifying TargetSelectionDAG.td? Also,
2008 Nov 18
0
[LLVMdev] 32 bit boolean results
On Nov 18, 2008, at 11:24 AM, Villmow, Micah wrote: > Is there a way to tell LLVM to treat Boolean results as 32bit values > instead of 1 bit values? LLVM IR doesn't have a concept of C level booleans. What problem are you trying to solve? -Chris > > Thanks, > > Micah Villmow > Systems Engineer > Advanced Technology & Performance > Advanced Micro Devices
2009 Jan 23
1
[LLVMdev] How to determine Immediate Type in MachineOperand class?
Hi,    I would like to get the type of immediate value (integer) from MachineOperand Class. Currently the immediate value is being represented as int64_t. int64_t ImmVal; // For MO_Immediate.   Is it possible to find out whether the immediate value is int8, 16, 32 etc?   Note: My target has a virtual Instruction set.   Thanks in advance, -Sanjay -------------- next part -------------- An
2008 Sep 23
0
[LLVMdev] Store patterns accepting i32 only?
On Sep 23, 2008, at 10:44 AM, Villmow, Micah wrote: > I’m trying to write a store pattern that accepts both i32 and f32, > however, when tablegen generates the code, it only generates the > code for i32 only. > > def ADDR : ComplexPattern<i32, 2, "SelectADDR", [], []>; > def MEM : Operand<i32> { > let PrintMethod = "printMemOperand";
2008 Sep 15
3
[LLVMdev] Bad legalization?
I am getting an assert on a bad legalization. Assertion failed: Result.getValueType() == Op.getValueType() && "Bad legalization!", file ..\..\lib\CodeGen\SelectionDAG\LegalizeDAG.cpp, line 3976 Can someone explain to me what this means in term of backend code generation, how it might be occurring, and possible ways to fix this? I don't see how the value type of an
2008 Oct 22
2
[LLVMdev] Register class conversions
Is there a simple way to specify the relationship between two different register classes of various sizes and alignments as being legal to convert between them? I have my backend written up using a single register class for i32, i64, f32 and f64 types, however, because the type information is not propagated down to the machine instruction register level, it is not known to me how to determine
2008 Sep 17
2
[LLVMdev] store addrspace qualifier
How do I access the address qualifier from the store instruction. Given the following code: define void @test_unary_op_anegate(float %x, float addrspace(11)* %result) nounwind { entry: %neg = sub float -0.000000e+000, %x ; <float> [#uses=1] store float %neg, float addrspace(11)* %result ret void } When I attempt to generate this code, I'm
2008 Oct 28
4
[LLVMdev] Using patterns inside patterns
Is there currently a way to use a pattern inside of another pattern? Micah Villmow Systems Engineer Advanced Technology & Performance Advanced Micro Devices Inc. 4555 Great America Pkwy, Santa Clara, CA. 95054 P: 408-572-6219 F: 408-572-6596 -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Oct 14
0
[LLVMdev] CFG modifcations and code gen
On Oct 13, 2008, at 5:14 PMPDT, Villmow, Micah wrote: > As stated in an earlier email, I am working on getting break/ > continue to work correctly for my backend, but I ran into another > issue with codegen and the CFG. It seems that code gen is not done > based on the CFG, but rather on the block numbers, and the function > call MachineFunction::RenumberBlocks doesn’t