Re: Compiler support for multicore architectures

Jatin Bhateja <jatin.bhateja@gmail.com>
Fri, 21 Nov 2008 13:00:52 -0800 (PST)

          From comp.compilers

Related articles
Compiler support for multicore architectures gauravgautam123@gmail.com (gaurav) (2008-11-18)
Re: Compiler support for multicore architectures kamalpr@hp.com (kamal) (2008-11-18)
Re: Compiler support for multicore architectures ian@airs.com (Ian Lance Taylor) (2008-11-18)
Re: Compiler support for multicore architectures m.helvensteijn@gmail.com (2008-11-19)
Re: Compiler support for multicore architectures walter@bytecraft.com (Walter Banks) (2008-11-19)
Re: Compiler support for multicore architectures toby@telegraphics.com.au (toby) (2008-11-20)
Re: Compiler support for multicore architectures jatin.bhateja@gmail.com (Jatin Bhateja) (2008-11-21)
Re: Compiler support for multicore architectures kamalpr@hp.com (kamal) (2008-11-23)
Re: Compiler support for multicore architectures idbaxter@semdesigns.com (Ira Baxter) (2008-11-28)
Re: Compiler support for multicore architectures bear@sonic.net (Ray Dillinger) (2008-11-28)
Re: Compiler support for multicore architectures scooter.phd@gmail.com (scooter.phd@gmail.com) (2008-11-30)
| List of all articles for this month |
From: Jatin Bhateja <jatin.bhateja@gmail.com>
Newsgroups: comp.compilers
Date: Fri, 21 Nov 2008 13:00:52 -0800 (PST)
Organization: Compilers Central
References: 08-11-086
Keywords: architecture, parallel
Posted-Date: 21 Nov 2008 19:39:57 EST

On Nov 19, 2:27 am, gaurav <gauravgautam...@gmail.com> wrote:
> There has been a lot of discussions going on about compiler support
> for multicore architectures.
>
> I have a few basic questions.
>
> What different things can a compiler do to make mutithreaded programs
> run better on multicore? Isnt it much depends on the threading
> library , OS and the programmar instead on compiler ?


Guys,


I think there are some specific optimization which compiler can do to
fully exploit multicore processors like instruction grouping (VLIW),
software pipelining etc..


If the programme is multithreaded then onus is on OS and the
architecture, certain architectures like Intel's HT (hyper threaded )
provide a shadow register set (duplicating the register set) which
can reduce the thread switching time.


Though there is no direct compiler optimization which I can think of
for multithreaded programs, but one thing which compiler can do by
Inter procedural analysis and procedure body analysis is that it can
find which all procedures can be executed in parallel and can
internally
make the calls to threaded calls.


e.g.


void fun(int i,int j)
{


      int a = work1(i,j);
      int b = work2(i,j);


        return a + b;
}


After procedure body analysis if it is found that work1 and work2 are
re-entrant or pure calls then compiler can make the calls to work1 and
work2 to be threaded i.e. it can introduce additional thread calling
APIs in the intermediate code.


This can actually be called as auto-multithreading.


- Jatin Bhateja
Mentor Graphics Corporation


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.