Hi Arnold, > + /// tail call optimization. Target which want to do tail call optimization > + /// should implement this function.
Target -> Targets. Also shouldn't it be "override" rather than "implement"? > + /// PerformTailCallOpt - This flag is enabled when the -tailcallopt is when the -> when > +/// CheckDAGForTailCallsAndFixThem - This Function looks for CALL nodes in > the > +/// DAG and fixes their tailcall attribute operand Missing full stop at the end. > +pushes all arguments on the top of the stack (their normal place if > +that was a not tail call optimized functiong call ) before moving them if that was a not tail call optimized functiong call -> for non-tail call optimized calls > +to actual stack slot. this is done to prevent overwriting of paramters this -> This paramters -> parameters > +callee overwrites callers arguments. callers -> the caller's > + parameters of the caller function and have no local value in the > + caller Missing full stop. > + in above example local does not need to be pushed onto the top of in above -> In the above > + the stack as it is definitetly not a caller's function parameter definitetly -> definitely Missing full stop. > + overwrite a caller paramter which is used by the callee and only paramter -> parameter > + push them onto the top of the stack Missing full stop. > + here we don't need to write any variables to the top of the stack here -> Here > + since they don't overwrite each other Missing full stop. > + here we need to push the arguments because they overwrite each other here -> Here Missing full stop. > + code for lowering directly onto callers arguments: code -> Code > +// tail call convetion (fast) one register is reserved for target address > +// namely R9 tail -> Tail convetion -> convention (fast) one -> (fast): One address namely R9 -> address, namely R9. > +/// Same as C calling convention up to nonfree ECX which is used for storing > +/// potential pointer to tail called function up to nonfree -> except for non-free storing potential -> storing a potential Missing full stop. Note that ECX may be used if there is a 'nest' parameter, see this line: + // The 'nest' parameter, if any, is passed in ECX. + CCIfNest<CCAssignToReg<[ECX]>>, How do you avoid collisions? Ciao, Duncan. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits