review request Bug 16545 - COPY_STRUCT_BYVAL_I32 pseudo code generates unrecognized code

林作健 manjian2006 at gmail.com
Mon Oct 14 18:28:41 PDT 2013


I didn't add THUMB1 lines for function h simple armv5te doesn't support
vldr instr.
And here is the patch for formatting.


2013/10/15 Manman Ren <manman.ren at gmail.com>

> Hi,
>
> The changes to ARMISelLowering.cpp look good to me.
>
> --- lib/Target/ARM/ARMConstantIslandPass.cpp (版本 187190)
> +++ lib/Target/ARM/ARMConstantIslandPass.cpp (工作副本)
> @@ -634,6 +634,7 @@
>  initializeFunctionInfo(const std::vector<MachineInstr*> &CPEMIs) {
>    BBInfo.clear();
>    BBInfo.resize(MF->getNumBlockIDs());
> +  const ARMSubtarget * Subtarget =
> &MF->getTarget().getSubtarget<ARMSubtarget>();
>
>    // First thing, compute the size of all basic blocks, and see if the
> function
>    // has any inline assembly in it. If so, we have to be conservative
> about
> @@ -757,7 +758,12 @@
>            case ARM::LDRi12:
>            case ARM::LDRcp:
>            case ARM::t2LDRpci:
> -            Bits = 12;  // +-offset_12
> +            if(Subtarget->hasV7Ops())
> +            {
> +              Bits = 12;  // +-offset_12
> +            } else {
> +              Bits = 8;  // +-offset_8
> +            }
>
> Please simplify above by removing the parenthesis, or using "? 12 : 8".
> I am not really familiar with the const island pass, so I cc'ed Bob for
> him to review it.
>
> The testing case looks good in general, is there any reason you didn't add
> THUMB1 lines for function h()?
>
> Thanks,
> Manman
>
>
>
> On Sun, Oct 13, 2013 at 4:48 AM, 林作健 <manjian2006 at gmail.com> wrote:
>
>>
>>
>> _______________________________________________
>> 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/20131015/98eec187/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 10496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131015/98eec187/attachment.obj>


More information about the llvm-commits mailing list