Out of tree targets

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Out of tree targets

Neil Henning
Hey all,

Quick query on out of tree target support - at present I can drop a folder Foo into <llvm>/lib/Target/Foo and use the CMake option LLVM_EXPERIMENTAL_TARGETS_TO_BUILD to pick up my target. The issue is that I still need to patch the one LLVMBuild.txt file in <llvm>/lib/Target with;

iff --git a/lib/Target/LLVMBuild.txt b/lib/Target/LLVMBuild.txt
index 4112046..6e42cbe 100644
--- a/lib/Target/LLVMBuild.txt
+++ b/lib/Target/LLVMBuild.txt
@@ -16,7 +16,7 @@
 ;===------------------------------------------------------------------------===;

 [common]
-subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips PowerPC R600 Sparc SystemZ X86 XCore
+subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips PowerPC R600 Sparc SystemZ X86 XCore Foo

 ; This is a special group whose required libraries are extended (by llvm-build)
 ; with the best execution engine (the native JIT, if available, or the
To include my target in the LLVM build, and this allows me to specify -march=foo and it will call into my code correctly.

Am I missing something - or is this patch definitely required?

If the patch is required - does anyone have any suggestions/ideas how I could add support to either LLVMBuild or the specific LLVMBuild.txt file so that it would pick up my new Target?

I understand that my patch is tiny and relatively easy to maintain (it will basically always merge well) - but it still irks me having to keep a patch where it probably isn't required!

Cheers,
-Neil.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Out of tree targets

Eric Christopher
Hi Neil,

Weird, I'd think the cmake build should probably do something similar to the autoconf build if possible and just have subdirectories equal to the targets to build. I'm not sure if this is possible etc... could try some setting etc.

-eric

On Mon, Mar 9, 2015 at 9:11 AM Neil Henning <[hidden email]> wrote:
Hey all,

Quick query on out of tree target support - at present I can drop a folder Foo into <llvm>/lib/Target/Foo and use the CMake option LLVM_EXPERIMENTAL_TARGETS_TO_BUILD to pick up my target. The issue is that I still need to patch the one LLVMBuild.txt file in <llvm>/lib/Target with;

iff --git a/lib/Target/LLVMBuild.txt b/lib/Target/LLVMBuild.txt
index 4112046..6e42cbe 100644
--- a/lib/Target/LLVMBuild.txt
+++ b/lib/Target/LLVMBuild.txt
@@ -16,7 +16,7 @@
 ;===------------------------------------------------------------------------===;

 [common]
-subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips PowerPC R600 Sparc SystemZ X86 XCore
+subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips PowerPC R600 Sparc SystemZ X86 XCore Foo

 ; This is a special group whose required libraries are extended (by llvm-build)
 ; with the best execution engine (the native JIT, if available, or the
To include my target in the LLVM build, and this allows me to specify -march=foo and it will call into my code correctly.

Am I missing something - or is this patch definitely required?

If the patch is required - does anyone have any suggestions/ideas how I could add support to either LLVMBuild or the specific LLVMBuild.txt file so that it would pick up my new Target?

I understand that my patch is tiny and relatively easy to maintain (it will basically always merge well) - but it still irks me having to keep a patch where it probably isn't required!

Cheers,
-Neil.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Out of tree targets

Anton Korobeynikov-2
I believe we'd need LLVMBuild.txt even in autoconf build - for bunch
of autogenerated stuff, e.g. list of all asmprinters / asmparsers /
InitializeAllTargetInfos, etc., since targets are not autoregistered
anymore.

On Mon, Mar 9, 2015 at 7:20 PM, Eric Christopher <[hidden email]> wrote:

> Hi Neil,
>
> Weird, I'd think the cmake build should probably do something similar to the
> autoconf build if possible and just have subdirectories equal to the targets
> to build. I'm not sure if this is possible etc... could try some setting
> etc.
>
> -eric
>
> On Mon, Mar 9, 2015 at 9:11 AM Neil Henning <[hidden email]> wrote:
>>
>> Hey all,
>>
>> Quick query on out of tree target support - at present I can drop a folder
>> Foo into <llvm>/lib/Target/Foo and use the CMake option
>> LLVM_EXPERIMENTAL_TARGETS_TO_BUILD to pick up my target. The issue is that I
>> still need to patch the one LLVMBuild.txt file in <llvm>/lib/Target with;
>>
>> iff --git a/lib/Target/LLVMBuild.txt b/lib/Target/LLVMBuild.txt
>> index 4112046..6e42cbe 100644
>> --- a/lib/Target/LLVMBuild.txt
>> +++ b/lib/Target/LLVMBuild.txt
>> @@ -16,7 +16,7 @@
>>
>> ;===------------------------------------------------------------------------===;
>>
>>  [common]
>> -subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips
>> PowerPC R600 Sparc SystemZ X86 XCore
>> +subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips
>> PowerPC R600 Sparc SystemZ X86 XCore Foo
>>
>>  ; This is a special group whose required libraries are extended (by
>> llvm-build)
>>  ; with the best execution engine (the native JIT, if available, or the
>>
>> To include my target in the LLVM build, and this allows me to specify
>> -march=foo and it will call into my code correctly.
>>
>> Am I missing something - or is this patch definitely required?
>>
>> If the patch is required - does anyone have any suggestions/ideas how I
>> could add support to either LLVMBuild or the specific LLVMBuild.txt file so
>> that it would pick up my new Target?
>>
>> I understand that my patch is tiny and relatively easy to maintain (it
>> will basically always merge well) - but it still irks me having to keep a
>> patch where it probably isn't required!
>>
>> Cheers,
>> -Neil.
>> _______________________________________________
>> LLVM Developers mailing list
>> [hidden email]         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Out of tree targets

Eric Christopher
Mmm.. true. Explicit dependencies are both nice and annoying. We'd need to mention it somewhere basically.

-eric

On Mon, Mar 9, 2015 at 10:19 AM Anton Korobeynikov <[hidden email]> wrote:
I believe we'd need LLVMBuild.txt even in autoconf build - for bunch
of autogenerated stuff, e.g. list of all asmprinters / asmparsers /
InitializeAllTargetInfos, etc., since targets are not autoregistered
anymore.

On Mon, Mar 9, 2015 at 7:20 PM, Eric Christopher <[hidden email]> wrote:
> Hi Neil,
>
> Weird, I'd think the cmake build should probably do something similar to the
> autoconf build if possible and just have subdirectories equal to the targets
> to build. I'm not sure if this is possible etc... could try some setting
> etc.
>
> -eric
>
> On Mon, Mar 9, 2015 at 9:11 AM Neil Henning <[hidden email]> wrote:
>>
>> Hey all,
>>
>> Quick query on out of tree target support - at present I can drop a folder
>> Foo into <llvm>/lib/Target/Foo and use the CMake option
>> LLVM_EXPERIMENTAL_TARGETS_TO_BUILD to pick up my target. The issue is that I
>> still need to patch the one LLVMBuild.txt file in <llvm>/lib/Target with;
>>
>> iff --git a/lib/Target/LLVMBuild.txt b/lib/Target/LLVMBuild.txt
>> index 4112046..6e42cbe 100644
>> --- a/lib/Target/LLVMBuild.txt
>> +++ b/lib/Target/LLVMBuild.txt
>> @@ -16,7 +16,7 @@
>>
>> ;===------------------------------------------------------------------------===;
>>
>>  [common]
>> -subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips
>> PowerPC R600 Sparc SystemZ X86 XCore
>> +subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips
>> PowerPC R600 Sparc SystemZ X86 XCore Foo
>>
>>  ; This is a special group whose required libraries are extended (by
>> llvm-build)
>>  ; with the best execution engine (the native JIT, if available, or the
>>
>> To include my target in the LLVM build, and this allows me to specify
>> -march=foo and it will call into my code correctly.
>>
>> Am I missing something - or is this patch definitely required?
>>
>> If the patch is required - does anyone have any suggestions/ideas how I
>> could add support to either LLVMBuild or the specific LLVMBuild.txt file so
>> that it would pick up my new Target?
>>
>> I understand that my patch is tiny and relatively easy to maintain (it
>> will basically always merge well) - but it still irks me having to keep a
>> patch where it probably isn't required!
>>
>> Cheers,
>> -Neil.
>> _______________________________________________
>> LLVM Developers mailing list
>> [hidden email]         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Out of tree targets

Neil Henning
So would anyone object to me trying to find a resolution for this? The easiest way would be that explicit subdirectories in the LLVMBuild.txt are always picked up, but we could have a way to scan the folders in lib/Target, and any folder can be added if it was declared in the experimental build option (or something to that effect).

-Neil.

On 09/03/15 17:22, Eric Christopher wrote:
Mmm.. true. Explicit dependencies are both nice and annoying. We'd need to mention it somewhere basically.

-eric

On Mon, Mar 9, 2015 at 10:19 AM Anton Korobeynikov <[hidden email]> wrote:
I believe we'd need LLVMBuild.txt even in autoconf build - for bunch
of autogenerated stuff, e.g. list of all asmprinters / asmparsers /
InitializeAllTargetInfos, etc., since targets are not autoregistered
anymore.

On Mon, Mar 9, 2015 at 7:20 PM, Eric Christopher <[hidden email]> wrote:
> Hi Neil,
>
> Weird, I'd think the cmake build should probably do something similar to the
> autoconf build if possible and just have subdirectories equal to the targets
> to build. I'm not sure if this is possible etc... could try some setting
> etc.
>
> -eric
>
> On Mon, Mar 9, 2015 at 9:11 AM Neil Henning <[hidden email]> wrote:
>>
>> Hey all,
>>
>> Quick query on out of tree target support - at present I can drop a folder
>> Foo into <llvm>/lib/Target/Foo and use the CMake option
>> LLVM_EXPERIMENTAL_TARGETS_TO_BUILD to pick up my target. The issue is that I
>> still need to patch the one LLVMBuild.txt file in <llvm>/lib/Target with;
>>
>> iff --git a/lib/Target/LLVMBuild.txt b/lib/Target/LLVMBuild.txt
>> index 4112046..6e42cbe 100644
>> --- a/lib/Target/LLVMBuild.txt
>> +++ b/lib/Target/LLVMBuild.txt
>> @@ -16,7 +16,7 @@
>>
>> ;===------------------------------------------------------------------------===;
>>
>>  [common]
>> -subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips
>> PowerPC R600 Sparc SystemZ X86 XCore
>> +subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips
>> PowerPC R600 Sparc SystemZ X86 XCore Foo
>>
>>  ; This is a special group whose required libraries are extended (by
>> llvm-build)
>>  ; with the best execution engine (the native JIT, if available, or the
>>
>> To include my target in the LLVM build, and this allows me to specify
>> -march=foo and it will call into my code correctly.
>>
>> Am I missing something - or is this patch definitely required?
>>
>> If the patch is required - does anyone have any suggestions/ideas how I
>> could add support to either LLVMBuild or the specific LLVMBuild.txt file so
>> that it would pick up my new Target?
>>
>> I understand that my patch is tiny and relatively easy to maintain (it
>> will basically always merge well) - but it still irks me having to keep a
>> patch where it probably isn't required!
>>
>> Cheers,
>> -Neil.
>> _______________________________________________
>> LLVM Developers mailing list
>> [hidden email]         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Out of tree targets

Eric Christopher
No particular objection, guess we'll see what it looks like when you're done. :)

-eric

On Mon, Mar 9, 2015 at 12:57 PM Neil Henning <[hidden email]> wrote:
So would anyone object to me trying to find a resolution for this? The easiest way would be that explicit subdirectories in the LLVMBuild.txt are always picked up, but we could have a way to scan the folders in lib/Target, and any folder can be added if it was declared in the experimental build option (or something to that effect).


-Neil.


On 09/03/15 17:22, Eric Christopher wrote:
Mmm.. true. Explicit dependencies are both nice and annoying. We'd need to mention it somewhere basically.

-eric

On Mon, Mar 9, 2015 at 10:19 AM Anton Korobeynikov <[hidden email]> wrote:
I believe we'd need LLVMBuild.txt even in autoconf build - for bunch
of autogenerated stuff, e.g. list of all asmprinters / asmparsers /
InitializeAllTargetInfos, etc., since targets are not autoregistered
anymore.

On Mon, Mar 9, 2015 at 7:20 PM, Eric Christopher <[hidden email]> wrote:
> Hi Neil,
>
> Weird, I'd think the cmake build should probably do something similar to the
> autoconf build if possible and just have subdirectories equal to the targets
> to build. I'm not sure if this is possible etc... could try some setting
> etc.
>
> -eric
>
> On Mon, Mar 9, 2015 at 9:11 AM Neil Henning <[hidden email]> wrote:
>>
>> Hey all,
>>
>> Quick query on out of tree target support - at present I can drop a folder
>> Foo into <llvm>/lib/Target/Foo and use the CMake option
>> LLVM_EXPERIMENTAL_TARGETS_TO_BUILD to pick up my target. The issue is that I
>> still need to patch the one LLVMBuild.txt file in <llvm>/lib/Target with;
>>
>> iff --git a/lib/Target/LLVMBuild.txt b/lib/Target/LLVMBuild.txt
>> index 4112046..6e42cbe 100644
>> --- a/lib/Target/LLVMBuild.txt
>> +++ b/lib/Target/LLVMBuild.txt
>> @@ -16,7 +16,7 @@
>>
>> ;===------------------------------------------------------------------------===;
>>
>>  [common]
>> -subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips
>> PowerPC R600 Sparc SystemZ X86 XCore
>> +subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips
>> PowerPC R600 Sparc SystemZ X86 XCore Foo
>>
>>  ; This is a special group whose required libraries are extended (by
>> llvm-build)
>>  ; with the best execution engine (the native JIT, if available, or the
>>
>> To include my target in the LLVM build, and this allows me to specify
>> -march=foo and it will call into my code correctly.
>>
>> Am I missing something - or is this patch definitely required?
>>
>> If the patch is required - does anyone have any suggestions/ideas how I
>> could add support to either LLVMBuild or the specific LLVMBuild.txt file so
>> that it would pick up my new Target?
>>
>> I understand that my patch is tiny and relatively easy to maintain (it
>> will basically always merge well) - but it still irks me having to keep a
>> patch where it probably isn't required!
>>
>> Cheers,
>> -Neil.
>> _______________________________________________
>> LLVM Developers mailing list
>> [hidden email]         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev