Konstantin Vladimirov
2012-Mar-28 15:22 UTC
[LLVMdev] Target lowering: how to dump byval argument?
Hi, For example consider code: typedef struct tag_instead_ll { int upper; int lower; int otherguys[9]; } instead_ll_t; __attribute__ ((noinline)) int foo (instead_ll_t value); int main(void) { instead_ll_t val; val.upper = 0x12345678; val.lower = 0x9abcdef; return foo(val); } On the entrance of my LowerCall function, IR looks like: *** IR Dump After Machine Function Analysis *** define i32 @main() nounwind uwtable readonly { %val = alloca %struct.tag_instead_ll, align 4 %1 = bitcast %struct.tag_instead_ll* %val to i32* store i32 305419896, i32* %1, align 4, !tbaa !0 %2 = getelementptr inbounds %struct.tag_instead_ll* %val, i32 0, i32 1 store i32 162254319, i32* %2, align 4, !tbaa !0 %3 = call i32 @foo(%struct.tag_instead_ll* byval %val) ret i32 %3 } Inside the LowerCall function, when I trying to dump incoming OutVals: dbgs() << "<--- Outvals: --->\n"; for (int idx = 0, maxidx = OutVals.size(); idx != maxidx; ++idx) { dbgs() << idx << ":\n"; OutVals[idx].getNode()->dumprFull(); dbgs() << "\n"; } dbgs() << "<--->\n"; I get only: <--- Outvals: ---> 0: 0x31fbe40: i32 = FrameIndex<0> <---> So LLVM thinks, I have only one i32 argument. How can I look inside it? Is there anything better, then dumprFull? Thanks in advance. --- With best regards, Konstantin
Possibly Parallel Threads
- [LLVMdev] Changes to TargetLowering::{LowerCallTo,LowerCall}
- [LLVMdev] why dummy asserting base/interface class virtual methods instead of pure virtual methods?
- [LLVMdev] [PATCH][RFC] Add extra arguments to TargetLowering::LowerCall() so targets have more context in which to construct call chains
- [LLVMdev] [llvm-commits] [PATCH][RFC] Add extra arguments to TargetLowering::LowerCall() so targets have more context in which to construct call chains
- [LLVMdev] [llvm-commits] [PATCH][RFC] Add extra arguments to TargetLowering::LowerCall() so targets have more context in which to construct call chains