From 1275a2dec8564ced4a4679bcb82fdaa241a87805 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 16 Mar 2017 16:57:31 +0000 Subject: [IR] Inline some Function accessors I checked that all of these out-of-line methods previously compiled to simple loads and bittests, so they are pretty good candidates for inlining. In particular, arg_size() and arg_empty() are popular and are just two loads, so they seem worth inlining. llvm-svn: 297963 --- llvm/lib/IR/Globals.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'llvm/lib/IR/Globals.cpp') diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp index 675c515b21f..54917e596b7 100644 --- a/llvm/lib/IR/Globals.cpp +++ b/llvm/lib/IR/Globals.cpp @@ -93,18 +93,6 @@ void GlobalObject::setAlignment(unsigned Align) { assert(getAlignment() == Align && "Alignment representation error!"); } -unsigned GlobalObject::getGlobalObjectSubClassData() const { - unsigned ValueData = getGlobalValueSubClassData(); - return ValueData >> GlobalObjectBits; -} - -void GlobalObject::setGlobalObjectSubClassData(unsigned Val) { - unsigned OldData = getGlobalValueSubClassData(); - setGlobalValueSubClassData((OldData & GlobalObjectMask) | - (Val << GlobalObjectBits)); - assert(getGlobalObjectSubClassData() == Val && "representation error"); -} - void GlobalObject::copyAttributesFrom(const GlobalValue *Src) { GlobalValue::copyAttributesFrom(Src); if (const auto *GV = dyn_cast(Src)) { -- cgit v1.2.3