Home | History | Annotate | Download | only in Utils

Lines Matching refs:inputs

85     void findInputsOutputs(Values &inputs, Values &outputs);
87 Function *constructFunction(const Values &inputs,
97 Values &inputs,
103 /// severSplitPHINodes - If a PHI node has multiple inputs from outside of the
206 // findInputsOutputs - Find inputs to, outputs from the code region.
208 void CodeExtractor::findInputsOutputs(Values &inputs, Values &outputs) {
219 inputs.insert(*O);
240 /// constructFunction - make a function based on inputs and outputs, as follows:
243 Function *CodeExtractor::constructFunction(const Values &inputs,
250 DEBUG(dbgs() << "inputs: " << inputs.size() << "\n");
264 for (Values::const_iterator i = inputs.begin(),
265 e = inputs.end(); i != e; ++i) {
287 if (AggregateArgs && (inputs.size() + outputs.size() > 0)) {
310 // Rewrite all users of the inputs in the extracted region to use the
312 for (unsigned i = 0, e = inputs.size(); i != e; ++i) {
321 "gep_" + inputs[i]->getName(), TI);
322 RewriteVal = new LoadInst(GEP, "loadgep_" + inputs[i]->getName(), TI);
326 std::vector<User*> Users(inputs[i]->use_begin(), inputs[i]->use_end());
331 inst->replaceUsesOfWith(inputs[i], RewriteVal);
337 for (unsigned i = 0, e = inputs.size(); i != e; ++i, ++AI)
338 AI->setName(inputs[i]->getName());
377 Values &inputs, Values &outputs) {
379 // aggregating parameters), or plan inputs and allocated memory for outputs
384 // Add inputs as params, or to be filled into the struct
385 for (Values::iterator i = inputs.begin(), e = inputs.end(); i != e; ++i)
405 if (AggregateArgs && (inputs.size() + outputs.size() > 0)) {
418 for (unsigned i = 0, e = inputs.size(); i != e; ++i) {
437 unsigned FirstOut = inputs.size();
439 std::advance(OutputArgBegin, inputs.size());
646 /// find inputs and outputs for the region
648 /// for inputs: add to function as args, map input instr* to arg#
662 // 1) Find inputs, outputs
670 Values inputs, outputs;
703 // Find inputs to, outputs from the code region.
704 findInputsOutputs(inputs, outputs);
706 // Construct new function based on inputs/outputs & add allocas for all defs.
707 Function *newFunction = constructFunction(inputs, outputs, header,
712 emitCallAndSwitchStatement(newFunction, codeReplacer, inputs, outputs);