[PATCH 0/5] LiveInterval refactoring
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Sep 3 12:17:32 PDT 2013
On Sep 3, 2013, at 11:58 AM, Matthias Braun <mbraun at apple.com> wrote:
>
> On Sep 3, 2013, at 11:52 AM, Benjamin Kramer <benny.kra at gmail.com> wrote:
>
>>
>> On 03.09.2013, at 20:46, Matthias Braun <mbraun at apple.com> wrote:
>>
>>> Currently I see these options:
>>>
>>> 1:
>>> live with a freestanding struct LiveInterval;
>>>
>>> 2:
>>> class LiveIntervalBase {
>>> public: struct Segment {};
>>> };
>>> template <> struct isPodLike<LiveIntervalBase::Segment> /* … */
>>> class LiveInterval : public LiveIntervalBase {
>>> public:
>>> SmallVector<Segment> /* … */
>>> };
>>>
>>> 3:
>>> /** please do not use directly but LiveInterval::Segment */
>>> struct LiveSegment { /* … */ }
>>> template <> struct isPodLike<LiveSegment> /* … */
>>> class LiveInterval {
>>> public:
>>> typedef LiveSegment Segment;
>>> SmallVector<Segment> /* … */
>>> };
>>>
>>> 4: Drop the isPodLike, no idea if/how badly it affects performance
>>
>> When compiling with Clang we use the is_trivially_copyable type trait as a base line for isPodLike. That should be sufficient for the Segment class. Not sure if we care enough about performance on other compilers.
> Indeed, sounds like a good enough reason to drop isPodLike here, IMHO.
+1 Go for it.
Clang’s release build ought to be self hosting anyway, so there is no reason to worry about performance on other compilers.
Thanks,
/jakob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130903/3a261bf6/attachment.html>
More information about the llvm-commits
mailing list