Switch UnaryOperators to default to passing names up by const char* when possible.

This speeds up bcreading by 1.5%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34233 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-02-13 07:54:42 +00:00
parent ec79b3da13
commit f00042a999
5 changed files with 100 additions and 20 deletions

View File

@@ -41,10 +41,13 @@ class Instruction : public User {
void setParent(BasicBlock *P);
protected:
Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps,
const std::string &Name = "",
Instruction *InsertBefore = 0);
const std::string &Name, Instruction *InsertBefore = 0);
Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps,
const std::string &Name, BasicBlock *InsertAtEnd);
Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps,
const char *Name = 0, Instruction *InsertBefore = 0);
Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps,
const char *Name, BasicBlock *InsertAtEnd);
public:
// Out of line virtual method, so the vtable, etc has a home.
~Instruction();