[llvm] r200309 - Provide a stub Target Streamer implementation for PPC MachO

David Fang fang at csl.cornell.edu
Wed Jan 29 13:26:14 PST 2014


More observations:

Merged up to r200308, I got tons of DebugInfo test failures like:

FAIL: LLVM :: DebugInfo/2010-05-10-MultipleCU.ll (5180 of 9637)
******************** TEST 'LLVM :: DebugInfo/2010-05-10-MultipleCU.ll' 
FAILED **
******************
Script:
--
gtimeout 1m  /Users/fang/local/src/LLVM-svn/gcc40-cmake-build/./bin/llc 
-O0 -fil
etype=obj < 
/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/DebugInfo/2010-05-10-
MultipleCU.ll | 
/Users/fang/local/src/LLVM-svn/gcc40-cmake-build/./bin/llvm-dwar
fdump -debug-dump=info - | 
/Users/fang/local/src/LLVM-svn/gcc40-cmake-build/./bi
n/FileCheck 
/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/DebugInfo/2010-05-10-
MultipleCU.ll
--
Exit Code: 2

Command Output (stderr):
--
Stack dump:
0.      Program arguments: 
/Users/fang/local/src/LLVM-svn/gcc40-cmake-build/./bi
n/llc -O0 -filetype=obj
-: The file was not recognized as a valid object file
FileCheck error: '-' is empty.

--
[ Bus error running llc ]


Merging r200309 fixed all of them (except one previously failing test).
The reason no other PowerPC-enabled buildbots observed the same failures 
is that all of the failing tests invoke llc -filetype=obj without a target 
triple, since the llvm-dwarfdump output is expected to be 
host-independent.  Only someone with a PowerPC-backend enabled Darwin 
host (like your truly and Iain) would see tests failed.

Anyways, hopefuly the hello-reloc.ll test targeting mach-o will cover us 
better in other buildbots!

David

> Hi,
> 	The attached updated test 'hello-reloc.ll' exposes the crash that 
> Iain was observing.  It just enables an llc test that emits an object file 
> directly.
> 	Rafael, when I submitted this test originally, you asked that the llc 
> test be disabled, but this proves that it is critical to catching some 
> breakages.  It builds an object, but doesn't try to execute it.  Ok to 
> commit?
>
> David
>
>>  Iain,
>>  	I've merged the powerpc-darwin8 branch up to the revision *before*
>>  this commit, and llvm-mc doesn't crash for me, using the
>>  test/CodeGen/hello-reloc.s test case, which invokes llvm-mc, targets
>>  powerpc-darwin, and includes a .machine directive.  Since you added the
>>  PPC-darwin-asm-parser, .machine never crashed, it's just been ignored. I
>>  would expect this test to trigger buildbot alarms if something were amiss
>>  on bots with the PowerPC target.
>>    Is some other way to tickle the problem, that I'm missing?
>>
>>  David
>> 
>> >   Can you added a testcase (with llvm-mc) showing that we don't crash
>> >   with .machine and having a fixme on what should happen once it is
>> >   implemented?
>> > 
>> >   On 28 January 2014 06:03, Iain Sandoe <iain at codesourcery.com> wrote:
>> > >   Author: iains
>> > >   Date: Tue Jan 28 05:03:17 2014
>> > >   New Revision: 200309
>> > > 
>> > >   URL: http://llvm.org/viewvc/llvm-project?rev=200309&view=rev
>> > >   Log:
>> > >   Provide a stub Target Streamer implementation for PPC MachO
>> > > 
>> > >   At present, this handles .tc (error) and needs to be expanded to deal 
>> > >   properly with .machine
>> > > 
>> > > 
>> > >   Modified:
>> > >       llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
>> > > 
>> > >   Modified: 
>> > >   llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
>> > >   URL: 
>> > >   http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp?rev=200309&r1=200308&r2=200309&view=diff
>> > >   ==============================================================================
>> > >   --- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp 
>> > >   (original)
>> > >   +++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp 
>> > >   Tue Jan 28 05:03:17 2014
>> > >  @@ -139,6 +139,18 @@ public:
>> > >        // limit the parser?
>> > >      }
>> > >   };
>> > >   +
>> > >   +class PPCTargetMachOStreamer : public PPCTargetStreamer {
>> > >   +public:
>> > >   +  PPCTargetMachOStreamer(MCStreamer &S) : PPCTargetStreamer(S) {}
>> > >   +  virtual void emitTCEntry(const MCSymbol &S) {
>> > >   +    llvm_unreachable("Unknown pseudo-op: .tc");
>> > >   +  }
>> > >   +  virtual void emitMachine(StringRef CPU) {
>> > >   +    // FIXME: We should update the CPUType, CPUSubType in the Object 
>> > >   file if
>> > >   +    // the new values are different from the defaults.
>> > >   +  }
>> > >   +};
>> > >    }
>> > > 
>> > >    // This is duplicated code. Refactor this.
>> > >  @@ -149,8 +161,11 @@ static MCStreamer *createMCStreamer(cons
>> > >                                        const MCSubtargetInfo &STI,
>> > >                                        bool RelaxAll,
>> > >                                        bool NoExecStack) {
>> > >   -  if (Triple(TT).isOSDarwin())
>> > >   -    return createMachOStreamer(Ctx, MAB, OS, Emitter, RelaxAll);
>> > >   +  if (Triple(TT).isOSDarwin()) {
>> > >   +    MCStreamer *S = createMachOStreamer(Ctx, MAB, OS, Emitter, 
>> > >   RelaxAll);
>> > >   +    new PPCTargetMachOStreamer(*S);
>> > >   +    return S;
>> > >   +  }
>> > > 
>> > >      MCStreamer *S =
>> > >          createELFStreamer(Ctx, MAB, OS, Emitter, RelaxAll, 
>> > >          NoExecStack);
>> > > 
>> > > 
>> > >  _______________________________________________
>> > >   llvm-commits mailing list
>> > >   llvm-commits at cs.uiuc.edu
>> > >   http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> >  _______________________________________________
>> >   llvm-commits mailing list
>> >   llvm-commits at cs.uiuc.edu
>> >   http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> > 
>> 
>> 
>
>

-- 
David Fang
http://www.csl.cornell.edu/~fang/




More information about the llvm-commits mailing list