Re: [GOOGLE] Refactor AutoFDO

2013-08-07 Thread Xinliang David Li
ok for google branch. David On Tue, Aug 6, 2013 at 3:41 PM, Dehao Chen wrote: > Patch updated. > > http://codereview.appspot.com/12079043 > > Thanks, > Dehao > > > On Fri, Aug 2, 2013 at 11:21 AM, Xinliang David Li wrote: >> More to follow. >> >> David >> static void read_profile (void

Re: [GOOGLE] Refactor AutoFDO

2013-08-02 Thread Xinliang David Li
More to follow. David >>static void >> read_profile (void) >> { >> if (gcov_open (auto_profile_file, 1) == 0) >> { >> inform (0, "Cannot open profile file %s.", auto_profile_file); Should be at least warning instead -- I think error is probably more appropriate -- this is different

Re: [GOOGLE] Refactor AutoFDO

2013-07-31 Thread Xinliang David Li
Another round of documentation and naming (not for coding style, but for clearer semantics) related comments: David > > namespace autofdo { > > /* Represent a source location: (function_decl, lineno). */ > typedef std::pair decl_lineno; > /* Represent an inline stack. vector[0] is the leaf node

Re: [GOOGLE] Refactor AutoFDO

2013-07-30 Thread Xinliang David Li
I have some preliminary comments. Mostly just related to code style and missing documentation. David > > #define DEFAULT_AUTO_PROFILE_FILE "fbdata.afdo" > > struct SourceLocation Is using Upper case in struct names allowed? > { > tree func_decl; > unsigned lineno; > }; > > typedef std::vect