search for: machineframeinfo

Displaying 20 results from an estimated 86 matches for "machineframeinfo".

2008 Jul 25
1
[LLVMdev] llvm svn trunk rev54012 does not compile
.../Transforms/Hello' make[2]: Leaving directory `/usr/src/Lang/llvm/lib/Transforms' make[2]: Entering directory `/usr/src/Lang/llvm/lib/CodeGen' llvm[2]: Compiling PseudoSourceValue.cpp for Debug build In file included from PseudoSourceValue.cpp:14: /usr/src/Lang/llvm/include/llvm/CodeGen/MachineFrameInfo.h:86: error: 'uint64_t' does not name a type /usr/src/Lang/llvm/include/llvm/CodeGen/MachineFrameInfo.h:98: error: 'int64_t' does not name a type /usr/src/Lang/llvm/include/llvm/CodeGen/MachineFrameInfo.h:100: error: expected `)' before 'Sz' /usr/src/Lang/llvm/include...
2018 Mar 22
0
MachineFrameInfo::print SP offset
Hello, In MachineFrameInfo::print (llvm-6.0.0) line 235, when printing SP offsets, shouldn't it be // -> consider stack growth direction int64_t Off = StackGrowsDown ? SO.SPOffset - ValOffset : SO.SPOffset + ValOffset; Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http...
2018 May 31
0
Debugging a issue in MachineFrameInfo?
...r. However when I try to compile the transformed IR into object code using llc Output.ll -filetype=obj , it asserts out with Assertion failed: (unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && "Invalid Object Idx!"), function getObjectAlignment, file include/llvm/CodeGen/MachineFrameInfo.h, line 424. I'm currently using LLVM 6.0 release version and it would be great if someone could point out the correct way to fix this issue Zhang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/2018...
2009 Nov 26
1
[LLVMdev] MachineFrameInfo
Hello, I found that is possible to introduce some changes in the stack layout; however, where I can find more information about how to use it (I am reading code). For example, how I can align the stack to the maximum size (what is the max size?), or how I can protect it? Can I set up the condiction using flags at compiler time or I need to change the code? -- Juan Carlos -------------- next
2011 Feb 14
1
[LLVMdev] broken alignment in stack(caused by bug in SelectionDAGBuilder) causes invalid schedules with r125471 and newer
...nment for any data type SP pointer may point anywhere with alignment of stack alignment (4 in our case) SelectionDAGBuilder however calls CreateStackObject with preferred alignment is given data type(8 in our problemaric case. The ABI alignment for this data type is only 4) This means, that the MachineFrameInfo thinks that the stack object is aligned by 8 bytes, even though in reality if may also be aligned only by 4 bytes, of the SP points to address which is aligned by 4, but not 8. r125471 introduced optimization which can optimize add into xor in case object is aligned so that the operation only tou...
2005 Mar 22
2
[LLVMdev] Stack alignment problem
...suggested solution. For reference, here's the original message from me: http://mail.cs.uiuc.edu/pipermail/llvmdev/2004-July/001388.html And here's reply from Chris: http://mail.cs.uiuc.edu/pipermail/llvmdev/2004-July/001390.html The PrologEpilogInserter.cpp file aligns the stack only if MachineFrameInfo::hasCalls returns true, which happens only if the function has "call frame setup instruction" which my backend does not generate. Chris suggested adding explicit MachineFrameInfo::setHasCalls call, which I've tried, but it does not help. The PrologEpilogInsert.cpp file always expli...
2006 May 16
1
[LLVMdev] Stack alignment in leaf functions
...sue back then. For my target, the stack should be aligned even for leaf functions. In particular, hardware interrupt can arrive at any time, and stack should be 8-byte aligned at the time of interrupt, otherwise things will break. I can address this issue by using two tricks together: 1. Calling MachineFrameInfo::setHasCalls in my backend 2. Using the attached patch, so that value of setHasCalls is not reset to false later. Comments? BTW, I've checked other uses of MachineFrameInfo::hasCalls. For example, PPCRegisterInfo uses it to check if if callee save registers can be stored in something called...
2011 Jul 08
2
[LLVMdev] Best location in code generation for insertion of instrumentation to measure stack depth?
I investigated the MachineFunctionPass (that is runOnMachineFunction, I believe). In my experimentation it didn't seem that the MachineFrameInfo was populated (it consistently said that the stack depth was 0, for example). I might have been doing something wrong? On Fri, Jul 8, 2011 at 5:21 PM, John Criswell <criswell at illinois.edu> wrote: > On 7/8/11 4:09 PM, Andrew Ruef wrote: > > Hi list, > > I am trying to imp...
2013 Aug 05
2
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
Micah, Thanks for your help. I will study on that code. Justin, Sorry for my misleading word. Local memory in OpenCL is the same as share memory in CUDA. What I mean is share memory, so MachineFrameInfo is not suitable to me. And I need codegen data, so FunctionPass is also not suitable. Anyway, thanks for the suggestion. Antony 2013/8/5 Justin Holewinski <justin.holewinski at gmail.com> > If you're running a MachineFunctionPass, then the code has already been > lowered to mac...
2015 Jul 01
3
[LLVMdev] MIScheduler + AA: Missed scheduling opportunity in MIsNeedChainEdge. Bug?
...DAGInstrs.cpp +++ b/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -475,7 +475,8 @@ static inline bool isGlobalMemoryObject(AliasAnalysis *AA, MachineInstr *MI) { // to deal with (i.e. volatile object). static inline bool isUnsafeMemoryObject(MachineInstr *MI, const MachineFrameInfo *MFI, - const DataLayout &DL) { + const DataLayout &DL, + AliasAnalysis *AA) { if (!MI || MI->memoperands_empty()) return true; // We purposefully do no check f...
2010 Apr 12
1
[LLVMdev] Question. about Machinefunction pass, funtion Prolog/Epilog code, stack frame
...e LLVM, and need some help with this points. 1. how can we add special code for the Prolog/Epilog for some certain functions, this should be done with machinefunction pass, rt? 2. Basically, I want to get the function stack frame, that is the size and the initial position. I found int64_t llvm::MachineFrameInfo::getObjectSize ( int *ObjectIdx* ) const[inline] This method is done before or after the mapping of virtual registers? 3. the program code will be at .text section, suppose we are going to move the code from .text to somewhere else, how can we get the start and the length of the effective code,...
2011 Jul 08
0
[LLVMdev] Best location in code generation for insertion of instrumentation to measure stack depth?
...MachineInstrs (i.e., native code instructions generated from the LLVM IR instructions). The runOnMachineFunction() method is its entry point (i.e., the code generator calls runOnMachineFunction() for each MachineFunctionPass that it runs. > In my experimentation it didn't seem that the MachineFrameInfo was > populated (it consistently said that the stack depth was 0, for > example). I might have been doing something wrong? Is it possible that the function being compiled had a zero-sized stack frame? If it has no spill slots or alloca instructions, and if the function parameters are no...
2011 Jul 08
0
[LLVMdev] Best location in code generation for insertion of instrumentation to measure stack depth?
...difying the code generator directly (MachineFunctionPass'es may even be load-able into llc). Check out the doxygen docs for MachineFunctionPass (http://llvm.org/doxygen/classllvm_1_1MachineFunctionPass.html), MachineFunction (http://llvm.org/doxygen/classllvm_1_1MachineFunction.html), and MachineFrameInfo (http://llvm.org/doxygen/classllvm_1_1MachineFrameInfo.html). -- John T. > > Thank you, > > Andrew > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.ed...
2013 Aug 05
0
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
...5, 2013 at 12:00 PM, Anthony Yu <swpenim at gmail.com> wrote: > Micah, > > Thanks for your help. I will study on that code. > > > Justin, > > Sorry for my misleading word. Local memory in OpenCL is the same as share > memory in CUDA. What I mean is share memory, so MachineFrameInfo is not > suitable to me. > And I need codegen data, so FunctionPass is also not suitable. > Anyway, thanks for the suggestion. > > Antony > > > > 2013/8/5 Justin Holewinski <justin.holewinski at gmail.com> > >> If you're running a MachineFunctionPass, t...
2013 Aug 06
2
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
...nim at gmail.com> wrote: > >> Micah, >> >> Thanks for your help. I will study on that code. >> >> >> Justin, >> >> Sorry for my misleading word. Local memory in OpenCL is the same as share >> memory in CUDA. What I mean is share memory, so MachineFrameInfo is not >> suitable to me. >> And I need codegen data, so FunctionPass is also not suitable. >> Anyway, thanks for the suggestion. >> >> Antony >> >> >> >> 2013/8/5 Justin Holewinski <justin.holewinski at gmail.com> >> >>> If...
2011 Jul 08
2
[LLVMdev] Best location in code generation for insertion of instrumentation to measure stack depth?
Hi list, I am trying to implement the technique outlined in the following paper: http://www.cs.umd.edu/~mwh/papers/martin10ownership.html in LLVM. My approach so far involves the use of an IR level transform (via runOnFunction) to identify memory loads and stores. One thing I need to do (I am pretty sure I need to do it at least) is automatically mark each stack frame as "owned" by the
2019 Jun 26
2
How to handle ISD::STORE when both operands are FrameIndex?
...e add instruction that can do SP+imm. For the sake of simplicity I decided not to bother with stack register yet and instead I just emit FrameIndex as immediate: bool MyBackendDAGToDAGISel::SelectAddrFI(SDValue &N, SDValue &R) { if (N.getOpcode() != ISD::FrameIndex) return false; MachineFrameInfo &MFI = MF->getFrameInfo(); int FX = cast<FrameIndexSDNode>(N)->getIndex(); R = CurDAG->getTargetFrameIndex(FX, MVT::i32); return true; } This way I end up with store %r1, [1] and handle it in my CPU emulator accordingly. So, instead of matching that FrameIndex in store,...
2013 Aug 07
2
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
...; >>>> Thanks for your help. I will study on that code. >>>> >>>> >>>> Justin, >>>> >>>> Sorry for my misleading word. Local memory in OpenCL is the same as >>>> share memory in CUDA. What I mean is share memory, so MachineFrameInfo is >>>> not suitable to me. >>>> And I need codegen data, so FunctionPass is also not suitable. >>>> Anyway, thanks for the suggestion. >>>> >>>> Antony >>>> >>>> >>>> >>>> 2013/8/5 Justin Ho...
2013 Aug 05
0
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
...kely not do what you want. You should only be using the IR as an immutable object for reference. If you want to change the IR, I would suggest using a FunctionPass instead of a MachineFunctionPass. Unless you need codegen data. At the MachineInstr level, to allocate local memory you can use the MachineFrameInfo interface. This provides methods like CreateStackObject to allocate a new stack slot (which will be lowered to local memory in PTX). The return value of these methods is an integer that represents a FrameIndex. You can treat this as a pointer to your allocated object. You will also need to emit...
2013 Aug 06
0
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
...;>> Micah, >>> >>> Thanks for your help. I will study on that code. >>> >>> >>> Justin, >>> >>> Sorry for my misleading word. Local memory in OpenCL is the same as >>> share memory in CUDA. What I mean is share memory, so MachineFrameInfo is >>> not suitable to me. >>> And I need codegen data, so FunctionPass is also not suitable. >>> Anyway, thanks for the suggestion. >>> >>> Antony >>> >>> >>> >>> 2013/8/5 Justin Holewinski <justin.holewinski at gm...