[llvm-commits] Change indirect-globals to use a dedicated allocIndirectGV (issue157145)

Evan Cheng evan.cheng at apple.com
Mon Dec 7 14:23:52 PST 2009


Sorry, completely missed it.

+  // Size == alignment on ARM.
+  void *PtrAddr = JCE.allocIndirectGV(
+      GV, Buffer, sizeof(Buffer), sizeof(Buffer));
The comment is somewhat misleading. The alignment and size of the buffer happen to be both 4 in this case. Your code makes it seem like they have to be the same.

Apart from that, it seems fine. Eric, could you test it on x86 and x86_64 Darwin?

Thanks,

Evan

On Dec 7, 2009, at 1:34 PM, Jeffrey Yasskin wrote:

> Hi Evan, any word on this?
> 
> On Tue, Nov 24, 2009 at 11:28 AM,  <jyasskin at gmail.com> wrote:
>> Reviewers: evan.cheng_apple.com,
>> 
>> Message:
>> Hi Evan, could you take a look?
>> http://codereview.appspot.com/download/issue157145_7.diff
>> I think this is an ok change for arm (and it passes tests on nlewycky's
>> box) because even though the indirect global is generated as part of a
>> call stub, it's not actually executed.
>> 
>> Description:
>> This lets us remove start/finishGVStub and the BufferState helper class
>> from the MachineCodeEmitter interface.  It has the side-effect of not
>> setting the indirect global writable and then executable on ARM, but
>> that shouldn't be necessary.
>> 
>> Please review this at http://codereview.appspot.com/157145
>> 
>> Affected files:
>>   M     include/llvm/CodeGen/JITCodeEmitter.h
>>   M     include/llvm/CodeGen/MachineCodeEmitter.h
>>   M     lib/ExecutionEngine/JIT/JITEmitter.cpp
>>   M     lib/Target/ARM/ARMJITInfo.cpp
>>   M     lib/Target/Alpha/AlphaJITInfo.cpp
>>   M     lib/Target/PowerPC/PPCJITInfo.cpp
>>   M     lib/Target/X86/X86JITInfo.cpp
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091207/b03b7639/attachment.html>


More information about the llvm-commits mailing list