It seems unnecessary to have to use an extra branch to check for this special case.
I couldn't measure any performance difference. Perhaps Clang inlines and removes the check most of the time, but I still think it's worth fixing.
Paths
| Differential D4945
BumpPtrAllocator: don't accept 0 for the alignment parameter ClosedPublic Authored by hans on Aug 17 2014, 12:40 PM.
Details
Summary It seems unnecessary to have to use an extra branch to check for this special case. I couldn't measure any performance difference. Perhaps Clang inlines and removes the check most of the time, but I still think it's worth fixing.
Diff Detail Event Timelinehans updated this object. This revision is now accepted and ready to land.Aug 19 2014, 3:44 PM
Revision Contents
Diff 12592 include/llvm/Support/Allocator.h
unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp
unittests/Support/AllocatorTest.cpp
|