[llvm-commits] [llvm] r165201 - /llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp

David Blaikie dblaikie at gmail.com
Fri Oct 5 08:29:59 PDT 2012


On Thu, Oct 4, 2012 at 9:54 PM, Lang Hames <lhames at gmail.com> wrote:
> A trivial main function doesn't really seem deserving of a regression test.

Well the regression test I would've expected would be a single
IR-level test that just takes some trivial IR, runs llc with the PBQP
regalloc (& a fixed target triple) and tests the resulting assembly to
ensure it's sane.

> I should really set up a PBQP tester.

Basically running the test-suite but with the PBQP regalloc? That'd
certainly be useful, but actual regression tests would be handy too. I
suppose I could see complaints that PBQP is so niche that it's not
worth slowing down everyone's development cycle to run PBQP regression
tests on every run, but... it'd be nice if possible.

> I'm going to look into PR14027
> (http://llvm.org/bugs/show_bug.cgi?id=14027) first though.
>
> - Lang.
>
> On Thu, Oct 4, 2012 at 12:07 AM, David Blaikie <dblaikie at gmail.com> wrote:
>>
>> On Wed, Oct 3, 2012 at 9:50 PM, Lang Hames <lhames at gmail.com> wrote:
>> > Author: lhames
>> > Date: Wed Oct  3 23:50:53 2012
>> > New Revision: 165201
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=165201&view=rev
>> > Log:
>> > Fix reg mask slot test, and preserve LiveIntervals and VirtRegMap in the
>> > PBQP
>> > allocator. Fixes PR13945.
>>
>> Test case?
>>
>> >
>> > Modified:
>> >     llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp
>> >
>> > Modified: llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp
>> > URL:
>> > http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp?rev=165201&r1=165200&r2=165201&view=diff
>> >
>> > ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp Wed Oct  3 23:50:53 2012
>> > @@ -231,7 +231,7 @@
>> >          continue;
>> >
>> >        // vregLI crosses a regmask operand that clobbers preg.
>> > -      if (!regMaskOverlaps.empty() && !regMaskOverlaps.test(preg))
>> > +      if (!regMaskOverlaps.empty() && regMaskOverlaps.test(preg))
>> >          continue;
>> >
>> >        // vregLI overlaps fixed regunit interference.
>> > @@ -432,6 +432,7 @@
>> >    au.addRequired<SlotIndexes>();
>> >    au.addPreserved<SlotIndexes>();
>> >    au.addRequired<LiveIntervals>();
>> > +  au.addPreserved<LiveIntervals>();
>> >    //au.addRequiredID(SplitCriticalEdgesID);
>> >    if (customPassID)
>> >      au.addRequiredID(*customPassID);
>> > @@ -443,6 +444,7 @@
>> >    au.addRequired<MachineLoopInfo>();
>> >    au.addPreserved<MachineLoopInfo>();
>> >    au.addRequired<VirtRegMap>();
>> > +  au.addPreserved<VirtRegMap>();
>> >    MachineFunctionPass::getAnalysisUsage(au);
>> >  }
>> >
>> >
>> >
>> > _______________________________________________
>> > llvm-commits mailing list
>> > llvm-commits at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>



More information about the llvm-commits mailing list