[llvm-commits] [PATCH] LTO code generator options

Viktor Kutuzov vkutuzov at accesssoftek.com
Thu Nov 12 19:08:57 PST 2009


Thanks, Rafael.

I have split this patch to a set of smaller ones. Hope this will make it easier to review.
Please find attached 2 patches:

* one adds to the Triple class
   - a new getAssemblerArchName method, and
   - assignment operators for the std::string and StringRef types;

* the other one adds to the SubtargetFeature class
   - a new getDefaultSubTargetTripleFeatures method (code moved from the LTOModule class),
   - AddFeatures methods, and
   - hasFeature method.

I'll send the patch that use these changes after these 2 patches will be submitted.

Viktor.

________________________________________
From: Rafael Espindola [espindola at google.com]
Sent: Thursday, November 12, 2009 10:59 AM
To: Viktor Kutuzov
Cc: Commit Messages and Patches for LLVM
Subject: Re: [llvm-commits] [PATCH] LTO code generator options

> The updated patch is attached.
>
> * StringRef is passed by value;
> * Removed getArchNameForLLVMArchType;
> * Fixed strange alignment.
> * Removed all cosmetic changes from this patch.
>
> Is it Ok to submit?

Sorry about the delay. I am not very familiar with this code.

About Triple::getArchNameForDarwinArchTriplePart. Its output is passed
to the assembler, so the comment "gcc?" should probably be replaced
with "architecture name used by the assembler" or something like that.

Can you make it non static? So instead of

Triple::getArchNameForDarwinArchTriplePart(_targetTriple.getArchName()

we would have

_targetTriple.getArchNameForDarwinArchTriplePart()

If you move the check for "is darwin" into that method you could also
rename it into something like getAssemblerArchName. The code that uses
it would look like

const char *arch = _targetTriple.getAssemblerArchName();
if (arch != NULL) {
...
}

Just have the method return NULL  if it is not darwin.

Finally,  this part is an (very nice) independent cleanup, no? Would
you mind putting it in an independent patch?

> Cheers,
>Viktor

Thanks,
--
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-target-override-01_triple.diff
Type: application/octet-stream
Size: 2537 bytes
Desc: llvm-target-override-01_triple.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091112/c303d99c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-target-override-02_subtargetfeature.diff
Type: application/octet-stream
Size: 4519 bytes
Desc: llvm-target-override-02_subtargetfeature.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091112/c303d99c/attachment-0001.obj>


More information about the llvm-commits mailing list