From: Tanya Lattner Date: Sat, 31 May 2003 20:01:37 +0000 (+0000) Subject: Fixed comment width, changed arg to be const, fixed indentation, removed unnecessary... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=658c5bcdb27fe7e7936b91fc9ccc80738e3bfd22 Fixed comment width, changed arg to be const, fixed indentation, removed unnecessary includes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6476 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Transforms/Utils/Cloning.h b/include/llvm/Transforms/Utils/Cloning.h index f6e62d9566b..8a6b69997c0 100644 --- a/include/llvm/Transforms/Utils/Cloning.h +++ b/include/llvm/Transforms/Utils/Cloning.h @@ -92,10 +92,10 @@ void CloneFunctionInto(Function *NewFunc, const Function *OldFunc, bool InlineFunction(CallInst *C); -/// CloneTrace - Returns a copy of the specified trace. It removes internal phi -/// nodes, copies the basic blocks, remaps variables, and returns a new vector -/// of basic blocks (the cloned trace). -/// -std::vector CloneTrace(std::vector &origTrace); +/// CloneTrace - Returns a copy of the specified trace. +/// It takes a vector of basic blocks clones the basic blocks, removes internal +/// phi nodes, adds it to the same function as the original (although there is +/// no jump to it) and returns the new vector of basic blocks. +std::vector CloneTrace(const std::vector &origTrace); #endif diff --git a/lib/Transforms/Utils/CloneTrace.cpp b/lib/Transforms/Utils/CloneTrace.cpp index e8578c512d2..2890b9e2b16 100644 --- a/lib/Transforms/Utils/CloneTrace.cpp +++ b/lib/Transforms/Utils/CloneTrace.cpp @@ -1,22 +1,20 @@ -//===- CloneTrace.cpp - Clone a trace ---------===// +//===- CloneTrace.cpp - Clone a trace -------------------------------------===// // // This file implements the CloneTrace interface, which is used // when writing runtime optimizations. It takes a vector of basic blocks -// removes internal phi nodes, clones the basic blocks, and returns the new -// vector of basic blocks. +// clones the basic blocks, removes internal phi nodes, adds it to the +// same function as the original (although there is no jump to it) and +// returns the new vector of basic blocks. // //===----------------------------------------------------------------------===// -#include "llvm/Instruction.h" -#include "llvm/BasicBlock.h" +#include "llvm/Transforms/Utils/Cloning.h" #include "llvm/iPHINode.h" #include "llvm/Function.h" -#include "llvm/Transforms/Utils/Cloning.h" -#include //Clones the trace (a vector of basic blocks) -std::vector CloneTrace(std::vector &origTrace) { +std::vector CloneTrace(const std::vector &origTrace) { std::vector clonedTrace; std::map ValueMap;