Skip to contentSkip to conversation

Automatically optimizing hand coded assembler

DISCUSSION Keith Owens 3 participants 3 messages Mar 18, 2005

lore
Share & tools
lore
#0 lore raw

The code in ia64_syscall_setup has several independent steps to execute. Interleaving the instructions from each step by hand to avoid empty slots is painful, not to mention error prone. Are there any tools available for this task?

I envisage a tool where the user defines the instructions required for each step separately, including the stop bits needed for ordering within the individual step. The resources used by each step must be disjoint. The user also defines sync points, where steps must start, end or join with other steps. The tool draws the DAG from the sync points then runs down the DAG, picking instructions from each step to best fill the slots. The output is all the instructions, nicely interleaved to give the minimum number of bundles.

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Keith Owens

Keith> The code in ia64_syscall_setup has several independent steps Keith> to execute. Interleaving the instructions from each step by Keith> hand to avoid empty slots is painful, not to mention error Keith> prone. Are there any tools available for this task?

Keith> I envisage a tool where the user defines the instructions Keith> required for each step separately, including the stop bits Keith> needed for ordering within the individual step. The Keith> resources used by each step must be disjoint. The user also Keith> defines sync points, where steps must start, end or join with Keith> other steps. The tool draws the DAG from the sync points Keith> then runs down the DAG, picking instructions from each step Keith> to best fill the slots. The output is all the instructions, Keith> nicely interleaved to give the minimum number of bundles.

I suggested a project along these lines to a few students a while ago but unfortunately nothing came out of it. IIRC, Intel at one point had a "visual assembler" which was doing something similar, but it was Windows only and I don't know what became of it.

	--david
#2 lore raw
In reply to Keith Owens
Quoted 5 lines · David Mosberger

I suggested a project along these lines to a few students a while ago but unfortunately nothing came out of it. IIRC, Intel at one point had a "visual assembler" which was doing something similar, but it was Windows only and I don't know what became of it.

I've suggested this as a student thesis topic as well, but no-one has taken it up :(

http://www.cse.unsw.edu.au/db/thesis/topicinfo/GH115.html

One of these days I'll probably get frustrated enough with hand-optimising assembly code to give it a go.

Matt