diff options
author | Reid Kleckner <rnk@google.com> | 2017-03-16 16:57:31 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-03-16 16:57:31 +0000 |
commit | 1275a2dec8564ced4a4679bcb82fdaa241a87805 (patch) | |
tree | 6f1ea8290e5672b622cb15e60bc9a7490d941eda /llvm/lib/IR/Globals.cpp | |
parent | c5b3351750c74b192d1fb31de291494fa8db97b2 (diff) | |
download | bcm5719-llvm-1275a2dec8564ced4a4679bcb82fdaa241a87805.tar.gz bcm5719-llvm-1275a2dec8564ced4a4679bcb82fdaa241a87805.zip |
[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
Diffstat (limited to 'llvm/lib/IR/Globals.cpp')
-rw-r--r-- | llvm/lib/IR/Globals.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
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<GlobalObject>(Src)) { |