Welcome to the course homepage. Your instructor is Uday Khedker and TA is Sagar Kamble. Apart from him, the RAs associated with GCC Resource Center will also help us in this course. The course is held in room SIC 305 in slot 9 (Mon and Thu 3:30 to 4:55).
Announcements
(19 March 2010). Your 4th assignment is to traverse the RTL
level CFG and
print a more understandable RTL code by using "=" for set operations,
converting prefix expressions into infix, and using familiar symbols
for operations. You laso have to print the height of the top level
expression in terms of the number of nested operators involved. All
organizationsl details of the data structures,
comments, and auxilliary information must be skipped. For example,
consider the following RTL code dumped in file.c.013.cfg
for
an assignment statement
c = a
+ b.
Basic
block 1 prev -1, next -2, loop_depth 0, count 0, freq 0.
Predecessors: ENTRY
(fallthru)
Successors: EXIT
[100.0%] (fallthru)
(note 2 0 4 NOTE_INSN_DELETED)
(note 4 2 7 0
NOTE_INSN_FUNCTION_BEG)
;; Start of basic block 1,
registers live: (nil)
(note 7 4 9 1 [bb 1]
NOTE_INSN_BASIC_BLOCK)
(insn 9 7 10 1 (set (reg:SI
61 [
c ])
(mem/c/i:SI (plus:SI (reg/f:SI 20 frame)
(const_int -4 [0xfffffffc])) [0 c+0 S4 A32])) 34 {*movsi_1} (nil)
(nil))
(insn 10 9 11 1 (parallel [
(set (reg:SI 60)
(plus:SI (mem/c/i:SI (plus:SI (reg/f:SI 20 frame)
(const_int -8 [0xfffffff8])) [0 b+0 S4 A32])
(reg:SI 61 [ c ])))
(clobber (reg:CC 17 flags))
]) 148 {*addsi_1} (nil)
(nil))
(insn 11 10 12 1 (set
(mem/c/i:SI
(plus:SI (reg/f:SI 20 frame)
(const_int -12 [0xfffffff4])) [0 a+0 S4 A32])
(reg:SI 60)) 34 {*movsi_1} (nil)
(expr_list:REG_EQUAL (plus:SI (mem/c/i:SI (plus:SI (reg/f:SI 20 frame)
(const_int -8 [0xfffffff8])) [0 b+0 S4 A32])
(mem/c/i:SI (plus:SI (reg/f:SI 20 frame)
(const_int -4 [0xfffffffc])) [0 c+0 S4 A32]))
(nil)))
(note
12 11 16 1 NOTE_INSN_FUNCTION_END)
(insn 16 12 17 1 (clobber
(reg/i:SI 0 ax)) -1 (nil)
(nil))
(insn 17 16 21 1 (clobber
(reg:SI
58 [ <result> ])) -1 (nil)
(nil))
(insn 21 17 0 1 (use
(reg/i:SI 0
ax)) -1 (nil)
(nil))
;; End of basic block 1,
registers live:
(nil)
;;
Start of basic block 1, PRED Blocks: ENTRY (fallthru), SUCC Blocks:
EXIT (fallthru)
;; SI Registers: r60, r20,
r61,
r0, r58
;; Address Registers: r20
r61 = *(r20 - 4) ; Height 3
r60 = *(r60 - 8) + r61
|| clobber
r17 ; Height 4
*(r20 - 12) = r60 ; Height 3
clobber r0 ;
Height 1
clobber r58 ; Height 1
use r0 ; Height 1
;; End of basic block 1
gccint.pdf
for details. The
submission deadline for this assignment Sunday 28 March Oct.
2010.(18 March 2010). Here are the slides that we used for gimple representation and RTL representation in gcc and the patch file for the RTL pass
discussed in the class.
(4 March 2010). Assignment 3 requires you to convert a
call graph into a super graph. The output of your pass should be a cfg
dump in which
The basic blocks containing function calls have been split.
Modified successor and predecessor lists of these blocks (containing new call and return nodes as may be appropriate) is shown.
Call and return nodes are shown with appropriate successor and predecessor lists. The successor of a call node should refer to the ENTRY block of the called function whereas the predecessor of a return node should refer to the EXIT block of the called function.
ENTRY block of each function will now have a non-empty predecessor list and the EXIT block of each function will have a non-empty successor list.
The assessment will involve looking at dumps for a set of test cases and then looking at the code of your pass.
Please
submit a .tgz of a directory containing your patch file and a README
file that describes your strategy of introducing interprocedural edges.
In case you are explicitly changing the data structures, please mention
the data structures in this file. If you are simulating traversal over
these edges, please list the APIs (with parameters and return values).
(3 Feb 2010). Your first assignment was to explore the
cross-build of gcc. Your second assignment involves reading Gimple IR
in gcc-4.4.2. Your third assignment will be to convert a call
graph into a supergraph by
isolating function calls into separate call and return nodes and
connecting call nodes to the start nodes of the called
procedures and procedure exit nodes to the corresponding return nodes
in the callee procedures.
(3 Feb 2010). Here's a list of projects that I would like to suggest for cs715. It is strongly recommended that the projects be done in groups of two. However, I don't want to make it mandatory; so if you want do a project alone that is fine by me but I would like this to be discussed clearly so that you are aware of what you are getting into.
(3 Feb 2010). The slides on gcc source code navigation are
available. A couple of detailed notes sheets on the control flow in gcc driver
and the control flow in cc1 are
also
available. You can also see the relevant code fragments for the control flow in gcc driver and the control flow in cc1.
(18 Jan 2010). I have updated the introductory
slides. The slides on gimple IR
that we used today are also uploaded. File gccwk09.c
that the slides refer to has also been uploaded. Please try to build
GCC-4.3.1 with this file and observe the effect of the pass.
(4 Jan 2010). The Introductory
slides that we used in today's lecture are available. These slides
provide course plan in terms of motivation, coverage, pedogogy, and
assessment scheme. We will cover the configuration and building in the
lecture on Monday 8 Jan 2010.