Displaying 13 results from an estimated 13 matches for "getstackgrowthdirection".
2013 Sep 25
2
[LLVMdev] Register scavenger and SP/FP adjustments
...&
          "TM::getRegisterInfo() must be implemented!");
   const TargetInstrInfo &TII = *Fn.getTarget().getInstrInfo();
   const TargetRegisterInfo &TRI = *TM.getRegisterInfo();
   const TargetFrameLowering *TFI = TM.getFrameLowering();
   bool StackGrowsDown =
     TFI->getStackGrowthDirection() ==
                 TargetFrameLowering::StackGrowsDown;
   int FrameSetupOpcode   = TII.getCallFrameSetupOpcode();
   int FrameDestroyOpcode = TII.getCallFrameDestroyOpcode();
   if (RS && !FrameIndexVirtualScavenging) RS->enterBasicBlock(BB);
   for (MachineBasicBlock::iterator I =...
2013 Sep 26
0
[LLVMdev] Register scavenger and SP/FP adjustments
..."TM::getRegisterInfo() must be implemented!");
>  const TargetInstrInfo &TII = *Fn.getTarget().getInstrInfo();
>  const TargetRegisterInfo &TRI = *TM.getRegisterInfo();
>  const TargetFrameLowering *TFI = TM.getFrameLowering();
>  bool StackGrowsDown =
>    TFI->getStackGrowthDirection() ==
>                TargetFrameLowering::StackGrowsDown;
>  int FrameSetupOpcode   = TII.getCallFrameSetupOpcode();
>  int FrameDestroyOpcode = TII.getCallFrameDestroyOpcode();
> 
>  if (RS && !FrameIndexVirtualScavenging) RS->enterBasicBlock(BB);
> 
>  for (Machin...
2013 Oct 12
3
[LLVMdev] [RFC] CodeGen Context
...de won't be able to cache any of the objects the CGContext
creates (this has already been addressed).
The CGContext can be reached through the MachineFunction object:
 CGContext &context = MF->getContext();
 const TargetFrameLowering *TFL = context->getFrameLowering();
 if (TFL->getStackGrowthDirection() == TargetFrameLowering::StackGrowsUp) {
   // ...
 }
Currently, the best place to process the function attributes is towards the
beginning of the `SelectionDAGISel::runOnMachineFunction()' method. This has one
side-effect --- the CGContext may not be available to IR passes which use
it. This...
2013 Sep 26
2
[LLVMdev] Register scavenger and SP/FP adjustments
...erInfo() must be implemented!");
>>  const TargetInstrInfo &TII = *Fn.getTarget().getInstrInfo();
>>  const TargetRegisterInfo &TRI = *TM.getRegisterInfo();
>>  const TargetFrameLowering *TFI = TM.getFrameLowering();
>>  bool StackGrowsDown =
>>    TFI->getStackGrowthDirection() ==
>>                TargetFrameLowering::StackGrowsDown;
>>  int FrameSetupOpcode   = TII.getCallFrameSetupOpcode();
>>  int FrameDestroyOpcode = TII.getCallFrameDestroyOpcode();
>>
>>  if (RS && !FrameIndexVirtualScavenging) RS->enterBasicBlock(BB);
>...
2013 Sep 26
0
[LLVMdev] Register scavenger and SP/FP adjustments
...e implemented!");
>>> const TargetInstrInfo &TII = *Fn.getTarget().getInstrInfo();
>>> const TargetRegisterInfo &TRI = *TM.getRegisterInfo();
>>> const TargetFrameLowering *TFI = TM.getFrameLowering();
>>> bool StackGrowsDown =
>>>   TFI->getStackGrowthDirection() ==
>>>               TargetFrameLowering::StackGrowsDown;
>>> int FrameSetupOpcode   = TII.getCallFrameSetupOpcode();
>>> int FrameDestroyOpcode = TII.getCallFrameDestroyOpcode();
>>> 
>>> if (RS && !FrameIndexVirtualScavenging) RS->enterBas...
2013 Sep 26
1
[LLVMdev] Register scavenger and SP/FP adjustments
...);
>>>> const TargetInstrInfo &TII = *Fn.getTarget().getInstrInfo();
>>>> const TargetRegisterInfo &TRI = *TM.getRegisterInfo();
>>>> const TargetFrameLowering *TFI = TM.getFrameLowering();
>>>> bool StackGrowsDown =
>>>>   TFI->getStackGrowthDirection() ==
>>>>               TargetFrameLowering::StackGrowsDown;
>>>> int FrameSetupOpcode   = TII.getCallFrameSetupOpcode();
>>>> int FrameDestroyOpcode = TII.getCallFrameDestroyOpcode();
>>>>
>>>> if (RS && !FrameIndexVirtualScavengi...
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...;    };
>  }
>
> +void DwarfJITEmitter::EmitFrameMoves(intptr_t BaseLabelPtr,
> +                                     const  
> std::vector<MachineMove> &Moves) {
> +  unsigned PointerSize = TD.getPointerSize();
> +  int stackGrowth =
> +      TM.getFrameInfo()->getStackGrowthDirection() ==
> +        TargetFrameInfo::StackGrowsUp ?
> +          PointerSize : -PointerSize;
> +  // TODO bool IsLocal = BaseLabel && strcmp(BaseLabel, "label")  
> == 0;
> +  bool IsLocal = BaseLabelPtr;
> +
> +  for (unsigned i = 0, N = Moves.size(); i < N; +...
2007 Dec 10
2
[LLVMdev] Exception handling in JIT
Hi everyone,
Here's a patch that enables exception handling when jitting. I've
copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may need
to factorize it, but the functionality is there and I'm very happy with
it :)
lli should now be able to execute the output from llvm-gcc when using
exceptions (the UnwindInst instruction is not involved in this patch).
Just add the
2013 Oct 13
0
[LLVMdev] [RFC] CodeGen Context
...the objects the CGContext
> creates (this has already been addressed).
> 
> The CGContext can be reached through the MachineFunction object:
> 
> CGContext &context = MF->getContext();
> const TargetFrameLowering *TFL = context->getFrameLowering();
> 
> if (TFL->getStackGrowthDirection() == TargetFrameLowering::StackGrowsUp) {
>   // ...
> }
> 
> Currently, the best place to process the function attributes is towards the
> beginning of the `SelectionDAGISel::runOnMachineFunction()' method. This has one
> side-effect --- the CGContext may not be available to...
2008 Apr 17
1
[LLVMdev] Being able to know the jitted code-size before emitting
Thx again Evan for the review. Here's a new patch for the JIT in itself. 
The major changes are:
1) A JITMemoryManager now has a flag saying "I require to know the size 
of what you want to emit"
2) DwarfJITEmitter is augmented with GetSize* functions
3) JITEmitter::startFunction checks if the JITMemoryManager requires to 
know the size. If so, it computes it and gives it through the
2007 Dec 12
3
[LLVMdev] Exception handling in JIT
...;> +void DwarfJITEmitter::EmitFrameMoves(intptr_t BaseLabelPtr,
>> +                                     const  
>> std::vector<MachineMove> &Moves) {
>> +  unsigned PointerSize = TD.getPointerSize();
>> +  int stackGrowth =
>> +      TM.getFrameInfo()->getStackGrowthDirection() ==
>> +        TargetFrameInfo::StackGrowsUp ?
>> +          PointerSize : -PointerSize;
>> +  // TODO bool IsLocal = BaseLabel && strcmp(BaseLabel, "label")  
>> == 0;
>> +  bool IsLocal = BaseLabelPtr;
>> +
>> +  for (unsigned i = 0, N...
2008 Feb 04
0
[LLVMdev] Exception handling in JIT
...unsigned char*  
> EndFunction) {
> +  const TargetMachine& TM = F.getTarget();
> +  TD = TM.getTargetData();
> +  needsIndirectEncoding = TM.getTargetAsmInfo()- 
> >getNeedsIndirectEncoding();
> +  stackGrowthDirection = TM.getFrameInfo()- 
> >getStackGrowthDirection();
> +  RI = TM.getRegisterInfo();
> +  MCE = &mce;
> +
> +  unsigned char* ExceptionTable = EmitExceptionTable(&F,  
> StartFunction,
> +                                                     EndFunction);
> +
> +  unsigned char* Result = 0;
> +  unsigned char* EHF...
2008 Feb 01
2
[LLVMdev] Exception handling in JIT
Dear all,
Here's a new patch with Evan's comments (thx Evan!) and some cleanups.
Now the (duplicated) exception handling code is in a new file:
lib/ExecutionEngine/JIT/JITDwarfEmitter.
This patch should work on linux/x86 and linux/ppc (tested).
Nicolas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: jit-exceptions.patch
URL: