Eli Bendersky
2012-Dec-06 22:45 UTC
[LLVMdev] Proposal: Adding aligned instruction bundle support to MC
> How will these bundles interact with ARM codegen? The constant island pass in particular. >Hi Jim, This is a great question.>From the compiler's point of view, these bundles indeed pose a problemfor the constant island pass. At this point for the NaCl platform we disable this pass, generating instructions like movt instead (NaCl requires at least v7 for ARM). However, as a future enhancement we'd like to follow gcc's path and adjust the pass to coexist with potential bundling by computing worst-case estimates for the sizes of bundle-locked instruction sequences.>From the assembler's point of view, assembly code that refers to datausing labels should generate errors in the event that these labels become too too far to reach, similarly to the current situation in gas. Eli
Jim Grosbach
2012-Dec-07 17:41 UTC
[LLVMdev] Proposal: Adding aligned instruction bundle support to MC
On Dec 6, 2012, at 2:45 PM, Eli Bendersky <eliben at google.com> wrote:>> How will these bundles interact with ARM codegen? The constant island pass in particular. >> > > Hi Jim, > > This is a great question. > From the compiler's point of view, these bundles indeed pose a problem > for the constant island pass. At this point for the NaCl platform we > disable this pass, generating instructions like movt instead (NaCl > requires at least v7 for ARM). However, as a future enhancement we'd > like to follow gcc's path and adjust the pass to coexist with > potential bundling by computing worst-case estimates for the sizes of > bundle-locked instruction sequences.That's going to be challenging. Not impossible, and you can probably leverage the existing basic-block alignment code, but very tricky. I'm curious. Have you done any code size comparisons using movw/movt instead of constant pools? What was the impact? -Jim> > From the assembler's point of view, assembly code that refers to data > using labels should generate errors in the event that these labels > become too too far to reach, similarly to the current situation in > gas. > > Eli
Eli Bendersky
2012-Dec-07 19:12 UTC
[LLVMdev] Proposal: Adding aligned instruction bundle support to MC
>> >> This is a great question. >> From the compiler's point of view, these bundles indeed pose a problem >> for the constant island pass. At this point for the NaCl platform we >> disable this pass, generating instructions like movt instead (NaCl >> requires at least v7 for ARM). However, as a future enhancement we'd >> like to follow gcc's path and adjust the pass to coexist with >> potential bundling by computing worst-case estimates for the sizes of >> bundle-locked instruction sequences. > > That's going to be challenging. Not impossible, and you can probably leverage the existing basic-block alignment code, but very tricky. > > I'm curious. Have you done any code size comparisons using movw/movt instead of constant pools? What was the impact?Even if we did, it was probably a while ago and they have to be done again. We'll look into it when upstreaming the relevant parts. Eli
Reasonably Related Threads
- [LLVMdev] Proposal: Adding aligned instruction bundle support to MC
- [LLVMdev] Proposal: Adding aligned instruction bundle support to MC
- [LLVMdev] Proposal: Adding aligned instruction bundle support to MC
- [LLVMdev] Proposal: Adding aligned instruction bundle support to MC
- [LLVMdev] Proposal: Adding aligned instruction bundle support to MC