edited by
778 views
0 votes
0 votes
i=1,

j=1;

For this code how many different basic blocks are there?

Do we have to add begin and exit as two separate blocks?

In some test series for above two lines

i=1 is taken as one block and j=1 is taken as another block,whereas I have taken it as two blocks

This is not the full question of the actual test series I have just focussed on the part which I have a doubt on

Edit 1 based on comment of the question

pseudo code is this

for i=1 to 10

  for j=1 to 10

    a[i,j]=10

end

end

for i=1 to 10

    some operation

end

I think this question is there in Compiler Design by Venkatesh under Code Optimization but isn’t code optimization not part of the syllabus this year?
edited by

Please log in or register to answer this question.

Related questions

436
views
0 answers
2 votes
nilamd asked Dec 24, 2015
436 views
For a length of string n,how many transactions will be there for acceptance of the string?O(n)O(n^2)O(nlogn)O(n^3)
1.5k
views
1 answers
1 votes
ajit asked Sep 17, 2015
1,540 views
In a 64 bit machine,with 2GB RAM and 8KB page size,how many entries will be there in the page table if it is inverted?a)218b)220c)233d)251
1.2k
views
3 answers
0 votes
Yogendraa asked Jun 9, 2022
1,222 views
E--> E+EE--> E*EE--> idInput string: id + id + id